Skip to content

Upgrade to upstream WebKit ccdcb8a026 - #614

Merged
sosukesuzuki merged 321 commits into
mainfrom
bun/upgrade-to-ccdcb8a026
Sep 10, 2026
Merged

sosukesuzuki merged 321 commits into
mainfrom
bun/upgrade-to-ccdcb8a026

Conversation

@robobun

@robobun robobun commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Merges upstream WebKit main at ccdcb8a026 (2026-09-09) into the fork: 320 commits since the previous merge base 0d58b764f3 (2026-09-03), 71 of them in JavaScriptCore, WTF, bmalloc or cmake. git merge-base origin/main upstream/main reports 0d58b764f3 directly. This merge commit has ccdcb8a026 as 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):

  • ccdcb8a026 Array 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 / shiftCountWithAnyIndexingType use gcSafeZeroMemory only for ArrayWithContiguous, JSObject::increaseVectorLength keeps the clear loop plus the new storeStoreFence.
  • f37e633649 Object.values fast path: upstream's count-then-fill body, inside the fork's objectValues(VM&, JSGlobalObject*, JSValue) helper (returns JSValue, so return result;).
  • 83683abb03 RegExpTestInline with a Yarr frame in the DFG/FTL outgoing-argument area: the DFG/FTL/StackAlignment.h side merged cleanly, and the YarrJIT.cpp/YarrJIT.h side is ported by hand onto the fork's YarrJIT (frameAddress() is SP-relative in InlineTest mode, canInline drops the eitherUnicode() and frame-size exclusions and adds the m_abortExecution one, compileInline() takes reservedFrameSizeInBytes and no longer moves SP).
  • d5531cc083 + eb64f293d8 + 34141654c7 in RegExp.cpp: updateMetadataFromPattern(), m_minimumSize, out-of-line ensureRegExpJITCode(). The fork's RELEASE_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 each updateMetadataFromPattern() call. One fork-side guard added under USE(BUN_JSC_ADDITIONS): updateMetadataFromPattern() does not rebuild an existing RareData on a recompile, because replacing it frees a RareData the concurrent marker may be reading in visitChildren and drops m_cachedGroupsStructureID.
  • 19cfe1ed98 releaseAssertIsCurrent is gone: the fork's USE(BUN_EVENT_LOOP) branches in RunLoopGeneric.cpp call assertIsCurrent(m_runLoop->m_parent).
  • 64168e4d90 GlobalObjectMethodTable::moduleTypeIsAllowed: taken as is (quoted include kept). Under USE(BUN_JSC_ADDITIONS), JSModuleLoader's moduleTypeIsAllowed() treats ScriptFetchParameters::HostDefined as 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 a nullptr slot in the companion PR.

Kept the fork's version (upstream's overlapping change is not taken):

  • cbd15fc88b Karatsuba in JSBigInt: the fork already has Karatsuba plus Toom-3, Schönhage-Strassen, Burnikel-Ziegler/Barrett division and the InterruptCheck plumbing, so upstream's copy of the Karatsuba functions is dropped. f52d0e486a (bounds-check hoisting) is applied on top, including its karatsubaMain, cachedModFixed, truncateToNBits(unsigned) and parseInt changes. The three new BigInt JSTests are byte-identical on both sides.
  • Yarr: YarrInterpreter.cpp/.h, YarrPattern.cpp/.h, YarrParser.h and YarrJIT.cpp stay 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) and 6279ebe3bd (process-wide const CharacterClass* built-ins). The first two assume upstream's JIT, which reads backward alternatives in pattern order through copyDisjunctionInMatchOrder(); 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 the const change. 1a29b8cfcf (\- after a class set operand in /v) is already handled by the fork's hyphenIsRange logic. All of these are left for when the fork's Yarr converges with upstream, like Upgrade to upstream WebKit 47f7250137c6 #455 did for 2f66f5ed23/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, jsc runs.
  • All 31 JSTests/stress files added upstream in this range pass on that jsc with their //@ runDefault options, and the five regexp-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 ported regexp-test-inline-*.js.
  • The 315 existing JSTests/stress files whose names match regexp*, regex*, *lookbehind* or *yarr*, on the same jsc: 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 the jsc from the current autobuild-dfd696443b debug-asan tarball, so they are pre-existing (the first three are the \A/\z and 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 (a nullptr moduleTypeIsAllowed slot in its five GlobalObjectMethodTable initializers). bun bd against this PR's autobuild-preview-pr-614-3db1d92e debug-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

  • 64168e4d90 GlobalObjectMethodTable (runtime/GlobalObjectMethodTable.h) gains bool (*moduleTypeIsAllowed)(ScriptFetchParameters::Type) between shouldInterruptScriptBeforeTimeout and moduleLoaderImportModule, so every positional initializer of the table needs a new entry (upstream jsc.cpp and JSGlobalObject::baseGlobalObjectMethodTable pass nullptr). JSModuleLoader::importModule and hostLoadImportedModule always allow None, JavaScript, WebAssembly, JSON and Text, and for any other ScriptFetchParameters::Type they 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=323170
  • 5f14e32e57 wtf/text/CString.h adds CStringWithEncoding<CharacterType> with aliases UTF8CString, Latin1CString, ASCIICString. String::ascii() returns ASCIICString, String::latin1() returns Latin1CString, String/StringView/StringImpl::tryGetUTF8() return std::expected<UTF8CString, UTF8ConversionError>. Their data()/span() are typed (const char8_t*, const Latin1Character*), so callers that passed latin1().data() or tryGetUTF8()->data() to a const char* API must use characters(), byteCast<char>(span()), or bind to const CString&. utf8() still returns plain CString. https://bugs.webkit.org/show_bug.cgi?id=323408
  • 19cfe1ed98 assertIsCurrent(const RunLoop&) in wtf/RunLoop.h is now RELEASE_ASSERT(runLoop.isCurrent()) in all build types and releaseAssertIsCurrent() is removed. https://bugs.webkit.org/show_bug.cgi?id=323572

Runtime and builtins

RegExp (Yarr)

JIT (Baseline, DFG, FTL, B3)

WebAssembly

GC and memory

WTF and bmalloc

Build system and platform

Reverted within the range

WebCore-only or no effect on JSC embedders

6f6d92eda1, fcef99916e, edc74c3eeb, ab7189f839, 194d557d4f, 2391a5cb88, 3e12766ced, 4b78955e0d, 3821585ac8, 67c93bbc4b.

amarchenko and others added 30 commits September 4, 2026 16:48
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
…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
revert-bot and others added 12 commits September 9, 2026 18:14
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
@github-actions

Copy link
Copy Markdown

Preview Builds

Commit Release Date
3db1d92e autobuild-preview-pr-614-3db1d92e 2026-09-10 06:33:49 UTC

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no issues

No high-confidence issues detected in this change.

@sosukesuzuki
sosukesuzuki merged commit 4b9ff99 into main Sep 10, 2026
48 checks passed
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).
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.