Skip to content

Conversation

@sosukesuzuki
Copy link
Member

No description provided.

aoikonomopoulos and others added 30 commits October 3, 2025 10:16
https://bugs.webkit.org/show_bug.cgi?id=300021

Reviewed by Justin Michaud.

This makes the intent clearer and means the 32-bit version can stay
closer to the 64-bit code.

Canonical link: https://commits.webkit.org/300955@main
https://bugs.webkit.org/show_bug.cgi?id=300042

Reviewed by Antoine Quint and Antti Koivisto.

Started adding property specific types for AcceleratedEffect values,
initially focusing on removing the remaining uses of WebCore::Length
and WebCore::LengthPoint in AcceleratedEffectValues.

Added layering violation comments to indicate further work needed
to resolve the layering.

* Source/WebCore/CMakeLists.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/LengthFunctions.cpp:
* Source/WebCore/platform/LengthFunctions.h:
* Source/WebCore/platform/animation/AcceleratedEffect.cpp:
* Source/WebCore/platform/animation/AcceleratedEffectValues.cpp:
* Source/WebCore/platform/animation/AcceleratedEffectValues.h:
* Source/WebCore/platform/animation/AnimationUtilities.h:
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetAnchor.cpp: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetAnchor.h: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetDistance.cpp: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetDistance.h: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetPosition.cpp: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetPosition.h: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetRotate.cpp: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOffsetRotate.h: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOpacity.cpp: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectOpacity.h: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectTransformBox.h: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectTransformOrigin.cpp: Added.
* Source/WebCore/platform/animation/values/AcceleratedEffectTransformOrigin.h: Added.
* Source/WebCore/rendering/MotionPath.cpp:
* Source/WebCore/rendering/MotionPath.h:
* Source/WebCore/rendering/style/RenderStyle.cpp:
* Source/WebCore/rendering/style/StyleMiscNonInheritedData.h:
* Source/WebCore/rendering/style/StyleRareNonInheritedData.h:
* Source/WebCore/style/StyleExtractorConverter.h:
* Source/WebCore/style/StyleExtractorSerializer.h:
* Source/WebCore/style/values/color/StyleOpacity.h:
* Source/WebCore/style/values/motion/StyleOffsetAnchor.cpp:
* Source/WebCore/style/values/motion/StyleOffsetAnchor.h:
* Source/WebCore/style/values/motion/StyleOffsetDistance.h:
* Source/WebCore/style/values/motion/StyleOffsetPosition.cpp:
* Source/WebCore/style/values/motion/StyleOffsetPosition.h:
* Source/WebCore/style/values/motion/StyleOffsetRotate.cpp:
* Source/WebCore/style/values/motion/StyleOffsetRotate.h:
* Source/WebCore/style/values/primitives/StylePosition.cpp:
* Source/WebCore/style/values/primitives/StylePosition.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteAcceleratedEffectStack.mm:

Canonical link: https://commits.webkit.org/300956@main
…ed symbol "WebCore::Node::document() const"

rdar://161863117
https://bugs.webkit.org/show_bug.cgi?id=300121

Unreviewed build fix; add missing include.

* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:

Canonical link: https://commits.webkit.org/300957@main
https://bugs.webkit.org/show_bug.cgi?id=299702

Reviewed by Darin Adler.

Converts the 'font-size-adjust' property to use strong style types.

* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/css/CSSProperties.json:
* Source/WebCore/platform/graphics/FontCascadeDescription.h:
* Source/WebCore/platform/graphics/FontDescription.cpp:
* Source/WebCore/rendering/style/RenderStyle.cpp:
* Source/WebCore/rendering/style/RenderStyle.h:
* Source/WebCore/rendering/style/RenderStyleInlines.h:
* Source/WebCore/style/StyleBuilderConverter.h:
* Source/WebCore/style/StyleBuilderCustom.h:
* Source/WebCore/style/StyleBuilderState.h:
* Source/WebCore/style/StyleBuilderStateInlines.h:
* Source/WebCore/style/StyleExtractorConverter.h:
* Source/WebCore/style/StyleExtractorSerializer.h:
* Source/WebCore/style/StyleFontSizeFunctions.cpp:
* Source/WebCore/style/StyleFontSizeFunctions.h:
* Source/WebCore/style/StyleInterpolationFunctions.h:
* Source/WebCore/style/StyleInterpolationWrappers.h:
* Source/WebCore/style/StyleResolveForFont.cpp:
* Source/WebCore/style/StyleResolveForFont.h:
* Source/WebCore/style/values/fonts/StyleFontSizeAdjust.cpp: Added.
* Source/WebCore/style/values/fonts/StyleFontSizeAdjust.h: Added.

Canonical link: https://commits.webkit.org/300958@main
WebKit-7623.1.11

Canonical link: https://commits.webkit.org/300959@main
https://bugs.webkit.org/show_bug.cgi?id=299488
rdar://161273712

Reviewed by Daniel Liu.

As announced on September 9th, the SoCs used in the next generation of
iPhones will include support for ARM'S Memory Tagging Extension
functionality. As part of Apple's MIE (Memory Integrity Enforcement)
feature, libpas should thus implement support for MTE and related
memory-safety functionality to ensure that WebKit is up to par with the
new memory safety standards set by the rest of the system.

In particular, this patch ensures that when possible we allocate memory
with backing MTE tag pages and tag allocations made within them prior to
returning allocation memory to the caller. Not all memory can be tagged
this way: in particular, objects >= 32K and objects which may be
referenced via compact pointers cannot be MTE tagged. There are other
exceptions as well, depending on process/object-type/platform.
It also implements a variety of hardening strategies to further
strengthen the feature and prevent certain well-known kinds of attacks.

Trying this again, since the previous attempt caused build breakages
in certain configurations.

Canonical link: https://commits.webkit.org/300960@main
https://bugs.webkit.org/show_bug.cgi?id=300058
rdar://problem/161856764

Reviewed by Alan Baradlay.

This patch adds the overall logic that we will use to support aligning
grid items after we have determined their sizes. Note that since
alignment is done with respect to the grid area, which acts as the
containing block for the grid item, the border box position that is
returned will be in the coordinate space of the grid area.

With this patch, we only support start alignment for the flex items, so
there is realistically no movement that is needed for the grid item's
margin box, so the final border box position will just be the same as
the value of the top margin. In order to support other alignment values,
we will likely need the size of the grid area along with the border box
dimensions of the grid item.

* Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp:
(WebCore::Layout::GridFormattingContext::constructPlacedGridItems const):
In order to perform alignment, we will need the align-self and
justify-self values for the grid item. If the value for this property is
not auto, then that is the value that will be used; otherwise, we refer to
the value of align-items/justify-items on the grid.

* Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp:
(WebCore::Layout::GridLayout::layout):

(WebCore::Layout::GridLayout::performInlineAxisSelfAlignment):
(WebCore::Layout::GridLayout::performBlockAxisSelfAlignment):
The basic idea between these two functions is the same: first, we need to
find out what the margin box position will be to satisfy the needs of
the alignment value, and from there, we can just add in the start margin
to get the final position of the item's border box. Since the most basic
version of start alignment (without considering any sort of safety) does
not move the item from the start of the grid area, we can just return a
value of 0 to indicate that it is at the start of the grid area.

Canonical link: https://commits.webkit.org/300961@main
https://bugs.webkit.org/show_bug.cgi?id=300054
rdar://161853921

Reviewed by Yusuke Suzuki.

Add support for GC struct and arrays with v128 field and element type.

Testing: run JSTests/wasm/gc/simd.js with --useWasmIPIntSIMD=true

* Source/JavaScriptCore/llint/InPlaceInterpreter64.asm:
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp:
(JSC::IPInt::WASM_IPINT_EXTERN_CPP_DECL):
* Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.h:
* Source/JavaScriptCore/wasm/WasmOperationsInlines.h:
(JSC::Wasm::arrayNew):
(JSC::Wasm::tryCopyElementsInReverse):
(JSC::Wasm::arrayNewFixed):
(JSC::Wasm::arrayGet):
(JSC::Wasm::arraySet):
(JSC::Wasm::structNew):
(JSC::Wasm::structGet):
(JSC::Wasm::structSet):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyArray.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyArrayInlines.h:
(JSC::JSWebAssemblyArray::getVector):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp:
(JSC::JSWebAssemblyStruct::get const):
(JSC::JSWebAssemblyStruct::getVector const):
* Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.h:

Canonical link: https://commits.webkit.org/300962@main
…axedSIMD=1

https://bugs.webkit.org/show_bug.cgi?id=300112
rdar://161901342

Reviewed by Daniel Liu.

Let's not block enabling --useWasmIPIntSIMD by default on relaxed SIMD
support in IPInt.

However, we won't be able to remove the path that tiers up immediately
to BBQ until the relaxed SIMD support is added to IPInt (or we stop
testing --useWasmRelaxedSIMD=1 until the relaxed SIMD support is
completed).

* JSTests/wasm/stress/simd-const-relaxed-f32-madd.js:
* JSTests/wasm/stress/simd-const-relaxed-f32-trunc.js:
* JSTests/wasm/stress/simd-const-relaxed-f64-madd.js:
* JSTests/wasm/stress/simd-const-relaxed-f64-trunc.js:
* JSTests/wasm/stress/simd-const-relaxed-lane-select.js:
* JSTests/wasm/stress/simd-const-relaxed-swizzle.js:
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::Options::assertOptionsAreCoherent):

Canonical link: https://commits.webkit.org/300963@main
…ocess cache

https://bugs.webkit.org/show_bug.cgi?id=299916

Reviewed by Ben Nham.

Made shared process for site isolation work with the Web process cache. WebProcessCache is extended to
maintain a separate map of shared processes per top-level domain in addition to the existing cache of
"main" processes. The size and the capacity of WebProcessCache now takes into account both types of the
process caches. In addition to being segregated by the top-level domain, when a given domain receives
an user interaction from the user, the existing shared process cache which had loaded the same domain
will no longer be eligible for the cache reuse.

This PR also fixes the bug that a wrong BrowsingContextGroup is used during a back/forward navigation.
Store the relevant BrowsingContextGroup in WebBackForwardListItem and use this BrowsingContextGroup
when back/forward navigating to the item.

In addition, this PR also fixes the bug in WebPageProxy::receivedNavigationActionPolicyDecision that
we were creating a new BrowsingContextGroup even when the result of redirect chain ended up navigating
back to the same site. We now avoid creating a new BrowsingContextGroup when main frame's site did not
change per navigation.

Test: TestWebKitAPI.SiteIsolation.SharedProcessBasicWebProcessCache
      TestWebKitAPI.SiteIsolation.SharedProcessWebProcessCacheSharedProcessForSiteWithUserInteraction

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm
* Source/WebKit/Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create): Optionally store BrowsingContextGroup.
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* Source/WebKit/Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::browsingContextGroup const):
* Source/WebKit/UIProcess/BrowsingContextGroup.cpp:
(WebKit::BrowsingContextGroup::sharedProcessForSite):
(WebKit::BrowsingContextGroup::ensureProcessForSite):
* Source/WebKit/UIProcess/BrowsingContextGroup.h:
* Source/WebKit/UIProcess/FrameProcess.cpp:
(WebKit::FrameProcess::FrameProcess):
* Source/WebKit/UIProcess/FrameProcess.h:
(WebKit::FrameProcess::sharedProcessMainFrameSite const):
(WebKit::FrameProcess::create):
* Source/WebKit/UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backForwardAddItemShared):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::prepareForProvisionalLoadInProcess):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::launchProcess):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision): Fixed a subtle bug that this code was
using a wrong BrowsingContextGroup to find the shared process when the navigation is supposed to swap
the BrowsingContextGroup.
(WebKit::WebPageProxy::continueNavigationInNewProcess):
(WebKit::WebPageProxy::triggerBrowsingContextGroupSwitchForNavigation):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebProcessCache.cpp: Improved the logging code in this file to use
SENSITIVE_LOG_STRING of PRIVATE_LOG_STRING since it logs the site name.
(WebKit::WebProcessCache::canCacheProcess const):
(WebKit::WebProcessCache::addProcess):
(WebKit::WebProcessCache::evictAtRandomIfNeeded): Extracted from addProcess. We try to evict a shared
process before trying to evict the "main" process since the main process needs to launch sooner.
(WebKit::WebProcessCache::takeProcess):
(WebKit::WebProcessCache::takeSharedProcess): Added.
* Source/WebKit/UIProcess/WebProcessCache.h:
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processForSite): Added the logic to reuse a cached shared process.
(WebKit::WebProcessPool::createWebPage):
(WebKit::WebProcessPool::processForNavigation):
(WebKit::WebProcessPool::prepareProcessForNavigation):
(WebKit::WebProcessPool::processForNavigationInternal):
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addSharedProcessDomain): Added.
(WebKit::WebProcessProxy::didStartUsingProcessForSiteIsolation):
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/SiteIsolation.mm:
(TestWebKitAPI::siteIsolatedViewWithSharedProcess):
(TestWebKitAPI::(SiteIsolation, SharedProcessBasicWebProcessCache)): Added
(TestWebKitAPI::(SiteIsolation, SharedProcessWithResourceLoadStatistics)):
(TestWebKitAPI::(SiteIsolation, SharedProcessAfterClick)):
(TestWebKitAPI::(SiteIsolation, SharedProcessAfterKeyDown)):
(TestWebKitAPI::(SiteIsolation, SharedProcessAfterUserInteractionInSharedProcesss)):
(TestWebKitAPI::(SiteIsolation, SharedProcessWebProcessCacheSharedProcessForSiteWithUserInteraction)):
Added.

Canonical link: https://commits.webkit.org/300964@main
https://bugs.webkit.org/show_bug.cgi?id=300124
rdar://160150633

Reviewed by Matthew Finkel.

Before this PR, if the network failed or the server terminated the connection group,
JS would receive no notification that that happened.  Now it does.

Tests: Tools/TestWebKitAPI/NetworkConnection.h
       Tools/TestWebKitAPI/NetworkConnection.mm
       Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm
* Source/WebCore/Modules/webtransport/WebTransport.cpp:
(WebCore::WebTransport::didFail):
(WebCore::WebTransport::networkProcessCrashed): Deleted.
* Source/WebCore/Modules/webtransport/WebTransport.h:
* Source/WebCore/Modules/webtransport/WebTransportSessionClient.h:
* Source/WebCore/Modules/webtransport/WorkerWebTransportSession.cpp:
(WebCore::WorkerWebTransportSession::didFail):
(WebCore::WorkerWebTransportSession::networkProcessCrashed): Deleted.
* Source/WebCore/Modules/webtransport/WorkerWebTransportSession.h:
* Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm:
(WebKit::NetworkTransportSession::initialize):
* Source/WebKit/WebProcess/Network/WebTransportSession.cpp:
(WebKit::WebTransportSession::didFail):
(WebKit::WebTransportSession::networkProcessCrashed): Deleted.
* Source/WebKit/WebProcess/Network/WebTransportSession.h:
* Source/WebKit/WebProcess/Network/WebTransportSession.messages.in:
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::networkProcessConnectionClosed):
* Tools/TestWebKitAPI/NetworkConnection.h:
* Tools/TestWebKitAPI/NetworkConnection.mm:
(TestWebKitAPI::ConnectionGroup::cancel):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebTransport.mm:
(TestWebKitAPI::TEST(WebTransport, ServerConnectionTermination)):

Canonical link: https://commits.webkit.org/300965@main
https://bugs.webkit.org/show_bug.cgi?id=299915
<rdar://161690817>

Reviewed by Abrar Rahman Protyasha.

Use localized string for image controls label. Also detect system RTL
language usage and adjust layout as appropriate.

* Source/WebCore/html/shadow/SpatialImageControls.cpp:
(WebCore::SpatialImageControls::ensureSpatialControls):
* Source/WebCore/html/shadow/spatialImageControls.css:
(div#label):
(span#spatial-glyph):
(span#pano-glyph):
Mirror layout iff system is in RTL language.

* Source/WebCore/en.lproj/Localizable.strings:
* Source/WebCore/platform/LocalizedStrings.cpp:
(WebCore::imageControlsLabelSpatial):
(WebCore::imageControlsLabelPanorama):
* Source/WebCore/platform/LocalizedStrings.h:
Make label text localizable strings.

* LayoutTests/TestExpectations:
* LayoutTests/fast/images/spatial-image-controls-expected.html:
* LayoutTests/fast/images/spatial-image-controls-rtl-expected.html:
* LayoutTests/fast/images/spatial-image-controls-rtl.html:
* LayoutTests/platform/visionos/TestExpectations:
Add test coverage for RTL support.

Canonical link: https://commits.webkit.org/300966@main
https://bugs.webkit.org/show_bug.cgi?id=300133
rdar://161539144

Reviewed by Yusuke Suzuki and Dan Hecht.

The global.get Wasm opcode in constant expression position currently doesn't
support v128.

Testing covered by additions to JSTests/wasm/gc/simd.js.

* JSTests/wasm/gc/simd.js:
(testSIMDGlobal):
* Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp:
(JSC::Wasm::ConstExprGenerator::getGlobal):

Canonical link: https://commits.webkit.org/300967@main
https://bugs.webkit.org/show_bug.cgi?id=300055
rdar://161854148

Reviewed by Abrar Rahman Protyasha.

Avoids unsafe downcast of key{up/down/press} events to KeyboardEvent,
which was crashing on iOS simulated keyboard events. Crashes were
occurring in these two API tests:

- KeyboardInputTests.InsertDictationAlternativesSimulatingKeyboardInput
- KeyboardInputTests.InsertTextSimulatingKeyboardInput

(these tests are not currently being exercised by automation
because the feature is currently behind a feature flag)

* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::computeInteractionID):
(WebCore::LocalDOMWindow::finalizeEventTimingEntry):

Canonical link: https://commits.webkit.org/300968@main
https://bugs.webkit.org/show_bug.cgi?id=300036

Reviewed by Abrar Rahman Protyasha.

Update UITextInput protocol in SPI headers (this protocol is actually
API, but WKWebView still uses a pre-API internal protocol). This needs
to be visible from Swift, so add it to the bridging header. Unlike our
frameworks, the test bundle is not itself a module, so we do not need to
modularize UIKitSPIForTesting.h and friends to be able to use it from
swift code.

Along the way, fix a couple of public build issues, noted below.

Test: Tools/TestWebKitAPI/Tests/WebKit Swift/TestWebKitAPIBundle-Bridging-Header.h

Test: Tools/TestWebKitAPI/Tests/WebKit Swift/TestWebKitAPIBundle-Bridging-Header.h

* Configurations/CommonBase.xcconfig: Change the definition of
  SDKDB_HAS_148943382 to be internal only. When we generate partial
  SDKDBs from the public SDK, they do not exhibit the same bug. This
  change reverts an earlier attempt to work around the bug in
  300877@main.

* Source/WebCore/Configurations/AllowedSPI-legacy.toml: Revert an
  earlier attempt to fix the above problem (300877@main).

* Tools/TestRunnerShared/spi/UIKitSPIForTesting.h:
* Tools/TestWebKitAPI/Tests/WebKit Swift/TestWebKitAPIBundle-Bridging-Header.h:

* WebKitLibraries/SDKs/iphoneos26.0-additions.sdk/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore.tbd:
  Removed. The public build gets UIKit symbols from UIKit.tbd directly,
  not by binding to UIKitCore. This sidesteps an issue where WebKitSwift
  binds to different UIKit symbols in debug and release configurations,
  which confuses extract-tbds-from-internal-sdk.
* WebKitLibraries/SDKs/iphonesimulator26.0-additions.sdk/System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore.tbd: Removed.

Canonical link: https://commits.webkit.org/300969@main
https://bugs.webkit.org/show_bug.cgi?id=300063
rdar://161639791

Reviewed by Matthew Finkel.

Fix CoreIPC fuzz blocker by checking that the NSURLRequest from the
ResourceRequest in NetworkSessionCocoa is not nil before use.

Test: ipc/networksessioncocoa-empty-resource-request.html

Test: ipc/networksessioncocoa-empty-resource-request.html
* LayoutTests/ipc/networksessioncocoa-empty-resource-request-expected.txt: Added.
* LayoutTests/ipc/networksessioncocoa-empty-resource-request.html: Added.
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::createWebSocketTask):

Canonical link: https://commits.webkit.org/300970@main
https://bugs.webkit.org/show_bug.cgi?id=291839
rdar://149683032

Reviewed by Chris Dumez.

WebContent logs during launch are not emitted when logd is blocked in the sandbox because the log streaming channel
to the UI process is not set up until WebProcess::platformInitializeWebProcess is called. This patch addresses this
by sending logs emitted in this time interval over the XPC connection to the UI process and emit the logs there.

Test: Tools/TestWebKitAPI/Tests/WebKit/LogForwarding.mm

* Source/JavaScriptCore/API/JSValue.mm:
(createStructHandlerMap):
* Source/JavaScriptCore/API/JSWrapperMap.mm:
(parsePropertyAttributes):
* Source/JavaScriptCore/API/ObjcRuntimeExtras.h:
(adoptSystem): Deleted.
* Source/WTF/wtf/SystemFree.h:
(WTF::adoptSystem):
* Source/WebKit/Shared/Cocoa/LaunchLogHook.h: Added.
* Source/WebKit/Shared/Cocoa/LaunchLogHook.mm: Added.
(WebKit::LaunchLogHook::singleton):
(WebKit::LaunchLogHook::initialize):
(WebKit::LaunchLogHook::disable):
* Source/WebKit/Shared/Cocoa/LaunchLogMessages.h: Added.
* Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::initializeLogd):
(WebKit::XPCServiceEventHandler):
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _launchLogsCountForTesting]):
* Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::xpcEventHandler const):
(WebKit::WebProcessProxy::XPCEventHandler::handleXPCEvent const):
(WebKit::WebProcessProxy::XPCEventHandler::XPCEventHandler):
* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::registerLogClient):
* Tools/TestWebKitAPI/Tests/WebKit/LogForwarding.mm:
(TEST(WebKit, LaunchLogs)):

Canonical link: https://commits.webkit.org/300971@main
https://bugs.webkit.org/show_bug.cgi?id=299961
rdar://problem/161742137

Reviewed by Brian Weinstein and Timothy Hatcher.

Add support for browser.runtime.getVersion().
This was proposed in the WECG: w3c/webextensions#878

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm
* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm:
(WebKit::WebExtensionAPIRuntime::getVersion):
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIRuntime.h:
* Source/WebKit/WebProcess/Extensions/Interfaces/WebExtensionAPIRuntime.idl:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIRuntime.mm:
(TestWebKitAPI::TEST(WKWebExtensionAPIRuntime, GetVersion)):

Canonical link: https://commits.webkit.org/300972@main
…dentifiers.end()

https://bugs.webkit.org/show_bug.cgi?id=299996
rdar://161779919

Reviewed by Eric Carlson.

Calling AudioVideoRendererAVFObjC::addTrack could trigger a call to notifyRequiresFlushToResume,
before returning: as such the track identifier wouldn't have been inserted in the hash map yet
causing the assertion.

We ensure that the callback `notifyRequiresFlushToResume` isn't called when
we just added the video track, as no video data would have been enqueued yet: so there's
nothing to flush yet.

Re-enabling tests.
* LayoutTests/platform/ios/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
* Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.h:
* Source/WebCore/platform/graphics/avfoundation/AudioVideoRendererAVFObjC.mm:
(WebCore::AudioVideoRendererAVFObjC::stageVideoRenderer):

Canonical link: https://commits.webkit.org/300973@main
https://bugs.webkit.org/show_bug.cgi?id=299838
rdar://161612789

Reviewed by Jer Noble.

Enable preference for testing, covered by existing webm tests.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/platform/graphics/MediaPlayer.cpp:
(WebCore::WTF_REQUIRES_LOCK): Swap the order of registration of MediaPlayerFactory.
MSE and MP4 are more commonly used as webm. It makes more sense to try those first.
* Source/WebCore/platform/graphics/cocoa/MediaPlayerPrivateWebM.mm:
(WebCore::MediaPlayerPrivateWebM::cancelLoad): We incorrectly set the networkState
to idle when the load was cancelled. When running in the GPUP, it didn't make
a difference as the MediaPlayerPrivateRemote stopped accepting new events from
the GPUP once unloaded.
But when running in the content process, it would cause the element to incorrectly
fire the "suspend" event and causing tests to fail.

Canonical link: https://commits.webkit.org/300974@main
https://bugs.webkit.org/show_bug.cgi?id=299580

Reviewed by Sihui Liu.

Introduce a new DOM event, webkitshadowrootattached, which gets fired on an element
whenever a non-user-agent shadow root attached to the element.

We dispatch this event whenever DOM wrapper world is supposed to have access to all
shadow roots regardless of its mode.

Tests: Tools/TestWebKitAPI/Tests/WebKitCocoa/FormValidation.mm
       Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm

* LayoutTests/fast/dom/gc-dom-tree-lifetime-shadow-tree.html: Fixed the test to wait
with a 0s timer so that we perform the liveness check after webkitshadowrootattached
has been dispatched.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::addShadowRoot):
(WebCore::Element::enqueueShadowRootAttachedEvent):
(WebCore::Element::dispatchShadowRootAttachedEvent):
* Source/WebCore/dom/Element.h:
(WebCore::Element::didDispatchShadowRootAttachedEvent):
* Source/WebCore/dom/Event.h:
(WebCore::Event::isShadowRootAttachedEvent):
(WebCore::Event::setIsShadowRootAttachedEvent):
* Source/WebCore/dom/EventNames.json:
* Source/WebCore/dom/EventTarget.cpp:
(WebCore::EventTarget::innerInvokeEventListeners):
* Source/WebCore/dom/MutationObserver.cpp:
(WebCore::MutationObserver::enqueueShadowRootAttachedEvent):
(WebCore::MutationObserver::notifyMutationObservers):
* Source/WebCore/dom/MutationObserver.h:
* Source/WebCore/dom/Node.h:
* Source/WebCore/dom/WindowEventLoop.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/FormValidation.mm:
(TestWebKitAPI::TEST(WebKit, DidAssociateFormControls)): Deleted.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/UserContentController.mm:
(TEST(WKUserContentController, DidAssociateFormControls)):
(TEST(WKUserContentController, ShadowRootAttachedEvent)):

Canonical link: https://commits.webkit.org/300975@main
https://bugs.webkit.org/show_bug.cgi?id=300134
<rdar://161909905>

Reviewed by Aditya Keerthi and Abrar Rahman Protyasha.

Guard relevant recent changes with PANORAMA_IMAGE_CONTROLS feature flag.

* Source/WebCore/html/shadow/SpatialImageControls.cpp:
(WebCore::SpatialImageControls::shouldHaveSpatialControls):
(WebCore::SpatialImageControls::ensureSpatialControls):
* Source/WebCore/html/shadow/spatialImageControls.css:
Add new compile-time feature flag.

* LayoutTests/platform/visionos/TestExpectations:
Skip layout test since necessary changes are now compiled out.

Canonical link: https://commits.webkit.org/300976@main
https://bugs.webkit.org/show_bug.cgi?id=299813
rdar://161584294

Unreviewed build fix

* Source/WebGPU/Configurations/WebGPU.xcconfig:

Canonical link: https://commits.webkit.org/300977@main
… navigation in new process

https://bugs.webkit.org/show_bug.cgi?id=300136
rdar://161919928

Reviewed by Brian Weinstein.

This is needed to fix the TestWebKitAPI.SiteIsolation.NavigateIframeToProvisionalNavigationFailure
after unrelated changes in WebKit#51676.  Particularly, in
DocumentLoader::willSendRequest, we need to make this early return work when the parent frame is a RemoteFrame:

RefPtr parentFrame = dynamicDowncast<LocalFrame>(frame->tree().parent());
if (!parentFrame)
   return completionHandler(WTFMove(newRequest));

Removing that early return makes it so the test navigating the iframe to https://webkit.org/redirect_to_webkit_terminate
results in an _WKErrorCodeFrameLoadInterruptedByPolicyChange instead of the correct NSURLErrorNetworkConnectionLost
because the call to continueNavigationInNewProcess happens before telling the "old" process that the load will continue
in a new process, which results in the ProvisionalFrameProxy being destroyed, which sends
Messages::WebFrame::DestroyProvisionalFrame, which calls invalidatePolicyListeners with this stack trace:

WebKit::WebFrame::invalidatePolicyListeners()
WebKit::WebLocalFrameLoaderClient::cancelPolicyCheck()
WebCore::PolicyChecker::stopCheck()
WebCore::FrameLoader::stopLoading(WebCore::UnloadEventPolicy)
WebCore::FrameLoader::closeURL()
WebCore::FrameLoader::detachFromParent()
WebKit::WebFrame::destroyProvisionalFrame()

That policy listener invalidation uses PolicyAction::Ignore which sends a _WKErrorCodeFrameLoadInterruptedByPolicyChange
to the UI process.  With this change, the policy listener is correctly taken care of with
PolicyAction::LoadWillContinueInAnotherProcess before destroying the provisional frame.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedNavigationActionPolicyDecision):

Canonical link: https://commits.webkit.org/300979@main
https://bugs.webkit.org/show_bug.cgi?id=300148
rdar://161924689

Reviewed by Mike Wyrzykowski.

In public builds for iOS 26 simulator, WebGPU Swift is encountering
issues importing OpenGLES.framework. For now, disable WebGPU Swift in
this configuration only.

* Source/WebGPU/Configurations/WebGPU.xcconfig:

Canonical link: https://commits.webkit.org/300980@main
https://bugs.webkit.org/show_bug.cgi?id=300081

Reviewed by Darin Adler.

* Source/WebCore/platform/network/mac/AuthenticationMac.h:
* Source/WebCore/platform/network/mac/AuthenticationMac.mm:
(WebCore::protectedMac):
* Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations:
* Source/WebKit/Shared/Cocoa/WKObject.h:
(WebKit::protectedWrapper):
* Source/WebKit/UIProcess/Cocoa/DiagnosticLoggingClient.mm:
(WebKit::DiagnosticLoggingClient::logDiagnosticMessageWithValueDictionary):
* Source/WebKit/UIProcess/Cocoa/GlobalFindInPageState.mm:
(WebKit::findPasteboard):
* Source/WebKit/UIProcess/Cocoa/ResourceLoadDelegate.mm:
(WebKit::ResourceLoadDelegate::ResourceLoadClient::didSendRequest const):
(WebKit::ResourceLoadDelegate::ResourceLoadClient::didPerformHTTPRedirection const):
(WebKit::ResourceLoadDelegate::ResourceLoadClient::didReceiveChallenge const):
(WebKit::ResourceLoadDelegate::ResourceLoadClient::didReceiveResponse const):
(WebKit::ResourceLoadDelegate::ResourceLoadClient::didCompleteWithError const):
* Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.mm:
(WebKit::SOAuthorizationSession::presentViewController):
(WebKit::SOAuthorizationSession::dismissViewController):
* Source/WebKit/UIProcess/Cocoa/WKContactPicker.mm:
(-[WKContactPicker _contactPickerDidDismissWithContactInfo:]):
* Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm:
(-[WKShareSheet presentWithParameters:inRect:completionHandler:]):
(-[WKShareSheet presentWithShareDataArray:inRect:]):
(-[WKShareSheet sharingService:sourceWindowForShareItems:sharingContentScope:]):
(-[WKShareSheet dismiss]):

Canonical link: https://commits.webkit.org/300981@main
https://bugs.webkit.org/show_bug.cgi?id=300076
rdar://161874289

Reviewed by Ryosuke Niwa.

Address Safer CPP issues in HTMLIFrameElement.

* Source/WebCore/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:
* Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations:
* Source/WebCore/html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::attributeChanged):
(WebCore::HTMLIFrameElement::setSrcdoc):
(WebCore::isFrameLazyLoadable):
(WebCore::HTMLIFrameElement::shouldLoadFrameLazily):

Canonical link: https://commits.webkit.org/300982@main
https://bugs.webkit.org/show_bug.cgi?id=300008
rdar://161812298

Reviewed by Ryosuke Niwa.

* Source/WebKit/NetworkProcess/PrivateClickMeasurement/PrivateClickMeasurementDatabase.cpp:
(WebKit::PCM::Database::insertPrivateClickMeasurement):
(WebKit::PCM::Database::privateClickMeasurementToStringForTesting const):
(WebKit::PCM::Database::markAttributedPrivateClickMeasurementsAsExpiredForTesting):
(WebKit::PCM::Database::clearSentAttribution):
(WebKit::PCM::Database::getDomainStringFromDomainID const):
* Source/WebKit/SaferCPPExpectations/UncheckedCallArgsCheckerExpectations:

Canonical link: https://commits.webkit.org/300983@main
https://bugs.webkit.org/show_bug.cgi?id=300079

Reviewed by Darin Adler and Ryosuke Niwa.

* Source/WebKit/SaferCPPExpectations/UnretainedCallArgsCheckerExpectations:
* Source/WebKit/UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::navigationGestureWillEnd):
(WebKit::NavigationState::navigationGestureDidEnd):
(WebKit::NavigationState::willRecordNavigationSnapshot):
(WebKit::NavigationState::NavigationClient::didChangeBackForwardList):
(WebKit::NavigationState::NavigationClient::shouldGoToBackForwardListItem):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::NavigationClient::contentRuleListNotification):
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationResponse):
(WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation):
(WebKit::NavigationState::NavigationClient::didStartProvisionalLoadForFrame):
(WebKit::NavigationState::NavigationClient::didReceiveServerRedirectForProvisionalNavigation):
(WebKit::createErrorWithRecoveryAttempter):
(WebKit::NavigationState::NavigationClient::didFailProvisionalNavigationWithError):
(WebKit::NavigationState::NavigationClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::NavigationClient::didCommitNavigation):
(WebKit::NavigationState::NavigationClient::didCommitLoadForFrame):
(WebKit::NavigationState::NavigationClient::didFinishDocumentLoad):
(WebKit::NavigationState::NavigationClient::didFinishNavigation):
(WebKit::NavigationState::NavigationClient::didFinishLoadForFrame):
(WebKit::NavigationState::NavigationClient::didFailNavigationWithError):
(WebKit::NavigationState::NavigationClient::didFailLoadWithErrorForFrame):
(WebKit::NavigationState::NavigationClient::didSameDocumentNavigation):
(WebKit::NavigationState::NavigationClient::didReceiveAuthenticationChallenge):
(WebKit::NavigationState::NavigationClient::shouldAllowLegacyTLS):
(WebKit::NavigationState::NavigationClient::navigationActionDidBecomeDownload):
(WebKit::NavigationState::NavigationClient::navigationResponseDidBecomeDownload):
(WebKit::NavigationState::NavigationClient::contextMenuDidCreateDownload):

Canonical link: https://commits.webkit.org/300984@main
@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

🔄 Preview build started

Release tag: autobuild-preview-pr-113-c3634e29
Workflow: View progress

@github-actions
Copy link

✅ Preview build completed

Release: autobuild-preview-pr-113-c3634e29

@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

🔄 Preview build started

Release tag: autobuild-preview-pr-113-a8c96c80
Workflow: View progress

@github-actions
Copy link

✅ Preview build completed

Release: autobuild-preview-pr-113-a8c96c80

@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

🔄 Preview build started

Release tag: autobuild-preview-pr-113-b5329119
Workflow: View progress

@github-actions
Copy link

github-actions bot commented Nov 2, 2025

✅ Preview build completed

Release: autobuild-preview-pr-113-b5329119

@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

🔄 Preview build started

Release tag: autobuild-preview-pr-113-283d9c53
Workflow: View progress

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

⚠️ Preview build was cancelled

This may have been caused by a newer build being triggered for the same PR.

@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

🔄 Preview build started

Release tag: autobuild-preview-pr-113-bc0e18fd
Workflow: View progress

@github-actions
Copy link

⚠️ Preview build was cancelled

This may have been caused by a newer build being triggered for the same PR.

@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

🔄 Preview build started

Release tag: autobuild-preview-pr-113-be3afd1d
Workflow: View progress

@github-actions
Copy link

⚠️ Preview build was cancelled

This may have been caused by a newer build being triggered for the same PR.

@sosukesuzuki
Copy link
Member Author

/build-preview

@github-actions
Copy link

🔄 Preview build started

Release tag: autobuild-preview-pr-113-e7231e3f
Workflow: View progress

@github-actions
Copy link

✅ Preview build completed

Release: autobuild-preview-pr-113-e7231e3f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.