| Summary: | `background-repeat` is incorrectly exposed through inline style | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Simon Fraser (smfr) <simon.fraser> | ||||
| Component: | CSS | Assignee: | Simon Fraser (smfr) <simon.fraser> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | clshortfuse, koivisto, simon.fraser, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | Safari Technology Preview | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 461569 [details]
Testcase
`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`. Maybe we could stop pretending that `background-repeat` is a shorthand. Pull request: https://github.com/WebKit/WebKit/pull/3292 Committed 253440@main (165b098dbd0b): <https://commits.webkit.org/253440@main> Reviewed commits have been landed. Closing PR #3292 and removing active labels. *** Bug 252403 has been marked as a duplicate of this bug. *** |
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`.