Skip to content

Commit

Permalink
Bug 1757657. Remove some about:printpreview cruft that was missed in …
Browse files Browse the repository at this point in the history
…1702501. r=mstriemer

Differential Revision: https://phabricator.services.mozilla.com/D139993
  • Loading branch information
jwatt committed Apr 4, 2022
1 parent 5317a12 commit 82ca892
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 14 deletions.
6 changes: 1 addition & 5 deletions browser/components/sessionstore/SessionStore.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -5490,7 +5490,6 @@ var SessionStoreInternal = {
aTabState.entries.length == 1 &&
(aTabState.entries[0].url == "about:blank" ||
aTabState.entries[0].url == "about:newtab" ||
aTabState.entries[0].url == "about:printpreview" ||
aTabState.entries[0].url == "about:privatebrowsing") &&
!aTabState.userTypedValue
)
Expand All @@ -5515,10 +5514,7 @@ var SessionStoreInternal = {
aTabState.userTypedValue ||
(aTabState.attributes && aTabState.attributes.customizemode == "true") ||
(aTabState.entries.length &&
!(
aTabState.entries[0].url == "about:printpreview" ||
aTabState.entries[0].url == "about:privatebrowsing"
))
aTabState.entries[0].url != "about:privatebrowsing")
);
},

Expand Down
4 changes: 0 additions & 4 deletions docshell/base/nsAboutRedirector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,6 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::ALLOW_SCRIPT},
{"webrtc", "chrome://global/content/aboutwebrtc/aboutWebrtc.html",
nsIAboutModule::ALLOW_SCRIPT},
{"printpreview", "about:blank",
nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
nsIAboutModule::HIDE_FROM_ABOUTABOUT |
nsIAboutModule::URI_CAN_LOAD_IN_CHILD},
{"crashparent", "about:blank", nsIAboutModule::HIDE_FROM_ABOUTABOUT},
{"crashcontent", "about:blank",
nsIAboutModule::HIDE_FROM_ABOUTABOUT |
Expand Down
1 change: 0 additions & 1 deletion docshell/build/components.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ about_pages = [
'networking',
'performance',
'plugins',
'printpreview',
'processes',
'serviceworkers',
'srcdoc',
Expand Down
2 changes: 0 additions & 2 deletions dom/security/nsContentSecurityUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,6 @@ void nsContentSecurityUtils::AssertAboutPageHasCSP(Document* aDocument) {
"about:srcdoc"_ns,
// about:sync-log displays plain text only -> no CSP
"about:sync-log"_ns,
// about:printpreview displays plain text only -> no CSP
"about:printpreview"_ns,
// about:logo just displays the firefox logo -> no CSP
"about:logo"_ns,
// about:sync is a special mozilla-signed developer addon with low usage ->
Expand Down
3 changes: 1 addition & 2 deletions netwerk/ipc/DocumentChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ static bool URIUsesDocChannel(nsIURI* aURI) {
}

nsCString spec = aURI->GetSpecOrDefault();
return !spec.EqualsLiteral("about:printpreview") &&
!spec.EqualsLiteral("about:crashcontent");
return !spec.EqualsLiteral("about:crashcontent");
}

bool DocumentChannel::CanUseDocumentChannel(nsIURI* aURI) {
Expand Down

0 comments on commit 82ca892

Please sign in to comment.