Changeset 240941 in webkit
- Timestamp:
- Feb 4, 2019, 1:51:32 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 14 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt (added)
-
LayoutTests/compositing/clipping/border-radius-async-overflow-clipping-layer.html (added)
-
LayoutTests/compositing/clipping/border-radius-async-overflow-non-stacking-expected.html (added)
-
LayoutTests/compositing/clipping/border-radius-async-overflow-non-stacking.html (added)
-
LayoutTests/compositing/clipping/border-radius-async-overflow-stacking-expected.html (added)
-
LayoutTests/compositing/clipping/border-radius-async-overflow-stacking.html (added)
-
LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt (modified) (1 diff)
-
LayoutTests/fast/scrolling/ios/change-scrollability-on-content-resize-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/scrolling/ios/overflow-scroll-touch-expected.txt (modified) (2 diffs)
-
LayoutTests/fast/scrolling/ios/reconcile-layer-position-recursive-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/compositing/overflow/scrolling-without-painting-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/compositing/overflow/textarea-scroll-touch-expected.txt (modified) (2 diffs)
-
LayoutTests/platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt (modified) (1 diff)
-
LayoutTests/platform/ios/fast/scrolling/ios/textarea-scroll-touch-expected.txt (modified) (2 diffs)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderLayerBacking.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r240940 r240941 1 2019-02-04 Simon Fraser <simon.fraser@apple.com> 2 3 Async overflow scroll with border-radius renders incorrectly 4 https://bugs.webkit.org/show_bug.cgi?id=194205 5 <rdar://problem/47771668> 6 7 Reviewed by Zalan Bujtas. 8 9 New baselines, mostly correcting offsetFromRenderer. 10 11 * compositing/clipping/border-radius-async-overflow-clipping-layer-expected.txt: Added. 12 * compositing/clipping/border-radius-async-overflow-clipping-layer.html: Added. 13 * compositing/clipping/border-radius-async-overflow-non-stacking-expected.html: Added. 14 * compositing/clipping/border-radius-async-overflow-non-stacking.html: Added. 15 * compositing/clipping/border-radius-async-overflow-stacking-expected.html: Added. 16 * compositing/clipping/border-radius-async-overflow-stacking.html: Added. 17 * compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt: 18 * platform/ios/compositing/overflow/scrolling-without-painting-expected.txt: 19 * platform/ios/compositing/overflow/textarea-scroll-touch-expected.txt: html.css specifies a border-radius on <textarea> for iOS, so we make additional 20 clipping layers. 21 * platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt: 22 * platform/ios/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt: 23 1 24 2019-02-04 Simon Fraser <simon.fraser@apple.com> 2 25 -
trunk/LayoutTests/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt
r240713 r240941 13 13 (children 1 14 14 (GraphicsLayer 15 (offsetFromRenderer width= -1 height=-1)15 (offsetFromRenderer width=1 height=1) 16 16 (position 1.00 1.00) 17 17 (bounds 285.00 285.00) -
trunk/LayoutTests/fast/scrolling/ios/change-scrollability-on-content-resize-expected.txt
r240713 r240941 77 77 (children 1 78 78 (GraphicsLayer 79 (offsetFromRenderer width= -5 height=-5)79 (offsetFromRenderer width=5 height=5) 80 80 (position 5.00 5.00) 81 81 (bounds 200.00 200.00) … … 109 109 (children 1 110 110 (GraphicsLayer 111 (offsetFromRenderer width= -5 height=-5)111 (offsetFromRenderer width=5 height=5) 112 112 (position 5.00 5.00) 113 113 (bounds 200.00 200.00) -
trunk/LayoutTests/fast/scrolling/ios/overflow-scroll-touch-expected.txt
r240713 r240941 16 16 (children 1 17 17 (GraphicsLayer 18 (offsetFromRenderer width= -1 height=-1)18 (offsetFromRenderer width=1 height=1) 19 19 (position 1.00 1.00) 20 20 (bounds origin 0.00 50.00) … … 38 38 (children 1 39 39 (GraphicsLayer 40 (offsetFromRenderer width= -1 height=-1)40 (offsetFromRenderer width=1 height=1) 41 41 (position 1.00 1.00) 42 42 (bounds origin 0.00 50.00) -
trunk/LayoutTests/fast/scrolling/ios/reconcile-layer-position-recursive-expected.txt
r240713 r240941 54 54 (children 1 55 55 (GraphicsLayer 56 (offsetFromRenderer width= -5 height=-5)56 (offsetFromRenderer width=5 height=5) 57 57 (position 5.00 5.00) 58 58 (bounds 200.00 400.00) -
trunk/LayoutTests/platform/ios/compositing/overflow/scrolling-without-painting-expected.txt
r240713 r240941 13 13 (children 1 14 14 (GraphicsLayer 15 (offsetFromRenderer width= -1 height=-1)15 (offsetFromRenderer width=1 height=1) 16 16 (position 1.00 1.00) 17 17 (bounds origin 0.00 25.00) -
trunk/LayoutTests/platform/ios/compositing/overflow/textarea-scroll-touch-expected.txt
r240713 r240941 14 14 (children 1 15 15 (GraphicsLayer 16 (offsetFromRenderer width= -1 height=-1)16 (offsetFromRenderer width=1 height=1) 17 17 (position 1.00 1.00) 18 (bounds origin 0.00 50.00)19 18 (bounds 204.00 124.00) 20 19 (children 1 21 20 (GraphicsLayer 22 21 (offsetFromRenderer width=1 height=1) 23 (scrollOffset (0,50)) 24 (anchor 0.00 0.00) 25 (bounds 204.00 270.00) 26 (drawsContent 1) 22 (bounds origin 0.00 50.00) 23 (bounds 204.00 124.00) 24 (children 1 25 (GraphicsLayer 26 (offsetFromRenderer width=1 height=1) 27 (scrollOffset (0,50)) 28 (anchor 0.00 0.00) 29 (bounds 204.00 270.00) 30 (drawsContent 1) 31 ) 32 ) 27 33 ) 28 34 ) … … 37 43 (children 1 38 44 (GraphicsLayer 39 (offsetFromRenderer width= -1 height=-1)45 (offsetFromRenderer width=1 height=1) 40 46 (position 1.00 1.00) 41 (bounds origin 0.00 50.00)42 47 (bounds 204.00 124.00) 43 48 (children 1 44 49 (GraphicsLayer 45 50 (offsetFromRenderer width=1 height=1) 46 (scrollOffset (0,50)) 47 (anchor 0.00 0.00) 48 (bounds 204.00 270.00) 49 (drawsContent 1) 51 (bounds origin 0.00 50.00) 52 (bounds 204.00 124.00) 53 (children 1 54 (GraphicsLayer 55 (offsetFromRenderer width=1 height=1) 56 (scrollOffset (0,50)) 57 (anchor 0.00 0.00) 58 (bounds 204.00 270.00) 59 (drawsContent 1) 60 ) 61 ) 50 62 ) 51 63 ) -
trunk/LayoutTests/platform/ios/compositing/rtl/rtl-scrolling-with-transformed-descendants-expected.txt
r240713 r240941 14 14 (children 1 15 15 (GraphicsLayer 16 (offsetFromRenderer width= -2 height=-2)16 (offsetFromRenderer width=2 height=2) 17 17 (position 2.00 2.00) 18 18 (bounds origin 366.00 0.00) -
trunk/LayoutTests/platform/ios/compositing/scrolling/overflow-scrolling-layers-are-self-painting-expected.txt
r240713 r240941 13 13 (children 1 14 14 (GraphicsLayer 15 (offsetFromRenderer width= -1 height=-1)15 (offsetFromRenderer width=1 height=1) 16 16 (position 1.00 1.00) 17 17 (bounds 300.00 300.00) -
trunk/LayoutTests/platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-expected.txt
r240713 r240941 13 13 (children 1 14 14 (GraphicsLayer 15 (offsetFromRenderer width= -1 height=-1)15 (offsetFromRenderer width=1 height=1) 16 16 (position 1.00 1.00) 17 17 (bounds origin 0.00 30.00) -
trunk/LayoutTests/platform/ios/fast/scrolling/ios/overflow-scrolling-ancestor-clip-size-expected.txt
r240713 r240941 13 13 (children 1 14 14 (GraphicsLayer 15 (offsetFromRenderer width= -11 height=-11)15 (offsetFromRenderer width=11 height=11) 16 16 (position 11.00 11.00) 17 17 (bounds origin 0.00 30.00) -
trunk/LayoutTests/platform/ios/fast/scrolling/ios/textarea-scroll-touch-expected.txt
r240713 r240941 14 14 (children 1 15 15 (GraphicsLayer 16 (offsetFromRenderer width= -1 height=-1)16 (offsetFromRenderer width=1 height=1) 17 17 (position 1.00 1.00) 18 (bounds origin 0.00 50.00)19 18 (bounds 204.00 124.00) 20 19 (children 1 21 20 (GraphicsLayer 22 21 (offsetFromRenderer width=1 height=1) 23 (scrollOffset (0,50)) 24 (anchor 0.00 0.00) 25 (bounds 204.00 270.00) 26 (drawsContent 1) 22 (bounds origin 0.00 50.00) 23 (bounds 204.00 124.00) 24 (children 1 25 (GraphicsLayer 26 (offsetFromRenderer width=1 height=1) 27 (scrollOffset (0,50)) 28 (anchor 0.00 0.00) 29 (bounds 204.00 270.00) 30 (drawsContent 1) 31 ) 32 ) 27 33 ) 28 34 ) … … 37 43 (children 1 38 44 (GraphicsLayer 39 (offsetFromRenderer width= -1 height=-1)45 (offsetFromRenderer width=1 height=1) 40 46 (position 1.00 1.00) 41 (bounds origin 0.00 50.00)42 47 (bounds 204.00 124.00) 43 48 (children 1 44 49 (GraphicsLayer 45 50 (offsetFromRenderer width=1 height=1) 46 (scrollOffset (0,50)) 47 (anchor 0.00 0.00) 48 (bounds 204.00 270.00) 49 (drawsContent 1) 51 (bounds origin 0.00 50.00) 52 (bounds 204.00 124.00) 53 (children 1 54 (GraphicsLayer 55 (offsetFromRenderer width=1 height=1) 56 (scrollOffset (0,50)) 57 (anchor 0.00 0.00) 58 (bounds 204.00 270.00) 59 (drawsContent 1) 60 ) 61 ) 50 62 ) 51 63 ) -
trunk/Source/WebCore/ChangeLog
r240940 r240941 1 2019-02-04 Simon Fraser <simon.fraser@apple.com> 2 3 Async overflow scroll with border-radius renders incorrectly 4 https://bugs.webkit.org/show_bug.cgi?id=194205 5 <rdar://problem/47771668> 6 7 Reviewed by Zalan Bujtas. 8 9 When an element has composited overflow:scroll and border-radius, we need to make a layer 10 to clip to the inside of the border radius if necessary. 11 12 Existing code simply turned off needsDescendantsClippingLayer for composited scrolling 13 layers, but now we check to see if the inner border is rounded. If we have both a m_childContainmentLayer 14 and scrolling layers, we need to adjust the location of the scrolling layers (which are parented 15 in m_childContainmentLayer). 16 17 Also fix offsetFromRenderer for these layers; it's positive for layers inset from the top left 18 of the border box. 19 20 Tests: compositing/clipping/border-radius-async-overflow-clipping-layer.html 21 compositing/clipping/border-radius-async-overflow-non-stacking.html 22 compositing/clipping/border-radius-async-overflow-stacking.html 23 24 * rendering/RenderLayerBacking.cpp: 25 (WebCore::RenderLayerBacking::updateConfiguration): 26 (WebCore::RenderLayerBacking::updateGeometry): 27 (WebCore::RenderLayerBacking::updateChildClippingStrategy): Layout is always up-to-date now, so remove the comment. 28 1 29 2019-02-04 Simon Fraser <simon.fraser@apple.com> 2 30 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r240918 r240941 703 703 704 704 bool layerConfigChanged = false; 705 706 setBackgroundLayerPaintsFixedRootBackground(compositor().needsFixedRootBackgroundLayer(m_owningLayer)); 705 auto& compositor = this->compositor(); 706 707 setBackgroundLayerPaintsFixedRootBackground(compositor.needsFixedRootBackgroundLayer(m_owningLayer)); 707 708 708 709 if (updateBackgroundLayer(m_backgroundLayerPaintsFixedRootBackground || m_requiresBackgroundLayer)) 709 710 layerConfigChanged = true; 710 711 711 if (updateForegroundLayer(compositor ().needsContentsCompositingLayer(m_owningLayer)))712 if (updateForegroundLayer(compositor.needsContentsCompositingLayer(m_owningLayer))) 712 713 layerConfigChanged = true; 713 714 714 // This requires descendants to have been updated. 715 bool needsDescendantsClippingLayer = compositor().clipsCompositingDescendants(m_owningLayer); 715 bool needsDescendantsClippingLayer = false; 716 716 bool usesCompositedScrolling = m_owningLayer.hasCompositedScrollableOverflow(); 717 717 718 // Our scrolling layer will clip. 719 if (usesCompositedScrolling) 720 needsDescendantsClippingLayer = false; 718 if (usesCompositedScrolling) { 719 // If it's scrollable, it has to be a box. 720 auto& renderBox = downcast<RenderBox>(renderer()); 721 FloatRoundedRect contentsClippingRect = renderer().style().getRoundedInnerBorderFor(renderBox.borderBoxRect()).pixelSnappedRoundedRectForPainting(deviceScaleFactor()); 722 needsDescendantsClippingLayer = contentsClippingRect.isRounded(); 723 } else 724 needsDescendantsClippingLayer = compositor.clipsCompositingDescendants(m_owningLayer); 721 725 722 726 if (updateScrollingLayers(usesCompositedScrolling)) … … 727 731 728 732 // clippedByAncestor() does a tree walk. 729 if (updateAncestorClippingLayer(compositor ().clippedByAncestor(m_owningLayer)))733 if (updateAncestorClippingLayer(compositor.clippedByAncestor(m_owningLayer))) 730 734 layerConfigChanged = true; 731 735 … … 795 799 } 796 800 #endif 797 if (is<RenderWidget>(renderer()) && compositor ().parentFrameContentLayers(downcast<RenderWidget>(renderer()))) {801 if (is<RenderWidget>(renderer()) && compositor.parentFrameContentLayers(downcast<RenderWidget>(renderer()))) { 798 802 m_owningLayer.setNeedsCompositingGeometryUpdate(); 799 803 layerConfigChanged = true; … … 1083 1087 LayoutRect clippingBox; 1084 1088 if (auto* clipLayer = clippingLayer()) { 1089 // clipLayer is the m_childContainmentLayer. 1085 1090 clippingBox = clipBox(downcast<RenderBox>(renderer())); 1086 1091 // Clipping layer is parented in the primary graphics layer. … … 1186 1191 auto& renderBox = downcast<RenderBox>(renderer()); 1187 1192 LayoutRect paddingBoxIncludingScrollbar = renderBox.paddingBoxRectIncludingScrollbar(); 1193 LayoutRect parentLayerBounds = clippingLayer() ? clippingBox : compositedBounds(); 1194 1195 // FIXME: need to do some pixel snapping here. 1196 m_scrollContainerLayer->setPosition(FloatPoint(paddingBoxIncludingScrollbar.location() - parentLayerBounds.location())); 1197 m_scrollContainerLayer->setSize(roundedIntSize(LayoutSize(renderBox.paddingBoxWidth(), renderBox.paddingBoxHeight()))); 1198 1188 1199 ScrollOffset scrollOffset = m_owningLayer.scrollOffset(); 1189 1190 // FIXME: need to do some pixel snapping here.1191 m_scrollContainerLayer->setPosition(FloatPoint(paddingBoxIncludingScrollbar.location() - compositedBounds().location()));1192 m_scrollContainerLayer->setSize(roundedIntSize(LayoutSize(renderBox.clientWidth(), renderBox.clientHeight())));1193 1194 1200 updateScrollOffset(scrollOffset); 1195 1201 #if PLATFORM(IOS_FAMILY) … … 1198 1204 1199 1205 FloatSize oldScrollingLayerOffset = m_scrollContainerLayer->offsetFromRenderer(); 1200 m_scrollContainerLayer->setOffsetFromRenderer( -toFloatSize(paddingBoxIncludingScrollbar.location()));1206 m_scrollContainerLayer->setOffsetFromRenderer(toFloatSize(paddingBoxIncludingScrollbar.location())); 1201 1207 1202 1208 if (m_childClippingMaskLayer) { 1203 1209 m_childClippingMaskLayer->setPosition(m_scrollContainerLayer->position()); 1204 1210 m_childClippingMaskLayer->setSize(m_scrollContainerLayer->size()); 1205 m_childClippingMaskLayer->setOffsetFromRenderer( -toFloatSize(paddingBoxIncludingScrollbar.location()));1211 m_childClippingMaskLayer->setOffsetFromRenderer(toFloatSize(paddingBoxIncludingScrollbar.location())); 1206 1212 } 1207 1213 … … 1709 1715 if (hasClippingLayer() && needsDescendantsClippingLayer) { 1710 1716 if (is<RenderBox>(renderer()) && (renderer().style().clipPath() || renderer().style().hasBorderRadius())) { 1711 // FIXME: we shouldn't get geometry here as layout may not have been udpated.1712 1717 LayoutRect boxRect(LayoutPoint(), downcast<RenderBox>(renderer()).size()); 1713 1718 boxRect.move(contentOffsetInCompostingLayer());
Note:
See TracChangeset
for help on using the changeset viewer.