Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 30129fc4e3ebe6486a90bd14da65b1d5e4769ba6
https://github.com/WebKit/WebKit/commit/30129fc4e3ebe6486a90bd14da65b1d5e4769ba6
Author: Brady Eidson <[email protected]>
Date: 2026-02-12 (Thu, 12 Feb 2026)
Changed paths:
M Source/WebKit/Shared/API/Cocoa/WebKit.h
M Source/WebKit/Shared/Cocoa/APIObject.mm
M Source/WebKit/UIProcess/API/APIContentWorld.cpp
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/WKContentWorld.h
M Source/WebKit/UIProcess/API/Cocoa/WKContentWorld.mm
A Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.h
M Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.mm
A Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfigurationInternal.h
M Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfiguration.h
R Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfigurationInternal.h
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm
Log Message:
-----------
Add WKContentWorldConfiguration API
rdar://170209641
https://bugs.webkit.org/show_bug.cgi?id=307655
Reviewed by Ryosuke Niwa.
Need to maintain _WKContentWorldConfiguration for backwards compat,
and we decided most of the properties should change names,
and the object they create is the same... So this one is a little weird in
details.
But the result is straight forward.
Test coverage by changing a random smattering of tests to use the API version
as well.
Some unrelated API test changes involved where I noticed we were violating the
SPI
contract in cases where all API tests were run in the same instance of UI
Process.
Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebKit/Shared/API/Cocoa/WebKit.h:
* Source/WebKit/Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Source/WebKit/UIProcess/API/APIContentWorld.cpp:
(API::ContentWorld::createNamelessWorld):
* Source/WebKit/UIProcess/API/APIContentWorld.h:
* Source/WebKit/UIProcess/API/APIContentWorldConfiguration.cpp:
(API::ContentWorldConfiguration::optionSet const):
* Source/WebKit/UIProcess/API/APIContentWorldConfiguration.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorld.h:
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorld.mm:
(+[WKContentWorld worldWithConfiguration:]):
(+[WKContentWorld _worldWithConfiguration:]):
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.h: Copied from
Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfiguration.h.
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfiguration.mm:
(-[WKContentWorldConfiguration dealloc]):
(-[WKContentWorldConfiguration encodeWithCoder:]):
(-[WKContentWorldConfiguration initWithCoder:]):
(-[WKContentWorldConfiguration openClosedShadowRootsEnabled]):
(-[WKContentWorldConfiguration setOpenClosedShadowRootsEnabled:]):
(-[WKContentWorldConfiguration autofillScriptingEnabled]):
(-[WKContentWorldConfiguration setAutofillScriptingEnabled:]):
(-[WKContentWorldConfiguration elementUserInfoEnabled]):
(-[WKContentWorldConfiguration setElementUserInfoEnabled:]):
(-[WKContentWorldConfiguration legacyBuiltinOverridesEnabled]):
(-[WKContentWorldConfiguration setLegacyBuiltinOverridesEnabled:]):
(-[WKContentWorldConfiguration isInspectable]):
(-[WKContentWorldConfiguration setInspectable:]):
(-[_WKContentWorldConfiguration init]):
(-[_WKContentWorldConfiguration dealloc]): Deleted.
(-[_WKContentWorldConfiguration _protectedWorldConfiguration]): Deleted.
(-[_WKContentWorldConfiguration copyWithZone:]): Deleted.
(+[_WKContentWorldConfiguration supportsSecureCoding]): Deleted.
(-[_WKContentWorldConfiguration encodeWithCoder:]): Deleted.
(-[_WKContentWorldConfiguration initWithCoder:]): Deleted.
(-[_WKContentWorldConfiguration _apiObject]): Deleted.
(-[_WKContentWorldConfiguration isInspectable]): Deleted.
(-[_WKContentWorldConfiguration setInspectable:]): Deleted.
* Source/WebKit/UIProcess/API/Cocoa/WKContentWorldConfigurationInternal.h:
Renamed from
Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfigurationInternal.h.
* Source/WebKit/UIProcess/API/Cocoa/_WKContentWorldConfiguration.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TEST(WKUserContentController, AllowAutofill)):
(TEST(WKUserContentController, DidAssociateFormControls)):
(TEST(WKUserContentController, DidAssociateFormControlsFromShadowTree)):
(TEST(WKUserContentController, BeforeFocusEvent)):
(TEST(WKUserContentController, BeforeBlurEvent)):
(TEST(WKUserContentController, ShadowRootAttachedEvent)):
(TEST(WKUserContentController, DisableAutofillSpellcheck)):
(TEST(WKUserContentController, AllowElementUserInfo)):
(TEST(WKUserContentController, AllowElementUserInfoFromShadowTree)):
(TEST(WKUserContentController, LastChangeWasUserEdit)):
(TEST(WKUserContentController, AutoFillWorldTrustedEventHandler)):
(TEST(WKUserContentController, WebKitSubmitEvent)):
(TEST(WKUserContentController, EvaluateLargeJavaScriptStringInAutoFillWorld)):
Canonical link: https://commits.webkit.org/307401@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications