Closed Bug 1890174 Opened 2 months ago Closed 2 months ago

Add some more tests to WPT SVGGraphicsElement.getScreenCTM.html

Categories

(Core :: SVG, task)

task

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(2 files)

Per https://phabricator.services.mozilla.com/D206829#7098636 , I've got some additional tests to add to SVGGraphicsElement.getScreenCTM.html as a followup to bug 1889781. Filing this bug to do that.

While working on tests for this, I found a situation where we're inconsistent with other browsers, and I filed bug 1890198 with some reduced testcases (since I'm pretty sure we're the ones getting it wrong).

Before extending this test, it's helpful to redesign it so that each of the
similar tests can be self-contained in a single JS function, rather than
requiring separate CSS/HTML+SVG/JS snippets with unique element IDs for each.

This patch:

  • Moves most of the CSS and HTML+SVG to be dynamically generated in JS, for the
    tests that all use a similar subtree.
  • Changes the <svg> elements in those dynamically-generated tests to have
    different height vs. width (200x120 rather than 100x100). This lets the test
    more-robustly ensure we're using the right size component, in cases where the
    ize is relevant to the CTM.
  • Checks more components of the CTMs, for completeness.
  • Makes the "scale(2,1)" subtest more robust, so that it now checks the CTM's
    scale-factor components before and after we make the container be abspos.
  • Adds documentation and test expectation messages.

Firefox and Chrome continue to pass the amended version of the WPT, on my Linux machine.

WebKit (epiphany) fails two new subtests -- the "rotated self" and "rotated ancestor" ones at the end -- on top of the two they already fail that are shown on wpt.fyi right now.

Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2bfd26d1e06d
part 1: Rewrite logic in getScreenCTM WPT to be more reusable/encapsulated. r=longsonr
https://hg.mozilla.org/integration/autoland/rev/adec60f4f580
part 2: Add more subtests to getScreenCTM WPT, to cover more interesting scenarios with offsets and rotations. r=longsonr
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/45630 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: