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

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

Issue 85763003: Ignore should-scroll-on-main-thread if main frame is not scrollable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 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') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/scrolling/ScrollingCoordinator.h
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.h b/Source/core/page/scrolling/ScrollingCoordinator.h
index e0bebd9aa104c9a26473d836632e903738b90b73..3acfe9ad89529c07c4b98fb55567c0e6c63b0e13 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.h
+++ b/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -66,7 +66,7 @@ public:
// Should be called after compositing has been updated.
void updateAfterCompositingChange();
- bool needsToUpdateAfterCompositingChange() const { return m_scrollGestureRegionIsDirty || m_touchEventTargetRectsAreDirty; }
+ bool needsToUpdateAfterCompositingChange() const { return m_scrollGestureRegionIsDirty || m_touchEventTargetRectsAreDirty || frameViewIsScrollableIsDirty(); }
// Should be called whenever a wheel event handler is added or removed in the
// frame view's underlying document.
@@ -115,6 +115,10 @@ public:
void updateTouchEventTargetRectsIfNeeded();
+ // For testing purposes only. This ScrollingCoordinator is reused between layout test, and must be reset
+ // for the results to be valid.
+ void reset();
+
protected:
explicit ScrollingCoordinator(Page*);
@@ -152,11 +156,16 @@ private:
blink::WebScrollbarLayer* getWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation);
void removeWebScrollbarLayer(ScrollableArea*, ScrollbarOrientation);
+ bool frameViewIsScrollableIsDirty() const;
typedef HashMap<ScrollableArea*, OwnPtr<blink::WebScrollbarLayer> > ScrollbarMap;
ScrollbarMap m_horizontalScrollbars;
ScrollbarMap m_verticalScrollbars;
HashSet<const RenderLayer*> m_layersWithTouchRects;
+ bool m_wasFrameScrollable;
+
+ // This is retained for testing.
+ MainThreadScrollingReasons m_lastMainThreadScrollingReasons;
};
} // namespace WebCore
« no previous file with comments | « Source/core/frame/FrameView.cpp ('k') | Source/core/page/scrolling/ScrollingCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698