Closed Bug 1533964 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 15683 - Improve tainting for filter primitives

Categories

(Core :: CSS Parsing and Computation, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Fredrik Söderquist <fs@opera.com> wrote:

Improve tainting for filter primitives

This makes tainting for many filter primitives less pessimistic, by
implementing the "Tainted Filter Primitives" section [1] from the
specification.

For feFlood/feDropShadow:

A value of 'currentcolor' for 'flood-color' taints.

For feSpecularLighting/feDiffuseLighting:

A value of 'currentcolor' for 'lighting-color' taints.

For the other primitives (which currently lack any specific logic), i.e:

feBlend, feComponentTransfer, feComposite, feConvolveMatrix,
feDisplacementMap, feGaussianBlur, feMorphology, feOffset and feTile

no local tainting is performed (the TaintsOrigin() override is returning
false).

The signature/convention of the TaintsOrigin() is changed by removing
the |inputs_taint_origin| argument, and always taint the
primitive if it (the flag returned by FilterEffect::InputsTaintOrigin)
is true. This saves each primitive to have to relate to this flag. (For
primitives that have no inputs this flag would always be false
regardless.) This means that TaintsOrigin() for each primitive is now
essentially computing the "local" tainting state.

[1] https://drafts.fxtf.org/filter-effects/#tainted-filter-primitives

Bug: 792518
Change-Id: Ie2d45eeb1ae8478009b88b8b87b3c4c325ede306
Reviewed-on: https://chromium-review.googlesource.com/1503257
WPT-Export-Revision: 816cddbfcdf5cb1aff4aa12820f0d13f52aff82a

Component: web-platform-tests → CSS Parsing and Computation
Product: Testing → Core
Ran 31 tests
PASS   : 13
FAIL   : 18

New tests that have failures or other problems:
/css/filter-effects/tainting-feblend-002.html: FAIL
/css/filter-effects/tainting-fecomponenttransfer-002.html: FAIL
/css/filter-effects/tainting-fecomposite-002.html: FAIL
/css/filter-effects/tainting-feconvolvematrix-002.html: FAIL
/css/filter-effects/tainting-fediffuselighting-002.html: FAIL
/css/filter-effects/tainting-fediffuselighting-003.html: FAIL
/css/filter-effects/tainting-fediffuselighting-dynamic.html: FAIL
/css/filter-effects/tainting-fedisplacementmap-002.html: FAIL
/css/filter-effects/tainting-fedropshadow-002.html: FAIL
/css/filter-effects/tainting-fedropshadow-003.html: FAIL
/css/filter-effects/tainting-feflood-002.html: FAIL
/css/filter-effects/tainting-feflood-dynamic.html: FAIL
/css/filter-effects/tainting-fegaussianblur-002.html: FAIL
/css/filter-effects/tainting-femorphology-002.html: FAIL
/css/filter-effects/tainting-feoffset-002.html: FAIL
/css/filter-effects/tainting-fespecularlighting-002.html: FAIL
/css/filter-effects/tainting-fespecularlighting-003.html: FAIL
/css/filter-effects/tainting-fetile-002.html: FAIL
Pushed by james@hoppipolla.co.uk:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a82915af92b9
[wpt PR 15683] - Improve tainting for filter primitives, a=testonly
https://hg.mozilla.org/integration/mozilla-inbound/rev/f7168b12c0c3
[wpt PR 15683] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.