Closed Bug 2087529 Opened 1 month ago Closed 18 days ago

[wpt-sync] Sync PR 64230 - Fix SVG filter tainting for :visited colors

Categories

(Core :: Graphics: Canvas2D, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Philip Rogers <pdr@chromium.org> wrote:

Fix SVG filter tainting for :visited colors

This patch updates TaintsOrigin() for feFlood, feDropShadow,
feDiffuseLighting, and feSpecularLighting to taint when inside a link
whose -internal-visited-flood-color or -internal-visited-lighting-color
differs from the unvisited color, in addition to checking currentColor
dependencies. These primitives now also read ComputedStyle from
GetLayoutObject() so display:none primitives with ensured styles do not
render or bypass style invalidation.

For dynamic updates, LayoutSVGFilterPrimitive::StyleDidChange now
invalidates the filter chain when :visited tainting or resolved color
changes, Canvas2DRecorderContext flushes style and layout before
drawing when a CSS filter may contain a url(), and
CompositorFilterOperations::Clear() properly reset origin tainting.

Fixed: 576328037
Change-Id: I5fabe2bf67ab67e72b896f67bc483f7246270b34
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8623654
Reviewed-by: Stephen Chenney \<schenney@chromium.org>
Commit-Queue: Philip Rogers \<pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1727602}

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Graphics: Canvas2D
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]
Whiteboard: [wptsync downstream] → [wptsync downstream error]
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

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

Total 8 tests and 1 subtests

Status Summary

Firefox

OK : 1[GitHub] 8[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 2[GitHub] 8[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 9[GitHub] 11[Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]

Chrome

OK : 1
PASS: 1
FAIL: 10

Safari

OK : 1
PASS: 1
FAIL: 10

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /html/canvas/element/manual/filters/svg-filter-feImage-cross-origin-taint.https.sub.html [wpt.fyi]
    • Tainting check for cross origin image in SVG feImage filter: FAIL
  • /html/canvas/element/manual/filters/svg-filter-visited-link-color-taints.html [wpt.fyi]
    • feFlood with :visited color taints 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • feDropShadow with :visited color taints 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • feDiffuseLighting with :visited color taints 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • feSpecularLighting with :visited color taints 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • Dynamically turning an ancestor <a> into a visited link causes feFlood to taint 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • Dynamically turning an ancestor <a> into an unvisited link causes feFlood to taint 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • Dynamically turning an ancestor <a> into a visited link causes feDiffuseLighting to taint 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • Dynamically turning an ancestor <a> into an unvisited link causes feDiffuseLighting to taint 2D canvas: FAIL (Chrome: FAIL, Safari: FAIL)
    • Dynamically turning an ancestor <a> into a visited link taints immediate canvas draw: FAIL (Chrome: FAIL, Safari: FAIL)
  • /html/canvas/element/manual/filters/tentative/idl-conversions/canvas-filter-sequence-conversion.html [wpt.fyi]
    • Test pixels on CanvasFilter() various inputs to tableValues (which is a sequence): FAIL
Status: NEW → RESOLVED
Closed: 18 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.