Skip to content
Permalink
Browse files
Web Inspector: No reasons for compositing for an element with clip-pa…
…th and composited descendants

https://bugs.webkit.org/show_bug.cgi?id=242590

Reviewed by Simon Fraser.

If an element has clip-path and composited descendants, it has a
composited layer. However, Web Inspector didn't show no reason for
"Reasons for compositing" in the Layers tab.

* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::reasonsForCompositing const):
Add CompositingReason::ClipsCompositingDescendants if hasClipPath.

Canonical link: https://commits.webkit.org/252354@main
  • Loading branch information
fujii committed Jul 11, 2022
1 parent 1b72c0c commit 89c201dc66002469942d6af54a5912ed174db28d
Showing 1 changed file with 2 additions and 0 deletions.
@@ -2796,6 +2796,8 @@ OptionSet<CompositingReason> RenderLayerCompositor::reasonsForCompositing(const
if (layer.hasBlendMode())
reasons.add(CompositingReason::BlendingWithCompositedDescendants);
#endif
if (renderer.hasClipPath())
reasons.add(CompositingReason::ClipsCompositingDescendants);
break;
case IndirectCompositingReason::Perspective:
reasons.add(CompositingReason::Perspective);

0 comments on commit 89c201d

Please sign in to comment.