⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 236517 in webkit


Ignore:
Timestamp:
Sep 26, 2018, 12:29:54 PM (8 years ago)
Author:
Chris Dumez
Message:

Ignore-opens-during-unload counter of a parent should apply to its children during beforeunload event
https://bugs.webkit.org/show_bug.cgi?id=189376
<rdar://problem/44282754>

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline existing test now that one more check is passing.

  • web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window-expected.txt:

Source/WebCore:

Make sure the Ignore-opens-during-unload counter of a parent stays incremented while we are firing the
beforeunload event for its descendants, as per:

No new tests, rebaselined existing tests.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r236478 r236517  
     12018-09-26  Chris Dumez  <cdumez@apple.com>
     2
     3        Ignore-opens-during-unload counter of a parent should apply to its children during beforeunload event
     4        https://bugs.webkit.org/show_bug.cgi?id=189376
     5        <rdar://problem/44282754>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Rebaseline existing test now that one more check is passing.
     10
     11        * web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window-expected.txt:
     12
    1132018-09-25  YUHAN WU  <yuhan_wu@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window-expected.txt

    r236405 r236517  
    33
    44PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (in top-level browsing context)
    5 FAIL document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading parent and child) assert_not_equals: got disallowed value 0
     5PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading parent and child)
    66PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading child only)
    77PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during pagehide event (in top-level browsing context)
  • trunk/Source/WebCore/ChangeLog

    r236516 r236517  
     12018-09-26  Chris Dumez  <cdumez@apple.com>
     2
     3        Ignore-opens-during-unload counter of a parent should apply to its children during beforeunload event
     4        https://bugs.webkit.org/show_bug.cgi?id=189376
     5        <rdar://problem/44282754>
     6
     7        Reviewed by Ryosuke Niwa.
     8
     9        Make sure the Ignore-opens-during-unload counter of a parent stays incremented while we are firing the
     10        beforeunload event for its descendants, as per:
     11        - https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document
     12
     13        No new tests, rebaselined existing tests.
     14
     15        * loader/FrameLoader.cpp:
     16        (WebCore::FrameLoader::shouldClose):
     17        (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
     18
    1192018-09-26  Justin Fan  <justin_fan@apple.com>
    220
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r236069 r236517  
    31233123    {
    31243124        NavigationDisabler navigationDisabler(&m_frame);
     3125        IgnoreOpensDuringUnloadCountIncrementer ignoreOpensDuringUnloadCountIncrementer(m_frame.document());
    31253126        size_t i;
    31263127
     
    32303231    {
    32313232        ForbidPromptsScope forbidPrompts(m_frame.page());
    3232         IgnoreOpensDuringUnloadCountIncrementer ignoreOpensDuringUnloadCountIncrementer(m_frame.document());
    32333233        domWindow->dispatchEvent(beforeUnloadEvent, domWindow->document());
    32343234    }
Note: See TracChangeset for help on using the changeset viewer.