mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854421 - Part 12: Use the view tree to find the subdocument frame in nsDocShell. r=tn
This commit is contained in:
parent
a706976822
commit
dab2c77f74
@ -5565,11 +5565,19 @@ nsDocShell::GetVisibility(bool * aVisibility)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIContent *shellContent =
|
||||
pPresShell->GetDocument()->FindContentForSubDocument(presShell->GetDocument());
|
||||
NS_ASSERTION(shellContent, "subshell not in the map");
|
||||
vm = presShell->GetViewManager();
|
||||
if (vm) {
|
||||
view = vm->GetRootView();
|
||||
}
|
||||
|
||||
nsIFrame* frame = shellContent ? shellContent->GetPrimaryFrame() : nullptr;
|
||||
if (view) {
|
||||
view = view->GetParent(); // anonymous inner view
|
||||
if (view) {
|
||||
view = view->GetParent(); // subdocumentframe's view
|
||||
}
|
||||
}
|
||||
|
||||
nsIFrame* frame = view ? view->GetFrame() : nullptr;
|
||||
bool isDocShellOffScreen = false;
|
||||
docShell->GetIsOffScreenBrowser(&isDocShellOffScreen);
|
||||
if (frame &&
|
||||
|
Loading…
Reference in New Issue
Block a user