Title: [103435] trunk/Source/WebCore
- Revision
- 103435
- Author
- [email protected]
- Date
- 2011-12-21 13:01:43 -0800 (Wed, 21 Dec 2011)
Log Message
Inform the scrolling coordinator when scrollbar layers come and go
https://bugs.webkit.org/show_bug.cgi?id=75028
Reviewed by Andreas Kling and Simon Fraser.
* page/ScrollingCoordinator.h:
* page/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer):
(WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (103434 => 103435)
--- trunk/Source/WebCore/ChangeLog 2011-12-21 21:01:19 UTC (rev 103434)
+++ trunk/Source/WebCore/ChangeLog 2011-12-21 21:01:43 UTC (rev 103435)
@@ -1,3 +1,17 @@
+2011-12-21 Anders Carlsson <[email protected]>
+
+ Inform the scrolling coordinator when scrollbar layers come and go
+ https://bugs.webkit.org/show_bug.cgi?id=75028
+
+ Reviewed by Andreas Kling and Simon Fraser.
+
+ * page/ScrollingCoordinator.h:
+ * page/mac/ScrollingCoordinatorMac.mm:
+ (WebCore::ScrollingCoordinator::setFrameViewHorizontalScrollbarLayer):
+ (WebCore::ScrollingCoordinator::setFrameViewVerticalScrollbarLayer):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
+
2011-12-20 Dmitry Lomov <[email protected]>
[Chromium] DatabaseTrackerChromium: iterating DatabaseSet races with Database disposal on worker thread
Modified: trunk/Source/WebCore/page/ScrollingCoordinator.h (103434 => 103435)
--- trunk/Source/WebCore/page/ScrollingCoordinator.h 2011-12-21 21:01:19 UTC (rev 103434)
+++ trunk/Source/WebCore/page/ScrollingCoordinator.h 2011-12-21 21:01:43 UTC (rev 103435)
@@ -57,8 +57,14 @@
void pageDestroyed();
// Should be called whenever the scroll layer for the given frame view changes.
- void setFrameViewScrollLayer(FrameView*, const GraphicsLayer* scrollLayer);
+ void frameViewScrollLayerDidChange(FrameView*, const GraphicsLayer*);
+ // Should be called whenever the horizontal scrollbar layer for the given frame view changes.
+ void frameViewHorizontalScrollbarLayerDidChange(FrameView*, const GraphicsLayer*);
+
+ // Should be called whenever the horizontal scrollbar layer for the given frame view changes.
+ void frameViewVerticalScrollbarLayerDidChange(FrameView*, const GraphicsLayer*);
+
// Should be called whenever the geometry of the given frame view changes,
// including the visible content rect and the content size.
void syncFrameViewGeometry(FrameView*);
Modified: trunk/Source/WebCore/page/mac/ScrollingCoordinatorMac.mm (103434 => 103435)
--- trunk/Source/WebCore/page/mac/ScrollingCoordinatorMac.mm 2011-12-21 21:01:19 UTC (rev 103434)
+++ trunk/Source/WebCore/page/mac/ScrollingCoordinatorMac.mm 2011-12-21 21:01:43 UTC (rev 103435)
@@ -161,7 +161,7 @@
return scrollingThread;
}
-void ScrollingCoordinator::setFrameViewScrollLayer(FrameView* frameView, const GraphicsLayer* scrollLayer)
+void ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange(FrameView* frameView, const GraphicsLayer*)
{
ASSERT(isMainThread());
ASSERT(m_page);
@@ -169,6 +169,28 @@
if (frameView->frame() != m_page->mainFrame())
return;
+ // FIXME: Implement.
+}
+
+void ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange(FrameView* frameView, const GraphicsLayer*)
+{
+ ASSERT(isMainThread());
+ ASSERT(m_page);
+
+ if (frameView->frame() != m_page->mainFrame())
+ return;
+
+ // FIXME: Implement.
+}
+
+void ScrollingCoordinator::frameViewScrollLayerDidChange(FrameView* frameView, const GraphicsLayer* scrollLayer)
+{
+ ASSERT(isMainThread());
+ ASSERT(m_page);
+
+ if (frameView->frame() != m_page->mainFrame())
+ return;
+
MutexLocker locker(m_mainFrameGeometryMutex);
m_mainFrameScrollLayer = scrollLayer->platformLayer();
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (103434 => 103435)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2011-12-21 21:01:19 UTC (rev 103434)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2011-12-21 21:01:43 UTC (rev 103435)
@@ -1709,11 +1709,21 @@
#endif
m_overflowControlsHostLayer->addChild(m_layerForHorizontalScrollbar.get());
layersChanged = true;
+
+#if ENABLE(THREADED_SCROLLING)
+ if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ scrollingCoordinator->frameViewHorizontalScrollbarLayerDidChange(m_renderView->frameView(), m_layerForHorizontalScrollbar.get());
+#endif
}
} else if (m_layerForHorizontalScrollbar) {
m_layerForHorizontalScrollbar->removeFromParent();
m_layerForHorizontalScrollbar = nullptr;
layersChanged = true;
+
+#if ENABLE(THREADED_SCROLLING)
+ if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ scrollingCoordinator->frameViewHorizontalScrollbarLayerDidChange(m_renderView->frameView(), 0);
+#endif
}
if (requiresVerticalScrollbarLayer()) {
@@ -1724,11 +1734,21 @@
#endif
m_overflowControlsHostLayer->addChild(m_layerForVerticalScrollbar.get());
layersChanged = true;
+
+#if ENABLE(THREADED_SCROLLING)
+ if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ scrollingCoordinator->frameViewVerticalScrollbarLayerDidChange(m_renderView->frameView(), m_layerForVerticalScrollbar.get());
+#endif
}
} else if (m_layerForVerticalScrollbar) {
m_layerForVerticalScrollbar->removeFromParent();
m_layerForVerticalScrollbar = nullptr;
layersChanged = true;
+
+#if ENABLE(THREADED_SCROLLING)
+ if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
+ scrollingCoordinator->frameViewVerticalScrollbarLayerDidChange(m_renderView->frameView(), 0);
+#endif
}
if (requiresScrollCornerLayer()) {
@@ -1801,7 +1821,7 @@
#if ENABLE(THREADED_SCROLLING)
if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordinator())
- scrollingCoordinator->setFrameViewScrollLayer(m_renderView->frameView(), m_scrollLayer.get());
+ scrollingCoordinator->frameViewScrollLayerDidChange(m_renderView->frameView(), m_scrollLayer.get());
#endif
}
} else {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes