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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h

Issue 2531603003: Only scroll on main if the targeted frames need to scroll on main (Closed)
Patch Set: Bug fixed Created 4 years 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
Index: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
index b5775ab80f437659a1792d800a4e512b198bac16..21f1843e3a0f90482e5bcd56fa02b32dcd2c5951 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -41,6 +41,7 @@ namespace blink {
using MainThreadScrollingReasons = uint32_t;
class LocalFrame;
+class Frame;
class FrameView;
class GraphicsLayer;
class Page;
@@ -94,9 +95,11 @@ class CORE_EXPORT ScrollingCoordinator final
// Should be called whenever the root layer for the given frame view changes.
void frameViewRootLayerDidChange(FrameView*);
- MainThreadScrollingReasons mainThreadScrollingReasons() const;
- bool shouldUpdateScrollLayerPositionOnMainThread() const {
- return mainThreadScrollingReasons() != 0;
+ MainThreadScrollingReasons mainThreadScrollingReasons(LocalFrame*) const;
pdr. 2016/12/13 05:51:17 Nit: LocalFrame& (const LocalFrame& if possible)
yigu 2016/12/14 21:07:27 Done.
+ MainThreadScrollingReasons mainThreadScrollingReasonsPerFrame(
+ LocalFrame*) const;
+ bool shouldUpdateScrollLayerPositionOnMainThread(LocalFrame* frame) const {
+ return mainThreadScrollingReasons(frame) != 0;
}
std::unique_ptr<WebScrollbarLayer> createSolidColorScrollbarLayer(
@@ -119,8 +122,9 @@ class CORE_EXPORT ScrollingCoordinator final
const PaintLayer* parent);
void updateClipParentForGraphicsLayer(GraphicsLayer* child,
const PaintLayer* parent);
+ void updateSubFrameScrollOnMainReason();
- String mainThreadScrollingReasonsAsText() const;
+ String mainThreadScrollingReasonsAsText(const Frame*) const;
Region computeShouldHandleScrollGestureOnMainThreadRegion(
const LocalFrame*,
const IntPoint& frameLocation) const;

Powered by Google App Engine
This is Rietveld 408576698