Skip to content

Commit 04e6285

Browse files
author
Jihye Hong
committed
[css-nav-1] Define the inside area in general
Define "inside area" in general and use that term elsewhere.
1 parent bd87af6 commit 04e6285

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

css-nav-1/Overview.bs

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,9 +1066,14 @@ including all graphical transformations, such as <a>relative positioning</a> or
10661066

10671067
The <dfn>boundary box</dfn> of an object is defined as follows:
10681068
* if the object is a point, the boundary box is that point
1069-
* if the object is a [=box=] or [=box fragment=], the boundary box is the <a>border box</a> of that box or fragment.
1069+
* if the object is a [=box=] or [=box fragment=], the boundary box is the <a>border box</a> of that box or fragment
10701070
* if the object is a <a>focusable area</a> which is not an element, the boundary box is the axis-aligned the bounding box of that <a>focusable area</a>
10711071

1072+
The <dfn>inside area </dfn> of an object is defined as follows:
1073+
* if the object is a <a>scroll container</a>, its <a>optimal viewing region</a>
1074+
* if the object is a <a>document</a>, the viewport of its <a>browsing context</a>
1075+
* otherwise, the <a>optimal viewing region</a> of its nearest ancestor <a>scroll container</a>
1076+
10721077
Issue(w3c/csswg-drafts#2324): CSS should have a term for “border box taking into account corner shaping properties like border-radius”.
10731078

10741079
<div algorithm="to find focusable areas">
@@ -1087,13 +1092,9 @@ run the following steps:
10871092
return <var>focusables</var>.
10881093

10891094
Note: <var>focusables</var> may be empty
1090-
4. Let <var>insideArea</var> be
1091-
* the <a>optimal viewing region</a> of <var>C</var> if <var>C</var> is a <a>scroll container</a>,
1092-
* the viewport of <var>C</var>'s <a for="/">browsing context</a> if <var>C</var> is a <a>Document</a>,
1093-
* the <a>optimal viewing region</a> of <var>C</var>'s nearest ancestor <a>scroll container</a> otherwise.
1094-
5. Let <var>visibles</var> be the subset of items in <var>focusables</var>
1095+
4. Let <var>visibles</var> be the subset of items in <var>focusables</var>
10951096
whose <a>boundary box</a>
1096-
is at least partly within <var>insideArea</var>.
1097+
is at least partly within the <a>inside area</a> of <var>C</var>.
10971098

10981099
<div class="advisement non-normative">
10991100
Except for elements that are in the currently non visible part of a scroller,
@@ -1109,7 +1110,7 @@ run the following steps:
11091110
or the <a href="https://github.com/WICG/inert"><code>inert</code></a> attribute.
11101111
</div>
11111112

1112-
6. Return <var>visibles</var>.
1113+
5. Return <var>visibles</var>.
11131114

11141115
Note: <var>visibles</var> may be empty
11151116

@@ -1125,25 +1126,21 @@ run the following steps:
11251126

11261127
1. If <var>candidates</var> is <a spec=infra for=set>empty</a>, return <code>null</code>
11271128
2. If <var>candidates</var> contains a single item, return that item
1128-
3. Let <var>insideArea</var> be
1129-
* the <a>optimal viewing region</a> of <var>searchOrigin</var> if <var>searchOrigin</var> is a <a>scroll container</a>,
1130-
* the viewport if <var>searchOrigin</var> is a <a>Document</a>,
1131-
* the <a>optimal viewing region</a> of <var>searchOrigin</var>’s nearest ancestor <a>scroll container</a> otherwise.
1132-
4. Let <var>insiders</var> be the subset of <var>candidates</var>
1129+
3. Let <var>insiders</var> be the subset of <var>candidates</var>
11331130
whose <a>boundary box</a>'s
1134-
* top edge is below the top edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1135-
* bottom edge is above the bottom edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1136-
* right edge is left of the right edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1137-
* left edge is right of the left edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1131+
* top edge is below the top edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1132+
* bottom edge is above the bottom edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1133+
* right edge is left of the right edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1134+
* left edge is right of the left edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
11381135

11391136
Note: this sub-setting is necessary to avoid going in the opposite direction than the one requested.
1140-
5.
1137+
4.
11411138
* If <var>insiders</var> is non empty,
11421139
1. Let <var>closest subset</var> be the subset of <var>insiders</var> whose <a>boundary box</a>'s
1143-
* top edge is closest to the top edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1144-
* bottom edge is closest to the bottom edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1145-
* right edge is closest to the right edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1146-
* left edge is closest to the left edge of <var>insideArea</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
1140+
* top edge is closest to the top edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/down}}
1141+
* bottom edge is closest to the bottom edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/up}}
1142+
* right edge is closest to the right edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/left}}
1143+
* left edge is closest to the left edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/right}}
11471144
2. If <var>closest subset</var> contains a single item,
11481145
return that item,
11491146
else return the first item of <var>closest subset</var> in document order,

0 commit comments

Comments
 (0)