From 4de41241a5824e49099db8f5c4056f499429ae13 Mon Sep 17 00:00:00 2001 From: rubberyuzu Date: Mon, 29 May 2023 10:08:44 +0000 Subject: [PATCH] Adding final step to mask cross-origin rebase rebase Fix modal check in dialog closing algorithm The value for is modal needs to be cached. This was pointed out here: https://github.com/whatwg/html/pull/9178#issuecomment-1577501107. --- source | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/source b/source index 7dc013c5e56..4bc2419bd91 100644 --- a/source +++ b/source @@ -60726,6 +60726,9 @@ interface HTMLDialogElement : HTMLElement {
  • Let wasModal be the value of subject's is modal flag.

  • +
  • Let wasModal be the value of subject's is + modal flag.

  • +
  • Set the is modal flag of subject to false.

  • If result is not null, then set the

  • +

    To build NotRestoredReasons object for page given Document state + documentState: +

      +
    1. Assert: documentState's document's node navigable is a + top-level traversable.

    2. + +
    3. Build NotRestoredReasons object for document given documentState's + document.

    4. + +
    5. Count the number of documentState's document's descendant navigables whose + origin is not same origin with + documentState's document.

      + +
        +
      1. Let crossOriginDescendants be an empty list.

      2. + +
      3. For each navigable of + documentState's document's + descendant navigables:

        +
          +
        1. If navigable's active document's + origin is not same origin with + documentState's document, then append navigable to + crossOriginDescendants.

        2. +
        +
      4. + +
      5. Set crossOriginCount be crossOriginDescendants's size.

      6. +
      +
    6. + +
    7. Let randomIndex be a randomly selected integer from 0 to + crossOriginCount-1.

    8. + +
    9. Let index be 0.

    10. + +
    11. For each crossOriginDescendants:

      +
        +
      1. Let reasonsForCrossOriginChild be navigable's active document's document state's notRestoredReasons.

      2. + +
      3. Set reasonsForCrossOriginChild's url to null.

      4. + +
      5. Set reasonsForCrossOriginChild's url be null.

      6. + +
      7. Set reasonsForCrossOriginChild's reasons be null.

      8. + +
      9. Set reasonsForCrossOriginChild's children be null.

      10. +
      +
    12. +
    + + +

    To build NotRestoredReasons object for page given Document state documentState: