Bug 189376 - Ignore-opens-during-unload counter of a parent should apply to its children during beforeunload event
Summary: Ignore-opens-during-unload counter of a parent should apply to its children d...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-06 14:37 PDT by Timothy Gu
Modified: 2018-09-26 12:30 PDT (History)
10 users (show)

See Also:


Attachments
Patch (4.68 KB, patch)
2018-09-26 10:42 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Gu 2018-09-06 14:37:42 PDT
Per https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document, the ignore-opens-during-unload counter of the document on which "prompt to unload" is called should stay incremented even as its descendants are being prompted for unload. This is the behavior of Firefox as well as Chrome 70+.

Test is available at https://github.com/web-platform-tests/wpt/blob/master/html/webappapis/dynamic-markup-insertion/opening-the-input-stream/ignore-opens-during-unload.window.js. In particular, the "document.open should bail out when ignore-opens-during-unload is greater than 0 during beforeunload event (open(parent) while unloading parent and child)" test currently fails.
Comment 1 Radar WebKit Bug Importer 2018-09-09 13:33:27 PDT
<rdar://problem/44282754>
Comment 2 Chris Dumez 2018-09-26 10:42:38 PDT
Created attachment 350870 [details]
Patch
Comment 3 WebKit Commit Bot 2018-09-26 12:30:02 PDT
Comment on attachment 350870 [details]
Patch

Clearing flags on attachment: 350870

Committed r236517: <https://trac.webkit.org/changeset/236517>
Comment 4 WebKit Commit Bot 2018-09-26 12:30:04 PDT
All reviewed patches have been landed.  Closing bug.