зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
11afc76455
Коммит
b9113902fc
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче