8000 [cssom-view] Specify img.x and img.y. https://www.w3.org/Bugs/Public/… · w3c/csswg-drafts@c7a14b9 · GitHub
Skip to content

Commit c7a14b9

Browse files
author
Simon Pieters
committed
[cssom-view] Specify img.x and img.y. https://www.w3.org/Bugs/Public/show_bug.cgi?id=17844
1 parent c118bb3 commit c7a14b9

2 files changed

Lines changed: 63 additions & 28 deletions

File tree

cssom-view/Overview.html

Lines changed: 46 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<h1>CSSOM View Module</h1>
1818

19-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 23 October 2013</h2>
19+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 24 October 2013</h2>
2020

2121
<dl>
2222

@@ -83,7 +83,7 @@ <h2 class="no-num no-toc" id="sotd">Status of This Document</h2>
8383
can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
8484
index at http://www.w3.org/TR/.</a></em>
8585

86-
<p>This is the 23 October 2013 Editor's Draft of CSSOM View. Please send
86+
<p>This is the 24 October 2013 Editor's Draft of CSSOM View. Please send
8787
comments to
8888
<a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
8989
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
@@ -136,22 +136,23 @@ <h2 class="no-num no-toc" id="toc">Table of Contents</h2>
136136
<code title="">getBoundingClientRect()</code> methods</a></li>
137137
<li><a href="#element-scrolling-members"><span class="secno">7.2 </span><code title="">Element</code> Scrolling Members</a></ul></li>
138138
<li><a href="#extensions-to-the-htmlelement-interface"><span class="secno">8 </span>Extensions to the <code title="">HTMLElement</code> Interface</a></li>
139-
<li><a href="#extensions-to-the-range-interface"><span class="secno">9 </span>Extensions to the <code title="">Range</code> Interface</a></li>
140-
<li><a href="#extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Extensions to the <code title="">MouseEvent</code> Interface</a></li>
141-
<li><a href="#geometry"><span class="secno">11 </span>Geometry</a>
139+
<li><a href="#excensions-to-the-htmlimageelement-interface"><span class="secno">9 </span>Excensions to the <code title="">HTMLImageElement</code> Interface</a></li>
140+
<li><a href="#extensions-to-the-range-interface"><span class="secno">10 </span>Extensions to the <code title="">Range</code> Interface</a></li>
141+
<li><a href="#extensions-to-the-mouseevent-interface"><span class="secno">11 </span>Extensions to the <code title="">MouseEvent</code> Interface</a></li>
142+
<li><a href="#geometry"><span class="secno">12 </span>Geometry</a>
142143
<ul class="toc">
143-
<li><a href="#the-domrectlist-interface"><span class="secno">11.1 </span>The <code title="">DOMRectList</code> Interface</a></li>
144-
<li><a href="#the-domrect-and-domrectreadonly-interfaces"><span class="secno">11.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectReadOnly</code> Interfaces</a></li>
145-
<li><a class="atrisk" href="#the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</a></li>
146-
<li><a class="atrisk" href="#the-domquad-interface"><span class="secno">11.4 </span>The <code title="">DOMQuad</code> Interface</a></li>
147-
<li><a class="atrisk" href="#the-geometryutils-interface"><span class="secno">11.5 </span>The <code title="">GeometryUtils</code> Interface</a></ul></li>
148-
<li><a href="#events"><span class="secno">12 </span>Events</a>
144+
<li><a href="#the-domrectlist-interface"><span class="secno">12.1 </span>The <code title="">DOMRectList</code> Interface</a></li>
145+
<li><a href="#the-domrect-and-domrectreadonly-interfaces"><span class="secno">12.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectReadOnly</code> Interfaces</a></li>
146+
<li><a class="atrisk" href="#the-dompoint-interface"><span class="secno">12.3 </span>The <code title="">DOMPoint</code> Interface</a></li>
147+
<li><a class="atrisk" href="#the-domquad-interface"><span class="secno">12.4 </span>The <code title="">DOMQuad</code> Interface</a></li>
148+
<li><a class="atrisk" href="#the-geometryutils-interface"><span class="secno">12.5 </span>The <code title="">GeometryUtils</code> Interface</a></ul></li>
149+
<li><a href="#events"><span class="secno">13 </span>Events</a>
149150
<ul class="toc">
150-
<li><a href="#resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</a></li>
151-
<li><a href="#scrolling-0"><span class="secno">12.2 </span>Scrolling</a></ul></li>
152-
<li><a href="#css-properties"><span class="secno">13 </span>CSS properties</a>
151+
<li><a href="#resizing-viewports"><span class="secno">13.1 </span>Resizing viewports</a></li>
152+
<li><a href="#scrolling-0"><span class="secno">13.2 </span>Scrolling</a></ul></li>
153+
<li><a href="#css-properties"><span class="secno">14 </span>CSS properties</a>
153154
<ul class="toc">
154-
<li><a href="#smooth-scrolling:-the-'scroll-behavior'-property"><span class="secno">13.1 </span>Smooth Scrolling: The 'scroll-behavior' Property</a></ul></li>
155+
<li><a href="#smooth-scrolling:-the-'scroll-behavior'-property"><span class="secno">14.1 </span>Smooth Scrolling: The 'scroll-behavior' Property</a></ul></li>
155156
<li><a class="no-num" href="#references">References</a></li>
156157
<li><a class="no-num" href="#acknowledgments">Acknowledgments</a></ul>
157158
<!--end-toc-->
@@ -1476,7 +1477,24 @@ <h2 id="extensions-to-the-htmlelement-interface"><span class="secno">8 </span>Ex
14761477
that apply to the element and its ancestors.</li>
14771478
</ol>
14781479

1479-
<h2 id="extensions-to-the-range-interface"><span class="secno">9 </span>Extensions to the <code title="">Range</code> Interface</h2>
1480+
1481+
<h2 id="excensions-to-the-htmlimageelement-interface"><span class="secno">9 </span>Excensions to the <code title="">HTMLImageElement</code> Interface</h2>
1482+
1483+
<pre class="idl">partial interface <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#htmlimageelement">HTMLImageElement</a> {
1484+
readonly attribute double <a href="#dom-htmlimageelement-x" title="dom-HTMLImageElement-x">x</a>;
1485+
readonly attribute double <a href="#dom-htmlimageelement-y" title="dom-HTMLImageElement-y">y</a>;
1486+
};</pre>
1487+
1488+
<p>The <dfn id="dom-htmlimageelement-x" title="dom-HTMLImageElement-x"><code>x</code></dfn> attribute, on getting, must return the x-coordinate of the left <a href="#border-edge">border edge</a> of the
1489+
first <a href="#css-layout-box">CSS layout box</a> associated with the element, relative to the <a href="#initial-containing-block">initial containing block</a> origin, ignoring any
1490+
<a href="#transforms">transforms</a> that apply to the element and its ancestors.
1491+
1492+
<p>The <dfn id="dom-htmlimageelement-y" title="dom-HTMLImageElement-y"><code>y</code></dfn> attribute, on getting, must return the y-coordinate of the top <a href="#border-edge">border edge</a> of the
1493+
first <a href="#css-layout-box">CSS layout box</a> associated with the element, relative to the <a href="#initial-containing-block">initial containing block</a> origin, ignoring any
1494+
<a href="#transforms">transforms</a> that apply to the element and its ancestors.
1495+
1496+
1497+
<h2 id="extensions-to-the-range-interface"><span class="secno">10 </span>Extensions to the <code title="">Range</code> Interface</h2>
14801498

14811499
<p>The objects the methods described below return must
14821500
be static.</p>
@@ -1523,7 +1541,7 @@ <h2 id="extensions-to-the-range-interface"><span class="secno">9 </span>Extensio
15231541
zero.</li>
15241542
</ol>
15251543

1526-
<h2 id="extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Extensions to the <code title="">MouseEvent</code> Interface</h2>
1544+
<h2 id="extensions-to-the-mouseevent-interface"><span class="secno">11 </span>Extensions to the <code title="">MouseEvent</code> Interface</h2>
15271545

15281546
<p class="issue">The object IDL fragment redefines some members. Can we
15291547
resolve this somehow?</p>
@@ -1610,10 +1628,10 @@ <h2 id="extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Ex
16101628
</ol>
16111629

16121630

1613-
<h2 id="geometry"><span class="secno">11 </span>Geometry</h2>
1631+
<h2 id="geometry"><span class="secno">12 </span>Geometry</h2>
16141632

16151633

1616-
<h3 id="the-domrectlist-interface"><span class="secno">11.1 </span>The <code title="">DOMRectList</code> Interface</h3>
1634+
<h3 id="the-domrectlist-interface"><span class="secno">12.1 </span>The <code title="">DOMRectList</code> Interface</h3>
16171635

16181636
<p>The <code><a href="#domrectlist">DOMRectList</a></code> interface consists of an ordered list of <code><a href="#domrect">DOMRect</a></code> objects.</p>
16191637

@@ -1631,7 +1649,7 @@ <h3 id="the-domrectlist-interface"><span class="secno">11.1 </span>The <code tit
16311649
greater than the number of <code><a href="#domrect">DOMRect</a></code> objects associated with the object. Otherwise, the <code><a href="#domrect">DOMRect</a></code> object at
16321650
<var>index</var> must be returned.</p>
16331651

1634-
<h3 id="the-domrect-and-domrectreadonly-interfaces"><span class="secno">11.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectReadOnly</code> Interfaces</h3>
1652+
<h3 id="the-domrect-and-domrectreadonly-interfaces"><span class="secno">12.2 </span>The <code title="">DOMRect</code> and <code title="">DOMRectReadOnly</code> Interfaces</h3>
16351653

16361654
<p>Objects implementing the <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> interface represent a <dfn id="concept-geometry-rectangle" title="concept-geometry-rectangle">rectangle</dfn>. The type of box is
16371655
specified by the method or attribute that returns a <code><a href="#domrect">DOMRect</a></code> or <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> object.
@@ -1715,7 +1733,7 @@ <h3 id="the-domrect-and-domrectreadonly-interfaces"><span class="secno">11.2 </s
17151733
coordinate</a>, <a href="#concept-geometry-rectangle-x-coordinate" title="concept-geometry-rectangle-x-coordinate">x coordinate</a> + <a href="#concept-geometry-rectangle-width" title="concept-geometry-rectangle-width">width</a>).
17161734

17171735

1718-
<h3 class="atrisk" id="the-dompoint-interface"><span class="secno">11.3 </span>The <code title="">DOMPoint</code> Interface</h3>
1736+
<h3 class="atrisk" id="the-dompoint-interface"><span class="secno">12.3 </span>The <code title="">DOMPoint</code> Interface</h3>
17191737

17201738
<pre class="idl">[<a href="#dom-dompoint" title="dom-DOMPoint">Constructor</a>(optional <a href="#dompointinit">DOMPointInit</a> point),
17211739
<a href="#dom-dompoint" title="dom-DOMPoint">Constructor</a>(unrestricted double x, unrestricted double y, optional unrestricted double z = 0, <!--
@@ -1764,7 +1782,7 @@ <h3 class="atrisk" id="the-dompoint-interface"><span class="secno">11.3 </span>T
17641782
it must set the current value to the new value.
17651783

17661784

1767-
<h3 class="atrisk" id="the-domquad-interface"><span class="secno">11.4 </span>The <code title="">DOMQuad</code> Interface</h3>
1785+
<h3 class="atrisk" id="the-domquad-interface"><span class="secno">12.4 </span>The <code title="">DOMQuad</code> Interface</h3>
17681786

17691787
<p>Objects implementing the <code><a href="#domquad">DOMQuad</a></code> interface represents a quadrilateral shape. <code><a href="#domquad">DOMQuad</a></code> objects have an <dfn id="associated-bounding-rectangle">associated
17701788
bounding rectangle</dfn> set to a <code><a href="#domrectreadonly">DOMRectReadOnly</a></code> object when created.
@@ -1838,7 +1856,7 @@ <h3 class="atrisk" id="the-domquad-interface"><span class="secno">11.4 </span>Th
18381856
attributes as appropriate to describe the new smallest bounding box of the four points.
18391857

18401858

1841-
<h3 class="atrisk" id="the-geometryutils-interface"><span class="secno">11.5 </span>The <code title="">GeometryUtils</code> Interface</h3>
1859+
<h3 class="atrisk" id="the-geometryutils-interface"><span class="secno">12.5 </span>The <code title="">GeometryUtils</code> Interface</h3>
18421860

18431861
<pre class="idl">enum <dfn id="cssboxtype">CSSBoxType</dfn> { "margin", "border", "padding", "content" };
18441862
dictionary <dfn id="boxquadoptions">BoxQuadOptions</dfn> {
@@ -1898,9 +1916,9 @@ <h3 class="atrisk" id="the-geometryutils-interface"><span class="secno">11.5 </s
18981916
</ol>
18991917

19001918

1901-
<h2 id="events"><span class="secno">12 </span>Events</h2>
1919+
<h2 id="events"><span class="secno">13 </span>Events</h2>
19021920

1903-
<h3 id="resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</h3>
1921+
<h3 id="resizing-viewports"><span class="secno">13.1 </span>Resizing viewports</h3>
19041922

19051923
<p>Whenever a <a href="#viewport">viewport</a> has its width or height changed (e.g. as a result of the user resizing the browser window, or changing the <a href="#page-zoom">page
19061924
zoom</a> scale factor, or an <code title="">iframe</code> element's dimensions are changed), the user agent must <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a>
@@ -1909,7 +1927,7 @@ <h3 id="resizing-viewports"><span class="secno">12.1 </span>Resizing viewports</
19091927
<a href="#viewport">viewport</a>. If such a resize is ongoing over a period of time, the user agent must <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task" title="queue a task">queue</a> that
19101928
task at a user-agent-defined interval while the resize is ongoing. <!--fingerprint--> <!-- e.g. if you change the width of an iframe with a transition -->
19111929

1912-
<h3 id="scrolling-0"><span class="secno">12.2 </span>Scrolling</h3>
1930+
<h3 id="scrolling-0"><span class="secno">13.2 </span>Scrolling</h3>
19131931

19141932
<p>Whenever a <a href="#viewport">viewport</a> gets scrolled in response to user interaction, the user agent must <a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> to
19151933
<a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-event-fire" title="concept-event-fire">fire an event</a> named
@@ -1923,11 +1941,11 @@ <h3 id="scrolling-0"><span class="secno">12.2 </span>Scrolling</h3>
19231941
<a class="external" data-anolis-spec="html" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task" title="queue a task">queue</a> that task at a user-agent-defined interval while the scroll is ongoing. <!--fingerprint-->
19241942

19251943

1926-
<h2 id="css-properties"><span class="secno">13 </span>CSS properties</h2>
1944+
<h2 id="css-properties"><span class="secno">14 </span>CSS properties</h2>
19271945

19281946
<p class="issue">The features in this section should be moved to some other specification.
19291947

1930-
<h3 id="smooth-scrolling:-the-'scroll-behavior'-property"><span class="secno">13.1 </span>Smooth Scrolling: The 'scroll-behavior' Property</h3>
1948+
<h3 id="smooth-sc B43F rolling:-the-'scroll-behavior'-property"><span class="secno">14.1 </span>Smooth Scrolling: The 'scroll-behavior' Property</h3>
19311949

19321950
<pre class="propdef">Name: <dfn id="scroll-behavior">scroll-behavior</dfn>
19331951
Value: instant | smooth

cssom-view/Overview.src.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1433,6 +1433,23 @@ <h2>Extensions to the <code title>HTMLElement</code> Interface</h2>
14331433
that apply to the element and its ancestors.</p></li>
14341434
</ol>
14351435

1436+
1437+
<h2>Excensions to the <code title>HTMLImageElement</code> Interface</h2>
1438+
1439+
<pre class=idl>partial interface <span data-anolis-spec=html>HTMLImageElement</span> {
1440+
readonly attribute double <span title=dom-HTMLImageElement-x>x</span>;
1441+
readonly attribute double <span title=dom-HTMLImageElement-y>y</span>;
1442+
};</pre>
1443+
1444+
<p>The <dfn title=dom-HTMLImageElement-x><code>x</code></dfn> attribute, on getting, must return the x-coordinate of the left <span>border edge</span> of the
1445+
first <span>CSS layout box</span> associated with the element, relative to the <span>initial containing block</span> origin, ignoring any
1446+
<span>transforms</span> that apply to the element and its ancestors.
1447+
1448+
<p>The <dfn title=dom-HTMLImageElement-y><code>y</code></dfn> attribute, on getting, must return the y-coordinate of the top <span>border edge</span> of the
1449+
first <span>CSS layout box</span> associated with the element, relative to the <span>initial containing block</span> origin, ignoring any
1450+
<span>transforms</span> that apply to the element and its ancestors.
1451+
1452+
14361453
<h2>Extensions to the <code title>Range</code> Interface</h2>
14371454

14381455
<p>The objects the methods described below return must

0 commit comments

Comments
 (0)