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

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

Issue 23641004: Ignore should-scroll-on-main-thread if main frame is not scrollable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated tests. Created 7 years, 3 months 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/page/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 e9f01bf4c49ee77a7c32a8a8b36e23da1fe12952..4ae90e603cab9f80199ab44e5d1306a2720a44e0 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -791,8 +791,11 @@ bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(Frame
MainThreadScrollingReasons ScrollingCoordinator::mainThreadScrollingReasons() const
{
+ // The main thread scrolling reasons are applicable to scrolls of the main
+ // frame. If it does not exist or if it is not scrollable, there is no
+ // reason to force main thread scrolling.
FrameView* frameView = m_page->mainFrame()->view();
- if (!frameView)
+ if (!frameView || !frameView->isScrollable())
return static_cast<MainThreadScrollingReasons>(0);
MainThreadScrollingReasons mainThreadScrollingReasons = (MainThreadScrollingReasons)0;
« no previous file with comments | « Source/core/page/FrameView.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698