Bug 196761
Summary: | Unprefixed clip-path present in computed stye (for SVG), but doesn't work on CSS boxes | ||
---|---|---|---|
Product: | WebKit | Reporter: | Jack Doyle <jack> |
Component: | CSS | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | bfulgham, krit, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 12 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=187888 | ||
Bug Depends on: | |||
Bug Blocks: | 126207 |
Jack Doyle
The JavaScript element.style.clipPath is present (returns "" instead of undefined), indicating a prefix is NOT needed. However, if you apply a clipPath (without the -webkit- prefix), it doesn't work! Here's a reduced test case:
https://codepen.io/GreenSock/pen/4ec363d7fca960b501b390634fdf2e39?editors=0010
For a non-valid property (like element.style.bogus), undefined is returned (correct). So this clipPath behavior is very confusing (and I'd say clearly a bug). The element.style.clipPath test is passing, but functionality fails. It should either be fully functional in unprefixed form, or element.style.clipPath should return undefined.
Possibly a related thread: https://bugs.webkit.org/show_bug.cgi?id=187888
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/49764514>
Simon Fraser (smfr)
clip-path is present in computed style because it's present for SVG in the non-prefixed form.
Jack Doyle
This seems like non-standard behavior. My demo isn't using an SVG element. Shouldn't it be returning undefined (indicating it's not supported on that element)? Of course ideally it would actually just work unprefixed.
Dirk Schulze
We did not unprefix clip-path yet (though there is a patch for doing so). Sadly that means that both properties behave like 2 different properties as long as we did not unprefix (and alias the prefixed version) of Clip-path.
Dirk Schulze
(In reply to Dirk Schulze from comment #4)
> We did not unprefix clip-path yet (though there is a patch for doing so).
> Sadly that means that both properties behave like 2 different properties as
> long as we did not unprefix (and alias the prefixed version) of Clip-path.
Forgot the background: clip-path was introduced by and for SVG. -WebKit-Clip-path for HTML first. So those properties currently ARE 2 different properties. When unprefixing we plan to make them one. Foundation is there already. You should be able to find the bug that is duplicated by this bug by searching for clip-path.