RESOLVED FIXED243915
`background-repeat` is incorrectly exposed through inline style
https://bugs.webkit.org/show_bug.cgi?id=243915
Summary `background-repeat` is incorrectly exposed through inline style
Simon Fraser (smfr)
Reported 2022-08-12 20:17:04 PDT
This testcase fails in WebKit: <div id="target" style="background-repeat: no-repeat;"></div> <script> let target = document.getElementById('target'); target.textContent = target.style.length + ' rules'; </script> reporting `0 rules`. Other browsers correctly find one rule. This causes failures on https://css3test.com which uses this technique to detect support for style properties. The bug relates to how webkit expands `background-repeat` to `background-repeat-x` and `background-repeat-y`.
Attachments
Testcase (485 bytes, text/html)
2022-08-12 20:21 PDT, Simon Fraser (smfr)
no flags
Simon Fraser (smfr)
Comment 1 2022-08-12 20:21:13 PDT
Created attachment 461569 [details] Testcase
Simon Fraser (smfr)
Comment 2 2022-08-12 20:26:18 PDT
`PropertySetCSSStyleDeclaration::length()` is really API, so to fix this we'd either have to recompute the length by collapsing longhands, or not expand `background-repeat` to `background-repeat-x` and `background-repeat-y`.
Simon Fraser (smfr)
Comment 3 2022-08-12 20:42:25 PDT
Maybe we could stop pretending that `background-repeat` is a shorthand.
Simon Fraser (smfr)
Comment 4 2022-08-13 17:21:48 PDT
EWS
Comment 5 2022-08-15 15:04:09 PDT
Committed 253440@main (165b098dbd0b): <https://commits.webkit.org/253440@main> Reviewed commits have been landed. Closing PR #3292 and removing active labels.
Radar WebKit Bug Importer
Comment 6 2022-08-15 15:05:24 PDT
Anne van Kesteren
Comment 7 2023-12-17 04:09:41 PST
*** Bug 252403 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.