mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 21:28:55 +00:00
Bug 1139464 - In GetNearestScrollableFrame(), associate the root APZC with the root scroll frame of the root document (whether chrome or content), not the root content document. r=kats,tn
--HG-- extra : source : 2ab85f9edf4d74962ca6bede6669cfc28b6b8e15
This commit is contained in:
parent
81d959605e
commit
70559e5194
@ -1833,9 +1833,10 @@ nsLayoutUtils::GetNearestScrollableFrame(nsIFrame* aFrame, uint32_t aFlags)
|
||||
return scrollableFrame;
|
||||
}
|
||||
if (aFlags & SCROLLABLE_ALWAYS_MATCH_ROOT) {
|
||||
nsPresContext* pc = f->PresContext();
|
||||
if (pc->IsRootContentDocument() && pc->PresShell()->GetRootFrame() == f) {
|
||||
return pc->PresShell()->GetRootScrollFrameAsScrollable();
|
||||
nsIPresShell* ps = f->PresContext()->PresShell();
|
||||
if (ps->GetDocument() && ps->GetDocument()->IsRootDisplayDocument() &&
|
||||
ps->GetRootFrame() == f) {
|
||||
return ps->GetRootScrollFrameAsScrollable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -588,8 +588,8 @@ public:
|
||||
SCROLLABLE_ONLY_ASYNC_SCROLLABLE = 0x04,
|
||||
/**
|
||||
* If the SCROLLABLE_ALWAYS_MATCH_ROOT flag is set, then return the
|
||||
* root scrollable frame for the root content document if we don't hit
|
||||
* anything else.
|
||||
* root scrollable frame for the root document (in the current process)
|
||||
* if we don't hit anything else.
|
||||
*/
|
||||
SCROLLABLE_ALWAYS_MATCH_ROOT = 0x08,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user