[Bug 23015] Preserve-3d + backface visibility semantics need to be clarified


--- Comment #1 from Dirk Schulze <dschulze@adobe.com> ---
(In reply to Shawn Singh from comment #0)
> Created attachment 1387 [details]
> Test case for Example 2

I think we should create two bug reports to discuss this.

> I have two examples that illustrate questions about preserve-3d and backface
> visibility.
> The first example can be found in the chromium bug here:
>   https://code.google.com/p/chromium/issues/detail?id=224618
> This developer's page has the following structure:
> <div with perspective, but NOT preserve-3d>
>    <div for face1 of cube, with backface visibility hidden>
>    <div for face2 of cube, with backface visibility hidden>
>    <div for face3 of cube, with backface visibility hidden>
>    <div for face4 of cube, with backface visibility hidden>
>    <div for face5 of cube, with backface visibility hidden>
>    <div for face6 of cube, with backface visibility hidden>
> </div>
> According to spec, because the 6 faces are technically NOT in a 3d rendering
> context, backface visibility must be checked against each layer's local
> transform. This is awkward - the transform used to test backface visibility
> (without perspective) is not the same one that is used to actually display
> the layers (including perspective). As a result, if things are implemented
> perfectly to spec, sometimes layers will disappear because to local
> transform without perspective thinks the back-side of an element is visible.
> But with perspective, the front-side of the element is actually visible.
> Some options how we could address this awkwardness:
>  (1) leave the spec as-is, and the developer should actually be using
> preserve-3d on the perspective container.
>  (2) define that perspective transform creates a 3d rendering context, just
> the same way that preserve-3d would.
>  (3) make a special case that a perspective transform from a direct parent
> should be included when testing backface visibility, even when not in a 3d
> rendering context.

I am creating a test suite that exactly checks the different behaviors across
browsers on preserve-3d and flatten. You can find the repository on github


The tests still need clean up and quite some corrections. Also, expected
results fully depend on the outcome of the discussions.

Your example touches the last test cases with blue and yellow. You'll see that
the problem is not just related to perspective but the interpretation of
'flatten' on the transform-style property. In fact all tests test edge cases of
transform-style  with certain other settings like perspective.

I encourage you to transform your tests to ref-tests in the format of the CSS
WG. See http://wiki.csswg.org/test/reftest

That makes it easier to compare results and makes it possible to reuse the
tests  for spec testing.

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 25 September 2013 20:57:41 UTC