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

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

Issue 76983003: Revert "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/page/scrolling/ScrollingCoordinator.h ('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 46d954170d1e01a27ffa5a3bb9656b9f23debb63..9c681a264a6cd9e6d4690612d5de56bdbdcb8a60 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -90,8 +90,6 @@ ScrollingCoordinator::ScrollingCoordinator(Page* page)
: m_page(page)
, m_scrollGestureRegionIsDirty(false)
, m_touchEventTargetRectsAreDirty(false)
- , m_wasFrameScrollable(false)
- , m_lastMainThreadScrollingReasons(0)
{
}
@@ -153,12 +151,6 @@ void ScrollingCoordinator::updateAfterCompositingChange()
m_touchEventTargetRectsAreDirty = false;
}
- FrameView* frameView = m_page->mainFrame()->view();
- bool frameIsScrollable = frameView && frameView->isScrollable();
- if (m_wasFrameScrollable != frameIsScrollable)
- updateShouldUpdateScrollLayerPositionOnMainThread();
- m_wasFrameScrollable = frameIsScrollable;
-
const FrameTree& tree = m_page->mainFrame()->tree();
for (const Frame* child = tree.firstChild(); child; child = child->tree().nextSibling()) {
if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(child->view()))
@@ -601,10 +593,8 @@ void ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView(FrameView
void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)
{
- if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainFrame()->view())) {
- m_lastMainThreadScrollingReasons = reasons;
+ if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainFrame()->view()))
scrollLayer->setShouldScrollOnMainThread(reasons);
- }
}
void ScrollingCoordinator::pageDestroyed()
@@ -869,11 +859,8 @@ 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 || !frameView->isScrollable())
+ if (!frameView)
return static_cast<MainThreadScrollingReasons>(0);
MainThreadScrollingReasons mainThreadScrollingReasons = (MainThreadScrollingReasons)0;
@@ -909,7 +896,7 @@ String ScrollingCoordinator::mainThreadScrollingReasonsAsText(MainThreadScrollin
String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const
{
- return mainThreadScrollingReasonsAsText(m_lastMainThreadScrollingReasons);
+ return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());
}
} // namespace WebCore
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698