From 9ddf19d8c43cc0751876ccee55fd2933dd7f7973 Mon Sep 17 00:00:00 2001 From: Jihye Hong Date: Mon, 23 Sep 2019 17:36:38 +0900 Subject: [PATCH] [css-nav-1] Simplify the description of processing model Hide the description related to css property (`spatial-navigation-action`) from the processing model by option --- css-nav-1/Overview.bs | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/css-nav-1/Overview.bs b/css-nav-1/Overview.bs index dfdca5b552f..d1fa8bd53ff 100644 --- a/css-nav-1/Overview.bs +++ b/css-nav-1/Overview.bs @@ -972,15 +972,17 @@ To run the spatial navigation steps in direction, do the f set eventTarget be the body element if it is not null or to the document element otherwise. 4. - * If searchOrigin is scroll container + * If searchOrigin is scroll container and the computed value of the 'spatial-navigation-action' property on searchOrigin is ''spatial-navigation-action/scroll'' and searchOrigin [=can be manually scrolled=], - then [=directionally scroll the element=] searchOrigin and return. - * Else, if searchOrigin is either a scroll container or the document + then [=directionally scroll the element=] searchOrigin and return. + * Else, if searchOrigin is either a scroll container or the document 1. Let candidates be the result of finding focusable areas within searchOrigin - with the argument visibleOnly set to false if computed value of the 'spatial-navigation-action' property on searchOrigin + with the argument visibleOnly set to false + if computed value of the 'spatial-navigation-action' property on searchOrigin is ''spatial-navigation-action/focus'' or to true otherwise. + 2. * If candidates contains at least 1 item: 1. Let bestCandidate be the result of selecting the best candidate @@ -993,23 +995,26 @@ To run the spatial navigation steps in direction, do the f and return if the result is false. 3. Run the focusing steps for bestCandidate and return - * Else if the computed value of the 'spatial-navigation-action' property on eventTarget is not ''spatial-navigation-action/focus'' + * Else if the computed value of the 'spatial-navigation-action' property on eventTarget is not ''spatial-navigation-action/focus'' and eventTarget can be manually scrolled, - then directionally scroll the element eventTarget in direction and return. + then directionally scroll the element eventTarget in direction and return. * Else, fallback to the next step. * Else, fallback to the next step. 5. Let container be the nearest ancestor of eventTarget that is a spatial navigation container. 6. Loop: Let candidates be the result of finding focusable areas within container with the argument visibleOnly set to false + if computed value of the 'spatial-navigation-action' property on container is ''spatial-navigation-action/focus'' or to true otherwise, excluding searchOrigin + 7. If candidates is empty: - * If the computed value of the 'spatial-navigation-action' property on container is not ''spatial-navigation-action/focus'' + * If the computed value of the 'spatial-navigation-action' property on container is not ''spatial-navigation-action/focus'' and container is a scroll container that can be manually scrolled, directionally scroll the element container in direction and return. - * Else, + + * Else, 1. If navigation-override is enabled in the [=node document=] of eventTarget for the origin of the [=active document=] of the [=top-level browsing context=], then fire an event named navnotarget at eventTarget using {{NavigationEvent}} with: * {{NavigationEvent/dir}} set to direction