Changeset 283340 in webkit
- Timestamp:
- Sep 30, 2021, 2:20:32 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
-
ChangeLog (modified) (1 diff)
-
rendering/RenderElement.cpp (modified) (1 diff)
-
rendering/RenderLayer.cpp (modified) (1 diff)
-
rendering/RenderLayer.h (modified) (1 diff)
-
rendering/RenderLayerCompositor.cpp (modified) (1 diff)
-
rendering/RenderLayerCompositor.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r283339 r283340 1 2021-09-30 Rob Buis <rbuis@igalia.com> 2 3 Move canCompositeClipPath to RenderLayer 4 https://bugs.webkit.org/show_bug.cgi?id=231014 5 6 Reviewed by Simon Fraser. 7 8 Move canCompositeClipPath to RenderLayer since the 9 code almost exclusively deals with layers. Also 10 remove unneeded ASSERTs. 11 12 * rendering/RenderElement.cpp: 13 (WebCore::RenderElement::adjustStyleDifference const): 14 * rendering/RenderLayer.cpp: 15 (WebCore::RenderLayer::willCompositeClipPath const): 16 * rendering/RenderLayer.h: 17 * rendering/RenderLayerCompositor.cpp: 18 (WebCore::RenderLayerCompositor::canCompositeClipPath): Deleted. 19 * rendering/RenderLayerCompositor.h: 20 1 21 2021-09-30 Devin Rousso <drousso@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderElement.cpp
r283079 r283340 307 307 308 308 if (contextSensitiveProperties & StyleDifferenceContextSensitiveProperty::ClipPath) { 309 if (hasLayer() 310 && downcast<RenderLayerModelObject>(*this).layer()->isComposited() 311 && hasClipPath() 312 && RenderLayerCompositor::canCompositeClipPath(*downcast<RenderLayerModelObject>(*this).layer())) 309 if (hasLayer() && downcast<RenderLayerModelObject>(*this).layer()->willCompositeClipPath()) 313 310 diff = std::max(diff, StyleDifference::RecompositeLayer); 314 311 else -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r283027 r283340 683 683 } 684 684 685 bool RenderLayer::willCompositeClipPath() const 686 { 687 if (!isComposited()) 688 return false; 689 690 auto* clipPath = renderer().style().clipPath(); 691 if (!clipPath) 692 return false; 693 694 if (renderer().hasMask()) 695 return false; 696 697 return (clipPath->type() != ClipPathOperation::Shape || clipPath->type() == ClipPathOperation::Shape) && GraphicsLayer::supportsLayerType(GraphicsLayer::Type::Shape); 698 } 699 685 700 void RenderLayer::dirtyNormalFlowList() 686 701 { -
trunk/Source/WebCore/rendering/RenderLayer.h
r281296 r283340 239 239 #endif 240 240 241 bool willCompositeClipPath() const; 242 241 243 protected: 242 244 void destroy(); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r283079 r283340 1761 1761 } 1762 1762 1763 bool RenderLayerCompositor::canCompositeClipPath(const RenderLayer& layer)1764 {1765 ASSERT(layer.isComposited());1766 ASSERT(layer.renderer().style().clipPath());1767 1768 if (layer.renderer().hasMask())1769 return false;1770 1771 auto& clipPath = *layer.renderer().style().clipPath();1772 return (clipPath.type() != ClipPathOperation::Shape || clipPath.type() == ClipPathOperation::Shape) && GraphicsLayer::supportsLayerType(GraphicsLayer::Type::Shape);1773 }1774 1775 1763 // FIXME: remove and never ask questions about reflection layers. 1776 1764 static RenderLayerModelObject& rendererForCompositingTests(const RenderLayer& layer) -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r282862 r283340 246 246 void layerStyleChanged(StyleDifference, RenderLayer&, const RenderStyle* oldStyle); 247 247 248 static bool canCompositeClipPath(const RenderLayer&);249 250 248 // Get the nearest ancestor layer that has overflow or clip, but is not a stacking context 251 249 RenderLayer* enclosingNonStackingClippingLayer(const RenderLayer&) const;
Note:
See TracChangeset
for help on using the changeset viewer.