This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 16406 - Add section about just supporting the 2D part
Summary: Add section about just supporting the 2D part
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: Transforms (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dirk Schulze
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-16 16:37 UTC by Dirk Schulze
Modified: 2012-05-10 04:39 UTC (History)
6 users (show)

See Also:


Attachments

Description Dirk Schulze 2012-03-16 16:37:46 UTC
The editors agreed that we should add a section how to support just the 2D part of the spec.
Comment 1 Dirk Schulze 2012-04-26 04:31:58 UTC
I suggest the following wording:

""
<h2 id="#two-dimensional-subset">Two Dimensional Subset</h2>

<p>
UAs might just support two-dimensional transformations as subset of this specification. In this case <a href="#three-d-transform-functions">three-dimensional transforms</a> must not be supported. The properties 'transform-style', 'perspective', 'perspective-origin' and 'backface-visibility' don't contribute to the rendering and must be ignored. The section about <a href="#transform-3d-rendering">3D Transform Rendering</a> does not apply. Matrix decomposing uses the technique taken from the "unmatrix" method in "Graphics Gems II, edited by Jim Arvo", simplified for the 2D case. The section about <a href="#mathematical-description">Mathematical Description of Transform Functions</a> is still effective but can be reduced by using a 3x3 transformation matrix where <em>a</em> equals <em>m11</em>, <em>b</em> equals <em>m12</em>, <em>c</em> equals <em>m21</em>, <em>d</em> equals <em>m22</em>, <em>e</em> equals <em>m41</em> and <em>f</em> equals <em>m42</em> (see <a href="#MatrixDefined">A 2D 3x2 matrix with six parameter</a>).
</p>

<img src="3x3matrix.png" alt="3x3 matrix" title="\begin{bmatrix} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{bmatrix}" width="82" height="79">
""

Any thoughts?
Comment 2 Simon Fraser 2012-04-26 04:45:30 UTC
> The properties 'transform-style', 'perspective',
'perspective-origin' and 'backface-visibility' don't contribute to the
rendering and must be ignored

Does this mean they don't create stacking context?

Another option here is to say that 3d transforms are supported, but the UA can flatten them to 2D for rendering (which is what WebKit does for ports that don't have 3d rendering).
Comment 3 Dirk Schulze 2012-04-26 04:48:27 UTC
(In reply to comment #2)
> > The properties 'transform-style', 'perspective',
> 'perspective-origin' and 'backface-visibility' don't contribute to the
> rendering and must be ignored
> 
> Does this mean they don't create stacking context?
Yes, that is why the 3D section does not apply.

> 
> Another option here is to say that 3d transforms are supported, but the UA can
> flatten them to 2D for rendering (which is what WebKit does for ports that
> don't have 3d rendering).
Do we want to require this? We would need to describe how to flatten a 3D transform. And the result doesn't look like you want anyway (not even a bit).
Comment 4 Dirk Schulze 2012-05-01 23:01:29 UTC
Based on the comments on [1] so far I modified the text to:

""
              <h2 id="#two-dimensional-subset">
                Two Dimensional Subset
              </h2>

              <p>
                UAs might just support two-dimensional transformations as a subset of this
                specification. In this case <a href="#three-d-transform-functions">three-dimensional
                transforms</a> and the properties 'transform-style',
                'perspective', 'perspective-origin' and 'backface-visibility' must not be supported. 
                Section <a href="#transform-3d-rendering">3D Transform Rendering</a> does not apply.
                Matrix decomposing uses the technique taken from the "unmatrix" method in "Graphics
                Gems II, edited by Jim Arvo", simplified for the 2D case. Section
                <a href="#mathematical-description">Mathematical Description of Transform
                Functions</a> is still effective but can be reduced by using a 3x3
                transformation matrix where <em>a</em> equals <em>m11</em>, <em>b</em> equals
                <em>m12</em>, <em>c</em> equals <em>m21</em>, <em>d</em> equals <em>m22</em>,
                <em>e</em> equals <em>m41</em> and <em>f</em> equals <em>m42</em> (see <a
                href="#MatrixDefined">A 2D 3x2 matrix with six parameter</a>).
              </p>

              <img src="3x3matrix.png" alt="3x3 matrix" title="\begin{bmatrix} a & c & e \\ b
              & d & f \\ 0 & 0 & 1 \end{bmatrix}" width="82" height="79">
              
              <div class="example">
                <p>
                  Authors can easily provide a fallback for UAs without 3D support. The following
                  example has two property definitions for 'transform'. The first one consists of
                  two two-dimensional transform functions. The second one has a two-dimensional and
                  a three-dimensional transform function.
                </p>
                <pre>div {
    transform: scale(2) rotate(45deg);
    transform: scale(2) rotate3d(0, 0, 1, 45deg);
}</pre>

                <p>
                  For a UA with 3D support, the second definition will override the first one. For
                  a UA without 3D support, the second definition is invalid and it falls back to the
                  first definition.
                </p>
              </div>
""

[1] http://lists.w3.org/Archives/Public/public-fx/2012AprJun/0089.html