зеркало из https://github.com/mozilla/gecko-dev.git
Also prevent 'overflow:hidden' elements from being scrollable by wheel mouse. b=259615 r+sr=roc
This commit is contained in:
Родитель
df89250354
Коммит
6e688d8ca1
|
@ -1664,7 +1664,7 @@ nsEventStateManager::DoScrollText(nsPresContext* aPresContext,
|
|||
nsIScrollableView* scrollView = nsnull;
|
||||
PRBool passToParent = PR_TRUE;
|
||||
|
||||
while (scrollFrame && passToParent) {
|
||||
for( ; scrollFrame && passToParent; scrollFrame = scrollFrame->GetParent()) {
|
||||
// Check whether the frame wants to provide us with a scrollable view.
|
||||
scrollView = nsnull;
|
||||
nsCOMPtr<nsIScrollableViewProvider> svp = do_QueryInterface(scrollFrame);
|
||||
|
@ -1672,7 +1672,13 @@ nsEventStateManager::DoScrollText(nsPresContext* aPresContext,
|
|||
scrollView = svp->GetScrollableView();
|
||||
}
|
||||
if (!scrollView) {
|
||||
scrollFrame = scrollFrame->GetParent();
|
||||
continue;
|
||||
}
|
||||
|
||||
nsPresContext::ScrollbarStyles ss =
|
||||
nsLayoutUtils::ScrollbarStylesOfView(scrollView);
|
||||
if (NS_STYLE_OVERFLOW_HIDDEN ==
|
||||
(aScrollHorizontal ? ss.mHorizontal : ss.mVertical)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1715,8 +1721,6 @@ nsEventStateManager::DoScrollText(nsPresContext* aPresContext,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
scrollFrame = scrollFrame->GetParent();
|
||||
}
|
||||
|
||||
if (!passToParent && scrollView) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче