<?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>17844</bug_id>
          
          <creation_ts>2012-07-18 07:01:32 +0000</creation_ts>
          <short_desc>Spec img.x/y</short_desc>
          <delta_ts>2014-07-30 08:40:36 +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>CSSOM View</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Simon Pieters">zcorpan</assigned_to>
          <cc>annevk</cc>
    
    <cc>glenn</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>philipj</cc>
    
    <cc>roc</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>public-css-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70158</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 07:01:32 +0000</bug_when>
    <thetext>This was was cloned from bug 16842 as part of operation convergence.
Originally filed: 2012-04-24 18:12:00 +0000
Original reporter: Ms2ger &lt;Ms2ger@gmail.com&gt;

================================================================================
 #0   Ms2ger                                          2012-04-24 18:12:56 +0000 
--------------------------------------------------------------------------------
I tried removing those attributes from Gecko, but failed. See
https://bugzilla.mozilla.org/show_bug.cgi?id=587021
https://bugzilla.mozilla.org/show_bug.cgi?id=731832
================================================================================</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72658</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-23 21:57:43 +0000</bug_when>
    <thetext>...what do they do?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72659</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-23 21:58:55 +0000</bug_when>
    <thetext>(Maybe this should just be in CSSOM?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77359</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-29 23:48:49 +0000</bug_when>
    <thetext>ms2ger: ping</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77374</commentid>
    <comment_count>4</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-10-30 07:52:31 +0000</bug_when>
    <thetext>Looks like the position relative to the nearest positioned ancestor, in CSS pixels (in Gecko).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77553</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-31 19:58:31 +0000</bug_when>
    <thetext>Glenn, do you agree that this belongs more in CSSOM than in HTML?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77584</commentid>
    <comment_count>6</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-10-31 21:41:41 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Glenn, do you agree that this belongs more in CSSOM than in HTML?

The greater question for me is whether it should be in either HTML or CSSOM... Is this is basically shorthand for HTMLImageElement.style.{top,left}?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77605</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-31 22:44:16 +0000</bug_when>
    <thetext>I didn&apos;t understand your last comment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77643</commentid>
    <comment_count>8</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-11-01 09:10:40 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #5)
&gt; &gt; Glenn, do you agree that this belongs more in CSSOM than in HTML?
&gt; 
&gt; The greater question for me is whether it should be in either HTML or
&gt; CSSOM...

I&apos;m asking why we should standardize this extension when it appears to be superfluous (with offset{Left,Top} -- see below).

&gt; Is this is basically shorthand for HTMLImageElement.style.{top,left}?

I had meant getComputedStyle(img).{left,top}, but I see that HTMLElement.offset{Left,Top} seems to be the correct mapping, at least according to [1][2].

[1] http://hg.csswg.org/test/raw-file/tip/contributors/gadams/incoming/cssom-view/htmlimagelement-equivalence-xy-absolute.xht

[2] http://hg.csswg.org/test/raw-file/tip/contributors/gadams/incoming/cssom-view/htmlimagelement-equivalence-xy-static.xht</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77648</commentid>
    <comment_count>9</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-11-01 10:39:11 +0000</bug_when>
    <thetext>Did you read the bug? These attributes are required for web compatibility.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77649</commentid>
    <comment_count>10</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-11-01 10:48:33 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; Did you read the bug? These attributes are required for web compatibility.

yes I did; the mere existence of such usage does not mean these properties should be standardized, particularly when there appears to be an existing standard defined mechanism that already supports this function (unless offset{Left,Top} are somehow different behaviorally speaking)

also, though I did test WK/OP/FF, i haven&apos;t checked IE to see if they are supported there; [FF also failed two tests]

p.s. i suppose it would be possible to document x/y as obsoleted non-conforming features, such as is done in [1]; if this were done, then my preference would be to specify in HTML spec, and refer there to the normative CSSOM View properties (offset{Left,Top}).

[1] http://dev.w3.org/html5/spec/single-page.html#non-conforming-features</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77715</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-11-01 22:29:51 +0000</bug_when>
    <thetext>Ms2ger: Are they in fact exactly equivalent to offsetLeft/offsetTop?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77735</commentid>
    <comment_count>12</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2012-11-02 08:14:37 +0000</bug_when>
    <thetext>The implementations aren&apos;t trivially equivalent, at least not to my untrained eyes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77740</commentid>
    <comment_count>13</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-11-02 08:32:59 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; The implementations aren&apos;t trivially equivalent, at least not to my
&gt; untrained eyes.

to show they are different, we need a test that shows a difference in actual values, independent of the implementation; if they are different, that may be a bug as opposed to the intended behavior

at first order, at least testing on 3 engines, they appear to be the same for both static and absolute positioned images</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77776</commentid>
    <comment_count>14</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-11-02 21:17:14 +0000</bug_when>
    <thetext>Ms2ger: Do you have a test showing how they&apos;re different?

If they&apos;re the same, then it makes sense to define them in the &quot;obsolete APIs&quot; part of the HTML spec, deferring to the equivalents in CSSOM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84872</commentid>
    <comment_count>15</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-03-22 18:38:16 +0000</bug_when>
    <thetext>I know nothing about their implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84882</commentid>
    <comment_count>16</comment_count>
    <who name="Robert O&apos;Callahan (Mozilla)">roc</who>
    <bug_when>2013-03-23 06:00:48 +0000</bug_when>
    <thetext>I don&apos;t really know this code but the implementation looks like x/y are the offset of the &lt;img&gt; border-box top-left to the top-left of the border-box of the nearest ancestor (excluding the &lt;img&gt;) that&apos;s positioned or not overflow:visible, ignoring transforms.

(In reply to comment #10)
&gt; yes I did; the mere existence of such usage does not mean these properties
&gt; should be standardized

It does, actually, unless we can find a way to eliminate the usage or treat it as insignificant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89948</commentid>
    <comment_count>17</comment_count>
    <who name="Ms2ger">Ms2ger</who>
    <bug_when>2013-06-27 11:59:09 +0000</bug_when>
    <thetext>And we accidentally removed them in Fx 20-21, and people started to rely on that too:

https://bugzilla.mozilla.org/show_bug.cgi?id=887660</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95253</commentid>
    <comment_count>18</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-10-23 20:42:44 +0000</bug_when>
    <thetext>Comment 16 suggests this should be a CSSOM issue. zcorpan, do you want to take this, or if not, can you provide me with a hook to define this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95313</commentid>
    <comment_count>19</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2013-10-24 14:51:33 +0000</bug_when>
    <thetext>https://dvcs.w3.org/hg/csswg/rev/a65682fccc9b

In Blink it appears to always be relative to the initial containing block, position and overflow on ancestors doesn&apos;t matter. This seems simpler, so unless Gecko&apos;s behavior better matches what Web content expects I think simpler wins. (In Presto position matters but overflow doesn&apos;t. IE10 doesn&apos;t support x/y.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109556</commentid>
    <comment_count>20</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-07-30 08:40:36 +0000</bug_when>
    <thetext>There&apos;s an ongoing blink-dev thread about HTMLImageElement.x/y:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/zpLuYu8tmdA/uA_7TQSQDzQJ</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>