mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1697580 - Remove nsIDocShell.isOffScreenBrowser. r=smacleod
It's unused. Differential Revision: https://phabricator.services.mozilla.com/D107888
This commit is contained in:
parent
0d0fa2062b
commit
c1853bc54e
@ -398,7 +398,6 @@ nsDocShell::nsDocShell(BrowsingContext* aBrowsingContext,
|
||||
mCSSErrorReportingEnabled(false),
|
||||
mAllowAuth(mItemType == typeContent),
|
||||
mAllowKeywordFixup(false),
|
||||
mIsOffScreenBrowser(false),
|
||||
mDisableMetaRefreshWhenInactive(false),
|
||||
mIsAppTab(false),
|
||||
mDeviceSizeIsPageSize(false),
|
||||
@ -4929,12 +4928,9 @@ nsDocShell::GetVisibility(bool* aVisibility) {
|
||||
}
|
||||
|
||||
nsIFrame* frame = view ? view->GetFrame() : nullptr;
|
||||
bool isDocShellOffScreen = false;
|
||||
docShell->GetIsOffScreenBrowser(&isDocShellOffScreen);
|
||||
if (frame &&
|
||||
!frame->IsVisibleConsideringAncestors(
|
||||
nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY) &&
|
||||
!isDocShellOffScreen) {
|
||||
nsIFrame::VISIBILITY_CROSS_CHROME_CONTENT_BOUNDARY)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -4953,18 +4949,6 @@ nsDocShell::GetVisibility(bool* aVisibility) {
|
||||
return treeOwnerAsWin->GetVisibility(aVisibility);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::SetIsOffScreenBrowser(bool aIsOffScreen) {
|
||||
mIsOffScreenBrowser = aIsOffScreen;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDocShell::GetIsOffScreenBrowser(bool* aIsOffScreen) {
|
||||
*aIsOffScreen = mIsOffScreenBrowser;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsDocShell::ActivenessMaybeChanged() {
|
||||
bool isActive = mBrowsingContext->IsActive();
|
||||
if (RefPtr<PresShell> presShell = GetPresShell()) {
|
||||
|
@ -1229,7 +1229,6 @@ class nsDocShell final : public nsDocLoader,
|
||||
bool mCSSErrorReportingEnabled : 1;
|
||||
bool mAllowAuth : 1;
|
||||
bool mAllowKeywordFixup : 1;
|
||||
bool mIsOffScreenBrowser : 1;
|
||||
bool mDisableMetaRefreshWhenInactive : 1;
|
||||
bool mIsAppTab : 1;
|
||||
bool mDeviceSizeIsPageSize : 1;
|
||||
|
@ -469,13 +469,6 @@ interface nsIDocShell : nsIDocShellTreeItem
|
||||
*/
|
||||
[noscript, notxpcom] void DetachEditorFromWindow();
|
||||
|
||||
/**
|
||||
* If true, this browser is not visible in the traditional sense, but
|
||||
* is actively being rendered to the screen (ex. painted on a canvas)
|
||||
* and should be treated accordingly.
|
||||
**/
|
||||
attribute boolean isOffScreenBrowser;
|
||||
|
||||
/**
|
||||
* Propagated to the print preview document viewer. Must only be called on
|
||||
* a document viewer that has been initialized for print preview.
|
||||
|
@ -24,22 +24,9 @@ SimpleTest.waitForFocus(doTest);
|
||||
|
||||
function doTest() {
|
||||
var hiddenBrowser = document.getElementById("hiddenBrowser");
|
||||
var offScreenBrowser = document.getElementById("offScreenBrowser");
|
||||
var offScreenSubBrowser = offScreenBrowser.contentDocument.getElementById("topBrowser");
|
||||
var offScreenBurriedBrowser = offScreenBrowser.contentDocument.getElementById("burriedBrowser");
|
||||
|
||||
|
||||
hiddenBrowser.contentWindow.focus();
|
||||
ok(!hiddenBrowser.contentDocument.hasFocus(),"hidden browser is visible");
|
||||
|
||||
offScreenBrowser.docShell.isOffScreenBrowser = true;
|
||||
offScreenBrowser.contentWindow.focus();
|
||||
ok(offScreenBrowser.contentDocument.hasFocus(),"offscreen browser is not visible");
|
||||
|
||||
offScreenSubBrowser.contentWindow.focus();
|
||||
todo(offScreenSubBrowser.contentDocument.hasFocus(),"visible browser in offscreen browser is not visible");
|
||||
|
||||
offScreenBurriedBrowser.contentWindow.focus();
|
||||
ok(!offScreenBurriedBrowser.contentDocument.hasFocus(),"hidden browser in offscreen browser is visible");
|
||||
ok(!hiddenBrowser.contentDocument.hasFocus(), "hidden browser is unfocusable");
|
||||
|
||||
SimpleTest.finish();
|
||||
}
|
||||
@ -49,6 +36,5 @@ function doTest() {
|
||||
]]></script>
|
||||
<box flex="1" style="visibility: hidden; border:5px black solid">
|
||||
<browser style="border:5px blue solid" id="hiddenBrowser" src="bug454235-subframe.xhtml"/>
|
||||
<browser style="border:5px yellow solid" id="offScreenBrowser" src="bug454235-subframe.xhtml"/>
|
||||
</box>
|
||||
</window>
|
||||
|
Loading…
Reference in New Issue
Block a user