Skip to content

Commit 36310b5

Browse files
committed
Issue w3c#8: Define non-local bonudary default action
1 parent e349ced commit 36310b5

2 files changed

Lines changed: 31 additions & 13 deletions

File tree

index.bs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ url: https://drafts.csswg.org/css-overflow-3/#scroll-container
2121
url: https://www.w3.org/TR/uievents/#default-action
2222
type: dfn; text: default action
2323
type: dfn; text: default actions
24+
url: #local
25+
type: dfn; text: local boundary default action
26+
type: dfn; text: local boundary default actions
2427
url: https://dom.spec.whatwg.org/#dom-event-preventdefault
2528
type: dfn; text: preventDefault
2629
url: https://dom.spec.whatwg.org/#dom-eventtarget-addeventlistener
@@ -56,7 +59,7 @@ A <dfn>scroll chain</dfn> is the order in which scrolling is propagated from one
5659

5760
<dfn>Scroll boundary</dfn> refers to when the scroll position of a <a>scroll container</a> reaches the edge of the <a>scrollport<a>. If a scroll container has no potential to scroll, because it does not <a>overflow</a> in the direction of the scroll, the element is always considered to be at the scroll boundary.
5861

59-
<dfn>Boundary default action</dfn> refers to the user-agent-defined <a>default action</a> performed when scrolling against the edge of the <a>scrollport</a>. This may be scroll chaining, showing an overscroll affordance and/or performing a navigation action.
62+
<dfn>Boundary default action</dfn> refers to the user-agent-defined <a>default action</a> performed when scrolling against the edge of the <a>scrollport</a>. A <a>boundary default action</a> is said to be <dfn>local</dfn>, for example overscroll, if it is performed on the <a>scroll container</a> without interacting with the page. Conversely, a <dfn>non-local boundary default action</dfn> will interact with the page such as scroll chaining or a navigation action.
6063

6164
Overview {#overview}
6265
==========================
@@ -102,13 +105,13 @@ Values have the following meanings:
102105
<dl dfn-for="scroll-boundary-behavior, scroll-boundary-behavior-x, scroll-boundary-behavior-y" dfn-type="value">
103106
<dt><dfn>contain</dfn>
104107
<dd>
105-
This value indicates that the element must not perform <a>scroll chaining</a> to any ancestor along the scroll chain regardless of whether the scroll originated at this element or one of its descendants. This value must not modify the overscroll behavior.
108+
This value indicates that the element must not perform <a>non-local boundary default actions</a>. The user agent must not perform scholl chaining to any ancestors along the <a>scroll chain</a> regardless of whether the scroll originated at this element or one of its descendants. This value must not modify the behavior of how <a>local boundary default actions</a> should behave, such as overscroll behavior and navigation guestures.
106109
<dt><dfn>none</dfn>
107110
<dd>
108-
This value implies the same behavior as <a>contain</a> and in addition this element must also not show any overscroll affordances or perform any navigation guestures.
111+
This value implies the same behavior as <a>contain</a> and in addition this element must also not perform <a>local boundary default actions</a> such as showing any overscroll affordances or performing any navigation guestures.
109112
<dt><dfn>auto</dfn>
110113
<dd>
111-
This value indicates that the element should perform the usual <a>default action</a> with respect to both <a>scroll chaining</a>, overscroll and navigation guestures.
114+
This value indicates that the user agent should perform the usual <a>boundary default action</a> with respect to both <a>scroll chaining</a>, overscroll and navigation guestures.
112115
</dl>
113116

114117
Note: In the case where a user agent does not implement scroll chaining and overscroll affordances, these values will have no side effects for a compliant implementation.

index.html

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@
13661366
<div class="head">
13671367
<p data-fill-with="logo"></p>
13681368
<h1 class="p-name no-ref" id="title">CSS Scroll Boundary Behavior Module Level 1</h1>
1369-
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Draft Community Group Report, <time class="dt-updated" datetime="2017-05-05">5 May 2017</time></span></h2>
1369+
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Draft Community Group Report, <time class="dt-updated" datetime="2017-05-08">8 May 2017</time></span></h2>
13701370
<div data-fill-with="spec-metadata">
13711371
<dl>
13721372
<dt>This version:
@@ -1431,7 +1431,7 @@ <h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </s
14311431
<li data-md="">
14321432
<p>A non passive event listener will delay scrolling because the user agent will have to wait for the result of the event listener to determine if <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#dom-event-preventdefault">preventDefault</a> was called causing increased scroll latency.</p>
14331433
<li data-md="">
1434-
<p>When scrolling is performed near the edge of the <a data-link-type="dfn" href="#scroll-boundary" id="ref-for-scroll-boundary-1">scroll boundary</a><a data-link-type="dfn"> the </a><a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default action</a> may cause both scrolling to the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> and a <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-1">boundary default action</a>. Calling <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#dom-event-preventdefault">preventDefault</a> will not only cancel the <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-2">boundary default action</a> but also the scroll to the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a>.</p>
1434+
<p>When scrolling is performed near the edge of the <a data-link-type="dfn" href="#scroll-boundary" id="ref-for-scroll-boundary-1">scroll boundary</a><a data-link-type="dfn">, the </a><a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default action</a> may cause both scrolling to the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> and a <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-1">boundary default action</a>. Calling <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#dom-event-preventdefault">preventDefault</a> will not only cancel the <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-2">boundary default action</a> but also the scroll to the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a>.</p>
14351435
<li data-md="">
14361436
<p>The <a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default action</a> for the event may also provide additional behavior that the author does not want to cancel such as an overscroll affordance. <a data-link-type="dfn" href="https://dom.spec.whatwg.org/#dom-event-preventdefault">preventDefault</a> doesn’t allow the content author to cancel only some of the <a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default actions</a> such as scroll chaining.</p>
14371437
</ul>
@@ -1444,7 +1444,7 @@ <h2 class="heading settled" data-level="2" id="scroll-chaining-and-boundary-defa
14441444
<p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="scroll-chaining">Scroll chaining</dfn> is when scrolling is propagated from one <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> to an ancestor <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> following the <a data-link-type="dfn" href="#scroll-chain" id="ref-for-scroll-chain-2">scroll chain</a>. Typically scroll chaining is performed starting at the event target recursing up the <a data-link-type="dfn" href="https://www.w3.org/TR/css-display-3/#containing-block-chain">containing block chain</a>. When a <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> in this chain receives a scroll event or gesture it may act on it and/or pass it up the chain. Chaining typically occurs when the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a> has reached its boundary.</p>
14451445
<p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="scroll-chain">scroll chain</dfn> is the order in which scrolling is propagated from one <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> to another.</p>
14461446
<p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="scroll-boundary">Scroll boundary</dfn> refers to when the scroll position of a <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> reaches the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a><a data-link-type="dfn">. If a scroll container has no potential to scroll, because it does not </a><a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#overflow">overflow</a> in the direction of the scroll, the element is always considered to be at the scroll boundary.</p>
1447-
<p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="boundary-default-action">Boundary default action</dfn> refers to the user-agent-defined <a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default action</a> performed when scrolling against the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a>. This may be scroll chaining, showing an overscroll affordance and/or performing a navigation action.</p>
1447+
<p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="boundary-default-action">Boundary default action</dfn> refers to the user-agent-defined <a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default action</a> performed when scrolling against the edge of the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a>. A <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-3">boundary default action</a> is said to be <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="local">local</dfn>, for example overscroll, if it is performed on the <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> without interacting with the page. Conversely, a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport="" id="non-local-boundary-default-action">non-local boundary default action</dfn> will interact with the page such as scroll chaining or a navigation action.</p>
14481448
<h2 class="heading settled" data-level="3" id="overview"><span class="secno">3. </span><span class="content">Overview</span><a class="self-link" href="#overview"></a></h2>
14491449
<p>This module introduces control over the behavior of a <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> element when its <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scrollport">scrollport</a> reaches the boundary of its scroll box. It allows the content author to specify that a <a data-link-type="dfn" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">scroll container</a> element must prevent scroll chaining and/or overscroll affordances.</p>
14501450
<h2 class="heading settled" data-level="4" id="scroll-boundary-behavior-properties"><span class="secno">4. </span><span class="content">Scroll Boundary Behavior Properties</span><a class="self-link" href="#scroll-boundary-behavior-properties"></a></h2>
@@ -1520,14 +1520,14 @@ <h2 class="heading settled" data-level="4" id="scroll-boundary-behavior-properti
15201520
<p>Values have the following meanings:</p>
15211521
<dl>
15221522
<dt><dfn class="css" data-dfn-for="scroll-boundary-behavior, scroll-boundary-behavior-x, scroll-boundary-behavior-y" data-dfn-type="value" data-export="" id="valdef-scroll-boundary-behavior-contain">contain<a class="self-link" href="#valdef-scroll-boundary-behavior-contain"></a></dfn>
1523-
<dd> This value indicates that the element must not perform <a data-link-type="dfn" href="#scroll-chaining" id="ref-for-scroll-chaining-3">scroll chaining</a> to any ancestor along the scroll chain regardless of whether the scroll originated at this element or one of its descendants. This value must not modify the overscroll behavior.
1523+
<dd> This value indicates that the element must not perform <a data-link-type="dfn" href="#non-local-boundary-default-action" id="ref-for-non-local-boundary-default-action-1">non-local boundary default actions</a>. The user agent must not perform scholl chaining to any ancestors along the scroll chain regardless of whether the scroll originated at this element or one of its descendants. This value must not modify the behavior of how <a data-link-type="dfn" href="#local" id="ref-for-local-1">local boundary default actions</a> should behave, such as overscroll behavior and navigation guestures.
15241524
<dt><dfn class="css" data-dfn-for="scroll-boundary-behavior, scroll-boundary-behavior-x, scroll-boundary-behavior-y" data-dfn-type="value" data-export="" id="valdef-scroll-boundary-behavior-none">none<a class="self-link" href="#valdef-scroll-boundary-behavior-none"></a></dfn>
1525-
<dd> This value implies the same behavior as <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain">contain</a> and in addition this element must also not show any overscroll affordances or perform any navigation guestures.
1525+
<dd> This value implies the same behavior as <a data-link-type="dfn" href="https://infra.spec.whatwg.org/#list-contain">contain</a> and in addition this element must also not perform <a data-link-type="dfn" href="#local" id="ref-for-local-2">local boundary default actions</a> such as showing any overscroll affordances or performing any navigation guestures.
15261526
<dt><dfn class="dfn-paneled css" data-dfn-for="scroll-boundary-behavior, scroll-boundary-behavior-x, scroll-boundary-behavior-y" data-dfn-type="value" data-export="" id="valdef-scroll-boundary-behavior-auto">auto</dfn>
1527-
<dd> This value indicates that the element should perform the usual <a data-link-type="dfn" href="https://www.w3.org/TR/uievents/#default-action">default action</a> with respect to both <a data-link-type="dfn" href="#scroll-chaining" id="ref-for-scroll-chaining-4">scroll chaining</a>, overscroll and navigation guestures.
1527+
<dd> This value indicates that the user agent should perform the usual <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-4">boundary default action</a> with respect to both <a data-link-type="dfn" href="#scroll-chaining" id="ref-for-scroll-chaining-3">scroll chaining</a>, overscroll and navigation guestures.
15281528
</dl>
15291529
<p class="note" role="note"><span>Note:</span> In the case where a user agent does not implement scroll chaining and overscroll affordances, these values will have no side effects for a compliant implementation.</p>
1530-
<p class="note" role="note"><span>Note:</span> Programmatic scrolling is clamped and can not trigger any <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-3">boundary default actions</a>.</p>
1530+
<p class="note" role="note"><span>Note:</span> Programmatic scrolling is clamped and can not trigger any <a data-link-type="dfn" href="#boundary-default-action" id="ref-for-boundary-default-action-5">boundary default actions</a>.</p>
15311531
</main>
15321532
<div data-fill-with="conformance">
15331533
<h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
@@ -1681,7 +1681,9 @@ <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="c
16811681
<li><a href="#valdef-scroll-boundary-behavior-auto">auto</a><span>, in §4</span>
16821682
<li><a href="#boundary-default-action">Boundary default action</a><span>, in §2</span>
16831683
<li><a href="#valdef-scroll-boundary-behavior-contain">contain</a><span>, in §4</span>
1684+
<li><a href="#local">local</a><span>, in §2</span>
16841685
<li><a href="#valdef-scroll-boundary-behavior-none">none</a><span>, in §4</span>
1686+
<li><a href="#non-local-boundary-default-action">non-local boundary default action</a><span>, in §2</span>
16851687
<li><a href="#scroll-boundary">Scroll boundary</a><span>, in §2</span>
16861688
<li><a href="#propdef-scroll-boundary-behavior">scroll-boundary-behavior</a><span>, in §4</span>
16871689
<li><a href="#propdef-scroll-boundary-behavior-x">scroll-boundary-behavior-x</a><span>, in §4</span>
@@ -1775,7 +1777,7 @@ <h2 class="no-num no-ref heading settled" id="property-index"><span class="conte
17751777
<b><a href="#scroll-chaining">#scroll-chaining</a></b><b>Referenced in:</b>
17761778
<ul>
17771779
<li><a href="#ref-for-scroll-chaining-1">1. Introduction</a> <a href="#ref-for-scroll-chaining-2">(2)</a>
1778-
<li><a href="#ref-for-scroll-chaining-3">4. Scroll Boundary Behavior Properties</a> <a href="#ref-for-scroll-chaining-4">(2)</a>
1780+
<li><a href="#ref-for-scroll-chaining-3">4. Scroll Boundary Behavior Properties</a>
17791781
</ul>
17801782
</aside>
17811783
<aside class="dfn-panel" data-for="scroll-chain">
@@ -1795,7 +1797,20 @@ <h2 class="no-num no-ref heading settled" id="property-index"><span class="conte
17951797
<b><a href="#boundary-default-action">#boundary-default-action</a></b><b>Referenced in:</b>
17961798
<ul>
17971799
<li><a href="#ref-for-boundary-default-action-1">1. Introduction</a> <a href="#ref-for-boundary-default-action-2">(2)</a>
1798-
<li><a href="#ref-for-boundary-default-action-3">4. Scroll Boundary Behavior Properties</a>
1800+
<li><a href="#ref-for-boundary-default-action-3">2. Scroll chaining and boundary default actions</a>
1801+
<li><a href="#ref-for-boundary-default-action-4">4. Scroll Boundary Behavior Properties</a> <a href="#ref-for-boundary-default-action-5">(2)</a>
1802+
</ul>
1803+
</aside>
1804+
<aside class="dfn-panel" data-for="local">
1805+
<b><a href="#local">#local</a></b><b>Referenced in:</b>
1806+
<ul>
1807+
<li><a href="#ref-for-local-1">4. Scroll Boundary Behavior Properties</a> <a href="#ref-for-local-2">(2)</a>
1808+
</ul>
1809+
</aside>
1810+
<aside class="dfn-panel" data-for="non-local-boundary-default-action">
1811+
<b><a href="#non-local-boundary-default-action">#non-local-boundary-default-action</a></b><b>Referenced in:</b>
1812+
<ul>
1813+
<li><a href="#ref-for-non-local-boundary-default-action-1">4. Scroll Boundary Behavior Properties</a>
17991814
</ul>
18001815
</aside>
18011816
<aside class="dfn-panel" data-for="propdef-scroll-boundary-behavior-x">

0 commit comments

Comments
 (0)