-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
1. Modify the making the set of "insiders" in selecting the best candidate steps: 1) From the search origin, fully overlapped elements and partially overlapped elements depending on the requested direction are included in the "insiders" 2) Element which aren't overlapped with the search origin is "outsiders" (*outsider isn't specified in the spec) 2. Modify the selecting the best candidate steps as 1) find the closest element among "insiders" 1-1) if there is one, it is the best candidate 1-2) else fall back to the next step 2) find the closest element among "outsiders" using distance function (https://drafts.csswg.org/css-nav-1/#find-the-shortest-distance) Related to : w3c#4483
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1167,12 +1167,15 @@ run the following steps: | |
1. If <var>candidates</var> is <a spec=infra for=set>empty</a>, return <code>null</code> | ||
2. If <var>candidates</var> contains a single item, return that item | ||
3. Let <var>insiders</var> be the subset of <var>candidates</var> | ||
* If <var>searchOrigin</var> is the <a>spatial navigation container</a>, whose <a>boundary box</a>'s | ||
* top edge is below the top edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/down}} | ||
* bottom edge is above the bottom edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/up}} | ||
* right edge is left of the right edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/left}} | ||
* left edge is right of the left edge of <a>inside area</a> of <var>searchOrigin</var> if <var>dir</var> is {{SpatialNavigationDirection/right}} | ||
* Else, whose boundary box fully overlaps with <a>inside area</a> of <var>searchOrigin</var>. | ||
* whose boundary box fully overlaps with <a>inside area</a> of <var>searchOrigin</var> | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jihyerish
Owner
|
||
* whose boundary box partially overlaps with <a>inside area</a> of <var>searchOrigin</var> as | ||
* top edge is below the top edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/down}} | ||
This comment has been minimized.
Sorry, something went wrong.
hugoholgersson
|
||
* bottom edge is above the bottom edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/up}} | ||
* right edge is left of the right edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/left}} | ||
* left edge is right of the left edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/right}} | ||
|
||
NOTE: More detail condition about how the element is overlapped with the search origin affects the sequence of focus movement. | ||
The sequence of focus movement is related to UX, so it depends on the UA-defined mechanism. | ||
|
||
Note: this sub-setting is necessary to avoid going in the opposite direction than the one requested. | ||
4. | ||
|
@@ -1196,14 +1199,6 @@ run the following steps: | |
* bottom edge is above the top edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/up}} | ||
* right edge is left of the left edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/left}} | ||
* left edge is right of the right edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/right}} | ||
* the item partially overlaps with <var>searchOrigin</var> and its <a>boundary box</a>'s | ||
* top edge is below the top edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/down}} | ||
* bottom edge is above the bottom edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/up}} | ||
* right edge is left of the right edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/left}} | ||
* left edge is right of the left edge of <var>searchOrigin</var>'s <a>boundary box</a> if <var>dir</var> is {{SpatialNavigationDirection/right}} | ||
|
||
NOTE: More detail condition about how the element is overlapped with the search origin affects the sequence of focus movement. | ||
The sequence of focus movement is related to UX, so it depends on the UA-defined mechanism. | ||
|
||
2. For each <var ignore="">candidate</var> in <var>candidates</var>, | ||
[=find the shortest distance=] between <var>searchOrigin</var>. | ||
|
Sounds like you want to add OR after this line?