Unprefixed clip-path present in computed stye (for SVG), but doesn't work on CSS boxes
https://bugs.webkit.org/show_bug.cgi?id=196761
Summary Unprefixed clip-path present in computed stye (for SVG), but doesn't work on ...
Jack Doyle
Reported 2019-04-09 21:29:37 PDT
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
Radar WebKit Bug Importer
Comment 1 2019-04-09 23:24:46 PDT
Simon Fraser (smfr)
Comment 2 2019-04-10 09:27:24 PDT
clip-path is present in computed style because it's present for SVG in the non-prefixed form.
Jack Doyle
Comment 3 2019-04-10 10:19:39 PDT
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
Comment 4 2019-10-04 10:47:21 PDT
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
Comment 5 2019-10-04 10:50:05 PDT
(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.
Note You need to log in before you can comment on or make changes to this bug.