- From: <bugzilla@jessica.w3.org>
- Date: Mon, 12 Mar 2012 19:55:17 +0000
- To: public-css-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328 Summary: Definition of 3D rendering contexts isn't clear Product: CSS Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Transforms AssignedTo: smfr@me.com ReportedBy: ayg@aryeh.name QAContact: public-css-bugzilla@w3.org CC: ayg@aryeh.name, cmarrin@apple.com, eoconnor@apple.com, smfr@me.com, dino@apple.com, dschulze@adobe.com See Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=733849 The spec says: """ Elements establish and participate in 3D rendering contexts as follows: * A 3D rendering context is established by a a transformable element whose computed value for ‘transform-style’ is ‘preserve-3d’, and which itself is not part of a 3D rendering context. Note that such an element is always a containing block. An element that establishes a 3D rendering context also participates in that context. * An element whose computed value for ‘transform-style’ is ‘preserve-3d’, and which itself participates in a 3D rendering context, extends that 3D rendering context rather than establishing a new one. * An element participates in a 3D rendering context if its containing block establishes or extends a 3D rendering context. """ http://dev.w3.org/csswg/css3-transforms/#transform-3d-rendering One problem here is that a containing block is not always an element. For instance, in the markup <div><img src=foo><div>More text</div></div> the img's containing block is an anonymous block box. What does it mean for that box to establish or extend a 3D rendering context? If the outer div has transform-style: preserve-3d, is the img part of a 3D rendering context or not? More concretely, consider the following: data:text/html,<!doctype html> <div style="transform-style:preserve-3d;transform:rotatex(90deg)"> <img src=image style="transform:rotatex(90deg)"> <div>Some text</div> </div> In Chrome 19 dev (Linux), WebKit nightly r109732 (Windows 8), and Firefox 13.0a1, the image appears, so it is part of the rendering context. How are we supposed to spec this? Another problem is the statement "Note that such an element is always a containing block." As Boris points out in <https://bugzilla.mozilla.org/show_bug.cgi?id=733849#c4>, this isn't always true. According to <http://www.w3.org/TR/CSS2/visuren.html#block-boxes>, a table box isn't a block container box, for instance. Also, per bug 16326, we want things like table rows to be transformable, but they aren't block container boxes. Thus they can't be containing blocks. I suggested the following wording, which doesn't use the concept of containing blocks at all: """ Elements establish and participate in 3D rendering contexts as follows: * If a transformable element's computed value for 'transform-style' is 'preserve-3d', and either its parent is not transformable or its parent's 'transform-style' computes to 'flat', it establishes a new 3D rendering context and participates in that context. * If a transformable element's parent is transformable, and its parent's 'transform-style' computes to 'preserve-3d', it participates in the same 3D rendering context as its parent. * If an element is not transformable, or its 'transform-style' and its parent's both compute to 'flat', or its 'transform-style' computes to 'flat' and its parent is not transformable, it does not participate in any 3D rendering context. """ However, this doesn't match how browsers behave. See the test-case in <https://bugzilla.mozilla.org/show_bug.cgi?id=733849#c7>. I'm not sure what to spec here. Any ideas? What do Gecko and WebKit actually do? -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug.
Received on Monday, 12 March 2012 19:55:23 UTC