Bug 1105823 - Ensure we find a scrollable ancestor even for fixed-position items. r=botond

This commit is contained in:
Kartikaya Gupta 2014-11-28 12:25:40 -05:00
parent fdfe3b6013
commit 10fa8c037c
2 changed files with 4 additions and 3 deletions

View File

@ -1805,8 +1805,8 @@ nsLayoutUtils::GetNearestScrollableFrame(nsIFrame* aFrame, uint32_t aFlags)
}
if (aFlags & SCROLLABLE_ALWAYS_MATCH_ROOT) {
nsPresContext* pc = f->PresContext();
if (pc->IsRootContentDocument() && pc->PresShell()->GetRootScrollFrame() == f) {
return scrollableFrame;
if (pc->IsRootContentDocument() && pc->PresShell()->GetRootFrame() == f) {
return pc->PresShell()->GetRootScrollFrameAsScrollable();
}
}
}

View File

@ -586,7 +586,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 hit it.
* root scrollable frame for the root content document if we don't hit
* anything else.
*/
SCROLLABLE_ALWAYS_MATCH_ROOT = 0x08,
};