Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index 7a3005971a154c0687a97e6238578ab263d186e4..7002305d0d013ee7d556ea7a4067273d17515762 100644 |
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -288,6 +288,10 @@ void ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange(ScrollableArea* |
bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* scrollableArea) |
{ |
+ TRACE_EVENT_INSTANT2("comp-scroll", "ScrollingCoordinator::scrollableAreaScrollLayerDidChange", |
+ "width", scrollableArea->scrollableAreaBoundingBox().width(), |
+ "height", scrollableArea->scrollableAreaBoundingBox().height()); |
+ |
GraphicsLayer* scrollLayer = scrollLayerForScrollableArea(scrollableArea); |
if (scrollLayer) { |
bool isMainFrame = isForMainFrame(scrollableArea); |
@@ -405,6 +409,46 @@ void ScrollingCoordinator::touchEventTargetRectsDidChange(const Document*) |
setTouchEventTargetRects(touchEventTargetRects); |
} |
+void ScrollingCoordinator::updateScrollParentForLayer(RenderLayer* child, RenderLayer* parent) |
+{ |
+ if (!child || !child->backing()) |
+ return; |
+ |
+ WebLayer* childWebLayer = scrollingWebLayerForGraphicsLayer(child->layerForScrollChild()); |
+ if (!childWebLayer) |
+ return; |
+ |
+ WebLayer* scrollParentWebLayer = 0; |
+ if (parent && parent->backing()) |
+ scrollParentWebLayer = scrollingWebLayerForGraphicsLayer(parent->backing()->parentForSublayers()); |
+ |
+ TRACE_EVENT_INSTANT2("comp-scroll2", "ScrollingCoordinator::updateScrollParentForLayer", |
enne (OOO)
2013/08/22 20:54:30
Would this trace event be better on the cc side wh
|
+ "childId", childWebLayer->id(), |
+ "ancestorId", scrollParentWebLayer ? scrollParentWebLayer->id() : -1); |
enne (OOO)
2013/08/22 20:54:30
Ids start at 1, so you could say 0.
|
+ |
+ childWebLayer->setScrollParent(scrollParentWebLayer); |
+} |
+ |
+void ScrollingCoordinator::updateClipParentForLayer(RenderLayer* child, RenderLayer* parent) |
+{ |
+ if (!child || !child->backing()) |
+ return; |
+ |
+ WebLayer* childWebLayer = scrollingWebLayerForGraphicsLayer(child->backing()->graphicsLayer()); |
+ if (!childWebLayer) |
+ return; |
+ |
+ WebLayer* clipParentWebLayer = 0; |
+ if (parent && parent->backing()) |
+ clipParentWebLayer = scrollingWebLayerForGraphicsLayer(parent->backing()->parentForSublayers()); |
+ |
+ TRACE_EVENT_INSTANT2("comp-scroll", "ScrollingCoordinator::updateClipParentForLayer", |
+ "childId", childWebLayer->id(), |
+ "ancestorId", clipParentWebLayer ? clipParentWebLayer->id() : -1); |
+ |
+ childWebLayer->setClipParent(clipParentWebLayer); |
+} |
+ |
void ScrollingCoordinator::setWheelEventHandlerCount(unsigned count) |
{ |
if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainFrame()->view())) |
@@ -419,8 +463,12 @@ void ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView(FrameView |
void ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons) |
{ |
- if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainFrame()->view())) |
+ if (WebLayer* scrollLayer = scrollingWebLayerForScrollableArea(m_page->mainFrame()->view())) { |
+ TRACE_EVENT_INSTANT2("impl-scroll", "ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread", |
+ "layerId", scrollLayer->id(), |
+ "reasons", reasons); |
scrollLayer->setShouldScrollOnMainThread(reasons); |
+ } |
} |
void ScrollingCoordinator::pageDestroyed() |