Skip to content

Commit dacef90

Browse files
author
Simon Pieters
committed
[cssom] Define when scroll and resize fire. https://www.w3.org/Bugs/Public/show_bug.cgi?id=11329
1 parent 5b0ebd7 commit dacef90

2 files changed

Lines changed: 56 additions & 4 deletions

File tree

cssom-view/Overview.html

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<h1 id="cssom-view-module">CSSOM View Module</h1>
1515

16-
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 8 May 2013</h2>
16+
<h2 class="no-num no-toc" id="w3c-doctype">Editor's Draft 14 May 2013</h2>
1717

1818
<dl>
1919

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

72-
<p>This is the 8 May 2013 Editor's Draft of CSSOM View. Please send
72+
<p>This is the 14 May 2013 Editor's Draft of CSSOM View. Please send
7373
comments to
7474
<a href="mailto:www-style@w3.org?subject=%5Bcssom-view%5D%20">www-style@w3.org</a>
7575
(<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>)
@@ -126,6 +126,10 @@ <h2 class="no-num no-toc" id="toc">Table of Contents</h2>
126126
<ol class="toc">
127127
<li><a href="#the-clientrectlist-interface"><span class="secno">10.1 </span>The <code title="">ClientRectList</code> Interface</a></li>
128128
<li><a href="#the-clientrect-interface"><span class="secno">10.2 </span>The <code title="">ClientRect</code> Interface</a></ol></li>
129+
<li><a href="#events"><span class="secno">11 </span>Events</a>
130+
<ol class="toc">
131+
<li><a href="#resizing-viewports"><span class="secno">11.1 </span>Resizing viewports</a></li>
132+
<li><a href="#scrolling"><span class="secno">11.2 </span>Scrolling</a></ol></li>
129133
<li><a class="no-num" href="#references">References</a>
130134
<ol class="toc">
131135
<li><a class="no-num" href="#normative-references">Normative references</a></ol></li>
@@ -815,7 +819,31 @@ <h3 id="the-clientrect-interface"><span class="secno">10.2 </span>The <code titl
815819
<p>The <code><a href="#widl-ClientRect-height">height</a></code> attribute must return the height of the rectangle box.</p> <p class="note">This is identical to <code title="widl-ClientRect-bottom">bottom</code> minus <code title="widl-ClientRect-top">top</code>.</dd>
816820
</dl>
817821

818-
822+
823+
<h2 id="events"><span class="secno">11 </span>Events</h2>
824+
825+
<h3 id="resizing-viewports"><span class="secno">11.1 </span>Resizing viewports</h3>
826+
827+
<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 zooming in, or an
828+
<code>iframe</code> element's dimensions are changed), the user agent must <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> to
829+
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-event-fire" title="concept-event-fire">fire</a> a <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-events-trusted" title="concept-events-trusted">trusted</a> event named
830+
<code>resize</code> that does not bubble and is not cancelable at the <code class="external"><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#window">Window</a></code> object associated with that
831+
<a href="#viewport">viewport</a>.
832+
833+
<h3 id="scrolling"><span class="secno">11.2 </span>Scrolling</h3>
834+
835+
<p>Whenever a <a href="#viewport">viewport</a> gets scrolled in response to user interaction, the user agent must <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> to
836+
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-event-fire" title="concept-event-fire">fire</a> a <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-events-trusted" title="concept-events-trusted">trusted</a> event named
837+
<code><a href="#widl-Window-scroll">scroll</a></code> that bubbles but is not cancelable at the <code class="external"><a href="http://dom.spec.whatwg.org/#document">Document</a></code> object associated with that <a href="#viewport">viewport</a>.
838+
839+
<p class="issue">Do viewports have associated documents?</p>
840+
841+
<p>Whenever an element gets scrolled in response to user interaction, the user agent must <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#queue-a-task">queue a task</a> to
842+
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-event-fire" title="concept-event-fire">fire</a> a <a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#concept-events-trusted" title="concept-events-trusted">trusted</a> event named
843+
<code><a href="#widl-Window-scroll">scroll</a></code> that does not bubble and is not cancelable at the element.
844+
845+
<p class="issue">Should we specify that scroll events can be throttled (e.g. in a smooth scroll)?</p>
846+
819847
<h2 class="no-num" id="references">References</h2>
820848
<h3 class="no-num" id="normative-references">Normative references</h3>
821849
<div id="anolis-references-normative"><dl><dt id="refsCSSOM">[CSSOM]

cssom-view/cssom-view-source

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,31 @@ out of memory, or to work around platform-specific limitations.
384384
<h3 id="the-clientrect-interface">The <code title>ClientRect</code> Interface</h3>
385385

386386
<!--{@idl(ClientRect)}-->
387-
387+
388+
<h2>Events</h2>
389+
390+
<h3>Resizing viewports</h3>
391+
392+
<p>Whenever a <span>viewport</span> has its width or height changed (e.g. as a result of the user resizing the browser window, or zooming in, or an
393+
<code>iframe</code> element's dimensions are changed), the user agent must <span data-anolis-spec=html>queue a task</span> to
394+
<span data-anolis-spec=html title=concept-event-fire>fire</span> a <span data-anolis-spec=html title=concept-events-trusted>trusted</span> event named
395+
<code>resize</code> that does not bubble and is not cancelable at the <code data-anolis-spec=html>Window</code> object associated with that
396+
<span>viewport</span>.
397+
398+
<h3>Scrolling</h3>
399+
400+
<p>Whenever a <span>viewport</span> gets scrolled in response to user interaction, the user agent must <span data-anolis-spec=html>queue a task</span> to
401+
<span data-anolis-spec=html title=concept-event-fire>fire</span> a <span data-anolis-spec=html title=concept-events-trusted>trusted</span> event named
402+
<code>scroll</code> that bubbles but is not cancelable at the <code data-anolis-spec=dom>Document</code> object associated with that <span>viewport</span>.
403+
404+
<p class=issue>Do viewports have associated documents?</p>
405+
406+
<p>Whenever an element gets scrolled in response to user interaction, the user agent must <span data-anolis-spec=html>queue a task</span> to
407+
<span data-anolis-spec=html title=concept-event-fire>fire</span> a <span data-anolis-spec=html title=concept-events-trusted>trusted</span> event named
408+
<code>scroll</code> that does not bubble and is not cancelable at the element.
409+
410+
<p class=issue>Should we specify that scroll events can be throttled (e.g. in a smooth scroll)?</p>
411+
388412
<h2 class=no-num>References</h2>
389413
<h3 class=no-num>Normative references</h3>
390414
<div id=anolis-references-normative></div>

0 commit comments

Comments
 (0)