Commit be236438 authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Chromium LUCI CQ

Require a PaintLayer for applying 'clip-path'

Similarly as for effects. 'clip-path' is (sometimes, if mask) applied
via PaintLayerPainter, and we need an SVGResourceClient for it to manage
resources properly (respond to clip-path changes etc.).

See also crbug.com/892734.

Bug: 1158417, 1028063
Change-Id: I2aae303c6dcbf9bd5964bf40253a7fa7cb733058
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2589876Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#836732}
parent 2e8f3ad6
......@@ -991,7 +991,10 @@ void FragmentPaintPropertyTreeBuilder::UpdateTransform() {
}
static bool MayNeedClipPathClip(const LayoutObject& object) {
return !object.IsText() && object.StyleRef().ClipPath();
// We only apply clip-path if the LayoutObject has a layer or is an SVG
// child. See NeedsEffect() for additional information on the former.
return !object.IsText() && object.StyleRef().ClipPath() &&
(object.HasLayer() || object.IsSVGChild());
}
static bool NeedsClipPathClip(const LayoutObject& object) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment