Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1277)

Unified Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 699183004: Main-thread scroll if we have fixed-pos children and overflow:hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1bfd1b4189819e4f7894d9705a92eafd8dfe18a5 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 = mayBeScrolledByInput || (scrollingReasons ==
+ FrameView::NotScrollableExplicitlyDisabled);
+
+ // TODO(awoloszyn) Currently crbug.com/304810 will let certain
+ // overflow:hidden elements scroll on the compositor thread, so we should
+ // not let this move there path as an optimization, when we have slow-repaint
+ // elements.
+ if (mayBeScrolledByScript && hasVisibleSlowRepaintViewportConstrainedObjects(frameView)) {
reasons |= HasNonLayerViewportConstrainedObjects;
+ }
return reasons;
}
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698