Repository navigation
Upgrade to upstream WebKit ccdcb8a026 - #614
Merged
Merged
Conversation
https://bugs.webkit.org/show_bug.cgi?id=322777 rdar://182292647 Reviewed by Mike Wyrzykowski, Etienne Segonzac, and Sam Weinig. Extend position-anchor so an anchor name may carry a '#'-delimited attachment point naming a node in the anchor's model asset. Parsing and serialization only. Proposed in the Spatial CSS explainer, not yet in a specification. The name and the suffix tokenize separately, which grammar notation cannot express, so the suffix is parsed by hand while the property's grammar stays generated. Only the suffix is gated on the spatial portal feature, so other platforms accept the same values as before. Adjacency is deliberate: whitespace before the '#' is rejected, comments are not, and the hash must be an identifier. Tests: spatial-css/spatial-portal-anchor-css.html spatial-css/spatial-portal-anchor-invalid.html spatial-css/spatial-portal-anchor-off.html * LayoutTests/spatial-css/spatial-portal-anchor-css-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-anchor-css.html: Added. * LayoutTests/spatial-css/spatial-portal-anchor-invalid-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-anchor-invalid.html: Added. * LayoutTests/spatial-css/spatial-portal-anchor-off-expected.txt: Added. * LayoutTests/spatial-css/spatial-portal-anchor-off.html: Added. * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/css/CSSPinnedAnchorNameValue.cpp: Added. (WebCore::CSSPinnedAnchorNameValue::create): (WebCore::CSSPinnedAnchorNameValue::CSSPinnedAnchorNameValue): (WebCore::CSSPinnedAnchorNameValue::customCSSText const): (WebCore::CSSPinnedAnchorNameValue::equals const): (WebCore::CSSPinnedAnchorNameValue::addDerivedHash const): * Source/WebCore/css/CSSPinnedAnchorNameValue.h: Added. * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/CSSValue.cpp: (WebCore::CSSValue::visitDerived): * Source/WebCore/css/CSSValue.h: (WebCore::CSSValue::isPinnedAnchorNameValue const): * Source/WebCore/css/parser/CSSPropertyParserConsumer+Anchor.cpp: (WebCore::CSSPropertyParserHelpers::consumePinnedAnchorName): * Source/WebCore/css/parser/CSSPropertyParserConsumer+Anchor.h: * Source/WebCore/style/values/anchor-position/StylePinnedAnchorName.cpp: Added. (WebCore::Style::CSSValueCreation<PinnedAnchorName>::operator): (WebCore::Style::Serialize<PinnedAnchorName>::operator): (WebCore::Style::operator<<): * Source/WebCore/style/values/anchor-position/StylePinnedAnchorName.h: Added. * Source/WebCore/style/values/anchor-position/StylePositionAnchor.cpp: (WebCore::Style::CSSValueConversion<PositionAnchor>::operator): * Source/WebCore/style/values/anchor-position/StylePositionAnchor.h: (WebCore::Style::PositionAnchor::PositionAnchor): (WebCore::Style::PositionAnchor::isName const): (WebCore::Style::PositionAnchor::tryName const): Canonical link: https://commits.webkit.org/320546@main
…ATFORM(WATCHOS) && !PLATFORM(APPLETV))` compile-time guards https://bugs.webkit.org/show_bug.cgi?id=323458 Reviewed by Richard Robinson and Aditya Keerthi. Remove these now-unnecessary checks, now that the WKTextExtraction module compiles on non-internal watchOS and tvOS SDKs. * Source/WebKit/UIProcess/API/Cocoa/WKWebView+TextExtraction.mm: (-[WKWebView _ensureTextExtractionFilterRulesWithCompletionHandler:]): (-[WKWebView _performInteraction:inFrame:actionType:staleNodeResolution:completionHandler:]): (-[WKWebView _retryInteractionWithConnectedRemapCandidate:actionType:requestedNodeIdentifier:remapCandidates:failureDescription:completionHandler:]): (-[WKWebView _requestTextExtractionInternal:completion:]): (-[WKWebView _requestTextExtraction:completionHandler:]): (-[WKWebView _describeInteraction:completionHandler:]): (-[WKWebView _describeInteraction:inFrame:staleNodeResolution:completionHandler:]): (-[WKWebView _retryDescribingInteractionWithConnectedRemapCandidate:requestedNodeIdentifier:remapCandidates:completionHandler:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _extractDebugTextWithConfiguration:completionHandler:]): (-[WKWebView _performInteraction:completionHandler:]): (-[WKWebView _filterExtractedString:options:completionHandler:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebViewInternal.h: * Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.h: * Source/WebKit/UIProcess/Cocoa/TextExtraction/WKTextExtractionUtilities.mm: Canonical link: https://commits.webkit.org/320547@main
https://bugs.webkit.org/show_bug.cgi?id=323465 rdar://186697890 Reviewed by Yijia Huang. This patch optimizes Wasm globals initialization related code, 1. constant expression validator should collect maxStackHeight. So we can use this when evaluating constant expression. 2. Wasm array / struct are initialized with zeros. So we should set a new value only when it is not zero (jsNull() for example). * Source/JavaScriptCore/wasm/WasmConstExprGenerator.cpp: (JSC::Wasm::ConstExprInterpreter::run): (JSC::Wasm::ConstExprInterpreter::createNewArray): (JSC::Wasm::ConstExprInterpreter::createNewStruct): (JSC::Wasm::ConstExprGenerator::maxStackHeight const): (JSC::Wasm::ConstExprGenerator::didParseOpcode): (JSC::Wasm::parseExtendedConstExpr): (JSC::Wasm::evaluateExtendedConstExpr): * Source/JavaScriptCore/wasm/WasmConstExprGenerator.h: * Source/JavaScriptCore/wasm/WasmModuleInformation.h: * Source/JavaScriptCore/wasm/WasmOperationsInlines.h: (JSC::Wasm::structNew): * Source/JavaScriptCore/wasm/WasmSectionParser.cpp: (JSC::Wasm::SectionParser::parseInitExpr): * Source/JavaScriptCore/wasm/WasmTable.cpp: (JSC::Wasm::FuncRefTable::FuncRefTable): * Source/JavaScriptCore/wasm/WasmTypeDefinition.h: * Source/JavaScriptCore/wasm/js/JSWebAssemblyStruct.cpp: (JSC::JSWebAssemblyStruct::get const): (JSC::JSWebAssemblyStruct::set): Canonical link: https://commits.webkit.org/320548@main
…er out with the line https://bugs.webkit.org/show_bug.cgi?id=323453 rdar://problem/186680551 Reviewed by Antti Koivisto. The marker hangs off the line's inline start edge, which a float of that formatting context has already pushed inwards. Give that room back. A float intruding from earlier content keeps the marker with the line (webkit.org/b/166528). Test: imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-float-in-content.html * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-float-in-content-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-float-in-content-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-float-in-content.html: Added. * Source/WebCore/layout/floats/PlacedFloats.cpp: (WebCore::Layout::PlacedFloats::Item::isInFormattingContextOf const): * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: (WebCore::LayoutIntegration::LineLayout::setExcludedMarkerPositions): * Source/WebCore/rendering/RenderListItem.cpp: (WebCore::excludedMarkerLogicalLeftOffsetFor): (WebCore::RenderListItem::placeExcludedMarker): * Source/WebCore/rendering/RenderListOutsideMarker.h: Canonical link: https://commits.webkit.org/320549@main
…f a list item with block content https://bugs.webkit.org/show_bug.cgi?id=323457 rdar://problem/186687365 Reviewed by Antti Koivisto. An excluded marker is on no line's leaf boxes, so the stitch group for the line it was positioned against left it out. Put it at the start of that group. Test: accessibility/listmarker-text-with-block-content.html * LayoutTests/accessibility/listmarker-text-with-block-content-expected.txt: Added. * LayoutTests/accessibility/listmarker-text-with-block-content.html: Added. * Source/WebCore/accessibility/AccessibilityNodeObject.cpp: (WebCore::AccessibilityNodeObject::stitchGroups const): Canonical link: https://commits.webkit.org/320550@main
…pable https://bugs.webkit.org/show_bug.cgi?id=323468 rdar://186698683 Reviewed by Abrar Rahman Protyasha. Annotate RetainPtr and UniqueRef. * Source/WTF/wtf/RetainPtr.h: * Source/WTF/wtf/UniqueRef.h: Canonical link: https://commits.webkit.org/320551@main
…alues https://bugs.webkit.org/show_bug.cgi?id=322358 rdar://185643661 Reviewed by Simon Fraser. Take `corner-shape` into account for `shape-outside`. `computeGeometryForBoxShape()` now computes a polygon for the inner or outer shape via new functions in PathUtilities, which produce a polygon by fetching the path and sampling it to create a vector of points. This polygon feeds into the existing shape-outside code. Based on work by Lilly Le (@cupidsity), with a fix for the positioning of the contour for `shape-outside: padding-box`. * LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-left-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-left.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-borders/corner-shape/corner-shape-outside-right-expected.txt: * Source/WebCore/platform/graphics/BezierUtilities.cpp: (WebCore::appendFlattenedBezier): A helper that appends points to the vector for a bezier segment. * Source/WebCore/platform/graphics/BezierUtilities.h: * Source/WebCore/rendering/BorderShape.cpp: (WebCore::BorderShape::constrainedRadiiScale): (WebCore::flattenClosedPathToPolygon): (WebCore::BorderShape::outerShapeAsPolygon const): (WebCore::BorderShape::innerShapeAsPolygon const): (WebCore::BorderShape::offsetReferenceRect const): (WebCore::constrainedRadiiScale): Deleted. * Source/WebCore/rendering/BorderShape.h: * Source/WebCore/rendering/shapes/BoxLayoutShape.cpp: (WebCore::BoxShapeGeometry::roundedRect const): (WebCore::BoxShapeGeometry::contour const): (WebCore::computeGeometryForBoxShape): (WebCore::computeRoundedRectForBoxShape): (WebCore::BoxLayoutShape::getExcludedInterval const): * Source/WebCore/rendering/shapes/BoxLayoutShape.h: * Source/WebCore/rendering/shapes/LayoutShape.cpp: (WebCore::LayoutShape::createBoxShape): * Source/WebCore/rendering/shapes/LayoutShape.h: * Source/WebCore/rendering/shapes/PolygonLayoutShape.cpp: (WebCore::inwardEdgeNormal): (WebCore::uniteEdgeExcludedInterval): (WebCore::PolygonLayoutShape::getExcludedInterval const): (WebCore::outwardEdgeNormal): Deleted. * Source/WebCore/rendering/shapes/PolygonLayoutShape.h: * Source/WebCore/rendering/shapes/ShapeOutsideInfo.cpp: (WebCore::makeShapeForShapeOutside): * Source/WebCore/platform/graphics/PathUtilities.cpp: (WebCore::PathUtilities::flattenPath): (WebCore::PathUtilities::flattenPathToContour): * Source/WebCore/platform/graphics/PathUtilities.h: Canonical link: https://commits.webkit.org/320552@main
…ss-process descendant https://bugs.webkit.org/show_bug.cgi?id=322890 rdar://problem/186140629 Reviewed by Kiet Ho and Matt Woodrow. On every rendering update, each local frame broadcasts its frame geometry to every other process rendering the page. This is mostly unnecessary, because remote frames only care about geometry from ancestors, not the entire tree: - IntersectionObserver: computeClippedRectInRootContentsSpace uses clip geometry from ancestors only, e.g. layoutViewportRect and visibleRectOfChild. - LocalFrameView::windowClipRect: root frames in the remote process calculate their clip rect from their parent's visibleRectInParent. - exposedContentRect: frames in the remote process calculate their exposedContentRect from their parent's exposedContentRectInParent. To fix this, skip calculating geometry for any child that is entirely local to this process. Additionally, if a local frame has no remote descendants, then we should send nothing, since no remote frame exists that could use that geometry. One complication here is with remote frames nested under multiple local frames: Local main frame => local child frame => remote grandchild frame When we process the local main frame in the syncLocalFrameInfoToRemote loop, we still have to send geometry associated with that local main frame even though its direct child is local. This is because an IntersectionObserver in the remote grandchild frame walks all the way up to the root of the frame tree and uses clipping rectangles from all ancestor nodes. We add a layout test to test this specific frame hierarchy with IntersectionObserver. Note that it is similar to but differs from the existing nested-cross-origin-iframe.sub.html IntersectionObserver test in WPT, since the frame hierarchy in that test contains only remote child frames. There is an obvious follow-up optimization here to stop broadcasting frame geometry and only send it to remote processes that actually need that particular state. That requires more significant refactoring so we'll optimize that in a subsequent patch. Tests: http/tests/site-isolation/intersection-observer/target-in-cross-site-frame-nested-in-same-site-frame.html http/tests/site-isolation/only-broadcast-frame-geometry-from-frames-with-cross-process-descendants.html * LayoutTests/http/tests/site-isolation/intersection-observer/resources/report-intersections-frame.html: Added. * LayoutTests/http/tests/site-isolation/intersection-observer/resources/same-site-middle-frame.html: Added. * LayoutTests/http/tests/site-isolation/intersection-observer/target-in-cross-site-frame-nested-in-same-site-frame-expected.txt: Added. * LayoutTests/http/tests/site-isolation/intersection-observer/target-in-cross-site-frame-nested-in-same-site-frame.html: Added. * LayoutTests/http/tests/site-isolation/only-broadcast-frame-geometry-from-frames-with-cross-process-descendants-expected.txt: Added. * LayoutTests/http/tests/site-isolation/only-broadcast-frame-geometry-from-frames-with-cross-process-descendants.html: Added. * Source/WebCore/page/Page.cpp: (WebCore::Page::syncLocalFrameInfoToRemote): * Source/WebCore/page/FrameTree.cpp: (WebCore::FrameTree::containsLocalFrame const): * Source/WebCore/page/FrameTree.h: * Source/WebCore/page/RemoteFrameView.cpp: (WebCore::RemoteFrameView::childFrameOwnerToRootContentTransform const): (WebCore::RemoteFrameView::absoluteToChildFrameOwnerLocalTransform const): Canonical link: https://commits.webkit.org/320553@main
…of RangeError when length is Infinity https://bugs.webkit.org/show_bug.cgi?id=320830 Reviewed by Yusuke Suzuki. Array.prototype.toSpliced should throw TypeError when the new array length exceeds 2**53-1 (Step 12 of [1]), but it currently throws TypeError for the length of 2**53-1. For this case, it should throw RangeError instead (Step 13 of [1], Step 1 of [2]). To fix this, this commit replaces `>=` with `>` in the implementation of `Array.prototype.toSpliced` to check the new array length. [1]: https://tc39.es/ecma262/2026/multipage/indexed-collections.html#sec-array.prototype.tospliced [2]: https://tc39.es/ecma262/2026/multipage/ordinary-and-exotic-objects-behaviours.html#sec-arraycreate No additional tests. Instead, this commit also modify a exisiting stress test to adjust the specification. * JSTests/stress/change-array-by-copy.js: (shouldThrow): * Source/JavaScriptCore/runtime/ArrayPrototype.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Canonical link: https://commits.webkit.org/320554@main
… test with updated expectations https://bugs.webkit.org/show_bug.cgi?id=323494 rdar://186729378 Reviewed by Abrar Rahman Protyasha. * Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture Tests/BasicAppKitGesturesTests.swift: (AppKitGesturesTests.clickingOnSelectedWordOpensContextMenu(_:)): Canonical link: https://commits.webkit.org/320555@main
https://bugs.webkit.org/show_bug.cgi?id=323490 rdar://186725447 Reviewed by Yusuke Suzuki. Copying a CodeOrigin heap allocates an OutOfLineCodeOrigin when the bytecode index is too large to pack into the spare top address bits. Its move constructor just steals the composite word, so every copy we avoid along the node creation path is one malloc/free avoided for large or deeply inlined code. withSemantic() and withForExitAndExitOK() now construct the result directly rather than copying *this and overwriting a field, propagating wasHoisted explicitly. No behavior change. * Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::currentNodeOrigin): * Source/JavaScriptCore/dfg/DFGGraph.h: * Source/JavaScriptCore/dfg/DFGInsertionSet.h: (JSC::DFG::InsertionSet::insertNode): * Source/JavaScriptCore/dfg/DFGNode.h: (JSC::DFG::Node::Node): * Source/JavaScriptCore/dfg/DFGNodeOrigin.h: (JSC::DFG::NodeOrigin::NodeOrigin): (JSC::DFG::NodeOrigin::withSemantic const): (JSC::DFG::NodeOrigin::withForExitAndExitOK const): Canonical link: https://commits.webkit.org/320556@main
https://bugs.webkit.org/show_bug.cgi?id=323455 rdar://186684831 Reviewed by Yusuke Suzuki. * Source/JavaScriptCore/assembler/ARM64Assembler.h: * Source/JavaScriptCore/assembler/RISCV64Assembler.h: * Source/JavaScriptCore/assembler/X86Assembler.h: Canonical link: https://commits.webkit.org/320557@main
https://bugs.webkit.org/show_bug.cgi?id=323421 Reviewed by Daniel Liu. This is the last step of the plan in 319067@main. Since 319067@main and 320492@main, the JIT and the interpreter match a lookbehind from a copy of its disjunction in which the terms of each backward alternative are reversed and inputPosition is counted in that order. The copy was needed because YarrPatternConstructor kept the terms in pattern order. YarrPatternConstructor now reverses the terms of the backward alternatives when a lookbehind is closed, right after its forward references are resolved, and setupAlternativeOffsets() counts the disjunction of a lookahead inside a lookbehind from 0, as the copy did. Both tiers use the pattern as it is, and copyDisjunctionInMatchOrder() is removed. The bytecode and the JIT ops are the same as before, except that frame slots are now also numbered in match order. * Source/JavaScriptCore/yarr/YarrInterpreter.cpp: (JSC::Yarr::ByteCompiler::emitDisjunction): * Source/JavaScriptCore/yarr/YarrJIT.cpp: * Source/JavaScriptCore/yarr/YarrPattern.cpp: (JSC::Yarr::YarrPatternConstructor::atomParenthesesEnd): (JSC::Yarr::YarrPatternConstructor::putTermsInMatchOrder): (JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets): (JSC::Yarr::YarrPattern::copyDisjunctionInMatchOrder): Deleted. * Source/JavaScriptCore/yarr/YarrPattern.h: Canonical link: https://commits.webkit.org/320558@main
…arr frame https://bugs.webkit.org/show_bug.cgi?id=322949 Reviewed by Yusuke Suzuki. RegExpTestInline emits the Yarr matcher for 8-bit strings directly into DFG/FTL code, but it refuses any pattern whose terms need Yarr frame slots for backtracking. That is every quantifier and alternation and, with the u or v flag, every character class, so almost no real pattern is inlined. The Yarr frame is addressed relative to the frame pointer, which only works inside Yarr's own function frame, and the u/v flags are excluded on top of that even though the 8-bit matcher does not decode surrogate pairs. The inlined matcher calls nothing, so the outgoing-argument area at the bottom of the DFG/FTL frame is free while it runs. This patch places the Yarr frame there: DFG and FTL reserve the frame size in that area, and in ExecutionMode::InlineTest the frame is addressed relative to the stack pointer. The function's own stack check covers the reservation, so the inlined code neither moves the stack pointer nor checks the stack limit. With frames available, the unicode exclusions are dropped. Baseline Patched regexp-test-inline-quantifier 18.6940+-0.1085 ^ 10.7594+-0.1545 ^ definitely 1.7375x faster regexp-test-inline-unicode-sets 18.8223+-0.0938 ^ 11.6284+-0.1800 ^ definitely 1.6186x faster regexp-test-inline-unicode 18.6505+-0.1107 ^ 10.9138+-0.1957 ^ definitely 1.7089x faster Tests: JSTests/microbenchmarks/regexp-test-inline-quantifier.js JSTests/microbenchmarks/regexp-test-inline-unicode-sets.js JSTests/microbenchmarks/regexp-test-inline-unicode.js JSTests/stress/regexp-test-inline-frame-in-outgoing-argument-area.js JSTests/stress/regexp-test-inline-unicode-and-quantifiers.js * JSTests/microbenchmarks/regexp-test-inline-quantifier.js: Added. (isLowerAlpha): * JSTests/microbenchmarks/regexp-test-inline-unicode-sets.js: Added. (isLowerLetter): * JSTests/microbenchmarks/regexp-test-inline-unicode.js: Added. (isLowerAlpha): * JSTests/stress/regexp-test-inline-frame-in-outgoing-argument-area.js: Added. (shouldBe): (callee): (test): * JSTests/stress/regexp-test-inline-unicode-and-quantifiers.js: Added. (shouldBe): (makeTest): * Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::compileRegExpTestInline): * Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp: (JSC::DFG::StrengthReductionPhase::handleNode): * Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * Source/JavaScriptCore/runtime/StackAlignment.h: (JSC::argumentCountForStackSize): Deleted. * Source/JavaScriptCore/yarr/YarrJIT.cpp: (JSC::Yarr::jitCompileInlinedTest): * Source/JavaScriptCore/yarr/YarrJIT.h: Canonical link: https://commits.webkit.org/320559@main
…o the page https://bugs.webkit.org/show_bug.cgi?id=323489 rdar://186724077 Reviewed by Richard Robinson. In 312960@main, we taught WebPage.mouseMove(to:) to send -mouseMoved: to the backing web view, but WKWebView does not override that selector. Instead, WKWebView utilizes tracking areas to drive mouseMove events, which rendered the helper a no-op. To work around this, we simply re-use the established precedent of _simulateMouseMove:, which calls directly into WebViewImpl::mouseMoved(), and is used by other test harness code. Test: WebPageMouseEventsTests/mouseMoveFiresMouseMoveHandler WebPageMouseEventsTests/sendingMouseMovedToWebViewDoesNotReachPage * Tools/TestWebKitAPI/Helpers/cocoa/WebPage+Extras.swift: (mouseMove(to:flags:)): * Tools/TestWebKitAPI/Tests/WebKit/WebPage/WebPageMouseEventsTests.swift: (KeyWindow.isKeyWindow): To facilitate testing mouse move delivery, we need the web view to be in a window that is key. We introduce `KeyWindow`, a helper NSWindow subclass, to facilitate this, by having this class unconditionally claim key status (a la TestWKWebViewHostWindow). (WebPageMouseEventsTests.mouseMoveFiresMouseMoveHandler): (WebPageMouseEventsTests.sendingMouseMovedToWebViewDoesNotReachPage): (WebPageMouseEventsTests.loadMouseMoveRecorder): (WebPageMouseEventsTests.recordedMoves): Canonical link: https://commits.webkit.org/320560@main
…st the ones whose first formatted line is in a descendant block https://bugs.webkit.org/show_bug.cgi?id=321802 <rdar://problem/185529863> Reviewed by Antti Koivisto. An outside marker was excluded from in-flow layout only when its list item had block level children. Exclude every outside marker and position them all after layout. Tests: imported/w3c/web-platform-tests/css/css-lists/inside-marker-with-block-in-inline.html imported/w3c/web-platform-tests/css/css-lists/outside-marker-position-with-cached-line-content.html imported/w3c/web-platform-tests/css/css-lists/outside-marker-taller-than-content.html imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-block-in-nested-inline.html * Source/WebCore/accessibility/AccessibilityNodeObject.cpp: * Source/WebCore/layout/floats/PlacedFloats.cpp: * Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp: * Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.cpp: * Source/WebCore/layout/formattingContexts/inline/InlineFormattingUtils.h: * Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp: * Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp: * Source/WebCore/layout/formattingContexts/inline/InlineQuirks.cpp: * Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayLineBuilder.cpp: * Source/WebCore/layout/integration/LayoutIntegrationBoxGeometryUpdater.cpp: * Source/WebCore/layout/integration/LayoutIntegrationBoxTreeUpdater.cpp: * Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp: * Source/WebCore/layout/layouttree/LayoutElementBox.h: * Source/WebCore/rendering/RenderBlockFlow.cpp: * Source/WebCore/rendering/RenderInline.cpp: * Source/WebCore/rendering/RenderInline.h: * Source/WebCore/rendering/RenderListItem.cpp: * Source/WebCore/rendering/RenderListItem.h: * Source/WebCore/rendering/RenderListOutsideMarker.cpp: * Source/WebCore/rendering/RenderListOutsideMarker.h: * Source/WebCore/rendering/RenderObject.cpp: * Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp: * Source/WebCore/rendering/updating/RenderTreeBuilderList.cpp: * Source/WebCore/rendering/updating/RenderTreeBuilderList.h: * LayoutTests/TestExpectations: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/inside-marker-with-block-in-inline-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/inside-marker-with-block-in-inline-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/inside-marker-with-block-in-inline.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-position-with-cached-line-content-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-position-with-cached-line-content-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-position-with-cached-line-content.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-taller-than-content-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-taller-than-content-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-taller-than-content.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-block-in-nested-inline-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-block-in-nested-inline-ref.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-lists/outside-marker-with-block-in-nested-inline.html: * LayoutTests/platform/glib/fast/doctypes/001-expected.txt: * LayoutTests/platform/glib/fast/doctypes/003-expected.txt: * LayoutTests/platform/glib/fast/doctypes/004-expected.txt: * LayoutTests/platform/ios/fast/doctypes/001-expected.txt: * LayoutTests/platform/ios/fast/doctypes/003-expected.txt: * LayoutTests/platform/ios/fast/doctypes/004-expected.txt: * LayoutTests/platform/ios/fast/lists/001-expected.txt: * LayoutTests/platform/mac/fast/doctypes/001-expected.txt: * LayoutTests/platform/mac/fast/doctypes/003-expected.txt: * LayoutTests/platform/mac/fast/doctypes/004-expected.txt: * LayoutTests/platform/mac/fast/lists/001-expected.txt: * LayoutTests/platform/win/fast/doctypes/001-expected.txt: * LayoutTests/platform/win/fast/doctypes/003-expected.txt: * LayoutTests/platform/win/fast/doctypes/004-expected.txt: Canonical link: https://commits.webkit.org/320561@main
…ce selection picks a new source https://bugs.webkit.org/show_bug.cgi?id=323354 rdar://186597296 Reviewed by Chris Fleizach and Dominic Mazzoni. AccessibilityNodeObject::url() reports HTMLMediaElement::currentSrc() for a video, and the isolated tree caches that as AXProperty::URL. The only thing that refreshes it is the src attribute change handler posting URLChanged. currentSrc, though, is set by the resource selection algorithm, which runs asynchronously, so that notification is frequently handled while currentSrc still holds the previous value -- and since nothing fires when it does resolve, the cached URL then stays stale for good. Instead, this commit notifes the cache from HTMLMediaElement::setCurrentSrc, which every resource selection path funnels through, after the URL has actually changed. Makes video-element-url-attribute.html pass in ITM. * LayoutTests/accessibility/isolated-tree/video-element-url-attribute-expected.txt: Copied from LayoutTests/accessibility/video-element-url-attribute-expected.txt. * LayoutTests/accessibility/isolated-tree/video-element-url-attribute.html: Copied from LayoutTests/accessibility/video-element-url-attribute.html. * LayoutTests/accessibility/video-element-url-attribute-expected.txt: * LayoutTests/accessibility/video-element-url-attribute.html: * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::onMediaElementCurrentSrcChanged): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::setCurrentSrc): Canonical link: https://commits.webkit.org/320562@main
…nd its popover collapsing https://bugs.webkit.org/show_bug.cgi?id=323332 rdar://186574679 Reviewed by Dominic Mazzoni. Pressing an option in a base-appearance select through the accessibility API publishes two facts about the same widget on two different channels. AXProperty::IsExpanded is queued from the ExpandedChanged case of updateIsolatedTree, which runs off the notification post timer, while AXProperty::StringValue is only refreshed by handleMenuListValueChanged, which deferMenuListValueChange defers to performDeferredCacheUpdate. The result is that the isolated tree reports the popover as collapsed while its value still names the previously selected option, so a client that reads the value in response to the collapse, which is what VoiceOver does, announces the wrong option. Fix this by queueing the value update in onSelectedOptionChanged, which runs synchronously with the selection change, so it lands in the same commit as IsExpanded rather than two commits later. 318871@main landed LayoutTests/accessibility/isolated-tree/base-select-option-press-closes-popover-expected.txt without the corresponding .html, since the test did not pass with the isolated tree enabled. Add the missing .html now that it does. The existing baseline is already correct. The same expanded-before-contents split affects the test's setup: the select reports itself expanded before the popover's newly rendered options have been committed to the isolated tree, so findBaseSelectMenu can hand back a menu with no children and menu.childAtIndex(0) is null. Add waitForBaseSelectMenu, which polls until the menu has its options, and use it in both copies of the test so they stay in sync. * LayoutTests/accessibility/base-select-option-press-closes-popover.html: * LayoutTests/accessibility/isolated-tree/base-select-option-press-closes-popover.html: Added. * LayoutTests/resources/accessibility-helper.js: (waitForBaseSelectMenu): * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::onSelectedOptionChanged): Canonical link: https://commits.webkit.org/320563@main
https://bugs.webkit.org/show_bug.cgi?id=322683 rdar://185952139 Reviewed by Alan Baradlay. The <select> picker currently uses the default overflow alignment safety, which honors the preferred alignment as long as it can be scrolled to. However for <select> pickers, we want to prioritize keeping them in view, even if that would mean spilling out of their 'position-area' by overlapping the <select> button itself when they are too tall to fit on either side of the button. This patch implements the 'safe' alignment behavior recently specified for fixed positioned boxes (because of this issue) in PositionedLayoutConstraints, and applies it to the <select> picker in our UA style sheet. See CSSWG discussion in: w3c/csswg-drafts#14172 w3c/csswg-drafts#14008 w3c/csswg-drafts#12920 * LayoutTests/css3/parse-align-items.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/abspos/safe-align-self-htb.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/abspos/safe-align-self-vlr.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/abspos/safe-align-self-vrl.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/abspos/safe-justify-self-htb.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/abspos/safe-justify-self-vlr.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/abspos/safe-justify-self-vrl.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-items-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-items-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-items-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-items-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-items-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-items-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-self-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-self-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-self-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-self-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-self-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/align-self-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-items-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-items-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-items-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-items-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-items-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-items-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-self-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-self-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-self-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-self-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-self-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/justify-self-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-shorthand-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-shorthand.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-items-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-computed-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-computed.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-invalid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-invalid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-shorthand-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-shorthand.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-valid-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-align/parsing/place-self-valid.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ltr-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ltr-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ltr.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-rtl-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-expected.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-rtl-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-rtl.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-ltr-expected.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-expected.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-ltr-ref.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-ltr.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-rtl-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-rtl-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004-rtl.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-005-ltr-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-005-ltr-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-005-ltr.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-005-rtl-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-005-rtl-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-005-rtl.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-006-ltr-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-006-ltr-ref.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-006-ltr.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-006-rtl-expected.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-006-rtl-ref.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003-ref.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-006-rtl.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-007-ltr-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-007-ltr-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-007-ltr.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-007-rtl-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-007-rtl-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-007-rtl.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-003.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-008-ltr-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-008-ltr-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-008-ltr.html: Copied from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-008-rtl-expected.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-008-rtl-ref.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-008-rtl.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/position-area-overflow-icb-004.html. * LayoutTests/imported/w3c/web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-safe-001-expected.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-grid/abspos/grid-abspos-staticpos-align-self-safe-001-ref.html: * LayoutTests/imported/w3c/web-platform-tests/html/semantics/forms/the-select-element/customizable-select/update.css: (select::picker(select),): * Source/WebCore/css/CSSProperties.json: * Source/WebCore/css/html.css: (:-internal-select-popover): * Source/WebCore/css/parser/CSSPropertyParserConsumer+Align.cpp: (WebCore::CSSPropertyParserHelpers::consumeAlignSelf): (WebCore::CSSPropertyParserHelpers::consumeJustifySelf): (WebCore::CSSPropertyParserHelpers::consumeAlignItems): (WebCore::CSSPropertyParserHelpers::consumeJustifyItems): * Source/WebCore/rendering/PositionedLayoutConstraints.cpp: (WebCore::PositionedLayoutConstraints::resolveAlignmentShift const): * Source/WebCore/style/values/align/StyleAlignItems.cpp: (WebCore::Style::AlignItems::resolve const): (WebCore::Style::CSSValueConversion<AlignItems>::operator): * Source/WebCore/style/values/align/StyleAlignItems.h: (WebCore::Style::AlignItems::AlignItems): (WebCore::Style::AlignItems::canHaveOverflowPosition): (WebCore::Style::AlignItems::switchOn const): * Source/WebCore/style/values/align/StyleAlignSelf.cpp: (WebCore::Style::AlignSelf::resolve const): (WebCore::Style::CSSValueConversion<AlignSelf>::operator): * Source/WebCore/style/values/align/StyleAlignSelf.h: (WebCore::Style::AlignSelf::AlignSelf): (WebCore::Style::AlignSelf::canHaveOverflowPosition): (WebCore::Style::AlignSelf::switchOn const): * Source/WebCore/style/values/align/StyleJustifyItems.cpp: (WebCore::Style::JustifyItems::resolve const): (WebCore::Style::CSSValueConversion<JustifyItems>::operator): * Source/WebCore/style/values/align/StyleJustifyItems.h: (WebCore::Style::JustifyItems::JustifyItems): (WebCore::Style::JustifyItems::canHaveOverflowPosition): (WebCore::Style::JustifyItems::switchOn const): * Source/WebCore/style/values/align/StyleJustifySelf.cpp: (WebCore::Style::JustifySelf::resolve const): (WebCore::Style::CSSValueConversion<JustifySelf>::operator): * Source/WebCore/style/values/align/StyleJustifySelf.h: (WebCore::Style::JustifySelf::JustifySelf): (WebCore::Style::JustifySelf::canHaveOverflowPosition): (WebCore::Style::JustifySelf::switchOn const): Canonical link: https://commits.webkit.org/320564@main
…vigating back https://bugs.webkit.org/show_bug.cgi?id=323352 rdar://178140877 Reviewed by Sihui Liu. With Site Isolation enabled, cross-origin iframes are not always rendering after navigating back. This is flaky, and the cause of the issue is that the layer tree is not frozen between the call to WebPage::restoreWithFrameItem and until a new drawing area is set after the call to WebPageProxy::swapToProvisionalPage. Without freezing the layer tree, RemoteLayerTreeDrawingArea::updateRendering can potentially be called before a new drawing area is available in the WebContent process, and use the drawing area that will be replaced after WebPageProxy::swapToProvisionalPage is called in the UI process. The flaky nature of this bug is due to the fact that RemoteLayerTreeDrawingArea::updateRendering is called on a timer in the WebContent process. We freeze the layer tree in order to defer the compositing update — and with it the root compositing layer attachment — until after the new drawing area is in place. We can't simply force a rendering update after the drawing area swap: the reason is that RenderLayerCompositor only attaches the root layer once (m_rootLayerAttachment), so once it lands on the outgoing drawing area the new one never gets it. Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm * Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.serialization.in: * Source/WebKit/Shared/ShouldFreezeLayerTree.h: Added. * Source/WebKit/UIProcess/SuspendedPageProxy.cpp: (WebKit::SuspendedPageProxy::unsuspend): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::goToBackForwardItem): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::restoreWithFrameItem): * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm: (TestWebKitAPI::(SiteIsolation, MultiProcessBFCacheIframeRendersAfterBackNavigation)): Canonical link: https://commits.webkit.org/320565@main
…rect accessibility bounds https://bugs.webkit.org/show_bug.cgi?id=322433 rdar://184250968 Reviewed by Andres Gonzalez and Dominic Mazzoni. An app hosting several WKWebViews in one window reported every element inside web content at an incorrect screen position anchored near {0, 0}. This happened because AXObjectCache::setSyncModeToOtherProcessesCallback stores a single process-global Function, and WebPage's constructor was its only caller, so every new WebPage overwrote the previous page's callback. This meant only one of the webpages in the process was able to transition to accessibility-enabled mode (via resolveAccessibilityModeTransition), leaving the others in AccessibilityMode::Off. This causes a host of issues, including AXFrameGeometry being permanently uninitialized, causing all bounding boxes to be wrong. This commit fixes it in two ways: 1. By making the mode global for the UI process. 2. Moving the mode-sync callback from the WebPage constructor to the WebProcess', since it is process-wide state, and a web process with no pages still needs to transition (so future pages start in the right state). With one process-wide value, there is nothing left to keep in sync per page, so the relatedPage sync, WebPageProxy::SetAccessibilityMode, InheritAccessibilityMode, and WebPage::inheritAccessibilityMode all are removed. * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivateForTesting.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm: (-[WKWebView _isAccessibilityEnabledInPageProxyForTesting]): (+[WKWebView _isAccessibilityEnabledForTesting]): (+[WKWebView _resetAccessibilityModeForTesting]): * Source/WebKit/UIProcess/WebPageProxy.h: * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::m_allowsImmersiveEnvironments): (WebKit::WebPage::inheritAccessibilityMode): Deleted. * Source/WebKit/WebProcess/WebProcess.cpp: (WebKit::m_nonVisibleProcessMemoryCleanupTimer): (WebKit::WebProcess::syncAccessibilityModeToAllPages): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::setAccessibilityMode): (WebKit::WebProcess::createWebPage): * Source/WebKit/WebProcess/WebProcess.h: * Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKit/WKPage/cocoa/EnableAccessibility.mm: (didReceiveMessageFromInjectedBundle): (TEST(WebKit, AccessibilityModeSyncsToAllPagesSharingAWebProcess)): * Tools/TestWebKitAPI/Tests/WebKit/WKPage/cocoa/EnableAccessibilityInWebProcess_Bundle.mm: Added. (TestWebKitAPI::EnableAccessibilityInWebProcessTest::EnableAccessibilityInWebProcessTest): (TestWebKitAPI::EnableAccessibilityInWebProcessTest::didReceiveMessage): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::m_pageForTesting): (WebKit::WebPageProxy::requestFrameScreenPosition): (WebKit::WebPageProxy::scheduleAccessibilityFrameGeometryUpdate): (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::setAccessibilityMode): Deleted. * Source/WebKit/UIProcess/WebPageProxy.messages.in: * Source/WebKit/UIProcess/WebProcessProxy.cpp: (WebKit::globalAccessibilityMode): (WebKit::WebProcessProxy::setAccessibilityMode): (WebKit::WebProcessProxy::accessibilityMode): (WebKit::WebProcessProxy::setAccessibilityModeGlobally): (WebKit::WebProcessProxy::resetAccessibilityModeForTesting): (WebKit::webContentAccessibilityModeStorage): (WebKit::WebProcessProxy::accessibilityModeDidChange): (WebKit::WebProcessProxy::accessibilityModeForWebContent): (WebKit::WebProcessProxy::setAccessibilityModeForWebContent): * Source/WebKit/UIProcess/WebProcessProxy.h: * Source/WebKit/UIProcess/WebProcessProxy.messages.in: * Source/WebKit/WebProcess/WebPage/WebPage.h: * Source/WebKit/WebProcess/WebPage/WebPage.messages.in: * Source/WebKit/WebProcess/WebProcess.messages.in: * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::transitionToAXThreadModeIfNeeded): * Source/WebCore/accessibility/AXObjectCache.h: (WebCore::AXObjectCache::enableAccessibility): * Source/WebCore/accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::platformAXThreadSupport): (WebCore::AXObjectCache::platformStartSecondaryThread): * Source/WebKit/UIProcess/mac/WebViewImpl.h: * Source/WebKit/UIProcess/mac/WebViewImpl.mm: (WebKit::WebViewImpl::updateWindowAndViewFrames): (WebKit::WebViewImpl::enableAccessibilityIfNecessary): * Source/WebCore/accessibility/AXObjectTypes.h: (WebCore::accessibilityModeRank): * Source/WebCore/page/Page.cpp: (WebCore::Page::shouldUpdateAccessibilityRegions const): * Source/WebKit/UIProcess/API/C/WKContext.cpp: (WKContextResetAccessibilityModeForTesting): * Source/WebKit/UIProcess/API/C/WKContextPrivate.h: * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::resetStateToConsistentValues): Canonical link: https://commits.webkit.org/320566@main
https://bugs.webkit.org/show_bug.cgi?id=323517 rdar://186754153 Reviewed by Ben Nham. This is caused by registering for a non-exempt notification. * Source/WebKit/Resources/cocoa/NotificationAllowList/ForwardedNotifications.def: Canonical link: https://commits.webkit.org/320567@main
https://bugs.webkit.org/show_bug.cgi?id=323491 rdar://186725777 Reviewed by Sosuke Suzuki. There are several return statement which missed updating m_numberOfWaitingParallelMarkers. This patch fixes it by using ScopeExit. * Source/JavaScriptCore/heap/SlotVisitor.cpp: (JSC::SlotVisitor::drainFromShared): Canonical link: https://commits.webkit.org/320568@main
https://bugs.webkit.org/show_bug.cgi?id=322965 rdar://186230853 Reviewed by Abrar Rahman Protyasha. Add support for arrays, enums, dictionaries, and structs. Also clean up some workarounds that are no longer needed. Test: Tools/TestWebKitAPI/Tests/WebKit/WebPage/JavaScriptEvaluationTests.swift * Source/WebKit/Shared/JavaScriptEvaluationCodableValue.swift: * Source/WebKit/Shared/JavaScriptEvaluationDecodingGraph.swift: (JavaScriptEvaluationDecodingGraph.keyName(for:at:)): * Source/WebKit/Shared/JavaScriptEvaluationGraphDecoder.swift: (JavaScriptEvaluationGraphDecoder.decode(_:)): Deleted. (JavaScriptEvaluationGraphDecoder.decodeNil() throws(CodingError.Decoding:)): Deleted. (JavaScriptEvaluationGraphDecoder.decodeOptional(_:)): Deleted. * Source/WebKit/Shared/JavaScriptEvaluationObjectDecoder.swift: (JavaScriptEvaluationObjectDecoder.keyName(_:)): * Source/WebKit/Shared/JavaScriptEvaluationResultCxxInteropSupport.h: (WebKit::CxxInteropSupport::vectorFromValue): (WebKit::CxxInteropSupport::objectMapFromValue): (): Deleted. * Tools/TestWebKitAPI/Tests/WebKit/WebPage/JavaScriptEvaluationTests.swift: (JavaScriptEvaluationTests.decodingArray): (JavaScriptEvaluationTests.decodingDictionary): (JavaScriptEvaluationTests.decodingNestedContainers): (JavaScriptEvaluationTests.decodingEnum): (JavaScriptEvaluationTests.decodingStruct): (JavaScriptEvaluationTests.decodingStructWithOptionalField): (JavaScriptEvaluationTests.decodingStructWithFieldAttributes): (JavaScriptEvaluationTests.decodingNestedStruct): * Source/WebKit/Shared/JavaScriptEvaluationResult.h: * Source/WebKit/Shared/JavaScriptEvaluationResultDecoder.swift: * Source/WebKit/Shared/RunJavaScriptParameters.h: (WebKit::CxxInteropSupport::makeOptionalArguments): (): Deleted. * Source/WebKit/Shared/RunJavaScriptParameters.swift: Added. * Source/WebKit/UIProcess/API/Swift/WebPage+NewCodable.swift: * Source/WebKit/UIProcess/WebPageProxy.swift: (editorStateCopy): Deleted. (editorState): Deleted. * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/320569@main
…one element returns an empty range https://bugs.webkit.org/show_bug.cgi?id=323506 rdar://186746991 Reviewed by Chris Fleizach. accessibility/mac/search-text-with-image-hang.html searches the web area for "WebKit", which occurs inside a user-select: none element. In isolated tree mode, the result's marker range came back empty. The search runs on the main thread and produces a CharacterOffset, which has to be turned into a position before it can be recorded. That conversion builds a VisiblePosition, and canonicalization treats a position inside user-select: none as no candidate at all, so it moves out of the element entirely. Accessibility exposes the text of a user-select: none element (it is the element's AXValue) so a marker has to be able to address it. Ask for a VisiblePosition that considers those positions valid, the same way 318359@main did for the AT-SPI text APIs, which had this bug in a different form. The new argument defaults to AllowUserSelectNone::No, so the roughly thirty other callers of visiblePositionFromCharacterOffset are unaffected, though arguably should also be changed in a later patch. * LayoutTests/accessibility-isolated-tree/TestExpectations: Unskip the test. * Source/WebCore/accessibility/AXObjectCache.cpp: (WebCore::AXObjectCache::visiblePositionFromCharacterOffset): * Source/WebCore/accessibility/AXObjectCache.h: * Source/WebCore/accessibility/AXTextMarker.cpp: (WebCore::TextMarkerData::TextMarkerData): Canonical link: https://commits.webkit.org/320570@main
…nto its placeholder https://bugs.webkit.org/show_bug.cgi?id=323507 rdar://186747687 Reviewed by Chris Fleizach. A placeholder stands in for text the field doesn't have, rather than text it contains, but its rendered text was collected into the isolated tree's text runs like any other text. For an empty <input placeholder="text">, AXTextMarkerRangeForUIElement on the field resolved to the placeholder's static text and reported a length of 4 with the string "text", where the live tree reports the field itself. It also meant a text-marker walk over the document would read a placeholder as if it were page content. Stop collecting text runs for a text control's placeholder, so that an empty field with a placeholder behaves the same as an empty field without one. A field that has a value is unaffected either way, since the placeholder isn't rendered then. * LayoutTests/accessibility-isolated-tree/TestExpectations: Mark accessibility/text-markers-for-input-with-placeholder.html as passing. * Source/WebCore/accessibility/AccessibilityRenderObject.cpp: (WebCore::isPlaceholderText): (WebCore::AccessibilityRenderObject::textRuns): Canonical link: https://commits.webkit.org/320571@main
…hen the caret is in a text control nested in a contenteditable https://bugs.webkit.org/show_bug.cgi?id=323508 rdar://186747828 Reviewed by Chris Fleizach. AXInsertionPointLineNumber answers for the control it is asked of, so its line count has to start at that control. The isolated tree instead let AXTextMarker::lineIndex pick a root, which is the marker's nearest editable ancestor. When a text control holds the caret, that ancestor is the nested control rather than the contenteditable being asked, so the count restarted inside it and reported line 0 for a caret on the contenteditable's second line. Let a caller name the root to count from, and have insertionPointLineNumber pass itself. Asking the nested textarea directly still answers 0, which is what the last check in the test covers. The test required some fixes too, as it did not accurately represent real AT behavior. It set the DOM selection and read the insertion point in the same turn, and accessibility only learns about a selection change from a notification, so in isolated tree mode all three reads saw the selection as it stood before the first one -- the notification for the whole sequence arrives afterwards. Now we wait for the notification as an AT would. * LayoutTests/accessibility-isolated-tree/TestExpectations: Mark accessibility/textarea-insertion-point-line-number.html as fixed. * LayoutTests/accessibility/textarea-insertion-point-line-number.html: * Source/WebCore/accessibility/AXTextMarker.cpp: (WebCore::AXTextMarker::lineIndex const): * Source/WebCore/accessibility/AXTextMarker.h: * Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp: (WebCore::AXIsolatedObject::insertionPointLineNumber const): Canonical link: https://commits.webkit.org/320572@main
https://bugs.webkit.org/show_bug.cgi?id=323510 rdar://186749069 Reviewed by Chris Fleizach. AXDateTimeComponents is the attribute VoiceOver reads to decide which fields of a date or time control it should present, and no layout test asserted it. This commit adds a test. * LayoutTests/accessibility/isolated-tree/mac/datetime-components-expected.txt: Added. * LayoutTests/accessibility/isolated-tree/mac/datetime-components.html: Added. * LayoutTests/accessibility/mac/datetime-components-expected.txt: Added. * LayoutTests/accessibility/mac/datetime-components.html: Added. * Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm: (WTR::attributeValue): Canonical link: https://commits.webkit.org/320573@main
… twice in isolated tree mode https://bugs.webkit.org/show_bug.cgi?id=323512 rdar://186749414 Reviewed by Chris Fleizach. Setting the value of a contenteditable posts several AXValueChanged notifications rather than one. AccessibilityRenderObject::setValue clears the text and inserts the new text through the editor, and the deferred cache update then reports the same change again. That is tracked separately in https://bugs.webkit.org/show_bug.cgi?id=323512. The test's listener means to handle the first of them, but it hides the content and unregisters itself only after reading an accessibility attribute, and in isolated tree mode that read waits on the accessibility thread, which lets the main thread deliver the next notification re-entrantly. The listener therefore ran a second time, with the content already hidden, and printed an extra pair of lines with an empty value. Unregister first, so the listener can only run once no matter when the remaining notifications land. * LayoutTests/accessibility-isolated-tree/TestExpectations: Unskip the test. * LayoutTests/accessibility/mac/set-value-editable-types.html: Canonical link: https://commits.webkit.org/320574@main
…rTextMarker reads the same line forever https://bugs.webkit.org/show_bug.cgi?id=323509 rdar://186748205 Reviewed by Chris Fleizach. An assistive technology reads consecutive lines by asking for the line at the end of the line it just read, which relies on a line range's end being the next line's start. That was true in the live tree but not the isolated one, so the walk read the first line again and never advanced. On a soft-wrapped contenteditable, asking for the line at the end of the first line returned [0, 25] -- the first line again -- where the live tree returns [25, 56]. Both trees end the range at the same character; they disagree about which line that character belongs to. AccessibilityObject::lineRangeForPosition walks forward until it leaves the line, so its end is the downstream start of the next line. The isolated tree's findLine deliberately marks a line end upstream so it means "the end of this line" rather than "the start of the next", and asking for the line at such a marker answers with the line it came from. Hand the client the downstream marker, matching the live tree. * LayoutTests/accessibility-isolated-tree/TestExpectations: Mark accessibility/mac/line-range-continuity.html as passing. * Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm: (-[WebAccessibilityObjectWrapper lineTextMarkerRangeForTextMarker:forUnit:]): Canonical link: https://commits.webkit.org/320575@main
https://bugs.webkit.org/show_bug.cgi?id=323831 Ugh, SP3 0.3% regression with the remeasurement in A/B test part 1 Reverted change: [JSC] Move BlockDirectory for-stealing list to AlignedMemoryAllocator https://bugs.webkit.org/show_bug.cgi?id=323680 320674@main (03c6c95) Canonical link: https://commits.webkit.org/320784@main
https://bugs.webkit.org/show_bug.cgi?id=323832 Ugh, SP3 0.3% regression with the remeasurement in A/B test part 2 Reverted change: [JSC] Unify allocators https://bugs.webkit.org/show_bug.cgi?id=323629 320655@main (fe81aba) Canonical link: https://commits.webkit.org/320785@main
https://bugs.webkit.org/show_bug.cgi?id=322132 Reviewed by Alex Christensen. Parse the Use-As-Dictionary response header from RFC 9842 and, when it names a usable dictionary, store it in the network cache. Adds a new "CompressionDictionary" record type, as this allows avoiding traversing and parsing all Response records. It also lets Clear-Site-Data: "cookies" clear an origin's dictionaries while leaving its cached resources, per w3c/webappsec-clear-site-data#94. These records store a `CompressionDictionaryEntry` because a dictionary is not retrieved by a request and needs none of what Entry stores so we can keep the metadata minimal. Cache traversals now walk both record types so website data deletion reaches dictionaries. Nothing reads them yet; advertising with Available-Dictionary and decompressing dcb and dcz responses comes later. Some API tests observe the cache being created and removed. * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/platform/network/HTTPHeaderNames.in: * Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h: * Source/WebKit/NetworkProcess/NetworkProcess.cpp: (WebKit::deleteCacheRecordsForOrigin): (WebKit::NetworkProcess::deleteWebsiteDataForOrigin): * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad): (WebKit::stringBareItem): (WebKit::NetworkResourceLoader::processUseAsDictionaryHeader): (WebKit::NetworkResourceLoader::storeCompressionDictionaryIfNeeded): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::tryStoreAsCacheEntry): * Source/WebKit/NetworkProcess/NetworkResourceLoader.h: * Source/WebKit/NetworkProcess/cache/NetworkCache.cpp: (WebKit::NetworkCache::recordTypeName): (WebKit::NetworkCache::Cache::makeCacheKey): (WebKit::NetworkCache::Cache::retrieve): (WebKit::NetworkCache::Cache::makeEntry): (WebKit::NetworkCache::Cache::makeRedirectEntry): (WebKit::NetworkCache::Cache::store): (WebKit::NetworkCache::Cache::storeRedirect): (WebKit::NetworkCache::Cache::storeCompressionDictionary): (WebKit::NetworkCache::Cache::TraversalRecord::type const): (WebKit::NetworkCache::Cache::TraversalRecord::url const): (WebKit::NetworkCache::Cache::remove): (WebKit::NetworkCache::Cache::traverseRecords): (WebKit::NetworkCache::Cache::traverseCompressionDictionaryRecords): (WebKit::NetworkCache::Cache::traverseRecordsOfTypes): (WebKit::NetworkCache::Cache::dumpContentsToFile): (WebKit::NetworkCache::Cache::fetchData): (WebKit::NetworkCache::Cache::fetchOriginAccessTimes): (WebKit::NetworkCache::Cache::deleteData): (WebKit::NetworkCache::Cache::deleteDataForRegistrableDomains): (WebKit::NetworkCache::resourceType): Deleted. * Source/WebKit/NetworkProcess/cache/NetworkCache.h: * Source/WebKit/NetworkProcess/cache/NetworkCacheCompressionDictionaryEntry.cpp: Added. (WebKit::NetworkCache::parseFetchDestination): (WebKit::NetworkCache::CompressionDictionaryEntry::CompressionDictionaryEntry): (WebKit::NetworkCache::CompressionDictionaryEntry::encodeAsStorageRecord const): (WebKit::NetworkCache::CompressionDictionaryEntry::decodeStorageRecord): (WebKit::NetworkCache::CompressionDictionaryEntry::asJSON const): * Source/WebKit/NetworkProcess/cache/NetworkCacheCompressionDictionaryEntry.h: Added. (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::fromRaw): (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::toRaw const): (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::isEmpty const): (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::contains const): (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::add): (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::DestinationSet): (WebKit::NetworkCache::CompressionDictionaryEntry::DestinationSet::bit): * Source/WebKit/Sources.txt: * Source/WebKit/WebKit.xcodeproj/project.pbxproj: * Tools/TestWebKitAPI/Tests/WebKit/WKWebView/glib/TestWebsiteData.cpp: (serverCallback): (diskCacheSize): (waitUntilDiskCacheSizeIsAtLeast): (waitUntilDiskCacheSizeIsAtMost): (loadCompressionDictionaryPage): (registerCompressionDictionary): (enableCompressionDictionary): (testWebsiteDataCompressionDictionary): (testWebsiteDataCompressionDictionaryForeignMatch): (testWebsiteDataCompressionDictionaryOtherOrigin): (beforeAll): (afterAll): Canonical link: https://commits.webkit.org/320786@main
…ry target's script map https://bugs.webkit.org/show_bug.cgi?id=323787 rdar://187042936 Reviewed by Devin Rousso. DebuggerManager.globalObjectCleared() receives the target whose global object was cleared, then cleared state for every target. That was harmless while only the page emitted the event, but the Debugger domain's targetTypes now includes "frame", so a subframe appearing discards the main frame's WI.DebuggerData. A later main-frame pause resolves no call frames and takes the silent auto-resume path in debuggerDidPause(), so the frontend never reports the pause. * Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js: (WI.DebuggerManager.prototype.globalObjectCleared): Canonical link: https://commits.webkit.org/320787@main
…ange https://bugs.webkit.org/show_bug.cgi?id=323443 Reviewed by Yusuke Suzuki. localTimeToMS and the other Date math sinks only checked isfinite before narrowing milliseconds to int64_t. A finite year such as 1000000000 produces a time far outside that type. Release already TimeClipped that to NaN. UBSan reported the conversion. Skip the narrowing when the value is outside ±8.64e15 plus one day. TimeClip is still the spec gate. The extra day covers local offset around the clip so getters on new Date(8.64e15) stay valid. * Source/JavaScriptCore/runtime/JSDateMath.cpp: * JSTests/stress/date-constructor-out-of-range-components.js: Added. Canonical link: https://commits.webkit.org/320788@main
…ad classes https://bugs.webkit.org/show_bug.cgi?id=323736 Reviewed by Geoffrey Garen. 320637@main annotated six classes by naming the lock and the owner thread at each unlocked read, and 320703@main then added WTF_DECLARE_OWNER_THREAD_ASSERTIONS() and used it for Range, leaving two spellings of the same thing in the tree. Declare the assertions in the other six classes too and collapse their twenty-two call sites to assertIsOwnerThread(), which states the choice of owner once per class instead of once per read. CSSStyleSheet.h, HTMLCollection.h and TextTrackCue.h gain an explicit <wtf/ThreadAssertions.h>: they had been picking the free function up transitively through their implementation files, which no longer suffices now that the macro expands in the header. * Source/WTF/wtf/ThreadAssertions.h: * Source/WebCore/css/CSSStyleSheet.cpp: (WebCore::CSSStyleSheet::ownerNode const): (WebCore::CSSStyleSheet::isDetached const): * Source/WebCore/css/CSSStyleSheet.h: * Source/WebCore/dom/Attr.cpp: (WebCore::Attr::setValue): (WebCore::Attr::style): (WebCore::Attr::value const): * Source/WebCore/dom/Attr.h: * Source/WebCore/dom/TreeWalker.cpp: * Source/WebCore/dom/TreeWalker.h: * Source/WebCore/html/HTMLCollection.cpp: (WebCore::HTMLCollection::namedItemSlow const): (WebCore::HTMLCollection::supportedPropertyNames): (WebCore::HTMLCollection::isSupportedPropertyName): (WebCore::HTMLCollection::namedItems const): * Source/WebCore/html/HTMLCollection.h: * Source/WebCore/html/HTMLCollectionInlines.h: (WebCore::HTMLCollection::hasNamedElementCache const): * Source/WebCore/html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::track const): * Source/WebCore/html/track/TextTrackCue.h: * Source/WebCore/xml/XSLStyleSheet.h: Canonical link: https://commits.webkit.org/320789@main
https://bugs.webkit.org/show_bug.cgi?id=323735 Reviewed by Geoffrey Garen. m_script, m_decodingState and m_decoder are written on the main thread under m_lock and read on compilation threads by codeBlockHashConcurrently(), which locks. The lock is therefore load-bearing for those three, and nothing enforced that the writers took it. Guard them with WTF_GUARDED_BY_LOCK() and assert on the main thread's unlocked read paths. m_scriptHash and m_wasForceDecodedAsUTF8 are deliberately left unguarded. Neither is read off the main thread, so by the rule that state should only be annotated where failing to lock would be a bug, they do not qualify; m_scriptHash is in fact written without the lock in script(), so guarding it would report existing code rather than describe an invariant. encoding() and textResourceDecoder() read m_decoder from both sides: the main thread calls them without the lock, and codeBlockHashConcurrently() calls encoding() while holding it. They can therefore neither assert the owner thread, which would fire on a compilation thread, nor require the lock exclusively. They instead require it shared, which both callers satisfy, the main thread through its owner-thread assertion and the compilation thread by holding the lock. Calls that arrive through a CachedResource pointer use the unannotated base declaration and so are not checked, which is no weaker than before. script() reads guarded state before, between and after its two critical sections, so it asserts once at the top and then releases and re-asserts around each Locker; leaving the assertion live would report the Locker as acquiring a lock that is already held. setBodyDataFrom() reads a second CachedScript's guarded members, and holding this object's lock grants nothing for another's, so it asserts on the source object as well. No behaviour change is intended: neither helper generates code, so no lock is taken and no ordering is introduced; both only move thread safety analysis state. * Source/WebCore/loader/cache/CachedScript.cpp: (WebCore::CachedScript::setEncoding): (WebCore::CachedScript::script): (WebCore::CachedScript::scriptHash): (WebCore::CachedScript::setBodyDataFrom): * Source/WebCore/loader/cache/CachedScript.h: Canonical link: https://commits.webkit.org/320790@main
https://bugs.webkit.org/show_bug.cgi?id=323823 rdar://187061419 Reviewed by Simon Fraser. These exercise only the link-parameters property, which renders since 320159@main. * LayoutTests/TestExpectations: * LayoutTests/platform/glib/TestExpectations: Canonical link: https://commits.webkit.org/320791@main
https://bugs.webkit.org/show_bug.cgi?id=323731 Reviewed by Yusuke Suzuki. Regular expressions that contain a built-in character class such as \d or \w allocate a new CharacterClass instance on the heap for every YarrPattern. The contents of these instances are always identical and never change once the YarrPattern has been built. So construct each of these built-in classes only once per process and cache it. Also, to keep the cached CharacterClasses from being modified in the future, hand them out as const CharacterClass*. * Source/JavaScriptCore/yarr/YarrInterpreter.cpp: (JSC::Yarr::Interpreter::testCharacterClass): (JSC::Yarr::Interpreter::checkCharacterClassDontAdvanceInputForNonBMP): (JSC::Yarr::ByteCompiler::atomCharacterClass): * Source/JavaScriptCore/yarr/YarrInterpreter.h: (JSC::Yarr::ByteTerm::ByteTerm): * Source/JavaScriptCore/yarr/YarrJIT.cpp: * Source/JavaScriptCore/yarr/YarrPattern.cpp: (JSC::Yarr::YarrPattern::unicodeCharacterClassFor): (JSC::Yarr::YarrPatternConstructor::atomBuiltInCharacterClass): (JSC::Yarr::YarrPatternConstructor::atomCharacterClassBuiltIn): (JSC::Yarr::YarrPatternConstructor::optimizeDotStarWrappedExpressions): (JSC::Yarr::dumpCharacterClass): * Source/JavaScriptCore/yarr/YarrPattern.h: (JSC::Yarr::PatternTerm::PatternTerm): (JSC::Yarr::YarrPattern::resetForReparsing): (JSC::Yarr::YarrPattern::create const): (JSC::Yarr::YarrPattern::anyCharacterClass): (JSC::Yarr::YarrPattern::newlineCharacterClass): (JSC::Yarr::YarrPattern::digitsCharacterClass): (JSC::Yarr::YarrPattern::spacesCharacterClass): (JSC::Yarr::YarrPattern::wordcharCharacterClass): (JSC::Yarr::YarrPattern::wordUnicodeIgnoreCaseCharCharacterClass): (JSC::Yarr::YarrPattern::nondigitsCharacterClass): (JSC::Yarr::YarrPattern::nonspacesCharacterClass): (JSC::Yarr::YarrPattern::nonwordcharCharacterClass): (JSC::Yarr::YarrPattern::nonwordUnicodeIgnoreCaseCharCharacterClass): Canonical link: https://commits.webkit.org/320792@main
https://bugs.webkit.org/show_bug.cgi?id=323837 rdar://187072036 Reviewed by David Kilzer. Factor out duplicated code into ConvertToBackingContext * Source/WebCore/Modules/WebGPU/Implementation/WebGPUConvertToBackingContext.cpp: (WebCore::WebGPU::ConvertToBackingContext::convertToBacking): * Source/WebCore/Modules/WebGPU/Implementation/WebGPUConvertToBackingContext.h: * Source/WebCore/Modules/WebGPU/Implementation/WebGPUPresentationContextImpl.cpp: (WebCore::WebGPU::PresentationContextImpl::configure): (WebCore::WebGPU::convertToColorSpace): Deleted. * Source/WebCore/Modules/WebGPU/Implementation/WebGPUQueueImpl.cpp: (WebCore::WebGPU::QueueImpl::copyExternalImageToTexture): Canonical link: https://commits.webkit.org/320793@main
…oncurrent marker https://bugs.webkit.org/show_bug.cgi?id=323639 Reviewed by Yusuke Suzuki. JSArray::setLength, JSArray::shiftCountWithAnyIndexingType and the in-place path of JSObject::increaseVectorLength clear vacated slots with a WriteBarrier<Unknown>::clear() loop, which the compiler turns into a libc memset call (bzero with Apple clang). The concurrent marker scans these slots without locking, and libc does not guarantee store width: musl's memset writes the edges of the range with 1-, 2- and 4-byte stores, so the marker can read a half-zeroed JSValue and treat it as a JSCell*, crashing the marker or corrupting mark bits. glibc and Apple's implementations happen to use 8-byte or wider stores, which hides the race. Clear the slots with gcSafeZeroMemory() instead, like unshiftCountSlowCase already does. In increaseVectorLength the cleared slots are published by the following setVectorLength(), so also fence between the zeroing and the publication. No test, because the tear is only observable with a libc whose memset uses sub-8-byte stores. * Source/JavaScriptCore/runtime/JSArray.cpp: (JSC::JSArray::setLength): (JSC::JSArray::shiftCountWithAnyIndexingType): * Source/JavaScriptCore/runtime/JSObject.cpp: (JSC::JSObject::increaseVectorLength): Canonical link: https://commits.webkit.org/320794@main
Preview Builds
|
robobun
added a commit
to oven-sh/bun
that referenced
this pull request
Sep 10, 2026
Its tree is identical to the preview build CI ran against (autobuild-preview-pr-614-3db1d92e).
This was referenced Sep 10, 2026
dylan-conway
added a commit
to oven-sh/bun
that referenced
this pull request
Sep 11, 2026
### What does this PR do? Upgrades WebKit to oven-sh/WebKit@`cf1b36ec8703` (current `main`: the upstream merge from oven-sh/WebKit#614 plus oven-sh/WebKit#522). Supersedes #42177, which pins the pre-#522 commit. Bun-side changes the new JSC needs: - `GlobalObjectMethodTable` has a new `moduleTypeIsAllowed` hook; the five tables pass `nullptr` (default behaviour). - Module records are created against a specific `JSModuleLoader`: the loader JSC passes to the fetch hook is threaded through `Bun__analyzeTranspiledModule` and the prelinked-record helpers, `moduleLoaderImportModule` uses the loader it is given, and `node:vm` `SourceTextModule` / `SyntheticModule` records are created against their context's loader (the same global they already link and evaluate in). - `bundler_bytecode_portable`: the serialized bytecode changes uniformly with the engine (module programs declare `@moduleLoader`; async/generator bodies per #614), so the affected snapshot entries move. ### How did you verify your code works? Builds and runs against the `autobuild-cf1b36ec8703d8e87436094d21d478d358c7d886` prebuilt; `bundler_bytecode_portable.test.ts`, `test/js/node/vm`, the `test-vm-module-*` node tests and `import-meta.test.js` pass locally. Full matrix in CI.
This was referenced Sep 11, 2026
Open
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
ccdcb8a026(2026-09-09) into the fork: 320 commits since the previous merge base0d58b764f3(2026-09-03), 71 of them in JavaScriptCore, WTF, bmalloc or cmake.git merge-base origin/main upstream/mainreports0d58b764f3directly. This merge commit hasccdcb8a026as its second parent.Conflicts and how they were resolved
15 files conflicted. Several upstream commits in this range are the fork's own patches landed upstream in a different shape, so most conflicts are "same change, two shapes".
Took upstream's shape (the fork's version of the same change is dropped):
ccdcb8a026Array element clearing vs the concurrent marker (fork [JSC] JSArray::setLength / shiftCountWithAnyIndexingType clear live butterfly slots through libc memset, racing the concurrent marker #564):JSArray::setLength/shiftCountWithAnyIndexingTypeusegcSafeZeroMemoryonly forArrayWithContiguous,JSObject::increaseVectorLengthkeeps the clear loop plus the newstoreStoreFence.f37e633649Object.valuesfast path: upstream's count-then-fill body, inside the fork'sobjectValues(VM&, JSGlobalObject*, JSValue)helper (returnsJSValue, soreturn result;).83683abb03RegExpTestInlinewith a Yarr frame in the DFG/FTL outgoing-argument area: the DFG/FTL/StackAlignment.hside merged cleanly, and theYarrJIT.cpp/YarrJIT.hside is ported by hand onto the fork's YarrJIT (frameAddress()is SP-relative inInlineTestmode,canInlinedrops theeitherUnicode()and frame-size exclusions and adds them_abortExecutionone,compileInline()takesreservedFrameSizeInBytesand no longer moves SP).d5531cc083+eb64f293d8+34141654c7inRegExp.cpp:updateMetadataFromPattern(),m_minimumSize, out-of-lineensureRegExpJITCode(). The fork'sRELEASE_ASSERT(m_numSubpatterns == pattern.m_numSubpatterns)(lazy RegExp construction, Faster startup for bytecode-cache module graphs: pre-resolved module loading, thin child executables, lazy RegExp construction, JIT policy scale #588) stays in front of eachupdateMetadataFromPattern()call. One fork-side guard added underUSE(BUN_JSC_ADDITIONS):updateMetadataFromPattern()does not rebuild an existingRareDataon a recompile, because replacing it frees aRareDatathe concurrent marker may be reading invisitChildrenand dropsm_cachedGroupsStructureID.19cfe1ed98releaseAssertIsCurrentis gone: the fork'sUSE(BUN_EVENT_LOOP)branches inRunLoopGeneric.cppcallassertIsCurrent(m_runLoop->m_parent).64168e4d90GlobalObjectMethodTable::moduleTypeIsAllowed: taken as is (quoted include kept). UnderUSE(BUN_JSC_ADDITIONS),JSModuleLoader'smoduleTypeIsAllowed()treatsScriptFetchParameters::HostDefinedas allowed when the global object has no hook, since a HostDefined type is by definition one the host's loader handles. Bun's method tables get anullptrslot in the companion PR.Kept the fork's version (upstream's overlapping change is not taken):
cbd15fc88bKaratsuba inJSBigInt: the fork already has Karatsuba plus Toom-3, Schönhage-Strassen, Burnikel-Ziegler/Barrett division and theInterruptCheckplumbing, so upstream's copy of the Karatsuba functions is dropped.f52d0e486a(bounds-check hoisting) is applied on top, including itskaratsubaMain,cachedModFixed,truncateToNBits(unsigned)andparseIntchanges. The three new BigInt JSTests are byte-identical on both sides.YarrInterpreter.cpp/.h,YarrPattern.cpp/.h,YarrParser.handYarrJIT.cppstay on the fork's engine from Yarr: JIT lookbehinds, first-code-point alternation dispatch, Boyer-Moore and /u·/v spec alignment, RegExp correctness fixes #299. Not taken:956f6fb496(interpreter matches lookbehinds from a match-order copy),549955d997(YarrPattern stores lookbehind terms in match order) and6279ebe3bd(process-wideconst CharacterClass*built-ins). The first two assume upstream's JIT, which reads backward alternatives in pattern order throughcopyDisjunctionInMatchOrder(); the fork's JIT mirrors lookbehind bodies itself (mirrorDisjunctionForLookbehind) and its interpreter keeps the per-term Backward paths, so taking the new term order would reverse lookbehinds twice. The fork already shares built-in and Unicode-property character classes process-wide (Faster startup for bytecode-cache module graphs: pre-resolved module loading, thin child executables, lazy RegExp construction, JIT policy scale #588,sharedCharacterClass()), without theconstchange.1a29b8cfcf(\-after a class set operand in/v) is already handled by the fork'shyphenIsRangelogic. All of these are left for when the fork's Yarr converges with upstream, like Upgrade to upstream WebKit 47f7250137c6 #455 did for2f66f5ed23/bbc000ae4f.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.jscwith their//@ runDefaultoptions, and the fiveregexp-interpreter-lookbehind*tests also pass with--useRegExpJIT=0. That covers the skipped Yarr commits' tests (regexp-interpreter-lookbehind*.js,regexp-v-flag-escaped-hyphen-after-set-operand.js) and the portedregexp-test-inline-*.js.JSTests/stressfiles whose names matchregexp*,regex*,*lookbehind*or*yarr*, on the samejsc: 311 pass. The other 4 (regexp-boundary-assertions.js,regexp-buffer-boundaries-anchoring.js,regexp-unicode-code-unit-read-for-bmp-terms.js,regexp-lazy-pattern-construction.js) fail identically on thejscfrom the currentautobuild-dfd696443bdebug-asan tarball, so they are pre-existing (the first three are the\A/\zand mid-surrogate-start differences Upgrade to upstream WebKit 47f7250137c6 #455 documents, the last expects a SyntaxError where the fork throws "Out of memory: too many nested disjunctions" as a RangeError).bun run build:local: Bun main builds and links against this tree with one source change (anullptrmoduleTypeIsAllowedslot in its fiveGlobalObjectMethodTableinitializers).bun bdagainst this PR'sautobuild-preview-pr-614-3db1d92edebug-asan tarball also builds. The companion Bun PR lists the suites run on those builds.Upstream changes
Each commit appears once under the most specific heading that applies.
Needs an embedder-side change
64168e4d90GlobalObjectMethodTable(runtime/GlobalObjectMethodTable.h) gainsbool (*moduleTypeIsAllowed)(ScriptFetchParameters::Type)betweenshouldInterruptScriptBeforeTimeoutandmoduleLoaderImportModule, so every positional initializer of the table needs a new entry (upstreamjsc.cppandJSGlobalObject::baseGlobalObjectMethodTablepassnullptr).JSModuleLoader::importModuleandhostLoadImportedModulealways allowNone,JavaScript,WebAssembly,JSONandText, and for any otherScriptFetchParameters::Typethey ask the hook and reject with TypeError "Module type not supported by environment" when it is null or returns false. https://bugs.webkit.org/show_bug.cgi?id=3231705f14e32e57wtf/text/CString.haddsCStringWithEncoding<CharacterType>with aliasesUTF8CString,Latin1CString,ASCIICString.String::ascii()returnsASCIICString,String::latin1()returnsLatin1CString,String/StringView/StringImpl::tryGetUTF8()returnstd::expected<UTF8CString, UTF8ConversionError>. Theirdata()/span()are typed (const char8_t*,const Latin1Character*), so callers that passedlatin1().data()ortryGetUTF8()->data()to aconst char*API must usecharacters(),byteCast<char>(span()), or bind toconst CString&.utf8()still returns plainCString. https://bugs.webkit.org/show_bug.cgi?id=32340819cfe1ed98assertIsCurrent(const RunLoop&)inwtf/RunLoop.his nowRELEASE_ASSERT(runLoop.isCurrent())in all build types andreleaseAssertIsCurrent()is removed. https://bugs.webkit.org/show_bug.cgi?id=323572Runtime and builtins
cbd15fc88bJSBigIntmultiplication uses Karatsuba (ported from V8 and Go) when the smaller operand has at least 44 digits. 1000x1000-digit products are about 2.7x faster, 4000x4000 about 4.8x. https://bugs.webkit.org/show_bug.cgi?id=323244f52d0e486aJSBigInt.cpphoistsstd::spanbounds checks out of hot loops with explicitRELEASE_ASSERTpreconditions andsize_tindices (some privateJSBigInt.hsignatures change). Performance only. https://bugs.webkit.org/show_bug.cgi?id=323699c8c37314eeArray.prototype.toSplicedthrows TypeError only when the new length exceeds 2^53 - 1. A new length of exactly 2^53 - 1 (an array-like withlength = Infinity) now reaches ArrayCreate and throws RangeError as the spec requires. https://bugs.webkit.org/show_bug.cgi?id=320830f37e633649TheObject.valuesfast path counts properties first and writes values directly into the result array's contiguous storage instead of staging them in aMarkedArgumentBuffer, 2.3x to 3.2x faster for objects with more than 8 properties. https://bugs.webkit.org/show_bug.cgi?id=323406ae97aa471aJSArray::fastCopyWithinno longer bails to the slow path when an Int32, Double or Contiguous array contains holes (holes move as raw bits), removing the linearcontainsHolescan.copyWithinis about 2x faster without holes and about 45x with holes. https://bugs.webkit.org/show_bug.cgi?id=3235934fa7b55ae4A strict-mode call spelledeval(...)in tail position becomes a real tail call when the callee is not the built-in eval (test262tco-non-eval-*). Also fixes a pre-existinguseTailCallsbug: generator, async function and async generator bodies no longer get tail calls, so a strict async generator that doesreturn someCall()awaits the returned promise instead of resolving{ value: <promise>, done: true }. https://bugs.webkit.org/show_bug.cgi?id=32359741294576acAtomics.isLockFreeapplies ToIntegerOrInfinity instead of ToInt32, soAtomics.isLockFree(4294967297)returns false instead of wrapping to 1. https://bugs.webkit.org/show_bug.cgi?id=323323d5ba0ecec9JSDateMath.cppskips the double to int64 narrowing for local-time values outside the ECMAScript time range plus one day. Results were already NaN through TimeClip, this removes the undefined conversion UBSan reported. https://bugs.webkit.org/show_bug.cgi?id=323443b6afe0d39eStackFrame::toStringtruncates adata:source URL to 1024 characters (never splitting a%XXescape) when buildingError.stack. https://bugs.webkit.org/show_bug.cgi?id=323636566279d48dC++toInt32(double)inruntime/MathCommon.husestruncateDoubleToInt64plus a newtoInt32AfterFailedTruncation(double)on x86_64. TheToIntModeenum and theModetemplate parameter oftoIntImplare removed. https://bugs.webkit.org/show_bug.cgi?id=323591RegExp (Yarr)
34141654c7RegExpstores the pattern's minimum match length (RegExp::minimumSize(),offsetOfMinimumSize()).RegExp::matchInlinefails fast when the remaining input is shorter, and DFG/FTLRegExpTestemit the same check inline for non-global, non-sticky RegExps, about 5x on a path-to-regexp style router benchmark. https://bugs.webkit.org/show_bug.cgi?id=322689fea77037caFollow-up: the inline minimum-length filter is taken only whenlastIndexis an Int32, so alastIndexwith avalueOfkeeps its observable read after tier-up. https://bugs.webkit.org/show_bug.cgi?id=32350183683abb03RegExpTestInline(the Yarr matcher emitted directly into DFG/FTL code for a constant RegExp on 8-bit strings) now handles patterns that need Yarr frame slots (quantifiers, alternation) and patterns with theuorvflag, by reserving the Yarr frame in the DFG/FTL outgoing-argument area (Graph::m_parameterSlots).Yarr::jitCompileInlinedTestgains areservedFrameSizeInBytesparameter andargumentCountForStackSizeis removed fromruntime/StackAlignment.h. About 1.6x to 1.7x on the microbenchmarks. https://bugs.webkit.org/show_bug.cgi?id=322949111d7edcecFixes a DFG/FTL compiler-thread crash on a nullYarrCodeBlockwhenVM::deleteAllCode()clears RegExp code between strength reduction andRegExpTestInlinecode generation. AddsRegExp::getRegExpJITCodeBlockConcurrently(). https://bugs.webkit.org/show_bug.cgi?id=323583eb64f293d8RegExp::ensureRegExpJITCode()moves out of line and issuesWTF::storeStoreFence()before publishingm_regExpJITCode, which compiler threads read concurrently. https://bugs.webkit.org/show_bug.cgi?id=323796d5531cc083DFG strength reduction no longer folds aNewRegExpUntypedwith constant pattern and flags intoNewRegExpwhen the resultingRegExpis invalid, andRegExpCache::lookupOrCreatedoes not cache invalid RegExps.RegExprefreshesm_atom,m_specificPattern,m_numSubpatternsand named-capture data from the parsed pattern on every compile through a newupdateMetadataFromPattern(). Landed first on a Safari security branch (stale captures). https://bugs.webkit.org/show_bug.cgi?id=316723956f6fb496(not taken, see above) The Yarr interpreter matches lookbehinds from a match-order copy of the disjunction like upstream's JIT does, deleting every Backward-specific matcher. Fixes interpreter-only/ulookbehind bugs upstream:/(?<=[\u{1F600}a])b/uon "x😀b",/(?<=\u{1F600}{2})x/uon "😀😀x",/(?<=$.*)/suand/(?<=\uD83D)/umatching inside a surrogate pair. The fork's interpreter already passes these tests. https://bugs.webkit.org/show_bug.cgi?id=322692549955d997(not taken)YarrPatternConstructorstores the terms of lookbehind alternatives in match order, so both upstream tiers use the pattern directly andcopyDisjunctionInMatchOrder()is removed. https://bugs.webkit.org/show_bug.cgi?id=3234216279ebe3bd(not taken) Built-in character classes are built once per process and shared by everyYarrPatternasconst CharacterClass*. The fork has had the equivalent since Faster startup for bytecode-cache module graphs: pre-resolved module loading, thin child executables, lazy RegExp construction, JIT policy scale #588. https://bugs.webkit.org/show_bug.cgi?id=323731b44e00d2f0RegExp.escapeno longer escapes a supplementary code point whose low 16 bits equal a syntax character, punctuator, whitespace or control character (U+2002A used to come out as\followed by U+2002A). https://bugs.webkit.org/show_bug.cgi?id=3236421a29b8cfcf(already in the fork) In/vmode an escaped hyphen after a class set operand (/[[a]\-]/v,/[\q{ab}\-]/v) no longer throws SyntaxError. https://bugs.webkit.org/show_bug.cgi?id=323496JIT (Baseline, DFG, FTL, B3)
0d6cf47c3bDFG/FTLArrayIndexOf/ArrayIncludeson Int32 and Double arrays call a vectorized operation (newoperationArrayIndexOfDouble,operationArrayIncludesDouble) once at least 32 elements remain, 2.4x to 3.3x faster on long arrays. In WTF,findDoubleis rebuilt on a sharedfind64BitLaneImpl,findDoubleAlignedImplis removed, andSIMD::splat<double>is added. https://bugs.webkit.org/show_bug.cgi?id=3231928e7f96f9a5On x86_64, DFG/FTL double to int32 conversion truncates with 64-bitcvttsd2siqand keeps the low 32 bits, so doubles outside the int32 range no longer calloperationToInt32SensibleSlow, 3.1x on the microbenchmark. AddsMacroAssemblerX86_64::branchTruncateDoubleToInt32ViaInt64. https://bugs.webkit.org/show_bug.cgi?id=323498e6507c8f6aCodeBlock::finishCreationpre-invalidates theWatchpointSetofResolvedClosureVarput_to_scopetargets inside generator, async function and async generator bodies. Fixes DFG code returning stale constant-folded values of captured variables afterdeleteAllCodere-creates a suspended generator's CodeBlock, at the cost of no longer constant-folding such variables. https://bugs.webkit.org/show_bug.cgi?id=313499db10a0f616Fixes stale get/put inline caches when a custom accessor or custom value with no backing property (for example from a static property table) on an already-flattened dictionary object is shadowed by a real property.PropertySlot::setCacheableCustom,PutPropertySlot::setCustomValueandsetCustomAccessorgain a trailingPropertyOffset offset = invalidOffsetparameter. https://bugs.webkit.org/show_bug.cgi?id=319303e2f1a867aeDFG node creation movesCodeOrigin/NodeOrigininstead of copying, saving a malloc/free per node when the bytecode index does not fit the packed form. https://bugs.webkit.org/show_bug.cgi?id=323490b091600bcaARM64Assembler.h,X86Assembler.handRISCV64Assembler.hdeclareRegisterID,SPRegisterIDandFPRegisterID/XMMRegisterIDas named enums instead oftypedef enum. https://bugs.webkit.org/show_bug.cgi?id=323455ce4906cf9bB3Validateconverts SIMD lane types withsimdB3ScalarType()fromB3Type.h. Internal cleanup. https://bugs.webkit.org/show_bug.cgi?id=314639WebAssembly
10d4d20f5bB3LowerToAirno longer folds aShlinto theWasmAddressscaled-index form when the Shl's child is a locked value. On ARM64 the fold could address memory through an undefined index register while the bounds check tested the correct pointer (OMG miscompile from 320441@main). https://bugs.webkit.org/show_bug.cgi?id=3235826ae2e2fec9The validator accepts(ref none)and(ref null none)operands fori31.get_sandi31.get_u, fixing rejection of Binaryen output that canonicalizesref.null i31toref.null none. https://bugs.webkit.org/show_bug.cgi?id=3228361b46b20806Extended constant expressions for globals recordmaxStackHeightduring validation and reuse it at evaluation, and GC array/struct initialization skips storing values equal to the zero fill. Faster instantiation for modules with many GC globals. https://bugs.webkit.org/show_bug.cgi?id=32346554c30c45beARM64i8x16/i16x8/i32x4.bitmaskin BBQ and B3 load the lane-bit mask from a shared constant (vectorBitmaskTowerinjit/SIMDInfo.h). https://bugs.webkit.org/show_bug.cgi?id=3233500ddad2a1c1The wasm-to-wasm tail-call restore-frame copy loop uses ARM64 post-indexloadPair64/storePair64. https://bugs.webkit.org/show_bug.cgi?id=323374ca158eb19bThe Wasm debugger stub supports the instance-scopedqWasmGlobalpacket form and advertisesqWasmInstance+, andqWasmLocalerrors on unparsable fields instead of reading local 0. https://bugs.webkit.org/show_bug.cgi?id=323123GC and memory
ccdcb8a026JSArray::setLength,JSArray::shiftCountWithAnyIndexingTypeandJSObject::increaseVectorLengthclear vacated Contiguous slots withgcSafeZeroMemory()(andincreaseVectorLengthfences before publishing the new vector length) instead of aWriteBarrier::clear()loop that compilers lower to libcmemset. With musl, whose memset uses sub-8-byte edge stores, the concurrent marker could read a torn JSValue. This is the upstream form of the fork's [JSC] JSArray::setLength / shiftCountWithAnyIndexingType clear live butterfly slots through libc memset, racing the concurrent marker #564. https://bugs.webkit.org/show_bug.cgi?id=323639366915db5cSlotVisitor::drainFromShareddecrementsHeap::m_numberOfWaitingParallelMarkersthrough a scope exit, fixing early-return paths that left the counter unbalanced. https://bugs.webkit.org/show_bug.cgi?id=3234914577b17ad8Removes deadHeap::isPagedOut(),MarkedSpace::isPagedOut(),BlockDirectory::updatePercentageOfPagedOutPages()and the JSC optioncustomFullGCCallbackBailThreshold. https://bugs.webkit.org/show_bug.cgi?id=323689a0042af348ARM64 LLIntsanitizeStackForVMzero-fills large stack regions with adc zvacache-line loop whenDCZID_EL0reads 4. https://bugs.webkit.org/show_bug.cgi?id=323368WTF and bmalloc
249ede976fNewwtf/SpinBackoff.h(mirrored inbmalloc/SpinBackoff.h) centralizes spin-then-yield logic and is adopted byLockAlgorithm::lockSlow,WordLock,bmalloc::Mutex,JSLock::grabAllLocksandHeap::resumeThePeriphery. On non-Darwin POSIXThread::yield()now does a 1nsnanosleepinstead ofsched_yield(), and Linux lock slow paths spin withpausebackoff before parking. Reported perf neutral. https://bugs.webkit.org/show_bug.cgi?id=321012c0121e11c1libpas: when bmalloc routes allocations to the system heap (Malloc=1, sanitizers, valgrind), non-tryallocators crash on allocation failure like the normal path,tryvariants return null, andtry_reallocatevariants seterrnotoENOMEM. https://bugs.webkit.org/show_bug.cgi?id=323456b982ebd314,6f13897892,0f31212799wtf/ThreadAssertions.hgainsassertIsOwnerThread(lock, ownerThread),releaseOwnerThreadAssertion(lock)and theWTF_DECLARE_OWNER_THREAD_ASSERTIONSmacro, for state written under a lock but read unlocked on its owner thread. Adoption is WebCore-only. https://bugs.webkit.org/show_bug.cgi?id=323596f2535d35a0AddsWTF_GUARDED_BY_LOCK/WTF_REQUIRES_LOCKannotations to lock-protected members across JSC and WTF headers (Heap,JSRunLoopTimer::Manager,RegExpCache::m_weakCache,RunLoop::m_registeredTimers,Inspector::RemoteConnectionToTarget,PerfLog,ProfilerDatabase, Wasm callee groups and thunks). The actual race fixes in the commit are WebCore/WebKit only. https://bugs.webkit.org/show_bug.cgi?id=323492da79705adeWTF::VectorgainsmoveTo(oldPosition, newPosition). https://bugs.webkit.org/show_bug.cgi?id=3228913856a28580WindowsWTF::memoryFootprint()computes the private working set withQueryWorkingSetExoverVirtualQueryregions in fixed batches, with a hardenedQueryWorkingSetfallback. Fixes a crash under Wine where the old code sized a retry buffer from uninitialized memory. https://bugs.webkit.org/show_bug.cgi?id=3235597e1a50ea08,79282f6ac8,d0088e0c11Swift interop annotations onVector,HashMap,Variant,RetainPtrandUniqueRef(SWIFT_COPYABLE_IF,SWIFT_ESCAPABLE), plus the non-Swift fallback macro fix. No C++ semantic change. https://bugs.webkit.org/show_bug.cgi?id=323454Build system and platform
72ec90eba3Non-unified CMake builds route ARC.mmsources into the${framework}_ARC_SOURCESobject library through a newgenerate-unified-source-bundles.py --print-arc-sourcesmode (Cocoa only in effect). https://bugs.webkit.org/show_bug.cgi?id=3231391bcccddc7cWebKitMacros.cmakepasses-clang-target ${CMAKE_Swift_COMPILER_TARGET}to swiftc when generating Swift/C++ interop headers. Swift targets only. https://bugs.webkit.org/show_bug.cgi?id=32337056d21bcfd6ENABLE_WEBGPU_SWIFTbecomes a regularWEBKIT_OPTION_DEFINE(default OFF, ON inOptionsCocoa.cmake). https://bugs.webkit.org/show_bug.cgi?id=32343034aca645c7The CMakeSWIFT_NINJA_TRACEoption nestsswiftc_job_recorder.pyunderswiftc-wrapper.pyand errors out on Windows. https://bugs.webkit.org/show_bug.cgi?id=323380dfc530cd33Removes theENABLE_TEXT_AUTOSIZINGflag fromwtf/PlatformEnable.hand the cmake feature lists. No JSC effect. https://bugs.webkit.org/show_bug.cgi?id=322941Reverted within the range
fe81aba198"[JSC] Unify allocators" was reverted byce29fcc8c7, and its follow-up03c6c95044"[JSC] Move BlockDirectory for-stealing list to AlignedMemoryAllocator" by10f4e9581e, both for a 0.3% Speedometer 3 regression. Net effect none. https://bugs.webkit.org/show_bug.cgi?id=323629WebCore-only or no effect on JSC embedders
6f6d92eda1,fcef99916e,edc74c3eeb,ab7189f839,194d557d4f,2391a5cb88,3e12766ced,4b78955e0d,3821585ac8,67c93bbc4b.