Bug 252403
| Summary: | HTMLStyleElement mangles -webkit-mask-repeat into unsupported mask-repeat | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Lopez <clshortfuse> |
| Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | annevk, ntim, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 16 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Carlos Lopez
When creating an HTMLStyleElement with `-webkit-mask-repeat` included, the property is mangled to `mask-repeat`. Webkit supports `-webkit-mask-repeat`, but not `mask-repeat`. Therefore, when attempting to reflect back into another HTMLStyleElement, the style is invalid. This is used to ponyfill/polyfill CSS Modules (native ones).
Test: https://codepen.io/shortfuse/pen/PodwrJE
Chrome PASS
Firefox PASS
WebKit/Safari FAIL
Unprefixing is fine if it's supported. Firefox unprefixes and that's fine. Chrome doesn't unprefix, so that's also fine. But Webkit will unprefix and break the ability to replicate styles.
Related:
* https://bugs.webkit.org/show_bug.cgi?id=167255
* https://bugs.webkit.org/show_bug.cgi?id=227967
* https://bugs.webkit.org/show_bug.cgi?id=229082
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/105835488>
Tim Nguyen (:ntim)
The unprefixed mask-repeat is supported by Safari, and -webkit-mask-repeat is an alias of it.
Carlos Lopez
CSS.supports("mask-repeat-x", "initial") and CSS.supports("mask-repeat-y", "initial") reports false on iPad 16.1
The codepen shows this pretty clearly. "-webkit-mask-repeat" gets mangled to "mask-repeat-x" and "mask-repeat-y" and neither are supported.
Tim Nguyen (:ntim)
mask-repeat-x/mask-repeat-y shouldn't exist, only -webkit-mask-repeat-x/-webkit-mask-repeat-y should.
Tim Nguyen (:ntim)
Actually, -webkit-mask-repeat-x/-webkit-mask-repeat-y should have been removed as well
Anne van Kesteren
The -x/-y variants were removed in bug 243915.
*** This bug has been marked as a duplicate of bug 243915 ***