<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>15505</bug_id>
          
          <creation_ts>2012-01-10 19:05:59 +0000</creation_ts>
          <short_desc>Initial value of &apos;transform-origin&apos; on SVG elements should be &apos;0 0&apos;</short_desc>
          <delta_ts>2012-02-10 16:25:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>CSS</product>
          <component>Transforms</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Schulze">dschulze</reporter>
          <assigned_to name="Dirk Schulze">dschulze</assigned_to>
          <cc>ayg</cc>
    
    <cc>cmarrin</cc>
    
    <cc>dino</cc>
    
    <cc>eoconnor</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>62506</commentid>
    <comment_count>0</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-01-10 19:05:59 +0000</bug_when>
    <thetext>The suggested modification of the user agent script suggest &apos;top left&apos; as origin. That would be the same like 0% 0% of the objectBoundingBox. This doesn&apos;t reflect the current behavior on SVG where it is 0 0.

Example:
&lt;rect x=&quot;100&quot; y=&quot;100&quot; width=&quot;100&quot; height=&quot;100&quot; fill=&quot;green&quot;/&gt;

The transform-origin with the current behavior of SVG would still be 0 0. With the current description in CSS Transforms it would be top left of the objectBoundingBox, which is (100, 100, 100, 100). That means the origin is 100 100 as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62507</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-01-10 19:07:30 +0000</bug_when>
    <thetext>Note that this bug is partly related to bug 15504 .</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63014</commentid>
    <comment_count>2</comment_count>
    <who name="Aryeh Gregor">ayg</who>
    <bug_when>2012-01-23 17:03:04 +0000</bug_when>
    <thetext>In the current CSS Transforms spec, &quot;0 0&quot; means the same as &quot;top left&quot; -- it&apos;s still an offset from the element&apos;s border box.  There&apos;s no declarative syntax to achieve the SVG effect at all right now, as far as I can tell.  So some syntax needs to be added to allow origins to be specified relative to the upper left of the initial containing block.  Or a magical initial value (see bug 15504).

But yeah, the current spec definitely does not reflect SVG behavior here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63017</commentid>
    <comment_count>3</comment_count>
      <attachid>1071</attachid>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-01-23 17:47:30 +0000</bug_when>
    <thetext>Created attachment 1071
&apos;transform-origin&apos; with top left and 0 0

I can confirm that &apos;0 0&apos; means the same as &apos;top left&apos; according the tested browsers: Opera, Firefox and Safari. IIRC CSS Shaders [1] tries to addresses this already with &apos;filter-margin&apos;. We should take a look how CSS shaders specify this and may share the notation of borderBox.

[1] https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#filter-margin-property</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63957</commentid>
    <comment_count>4</comment_count>
    <who name="Dirk Schulze">dschulze</who>
    <bug_when>2012-02-10 16:25:21 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Created attachment 1071 [details]
&gt; &apos;transform-origin&apos; with top left and 0 0
&gt; 
&gt; I can confirm that &apos;0 0&apos; means the same as &apos;top left&apos; according the tested
&gt; browsers: Opera, Firefox and Safari. IIRC CSS Shaders [1] tries to addresses
&gt; this already with &apos;filter-margin&apos;. We should take a look how CSS shaders
&gt; specify this and may share the notation of borderBox.
&gt; 
&gt; [1]
&gt; https://dvcs.w3.org/hg/FXTF/raw-file/tip/custom/index.html#filter-margin-property

I added the following wording to the spec:

&quot;For SVG elements without an associated CSS layout box the &lt;length&gt; values represent an offset from the point of origin of the element&apos;s local coordinate space.&quot;

I think that this fixes the problem with 0 0 and top left for SVG elements (that are not inline SVGSVGelements).</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>1071</attachid>
            <date>2012-01-23 17:47:30 +0000</date>
            <delta_ts>2012-01-23 17:47:30 +0000</delta_ts>
            <desc>&apos;transform-origin&apos; with top left and 0 0</desc>
            <filename>html-test-transforms-origin-1.html</filename>
            <type>text/html</type>
            <size>740</size>
            <attacher name="Dirk Schulze">dschulze</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CiAgPG1ldGEgY2hhcnNldD0i
dXRmLTgiPgogIDx0aXRsZT48L3RpdGxlPgogIDxzY3JpcHQ+CgogIDwvc2NyaXB0PgogIDxzdHls
ZT4KZGl2IHsKICB3aWR0aDogMTAwcHg7CiAgaGVpZ2h0OiAxMDBweDsKICBiYWNrZ3JvdW5kLWNv
bG9yOiBncmVlbjsKICBwb3NpdGlvbjogZml4ZWQ7CiAgbGVmdDogMzAwcHg7CiAgdG9wOiAyMDBw
eDsKICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDQ1ZGVnKTsKICAtbW96LXRyYW5zZm9ybTog
cm90YXRlKDQ1ZGVnKTsKICAtby10cmFuc2Zvcm06IHJvdGF0ZSg0NWRlZyk7CiAgLW1zLXRyYW5z
Zm9ybTogcm90YXRlKDQ1ZGVnKTsKfQoKLmJveDEgewogIC13ZWJraXQtdHJhbnNmb3JtLW9yaWdp
bjogdG9wIGxlZnQ7CiAgLW1vei10cmFuc2Zvcm0tb3JpZ2luOiB0b3AgbGVmdDsKICAtby10cmFu
c2Zvcm0tb3JpZ2luOiB0b3AgbGVmdDsKICAtbXMtdHJhbnNmb3JtLW9yaWdpbjogdG9wIGxlZnQ7
Cn0KCi5ib3gyIHsKICAtd2Via2l0LXRyYW5zZm9ybS1vcmlnaW46IDAgMDsKICAtbW96LXRyYW5z
Zm9ybS1vcmlnaW46IDAgMDsKICAtby10cmFuc2Zvcm0tb3JpZ2luOiAwIDA7CiAgLW1zLXRyYW5z
Zm9ybS1vcmlnaW46IDAgMDsKfQogIDwvc3R5bGU+CjwvaGVhZD4KPGJvZHk+CjxkaXYgY2xhc3M9
ImJveDEiPjE8L2Rpdj4KPGRpdiBjbGFzcz0iYm94MiI+MjwvZGl2Pgo8L2JvZHk+CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>