Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: b804b0e920ae5fd253517bb97f9a70bff06803c0
https://github.com/WebKit/WebKit/commit/b804b0e920ae5fd253517bb97f9a70bff06803c0
Author: Alex Christensen <[email protected]>
Date: 2026-07-14 (Tue, 14 Jul 2026)
Changed paths:
M Source/WebCore/CMakeLists.txt
M Source/WebCore/DerivedSources-input.xcfilelist
M Source/WebCore/DerivedSources-output.xcfilelist
M Source/WebCore/DerivedSources.make
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/bindings/js/DOMWrapperWorld.h
M Source/WebCore/bindings/js/WebCoreBuiltinNames.h
M Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
M Source/WebCore/page/LocalDOMWindow.cpp
M Source/WebCore/page/WebKitNamespace.cpp
M Source/WebCore/page/WebKitNamespace.h
M Source/WebCore/page/WebKitNamespace.idl
A Source/WebCore/page/WebKitNodeSnapshot.cpp
A Source/WebCore/page/WebKitNodeSnapshot.h
A Source/WebCore/page/WebKitNodeSnapshot.idl
R Source/WebCore/page/WebKitSerializedNode.cpp
R Source/WebCore/page/WebKitSerializedNode.h
R Source/WebCore/page/WebKitSerializedNode.idl
M Source/WebKit/Headers.cmake
M Source/WebKit/PlatformIOS.cmake
M Source/WebKit/Shared/API/Cocoa/WebKit.h
M Source/WebKit/Shared/Cocoa/APIObject.mm
M Source/WebKit/Shared/ContentWorldData.serialization.in
M Source/WebKit/Shared/ContentWorldShared.h
M Source/WebKit/Shared/JavaScriptEvaluationResult.cpp
M Source/WebKit/Shared/JavaScriptEvaluationResult.mm
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/UIProcess/API/APIContentWorld.h
M Source/WebKit/UIProcess/API/APIContentWorldConfiguration.cpp
M Source/WebKit/UIProcess/API/APIContentWorldConfiguration.h
M Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.h
M Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.mm
A Source/WebKit/UIProcess/API/Cocoa/WKDOMNodeSnapshot.h
A Source/WebKit/UIProcess/API/Cocoa/WKDOMNodeSnapshot.mm
A Source/WebKit/UIProcess/API/Cocoa/WKDOMNodeSnapshotInternal.h
R Source/WebKit/UIProcess/API/Cocoa/WKJSSerializedNode.h
R Source/WebKit/UIProcess/API/Cocoa/WKJSSerializedNode.mm
R Source/WebKit/UIProcess/API/Cocoa/WKJSSerializedNodeInternal.h
M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
M Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfiguration.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp
M Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.h
M Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SerializedNode.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/UserContentControllerTests.swift
M Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageTests.swift
Log Message:
-----------
Rename WKJSSerializedNode to WKDOMNodeSnapshot
https://bugs.webkit.org/show_bug.cgi?id=319331
Reviewed by Richard Robinson.
This responds to API review feedback. "Serialized" is an odd implementation
detail,
and this object does not conform to NSCoding. "Snapshot" is more clear,
and not limited to the same script execution context. I therefore also rename
the
world configuration and JavaScript entry points.
Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SerializedNode.mm
Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/bindings/js/DOMWrapperWorld.h:
(WebCore::DOMWrapperWorld::setAllowNodeSnapshotCreation):
(WebCore::DOMWrapperWorld::allowNodeSnapshotCreation const):
(WebCore::DOMWrapperWorld::setAllowNodeSerialization): Deleted.
(WebCore::DOMWrapperWorld::allowNodeSerialization const): Deleted.
* Source/WebCore/bindings/js/WebCoreBuiltinNames.h:
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(IsPrivateHeader):
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::shouldHaveWebKitNamespaceForWorld):
* Source/WebCore/page/WebKitNamespace.cpp:
(WebCore::WebKitNamespace::createNodeSnapshot):
(WebCore::WebKitNamespace::serializeNode): Deleted.
* Source/WebCore/page/WebKitNamespace.h:
* Source/WebCore/page/WebKitNamespace.idl:
* Source/WebCore/page/WebKitNodeSnapshot.cpp: Renamed from
Source/WebCore/page/WebKitSerializedNode.cpp.
(WebCore::WebKitNodeSnapshot::WebKitNodeSnapshot):
* Source/WebCore/page/WebKitNodeSnapshot.h: Renamed from
Source/WebCore/page/WebKitSerializedNode.h.
(WebCore::WebKitNodeSnapshot::create):
* Source/WebCore/page/WebKitNodeSnapshot.idl: Renamed from
Source/WebCore/page/WebKitSerializedNode.idl.
* Source/WebKit/Headers.cmake:
* Source/WebKit/PlatformIOS.cmake:
* Source/WebKit/Shared/API/Cocoa/WebKit.h:
* Source/WebKit/Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Source/WebKit/Shared/ContentWorldData.serialization.in:
* Source/WebKit/Shared/ContentWorldShared.h:
* Source/WebKit/Shared/JavaScriptEvaluationResult.cpp:
(WebKit::JavaScriptEvaluationResult::JSExtractor::jsValueToExtractedValue):
* Source/WebKit/Shared/JavaScriptEvaluationResult.mm:
(WebKit::JavaScriptEvaluationResult::ObjCExtractor::toValue):
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/APIContentWorld.h:
* Source/WebKit/UIProcess/API/APIContentWorldConfiguration.cpp:
(API::ContentWorldConfiguration::optionSet const):
(API::ContentWorldConfiguration::allowNodeSnapshotCreation const):
(API::ContentWorldConfiguration::setAllowNodeSnapshotCreation):
(API::ContentWorldConfiguration::allowNodeSerialization const): Deleted.
(API::ContentWorldConfiguration::setAllowNodeSerialization): Deleted.
* Source/WebKit/UIProcess/API/APIContentWorldConfiguration.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.mm:
(-[WKContentWorldConfiguration encodeWithCoder:]):
(-[WKContentWorldConfiguration initWithCoder:]):
(-[WKContentWorldConfiguration isNodeSnapshotCreationEnabled]):
(-[WKContentWorldConfiguration setNodeSnapshotCreationEnabled:]):
(-[_WKContentWorldConfiguration allowNodeSnapshotCreation]):
(-[_WKContentWorldConfiguration setAllowNodeSnapshotCreation:]):
(-[WKContentWorldConfiguration isNodeSerializationEnabled]): Deleted.
(-[WKContentWorldConfiguration setNodeSerializationEnabled:]): Deleted.
(-[_WKContentWorldConfiguration allowNodeSerialization]): Deleted.
(-[_WKContentWorldConfiguration setAllowNodeSerialization:]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKDOMNodeSnapshot.h: Renamed from
Source/WebKit/UIProcess/API/Cocoa/WKJSSerializedNode.h.
* Source/WebKit/UIProcess/API/Cocoa/WKDOMNodeSnapshot.mm: Renamed from
Source/WebKit/UIProcess/API/Cocoa/WKJSSerializedNode.mm.
(-[WKDOMNodeSnapshot dealloc]):
* Source/WebKit/UIProcess/API/Cocoa/WKDOMNodeSnapshotInternal.h: Renamed from
Source/WebKit/UIProcess/API/Cocoa/WKJSSerializedNodeInternal.h.
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView
_evaluateJavaScript:asAsyncFunction:withSourceURL:withArguments:forceUserGesture:inFrame:inWorld:completionHandler:]):
* Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfiguration.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
(WebKit::InjectedBundleScriptWorld::setAllowNodeSnapshotCreation):
(WebKit::InjectedBundleScriptWorld::setAllowNodeSerialization): Deleted.
* Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
* Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addContentWorldIfNecessary):
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::clearContentWorld):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SerializedNode.mm:
(TestWebKitAPI::TEST(SerializedNode, Basic)):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UserContentController.mm:
(-[SerializedNodeReplyHandler
userContentController:didReceiveScriptMessage:replyHandler:]):
(TEST(WKUserContentController, MessageHandlerReplyWithSerializedNode)):
(TEST(WKUserContentController, MessageHandlerInjectsWebKitNamespace)):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/UserContentControllerTests.swift:
(UserContentControllerTests.jsBufferInjectsWebKitNamespace):
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageTests.swift:
(WebPageTests.clearContentWorld):
Canonical link: https://commits.webkit.org/317213@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications