Commits
main
Name already in use
Commits on Dec 10, 2023
-
Introduce compile-time checking and alternate allocation for compact …
…pointer types https://bugs.webkit.org/show_bug.cgi?id=266080 rdar://119382681 Reviewed by Mark Lam. Adds compile-time checking to WTF compact and packed pointer types requiring the pointed-to types to be explicitly marked as compatible with compact pointers. Also adds new equivalents to the existing WTF::fastMalloc and WTF::isoMalloc allocation functions for compactible types, giving us an API point to play with how types used in compact pointers are allocated. * Source/JavaScriptCore/bytecode/CallLinkInfoBase.h: * Source/JavaScriptCore/bytecode/CodeBlock.h: * Source/JavaScriptCore/bytecode/InlineCallFrame.h: * Source/JavaScriptCore/bytecode/InlineCallFrameSet.h: * Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h: * Source/JavaScriptCore/bytecode/Watchpoint.h: * Source/JavaScriptCore/dfg/DFGJITCode.h: * Source/JavaScriptCore/heap/FastMallocAlignedMemoryAllocator.cpp: * Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp: * Source/JavaScriptCore/jit/BaselineJITCode.h: * Source/JavaScriptCore/jit/ExecutableMemoryHandle.h: * Source/JavaScriptCore/jit/JITCode.h: * Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.h: * Source/JavaScriptCore/runtime/ClassInfo.h: * Source/JavaScriptCore/runtime/JSArray.h: * Source/JavaScriptCore/wasm/WasmTypeDefinition.h: * Source/WTF/wtf/Bag.h: * Source/WTF/wtf/CompactPointerTuple.h: * Source/WTF/wtf/CompactPtr.h: * Source/WTF/wtf/DebugHeap.h: * Source/WTF/wtf/FastMalloc.cpp: * Source/WTF/wtf/FastMalloc.h: * Source/WTF/wtf/IsoMalloc.h: * Source/WTF/wtf/IsoMallocInlines.h: * Source/WTF/wtf/SentinelLinkedList.h: * Source/WTF/wtf/WeakPtr.h: * Source/WTF/wtf/text/StringImpl.h: * Source/WTF/wtf/text/WTFString.h: * Source/WebCore/dom/Node.h: * Source/WebCore/dom/NodeRareData.h: * Source/WebCore/rendering/RenderObject.cpp: * Source/WebCore/rendering/RenderObject.h: * Source/bmalloc/bmalloc/AllocationCounts.h: * Source/bmalloc/bmalloc/IsoHeap.cpp: * Source/bmalloc/bmalloc/IsoHeap.h: * Source/bmalloc/bmalloc/IsoHeapImpl.h: * Source/bmalloc/bmalloc/IsoHeapInlines.h: * Source/bmalloc/bmalloc/Packed.h: * Tools/TestWebKitAPI/Tests/WTF/AlignedRefLogger.h: * Tools/TestWebKitAPI/Tests/WTF/CompactRefPtr.cpp: * Tools/TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp: * Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: Canonical link: https://commits.webkit.org/271819@main
David Degazio committedDec 10, 2023 -
Implement align-content on block containers
https://bugs.webkit.org/show_bug.cgi?id=266085 rdar://114740670 Reviewed by Alan Baradlay. Implements 'align-content' on block containers by shifting the contents of RenderBlockFlow if there is extra space after sizing. See https://www.w3.org/TR/css-align/#distribution-block Alignment is not supported if the box is fragmented. To support this, adds methods for shifting content in the block axis to: - FloatingObjects - legacy RenderLineBoxList - modern LineLayout Also implements the requirement that non-normal 'align-content' values establish a new formatting context. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-001-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-001-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-001.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-002.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-003.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-004.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-005.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-006.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-007.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-008.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-009.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-010.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-011.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-010-aligned-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-010-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-010-unaligned-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-010.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-020-aligned-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-020-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-020-unaligned-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-content-020.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-010-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-010-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-010.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-020-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-020-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-020.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-overflow-000-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-overflow-000-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-overflow-000.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-simple-height-change.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-align/blocks/align-content-table-cell.html: Added. * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::shiftLinesBy): Implement shifting line boxes and their contents. * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h: Add API to shift line boxes and their contents. * Source/WebCore/rendering/FloatingObjects.cpp: (WebCore::FloatingObjects::shiftFloatsBy): Implement shifting floats while avoiding side-effects. * Source/WebCore/rendering/FloatingObjects.h: Add APIs for shifting all floats by a fixed amount. * Source/WebCore/rendering/RenderBlockFlow.cpp: (WebCore::RenderBlockFlow::layoutBlock): Shift for align-content, trigger abspos reflow if shifted. (WebCore::RenderBlockFlow::shiftForAlignContent): Implement method to shift content per align-content. * Source/WebCore/rendering/RenderBlockFlow.h: Add shiftForAlignContent() * Source/WebCore/rendering/RenderElement.cpp: (WebCore::RenderElement::createsNewFormattingContext const): Establish new formatting context. * Source/WebCore/rendering/RenderLineBoxList.cpp: (WebCore::RenderLineBoxList::shiftLinesBy): Implement method to shift lines by delta. * Source/WebCore/rendering/RenderLineBoxList.h: Add API to shift lines by delta. * Source/WebCore/rendering/style/StyleContentAlignmentData.cpp: (WebCore::StyleContentAlignmentData::isStartward const): Add convenience method for 'start'-equivalent values. (WebCore::StyleContentAlignmentData::isEndward const): Add convenience method for 'end'-equivalent values. (WebCore::StyleContentAlignmentData::isCentered const): Add convenience method for 'center'-equivalent values. * Source/WebCore/rendering/style/StyleContentAlignmentData.h: (WebCore::StyleContentAlignmentData::isNormal const): Add convenience method to correctly check for 'normal'. Canonical link: https://commits.webkit.org/271818@main
-
[UIAsyncTextInput] Release assertion after selecting "Translate" when…
… async text input is enabled https://bugs.webkit.org/show_bug.cgi?id=266157 rdar://119434259 Reviewed by Megan Gardner. After the UIKit changes in rdar://119283621, the default commands corresponding to these 3 actions: ``` _define: define: _translate: translate: _lookup: lookup: ``` ...now follow an inverted model for dispatching fallback actions, where the primary action selector is the legacy private action, and the fallback selector is the new selector on `UIAsyncTextInput`. This means that UIKit ends up calling into private selectors on the content view instead of their non-underscore-prefixed counterparts even when `UIKit/async_text_input` is enabled, causing us to hit release assertions under these three methods. To avoid this, we adjust the default behavior of `-targetForActionForWebView:withSender:` to always return `nil` for these three private selectors, in order to force UIKit to fall back to calling into the new action selectors. Changes covered by the layout test `editing/selection/ios/look-up-selected-text.html`, when async text input is enabled. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView targetForActionForWebView:withSender:]): Canonical link: https://commits.webkit.org/271817@main
Commits on Dec 9, 2023
-
Update LinkDecorationFilteringObserver/Controller with review feedback
https://bugs.webkit.org/show_bug.cgi?id=266076 rdar://119380680 Reviewed by Wenson Hsieh. I received review feedback on some similar changes that followed how LinkDecorationObserver/Controller is defined and implemented. This patch makes the relevant changes that are appropriate for these classes. We can simplify and reduce duplication in another patch. * Source/WebKit/Platform/cocoa/WebPrivacyHelpers.h: (WebKit::LinkDecorationFilteringDataObserver::LinkDecorationFilteringDataObserver): * Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm: (WebKit::LinkDecorationFilteringController::shared): (WebKit::LinkDecorationFilteringController::observeUpdates): (WebKit::LinkDecorationFilteringController::updateStrings): Canonical link: https://commits.webkit.org/271816@main
-
Introduce updatable user agent string quirk for storage access via We…
…bPrivacy https://bugs.webkit.org/show_bug.cgi?id=265811 rdar://119148523 Reviewed by Wenson Hsieh. Currently we only have support for hard-coded user agent string quirks. This patch introduces a new remotely updatable mechanism for quirking a request's user agent string when it relates to quirking for storage access. On some sites quirking the storage access prompt isn't sufficient, and those sites require quirking the user agent string, as well. * Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.h: * Source/WebCore/PAL/pal/cocoa/WebPrivacySoftLink.mm: * Source/WebCore/PAL/pal/spi/cocoa/WebPrivacySPI.h: * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::userAgent const): * Source/WebCore/page/Quirks.cpp: (WebCore::updatableStorageAccessUserAgentStringQuirks): (WebCore::Quirks::updateStorageAccessUserAgentStringQuirks): (WebCore::Quirks::storageAccessUserAgentStringQuirkForDomain): * Source/WebCore/page/Quirks.h: * Source/WebKit/Platform/cocoa/WebPrivacyHelpers.h: (WebKit::StorageAccessUserAgentStringQuirkObserver::create): (WebKit::StorageAccessUserAgentStringQuirkObserver::invokeCallback): (WebKit::StorageAccessUserAgentStringQuirkObserver::StorageAccessUserAgentStringQuirkObserver): (WebKit::StorageAccessUserAgentStringQuirkController::cachedQuirks const): * Source/WebKit/Platform/cocoa/WebPrivacyHelpers.mm: (-[WKWebPrivacyNotificationListener listenForStorageAccessUserAgentStringQuirkChanges:]): (-[WKWebPrivacyNotificationListener didUpdate:]): (WebKit::StorageAccessUserAgentStringQuirkController::shared): (WebKit::StorageAccessUserAgentStringQuirkController::observeUpdates): (WebKit::StorageAccessUserAgentStringQuirkController::setCachedQuirks): (WebKit::StorageAccessUserAgentStringQuirkController::setCachedQuirksForTesting): (WebKit::StorageAccessUserAgentStringQuirkController::updateQuirks): * Source/WebKit/Shared/WebProcessCreationParameters.h: * Source/WebKit/Shared/WebProcessCreationParameters.serialization.in: * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore _setUserAgentStringQuirkForTesting:withUserAgent:completionHandler:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm: (WebKit::WebProcessPool::platformInitializeWebProcess): * Source/WebKit/UIProcess/WebProcessPool.cpp: * Source/WebKit/UIProcess/WebProcessPool.h: * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::setUserAgentStringQuirkForTesting): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: * Source/WebKit/WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::updateStorageAccessUserAgentStringQuirks): * Source/WebKit/WebProcess/WebProcess.h: * Source/WebKit/WebProcess/WebProcess.messages.in: * Tools/TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm: (TEST): Canonical link: https://commits.webkit.org/271815@main
-
[IFC] Move content level alignment from Line to InlineContentAligner
https://bugs.webkit.org/show_bug.cgi?id=266001 Reviewed by Antti Koivisto. This is in preparation for supporting bidi ruby content alignment. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.cpp: Added. (WebCore::Layout::computedExpansions): (WebCore::Layout::InlineContentAligner::applyExpansionOnRange): (WebCore::Layout::InlineContentAligner::applyTextAlignJustify): * Source/WebCore/layout/formattingContexts/inline/InlineContentAligner.h: Added. * Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp: (WebCore::Layout::Line::applyRunExpansion): Deleted. * Source/WebCore/layout/formattingContexts/inline/InlineLine.h: (WebCore::Layout::Line::hangingTrailingWhitespaceLength const): (WebCore::Layout::Line::runs): (WebCore::Layout::Line::inflateContentLogicalWidth): * Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp: (WebCore::Layout::LineBuilder::placeInlineAndFloatContent): * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h: (WebCore::InlineDisplay::Box::Text::renderedContent const): (WebCore::InlineDisplay::Box::setExpansion): (WebCore::InlineDisplay::Box::moveVertically): (WebCore::InlineDisplay::Box::moveHorizontally): (WebCore::InlineDisplay::Box::expandVertically): (WebCore::InlineDisplay::Box::expandHorizontally): (WebCore::InlineDisplay::Box::setLeft): (WebCore::InlineDisplay::Box::setRight): (WebCore::InlineDisplay::Box::setTop): (WebCore::InlineDisplay::Box::setBottom): (WebCore::InlineDisplay::Box::setRect): (WebCore::InlineDisplay::Box::Text::partiallyVisibleContentLength const): (WebCore::InlineDisplay::Box::Text::setPartiallyVisibleContentLength): * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLine.h: (WebCore::InlineDisplay::Line::isLeftToRightInlineDirection const): Canonical link: https://commits.webkit.org/271814@main
-
[iOS] Tapping 'Look Up' hangs when async UIKit interactions are disabled
https://bugs.webkit.org/show_bug.cgi?id=266151 rdar://119434158 Reviewed by Megan Gardner. Fix a hang under `-_defineForWebView:`; instead of calling back into itself, it should be calling into the real implementation in `-defineForWebView:`. * LayoutTests/editing/selection/ios/look-up-selected-text-expected.txt: Added. * LayoutTests/editing/selection/ios/look-up-selected-text.html: Added. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _defineForWebView:]): Canonical link: https://commits.webkit.org/271813@main
-
Expose the CFNetworkNetworkLoaderEnabled preference as testable with …
…a tri-state https://bugs.webkit.org/show_bug.cgi?id=262810 rdar://104615596 Reviewed by Alex Christensen. This patch accomplishes two tasks: 1) Move the preference to "testable" status 2) Define the preference as a tri-state: { unset, false, true } Task (1) is a simple change, and the preference is disabled in WebKitTestRunner. The remainder of the patch accomplishes (2) by plumbing the preferences current state as a std::optional<bool>. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h: * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.serialization.in: * Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm: (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): * Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: (WebKit::optionalExperimentalFeatureEnabled): (WebKit::experimentalFeatureEnabled): (WebKit::WebsiteDataStore::useNetworkLoader): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): Canonical link: https://commits.webkit.org/271812@main
-
_WKHitTestResult should expose an imageMIMEType property
https://bugs.webkit.org/show_bug.cgi?id=266108 rdar://119402116 Reviewed by Aditya Keerthi. Expose sourceImageMIMEType() as an imageMIMEType property on _WKHitTestResult. * Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h: * Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.mm: (-[_WKHitTestResult imageMIMEType]): * Source/WebKit/UIProcess/API/APIHitTestResult.h: (API::HitTestResult::sourceImageMIMEType const): * Tools/TestWebKitAPI/Tests/mac/ContextMenuTests.mm: (TestWebKitAPI::TEST): Added HitTestResultImageMIMEType test. Canonical link: https://commits.webkit.org/271811@main
-
[Wasm-GC] Implement br_on_cast and br_on_cast_fail
https://bugs.webkit.org/show_bug.cgi?id=254694 Reviewed by Justin Michaud. Implements the br_on_cast and br_on_cast_fail instructions. These instructions are compiled via a new addBranchCast method in the Wasm generators. To accommodate the fail case, the emit functions and operations for RefTest are given flags whether to negate the operation. This patch also fixes some missing subtype checks for block parameters. * JSTests/wasm/gc-spec-tests/br_on_cast.wast.js: Added. * JSTests/wasm/gc-spec-tests/br_on_cast_fail.wast.js: Added. * JSTests/wasm/gc/br_on_cast.js: Added. (testBrOnCastValidation): * JSTests/wasm/wasm.json: * Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::addRefTest): (JSC::Wasm::B3IRGenerator::addRefCast): (JSC::Wasm::B3IRGenerator::emitRefTestOrCast): (JSC::Wasm::B3IRGenerator::addBranchCast): * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJIT::addRefTest): (JSC::Wasm::BBQJIT::addBranchNull): (JSC::Wasm::BBQJIT::addBranchCast): * Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp: * Source/JavaScriptCore/wasm/WasmFunctionParser.h: (JSC::Wasm::FunctionParser<Context>::parseExpression): * Source/JavaScriptCore/wasm/WasmIPIntGenerator.cpp: (JSC::Wasm::IPIntGenerator::addRefTest): (JSC::Wasm::IPIntGenerator::addBranchCast): * Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::addBranchCast): (JSC::Wasm::LLIntGenerator::addRefTest): * Source/JavaScriptCore/wasm/WasmOperations.cpp: (JSC::Wasm::JSC_DEFINE_JIT_OPERATION): * Source/JavaScriptCore/wasm/WasmOperations.h: * Source/JavaScriptCore/wasm/WasmSlowPaths.cpp: (JSC::LLInt::WASM_SLOW_PATH_DECL): * Source/JavaScriptCore/wasm/WasmTypeDefinition.cpp: (JSC::Wasm::TypeInformation::signatureForLLIntBuiltin): (JSC::Wasm::TypeInformation::TypeInformation): * Source/JavaScriptCore/wasm/WasmTypeDefinition.h: * Source/JavaScriptCore/wasm/wasm.json: Canonical link: https://commits.webkit.org/271810@main
-
Adopt new drag and context menu interaction classes from ServiceExten…
…sions https://bugs.webkit.org/show_bug.cgi?id=266077 rdar://119380896 Reviewed by Megan Gardner. Replace the following with classes from ServiceExtensions, if available, and use WKSE-prefixed type defines to stage adoption: ``` _UIContextMenuAsyncConfiguration → WKSEContextMenuConfiguration _UIAsyncDragInteraction → WKSEDragInteraction _UIAsyncDragInteractionDelegate → WKSEDragInteractionDelegate ``` Additionally, remove several soft-linked symbols from UIKit, which were only necessary for staging. These symbols have existed in their targeted SDKs for a while now, so we can now explicitly link against them. * Source/WebKit/UIProcess/ios/WKContentViewInteraction.h: * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _shouldUseUIContextMenuAsyncConfiguration]): (-[WKContentView _deferKeyEventToInputMethodEditing:]): (-[WKContentView _interpretKeyEvent:isCharEvent:]): (-[WKContentView _dragInteractionClass]): (-[WKContentView setUpDragAndDropInteractions]): (-[WKContentView dragInteraction:prepareDragSession:completion:]): (-[WKContentView dragInteraction:itemsForAddingToSession:forTouchAtPoint:completion:]): (-[WKContentView _asyncDragInteraction:prepareDragSession:completion:]): (-[WKContentView _asyncDragInteraction:itemsForAddingToSession:withTouchAtPoint:completion:]): (-[WKContentView contextMenuInteraction:configurationForMenuAtLocation:]): Canonical link: https://commits.webkit.org/271809@main
-
Rename ContextMenuItemTagCopyImageUrlToClipboard to please the style-…
…checker https://bugs.webkit.org/show_bug.cgi?id=266137 Reviewed by Chris Dumez. The style checker has been bugging me in a different MR because of ContextMenuItemTagCopyImageUrlToClipboard. Rename it to capitalize URL properly and a fix the capitalization of a few related methods as well. * Source/WebCore/page/ContextMenuController.cpp: (WebCore::ContextMenuController::contextMenuItemSelected): (WebCore::ContextMenuController::populate): (WebCore::ContextMenuController::checkOrEnableIfNeeded const): * Source/WebCore/platform/ContextMenuItem.cpp: (WebCore::isValidContextMenuAction): * Source/WebCore/platform/ContextMenuItem.h: * Source/WebCore/platform/LocalizedStrings.h: * Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp: (WebCore::contextMenuItemTagCopyImageURLToClipboard): (WebCore::contextMenuItemTagCopyImageUrlToClipboard): Deleted. * Source/WebKit/Shared/API/c/WKContextMenuItemTypes.h: * Source/WebKit/Shared/API/c/WKSharedAPICast.h: (WebKit::toAPI): (WebKit::toImpl): * Source/WebKit/Shared/API/glib/WebKitContextMenuActions.cpp: (webkitContextMenuActionGetActionTag): (webkitContextMenuActionGetForContextMenuItem): (webkitContextMenuActionGetLabel): * Source/WebKit/UIProcess/Inspector/mac/WKInspectorViewController.mm: (-[WKInspectorViewController _webView:contextMenu:forElement:]): Canonical link: https://commits.webkit.org/271808@main
-
Generate serialization for PKContact
https://bugs.webkit.org/show_bug.cgi?id=266115 rdar://119407339 Reviewed by Chris Dumez. This does PKContact and the two Contacts types it relies on. There's more Contacts and PassKit types coming, which are all closely related, hence the umbrella serialization.in and implementation files. * Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj: * Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.h: Copied from Source/WebKit/Shared/Cocoa/CoreIPCTypes.h. * Source/WebCore/PAL/pal/cocoa/ContactsSoftLink.mm: Copied from Source/WebKit/Shared/Cocoa/CoreIPCTypes.h. * Source/WebCore/PAL/pal/spi/cocoa/ContactsSPI.h: Copied from Source/WebKit/Shared/Cocoa/CoreIPCTypes.h. * Source/WebKit/DerivedSources-input.xcfilelist: * Source/WebKit/DerivedSources.make: * Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h: * Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm: (IPC::getClass<CNPhoneNumber>): (IPC::getClass<CNPostalAddress>): (IPC::getClass<PKContact>): (IPC::typeFromObject): * Source/WebKit/Shared/Cocoa/CoreIPCContacts.h: Added. (WebKit::CoreIPCCNPostalAddress::CoreIPCCNPostalAddress): (WebKit::CoreIPCCNPhoneNumber::CoreIPCCNPhoneNumber): * Source/WebKit/Shared/Cocoa/CoreIPCContacts.mm: Added. (WebKit::CoreIPCCNPhoneNumber::CoreIPCCNPhoneNumber): (WebKit::CoreIPCCNPhoneNumber::toID const): (WebKit::CoreIPCCNPostalAddress::CoreIPCCNPostalAddress): (WebKit::CoreIPCCNPostalAddress::toID const): * Source/WebKit/Shared/Cocoa/CoreIPCContacts.serialization.in: Added. * Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h: * Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm: (WebKit::valueFromID): * Source/WebKit/Shared/Cocoa/CoreIPCPassKit.h: Copied from Source/WebKit/Shared/Cocoa/CoreIPCTypes.h. (WebKit::CoreIPCPKContact::CoreIPCPKContact): * Source/WebKit/Shared/Cocoa/CoreIPCPassKit.mm: Copied from Source/WebKit/Shared/Cocoa/CoreIPCTypes.h. (WebKit::CoreIPCPKContact::CoreIPCPKContact): (WebKit::CoreIPCPKContact::toID const): * Source/WebKit/Shared/Cocoa/CoreIPCPassKit.serialization.in: Added. * Source/WebKit/Shared/Cocoa/CoreIPCTypes.h: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm: (TEST): Canonical link: https://commits.webkit.org/271807@main
-
Add a preference to enable ::thumb / ::track pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=266136 rdar://119422878 Reviewed by Aditya Keerthi. These can be tested out currently for <input type=checkbox switch>, but eventually the preference should extend to <input type=range> and other form controls. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/css/CSSSelector.cpp: (WebCore::CSSSelector::parsePseudoElementType): * Source/WebCore/css/parser/CSSParserContext.cpp: (WebCore::CSSParserContext::CSSParserContext): (WebCore::add): * Source/WebCore/css/parser/CSSParserContext.h: * Source/WebCore/css/parser/CSSSelectorParserContext.cpp: (WebCore::CSSSelectorParserContext::CSSSelectorParserContext): (WebCore::add): * Source/WebCore/css/parser/CSSSelectorParserContext.h: Canonical link: https://commits.webkit.org/271806@main
-
[iOS] <select> UI is not updated if options are changed
https://bugs.webkit.org/show_bug.cgi?id=235911 rdar://88292987 Reviewed by Wenson Hsieh. On iOS, <select> UI is driven by `FocusedElementInformation`, which is sent to the UI process each time a control is focused. However, if the control is already focused, there are currently no mechanisms for changes to element information to be sent to the UI process. Consequently, any changes to options while a <select> element is focused are not reflected in the UI process. Fix by adding a general mechanism to update `FocusedElementInformation` for controls that are already focused, and adopt it for <select> option changes. In the future, this mechanism could be used for updates to other control types. * LayoutTests/fast/forms/ios/select-option-removed-update-expected.txt: Added. * LayoutTests/fast/forms/ios/select-option-removed-update.html: Added. * LayoutTests/resources/ui-helper.js: * Source/WebCore/html/HTMLSelectElement.cpp: (WebCore::HTMLSelectElement::setRecalcListItems): * Source/WebCore/page/ChromeClient.h: (WebCore::ChromeClient::focusedSelectElementDidChangeOptions): * Source/WebKit/UIProcess/PageClient.h: * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/UIProcess/ios/PageClientImplIOS.h: * Source/WebKit/UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::updateFocusedElementInformation): * Source/WebKit/UIProcess/ios/WKContentViewInteraction.h: * Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _updateFocusedElementInformation:]): Ensure updates are made only if they are referencing the same element. * Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm: (-[WKDataListSuggestionsPickerView controlUpdateEditing]): * Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::updateFocusedElementInformation): * Source/WebKit/UIProcess/ios/forms/WKDateTimeInputControl.mm: (-[WKDateTimePicker controlUpdateEditing]): * Source/WebKit/UIProcess/ios/forms/WKFormColorControl.mm: (-[WKColorPicker controlUpdateEditing]): * Source/WebKit/UIProcess/ios/forms/WKFormPeripheral.h: * Source/WebKit/UIProcess/ios/forms/WKFormPeripheralBase.h: * Source/WebKit/UIProcess/ios/forms/WKFormPeripheralBase.mm: (-[WKFormPeripheralBase updateEditing]): * Source/WebKit/UIProcess/ios/forms/WKFormSelectPicker.mm: (-[WKMultipleSelectPicker controlUpdateEditing]): (-[WKSelectSinglePicker controlUpdateEditing]): (-[WKSelectPicker controlUpdateEditing]): (-[WKSelectMultiplePicker controlUpdateEditing]): * Source/WebKit/UIProcess/ios/forms/WKFormSelectPopover.mm: (-[WKSelectPopover controlUpdateEditing]): * Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedSelectElementDidChangeOptions): * Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::focusedSelectElementDidChangeOptions): * Source/WebKit/WebProcess/WebPage/WebPage.h: Canonical link: https://commits.webkit.org/271805@main
-
Serialize canvas font families as needed
https://bugs.webkit.org/show_bug.cgi?id=265993 rdar://problem/119312574 Reviewed by Dean Jackson. In a canvas rendering context, the `font` attribute contains a list of font families, which should only contain valid CSS custom-ident's and strings (in quotes, with escaped characters as appropriate). The original code used to only serialize family names with spaces in them, which could have missed some cases, such as the one in the WPT test 2d.text.drawing.style.absolute.spacing.html: `QuotedFont\",` and others. This patch uses the CSS markup function serializeFontFamily to serialize the canvas rendering context's `font` family names when needed. * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/text/2d.text.font.parse.family-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/offscreen/text/2d.text.font.parse.family.worker-expected.txt: * Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp: (WebCore::CanvasRenderingContext2DBase::State::fontString const): Canonical link: https://commits.webkit.org/271804@main
-
REGRESSION(271747@main): [Win] ASSERTION FAILED: canSafelyBeUsed() un…
…der WebKit::RemoteImageBufferProxy::streamConnection https://bugs.webkit.org/show_bug.cgi?id=266138 Unreviewed crash fix for Windows port. After 271747@main, createFlusher() method of ImageBuffer has to be called on the main thread. * Source/WebKit/WebProcess/WebPage/wc/DrawingAreaWC.cpp: Canonical link: https://commits.webkit.org/271803@main
-
[ews] Increase s3 presigned url validity duration
https://bugs.webkit.org/show_bug.cgi?id=266143 Unreviewed follpw-up fix. We increased the timeout for s3 upload to 10 minutes in #21545 and then added retries in #21547 We need to increase s3 presigned url validity duration as well, otherwise by the time we retry, s3 url would have expired. * Tools/CISupport/Shared/generate-s3-url: (generateS3URL): Canonical link: https://commits.webkit.org/271802@main
-
https://bugs.webkit.org/show_bug.cgi?id=265854 rdar://119171337 Reviewed by Mark Lam. This patch adds linkThunk mechanism to Jump and Call. Previously, we were using LinkBuffer::link when jumping to a thunk or calling a thunk. But the implementation of this is really costly and it was not so good. (1) it uses performJITMemcpy to rewrite code, which does JIT memory permission switch every time. And (2) it does not leverage branch compaction. So even though it is thunk address, we never do branch compaction and typically we have several nops around it. Instead, we have linkThunk mechanism which can just link Jump and Call to a thunk. On ARM64, this is fully integrated into our branch compaction mechanism so that we can repatch it through LinkBuffer's branch compaction. On the other architectures, it is the same to the current behavior. * Source/JavaScriptCore/assembler/ARM64Assembler.h: (JSC::ARM64Assembler::LinkRecord::LinkRecord): (JSC::ARM64Assembler::LinkRecord::isThunk const): * Source/JavaScriptCore/assembler/ARMv7Assembler.h: (JSC::ARMv7Assembler::LinkRecord::setFrom): (JSC::ARMv7Assembler::LinkRecord::to const): * Source/JavaScriptCore/assembler/AbstractMacroAssembler.h: (JSC::AbstractMacroAssembler::Jump::linkThunk const): (JSC::AbstractMacroAssembler::JumpList::linkTo const): (JSC::AbstractMacroAssembler::JumpList::linkThunk const): * Source/JavaScriptCore/assembler/LinkBuffer.cpp: (JSC::LinkBuffer::copyCompactAndLinkCode): * Source/JavaScriptCore/assembler/MacroAssemblerARM64.h: (JSC::MacroAssemblerARM64::callOperation): (JSC::MacroAssemblerARM64::callThunk): (JSC::MacroAssemblerARM64::jumpThunk): * Source/JavaScriptCore/assembler/MacroAssemblerARM64E.h: (JSC::MacroAssemblerARM64E::callOperation): * Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h: (JSC::MacroAssemblerARMv7::callOperation): (JSC::MacroAssemblerARMv7::callThunk): (JSC::MacroAssemblerARMv7::jumpThunk): * Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h: (JSC::MacroAssemblerRISCV64::callOperation): (JSC::MacroAssemblerRISCV64::callThunk): (JSC::MacroAssemblerRISCV64::jumpThunk): * Source/JavaScriptCore/assembler/MacroAssemblerX86_64.h: (JSC::MacroAssemblerX86_64::callOperation): (JSC::MacroAssemblerX86_64::callThunk): (JSC::MacroAssemblerX86_64::jumpThunk): * Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.cpp: * Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp: (JSC::InlineCacheCompiler::emitExplicitExceptionHandler): (JSC::getByIdSlowPathCodeGenerator): (JSC::getByIdWithThisSlowPathCodeGenerator): (JSC::getByValSlowPathCodeGenerator): (JSC::getPrivateNameSlowPathCodeGenerator): (JSC::getByValWithThisSlowPathCodeGenerator): (JSC::putByIdSlowPathCodeGenerator): (JSC::putByValSlowPathCodeGenerator): (JSC::instanceOfSlowPathCodeGenerator): (JSC::delByIdSlowPathCodeGenerator): (JSC::delByValSlowPathCodeGenerator): (JSC::InlineCacheCompiler::generateImpl): (JSC::InlineCacheCompiler::regenerate): * Source/JavaScriptCore/bytecode/Repatch.cpp: (JSC::linkPolymorphicCall): * Source/JavaScriptCore/ftl/FTLCompile.cpp: (JSC::FTL::compile): * Source/JavaScriptCore/ftl/FTLLink.cpp: (JSC::FTL::link): * Source/JavaScriptCore/jit/JIT.cpp: (JSC::JIT::compileAndLinkWithoutFinalizing): (JSC::JIT::link): * Source/JavaScriptCore/jit/JITMathIC.h: (JSC::JITMathIC::generateOutOfLine): * Source/JavaScriptCore/jit/JITOpcodes.cpp: (JSC::JIT::op_check_traps_handlerGenerator): * Source/JavaScriptCore/jit/JITPropertyAccess.cpp: (JSC::JIT::slow_op_resolve_scopeGenerator): (JSC::JIT::slow_op_put_to_scopeGenerator): * Source/JavaScriptCore/jit/SlowPathCall.cpp: (JSC::JITSlowPathCall::generateThunk): * Source/JavaScriptCore/jit/SpecializedThunkJIT.h: (JSC::SpecializedThunkJIT::finalize): * Source/JavaScriptCore/jit/ThunkGenerators.cpp: (JSC::popThunkStackPreservesAndHandleExceptionGenerator): (JSC::checkExceptionGenerator): (JSC::nativeForGenerator): * Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::B3IRGenerator::B3IRGenerator): (JSC::Wasm::B3IRGenerator::emitExceptionCheck): * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJIT::emitWriteBarrier): (JSC::Wasm::BBQJIT::emitThrowException): (JSC::Wasm::BBQJIT::addTopLevel): (JSC::Wasm::BBQJIT::addLoopOSREntrypoint): * Source/JavaScriptCore/wasm/WasmIRGeneratorHelpers.h: (JSC::Wasm::emitRethrowImpl): (JSC::Wasm::emitThrowImpl): * Source/JavaScriptCore/wasm/WasmThunks.cpp: (JSC::Wasm::catchInWasmThunkGenerator): * Source/JavaScriptCore/wasm/js/JSToWasm.cpp: (JSC::Wasm::marshallJSResult): * Source/JavaScriptCore/wasm/js/WasmToJS.cpp: (JSC::Wasm::wasmToJS): (JSC::Wasm::emitThrowWasmToJSException): Canonical link: https://commits.webkit.org/271801@main
-
[ews] Add retry to upload-file-to-url (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=266119 Unreviewed follow-up fix. Also increase the timeout for buildbot step. * Tools/CISupport/ews-build/steps.py: (UploadFileToS3.__init__): * Tools/CISupport/ews-build/steps_unittest.py: * Tools/Scripts/upload-file-to-url: (upload): Canonical link: https://commits.webkit.org/271800@main
-
Unreviewed, reverting 271796@main.
https://bugs.webkit.org/show_bug.cgi?id=266140 broken watchos build Reverted changeset: "Introduce compile-time checking and alternate allocation for compact pointer types" https://bugs.webkit.org/show_bug.cgi?id=266080 https://commits.webkit.org/271796@main Canonical link: https://commits.webkit.org/271799@main
-
Reserve a few more slots in g_config
https://bugs.webkit.org/show_bug.cgi?id=266110 rdar://119403904 Reviewed by Mark Lam. Increases the base reserved slots of g_config and increases the size of the gigacage config. * Source/bmalloc/bmalloc/GigacageConfig.h: Canonical link: https://commits.webkit.org/271798@main
David Degazio authored and Mark Lam committedDec 9, 2023 -
Profile misc. pointer usage in libPAS
https://bugs.webkit.org/show_bug.cgi?id=266107 rdar://119401118 Reviewed by Mark Lam. Introduces an optionally-defined macro PAS_PROFILE to allow an embedder to decorate libPAS functions with logging or profiling code. * Source/WTF/WTF.xcodeproj/project.pbxproj: * Source/bmalloc/Configurations/Base.xcconfig: * Source/bmalloc/bmalloc.xcodeproj/project.pbxproj: * Source/bmalloc/libpas/src/libpas/pas_deallocate.h: (pas_try_deallocate): * Source/bmalloc/libpas/src/libpas/pas_page_base_config_utils.h: * Source/bmalloc/libpas/src/libpas/pas_page_base_config_utils_inlines.h: * Source/bmalloc/libpas/src/libpas/pas_try_reallocate.h: (pas_try_reallocate): * Source/bmalloc/libpas/src/libpas/pas_utils.h: (pas_zero_memory): Canonical link: https://commits.webkit.org/271797@main
David Degazio committedDec 9, 2023 -
Introduce compile-time checking and alternate allocation for compact …
…pointer types https://bugs.webkit.org/show_bug.cgi?id=266080 rdar://119382681 Reviewed by Mark Lam. Adds compile-time checking to WTF compact and packed pointer types requiring the pointed-to types to be explicitly marked as compatible with compact pointers. Also adds new equivalents to the existing WTF::fastMalloc and WTF::isoMalloc allocation functions for compactible types, giving us an API point to play with how types used in compact pointers are allocated. * Source/JavaScriptCore/bytecode/CallLinkInfoBase.h: * Source/JavaScriptCore/bytecode/CodeBlock.h: * Source/JavaScriptCore/bytecode/InlineCallFrame.h: * Source/JavaScriptCore/bytecode/InlineCallFrameSet.h: * Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h: * Source/JavaScriptCore/bytecode/Watchpoint.h: * Source/JavaScriptCore/dfg/DFGJITCode.h: * Source/JavaScriptCore/heap/FastMallocAlignedMemoryAllocator.cpp: * Source/JavaScriptCore/heap/IsoAlignedMemoryAllocator.cpp: * Source/JavaScriptCore/jit/BaselineJITCode.h: * Source/JavaScriptCore/jit/ExecutableMemoryHandle.h: * Source/JavaScriptCore/jit/JITCode.h: * Source/JavaScriptCore/jit/PolymorphicCallStubRoutine.h: * Source/JavaScriptCore/runtime/ClassInfo.h: * Source/JavaScriptCore/runtime/JSArray.h: * Source/JavaScriptCore/wasm/WasmTypeDefinition.h: * Source/WTF/wtf/Bag.h: * Source/WTF/wtf/CompactPointerTuple.h: * Source/WTF/wtf/CompactPtr.h: * Source/WTF/wtf/DebugHeap.h: * Source/WTF/wtf/FastMalloc.cpp: * Source/WTF/wtf/FastMalloc.h: * Source/WTF/wtf/IsoMalloc.h: * Source/WTF/wtf/IsoMallocInlines.h: * Source/WTF/wtf/SentinelLinkedList.h: * Source/WTF/wtf/WeakPtr.h: * Source/WTF/wtf/text/StringImpl.h: * Source/WTF/wtf/text/WTFString.h: * Source/WebCore/dom/Node.h: * Source/WebCore/dom/NodeRareData.h: * Source/WebCore/rendering/RenderObject.cpp: * Source/WebCore/rendering/RenderObject.h: * Source/bmalloc/bmalloc/AllocationCounts.h: * Source/bmalloc/bmalloc/IsoHeap.cpp: * Source/bmalloc/bmalloc/IsoHeap.h: * Source/bmalloc/bmalloc/IsoHeapImpl.h: * Source/bmalloc/bmalloc/IsoHeapInlines.h: * Source/bmalloc/bmalloc/Packed.h: * Tools/TestWebKitAPI/Tests/WTF/AlignedRefLogger.h: * Tools/TestWebKitAPI/Tests/WTF/CompactRefPtr.cpp: * Tools/TestWebKitAPI/Tests/WTF/CompactUniquePtrTuple.cpp: * Tools/TestWebKitAPI/Tests/WTF/RefLogger.h: Canonical link: https://commits.webkit.org/271796@main
David Degazio committedDec 9, 2023 -
Adopt ServiceExtensions ScrollView and Delegate.
https://bugs.webkit.org/show_bug.cgi?id=266100 rdar://119398513 Reviewed by Wenson Hsieh. Adoption of scroll view in ServiceExtensions and the linking of that framework. * Source/WebKit/Configurations/WebKit.xcconfig: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h: * Source/WebKit/UIProcess/API/ios/WKSEDefinitions.h: Added. * Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: * Source/WebKit/UIProcess/ios/WKBaseScrollView.h: * Source/WebKit/UIProcess/ios/WKScrollView.h: * Source/WebKit/UIProcess/ios/WKScrollView.mm: (-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]): (-[WKScrollView _updateDelegate]): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/271795@main
-
[MSE] MediaSourcePrivate::buffered() shouldn't call its client
https://bugs.webkit.org/show_bug.cgi?id=266064 rdar://119369641 Reviewed by Youenn Fablet. Have MediaSourcePrivate be the owner of the buffered range and have the MediaSource query its MediaSourcePrivate instead. By keeping it in the MediaSourcePrivate we can remove a synchronous call which will no longer be possible once the MediaSourcePrivate runs in a different queue than the MediaSource. Similarly, also make MediaSource not hold its duration, but have the MediaSourcePrivate do so. * Source/WebCore/Modules/mediasource/ManagedMediaSource.cpp: (WebCore::ManagedMediaSource::isBuffered const): * Source/WebCore/Modules/mediasource/MediaSource.cpp: (WebCore::MediaSource::duration const): (WebCore::MediaSource::buffered const): (WebCore::MediaSource::seekable): (WebCore::MediaSource::hasBufferedTime): (WebCore::MediaSource::monitorSourceBuffers): (WebCore::MediaSource::setDurationInternal): (WebCore::MediaSource::detachFromElement): (WebCore::MediaSource::updateBufferedIfNeeded): * Source/WebCore/Modules/mediasource/MediaSource.h: * Source/WebCore/platform/graphics/MediaSourcePrivate.cpp: (WebCore::MediaSourcePrivate::duration const): (WebCore::MediaSourcePrivate::bufferedChanged): (WebCore::MediaSourcePrivate::buffered const): * Source/WebCore/platform/graphics/MediaSourcePrivate.h: * Source/WebCore/platform/graphics/MediaSourcePrivateClient.h: * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.cpp: (WebKit::RemoteMediaSourceProxy::bufferedChanged): (WebKit::RemoteMediaSourceProxy::buffered const): Deleted. Implemented in the base class. * Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h: * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.cpp: (WebKit::MediaSourcePrivateRemote::durationChanged): ensure that the base class durationChanged is called. (WebKit::MediaSourcePrivateRemote::bufferedChanged): * Source/WebKit/WebProcess/GPU/media/MediaSourcePrivateRemote.h: Canonical link: https://commits.webkit.org/271794@main
-
Port FilterEffect to the new IPC serialization format
https://bugs.webkit.org/show_bug.cgi?id=266037 Reviewed by Brady Eidson. * Source/WebCore/platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::create): * Source/WebCore/platform/graphics/filters/FEBlend.h: * Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp: (WebCore::FEColorMatrix::create): * Source/WebCore/platform/graphics/filters/FEColorMatrix.h: * Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp: (WebCore::FEComponentTransfer::create): * Source/WebCore/platform/graphics/filters/FEComponentTransfer.h: * Source/WebCore/platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::create): * Source/WebCore/platform/graphics/filters/FEComposite.h: * Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp: (WebCore::FEConvolveMatrix::create): * Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h: * Source/WebCore/platform/graphics/filters/FEDiffuseLighting.cpp: (WebCore::FEDiffuseLighting::create): * Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h: * Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp: (WebCore::FEDisplacementMap::create): * Source/WebCore/platform/graphics/filters/FEDisplacementMap.h: * Source/WebCore/platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::create): * Source/WebCore/platform/graphics/filters/FEDropShadow.h: * Source/WebCore/platform/graphics/filters/FEFlood.cpp: (WebCore::FEFlood::create): * Source/WebCore/platform/graphics/filters/FEFlood.h: * Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::create): * Source/WebCore/platform/graphics/filters/FEGaussianBlur.h: * Source/WebCore/platform/graphics/filters/FEImage.cpp: (WebCore::FEImage::create): * Source/WebCore/platform/graphics/filters/FEImage.h: * Source/WebCore/platform/graphics/filters/FEMerge.cpp: (WebCore::FEMerge::create): * Source/WebCore/platform/graphics/filters/FEMerge.h: * Source/WebCore/platform/graphics/filters/FEMorphology.cpp: (WebCore::FEMorphology::create): * Source/WebCore/platform/graphics/filters/FEMorphology.h: * Source/WebCore/platform/graphics/filters/FEOffset.cpp: (WebCore::FEOffset::create): * Source/WebCore/platform/graphics/filters/FEOffset.h: * Source/WebCore/platform/graphics/filters/FESpecularLighting.cpp: (WebCore::FESpecularLighting::create): * Source/WebCore/platform/graphics/filters/FESpecularLighting.h: * Source/WebCore/platform/graphics/filters/FETile.cpp: (WebCore::FETile::create): * Source/WebCore/platform/graphics/filters/FETile.h: * Source/WebCore/platform/graphics/filters/FETurbulence.cpp: (WebCore::FETurbulence::create): * Source/WebCore/platform/graphics/filters/FETurbulence.h: * Source/WebCore/platform/graphics/filters/SourceAlpha.cpp: (WebCore::SourceAlpha::create): (WebCore::SourceAlpha::SourceAlpha): * Source/WebCore/platform/graphics/filters/SourceAlpha.h: * Source/WebCore/platform/graphics/filters/SourceGraphic.cpp: (WebCore::SourceGraphic::create): * Source/WebCore/platform/graphics/filters/SourceGraphic.h: * Source/WebKit/Shared/WebCoreArgumentCoders.cpp: (IPC::ArgumentCoder<FilterEffect>::encode): Deleted. (IPC::ArgumentCoder<FilterEffect>::decode): Deleted. * Source/WebKit/Shared/WebCoreArgumentCoders.h: * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: Canonical link: https://commits.webkit.org/271793@main
-
[UnifiedPDF] CGPDFPageLayoutGetAreaOfInterestAtPoint should be declar…
…ed with C linkage https://bugs.webkit.org/show_bug.cgi?id=266094 rdar://119394292 Reviewed by Wenson Hsieh. Since CGPDFPageLayoutGetAreaOfInterestAtPoint is a C API, it must not go through name mangling, so we specify C linkage for it. This patch fixes the open source macOS build with unified PDF enabled. * Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h: Canonical link: https://commits.webkit.org/271792@main
-
Track cross-tab WindowProxy accesses
https://bugs.webkit.org/show_bug.cgi?id=265822 rdar://118208200 Reviewed by Chris Dumez. We want to track how WindowProxy is used across tabs (i.e. via an opener relationship). This can be used to build up telemetry on how useful something like `Cross-Origin-Opener-Policy: restrict-properties` would be on the web (which is a version of COOP that restricts cross-origin WindowProxy to just the postMessage and closed properties). To do this, we trap all property access in JSWindowProxy. In my own local tests, this seems to work. Most WindowProxy property access seems to be just from callers trying to access some property on their own window object. That bails out early on in the logic added by this patch (in the `if target == lexicalGlobalObject` check). From there, if we detect that WindowProxy is used across an opener relationship, we message the UIProcess about the property access the first time it happens via LocalFrame and LocalFrameLoaderClient. Note that the current approach doesn't handle the case of detecting if a WindowProxy is accessed through multiple levels of openers (e.g. `window.opener.opener.postMessage`). But I don't think that use case is very common. One additional change is that I had to add some URL loading history to FrameLoadState. This is because if an opened frame accesses WindowProxy in some way, we want to tell UIProcess not only about the currently loaded domain in that frame, but also previous domains that have been loaded in that frame. The URL history is only enabled for main frames (since those might have been opened by a DOM opener), so I don't think it should have much memory impact. BackForwardList isn't sufficient since we also want to capture things like server-side redirects that occur before the load event fires in the page. * LayoutTests/TestExpectations: * LayoutTests/http/wpt/opener/child-access-parent-via-windowproxy-expected.txt: Added. * LayoutTests/http/wpt/opener/child-access-parent-via-windowproxy.html: Added. * LayoutTests/http/wpt/opener/iframe-access-top-via-windowproxy-expected.txt: Added. * LayoutTests/http/wpt/opener/iframe-access-top-via-windowproxy.html: Added. * LayoutTests/http/wpt/opener/parent-access-child-via-windowproxy-expected.txt: Added. * LayoutTests/http/wpt/opener/parent-access-child-via-windowproxy.html: Added. * LayoutTests/http/wpt/opener/resources/empty.html: Added. * LayoutTests/http/wpt/opener/resources/send-message-to-opener.html: Added. * LayoutTests/http/wpt/opener/resources/send-message-to-top.html: Added. * LayoutTests/platform/ios-wk2/TestExpectations: * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WTF/wtf/PlatformEnableCocoa.h: * Source/WebCore/bindings/js/JSWindowProxy.cpp: (WebCore::frameInfo): (WebCore::hasSameMainFrame): (WebCore::logCrossTabPropertyAccess): (WebCore::checkCrossTabWindowProxyUsage): (WebCore::JSWindowProxy::getOwnPropertySlot): (WebCore::JSWindowProxy::getOwnPropertySlotByIndex): (WebCore::JSWindowProxy::put): (WebCore::JSWindowProxy::putByIndex): (WebCore::JSWindowProxy::deleteProperty): (WebCore::JSWindowProxy::deletePropertyByIndex): (WebCore::JSWindowProxy::defineOwnProperty): * Source/WebCore/bindings/js/JSWindowProxy.h: * Source/WebCore/loader/FrameLoaderTypes.h: * Source/WebCore/loader/LocalFrameLoaderClient.h: * Source/WebCore/page/LocalFrame.cpp: (WebCore::LocalFrame::setDocument): (WebCore::LocalFrame::didAccessWindowProxyPropertyViaOpener): * Source/WebCore/page/LocalFrame.h: * Source/WebCore/page/Location.h: * Source/WebKit/Scripts/webkit/messages.py: (headers_for_type): * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm: * Source/WebKit/UIProcess/FrameLoadState.cpp: (WebKit::FrameLoadState::didStartProvisionalLoad): (WebKit::FrameLoadState::didSuspend): (WebKit::FrameLoadState::didExplicitOpen): (WebKit::FrameLoadState::didReceiveServerRedirectForProvisionalLoad): (WebKit::FrameLoadState::didFailProvisionalLoad): (WebKit::FrameLoadState::didCommitLoad): (WebKit::FrameLoadState::didFinishLoad): (WebKit::FrameLoadState::didSameDocumentNotification): (WebKit::FrameLoadState::setURL): * Source/WebKit/UIProcess/FrameLoadState.h: (WebKit::FrameLoadState::Observer::didReceiveProvisionalURL): (WebKit::FrameLoadState::Observer::didCancelProvisionalLoad): (WebKit::FrameLoadState::Observer::didCommitProvisionalLoad): (WebKit::FrameLoadState::Observer::didFinishLoad): (WebKit::FrameLoadState::setURL): Deleted. * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCreateMainFrame): (WebKit::WebPageProxy::didAccessWindowProxyPropertyViaOpenerForFrame): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/UIProcess/WebPageProxyInternals.h: * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreClient.h: (WebKit::WebsiteDataStoreClient::didAccessWindowProxyProperty): * Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp: (WebKit::WebLocalFrameLoaderClient::didAccessWindowProxyPropertyViaOpener): * Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.h: * Tools/MiniBrowser/mac/AppDelegate.m: (windowProxyPropertyDescription): (-[BrowserAppDelegate websiteDataStore:domain:didOpenDomainViaWindowOpen:withProperty:directly:]): * Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: (WTR::InjectedBundle::didReceiveMessageToPage): * Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::getAndClearReportedWindowProxyAccessDomains): (WTR::TestRunner::didGetAndClearReportedWindowProxyAccessDomains): * Tools/WebKitTestRunner/InjectedBundle/TestRunner.h: * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::getAndClearReportedWindowProxyAccessDomains): * Tools/WebKitTestRunner/TestController.h: * Tools/WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::didReceiveMessageFromInjectedBundle): * Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm: (WTR::TestController::cocoaResetStateToConsistentValues): (WTR::createWKArray): (WTR::TestController::getAndClearReportedWindowProxyAccessDomains): * Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.h: * Tools/WebKitTestRunner/cocoa/TestWebsiteDataStoreDelegate.mm: (-[TestWebsiteDataStoreDelegate init]): (-[TestWebsiteDataStoreDelegate websiteDataStore:domain:didOpenDomainViaWindowOpen:withProperty:directly:]): (-[TestWebsiteDataStoreDelegate reportedWindowProxyAccessDomains]): (-[TestWebsiteDataStoreDelegate clearReportedWindowProxyAccessDomains]): Canonical link: https://commits.webkit.org/271791@main
-
Enable scroll anchoring by default
https://bugs.webkit.org/show_bug.cgi?id=264784 rdar://118365809 Reviewed by Aditya Keerthi. Re-enable scroll anchoring after rdar://119203528 is resolved. Remove check in checkSettingsControlledByLockdownMode for scroll-anchoring being turned off now that it is a stable feature. * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WebCore/page/LocalFrameView.cpp: (WebCore::LocalFrameView::LocalFrameView): * Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Canonical link: https://commits.webkit.org/271790@main
-
Reduce necessary bits in some compact pointer encodings
https://bugs.webkit.org/show_bug.cgi?id=266098 rdar://119397319 Reviewed by Mark Lam. Reduces the reserved non-pointer space for some ad-hoc compact pointer tuples. * Source/JavaScriptCore/dfg/DFGEdge.h: (JSC::DFG::Edge::shift): (JSC::DFG::Edge::addressMask): (JSC::DFG::Edge::node const): (JSC::DFG::Edge::useKindUnchecked const): (JSC::DFG::Edge::proofStatusUnchecked const): (JSC::DFG::Edge::killStatusUnchecked const): (JSC::DFG::Edge::makeWord): * Source/bmalloc/libpas/src/libpas/pas_enumerate_segregated_heaps.c: (pas_enumerate_segregated_heaps): * Source/bmalloc/libpas/src/libpas/pas_segregated_page_config_kind_and_role.h: * Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.c: (process_deallocation_log_with_config): (flush_deallocation_log_without_resetting): * Source/bmalloc/libpas/src/libpas/pas_thread_local_cache.h: (pas_thread_local_cache_encode_object): Canonical link: https://commits.webkit.org/271789@main
David Degazio authored and Mark Lam committedDec 9, 2023 -
Reject empty path string when parsing offset-path and clip-path
https://bugs.webkit.org/show_bug.cgi?id=265666 rdar://119034794 Reviewed by Tim Nguyen. Reject empty paths. Reject fill rules for offset-path. This is what the WPT tests expect, although I can't find any specification that clearly asks for either of these behaviors. It's expedient for now to match the tests and the other browsers, although it would be better if the specification matched. * LayoutTests/imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/motion/parsing/offset-path-parsing-invalid-expected.txt: Expect more PASS. * Source/WebCore/css/CSSProperties.json: Changed parameters for consumePathOperation from ConsumeRay::Exclude/Include to RejectRay and RejectFillRule. * Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp: (WebCore::CSSPropertyParserHelpers::consumeBasicShapePath): Added support for RejectFillRule. Reject empty paths. (WebCore::CSSPropertyParserHelpers::consumeBasicShape): Added options passed through to consumeBasicShapePath. (WebCore::CSSPropertyParserHelpers::consumeBasicShapeRayOrBox): Take options instead of the consumeRay argument. Pass the options through to consumeBasicShape, and implement the RejectRay option. (WebCore::CSSPropertyParserHelpers::consumePathOperation): Take options instead of the consumeRay argument. (WebCore::CSSPropertyParserHelpers::consumeShapeOutside): Pass options to consumeBasicShape. * Source/WebCore/css/parser/CSSPropertyParserHelpers.h: Added PathParsingOption, removed PathParsingOption. Made consumePathOperation take options instead of the consumeRay argument. Canonical link: https://commits.webkit.org/271788@main
-
Deploy more smart pointers in WebPageMac.mm
https://bugs.webkit.org/show_bug.cgi?id=266120 rdar://119409794 Reviewed by Chris Dumez. * Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setTopOverhangImage): (WebKit::WebPage::setBottomOverhangImage): Canonical link: https://commits.webkit.org/271787@main
-
Deploy more smart pointers in RemoteLayerTreeDrawingAreaMac.mm
https://bugs.webkit.org/show_bug.cgi?id=266125 rdar://119411410 Reviewed by Chris Dumez. * Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm: (WebKit::RemoteLayerTreeDrawingAreaMac::willCommitLayerTree): Canonical link: https://commits.webkit.org/271786@main
-
Deploy more smart pointers in TiledCoreAnimationDrawingArea.mm
https://bugs.webkit.org/show_bug.cgi?id=266123 rdar://119410719 Reviewed by Chris Dumez. * Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers): Canonical link: https://commits.webkit.org/271785@main