From 9d2a8154c60ad489c779153a000d97a1f4ffbbd3 Mon Sep 17 00:00:00 2001 From: Takayoshi Kochi Date: Thu, 12 Jul 2018 05:15:52 +0900 Subject: [PATCH] Remove sentences about documents with no focusable area The PR #3647 removed "control group" concept, and most of them were converted to Document. The "control group" could be empty when e.g. no focusable element in a dialog element, but for a document without any focusable element, its viewport is still focusable. Removes sentences talking about such a non-existent Document condition. Fixes #3675. --- source | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/source b/source index 8f14f7abc45..bd5ccc6cd71 100644 --- a/source +++ b/source @@ -72545,8 +72545,7 @@ END:VCARD

One focusable area in each Document is designated the focused area of the document. Which control is so designated changes over time, based on algorithms - in this specification. If a Document has no focusable area, it has no - focused area.

+ in this specification.

Focusable areas in a Document @@ -72969,16 +72968,11 @@ END:VCARD


-

When a focusable area is added to an empty Document, it must be - designated the focused area of the document.

-

Focus fixup rule: When the designated focused area of the document is removed from that Document in some way (e.g. it stops being a focusable area, it is removed from the DOM, it becomes - expressly inert, etc.), and the Document is still not empty: designate - the Document's viewport to be the new focused area of the - document. If such a removal instead results in the Document being empty, then - there is simply no longer a focused area of the document.

+ expressly inert, etc.), designate the Document's viewport + to be the new focused area of the document.

For example, this might happen because an element is removed from its Document, or has a hidden attribute added. It might @@ -73175,30 +73169,23 @@ END:VCARD target, are as follows:

    -
  1. Let candidate be the Document of the top-level browsing context.

  2. -
  3. If candidate is target, return true.

  4. -
  5. +

    While true:

    -

    If candidate is non-empty, and the - designated focused area of the document is a browsing context - container with a non-null nested browsing context, and the active - document of that browsing context container's nested browsing - context is target, then return true.

    - -

    Otherwise, if candidate is non-empty, and the - designated focused area of the document is a browsing context - container with a non-null nested browsing context, then let - candidate be the active document of that browsing context - container's nested browsing context, and redo this step.

    +
      +
    1. If candidate is target, then return true.

    2. -

      Otherwise, return false.

      +
    3. If the focused area of + candidate is a browsing context container with a non-null nested + browsing context, then set candidate to the active document of + that browsing context container's nested browsing context.

    4. +
    5. Otherwise, return false.

    6. +
  6. -
@@ -73489,13 +73476,8 @@ END:VCARD getter must run these steps:

    -
  1. Let candidate be this Document object.

  2. - -
  3. If candidate is not empty, then set candidate to the designated - focused area of the document.

  4. - -
  5. If candidate is a focusable area, then set candidate to - candidate's DOM anchor.

  6. +
  7. Let candidate be the DOM anchor of the focused area of this Document object.

  8. If candidate is not a Document object, then return candidate.