Changeset 242248 in webkit
- Timestamp:
- Feb 28, 2019 5:54:59 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242241 r242248 1 2019-02-28 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS] Dark flash when opening Google AMP pages 4 https://bugs.webkit.org/show_bug.cgi?id=195193 5 rdar://problem/48326442 6 7 Reviewed by Zalan Bujtas. 8 9 Tests that change the size of a clipping layer with non-z-order composited descendant, with 10 a couple of layer tree configurations. 11 12 * compositing/geometry/ancestor-clip-change-expected.html: Added. 13 * compositing/geometry/ancestor-clip-change-interleaved-stacking-context-expected.html: Added. 14 * compositing/geometry/ancestor-clip-change-interleaved-stacking-context.html: Added. 15 * compositing/geometry/ancestor-clip-change.html: Added. 16 1 17 2019-02-28 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r242237 r242248 1 2019-02-28 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS] Dark flash when opening Google AMP pages 4 https://bugs.webkit.org/show_bug.cgi?id=195193 5 rdar://problem/48326442 6 7 Reviewed by Zalan Bujtas. 8 9 After the incremental compositing updates changes, it was possible for a change in the size 10 of an overflow:hidden element to fail to update the "ancestor clipping layer" geometry on 11 a composited descendant that is not a descendant in z-order. When Google search results 12 create the <iframe> that contain AMP contents, we'd fail to update a zero-sized clipping layer, 13 leaving the #222 background of an intermediate element visible. 14 15 Fix by setting a flag in RenderLayer::updateLayerPosition() (which is called in containing block order) 16 that sets the "needs geometry update" dirty bit on containing-block-descendant layers. Currently 17 this flag affects all descendants; in future, we might be able to clear it for grand-children. 18 19 Tests: compositing/geometry/ancestor-clip-change-interleaved-stacking-context.html 20 compositing/geometry/ancestor-clip-change.html 21 22 * rendering/RenderLayer.cpp: 23 (WebCore::RenderLayer::updateLayerPositions): 24 (WebCore::RenderLayer::updateLayerPosition): 25 * rendering/RenderLayer.h: 26 * rendering/RenderLayerBacking.cpp: 27 (WebCore::RenderLayerBacking::updateAfterLayout): 28 * rendering/RenderLayerBacking.h: 29 1 30 2019-02-28 Myles C. Maxfield <mmaxfield@apple.com> 2 31 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r241150 r242248 849 849 void RenderLayer::updateLayerPositions(RenderGeometryMap* geometryMap, OptionSet<UpdateLayerPositionsFlag> flags) 850 850 { 851 updateLayerPosition(); // For relpositioned layers or non-positioned layers, 852 // we need to keep in sync, since we may have shifted relative 853 // to our parent layer. 854 851 updateLayerPosition(&flags); 855 852 applyPostLayoutScrollPositionIfNeeded(); 856 853 … … 953 950 954 951 if (isComposited()) 955 backing()->updateAfterLayout(flags.contains( NeedsFullRepaintInBacking));952 backing()->updateAfterLayout(flags.contains(ContainingClippingLayerChangedSize), flags.contains(NeedsFullRepaintInBacking)); 956 953 957 954 if (geometryMap) … … 1499 1496 } 1500 1497 1501 bool RenderLayer::updateLayerPosition( )1498 bool RenderLayer::updateLayerPosition(OptionSet<UpdateLayerPositionsFlag>* flags) 1502 1499 { 1503 1500 LayoutPoint localPoint; … … 1517 1514 setNeedsPostLayoutCompositingUpdate(); 1518 1515 } 1516 1517 if (flags && renderer().hasOverflowClip()) 1518 flags->add(ContainingClippingLayerChangedSize); 1519 1519 1520 setSize(newSize); 1520 1521 } -
trunk/Source/WebCore/rendering/RenderLayer.h
r241150 r242248 506 506 507 507 enum UpdateLayerPositionsFlag { 508 CheckForRepaint = 1 << 0, 509 NeedsFullRepaintInBacking = 1 << 1, 510 UpdatePagination = 1 << 2, 511 SeenTransformedLayer = 1 << 3, 512 Seen3DTransformedLayer = 1 << 4, 508 CheckForRepaint = 1 << 0, 509 NeedsFullRepaintInBacking = 1 << 1, 510 ContainingClippingLayerChangedSize = 1 << 2, 511 UpdatePagination = 1 << 3, 512 SeenTransformedLayer = 1 << 4, 513 Seen3DTransformedLayer = 1 << 5, 513 514 }; 514 515 static constexpr OptionSet<UpdateLayerPositionsFlag> updateLayerPositionsDefaultFlags() { return { CheckForRepaint }; } … … 932 933 933 934 // Returns true if the position changed. 934 bool updateLayerPosition( );935 bool updateLayerPosition(OptionSet<UpdateLayerPositionsFlag>* = nullptr); 935 936 936 937 void updateLayerPositions(RenderGeometryMap* = nullptr, OptionSet<UpdateLayerPositionsFlag> = updateLayerPositionsDefaultFlags()); -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r242205 r242248 652 652 } 653 653 654 void RenderLayerBacking::updateAfterLayout(bool needs FullRepaint)654 void RenderLayerBacking::updateAfterLayout(bool needsClippingUpdate, bool needsFullRepaint) 655 655 { 656 656 LOG(Compositing, "RenderLayerBacking %p updateAfterLayout (layer %p)", this, &m_owningLayer); … … 663 663 // This layer's geometry affects those of its children. 664 664 m_owningLayer.setChildrenNeedCompositingGeometryUpdate(); 665 } 665 } else if (needsClippingUpdate) 666 m_owningLayer.setNeedsCompositingGeometryUpdate(); 666 667 667 668 if (needsFullRepaint && canIssueSetNeedsDisplay()) -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r241788 r242248 84 84 void updateDrawsContent(); 85 85 86 void updateAfterLayout(bool needs FullRepaint);86 void updateAfterLayout(bool needsClippingUpdate, bool needsFullRepaint); 87 87 88 88 GraphicsLayer* graphicsLayer() const { return m_graphicsLayer.get(); }
Note: See TracChangeset
for help on using the changeset viewer.