Changeset 133807 in webkit
- Timestamp:
- Nov 7, 2012, 2:27:12 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/LayoutTests/ChangeLog ¶
r133801 r133807 1 2012-11-07 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=101303 4 Fixed position elements that are out of view still end up forcing 5 non-threaded scrolling 6 -and corresponding- 7 <rdar://problem/12642222> 8 9 Reviewed by Simon Fraser. 10 11 New tests for an invisible fixed object that has visible children. 12 * compositing/absolute-inside-out-of-view-fixed-expected.txt: Added. 13 * compositing/absolute-inside-out-of-view-fixed.html: Added. 14 * platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed-expected.txt: Added. 15 * platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed.html: Added. 16 17 Updated results because these tests can now scroll on the scrolling 18 thread, yay! 19 * platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-expected.txt: 20 * platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-negative-zindex-expected.txt: 21 1 22 2012-11-07 Philip Rogers <pdr@google.com> 2 23 -
TabularUnified trunk/LayoutTests/platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-expected.txt ¶
r133536 r133807 2 2 (viewport rect 0 0 785 600) 3 3 (contents size 785 1021) 4 (Scrolling on main thread because: Has non-layer fixed objects, )5 4 (children 1 6 5 (Fixed node -
TabularUnified trunk/LayoutTests/platform/mac/tiled-drawing/fixed/fixed-position-out-of-view-negative-zindex-expected.txt ¶
r133536 r133807 2 2 (viewport rect 0 0 785 600) 3 3 (contents size 785 1021) 4 (Scrolling on main thread because: Has non-layer fixed objects, )5 4 (children 1 6 5 (Fixed node -
TabularUnified trunk/Source/WebCore/ChangeLog ¶
r133806 r133807 1 2012-11-07 Beth Dakin <bdakin@apple.com> 2 3 https://bugs.webkit.org/show_bug.cgi?id=101303 4 Fixed position elements that are out of view still end up forcing 5 non-threaded scrolling 6 -and corresponding- 7 <rdar://problem/12642222> 8 9 Reviewed by Simon Fraser. 10 11 Re-name hasNonLayerFixedObjects() to 12 hasVisibleSlowRepaintFixedObjects() and make it virtual. 13 * page/scrolling/ScrollingCoordinator.cpp: 14 (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects): 15 (WebCore::ScrollingCoordinator::mainThreadScrollingReasons): 16 * page/scrolling/ScrollingCoordinator.h: 17 (ScrollingCoordinator): 18 19 Override hasVisibleSlowRepaintFixedObjects() to always return false. 20 We don't want to bother with the extra computation in the 21 ScrollingCoordinator implementation, though other ports might still 22 want it. 23 * page/scrolling/mac/ScrollingCoordinatorMac.h: 24 (WebCore::ScrollingCoordinatorMac::hasVisibleSlowRepaintFixedObjects): 25 (ScrollingCoordinatorMac): 26 27 Make this function const so that we can call it from 28 requiresCompositingForPosition(). 29 * rendering/RenderLayerCompositor.cpp: 30 (WebCore::RenderLayerCompositor::calculateCompositedBounds): 31 32 Actually be thorough here and check if the fixed object has any 33 descendants that are visible in the view. If it does, then we do 34 want to composite the fixed object. 35 (WebCore::RenderLayerCompositor::requiresCompositingForPosition): 36 * rendering/RenderLayerCompositor.h: 37 1 38 2012-11-07 Roger Fong <roger_fong@apple.com> 2 39 -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp ¶
r133536 r133807 265 265 #endif 266 266 267 bool ScrollingCoordinator::has NonLayerFixedObjects(FrameView* frameView) const267 bool ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects(FrameView* frameView) const 268 268 { 269 269 const FrameView::ViewportConstrainedObjectSet* viewportConstrainedObjects = frameView->viewportConstrainedObjects(); … … 298 298 if (!supportsFixedPositionLayers() && frameView->hasViewportConstrainedObjects()) 299 299 mainThreadScrollingReasons |= HasViewportConstrainedObjectsWithoutSupportingFixedLayers; 300 if (supportsFixedPositionLayers() && has NonLayerFixedObjects(frameView))300 if (supportsFixedPositionLayers() && hasVisibleSlowRepaintFixedObjects(frameView)) 301 301 mainThreadScrollingReasons |= HasNonLayerFixedObjects; 302 302 if (m_page->mainFrame()->document()->isImageDocument()) -
TabularUnified trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.h ¶
r133779 r133807 156 156 virtual void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons) { } 157 157 158 bool hasNonLayerFixedObjects(FrameView*) const;158 virtual bool hasVisibleSlowRepaintFixedObjects(FrameView*) const; 159 159 void updateShouldUpdateScrollLayerPositionOnMainThread(); 160 160 -
TabularUnified trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h ¶
r133536 r133807 93 93 virtual void setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons); 94 94 95 virtual bool hasVisibleSlowRepaintFixedObjects(FrameView*) const { return false; } 96 95 97 void ensureRootStateNodeForFrameView(FrameView*); 96 98 ScrollingStateNode* stateNodeForID(ScrollingNodeID); -
TabularUnified trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp ¶
r133536 r133807 662 662 // The bounds of the GraphicsLayer created for a compositing layer is the union of the bounds of all the descendant 663 663 // RenderLayers that are rendered by the composited RenderLayer. 664 IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer) 664 IntRect RenderLayerCompositor::calculateCompositedBounds(const RenderLayer* layer, const RenderLayer* ancestorLayer) const 665 665 { 666 666 if (!canBeComposited(layer)) … … 1948 1948 1949 1949 // Fixed position elements that are invisible in the current view don't get their own layer. 1950 FrameView* frameView = m_renderView->frameView(); 1951 if (frameView && !layer->absoluteBoundingBox().intersects(IntRect(IntPoint(frameView->scrollOffsetForFixedPosition()), frameView->layoutSize()))) 1952 return false; 1950 if (FrameView* frameView = m_renderView->frameView()) { 1951 IntRect viewBounds = IntRect(IntPoint(frameView->scrollOffsetForFixedPosition()), frameView->layoutSize()); 1952 IntRect layerBounds = calculateCompositedBounds(layer, rootRenderLayer()); 1953 if (!viewBounds.intersects(layerBounds)) 1954 return false; 1955 } 1953 1956 1954 1957 return true; -
TabularUnified trunk/Source/WebCore/rendering/RenderLayerCompositor.h ¶
r133536 r133807 131 131 // Return the bounding box required for compositing layer and its childern, relative to ancestorLayer. 132 132 // If layerBoundingBox is not 0, on return it contains the bounding box of this layer only. 133 IntRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer) ;133 IntRect calculateCompositedBounds(const RenderLayer*, const RenderLayer* ancestorLayer) const; 134 134 135 135 // Repaint the appropriate layers when the given RenderLayer starts or stops being composited.
Note:
See TracChangeset
for help on using the changeset viewer.