Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index 894e1c2f82949d54987dec697f895c6754ed3cfd..17ef3a933f9e7c5faf03d95d5ce12e1799a78db8 100644 |
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -946,8 +946,18 @@ MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() co |
if (frameView->hasSlowRepaintObjects()) |
reasons |= HasSlowRepaintObjects; |
- if (frameView->isScrollable() && hasVisibleSlowRepaintViewportConstrainedObjects(frameView)) |
+ FrameView::ScrollingReasons scrollingReasons = frameView->scrollingReasons(); |
+ const bool mayBeScrolledByInput = (scrollingReasons == FrameView::Scrollable); |
+ const bool mayBeScrolledByScript = (scrollingReasons == |
skobes
2014/11/05 21:05:22
Anything scrollable by input is also scrollable by
awoloszyn
2014/11/05 21:33:43
Done.
|
+ FrameView::NotScrollableExplicitlyDisabled); |
+ const bool canScroll = mayBeScrolledByInput || mayBeScrolledByScript; |
+ // TODO(awoloszyn) Currently crbug.com/304810 will let certain |
+ // overflow:hidden elements scroll on the fast path, so we should not let |
skobes
2014/11/05 21:05:22
Nit: I think this comment should say "...scroll on
awoloszyn
2014/11/05 21:33:43
Done.
|
+ // this move to the fast-path as an optimization, when we have slow-repaint |
+ // elements. |
+ if (canScroll && hasVisibleSlowRepaintViewportConstrainedObjects(frameView)) { |
reasons |= HasNonLayerViewportConstrainedObjects; |
+ } |
return reasons; |
} |