8000 [cssom-view] Remove pageX/Y, x/y, offsetX/Y from MouseEventInit. Defi… · w3c/csswg-drafts@00f8f0b · GitHub
Skip to content

Commit 00f8f0b

Browse files
author
Simon Pieters
committed
[cssom-view] Remove pageX/Y, x/y, offsetX/Y from MouseEventInit. Define their values prior to dispatch. https://www.w3.org/Bugs/Public/show_bug.cgi?id=16673
1 parent b1441b1 commit 00f8f0b

2 files changed

Lines changed: 68 additions & 38 deletions

File tree

cssom-view/Overview.html

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
<h1>CSSOM View Module</h1>
2727

28-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 17 June 2013</h2>
28+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 18 June 2013</h2>
2929

3030
<dl>
3131

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

95-
<p>This is the 17 June 2013 Editor's Draft of CSSOM View. Please send
95+
<p>This is the 18 June 2013 Editor's Draft of CSSOM View. Please send
9696
comments to
9797
<a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
9898
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
@@ -1344,14 +1344,8 @@ <h2 id="extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Ex
13441344
partial dictionary <a href="#mouseeventinit">MouseEventInit</a> {
13451345
double screenX = 0;
13461346
double screenY = 0;
1347-
double pageX = 0;
1348-
double pageY = 0;
13491347
double clientX = 0;
13501348
double clientY = 0;
1351-
double x = 0;
1352-
double y = 0;
1353-
double offsetX = 0;
1354-
double offsetY = 0;
13551349
};</pre>
13561350

13571351
<p>The <dfn id="dom-mouseevent-screenx" title="dom-MouseEvent-screenX"><code>screenX</code></dfn> attribute must return the x-coordinate of
@@ -1362,13 +1356,25 @@ <h2 id="extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Ex
13621356
the position where the event occurred relative to the origin of the
13631357
screen.</p>
13641358

1365-
<p>The <dfn id="dom-mouseevent-pagex" title="dom-MouseEvent-pageX"><code>pageX</code></dfn> attribute must return the horizontal coordinate of
1366-
the position where the event occurred relative to
1367-
the origin of the <a href="#initial-containing-block">initial containing block</a>.</p>
1359+
<p>The <dfn id="dom-mouseevent-pagex" title="dom-MouseEvent-pageX"><code>pageX</code></dfn> attribute must follow these steps:
13681360

1369-
<p>The <dfn id="dom-mouseevent-pagey" title="dom-MouseEvent-pageY"><code>pageY</code></dfn> attribute must return the y-coordinate of the
1370-
position where the event occurred relative to the origin of the
1371-
<a href="#initial-containing-block">initial containing block</a>.</p>
1361+
<ol>
1362+
<li><p>If the event's <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#dispatch-flag">dispatch flag</a> is set, return the horizontal coordinate of the position where the event occurred
1363+
relative to the origin of the <a href="#initial-containing-block">initial containing block</a> and terminate these steps.
1364+
<li><p>Let <var>offset</var> be the value of the <code title="dom-Window-scrollX"><a href="#dom-window-scrollx">scrollX</a></code> attribute of the event's associated
1365+
<code class="external" data-anolis-spec="html"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a></code> object, if there is one, or zero otherwise.
1366+
<li><p>Return the sum of <var>offset</var> and the value of the event's <code title="dom-MouseEvent-clientX"><a href="#dom-mouseevent-clientx">clientX</a></code> attribute.
1367+
</ol>
1368+
1369+
<p>The <dfn id="dom-mouseevent-pagey" title="dom-MouseEvent-pageY"><code>pageY</code></dfn> attribute must follow these steps:
1370+
1371+
<ol>
1372+
<li><p>If the event's <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#dispatch-flag">dispatch flag</a> is set, return the vertical coordinate of the position where the event occurred
1373+
relative to the origin of the <a href="#initial-containing-block">initial containing block</a> and terminate these steps.
1374+
<li><p>Let <var>offset</var> be the value of the <code title="dom-Window-scrollX"><a href="#dom-window-scrollx">scrollX</a></code> attribute of the event's associated
1375+
<code class="external" data-anolis-spec="html"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a></code> object, if there is one, or zero otherwise.
1376+
<li><p>Return the sum of <var>offset</var> and the value of the event's <code title="dom-MouseEvent-clientY"><a href="#dom-mouseevent-clienty">clientY</a></code> attribute.
1377+
</ol>
13721378

13731379
<p>The <dfn id="dom-mouseevent-clientx" title="dom-MouseEvent-clientX"><code>clientX</code></dfn> attribute must return the x-coordinate of
13741380
the position where the event occurred relative to the origin of the
@@ -1382,13 +1388,22 @@ <h2 id="extensions-to-the-mouseevent-interface"><span class="secno">10 </span>Ex
13821388

13831389
<p>The <dfn id="dom-mouseevent-y" title="dom-MouseEvent-y"><code>y</code></dfn> attribute must return the value of <code title="dom-MouseEvent-clientY"><a href="#dom-mouseevent-clienty">clientY</a></code>.</p>
13841390

1385-
<p>The <dfn id="dom-mouseevent-offsetx" title="dom-MouseEvent-offsetX"><code>offsetX</code></dfn> attribute must return the x-coordinate of
1386-
the position where the event occurred relative to the origin of the
1387-
<a href="#padding-edge">padding edge</a> of the target node.</p>
1391+
<p>The <dfn id="dom-mouseevent-offsetx" title="dom-MouseEvent-offsetX"><code>offsetX</code></dfn> attribute must follow these steps:
1392+
1393+
<ol>
1394+
<li><p>If the event's <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#dispatch-flag">dispatch flag</a> is set, return the x-coordinate of the position where the event occurred relative to the
1395+
origin of the <a href="#padding-edge">padding edge</a> of the target node and terminate these steps.
1396+
<li><p>Return the value of the event's <code title="dom-MouseEvent-pageX"><a href="#dom-mouseevent-pagex">pageX</a></code> attribute.
1397+
</ol>
1398+
1399+
<p>The <dfn id="dom-mouseevent-offsety" title="dom-MouseEvent-offsetY"><code>offsetY</code></dfn> attribute must follow these steps:
1400+
1401+
<ol>
1402+
<li><p>If the event's <a class="external" data-anolis-spec="dom" href="http://dom.spec.whatwg.org/#dispatch-flag">dispatch flag</a> is set, return the y-coordinate of the position where the event occurred relative to the
1403+
origin of the <a href="#padding-edge">padding edge</a> of the target node and terminate these steps.
1404+
<li><p>Return the value of the event's <code title="dom-MouseEvent-pageY"><a href="#dom-mouseevent-pagey">pageY</a></code> attribute.
1405+
</ol>
13881406

1389-
<p>The <dfn id="dom-mouseevent-offsety" title="dom-MouseEvent-offsetY"><code>offsetY</code></dfn> attribute must return the y-coordinate of
1390-
the position where the event occurred relative to the origin of the
1391-
<a href="#padding-edge">padding edge</a> of the target node.</p>
13921407

13931408
<h2 id="rectangles"><span class="secno">11 </span>Rectangles</h2>
13941409

cssom-view/Overview.src.html

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,14 +1304,8 @@ <h2>Extensions to the <code title>MouseEvent</code> Interface</h2>
13041304
partial dictionary <span>MouseEventInit</span> {
13051305
double screenX = 0;
13061306
double screenY = 0;
1307-
double pageX = 0;
1308-
double pageY = 0;
13091307
double clientX = 0;
13101308
double clientY = 0;
1311-
double x = 0;
1312-
double y = 0;
1313-
double offsetX = 0;
1314-
double offsetY = 0;
13151309
};</pre>
13161310

13171311
<p>The <dfn title=dom-MouseEvent-screenX><code>screenX</code></dfn> attribute must return the x-coordinate of
@@ -1322,13 +1316,25 @@ <h2>Extensions to the <code title>MouseEvent</code> Interface</h2>
13221316
the position where the event occurred relative to the origin of the
13231317
screen.</p>
13241318

1325-
<p>The <dfn title=dom-MouseEvent-pageX><code>pageX</code></dfn> attribute must return the horizontal coordinate of
1326-
the position where the event occurred relative to
1327-
the origin of the <span>initial containing block</span>.</p>
1319+
<p>The <dfn title=dom-MouseEvent-pageX><code>pageX</code></dfn> attribute must follow these steps:
13281320

1329-
<p>The <dfn title=dom-MouseEvent-pageY><code>pageY</code></dfn> attribute must return the y-coordinate of the
1330-
position where the event occurred relative to the origin of the
1331-
<span>initial containing block</span>.</p>
1321+
<ol>
1322+
<li><p>If the event's <span data-anolis-spec=dom>dispatch flag</span> is set, return the horizontal coordinate of the position where the event occurred
1323+
relative to the origin of the <span>initial containing block</span> and terminate these steps.
1324+
<li><p>Let <var>offset</var> be the value of the <code title=dom-Window-scrollX>scrollX</code> attribute of the event's associated
1325+
<code data-anolis-spec=html>Window</code> object, if there is one, or zero otherwise.
1326+
<li><p>Return the sum of <var>offset</var> and the value of the event's <code title=dom-MouseEvent-clientX>clientX</code> attribute.
1327+
</ol>
1328+
1329+
<p>The <dfn title=dom-MouseEvent-pageY><code>pageY</code></dfn> attribute must follow these steps:
1330+
1331+
<ol>
1332+
<li><p>If the event's <span data-anolis-spec=dom>dispatch flag</span> is set, return the vertical coordinate of the position where the event occurred
1333+
relative to the origin of the <span>initial containing block</span> and terminate these steps.
1334+
<li><p>Let <var>offset</var> be the value of the <code title=dom-Window-scrollX>scrollX</code> attribute of the event's associated
1335+
<code data-anolis-spec=html>Window</code> object, if there is one, or zero otherwise.
1336+
<li><p>Return the sum of <var>offset</var> and the value of the event's <code title=dom-MouseEvent-clientY>clientY</code> attribute.
1337+
</ol>
13321338

13331339
<p>The <dfn title=dom-MouseEvent-clientX><code>clientX</code></dfn> attribute must return the x-coordinate of
13341340
the position where the event occurred relative to the origin of the
@@ -1342,13 +1348,22 @@ <h2>Extensions to the <code title>MouseEvent</code> Interface</h2>
13421348

13431349
<p>The <dfn title=dom-MouseEvent-y><code>y</code></dfn> attribute must return the value of <code title=dom-MouseEvent-clientY>clientY</code>.</p>
13441350

1345-
<p>The <dfn title=dom-MouseEvent-offsetX><code>offsetX</code></dfn> attribute must return the x-coordinate of
1346-
the position where the event occurred relative to the origin of the
1347-
<span>padding edge</span> of the target node.</p>
1351+
<p>The <dfn title=dom-MouseEvent-offsetX><code>offsetX</code></dfn> attribute must follow these steps:
1352+
1353+
<ol>
1354+
<li><p>If the event's <span data-anolis-spec=dom>dispatch flag</span> is set, return the x-coordinate of the position where the event occurred relative to the
1355+
origin of the <span>padding edge</span> of the target node and terminate these steps.
1356+
<li><p>Return the value of the event's <code title=dom-MouseEvent-pageX>pageX</code> attribute.
1357+
</ol>
1358+
1359+
<p>The <dfn title=dom-MouseEvent-offsetY><code>offsetY</code></dfn> attribute must follow these steps:
1360+
1361+
<ol>
1362+
<li><p>If the event's <span data-anolis-spec=dom>dispatch flag</span> is set, return the y-coordinate of the position where the event occurred relative to the
1363+
origin of the <span>padding edge</span> of the target node and terminate these steps.
1364+
<li><p>Return the value of the event's <code title=dom-MouseEvent-pageY>pageY</code> attribute.
1365+
</ol>
13481366

1349-
<p>The <dfn title=dom-MouseEvent-offsetY><code>offsetY</code></dfn> attribute must return the y-coordinate of
1350-
the position where the event occurred relative to the origin of the
1351-
<span>padding edge</span> of the target node.</p>
13521367

13531368
<h2>Rectangles</h2>
13541369

0 commit comments

Comments
 (0)
<