Closed Bug 1650504 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 24440 - Unify most clip-path code paths of pre-CAP and CAP

Categories

(Core :: Web Painting, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla80
Tracking Status
firefox80 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 24440 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/24440
Details from upstream follow.

Xianzhu Wang <wangxianzhu@chromium.org> wrote:

Unify most clip-path code paths of pre-CAP and CAP

Previously in pre-CAP, because we always created a composited mask
layer for any mask and/or clip-path (either path-based or mask-based),
we needed to handle clip-path differently in pre-CAP and CAP,

Rename ClipPath to ClipPathMask to make it clear that this effect node
is for the mask created for a mask-based clip-path.

Now always apply path-based clip-path after paint. No longer create
a mask layer for path-based clip-path in pre-CAP.

If there is both mask and mask-based clip-path, always let ClipPathMask
effect node be the child of the Mask effect node. This is required by
pre-CAP (unchanged) to apply the clip-path in the mask layer, but also
works in CAP (previously both Mask ClipPathMask were directly under
Effect) because:
DstIn(DstIn(A, Mask), ClipPathMask)
== DstIn(A, DstIn(Mask, ClipPathMask)
where ClipPathMask is black-and-white.

If there is only a mask-based clip-path, we'll only create ClipPathMask
for both pre-CAP (now no Mask and MaskClip nodes) and CAP (unchanged).
The pre-CAP mask layer will use ClipPathMask as the effect state, which
avoids the need of filling a black mask before applying the clip path
mask.

Now the only difference between pre-CAP and CAP for a clip-path is
the mask layer when the clip-path is composited and mask-based.

Bug: 1100224
Change-Id: I243e463b3c94e09b64ed3c171ece12145c9deec9
Reviewed-on: https://chromium-review.googlesource.com/2274177
WPT-Export-Revision: 0de57fa5f7eb5648b80b1c5a6f9a5c23ff761c66

Component: web-platform-tests → Web Painting
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 2 tests

Status Summary

Firefox

FAIL: 2

Chrome

PASS: 1
FAIL: 1

Safari

FAIL: 2

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/css/css-masking/clip-path/clip-path-document-element-will-change.html: FAIL (Chrome: FAIL, Safari: FAIL)
/css/css-masking/clip-path/clip-path-document-element.html: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cca50f6b0fce [wpt PR 24440] - Unify most clip-path code paths of pre-CAP and CAP, a=testonly https://hg.mozilla.org/integration/autoland/rev/1f5fb80ff6b4 [wpt PR 24440] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla80
You need to log in before you can comment on or make changes to this bug.