Bug 61824
Summary: | transform-style:flat should draw in document order | ||
---|---|---|---|
Product: | WebKit | Reporter: | Vangelis Kokkevis <vangelis> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | ahmad.saleem792, cmarrin, e.imhotep, eoconnor, jamesr, mattwoodrow, mgoszcz2, mrobinson, simon.fraser |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://jsfiddle.net/nq2beh8d/ |
Vangelis Kokkevis
Should children of an element with -webkit-transform-style set to flat draw in document order or be depth sorted?
Safari depth sorts whereas Chrome's compositor doesn't. My take is that unless the transform-style of the parent is set to preserves-3d, children should be drawn in their document (or z-index) order but I don't think the spec is clear about this.
This page demonstrates the difference:
http://dl.dropbox.com/u/2176065/perspective/index.html#album-4
(you'll need to mouse over the covers on the right to get them to flip around)
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
James Robinson
I think that the elements have to be painted in document order (or more precisely the usual CSS painting order) unless CSS specifies exactly what Safari's depth sort does, which seems somewhat impractical.
Simon Fraser (smfr)
-webkit-transform-style: flat should draw in document order, with no intersection. Safari isn't able to do this correctly yet.
Francesco Mazzoli
Just wanted to report that this is still an issue, and is causing us considerable headaches when building a WebGL AR/VR application which needs to transform the HUD, which is partially written with normal DOM elements.
Ahmad Saleem
Test case link from StackOverflow mentioning this bug: https://stackoverflow.com/questions/76248303/z-index-and-translate-3d-not-work-the-same-in-chrome-and-safari/76248787#76248787
It is still reproducible in Safari Technology Preview 171.