Bug 312207
| Summary: | [Site Isolation] http/tests/misc/iframe-beforeunload-dialog-not-matching-ancestor-securityorigin.html doesn't log that it cannot dispatch a beforeUnload event to cross origin frames | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Anthony Tarbinian <a.tarbinian> |
| Component: | Page Loading | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | beidson, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Anthony Tarbinian
When running http/tests/misc/iframe-beforeunload-dialog-not-matching-ancestor-securityorigin.html
with site isolation enabled, WebKit does not log the following message:
"Blocked attempt to show beforeunload confirmation dialog on behalf of a frame with different security origin."
For context, the beforeUnload event gets run before a frame is about to be unloaded. The main use case for this event is to provide the user with a confirmation dialog to avoid closing the page and losing unsaved work.
In FrameLoader::shouldClose, this message gets logged when a frame is about to be closed and WebKit is about to dispatch a beforeUnload message to each descendant frame of the navigating frame. However, in the current implementation it only collects LocalFrames to dispatch to.
https://github.com/WebKit/WebKit/blob/723bdacf3bed4568822c50a02226c7fb115a487b/Source/WebCore/loader/FrameLoader.cpp#L3878-L3901
Under site isolation, cross-origin RemoteFrames were silently skipped and the console message was never emitted.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/174697142>
Anthony Tarbinian
Pull request: https://github.com/WebKit/WebKit/pull/62756
EWS
Committed 313493@main (7254a2893c2e): <https://commits.webkit.org/313493@main>
Reviewed commits have been landed. Closing PR #62756 and removing active labels.