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

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

Issue 103583007: Ensure that if FrameView::isScrollable() is false, the assoc WebLayer is, too. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 11 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
Index: Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp
index a1b1ee214807db01d3a9195c435bbbd7937d4147..372669a22ddc35c6152b0f043a545cbe1585eefe 100644
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -152,11 +152,10 @@ void ScrollingCoordinator::updateAfterCompositingChange()
m_touchEventTargetRectsAreDirty = false;
}
- FrameView* frameView = m_page->mainFrame()->view();
- bool frameIsScrollable = frameView && frameView->isScrollable();
- if (m_wasFrameScrollable != frameIsScrollable)
+ if (frameViewIsScrollableIsDirty())
updateShouldUpdateScrollLayerPositionOnMainThread();
- m_wasFrameScrollable = frameIsScrollable;
+
+ updateMainFrameIsScrollable();
const FrameTree& tree = m_page->mainFrame()->tree();
for (const Frame* child = tree.firstChild(); child; child = child->tree().nextSibling()) {
@@ -929,4 +928,17 @@ bool ScrollingCoordinator::frameViewIsScrollableIsDirty() const
return frameIsScrollable != m_wasFrameScrollable;
}
+void ScrollingCoordinator::updateMainFrameIsScrollable()
+{
+ FrameView* frameView = m_page->mainFrame()->view();
+ bool frameIsScrollable = frameView && frameView->isScrollable();
+ m_wasFrameScrollable = frameIsScrollable;
+
+ if (!frameView)
+ return;
+
+ if (WebLayer* scrollingWebLayer = scrollingWebLayerForScrollableArea(frameView))
+ scrollingWebLayer->setScrollable(frameIsScrollable);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.h ('k') | Source/web/tests/ScrollingCoordinatorChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698