mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 545581. Stop checking view visibility at content/chrome boundary. r=mats
--HG-- extra : rebase_source : 57383fcc5138b4b4ff27619adaaec33fba38a3a2
This commit is contained in:
parent
90767618c5
commit
ae45815e53
@ -3582,10 +3582,23 @@ NS_IMETHODIMP nsFrame::GetOffsetFromView(nsPoint& aOffset,
|
||||
/* virtual */ PRBool
|
||||
nsIFrame::AreAncestorViewsVisible() const
|
||||
{
|
||||
for (nsIView* view = GetClosestView(); view; view = view->GetParent()) {
|
||||
if (view->GetVisibility() == nsViewVisibility_kHide) {
|
||||
const nsIFrame* parent;
|
||||
for (const nsIFrame* f = this; f; f = parent) {
|
||||
nsIView* view = f->GetView();
|
||||
if (view && view->GetVisibility() == nsViewVisibility_kHide) {
|
||||
return PR_FALSE;
|
||||
}
|
||||
parent = f->GetParent();
|
||||
if (!parent) {
|
||||
parent = nsLayoutUtils::GetCrossDocParentFrame(f);
|
||||
if (parent && parent->PresContext()->IsChrome() &&
|
||||
!f->PresContext()->IsChrome()) {
|
||||
// Don't look beyond chrome/content boundary ... if the chrome
|
||||
// has hidden a content docshell, the content in the content
|
||||
// docshell shouldn't be affected (e.g. it should remain focusable).
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user