Title: [236517] trunk
- Revision
- 236517
- Author
- cdu...@apple.com
- Date
- 2018-09-26 12:29:54 -0700 (Wed, 26 Sep 2018)
Log 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:
- https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document
No new tests, rebaselined existing tests.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::shouldClose):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (236516 => 236517)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-09-26 19:16:52 UTC (rev 236516)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-09-26 19:29:54 UTC (rev 236517)
@@ -1,3 +1,15 @@
+2018-09-26 Chris Dumez <cdu...@apple.com>
+
+ 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.
+
+ 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:
+
2018-09-25 YUHAN WU <yuhan...@apple.com>
Implement MediaStreamTrack Content Hints
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window-expected.txt (236516 => 236517)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window-expected.txt 2018-09-26 19:16:52 UTC (rev 236516)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window-expected.txt 2018-09-26 19:29:54 UTC (rev 236517)
@@ -2,7 +2,7 @@
Harness Error (TIMEOUT), message = null
PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (in top-level browsing context)
-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
+PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading parent and child)
PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading child only)
PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during pagehide event (in top-level browsing context)
PASS document.open should bail out when ignore-opens-during-unload is greater than 0 during pagehide event (open(parent) while unloading parent and child)
Modified: trunk/Source/WebCore/ChangeLog (236516 => 236517)
--- trunk/Source/WebCore/ChangeLog 2018-09-26 19:16:52 UTC (rev 236516)
+++ trunk/Source/WebCore/ChangeLog 2018-09-26 19:29:54 UTC (rev 236517)
@@ -1,3 +1,21 @@
+2018-09-26 Chris Dumez <cdu...@apple.com>
+
+ 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.
+
+ 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:
+ - https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document
+
+ No new tests, rebaselined existing tests.
+
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::shouldClose):
+ (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
+
2018-09-26 Justin Fan <justin_...@apple.com>
WebGL 2: Adding logging to in-progress features
Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (236516 => 236517)
--- trunk/Source/WebCore/loader/FrameLoader.cpp 2018-09-26 19:16:52 UTC (rev 236516)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp 2018-09-26 19:29:54 UTC (rev 236517)
@@ -3122,6 +3122,7 @@
bool shouldClose = false;
{
NavigationDisabler navigationDisabler(&m_frame);
+ IgnoreOpensDuringUnloadCountIncrementer ignoreOpensDuringUnloadCountIncrementer(m_frame.document());
size_t i;
for (i = 0; i < targetFrames.size(); i++) {
@@ -3229,7 +3230,6 @@
{
ForbidPromptsScope forbidPrompts(m_frame.page());
- IgnoreOpensDuringUnloadCountIncrementer ignoreOpensDuringUnloadCountIncrementer(m_frame.document());
domWindow->dispatchEvent(beforeUnloadEvent, domWindow->document());
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes