Simplify Navigation::scriptExecutionContext()#26054
Conversation
|
EWS run on previous version of this PR (hash e5b88b3) Details |
|
@cdumez, I would like to understand if the script execution context can ever be a different document from the same website. |
When dealing with a Page (not workers), a ScriptExecutionContext is a Document. There is one per frame on the page. ScriptExecutionContexts are generally not aware of each other unless they have the same security origin (otherwise the frames wouldn't be able to script each other). The patch here does have some behavior change I believe because of the changes to the IDL. The IDL used to do e.g. |
FWIW the IDL attribute there before was just a webkit change. There are some cross-document parts of the spec but I’m not sure we need their context. It’s something I’m aware of going forward as I understand it more now. |
e5b88b3 to
1f39161
Compare
|
EWS run on previous version of this PR (hash 1f39161) Details
|
1f39161 to
6b35672
Compare
|
EWS run on current version of this PR (hash 6b35672) Details |
https://bugs.webkit.org/show_bug.cgi?id=271161 Reviewed by Chris Dumez. As Navigation is a LocalDOMWindowProperty it always has access to its own ScriptExecutionContext. * Source/WebCore/page/LocalDOMWindow.cpp: (WebCore::LocalDOMWindow::navigation): * Source/WebCore/page/Navigation.cpp: (WebCore::Navigation::Navigation): (WebCore::Navigation::initializeEntries): (WebCore::Navigation::scriptExecutionContext const): (WebCore::Navigation::serializeState): (WebCore::Navigation::navigate): (WebCore::Navigation::updateCurrentEntry): (WebCore::Navigation::updateForNavigation): * Source/WebCore/page/Navigation.h: * Source/WebCore/page/Navigation.idl: Canonical link: https://commits.webkit.org/276478@main
6b35672 to
30c07bf
Compare
|
Committed 276478@main (30c07bf): https://commits.webkit.org/276478@main Reviewed commits have been landed. Closing PR #26054 and removing active labels. |
🛠 ios
30c07bf
6b35672
🧪 wpe-wk2🧪 ios-wk2🧪 ios-wk2-wpt🧪 api-ios