Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e8a014af82e87656aefc463f85ffb0e1e386b5bf
https://github.com/WebKit/WebKit/commit/e8a014af82e87656aefc463f85ffb0e1e386b5bf
Author: Alex Christensen <[email protected]>
Date: 2024-04-10 (Wed, 10 Apr 2024)
Changed paths:
M LayoutTests/platform/mac-site-isolation/TestExpectations
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/page/Page.cpp
M Source/WebCore/page/Page.h
M Source/WebCore/page/SecurityOrigin.cpp
M Source/WebCore/page/SecurityOrigin.h
M Source/WebKit/UIProcess/WebProcessPool.cpp
Log Message:
-----------
Use correct top origin when checking firstPartyForCookies with site isolation
enabled
https://bugs.webkit.org/show_bug.cgi?id=272373
rdar://126114826
Reviewed by Charlie Wolfe and Sihui Liu.
There were two issues here:
1. Document::topOrigin was using topDocument() to get the SecurityOrigin, and
with site isolation
enabled the top document isn't necessarily the main frame's Document. Instead,
use a strategy
like we do with mainFrameURL where the Page has the main frame's origin in all
processes, whether
the main frame is remote or not.
2. In WebProcessPool::processForNavigation when navigating the main frame, use
the RegistrableDomain
from the navigation instead of the PageLoadState, which may not have the
activeURL yet.
With these 2 changes, we stop getting failures in
NetworkProcess::allowsFirstPartyForCookies in 2 tests
when run with --site-isolation. The tests change from crashes to regular
time-outs.
* LayoutTests/platform/mac-site-isolation/TestExpectations:
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::topOrigin const):
* Source/WebCore/dom/Document.h:
* Source/WebCore/page/Page.cpp:
(WebCore::Page::setMainFrameURL):
(WebCore::Page::mainFrameOrigin const):
* Source/WebCore/page/Page.h:
* Source/WebCore/page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::opaqueOrigin):
* Source/WebCore/page/SecurityOrigin.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForNavigation):
Canonical link: https://commits.webkit.org/277331@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes