Upgrade to upstream WebKit 50320fd3b3 - #623
Open
robobun wants to merge 95 commits into
Open
Conversation
…() call site https://bugs.webkit.org/show_bug.cgi?id=323722 Reviewed by Darin Adler. 320652@main introduced CStringWithEncoding (UTF8CString / Latin1CString / ASCIICString) so that a CString can remember its encoding, and migrated String::ascii(), String::latin1() and the tryGetUTF8() family. It left utf8() itself returning a plain CString, with a FIXME. The blocker is not the return type but the accessor: retyping utf8() makes data() return const char8_t*, which breaks the 2516 call sites that hand utf8().data() to a %s or to a C API. This is the mechanical half of that migration, split out so that the patch which actually retypes utf8() is small enough to read. No type changes and no behavior change here. CString gains legacyCStringPointer(), which returns data() as a const char*. It is the accessor that keeps returning const char* once utf8() starts returning UTF8CString, so every utf8().data() call site is moved to utf8().legacyCStringPointer() now, while the two spellings are still equivalent and the rename is a no-op. The name is deliberately not characters(). Half of these call sites are printf-style format strings and half are external C entry points, and for UTF-8 a char is a byte of a multi-byte sequence rather than a character, so characters() would be both vague and wrong at exactly the sites adopting it. Naming the destination instead of the contents also explains why the return type is const char* and not the char8_t that would otherwise be correct for UTF-8: const char* is what C string interfaces take. It reads as intended at a %s or a WKURLCreateWithUTF8CString() argument and as misuse anywhere the result is stored, compared or iterated. The accessor CStringWithEncoding already had is renamed to match, since the two have to share a name for the Latin-1 exclusion below to keep working. Latin1CString still does not offer legacyCStringPointer(), and that is worth stating explicitly now that the base class has one: CStringWithEncoding declares its own, constrained to exclude Latin1Character, and that declaration exists in the instantiated class whether or not its constraint is satisfied, so it hides CString::legacyCStringPointer() and lookup never reaches the base. New static_asserts pin this down, since it has become a property of two classes rather than one. Getting bytes out of a Latin1CString still means slicing to CString or byteCast<char>(span()), exactly as before. Canonical link: https://commits.webkit.org/320795@main
https://bugs.webkit.org/show_bug.cgi?id=322750 rdar://185773011 Reviewed by Elliott Williams. Create a new `WebKitSwiftFlags.cmake` file to centralize all the flags as much as possible, similar to Xcode's CommonBase.xcconfig. Also add some missing flags to be more consistent with Xcode. * Source/WebCore/PAL/pal/CMakeLists.txt: * Source/WebGPU/WebGPU/CMakeLists.txt: * Source/WebKit/CMakeLists.txt: * Source/WebKit/PlatformCocoa.cmake: * Source/cmake/OptionsCocoa.cmake: * Source/cmake/WebKitCommon.cmake: * Source/cmake/WebKitMacros.cmake: * Source/cmake/WebKitSwiftFlags.cmake: Added. * Tools/TestWebKitAPI/PlatformCocoa.cmake: Canonical link: https://commits.webkit.org/320796@main
https://bugs.webkit.org/show_bug.cgi?id=323810 Reviewed by Simon Fraser. ASSERTION FAILED: stdDeviation.width() >= 0 && stdDeviation.height() >= 0 Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp(114) A negative stdDeviation turns a filter primitive off, but outsets() did not check for it and passed the value on to calculateOutsets(), which asserts. While this was discovered during LBSE testing, it is reproducible with plain CSS reference filters too - so add a new reftest to cover this. * LayoutTests/css3/filters/effect-reference-negative-deviation-expected.html: Added. * LayoutTests/css3/filters/effect-reference-negative-deviation.html: Added. * Source/WebCore/svg/SVGFEDropShadowElement.cpp: (WebCore::SVGFEDropShadowElement::outsets const): * Source/WebCore/svg/SVGFEGaussianBlurElement.cpp: (WebCore::SVGFEGaussianBlurElement::outsets const): Canonical link: https://commits.webkit.org/320797@main
https://bugs.webkit.org/show_bug.cgi?id=323790 rdar://186773323 Reviewed by Yijia Huang. "collectOnAlternateThread" is a debugging helper function exposed in DumpRenderTree / WebKitTestRunner. But its implementation and feature is broken: we cannot run GC from random alternate thread, and this never happens. This patch removes this helper function and also removes broken test, which is already skipped. * LayoutTests/TestExpectations: * LayoutTests/fast/dom/gc-8-expected.txt: Removed. * LayoutTests/fast/dom/gc-8.html: Removed. * Source/WebCore/bindings/js/GarbageCollectionController.cpp: (WebCore::GarbageCollectionController::gcTimerFired): (WebCore::collect): Deleted. (WebCore::GarbageCollectionController::garbageCollectOnAlternateThreadForDebugging): Deleted. * Source/WebCore/bindings/js/GarbageCollectionController.h: * Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleGarbageCollectJavaScriptObjectsOnAlternateThreadForDebugging): Deleted. * Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging): Deleted. * Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h: * Source/WebKitLegacy/mac/Misc/WebCoreStatistics.h: * Source/WebKitLegacy/mac/Misc/WebCoreStatistics.mm: (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]): Deleted. * Tools/DumpRenderTree/GCController.cpp: (GCController::createJSClass): (collectOnAlternateThreadCallback): Deleted. * Tools/DumpRenderTree/GCController.h: * Tools/DumpRenderTree/mac/GCControllerMac.mm: (GCController::collectOnAlternateThread const): Deleted. * Tools/WebKitTestRunner/InjectedBundle/Bindings/GCController.idl: * Tools/WebKitTestRunner/InjectedBundle/GCController.cpp: (WTR::GCController::collectOnAlternateThread): Deleted. * Tools/WebKitTestRunner/InjectedBundle/GCController.h: Canonical link: https://commits.webkit.org/320798@main
…io:completionHandler:] https://bugs.webkit.org/show_bug.cgi?id=323772 rdar://187034277 Reviewed by Elliott Williams and Jer Noble. Removed staging code for -setDisconnectedFromSystemAudio:completionHandler: now that the method is in the Public iOS 27-family SDKs. Also removed the call to -setParticipatesInAudioSession:completionHandler:, which was an old name for the method that ultimately became Public API. Moved the definition of HAVE_AVPLAYER_DISCONNECTEDFROMSYSTEMAUDIO to PlatformHave.h. * Source/WTF/wtf/PlatformHave.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateIsAudible): (WebCore::MediaPlayerPrivateAVFoundationObjC::setParticipatesInAudioSession): Deleted. Canonical link: https://commits.webkit.org/320799@main
…ings https://bugs.webkit.org/show_bug.cgi?id=323842 rdar://187081643 Unreviewed re-land of 320700@main. Test: Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageTests.swift * Source/WebKit/UIProcess/API/Cocoa/_WKTextExtractionInternal.h: * Source/WebKit/UIProcess/WebBackForwardList.swift: (Direction.pageClosed): (Direction.currentItem): (Direction.backItem): (Direction.forwardItem): (Direction.itemAtDeltaFromCurrentIndex(_:allowSkipping:)): (Direction.itemAtIndexWithoutSkipping(_:index:)): (Direction.rawBackListEntryCount): (Direction.rawForwardListEntryCount): (Direction.backListCountForAPI): (Direction.forwardListCountForAPI): (Direction.backListAsAPIArrayWithLimit(_:)): (Direction.forwardListAsAPIArrayWithLimit(_:)): (Direction.backListWithLimitInternal(_:makeAPIArray:array:)): (Direction.forwardListWithLimitInternal(_:makeAPIArray:array:)): (Direction.backForwardListState(_:)): (Direction.goBackItemSkippingItemsWithoutUserGesture): (Direction.goForwardItemSkippingItemsWithoutUserGesture): (Direction.backForwardUpdateItem(_:frameState:)): (MakeAPIArray.backListCountForAPI): Deleted. (MakeAPIArray.forwardListCountForAPI): Deleted. (MakeAPIArray.rawCounts): Deleted. (MakeAPIArray.backListAsAPIArrayWithLimit(_:)): Deleted. (MakeAPIArray.forwardListAsAPIArrayWithLimit(_:)): Deleted. (MakeAPIArray.backListWithLimitInternal(_:makeAPIArray:array:)): Deleted. (MakeAPIArray.forwardListWithLimitInternal(_:makeAPIArray:array:)): Deleted. (MakeAPIArray.removeAllItems): Deleted. (MakeAPIArray.clear): Deleted. (MakeAPIArray.backForwardListState(_:)): Deleted. (MakeAPIArray.restoreFromState(_:)): Deleted. (MakeAPIArray.setItemsAsRestoredFromSession): Deleted. (MakeAPIArray.setItemsAsRestoredFromSessionIf(_:)): Deleted. (MakeAPIArray.didRemoveItem(_:)): Deleted. (MakeAPIArray.goBackItemSkippingItemsWithoutUserGesture): Deleted. (MakeAPIArray.goForwardItemSkippingItemsWithoutUserGesture): Deleted. (MakeAPIArray.loggingString): Deleted. (MakeAPIArray.addChildItem(_:frameState:)): Deleted. (MakeAPIArray.setBackForwardItemIdentifier(_:itemID:)): Deleted. (MakeAPIArray.completeFrameStateForNavigation(_:)): Deleted. (MakeAPIArray.messageCheckItemURLs(_:process:)): Deleted. (MakeAPIArray.setHandlingProvisionalMessage(_:)): Deleted. (MakeAPIArray.backForwardAddItem(_:navigatedFrameState:)): Deleted. (MakeAPIArray.backForwardClearChildren(_:frameItemID:)): Deleted. (MakeAPIArray.backForwardUpdateItem(_:frameState:)): Deleted. (MakeAPIArray.updateFrameIdentifier(_:newFrameID:)): Deleted. (MakeAPIArray.backForwardGoToItem(_:)): Deleted. (MakeAPIArray.backForwardGoToItemShared(_:)): Deleted. (MakeAPIArray.frameStates): Deleted. * Source/WebKit/UIProcess/mac/WKTextSelectionController.h: * Tools/TestWebKitAPI/Helpers/cocoa/TestPDFDocument.h: * Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageTests.swift: (WebPageTests.qualifiedServerTrust): Canonical link: https://commits.webkit.org/320800@main
https://bugs.webkit.org/show_bug.cgi?id=323713 rdar://186968646 Reviewed by Michael Catanzaro and Kimmo Kinnunen Contains upstream commits: 9d57491334bd Vulkan: Check sdk version for Xclipse devices 375920dad65a Fix export_targets.py assertion for explicit context header 1623db027d51 D3D11: Support RGB10A2 uploads to RGB565 fallback 3a07a85bfc96 Presubmit: Ignore guarded Linux window system include 4cd68cf087a3 GL: Avoid glGetBoolean[i_]v for state queries 4b61de64bab8 Roll vulkan-deps from ab1905c50690 to c0a49d78df1b (16 revisions) b4e56ad58508 Roll Chromium from 1a43f66e2237 to f9235f771bfe (822 revisions) 80760643c85e Trace/Replay: Fix CSV shift after vk_api_wall_time ce15aa87fc1e Skip flaky test on CI 7db9cb197c57 Roll Chromium from 0aec806e5634 to 1a43f66e2237 (529 revisions) 8983f40bc8ef GL: Recreate texture on glTexImage3D with increased depth 897bad1f41b2 Roll vulkan-deps from e875a3c61231 to ab1905c50690 (12 revisions) 6f066af1045b Add //third_party/protobuf/* to include_blocklist c477cf31f7a9 D3D: Reject out-of-storage mip levels in completeness check 705ec1dcafff Roll chromium_revision cc17ba5f60..0aec806e56 580b6200fa52 Trace/Replay: Ignore side-context swaps 7869600a6dad Roll vulkan-deps from 39a28466f653 to e875a3c61231 (3 revisions) 204fa645c41b Add profileable android:shell="true" in ANGLE Test APK b0a8d52989e9 Traces: Upgrade cut_the_rope 37ebded9db31 Traces: Upgrade pubg_mobile_battle_royale 33d8f1915df0 Traces: Upgrade pubg_mobile_skydive 702bda8cd924 Traces: Upgrade pokemon_go 6cac303f1a8f EGL: disable robust buffer access on Xclipse GPUs. fd41483fbbfe Skip the timeout test on CI 2334d1b43be3 Revert "Put paletted texture formats at end of list." a26ea0324a4c Translator: Fix sampler-rewrite making fields struct specifier 6540ea90ae98 Translator: Hard code user symbol prefixes again 87f5655006e4 GL: Apply reattachTextureToFboAfterLayerIncrease to TexStorage3D 78f42c860864 Roll vulkan-deps from 1d696389f66f to 39a28466f653 (4 revisions) 35c006a36fe9 Metal: Further signed int emulation implementation f3b3ab6b3a40 Roll Chromium from ee6be91f251b to cc17ba5f6011 (847 revisions) c5d7b1561c88 SPIR-V: Count non-opaque default uniforms directly 27b11fa0fa76 A handful of tricky nameless struct tests 4d8cb8a1a37c Roll Chromium from 9bf510cf5d65 to ee6be91f251b (649 revisions) 94af7869e6cd Add EGLDisplayTest.TerminateMultipleTimesInDifferentThreads 7e5d4a2f9d95 [tracing] Clean up legacy Perfetto tracing macros in angle dbf4a195af9b Register ANGLE's track event categories with Perfetto 7f603b35e9e5 OpenCL: treat extern mem handle as integral 3aaf5212db09 Traces: Upgrade trace pack 2 for merged attribs 865d6604cf33 Vulkan: Unregister Wayland resize callback on teardown 7ae3dcf83710 Remove CPython from CIPD DEPS entry 90d3b16ba057 Fix interleaved analysis script bugs 046e6dfc215e GL: Fix querying polygon mode states 406c9799848b [DEPS] Add CPython CIPD package for hermetic Python toolchain b10b5403b57b Roll vulkan-deps from 7947c99db1dc to 1d696389f66f (4 revisions) a871bdb05932 D3D11: Fix use-after-free when redefining 2D array mip levels 0bee6bcfd4bd Vulkan: Avoid redundant read render target updates 3b227cfe0665 Skip flaky tests: R4G4B4A4_CubeTexImageRedefinedFace* 5ff3c3731a05 VK: End the active render pass if a draw attachment is cleared b5e087aaabc6 Traces: Fix merging client array ranges of size 0 03562bc68c9f Improve UpdateUniformLocation() for upgrades 5be98c8a815c OpenCL: introduce RefPointer::Create 48739e490fbc CL/Vulkan: Arrange the device caps into categories b27a30a81375 OpenCL: Move spv reflection-parse/stripping to clspv_utils c9ec7a65ccde Manual roll Chromium from ab310674f018 to 9bf510cf5d65 (971 revisions) c93844c75789 OpenCL: ValidateSetContextDestructorCallback handle invalid vals f78f99f32f93 Roll vulkan-deps from 3956868af9e3 to 7947c99db1dc (19 revisions) 9ddc6e36c1fa GL: Use correct local dirty bit for blend equations 60ccf9a219bd Skip AdvancedBlendTest.NonZeroDrawBufferDisallowed on NVIDIA/GL aa192212af54 IR: Validate matrix packing decorations 651089f2f55b D3D11: Fix crash and garbage readbacks on incomplete levels fa5faa59766d Reenable treat_warnings_as_errors on MSVC builds e0bfd7935f82 Roll chromium_revision aa9b74792a..ab310674f0 926e78c4192a OpenCL: Disable #pragma messages in angle_trace_fixture_cl e4499e6b2835 Roll vulkan-deps from ed1e17f393a0 to 3956868af9e3 (10 revisions) fff51488e419 Traces: Upgrade trace pack 1 for merged attribs fcf0b69e5fb9 Vulkan: Fix MSVC C4002 warning in perf counter macros cf00aa7716b5 Replace chromium perfetto dependencies with Android perfetto a97b01bf5c78 OpenCL: Fix pragma message disable for Loader 3456dd90b777 Revert "Update Thread current context after Context::makeCurrent" 0fd366d3e5ee Vulkan external image import uses actual formatID 6579aef92ac9 Roll vulkan-deps from 34c46f7241a1 to ed1e17f393a0 (23 revisions) 7e8009eb2c42 OpenCL: Augment Device::IsValidType to handle invalid value 2f30d621a413 CL/VK: Fix test_kernel_image_methods failures for 1Dbuffer 5677218f9761 Unify X11/Wayland backend selection on Ozone/Linux ae89e236c811 Add nullptr check for samplerParameter 346836afa5ce GN: Move angle_perfetto_cpp_dir to overrides 1a9482d28e0d Revert "Vulkan: Never emulate uint8 indices" e0ca05c106e4 GL: Fix binding offset query on ES3. 8a3236460e4a OpenCL: Disable #pragma messages 25c2b6e85402 CL/VK: Enable Enqueue Calls for 1D Image From Buffer a6e223f244f7 CL: Add additional checks on image flags to ValidateSetKernelArg 9997cb1dcf63 OpenCL: header cleanups sweep 1472b329259f D3D: Use common struct sampler rewriting for HLSL 4d87f08db6a9 CL/Vulkan: Report max alloc size with in spec bounds 1aaed28f5183 Translator: Don't apply row-major where not applicable 5295eb22f568 Vulkan: Preserve staged updates during format fallback a705032c268a GL: Update VAO index buffer binding in StateManagerGL. 36e7fe4cfe62 Allow MSVC builders to use e4 instances 254d4e24ab9b Lose context on backend error if hardened c7e5a77b65ae Automatically mark webgl contexts as hardened 7d95ab937fc3 Make sure WebGL1-specific extensions are not exposed in WebGL2 00f3b2b1732e Roll vulkan-deps from 37e841bbd2f9 to 34c46f7241a1 (16 revisions) f465d6d80df5 Roll SwiftShader from 26e6a4b84daf to 6b8d31709ad1 (1 revision) Canonical link: https://commits.webkit.org/320801@main
rdar://186306780 https://bugs.webkit.org/show_bug.cgi?id=323122 Reviewed by Elliott Williams. tvOS doesn't ship libxslt or a few private frameworks (FontParser, IOKit) that WebKit needs, so building against the public tvOS 27 SDK fails. This adds the additions SDK that symlinks the missing headers in from macOS and provides stub libraries for the missing frameworks, same pattern already used for tvOS 26 and iOS 27. FontParser and IOKit are extracted from the real internal tvOS 27 SDK. They're the full, unstripped TBDs rather than a minimal symbol subset, since generating those properly needs a successful WebKit build against the internal SDK, which I couldn't get working on this machine. Should be revisited with extract-tbds-from-internal-sdk once that's sorted out. Verified with a full local build against the public tvOS 27 SDK, combined with the tvOS-27-Build-EWS UAT fixes: no errors. * WebKitLibraries/SDKs/appletvos27.0-additions.sdk/SDKSettings.plist: Added. * WebKitLibraries/SDKs/appletvos27.0-additions.sdk/SymlinkedHeaders.xcfilelist: Added. * WebKitLibraries/SDKs/appletvos27.0-additions.sdk/SymlinkedHeaders-output.xcfilelist: Added. * WebKitLibraries/SDKs/appletvos27.0-additions.sdk/System/: Added. Canonical link: https://commits.webkit.org/320802@main
…rror-prone https://bugs.webkit.org/show_bug.cgi?id=323650 Reviewed by Yusuke Suzuki. Make the String(std::span<const char>) constructor private as it is error-prone. Instead, force callers to be explicit about the encoding of the characters they are passing in. * Source/JavaScriptCore/jsc.cpp: (JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/profiler/ProfilerOSRExit.cpp: (JSC::Profiler::OSRExit::toJSON const): * Source/JavaScriptCore/runtime/IntlCollator.cpp: (JSC::IntlCollator::sortLocaleData): * Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp: (JSC::IntlDateTimeFormat::localeData): * Source/JavaScriptCore/runtime/IntlDisplayNames.cpp: (JSC::IntlDisplayNames::of const): * Source/JavaScriptCore/runtime/IntlLocale.cpp: (JSC::IntlLocale::language): (JSC::IntlLocale::script): (JSC::IntlLocale::region): (JSC::IntlLocale::calendars): (JSC::IntlLocale::collations): (JSC::IntlLocale::timeZones): * Source/JavaScriptCore/runtime/IntlObject.cpp: (JSC::languageTagForLocaleID): (JSC::defaultCalendarForLocale): (JSC::availableCollations): (JSC::availableCurrencies): (JSC::availableNumberingSystems): * Source/JavaScriptCore/runtime/IntlPluralRules.cpp: (JSC::IntlPluralRules::resolvedOptions const): * Source/JavaScriptCore/runtime/JSONObject.cpp: (JSC::gap): * Source/JavaScriptCore/runtime/NumberPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): * Source/JavaScriptCore/tools/FunctionAllowlist.cpp: (JSC::FunctionAllowlist::FunctionAllowlist): * Source/JavaScriptCore/tools/FunctionOverrides.cpp: (JSC::parseClause): * Source/WTF/wtf/UUID.cpp: (WTF::bootSessionUUIDString): * Source/WTF/wtf/text/WTFString.cpp: * Source/WTF/wtf/text/WTFString.h: * Source/WebCore/page/Quirks.cpp: * Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm: (WebCore::FontPlatformData::variationAxes const): * Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp: (WebCore::WebMParser::OnTrackEntry): * Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp: (WebCore::FontPlatformData::variationAxes const): * Source/WebCore/platform/graphics/skia/FontPlatformDataSkia.cpp: (WebCore::FontPlatformData::variationAxes const): * Source/WebCore/platform/libwpe/PlatformPasteboardLibWPE.cpp: (WebCore::PlatformPasteboard::getTypes const): (WebCore::PlatformPasteboard::readString const): * Source/WebCore/platform/network/HTTPHeaderMap.cpp: (WebCore::HTTPHeaderMap::set): * Source/WebKit/NetworkProcess/webrtc/NetworkRTCMonitor.cpp: (WebKit::NetworkRTCMonitor::gatherNetworkMap): * Source/WebKit/NetworkProcess/webtransport/cocoa/NetworkTransportSessionCocoa.mm: (WebKit::NetworkTransportSession::initialize): * Source/WebKit/Platform/IPC/MessageReceiverMap.cpp: (IPC::MessageReceiverMap::invalidate): * Source/WebKit/Shared/RTCNetwork.cpp: (WebKit::WebRTCNetwork::SocketAddress::SocketAddress): * Source/WebKit/UIProcess/Launcher/glib/FlatpakLauncher.cpp: (WebKit::flatpakSpawn): * Source/WebKit/UIProcess/mac/WebViewImpl.mm: (WebKit::commandNameForSelector): * Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.cpp: (WebKit::LibWebRTCResolver::start): * Source/WebKitLegacy/mac/WebView/WebHTMLView.mm: (commandNameForSelector): * Tools/TestWebKitAPI/Helpers/cocoa/HTTPServer.mm: (TestWebKitAPI::parseHeaderValue): * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/EventAttribution.mm: (TestWebKitAPI::signUnlinkableTokenAndSendSecretToken): * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/ServiceWorkerBasic.mm: ((ServiceWorker, ExtensionServiceWorkerDisableCORS)): * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewConfiguration.mm: (TEST(WebKit, OverrideReferrer)): Canonical link: https://commits.webkit.org/320803@main
https://bugs.webkit.org/show_bug.cgi?id=323791 Reviewed by Adrian Taylor. The Swift Clang importer must use the same preprocessor definitions as C++ translation units. The helper that collects definitions from CMake compiler flags recognizes GCC-style -D options, but Windows CMake flags use MSVC-style /D options. This drops NDEBUG from Windows Release Swift imports and gives Swift and C++ incompatible views of assertion-dependent types. Recognize both attached and separated /D options and normalize them to -D before forwarding them to the importer. * Source/cmake/WebKitMacros.cmake: (_webkit_cxx_preprocessor_definitions): Canonical link: https://commits.webkit.org/320804@main
https://bugs.webkit.org/show_bug.cgi?id=322709 rdar://185974109 Reviewed by Mike Wyrzykowski. FontCascade would use ScopedTextMatrix get and restore the TextMatrix CGContext property. This state is not part of CGContext GState and is generally modified by CT*Draw commands. As such it cannot be expected to be saved by the CGContext using functions. Instead always explicitly set the transform when using CT. Leave the transform dirty. Works towards making FontCascadeCoreText platform context property modifications more consistent. This is needed to make GraphicsContextCG state application lazy. * Source/WebCore/platform/graphics/FontCascade.h: * Source/WebCore/platform/graphics/FontPlatformData.h: (WebCore::ScopedTextMatrix::savedMatrix const): Deleted. * Source/WebCore/platform/graphics/cocoa/GraphicsContextCocoa.mm: (WebCore::GraphicsContext::drawMultiRepresentationHEIC): * Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorder.cpp: (WebCore::DrawGlyphsRecorder::prepareInternalContext): (WebCore::DrawGlyphsRecorder::drawNativeText): * Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp: (WebCore::computeTextMatrix): (WebCore::fillVectorWithHorizontalGlyphPositions): (WebCore::fillVectorWithVerticalGlyphPositions): (WebCore::FontCascade::drawGlyphs): (WebCore::computeOverallTextMatrix): Deleted. (WebCore::computeVerticalTextMatrix): Deleted. (WebCore::showGlyphsWithAdvances): Deleted. Canonical link: https://commits.webkit.org/320805@main
…s not load any PDF content https://bugs.webkit.org/show_bug.cgi?id=323801 rdar://187047306 Reviewed by Aditya Keerthi and Wenson Hsieh. This is a follow-up to 320534@main, where we introduced the test. Thes test initialized a NSURLRequest pointing to the copying-disabled.pdf resource, but it did not actually _load_ this request, and so the test was being performed on a blank web view and was passing for the wrong reasons. To fix this, we add the missing `-synchronouslyLoadRequest:` call. * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewEditActions.mm: (TestWebKitAPI::TEST(WKWebViewEditActions, CopyMenuItemDisabledInCopyDisallowedPDF)): Canonical link: https://commits.webkit.org/320806@main
https://bugs.webkit.org/show_bug.cgi?id=323835 rdar://187070154 Reviewed by Abrar Rahman Protyasha. Expose some existing C++ helpers in Swift. * Tools/TestWebKitAPI/Helpers/cocoa/CocoaTypes.swift: Added. * Tools/TestWebKitAPI/Helpers/cocoa/TestPDFDocument.swift: Expose CocoaColor and CocoaImage type aliases. * Tools/TestWebKitAPI/Helpers/cocoa/TestCocoa.h: Ignore this file in Swift because it causes conflicts and is useless too. * Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageAndCocoaColor.mm: (TestWebKitAPI::Util::pixelColor): (TestWebKitAPI::Util::compareColors): * Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageUtilities.h: Added. * Tools/TestWebKitAPI/Helpers/cocoa/TestCocoaImageUtilities.swift: Added. (Appearance.withAppearance(_:_:)): (Appearance.makePNGData(_:color:)): (Appearance.pixelColor(of:at:)): (Appearance.compareColors(_:_:tolerance:)): (CocoaImage.isSymbol): (TestCocoaImageUtilities.pngData(_:color:)): (TestCocoaImageUtilities.pixelColor(of:at:)): (TestCocoaImageUtilities.compareColors(_:_:tolerance:)): Re-implement and expose these functions in Swift. * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/320807@main
…the lock the decoding work queue reads them under https://bugs.webkit.org/show_bug.cgi?id=323739 Reviewed by Jean-Yves Avenard. createFrameImageAtIndex() runs on AsyncImageDecoder's org.webkit.ImageDecoder work queue and takes m_sampleGeneratorLock to read m_sampleData, to read and advance m_cursor, and to read and replace the samples' decoded CGImages. readTrackMetadata() and setTrack() take the same lock to mutate that state from the main thread. Two other main-thread mutators did not. readSamples() called m_sampleData.addSample() unlocked, while the work queue searches and iterates the same SampleMap, which is backed by StdMap; inserting into a red-black tree while another thread walks it can follow pointers through a rebalance. This was already self-inconsistent, since setTrack() clears the very same container under the lock twenty lines earlier. clearFrameBufferCache() called setImage(nullptr) on each sample unlocked. Since ImageDecoderAVFObjCSample::image() hands out a raw CGImageRef, createFrameImageAtIndex()'s "RetainPtr image = sampleData->image()" loads the pointer and retains it in two steps, and this released it in between, so the work queue could retain and return freed memory. That window is reachable rather than theoretical: BitmapImageSource::destroyDecodedData() routes to clearFrameBufferCache() precisely in the branch where the work queue is not known to be idle. Take m_sampleGeneratorLock in both. readSamples() collects the samples into a Vector first and inserts them under the lock, so that reading from the AVAssetReader does not block the work queue, and still fires the encoded-data-status callback outside the lock, since that callback re-enters BitmapImageSource. Then annotate the state so this cannot regress. m_sampleData, m_cursor and m_imageRotationSession are now WTF_GUARDED_BY_LOCK(m_sampleGeneratorLock), and the main thread's unlocked reads use the assertIsOwnerThread() helpers added in 320637@main. storeSampleBuffer() and advanceCursor() are only ever called from inside createFrameImageAtIndex()'s critical section, so they declare WTF_REQUIRES_LOCK rather than locking again. sampleAtIndex() is reached both from the work queue holding the lock and from the frame-metadata accessors on the main thread without it, so it requires the lock shared, which both callers satisfy. Both unlocked writes fixed here are writes to guarded state while holding only shared access, which is exactly what this reports. m_size is deliberately left unguarded: it is only ever read on the main thread. createFrameImageAtIndex() does not touch it, and the other reader, size() by way of frameSizeAtIndex(), is reached from BitmapImageSource::fetchFrameMetaDataAtIndex() on the main thread. The comment in readTrackMetadata() claiming otherwise is corrected; only m_imageRotationSession is read off the main thread there, by storeSampleBuffer(). Note that in the default Cocoa configuration the decoder runs in the GPU process, driven purely by IPC on one thread, with no AsyncImageDecoder and so no work queue. The racing arrangement is WebContent with UseGPUProcessForMediaEnabled off, where the factory constructs ImageDecoderAVFObjC directly and AsyncImageDecoder decodes on its work queue. * Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h: * Source/WebCore/platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: (WebCore::ImageDecoderAVFObjC::readSamples): (WebCore::ImageDecoderAVFObjC::readTrackMetadata): (WebCore::ImageDecoderAVFObjC::encodedDataStatus const): (WebCore::ImageDecoderAVFObjC::frameCount const): (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const): (WebCore::ImageDecoderAVFObjC::frameDurationAtIndex const): (WebCore::ImageDecoderAVFObjC::frameHasAlphaAtIndex const): (WebCore::ImageDecoderAVFObjC::frameInfos const): (WebCore::ImageDecoderAVFObjC::clearFrameBufferCache): Canonical link: https://commits.webkit.org/320808@main
https://bugs.webkit.org/show_bug.cgi?id=320649 Reviewed by Xabier Rodriguez-Calvar. The webkitMediaStreamSrcCleanup function has to run from the main thread and it was the case everywhere excepted when the element is replaced (thus disposed) from a non-main thread by playbin3, when we send a new collection event from the element pad probe. * LayoutTests/platform/wpe/TestExpectations: * Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: (webkitMediaStreamSrcDispose): Canonical link: https://commits.webkit.org/320809@main
…efore signaling `m_uploadCondition` https://bugs.webkit.org/show_bug.cgi?id=323643 Reviewed by Nikolas Zimmermann. The type of `writeScope` is MemoryMappedGPUBuffer::AccessScope. The dtor ~AccessScope() actually syncs the buffer. We should do that before signaling the condition variable. * Source/WebCore/platform/graphics/skia/SkiaGPUAtlas.cpp: (WebCore::SkiaGPUAtlas::uploadImages): Canonical link: https://commits.webkit.org/320810@main
https://bugs.webkit.org/show_bug.cgi?id=311103 Reviewed by Nikolas Zimmermann. The combination of i915 driver and Intel Arc caused white noise for atlas image uploading. Using xe driver work fine for the video card. Using CPUMappingStrategy::GBMBoMap and unmapping in ~AccessScope() can work around the issue for i915. * Source/WebCore/platform/graphics/gbm/MemoryMappedGPUBuffer.cpp: (WebCore::runCapabilityProbe): (WebCore::MemoryMappedGPUBuffer::AccessScope::~AccessScope): Canonical link: https://commits.webkit.org/320811@main
…e-mediaelementaudiosourcenode-interface/no-cors.https.html is a flaky crashing https://bugs.webkit.org/show_bug.cgi?id=316192 Reviewed by Xabier Rodriguez-Calvar. Flaky crashes were happening because playbin was reporting a successful change to playing state while the audio sink was performing an asynchronous transition and hadn't reached the playing state yet. In such situation we now make a blocking get_state() call until the asynchronous transition was completed. * LayoutTests/platform/glib/TestExpectations: * Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::areAllSinksPlayingForBin): Canonical link: https://commits.webkit.org/320812@main
…oop and its caller's thread without synchronization https://bugs.webkit.org/show_bug.cgi?id=323742 Reviewed by Jean-Yves Avenard. Frames are generated on m_runLoop, a dedicated run loop, while the source is controlled from the caller's thread; generateFrame() and generatePhoto() assert !isMainThread() to say so. The class already guards m_imageBuffer and m_drawingState with a lock, makes m_isTakingPhoto and m_captureWasInterrupted atomic, and marshals timer start and stop onto m_runLoop. Five members were left out of all of that, and the run loop reaches four of them indirectly, through helper calls, which is what kept them hidden: - m_startTime and m_elapsedTime are written by startProducingData() and stopProducingData(), and read by elapsedTime(), which drawText() and MockRealtimeVideoSourceMac::updateSampleBuffer() both call while generating a frame. - m_preset is written by applyFrameRateAndZoomWithPreset() and read by captureSize(), which the whole draw path calls. - m_deviceOrientation is written by orientationChanged() and rotationAngleForHorizonLevelDisplayChanged(), and read by videoFrameRotation() from updateSampleBuffer(). - m_delayUntil is written by delaySamples() and both read and cleared by generateFrame(). Each is fixed by whichever mechanism matches how it is reached rather than by one blanket approach. m_startTime, m_elapsedTime and m_preset become WTF_GUARDED_BY_LOCK: every reader on the run loop already held the lock, so only the writers needed changing, and elapsedTime() and captureSize() get assertIsHeld() to match how the surrounding code already declares this. m_deviceOrientation becomes atomic instead, because the lock does not fit it: videoFrameRotation() is virtual on RealtimeMediaSource and so may be called from anywhere, and settings() reads the member on the caller's thread. m_delayUntil moves entirely onto m_runLoop by dispatching from delaySamples(), the same way startCaptureTimer() and stopCaptureTimer() already work; the deadline is still computed at call time so it does not shift with dispatch latency. Annotating m_preset immediately turned up a third accessor that reading the code had not: settings() reads it on the caller's thread, which now takes the lock for that one read. applyFrameRateAndZoomWithPreset() is restructured so setIntrinsicSize(), which notifies observers, is not called while holding the lock. The lock is renamed from m_imageBufferLock to m_frameGenerationLock. It already guarded m_drawingState and now covers three further members that are not image buffers. None of this is reachable by web content: MockRealtimeVideoSource is only created by MockRealtimeMediaSourceCenter, that is, when mock capture devices are enabled for testing. Nor was any of it a memory-safety problem, since everything read across the thread boundary is plain data, a MonotonicTime, a Seconds, an enum, or the IntSize inside m_preset. The visible symptom would have been a wrong timestamp, rotation or frame size in a generated mock frame. * Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp: (WebCore::MockRealtimeVideoSource::takePhotoInternal): (WebCore::MockRealtimeVideoSource::settings): (WebCore::MockRealtimeVideoSource::applyFrameRateAndZoomWithPreset): (WebCore::MockRealtimeVideoSource::captureSize const): (WebCore::MockRealtimeVideoSource::invalidateDrawingState): (WebCore::MockRealtimeVideoSource::drawingState): (WebCore::MockRealtimeVideoSource::settingsDidChange): (WebCore::MockRealtimeVideoSource::startProducingData): (WebCore::MockRealtimeVideoSource::stopProducingData): (WebCore::MockRealtimeVideoSource::elapsedTime): (WebCore::MockRealtimeVideoSource::drawText): (WebCore::MockRealtimeVideoSource::delaySamples): (WebCore::MockRealtimeVideoSource::generatePhoto): (WebCore::MockRealtimeVideoSource::generateFrameInternal): (WebCore::MockRealtimeVideoSource::generateFrame): (WebCore::MockRealtimeVideoSource::imageBuffer): (WebCore::MockRealtimeVideoSource::imageBufferInternal): (WebCore::MockRealtimeVideoSource::orientationChanged): * Source/WebCore/platform/mock/MockRealtimeVideoSource.h: (WebCore::MockRealtimeVideoSource::WTF_GUARDED_BY_LOCK): Canonical link: https://commits.webkit.org/320813@main
https://bugs.webkit.org/show_bug.cgi?id=323860 rdar://187098845 Reviewed by Alexey Proskuryakov. * LayoutTests/fast/harness/test-duration-treemap.html: Canonical link: https://commits.webkit.org/320814@main
…ang the run https://bugs.webkit.org/show_bug.cgi?id=322171 Reviewed by Carlos Alberto Lopez Perez. pytest-timeout raises from its SIGALRM handler wherever the alarm lands. When that is inside asyncio's scheduler, for instance while Future.set_result() is queueing the wake-up of the task awaiting it, the future is marked done but the wake-up is never scheduled. asyncio swallows the exception as "Exception in callback", the test task is parked for good, and the loop keeps servicing the websockets keepalive until someone kills the bot. Every run of the BiDi tests expected to time out goes through this path. Wrap the handler pytest-timeout installs so that, while an event loop is running, the alarm is only delivered from the selector the idle loop is blocked in, where the exception propagates cleanly out of run_until_complete(). Anywhere else inside the loop it is re-armed a few milliseconds later instead. Also match the timeout message pytest-timeout 2.4.0 produces, which has been making unexpected timeouts show up as failures since the bump. * Tools/Scripts/webkitpy/webdriver_tests/pytest_runner.py: (SubtestResultRecorder._was_timeout): (TimeoutSignalHandler): (TimeoutSignalHandler.pytest_timeout_set_timer): (TimeoutSignalHandler._should_defer_timeout): (run): Canonical link: https://commits.webkit.org/320815@main
…leCopyFromMemory times out on regions of 4 GB and above https://bugs.webkit.org/show_bug.cgi?id=323626 Reviewed by Carlos Alberto Lopez Perez. 320449@main added SharedMemoryTests.cpp to the CMake build, so it runs on the GTK and WPE ports for the first time. The test tolerates the 4 GB + 1 and 20 GB regions failing to allocate and skips them in that case. On Linux the allocation never fails because of overcommit, and CreateHandleCopyFromMemory, the only one of these tests that does any work outside Cocoa, then copies the whole region into a freshly created memfd. That commits up to 42 GB and takes around 30 seconds even when run alone, at the timeout of run-api-tests, so every GTK and WPE bot times out on these cases. Outside Cocoa these sizes only exercise a memcpy into shared memory, which the smaller regions already cover, so leave them to Cocoa, matching how the memory sources are already selected per platform. * Tools/TestWebKitAPI/Tests/WebCore/SharedMemoryTests.cpp: Canonical link: https://commits.webkit.org/320816@main
https://bugs.webkit.org/show_bug.cgi?id=323838 Reviewed by Yusuke Suzuki. m_atom and m_specificPattern depend only on the pattern, like m_numSubpatterns and m_rareData which deleteCode() already keeps, so stop clearing them. Test: JSTests/stress/regexp-cached-result-one-character-atom-delete-all-code.js * JSTests/stress/regexp-cached-result-one-character-atom-delete-all-code.js: Added. (shouldBe): (step): * Source/JavaScriptCore/runtime/RegExp.cpp: (JSC::RegExp::deleteCode): Canonical link: https://commits.webkit.org/320817@main
…loop callbacks <rdar://181438985> Reviewed by Jonathan Bedard. The WebQueuedVideoOutputDelegate callbacks and the AVFoundation time observer blocks hop their work to the main run loop capturing only a WeakPtr to the QueuedVideoOutput, then dereference it as a raw pointer after a plain null check. The null check does not keep the object alive: addVideoFrameEntries() fires the current-image-changed observers, which can synchronously tear down the media player and release the last strong reference to the QueuedVideoOutput while the callback is still on the stack, so the trailing member access reads freed memory. Promote the captured WeakPtr to a RefPtr inside each block before use so the object is kept alive for the duration of the call. The sole strong owner only ever runs on the main thread, so the non-atomic RefPtr is sufficient and no ThreadSafeRefCounted change is needed. No new tests since this change is not directly testable. * Source/WebCore/platform/graphics/avfoundation/objc/QueuedVideoOutput.mm: (-[WebQueuedVideoOutputDelegate outputMediaDataWillChange:]): (-[WebQueuedVideoOutputDelegate outputSequenceWasFlushed:]): (-[WebQueuedVideoOutputDelegate observeValueForKeyPath:ofObject:change:context:]): (WebCore::QueuedVideoOutput::QueuedVideoOutput): (WebCore::QueuedVideoOutput::configureNextImageTimeObserver): Originally-landed-as: 305413.1094@safari-7624.5-branch (f53714d). rdar://184745139 Canonical link: https://commits.webkit.org/320818@main
https://bugs.webkit.org/show_bug.cgi?id=323628 Reviewed by Yusuke Suzuki. JSWebAssemblyArray::fill of ref elements stored encoded JSValues one at a time. Concurrent GC needs whole 8-byte writes. Add gcSafeMemfill next to gcSafeZeroMemory and use it for that path, then one write barrier, matching array.copy. * Source/JavaScriptCore/heap/GCMemoryOperations.h: * Source/JavaScriptCore/wasm/js/JSWebAssemblyArray.cpp: * JSTests/wasm/gc/bulk-array-element-types.js: Canonical link: https://commits.webkit.org/320819@main
https://bugs.webkit.org/show_bug.cgi?id=323663 Reviewed by Carlos Garcia Campos. Macros from libmanette: LIBMANETTE_CHECK_VERSION(deprecated) and MANETTE_CHECK_VERSION evaluate to TRUE in case of greater than or equal to. This caused that in case of version 0.2.13 wrong values were passed to manette_device_rumble (normalized floating-point rumble magnitudes) and it was rounded to 0 (guint16). The normalized floating-point rumble magnitudes are demanded in case of libmanette version >= 1.0.0. Also deprecated macro is replaced with the new one. No new tests. * Source/WebCore/platform/gamepad/manette/ManetteGamepad.cpp: (WebCore::ManetteGamepad::startRumble): * Source/WebKit/WPEPlatform/wpe/WPEGamepadManette.cpp: (wpeGamepadManetteRumble): Canonical link: https://commits.webkit.org/320820@main
https://bugs.webkit.org/show_bug.cgi?id=323440 https://bugs.webkit.org/show_bug.cgi?id=323441 Reviewed by Yusuke Suzuki. grow and resize used ToIntegerOrInfinity and then cast to size_t after only checking finite and non-negative. A value such as 1e20 is in range for double but not for size_t. Use toIndex so the result is uint64_t and a negative length throws RangeError before the detached check. * JSTests/stress/arraybuffer-grow-resize-huge-length.js: Added. * Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp: (arrayBufferProtoFuncResize): (sharedArrayBufferProtoFuncGrow): Canonical link: https://commits.webkit.org/320821@main
https://bugs.webkit.org/show_bug.cgi?id=323841 Reviewed by Darin Adler. * Source/JavaScriptCore/bytecode/SpeculatedType.cpp: (JSC::speculationFromString): * Source/JavaScriptCore/bytecode/SpeculatedType.h: * Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp: (JSC::BytecodeIntrinsicNode::emit_intrinsic_idWithProfile): * Source/JavaScriptCore/wasm/debugger/tests/BinaryTests.cpp: (WasmDebugInfoTest::testAllBinaryOps): * Source/JavaScriptCore/wasm/debugger/testwasmdebugger.cpp: (testWASMVirtualAddressEncoding): Canonical link: https://commits.webkit.org/320822@main
https://bugs.webkit.org/show_bug.cgi?id=323862 rdar://187104927 Reviewed by Zak Ridouh. The parameter is named three different things: itemIndex in .messages.in, index in WebBackForwardList.h, and delta in both WebBackForwardList.cpp and the Swift implementation. It is a delta - it is passed to itemAtDeltaFromCurrentIndex, and Int32::min is rejected because it cannot be negated - so settle on that. No behaviour change. The .messages.in name is only used as a descriptive string in the generated MessageArgumentDescriptions for the IPC testing API. Canonical link: https://commits.webkit.org/320823@main
https://bugs.webkit.org/show_bug.cgi?id=323720 Reviewed by Carlos Garcia Campos. Add a check for the underlying `sk_sp<SkImageFilter>` before using it. * Source/WebCore/platform/graphics/skia/SkiaCompositingLayer.cpp: (WebCore::SkiaCompositingLayer::paintWithFilterAndMask): * LayoutTests/compositing/filters/repeated-filter-transitions.html: Added. * LayoutTests/compositing/filters/repeated-filter-transitions-expected.txt: Added. Canonical link: https://commits.webkit.org/320824@main
https://bugs.webkit.org/show_bug.cgi?id=323833 rdar://187056807 Reviewed by Chris Dumez. It may not always be present, and this change fixes a build issue when that's the case. * Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.adattributiond.sb.in: * Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.webpushd.sb.in: Canonical link: https://commits.webkit.org/320866@main
…clears m_remoteGPUMap https://bugs.webkit.org/show_bug.cgi?id=323734 rdar://185543414 Reviewed by Kimmo Kinnunen. GPUConnectionToWebProcess::didClose() clears m_remoteRenderingBackendMap to break the cycle formed by RemoteRenderingBackend's strong ref back to the connection. However RemoteGPU, which lives in m_remoteGPUMap, also holds a strong ref to RemoteRenderingBackend. m_remoteGPUMap is never cleared: its only removal path is releaseGPU(), reached from an explicit ReleaseRemoteGPU message that never arrives when the WebContent process simply exits, which is exactly the case didClose() handles. So clearing m_remoteRenderingBackendMap only drops the map's own reference, and any backend still held by a RemoteGPU stays alive. Those surviving RemoteRenderingBackend objects are what drives the unbounded growth. Each holds a strong ref to RemoteSharedResourceCache, which owns a per-connection WebCore::IOSurfacePool, and ~IOSurfacePool() is the only thing that empties that pool outside of memory pressure. Every pooled "WebKit LayerBacking" IOSurface therefore stays allocated for the lifetime of the GPU process. Each backend also holds a strong ref to the GPUConnectionToWebProcess itself, so the whole connection and the rest of its object graph leak with it. The fix is to clear m_remoteGPUMap in didClose(), before m_remoteRenderingBackendMap, so the backends are actually released when their map entry goes. RemoteGPU has the same stopListeningForIPC() teardown as the objects in the maps didClose() already clears, so ScopedActiveMessageReceiveQueue tears it down identically. * Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp: (WebKit::GPUConnectionToWebProcess::didClose): Canonical link: https://commits.webkit.org/320867@main
….EnhancedSecurityPolicies.* (api-tests) are constant Fails. https://bugs.webkit.org/show_bug.cgi?id=323907 rdar://187144386 Unreviewed test gardening. * TestExpectations/apitests: Canonical link: https://commits.webkit.org/320868@main
https://bugs.webkit.org/show_bug.cgi?id=323901 rdar://187139244 Reviewed by Abrar Rahman Protyasha and Elliott Williams. * Tools/TestWebKitAPI/PlatformCocoa.cmake: * Tools/TestWebKitAPI/Scripts/generate-unified-sources.sh: * Tools/TestWebKitAPI/SourcesCocoa.txt: * Tools/TestWebKitAPI/SourcesMac.txt: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/UnifiedSources-output.xcfilelist: Canonical link: https://commits.webkit.org/320869@main
… reach the client https://bugs.webkit.org/show_bug.cgi?id=323687 rdar://186946399 Reviewed by Brady Eidson. SiteIsolation.QueuedDialogPurgedByMainFrameNavigation fails with SiteIsolationSharedProcessEnabled. When two iframes end up in the same process, the modal run loop for the first frame's alert() blocks the second frame's script, so its request only reaches the UI process after the first dialog is dismissed. purgeQueuedModalDialogs() has long since run - it fires when the main frame starts a provisional load - so the late request is queued and shown, on behalf of a page the user has already left. This is not specific to shared process mode: two same-site iframes share a process in the default configuration and reproduce it, which is what the new test QueuedSameProcessDialogPurgedByMainFrameNavigation covers. Check in WebPageProxy::runModalJavaScriptDialog, the single funnel for alert, confirm and prompt, that the requesting frame is still in the displayed frame tree, and cancel it if not. DialogDisposition::Cancel is the path the purge already uses: it replies to the Web process so the blocked alert() returns, without invoking the UI client. The check runs again on the way out of the queue, since the tree can change while a request waits there. This is a frame-identity check, so it is not the complete fix. It cannot separate two documents that share one WebFrameProxy - ProvisionalPageProxy's m_shouldReuseMainFrame branch - and for a same-process main frame navigation it only takes effect once didDestroyFrame has arrived, so it depends on that teardown IPC rather than on the commit. The complete fix is document identity: compare the requesting document's identifier against the one committed in that frame, and that frame's top document against the main frame's. It is blocked on a separate defect - on a back/forward cache restore didCommitLoadForFrame reports the identifier of the document being navigated away from, because FrameLoader::commitProvisionalLoad dispatches the commit before it restores the cached page - and will be followed up separately. Verified that a back/forward cache restore is not over-refused: after going back, dialogs from the restored main frame and from its restored cross-site subframe are still delivered. Tests: SiteIsolation.QueuedSameProcessDialogPurgedByMainFrameNavigation * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::isInDisplayedFrameTree): (WebKit::WebPageProxy::runModalJavaScriptDialog): (WebKit::WebPageProxy::runNextModalJavaScriptDialogIfNeeded): (WebKit::WebPageProxy::purgeQueuedModalDialogs): * Source/WebKit/UIProcess/WebPageProxy.h: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm: (TestWebKitAPI::TEST(SiteIsolation, QueuedDialogPurgedByMainFrameNavigation)): (TestWebKitAPI::TEST(SiteIsolation, QueuedSameProcessDialogPurgedByMainFrameNavigation)): Canonical link: https://commits.webkit.org/320870@main
https://bugs.webkit.org/show_bug.cgi?id=323884 rdar://187125310 Reviewed by Simon Fraser. Remote snapshotting creates a recorder with an empty clipping rectangle. SVGImage intersects the srcRect with the context clipping rectangle before drawing. The result of this intersection is always an empty rectangle. Therefore all SVGImages are not rendered. The fix is to pass the snapshotRect to the recorder creation as the initialClip. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSnapshot.mm * Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::createSnapshotRecorder): * Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * Source/WebKit/WebProcess/GPU/graphics/RemoteSnapshotRecorderProxy.cpp: (WebKit::RemoteSnapshotRecorderProxy::RemoteSnapshotRecorderProxy): * Source/WebKit/WebProcess/GPU/graphics/RemoteSnapshotRecorderProxy.h: * Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm: (WebKit::WebPage::drawPrintingRectToSnapshot): (WebKit::WebPage::drawPrintingPagesToSnapshot): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::takeRemoteSnapshot): (WebKit::WebPage::drawToSnapshot): (WebKit::WebPage::drawFrameToSnapshot): * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/WKWebViewSnapshot.mm: (TestWebKitAPI::TEST(WKWebView, RemoteSnapshotSVGImageClipping)): * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::drawPrintingToSnapshotiOS): (WebKit::WebPage::drawPrintingPagesToSnapshotiOS): Canonical link: https://commits.webkit.org/320871@main
…er boxes https://bugs.webkit.org/show_bug.cgi?id=323802 <rdar://problem/187048839> Reviewed by Antti Koivisto. This is in preparation for not adjusting computed style for layout boxes. Some elements always get a block container renderer, whatever their computed display value is (e.g. <input style="display: inline"> or <fieldset style="display: inline">). * LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-inline-on-block-container-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-inline-on-block-container-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-display/display-inline-on-block-container.html: Added. * Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp: (WebCore::LayoutIntegration::BoxTreeUpdater::adjustStyleIfNeeded): * Source/WebCore/layout/layouttree/LayoutBox.cpp: (WebCore::Layout::Box::isInlineBlockBox const): Canonical link: https://commits.webkit.org/320872@main
…and in the final output https://bugs.webkit.org/show_bug.cgi?id=323177 rdar://186420926 Reviewed by Aakash Jain. BenchmarkResults flattened the values of every iteration together before aggregating them, so a run only ever reported one number per metric once all of the iterations had finished. A long benchmark therefore gave no feedback at all until the very end. Keep the shape of the subtest values so that they can be aggregated per iteration, and report the aggregate of each iteration as a "per-iteration" suffix in the summary. BenchmarkResults.format() takes a new show_iteration_aggregates argument so that a caller can ask for the summary without that suffix. It defaults to None, which means "not show_iteration_raw_values", so the output of every existing caller is unchanged. BenchmarkRunner uses that to report progress while the benchmark is running. After each iteration it formats that iteration's own result with max_depth=1, which reports the top level metric only and never the subtests, and logs it right after the "End the iteration" line. The iteration aggregates are turned off there because they are meaningless for a single iteration. A result that cannot be formatted is logged as a warning instead, so that it cannot abort an otherwise successful run. Rename --show-iteration-values to --show-iteration-raw-values, keeping the old spelling as an alias, and label its output "raw" to tell it apart from the per-iteration suffix. * Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py: (BenchmarkResults.format): (BenchmarkResults._format_tests): (BenchmarkResults._format_values): (BenchmarkResults._mean): (BenchmarkResults._aggregate_results_for_test): (BenchmarkResults._aggregate_values_by_iteration): (BenchmarkResults._subtest_values_by_config_iteration): (BenchmarkResults._value_buckets_like): (BenchmarkResults._collect_values): * Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py: (BenchmarkResultsTest.test_format): (BenchmarkResultsTest.test_format_with_depth_limit): (BenchmarkResultsTest.test_format_without_iteration_aggregates): (BenchmarkResultsTest.test_format_values_with_iteration_raw_values): (BenchmarkResultsTest.test_format_values_with_no_unit_scaling_and_iteration_raw_values): (BenchmarkResultsTest.test_format_values_with_iteration_aggregates): (BenchmarkResultsTest.test_aggregate_results_with_gropus): (BenchmarkResultsTest.test_format_results_with_groups): * Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner.py: (BenchmarkRunner.__init__): (BenchmarkRunner._run_benchmark): (BenchmarkRunner.show_results): (BenchmarkRunner._format_iteration_results): (BenchmarkRunner._show_iteration_results): * Tools/Scripts/webkitpy/benchmark_runner/benchmark_runner_unittest.py: (iteration_result_with_score): (FormatIterationResultsTest.test_only_top_level_metrics_are_formatted): (FormatIterationResultsTest.test_scale_unit_is_honored): (FormatIterationResultsTest.test_debug_output_is_ignored): (FormatIterationResultsTest.test_grouped_values_within_one_iteration): (MockBrowserDriver.prepare_initial_env): (MockBrowserDriver.prepare_env): (MockBrowserDriver.restore_env): (MockBrowserDriver.restore_env_after_all_testing): (FakeBenchmarkRunner.__init__): (FakeBenchmarkRunner._run_one_test): (ShowIterationResultsTest.test_logs_top_level_metrics): (ShowIterationResultsTest.test_honors_runner_formatting_options): (ShowIterationResultsTest.test_honors_show_iteration_raw_values): (ShowIterationResultsTest.test_malformed_results_are_reported_but_not_raised): (RunBenchmarkIterationLoggingTest.test_top_level_metrics_are_logged_after_each_iteration): * Tools/Scripts/webkitpy/benchmark_runner/run_benchmark.py: (config_argument_parser): (run_benchmark_plan): (start): * Tools/Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py: (WebServerBenchmarkRunner.__init__): Canonical link: https://commits.webkit.org/320873@main
…he disabled mode https://bugs.webkit.org/show_bug.cgi?id=321855 rdar://185010027 Reviewed by Chris Dumez. HTML, 6.11.3.2 The DataTransferItem interface <https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitem-interface>: When the DataTransferItem object's DataTransfer object is not associated with a drag data store, or if the item that the DataTransferItem object represents has been removed from the relevant drag data store item list, the DataTransferItem object's mode is the disabled mode. The kind attribute must return the empty string if the DataTransferItem object is in the disabled mode; otherwise it must return the string given in the cell from the second column of the following table [...] WebKit already tracks removal from the item list: DataTransferItemList's remove(), clear(), didClearStringData() and didSetStringData() clear the item's list back-pointer, which is what isInDisabledMode() tests. type(), getAsString() and getAsFile() all honor it; kind() was the one getter that did not, so an item removed by items.remove(), items.clear(), clearData(), or a setData() call replacing the same type string ended up self-inconsistent, with an empty type but a kind still reporting "string" or "file". Return the empty string from kind() when the item is in the disabled mode, as type() already does. The two editing/pasteboard tests that cover the disabled mode expected the old self-inconsistent behavior, so their kind expectations move from "string" to the empty string. While here, the tail of datatransfer-items-copy-html.html was dead code: it used shouldBe() with a bare 'string' / 'text/html' as the expected *expression*, so the first of those threw "ReferenceError: Can't find variable: string" out of the copy event handler and silently skipped the remaining eight assertions (the ReferenceError was baked into the baseline). Those become shouldBeEqualToString(), which is what the rest of the file uses, and the now-running assertions cover kind and type of an item disabled by items.remove(). The last getAsString() there also reused checkContent(4), whose expected content belongs to a different item; it becomes checkContent(5). Test: imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransferitem-disabled-mode.html * LayoutTests/editing/pasteboard/datatransfer-items-copy-html-expected.txt: * LayoutTests/editing/pasteboard/datatransfer-items-copy-html.html: * LayoutTests/editing/pasteboard/datatransfer-items-copy-plaintext-expected.txt: * LayoutTests/editing/pasteboard/datatransfer-items-copy-plaintext.html: * LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransferitem-disabled-mode-expected.txt: Added. * LayoutTests/imported/w3c/web-platform-tests/html/editing/dnd/datastore/datatransferitem-disabled-mode.html: Added. * Source/WebCore/dom/DataTransferItem.cpp: (WebCore::DataTransferItem::kind const): Canonical link: https://commits.webkit.org/320874@main
…ed FontBase https://bugs.webkit.org/show_bug.cgi?id=323588 rdar://186827128 Reviewed by Cameron McCormack. This work is a step toward using thread-safe Font objects in GPUProcess. Similar to what we did for images in GPUProcess, we want to separate Font's drawing functionality from the rest of the class. For images, we split NativeImage out from BitmapImageSource/ImageFrame: the former is used for displaying the image and is what gets transferred from the WebContent process to GPUProcess, while the latter handles image layout, providing information such as image size and orientation. This change introduces a new class, FontBase, which can be passed to FontCascade::drawGlyphs and is capable of drawing glyphs only. Font now inherits from FontBase, and in addition to drawing, it still owns the glyph tables and handles glyph measurement and layout. Font remains RefCounted, as before. A follow-up PR will add a thread-safe class that also inherits from FontBase and, like it, can only draw glyphs. This restriction makes sense because GPUProcess shouldn't be responsible for mapping characters to glyphs or decomposing colored glyphs into their components — it should only call drawGlyphsImmediate(). RemoteRenderingBackend will create instances of this new class instead of Font, so they can be shared across threads. This also means 317722@main will be reverted: DrawGlyphs will hold a Ref<FontBase>, and DrawGlyphs::draw() will call drawGlyphsImmediate() instead of calling drawGlyphs(). * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/graphics/Font.cpp: (WebCore::Font::Font): (WebCore::m_shouldNotBeUsedForArabic): Deleted. (WebCore::Font::renderingResourceIdentifier const): Deleted. (WebCore::FontInternalAttributes::ensureRenderingResourceIdentifier const): Deleted. (WebCore::Font::mathData const): Deleted. (WebCore::Font::platformCharHeightInit): (WebCore::Font::applyFontMetricsOverrides): Deleted. * Source/WebCore/platform/graphics/Font.h: (WebCore::Font::createSystemFallbackFontPlaceholder): (WebCore::Font::isSystemFontFallbackPlaceholder const): Deleted. (WebCore::Font::hasVerticalGlyphs const): Deleted. (WebCore::Font::origin const): Deleted. (WebCore::Font::isInterstitial const): Deleted. (WebCore::Font::visibility const): Deleted. (WebCore::Font::allowsAntialiasing const): Deleted. (WebCore::Font::shouldNotBeUsedForArabic const): Deleted. (WebCore::Font::setIsUsedInSystemFallbackFontCache): Deleted. (WebCore::Font::isUsedInSystemFallbackFontCache const): Deleted. (WebCore::Font::isTextOrientationFallback const): Deleted. (WebCore::Font::sizePerUnit const): Deleted. (WebCore::Font::syntheticBoldOffset const): Deleted. (WebCore::Font::ctFont const): Deleted. (WebCore::Font::ComplexColorFormatGlyphs::hasRelevantTables const): Deleted. (WebCore::Font::ComplexColorFormatGlyphs::bitForInitialized): Deleted. (WebCore::Font::ComplexColorFormatGlyphs::bitForValue): Deleted. (WebCore::Font::ComplexColorFormatGlyphs::bitsRequiredForGlyphCount): Deleted. (WebCore::Font::ComplexColorFormatGlyphs::ComplexColorFormatGlyphs): Deleted. (WebCore::Font::maxCharWidth const): Deleted. (WebCore::Font::setMaxCharWidth): Deleted. (WebCore::Font::avgCharWidth const): Deleted. (WebCore::Font::setAvgCharWidth): Deleted. (WebCore::Font::spaceWidth const): Deleted. * Source/WebCore/platform/graphics/FontBase.cpp: Added. (WebCore::FontBase::FontBase): (WebCore::FontBase::mathData const): (WebCore::FontInternalAttributes::ensureRenderingResourceIdentifier const): (WebCore::FontBase::renderingResourceIdentifier const): (WebCore::FontBase::applyFontMetricsOverrides): * Source/WebCore/platform/graphics/FontBase.h: Added. (WebCore::FontBase::origin const): (WebCore::FontBase::isInterstitial const): (WebCore::FontBase::visibility const): (WebCore::FontBase::isTextOrientationFallback const): (WebCore::FontBase::isSystemFontFallbackPlaceholder const): (WebCore::FontBase::allowsAntialiasing const): (WebCore::FontBase::hasVerticalGlyphs const): (WebCore::FontBase::isUsedInSystemFallbackFontCache const): (WebCore::FontBase::setIsUsedInSystemFallbackFontCache): (WebCore::FontBase::shouldNotBeUsedForArabic const): (WebCore::FontBase::verticalData const): (WebCore::FontBase::sizePerUnit const): (WebCore::FontBase::syntheticBoldOffset const): (WebCore::FontBase::ctFont const): (WebCore::FontBase::ComplexColorFormatGlyphs::hasRelevantTables const): (WebCore::FontBase::ComplexColorFormatGlyphs::bitForInitialized): (WebCore::FontBase::ComplexColorFormatGlyphs::bitForValue): (WebCore::FontBase::ComplexColorFormatGlyphs::bitsRequiredForGlyphCount): (WebCore::FontBase::ComplexColorFormatGlyphs::ComplexColorFormatGlyphs): (WebCore::FontBase::spaceWidth const): (WebCore::FontBase::maxCharWidth const): (WebCore::FontBase::setMaxCharWidth): (WebCore::FontBase::avgCharWidth const): (WebCore::FontBase::setAvgCharWidth): * Source/WebCore/Headers.cmake: * Source/WebCore/platform/graphics/FontInlines.h: (WebCore::Font::verticalData const): Deleted. * Source/WebCore/platform/graphics/coretext/FontCoreText.cpp: (WebCore::FontBase::supportsOpenTypeAlternateHalfWidths const): (WebCore::FontBase::supportsSmallCaps const): (WebCore::FontBase::supportsAllSmallCaps const): (WebCore::FontBase::supportsPetiteCaps const): (WebCore::FontBase::supportsAllPetiteCaps const): (WebCore::FontBase::otSVGTable const): (WebCore::FontBase::hasComplexColorFormatTables const): (WebCore::FontBase::glyphsWithComplexColorFormat const): (WebCore::FontBase::glyphHasComplexColorFormat const): (WebCore::FontBase::metricsForMultiRepresentationHEIC const): (WebCore::Font::supportsOpenTypeAlternateHalfWidths const): Deleted. (WebCore::Font::supportsSmallCaps const): Deleted. (WebCore::Font::supportsAllSmallCaps const): Deleted. (WebCore::Font::supportsPetiteCaps const): Deleted. (WebCore::Font::supportsAllPetiteCaps const): Deleted. (WebCore::Font::otSVGTable const): Deleted. (WebCore::Font::hasComplexColorFormatTables const): Deleted. (WebCore::Font::glyphsWithComplexColorFormat const): Deleted. (WebCore::Font::glyphHasComplexColorFormat const): Deleted. (WebCore::Font::metricsForMultiRepresentationHEIC const): Deleted. (WebCore::fontHasEitherTable): (WebCore::supportsOpenTypeFeature): (WebCore::FontBase::platformInit): (WebCore::Font::platformCharHeightInit): (WebCore::FontBase::findOTSVGGlyphs const): (WebCore::FontBase::hasAnyComplexColorFormatGlyphs const): (WebCore::Font::platformInit): Deleted. (WebCore::Font::findOTSVGGlyphs const): Deleted. (WebCore::Font::hasAnyComplexColorFormatGlyphs const): Deleted. * Source/WebCore/platform/graphics/skia/FontSkia.cpp: (WebCore::FontBase::buildTextBlob const): (WebCore::FontBase::enableAntialiasing const): (WebCore::Font::buildTextBlob const): Deleted. (WebCore::Font::enableAntialiasing const): Deleted. (WebCore::FontBase::platformInit): (WebCore::Font::platformInit): Deleted. * Source/WebCore/platform/graphics/FontBaseline.h: * Source/WebCore/platform/graphics/FontMetrics.h: * Source/WebCore/platform/graphics/FontCascade.h: * Source/WebCore/platform/graphics/cairo/FontCairo.cpp: (WebCore::FontCascade::drawGlyphs): * Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp: (WebCore::computeOverallTextMatrix): (WebCore::computeVerticalTextMatrix): (WebCore::showGlyphsWithAdvances): (WebCore::FontCascade::drawGlyphs): * Source/WebCore/platform/graphics/skia/FontCascadeSkia.cpp: (WebCore::FontCascade::drawGlyphs): * Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp: (WebCore::FontBase::platformInit): (WebCore::Font::platformInit): Deleted. * Source/WebCore/platform/graphics/win/SimpleFontDataWin.cpp: (WebCore::FontBase::platformInit): (WebCore::Font::platformInit): Deleted. Canonical link: https://commits.webkit.org/320875@main
https://bugs.webkit.org/show_bug.cgi?id=318405 <rdar://176471329> Reviewed by Said Abou-Hallawa. This PR tightens the fix in 301404@main by clamping the repeat count to an upper bound to prevent overflow. Also coalesce the repeat events dispatched while seeking: rather than firing one repeatEvent per skipped interval, dispatch a single repeatEvent. SVG 1.1 Animation defines a repeatEvent as raised each time the element repeats on a normally-advancing timeline; how many events a discontinuous seek replays for the intervals it skips is left to SMIL Animation's timing model, which does not require one event per skipped interval (see also the WPT seeking-events-* tests). * LayoutTests/svg/animations/smil-seek-huge-repeat-count-crash-expected.txt: Added. * LayoutTests/svg/animations/smil-seek-huge-repeat-count-crash.html: Added. * Source/WebCore/svg/animation/SVGSMILElement.cpp: (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat const): (WebCore::SVGSMILElement::progress): Originally-landed-as: 305413.1072@safari-7624.5-branch (3424904). rdar://185366479 Canonical link: https://commits.webkit.org/320876@main
…ipt/array.html https://bugs.webkit.org/show_bug.cgi?id=323893 rdar://187135550 Rebaseline test expect file as the implementation gets spec-wise progression. * LayoutTests/platform/mac/TestExpectations: * LayoutTests/platform/mac/fast/AppleScript/array-expected.txt: Canonical link: https://commits.webkit.org/320877@main
https://bugs.webkit.org/show_bug.cgi?id=323852 Reviewed by Carlos Garcia Campos. `steps()` and `linear()` easing functions are currently excluded from acceleration on all ports. This restriction only needs to apply to Apple ports, because accelerated animations running on the compositor are implemented using `CAMediaTimingFunction`, which cannot fully represent them. GTK and WPE use `TextureMapperAnimation`, which doesn't have this limitation, so these animations can be accelerated there. `TextureMapperAnimation` kept a single `m_timingFunction` field for two different things — the overall timing function of a Web Animation, and the CSS Animation's `animation-timing-function`, which only acts as a fallback for keyframes that don't specify their own easing. Because of this, that fallback easing could be applied to the whole animation progress instead of just to the individual keyframe interval, which produces the wrong `steps()`/`linear()` results. `TextureMapperAnimation` now keeps the fallback as a separate `m_defaultTimingFunctionForKeyframes` field, and a new `timingFunctionForKeyframe()` helper applies it only where it's supposed to. Test: webanimations/transform-animation-with-steps-timing-function.html Removed * Source/WebCore/animation/KeyframeEffect.cpp: (WebCore::KeyframeEffect::canBeAccelerated const): (WebCore::KeyframeEffect::updateAcceleratedActions): * Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.cpp: (WebCore::timingFunctionIsIdentity): (WebCore::TextureMapperAnimation::TextureMapperAnimation): (WebCore::TextureMapperAnimation::operator=): (WebCore::TextureMapperAnimation::apply): (WebCore::TextureMapperAnimation::applyTimingFunctionForKeyframe const): (WebCore::timingFunctionForAnimationValue): Deleted. (WebCore::TextureMapperAnimation::timingFunctionForKeyframe const): * Source/WebCore/platform/graphics/texmap/TextureMapperAnimation.h: * LayoutTests/platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/320878@main
…ods take movable types https://bugs.webkit.org/show_bug.cgi?id=323878 rdar://187122873 Reviewed by Alex Christensen. This changes the sync clients to emit methods that take movable types. Some of the data we send via the sync clients (like FrameGeometrySyncData) are relatively large and are sent at frame rate, so we should avoid the extra copy. * Source/WebCore/Scripts/generate-process-sync-data.py: (generate_process_sync_client_header): (generate_process_sync_client_impl): * Source/WebCore/Scripts/tests/TestSyncClient.cpp: (WebCore::TestSyncClient::broadcastAudioSessionTypeToOtherProcesses): (WebCore::TestSyncClient::broadcastMainFrameURLChangeToOtherProcesses): (WebCore::TestSyncClient::broadcastIsAutofocusProcessedToOtherProcesses): (WebCore::TestSyncClient::broadcastUserDidInteractWithPageToOtherProcesses): (WebCore::TestSyncClient::broadcastAnotherOneToOtherProcesses): (WebCore::TestSyncClient::broadcastMultipleHeadersToOtherProcesses): * Source/WebCore/Scripts/tests/TestSyncClient.h: (WebCore::TestSyncClient::broadcastTestSyncDataToOtherProcesses): * Source/WebKit/Scripts/webkit/messages.py: (types_that_must_be_moved): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::broadcastDocumentSyncData): (WebKit::WebPageProxy::broadcastFrameTreeSyncData): * Source/WebKit/WebProcess/WebCoreSupport/WebDocumentSyncClient.cpp: (WebKit::WebDocumentSyncClient::broadcastDocumentSyncDataToOtherProcesses): * Source/WebKit/WebProcess/WebCoreSupport/WebDocumentSyncClient.h: * Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::broadcastFrameTreeSyncDataToOtherProcesses): * Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp: (WebKit::WebLocalFrameLoaderClient::broadcastFrameTreeSyncDataToOtherProcesses): * Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h: * Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.cpp: (WebKit::WebRemoteFrameClient::broadcastFrameTreeSyncDataToOtherProcesses): * Source/WebKit/WebProcess/WebCoreSupport/WebRemoteFrameClient.h: Canonical link: https://commits.webkit.org/320879@main
https://bugs.webkit.org/show_bug.cgi?id=323516 rdar://186752700 Reviewed by Alex Christensen. We are starting to use FrameTree::containsRemoteFrame and related methods as part of various site isolation patches. Make this a constant time operation instead of requiring a frame tree walk. We do this by maintaining a remote frame descendant count for every FrameTree. This is updated every time a frame is added or removed from the tree. Also remove: - Page::hasRemoteFrames: callers can use FrameTree::containsRemoteFrame instead - The hasRemoteFrames memoization loop in Page::syncLocalFrameInfoToRemote * Source/WebCore/dom/Document.cpp: (WebCore::Document::enforceSandboxFlags): (WebCore::Document::updateRemoteIntersectionObservers): * Source/WebCore/editing/cocoa/EditorCocoa.mm: (WebCore::Editor::writeSelectionToPasteboard): * Source/WebCore/page/Frame.cpp: (WebCore::Frame::detachFromPage): * Source/WebCore/page/FrameTree.cpp: (WebCore::FrameTree::remoteFrameCountIncludingSelf const): (WebCore::FrameTree::adjustRemoteFrameDescendantCountForSelfAndAncestors): (WebCore::FrameTree::remoteFrameDescendantCountSlow const): (WebCore::FrameTree::detachFromParent): (WebCore::FrameTree::appendChild): (WebCore::FrameTree::removeChild): (WebCore::FrameTree::replaceChild): (WebCore::FrameTree::containsRemoteFrame const): (WebCore::FrameTree::hasRemoteFrameDescendant const): Deleted. * Source/WebCore/page/FrameTree.h: (WebCore::FrameTree::hasRemoteFrameDescendant const): (WebCore::FrameTree::detachFromParent): Deleted. * Source/WebCore/page/LocalDOMWindow.cpp: (WebCore::LocalDOMWindow::consumeTransientActivation): (WebCore::LocalDOMWindow::notifyActivated): * Source/WebCore/page/LocalFrameView.cpp: (WebCore::LocalFrameView::scrollPositionChanged): * Source/WebCore/page/Page.cpp: (WebCore::Page::syncLocalFrameInfoToRemote): (WebCore::Page::doAfterUpdateRendering): (WebCore::Page::hasRemoteFrames const): Deleted. * Source/WebCore/page/Page.h: (WebCore::Page::didAttachRemoteFrame): Deleted. (WebCore::Page::didDetachRemoteFrame): Deleted. * Source/WebCore/page/RemoteFrame.cpp: (WebCore::m_colorSchemePreference): Canonical link: https://commits.webkit.org/320880@main
https://bugs.webkit.org/show_bug.cgi?id=316816 rdar://177442177 Reviewed by Charlie Wolfe and Abrar Rahman Protyasha. We should require a transient activation before focusing an existing named window, to avoid popunders. The original change consumed the activation. Consuming it is wrong on main: 311026@main made window.open() consume user activation only when it creates a new browsing context, per "the rules for choosing a navigable", and consuming here regresses imported/w3c/web-platform-tests/html/browsers/windows/consume-user-activation/window-open.html. Requiring the activation without consuming it blocks the popunder just the same, because the popup's window never has a transient activation of its own: activation propagates only to ancestor frames and same-origin descendants within a frame tree, never across top-level windows. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/VerifyUserGestureFromUIProcess.mm * Source/WebCore/loader/FrameLoader.cpp: (WebCore::createWindow): * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/VerifyUserGestureFromUIProcess.mm: (TestWebKitAPI::TEST(VerifyUserGesture, PopunderPreventedViaDualEventListeners)): Originally-landed-as: 305413.1061@safari-7624.5-branch (2057f45). rdar://184745106 Canonical link: https://commits.webkit.org/320881@main
https://bugs.webkit.org/show_bug.cgi?id=322241 rdar://185470917 Reviewed by Dan Glastonbury. Update WebGL layout test expectations for various texture-related tests. * LayoutTests/TestExpectations: * LayoutTests/http/tests/webgl/1.0.x/conformance/textures/misc/origin-clean-conformance-offscreencanvas-expected.txt: * LayoutTests/http/tests/webgl/2.0.y/conformance/textures/misc/origin-clean-conformance-offscreencanvas-expected.txt: * LayoutTests/http/tests/webgl/2.0.y/conformance2/textures/misc/origin-clean-conformance-offscreencanvas-expected.txt: * LayoutTests/platform/mac-wk2/TestExpectations: * LayoutTests/platform/mac/TestExpectations: Canonical link: https://commits.webkit.org/320882@main
…nsionAPITestCocoa, etc. https://bugs.webkit.org/show_bug.cgi?id=323894 rdar://187136566 Reviewed by Abrar Rahman Protyasha. Added missing includes found by running a non-unified build. Fix them now so they aren't exposed later. Tests: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/AdaptiveImageGlyph.mm Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HTTP2Server.mm Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HTTP3Server.mm * Source/WebCore/Modules/identity/CredentialRequestCoordinator.cpp: * Source/WebCore/editing/FrameSelection.cpp: * Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIOffscreenCocoa.mm: * Source/WebKit/UIProcess/Extensions/WebExtensionMenuItem.h: * Source/WebKit/UIProcess/PageLoadState.cpp: (WebKit::PageLoadState::receivedQualifiedServerTrust): * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPITestCocoa.mm: * Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIRuntime.cpp: * Source/WebKitLegacy/mac/WebView/WebImmediateActionController.mm: * Source/WebKitLegacy/mac/WebView/WebPDFRepresentation.mm: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/AdaptiveImageGlyph.mm: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HTTP2Server.mm: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/HTTP3Server.mm: Canonical link: https://commits.webkit.org/320883@main
…not guaranteeing it becomes stale https://bugs.webkit.org/show_bug.cgi?id=323910 rdar://187146401 Reviewed by Yijia Huang. BreakpointManager is having UncheckedKeyHashMap<VirtualAddress, Breakpoint> and returning Breakpoint*. But there is no guarantee that someone is modifying this map while someone is using this Breakpoint*. If rehashing happens, this pointer becomes stale. This patch makes Breakpoint Ref<> managed. * Source/JavaScriptCore/wasm/debugger/WasmBreakpointManager.cpp: (JSC::Wasm::BreakpointManager::setBreakpoint): (JSC::Wasm::BreakpointManager::findBreakpoint): (JSC::Wasm::BreakpointManager::removeBreakpointImpl): (JSC::Wasm::BreakpointManager::clearAllBreakpoints): * Source/JavaScriptCore/wasm/debugger/WasmBreakpointManager.h: * Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.cpp: * Source/JavaScriptCore/wasm/debugger/WasmDebugServerUtilities.h: (JSC::Wasm::Breakpoint::Breakpoint): (JSC::Wasm::Breakpoint::patchBreakpoint): Deleted. (JSC::Wasm::Breakpoint::restorePatch): Deleted. (JSC::Wasm::Breakpoint::isOneTimeBreakpoint): Deleted. (JSC::Wasm::Breakpoint::dump const): Deleted. * Source/JavaScriptCore/wasm/debugger/WasmExecutionHandler.cpp: (JSC::Wasm::ExecutionHandler::handleDebuggerTrapIfNeeded): (JSC::Wasm::ExecutionHandler::stepAtBytecode): (JSC::Wasm::ExecutionHandler::setBreakpointAtPC): (JSC::Wasm::ExecutionHandler::setBreakpoint): * Source/JavaScriptCore/wasm/debugger/tests/ExecutionHandlerTest.cpp: (ExecutionHandlerTest::testBreakpointSingleStepping): Canonical link: https://commits.webkit.org/320884@main
https://bugs.webkit.org/show_bug.cgi?id=323822 rdar://187061168 Reviewed by Simon Fraser. Stop exposing `-apple-color-filter` in computed styles and update tests accordingly. Test: css3/color-filters/color-filter-exposure.html * LayoutTests/animations/resources/animation-test-helpers.js: (getPropertyValue): * LayoutTests/css3/color-filters/color-filter-exposure-expected.txt: Renamed from LayoutTests/css3/color-filters/color-filter-exposed-if-enabled-expected.txt. * LayoutTests/css3/color-filters/color-filter-exposure.html: Renamed from LayoutTests/css3/color-filters/color-filter-exposed-if-enabled.html. * LayoutTests/css3/color-filters/color-filter-parsing.html: * Source/WebCore/css/CSSProperties.json: * Source/WebCore/style/StyleExtractor.cpp: (WebCore::Style::Extractor::appleColorFilterSerializationForTesting): * Source/WebCore/style/StyleExtractor.h: * Source/WebCore/testing/Internals.cpp: (WebCore::Internals::computedAppleColorFilter): * Source/WebCore/testing/Internals.h: * Source/WebCore/testing/Internals.idl: Canonical link: https://commits.webkit.org/320885@main
https://bugs.webkit.org/show_bug.cgi?id=323707 rdar://186965141 Reviewed by Nikolas Zimmermann. Seven subtests asserted that a graphics element inside defs, clipPath, mask, a display:none <g> or a <symbol> returns a zero bounding box. SVG 2 coords.html says it returns the rectangle it would have had if rendered, and that only the non-rendered ancestor reports zero, because a non-rendered element does not contribute to the bounding box of any ancestor. WebKit follows both sentences and was marked failing; Gecko returns zero for the children and was marked passing. The comment in getBBox-06 attributes the zero to svgwg issue WebKit#1018. That resolution is about an element whose own geometric attributes are missing or invalid, and the phrase "non-rendered element" carried over from the InvalidStateError sentence the resolution deleted. Every element here has valid geometry. Each test in getBBox-06 asserted the container and its child together. Split into one subtest each, because measurement in all three engines showed Chrome and Firefox breaking different sentences: Chrome returns the container's box as its child's rectangle, and Firefox returns zero for the child. One subtest asserting both hid that. Safari goes from 7 failures to 0, Chrome from 7 to 2, Gecko from 0 to 7. Values measured 2026-09-08 in Safari 26.4, Safari 27.0, Firefox 157.0 and Chrome 155.0.0.0, controls passing in all four and the two Safari builds identical, so the baselines come from measurement rather than from the one coordinate each failing assertion printed. none_rect is left asserting zero. coords.html asks for its real rectangle too, but all three engines return zero, so that one is a question for the WG and is now named in a comment instead of being silent. All ten subtests pass. This will be exported to WPT. * LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-06.html: * LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-06-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-07.html: * LayoutTests/imported/w3c/web-platform-tests/svg/types/scripted/SVGGraphicsElement.getBBox-07-expected.txt: Canonical link: https://commits.webkit.org/320886@main
… Asian counter styles https://bugs.webkit.org/show_bug.cgi?id=257369 rdar://109875198 Reviewed by Darin Adler. The nine longhand East Asian counter styles stopped at -9999 to 9999, so a list numbered past 9999 dropped to cjk-decimal partway down. Chrome and Firefox already number the Chinese and Korean styles over the extended range. counterForSystemCJK only implemented the Chinese form of the algorithm, and the Japanese and Korean styles were built out of additive-symbols, which cannot reach past one group of four digits. Therefore the algorithm now takes the language and the formality, and the Japanese and Korean styles get internal systems like the Chinese ones already have. The negative sign now comes from the negative descriptor, because the Japanese and Korean signs are four characters long and every other system already works that way. The output buffer has room for two characters per abstract character, because the simplified Chinese fourth group marker is spelled with two and the old one held a single character of each. Resync the nine reference files corrected by web-platform-tests/wpt#54469. WebKit imported this directory on 2025-08-21, twelve days before that landed, so the copies here still expect the informal "drop ones" rule in the formal styles and spell the Korean styles with characters from the Chinese and hangul ones. Cover the range with reference tests in css/css-counter-styles, one per style, rather than a layout test. Section 7.1.2 is optional, so they carry the .optional filename flag, and they go upstream next. The values stay inside what a counter value can hold, so the rows are all defined by the algorithm rather than by where an engine truncates. A counter value is an int, so the reachable part of the new range stops at 2147483647. Reaching the rest of it needs a wider counter value, which is separate work. * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/counter-simp-chinese-informal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/counter-simp-chinese-informal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/counter-simp-chinese-informal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/counter-simp-chinese-formal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/counter-simp-chinese-formal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/counter-simp-chinese-formal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/counter-trad-chinese-informal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/counter-trad-chinese-informal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/counter-trad-chinese-informal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/counter-trad-chinese-formal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/counter-trad-chinese-formal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/counter-trad-chinese-formal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/cjk-ideographic/counter-cjk-ideographic-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/cjk-ideographic/counter-cjk-ideographic-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/cjk-ideographic/counter-cjk-ideographic-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/counter-japanese-informal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/counter-japanese-informal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/counter-japanese-informal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/counter-japanese-formal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/counter-japanese-formal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/counter-japanese-formal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/counter-korean-hangul-formal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/counter-korean-hangul-formal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/counter-korean-hangul-formal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/counter-korean-hanja-informal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/counter-korean-hanja-informal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/counter-korean-hanja-informal-extended-range.optional.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/counter-korean-hanja-formal-extended-range-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/counter-korean-hanja-formal-extended-range.optional-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/counter-korean-hanja-formal-extended-range.optional.html: * LayoutTests/fast/lists/li-values-expected.txt: * LayoutTests/fast/lists/li-values.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/css3-counter-styles-049-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/css3-counter-styles-044-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/css3-counter-styles-054-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/css3-counter-styles-064-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/css3-counter-styles-059-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/css3-counter-styles-078-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/css3-counter-styles-073-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/css3-counter-styles-088-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/css3-counter-styles-083-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/counter-japanese-formal-extended-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/counter-japanese-informal-extended-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/counter-korean-hangul-formal-extended-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/counter-korean-hanja-formal-extended-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/counter-korean-hanja-informal-extended-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/counter-simp-chinese-formal-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/counter-simp-chinese-informal-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/counter-trad-chinese-formal-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/counter-trad-chinese-informal-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-formal/counter-japanese-formal-extended-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/japanese-informal/counter-japanese-informal-extended-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hangul-formal/counter-korean-hangul-formal-extended-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-formal/counter-korean-hanja-formal-extended-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/korean-hanja-informal/counter-korean-hanja-informal-extended-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-formal/counter-simp-chinese-formal-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/simp-chinese-informal/counter-simp-chinese-informal-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-formal/counter-trad-chinese-formal-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-counter-styles/trad-chinese-informal/counter-trad-chinese-informal-expected.html: * Source/WTF/wtf/MathExtras.h: (absoluteValueAsUnsigned): * Source/WebCore/css/CSSCounterStyleDescriptors.cpp: (WebCore::CSSCounterStyleDescriptors::areSymbolsValidForSystem): (WebCore::CSSCounterStyleDescriptors::systemCSSText const): * Source/WebCore/css/CSSCounterStyleDescriptors.h: * Source/WebCore/css/CSSCounterStyleRule.cpp: (WebCore::toCounterStyleSystemEnum): * Source/WebCore/css/CSSRegisteredCounterStyle.cpp: (WebCore::counterForSystemCJK): (WebCore::CSSRegisteredCounterStyle::counterForSystemSimplifiedChineseInformal): (WebCore::CSSRegisteredCounterStyle::counterForSystemSimplifiedChineseFormal): (WebCore::CSSRegisteredCounterStyle::counterForSystemTraditionalChineseInformal): (WebCore::CSSRegisteredCounterStyle::counterForSystemTraditionalChineseFormal): (WebCore::CSSRegisteredCounterStyle::counterForSystemJapaneseInformal): (WebCore::CSSRegisteredCounterStyle::counterForSystemJapaneseFormal): (WebCore::CSSRegisteredCounterStyle::counterForSystemKoreanHangulFormal): (WebCore::CSSRegisteredCounterStyle::counterForSystemKoreanHanjaInformal): (WebCore::CSSRegisteredCounterStyle::counterForSystemKoreanHanjaFormal): (WebCore::CSSRegisteredCounterStyle::initialRepresentation const): (WebCore::CSSRegisteredCounterStyle::shouldApplyNegativeSymbols const): (WebCore::CSSRegisteredCounterStyle::isInRange const): * Source/WebCore/css/CSSRegisteredCounterStyle.h: * Source/WebCore/css/CSSValueKeywords.in: * Source/WebCore/css/counterStyles.css: (@counter-style japanese-informal): (@counter-style japanese-formal): (@counter-style korean-hangul-formal): (@counter-style korean-hanja-informal): (@counter-style korean-hanja-formal): (@counter-style simp-chinese-informal): (@counter-style simp-chinese-formal): (@counter-style trad-chinese-informal): (@counter-style trad-chinese-formal): (@counter-style cjk-ideographic): * Source/WebCore/css/parser/CSSPropertyParserConsumer+CounterStyles.cpp: (WebCore::CSSPropertyParserHelpers::consumeCounterStyleSystem): Canonical link: https://commits.webkit.org/320887@main
Preview Builds
|
This was referenced Sep 11, 2026
robobun
added a commit
to oven-sh/bun
that referenced
this pull request
Sep 11, 2026
The fork branch now contains the fork's main (cf1b36ec8703), which bun main pins since #42319.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges upstream WebKit main at
50320fd3b3(2026-09-10) into the fork: 93 commits since the previous merge baseccdcb8a026(2026-09-09), 14 of them in JavaScriptCore, WTF, bmalloc or cmake.git merge-base origin/main upstream/mainreportsccdcb8a026directly. This merge commit has50320fd3b3as its second parent.The branch also contains the fork's main as of
cf1b36ec8703(#522), merged in ase1831791003dafter #522 landed. That second merge had no conflicts (bytecompiler/NodesCodegen.cpp,jsc.cppandtools/JSDollarVM.cppmerged automatically), so GitHub can merge this PR into main as it is.Conflicts and how they were resolved
2 files conflicted. Both are one-line overlaps between a mechanical upstream rename and a fork edit on the next line.
wtf/URLParser.cpp(7bd7b6dfad): upstream changes theURL_PARSER_LOGline at the top ofURLParser::parsefromutf8().data()toutf8().legacyCStringPointer(). The fork (Make WTF::URLParser faster than Ada #452) replaced the line after it,m_url = { };, withASSERT(!m_url.isValid() && m_url.m_string.isNull());. Took upstream's log line and kept the fork'sASSERT.wtf/UUID.cpp(74b519d7f9): upstream retypes the buffer in theOS(DARWIN)branch ofbootSessionUUIDString()toLatin1Character. The fork has that branch commented out. Kept the fork's version.Everything else merged without conflicts, including
runtime/RegExp.cpp(e19f57a779),runtime/JSONObject.cpp,runtime/NumberPrototype.cpp,runtime/StringPrototype.cpp,runtime/JSArrayBufferPrototype.cpp,b3/B3LowerToAir.cppandwtf/text/WTFString.h. No fork-only code used theString(std::span<const char>)constructor that74b519d7f9makes private, orCStringWithEncoding::characters()that7bd7b6dfadrenames.Checked and unchanged:
runtime/JSType.h,Source/WebCore/bindings/scripts,.github/workflows, the release tarball names.Verification
bun run jsc:build:debug(Linux x64, Debug + ASAN, clang 21): builds,jscruns.stress/arraybuffer-grow-resize-huge-length.js,stress/multiply-negated-operand.js,stress/regexp-cached-result-one-character-atom-delete-all-code.js,microbenchmarks/mul-negated-operand-{chain,integrate}.js) and the modifiedwasm/gc/bulk-array-element-types.jspass on thatjsc.JSTests/stressfiles whose names matchregexp*,regex*,*lookbehind*or*yarr*, on the samejsc: 299 pass, 13 carry a//@ skip, 4 fail. The 4 (regexp-boundary-assertions.js,regexp-buffer-boundaries-anchoring.js,regexp-lazy-pattern-construction.js,regexp-unicode-code-unit-read-for-bmp-terms.js) fail with identical output on thejscfrom the currentautobuild-4b9ff9959a04debug-asan tarball. They are the pre-existing failures Upgrade to upstream WebKit ccdcb8a026 #614 lists.bun run jsc:build:debugbuilds again, the 5JSTests/modules/module-loaders*.jsfiles from [JSC] Additional module loaders per global object, sharing linked module code between them #522 pass, and so do the upstream tests listed above.bun run build:localat73feb01375e7(before [JSC] Additional module loaders per global object, sharing linked module code between them #522): Bun builds and links against the tree with one source change on top of Upgrade WebKit to ccdcb8a026 bun#42177 (BunProcess.cppbuilt aStringfrom astd::span<const char>, it now callsString::fromLatin1).bun-debug -p 42runs.bun run build:localate1831791003d(with [JSC] Additional module loaders per global object, sharing linked module code between them #522): Bun needs Bun.unsafe.ModuleGraph: multiple instances of an ES module graph in one global bun#42271 to build against any tree that contains [JSC] Additional module loaders per global object, sharing linked module code between them #522 (ModuleAnalyzer,SyntheticModuleRecord::createand the module loader hooks changed shape). Bun.unsafe.ModuleGraph: multiple instances of an ES module graph in one global bun#42271 plus theBunProcess.cppchange builds and links, andtest/js/bun/module-graph/module-graph.test.tspasses except for 3 timeouts of the debug build. The bytecode portability hashes are the ones Bun.unsafe.ModuleGraph: multiple instances of an ES module graph in one global bun#42271 gets on its own CI, so the upstream range does not move them.Upstream changes
Each commit appears once under the most specific heading that applies.
Needs an embedder-side change
74b519d7f9WTF::String(std::span<const char>)is now private, next toString(const char*), becausecharcarries no encoding. Callers name the encoding:String::fromLatin1(std::span<const char>)(new overload),String(std::span<const Latin1Character>),String::fromUTF8(...)orString(ASCIILiteral). In the same commitWTF::enumName()andWTF::enumTypeName()(wtf/EnumTraits.h) returnASCIILiteralinstead ofstd::span<const char>, so callers testisEmpty()instead ofempty(). https://bugs.webkit.org/show_bug.cgi?id=3236507bd7b6dfadCStringgainslegacyCStringPointer(), which returns the sameconst char*asdata(), and every upstreamutf8().data()call site moves to it.CStringWithEncoding::characters()(theconst char*accessor ofUTF8CStringandASCIICStringfrom5f14e32e57) is renamed tolegacyCStringPointer(). No type changes yet. This is the mechanical half of retypingString::utf8()to returnUTF8CString. After that follow-up lands,utf8().data()returnsconst char8_t*and onlylegacyCStringPointer()keeps returningconst char*. https://bugs.webkit.org/show_bug.cgi?id=323722Runtime and builtins
223bd0faeeArrayBuffer.prototype.resizeandSharedArrayBuffer.prototype.growconvert the new length withtoIndexinstead ofToIntegerOrInfinityplus a cast tosize_t, which was undefined for a value such as1e20. A length above 2^53 - 1 or a negative length now throws RangeError before the detached check, sodetached.resize(-1)throws RangeError where it used to throw TypeError. https://bugs.webkit.org/show_bug.cgi?id=323440c194b75cdespeculationFromString()(bytecode/SpeculatedType.h, used by the@idWithProfilebytecode intrinsic) takes aStringViewand looks the name up in aSortedArrayMapinstead of a chain ofstrncmpprefix tests. The rest of the commit is review follow-up for7bd7b6dfadin the Wasm debugger tests. https://bugs.webkit.org/show_bug.cgi?id=323841RegExp (Yarr)
e19f57a779RegExp::deleteCode()no longer clearsm_atomandm_specificPattern. They depend only on the pattern, likem_numSubpatterns.RegExpCachedResult::lastResult()readsRegExp::atom()to reify the position of a cached one-character global match. AfterVM::deleteAllCode()cleared the atom it searched for U+0000 instead, soRegExp.leftContext,RegExp.rightContextandRegExp.lastMatchcould be wrong (a debug build asserts). Bun callsdeleteAllCodeon hot reload and when a debugger attaches. https://bugs.webkit.org/show_bug.cgi?id=323838JIT (B3)
41ec81351bB3LowerToAirmatchesMul(Neg(n), m)andMul(n, Neg(m))and emits oneMultiplyNeg(ARM64MNEG/FNMUL) when theNeghas no other user. This is the shape-n * mparses to. The floating point form used to emitfnegplusfmul. About 1.5x on themul-negated-operand-chainmicrobenchmark. No effect on x86_64, which has no such instruction form. https://bugs.webkit.org/show_bug.cgi?id=323150WebAssembly
0d81375a0fJSWebAssemblyArray::fillof reference elements stores through the newgcSafeMemfill()(heap/GCMemoryOperations.h, next togcSafeZeroMemory) and then runs one write barrier, likearray.copy. The old loop of plain stores could be lowered to sub-8-byte writes, and the concurrent marker could read a torn value. https://bugs.webkit.org/show_bug.cgi?id=32362892a274ec73The Wasm debuggerBreakpointManagerstoresRef<Breakpoint>in its map and returnsRefPtr<Breakpoint>, so a breakpoint pointer no longer goes stale when the map rehashes.BreakpointbecomesThreadSafeRefCounted. Debugger only. https://bugs.webkit.org/show_bug.cgi?id=323910WTF and bmalloc
86f52ba2f2libpas:pas_runtime_config::enabled(MTE enablement, a bool where 0 meant either "not initialized" or "off") becomes the tri-statemte_state.pas_mte_is_mte_enabled()is now an inlineable relaxed load that falls back to the renamedpas_mte_is_mte_enabled_slow()only when the state is not initialized. Darwin arm64e only. https://bugs.webkit.org/show_bug.cgi?id=32382050320fd3b3wtf/MathExtras.hgainsabsoluteValueAsUnsigned(), anabsthat is defined for the most negative value of a signed type. The only adopter is WebCore. https://bugs.webkit.org/show_bug.cgi?id=2573691455983c9dwtf/PlatformHave.hdefinesHAVE_AVPLAYER_DISCONNECTEDFROMSYSTEMAUDIOfor the iOS family 27.0 SDKs. https://bugs.webkit.org/show_bug.cgi?id=3237728eb608658bUnifiedWebPreferences.yamlgains a WebRTC DNS preference. No JSC effect. https://bugs.webkit.org/show_bug.cgi?id=323606Build system and platform
b1865b2d63Swift compiler flags for CMake move fromOptionsCocoa.cmakeandWebKitMacros.cmakeinto a newSource/cmake/WebKitSwiftFlags.cmakeand are aligned with the Xcode build. Swift targets only. https://bugs.webkit.org/show_bug.cgi?id=322750bc5bc3c2d6WebKitMacros.cmakenormalizes MSVC-style/Ddefinitions to-Dwhen it forwards them to the Swift clang importer on Windows. Swift targets only. https://bugs.webkit.org/show_bug.cgi?id=323791WebCore-only or no effect on JSC embedders
The other 79 commits in the range touch WebCore, WebKit, WebGPU, LayoutTests or tooling only.