[wpt-sync] Sync PR 63506 - [WPT] Fix img-sizes-auto test to use attribute selector
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox160 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63506 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63506
Details from upstream follow.
John Jansen <johnjansen@microsoft.com> wrote:
[WPT] Fix img-sizes-auto test to use attribute selector
The test's "!important" subtest compares a real \<img sizes=auto
class=test-important> element against a synthetic "expected" clone
created via createElementNS() in a non-HTML namespace.The test's author rule
img.test-important { contain-intrinsic-size: 30px 15px }was meant to apply to that expected clone so the ref's
computed style reflects the author-overridden value. Due to a Chromium
bug (https://issues.chromium.org/issues/41276987), the class selector
fails to match elements created in a non-HTML namespace, so the rule
never applied to the expected clone and the subtest compared against the
wrong reference value.Switch to the equivalent attribute selector
img[class~="test-important"], which is not affected by this bug and
matches the expected clone correctly, so the subtest asserts against the
correct reference value.Bug: 571158508
Test: Ran run_web_tests.py for img-sizes-auto.html; manually verified all 24 subtests pass in Firefox.
Change-Id: Ia7a8d8fbff0a4515ec99370a4fa933f90a00b7ff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8539079
Commit-Queue: John Jansen \<johnjansen@microsoft.com>
Reviewed-by: Mike Jackson \<mjackson@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1715829}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=103223
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 24 subtests
Status Summary
Firefox
OK : 1
PASS: 24
Chrome
OK : 1
PASS: 24
Safari
OK : 1
PASS: 24
Description
•