Changeset 143417 in webkit
- Timestamp:
- Feb 19, 2013, 5:29:39 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r143415 r143417 1 2013-02-19 Simon Fraser <simon.fraser@apple.com> 2 3 Rubber-banding should not affect the visibleRect of the TileCache 4 https://bugs.webkit.org/show_bug.cgi?id=110278 5 6 Reviewed by Beth Dakin. 7 8 When rubber-banding a slow-scrolling page, or image document, we would constantly re-create 9 the bottom tile because of the logic that adapts the tile size to the visible rect when slow 10 scrolling. 11 12 Avoid that by ensuring that the visibleRect is not affected by rubber-banding. This is done 13 via a GraphicsLayerClient function that allows RenderLayerCompositor to provide a custom 14 position for the scroll layer. We constrain that scroll position to remove the overhang that 15 results from rubber-banding. 16 17 I wasn't able to make a test for this, even with internals.setScrollViewPosition(). 18 19 * platform/graphics/GraphicsLayerClient.h: 20 (GraphicsLayerClient): 21 (WebCore::GraphicsLayerClient::customPositionForVisibleRectComputation): 22 * platform/graphics/ca/GraphicsLayerCA.cpp: 23 (WebCore::GraphicsLayerCA::computeVisibleRect): 24 * rendering/RenderLayerCompositor.cpp: 25 (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation): 26 * rendering/RenderLayerCompositor.h: 27 1 28 2013-02-19 Tony Gentilcore <tonyg@chromium.org> 2 29 -
trunk/Source/WebCore/platform/graphics/GraphicsLayerClient.h
r133517 r143417 78 78 virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const { return false; } 79 79 80 // Allows the client to modify a layer position used during the visibleRect calculation, for example to ignore 81 // scroll overhang. 82 virtual void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const { } 83 80 84 // Multiplier for backing store size, related to high DPI. 81 85 virtual float deviceScaleFactor() const { return 1; } -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r141789 r143417 918 918 919 919 TransformationMatrix layerTransform; 920 layerTransform.translate(m_position.x(), m_position.y()); 920 FloatPoint position = m_position; 921 if (m_client) 922 m_client->customPositionForVisibleRectComputation(this, position); 923 924 layerTransform.translate(position.x(), position.y()); 921 925 922 926 TransformationMatrix currentTransform; -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r143295 r143417 303 303 } 304 304 305 void RenderLayerCompositor::customPositionForVisibleRectComputation(const GraphicsLayer* graphicsLayer, FloatPoint& position) const 306 { 307 if (graphicsLayer != m_scrollLayer.get()) 308 return; 309 310 FrameView* frameView = m_renderView ? m_renderView->frameView() : 0; 311 if (!frameView) 312 return; 313 314 FloatPoint scrollPosition = -position; 315 scrollPosition = frameView->constrainScrollPositionForOverhang(roundedIntPoint(scrollPosition)); 316 position = -scrollPosition; 317 } 318 305 319 void RenderLayerCompositor::scheduleLayerFlush() 306 320 { -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r141221 r143417 250 250 // GraphicsLayerUpdaterClient implementation 251 251 virtual void flushLayers(GraphicsLayerUpdater*) OVERRIDE; 252 virtual void customPositionForVisibleRectComputation(const GraphicsLayer*, FloatPoint&) const OVERRIDE; 252 253 253 254 // Whether the given RL needs a compositing layer.
Note:
See TracChangeset
for help on using the changeset viewer.