Closed Bug 2089382 Opened 14 days ago Closed 5 days ago

[wpt-sync] Sync PR 64421 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328228

Categories

(Core :: SVG, 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 64421 into mozilla-central (this bug is closed when the sync is complete).

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

Sam Weinig <sam@webkit.org> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=328228

WebKit export from bug: [<!---->Image Redux]<!----> Place and draw an \<<!---->feImage><!---->'<!---->s image like an SVG \<<!---->image><!---->

<pre>
[Image Redux] Place and draw an <feImage>'s image like an SVG <image>

The filter effects states:

"If the href references a stand-alone image resource such as a JPEG, PNG or SVG file, then the image resource is
rendered according to the behavior of the image element"
- <a href="https://drafts.csswg.org/filter-effects/#feImageElement.">https://drafts.csswg.org/filter-effects/#feImageElement.</a>

Luckily for us, we have been refactoring all the code to size SVG images, but unluckily for us, it requires having
a real RenderObject to work. So, RenderSVGResourceFEImage and LegacyRenderSVGResourceFEImage are born, and like the
other image render objects, each hold a RenderImageResource with a Style::Image in it.

With these additional image renderers, it made sense to further factor out some logic from RenderSVGImage and
LegacyRenderSVGImage to calculate the drawing options via calculateSVGImageDrawingOptions().

An <feImage> with nothing to show, such as one without a renderer in a display: none subtree, now produces transparent
black rather than failing the whole filter, matching Firefox. The spec does not specify what do with the display: none,
but this seems like a good default choice.

Also, the subregion, filter region, and scale are now needed when an effect is created, so they get passed from SVGFilterRenderer
in a new FilterEffectPlacement struct.

A few test results show an "image-size" attribute no longer being present on an feImage. This is due to how the legacy
SVG renderer's dumping work for filters, where it gives it a zero sized dummy region. Now that we are correctly sizing
the images, the dummy region causes use to make the images zero size. This is only an artifact of dumping, as all the
tests that actual invoke the filters have a non-zero sized region.

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=328228">https://bugs.webkit.org/show_bug.cgi?id=328228</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/324592@main">https://commits.webkit.org/324592@main</a>
</pre>

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

CI Results

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

Total 426 tests

Status Summary

Firefox

OK : 38
PASS : 4[GitHub] 23[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt] 3016[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 3313[Gecko-windows11-64-25h2-opt] 3316[Gecko-windows11-64-25h2-debug] 3319[Gecko-android-em-14-x86_64-debug-geckoview] 3321[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug] 3323[Gecko-linux2404-64-opt]
FAIL : 6[GitHub] 14[Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt] 72[Gecko-linux2404-64-opt] 74[Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug] 76[Gecko-android-em-14-x86_64-debug-geckoview] 79[Gecko-windows11-64-25h2-debug] 82[Gecko-windows11-64-25h2-opt]

Chrome

PASS : 3
CRASH: 1
FAIL : 6

Safari

PASS : 2
FAIL : 8

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

Status: NEW → RESOLVED
Closed: 5 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.