Bug 1215974. In GetNearestScrollableFrame don't skip the root scroll frame if we are asked to always match the root scroll frame even if it doesn't WantAsyncScroll(). r=botond

SCROLLABLE_ALWAYS_MATCH_ROOT should take precendence over SCROLLABLE_ONLY_ASYNC_SCROLLABLE as if we fail to find the root scroll frame we will have no usable scroll frame at all.
This commit is contained in:
Timothy Nikkel 2015-11-04 19:51:03 -06:00
parent 1b6967d88b
commit 1ff4279f91

View File

@ -1940,13 +1940,14 @@ nsLayoutUtils::GetNearestScrollableFrame(nsIFrame* aFrame, uint32_t aFlags)
if (scrollableFrame->WantAsyncScroll()) {
return scrollableFrame;
}
continue;
} else {
ScrollbarStyles ss = scrollableFrame->GetScrollbarStyles();
if ((aFlags & SCROLLABLE_INCLUDE_HIDDEN) ||
ss.mVertical != NS_STYLE_OVERFLOW_HIDDEN ||
ss.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN) {
return scrollableFrame;
}
}
ScrollbarStyles ss = scrollableFrame->GetScrollbarStyles();
if ((aFlags & SCROLLABLE_INCLUDE_HIDDEN) ||
ss.mVertical != NS_STYLE_OVERFLOW_HIDDEN ||
ss.mHorizontal != NS_STYLE_OVERFLOW_HIDDEN)
return scrollableFrame;
}
if (aFlags & SCROLLABLE_ALWAYS_MATCH_ROOT) {
nsIPresShell* ps = f->PresContext()->PresShell();