-
Notifications
You must be signed in to change notification settings - Fork 711
[css-transforms-2] 3-D painting order should treat establishing element's background/border like its content #6238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Agreed, I'm not aware of any complaints with the current behaviour (apart from that inline comment about memory usage), so it seems like a good idea to fix the spec to match. |
In WebKit, It's worth looking at some more test cases to make sure your transformed elements don't also intersect with things behind the establishing element. The behavior was specified like this because it's akin to how negative z-index works, but I'm OK with saying that backgrounds/borders/box-shadow are all rendered in the same plane an intersected with atomically. |
Related to #926. |
Add some tests of 3D rendering behavior intended to understand the behavior related to w3c/csswg-drafts#6238 . Test 004 tests the behavior change proposed in that issue. However, in implementations that fail the earlier tests, test 005 is more relevant than test 004 to understanding whether the implementation follows the proposal.
Given that @smfr said he's OK with it, and given:
I'm going to change the editor's draft to specify it this way. In particular, to expand on (3) a little bit: Given that, in the presence of preserve-3d (or even without it!) WebKit will perform 3D intersection one element in the tree higher (closer to the root) than the spec says to (and what Chromium and Gecko do), it seems that specifying the WebKit behavior along with the spec's current 3D intersection model has a chance of breaking content, since it would move backgrounds (such as those in test 004.tentative in web-platform-tests/wpt#31375) from being 3D intersected with in all engines to being behind the 3D scene. And given point (1) it seems like there's an advantage to doing things this way, so I think it's probably best to do so. |
Add some tests of 3D rendering behavior intended to understand the behavior related to w3c/csswg-drafts#6238 . Test 004 tests the behavior change proposed in that issue. However, in implementations that fail the earlier tests, test 005 is more relevant than test 004 to understanding whether the implementation follows the proposal. Tests 006 and 007 test that Appendix E is followed within a 3D plane, as noted in the edit for w3c/csswg-drafts#926 .
Add some tests of 3D rendering behavior intended to understand the behavior related to w3c/csswg-drafts#6238 . Test 004 tests the behavior change proposed in that issue. However, in implementations that fail the earlier tests, test 005 is more relevant than test 004 to understanding whether the implementation follows the proposal. Tests 006 and 007 test that Appendix E is followed within a 3D plane, as noted in the edit for w3c/csswg-drafts#926 .
§ 4.1.2. 3D Rendering Contexts currently defines the painting order for a 3-D Rendering Context as follows:
it then goes on to note:
I wrote a simple test for this which I would expect from the spec to match this reference. However, the behavior I get in Chrome, Firefox, and Safari, assuming I'm interpreting this correctly, is as though A and B were done together into a plane at z=0 (i.e., step A is eliminated by merging it into step B). It's not clear to me if that issue was suggesting merging in the opposite direction. However, given that this behavior appears to be interoperable, I think we're probably better off switching the spec to match all of the implementations unless there's a very good reason to want the implementations to all change (given that I suspect it would break some existing web content).
cc @smfr @mattwoodrow
The text was updated successfully, but these errors were encountered: