Skip to content

Commit

Permalink
Merge pull request #53 from oven-sh/merge-upstream
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
dylan-conway committed May 2, 2024
2 parents f0fbde9 + 5222e74 commit ce4af76
Show file tree
Hide file tree
Showing 2,473 changed files with 13,052 additions and 65,332 deletions.
2 changes: 1 addition & 1 deletion Configurations/Version.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

MAJOR_VERSION = 619;
MINOR_VERSION = 1;
TINY_VERSION = 11;
TINY_VERSION = 12;
MICRO_VERSION = 0;
NANO_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(TINY_VERSION);
Expand Down
12 changes: 12 additions & 0 deletions JSTests/stress/ToPropertyKeyOrNumber-AI-should-include-number.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//@ requireOptions("--jitPolicyScale=0", "--useConcurrentJIT=0")

function opt() {
function f(){
}((Error)[flag?0:(WebAssembly)])++
}
flag=true
try{opt()}catch{}
flag=false
try{opt()}catch{}
flag=true
try{opt()}catch{}
4 changes: 4 additions & 0 deletions JSTests/stress/regexp-lookbehind.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,7 @@ testRegExp(/(?<=(^v|\sv?|Rev)+)(?:(?:\d+)\.){2}(?:\d+)/, "Rev v v1.0.123", ["1.0

// Test 96
testRegExp(/(?<=(ab*?))c/i, "Xbc", null);
testRegExp(/(?<!(ab*?))c/i, "A", null);
testRegExp(/(?<!(AB*?))c/, "A", null);
testRegExp(/(?<!(ab*))c/i, "A", null);
testRegExp(/(?<!(AB*))c/, "A", null);
20 changes: 5 additions & 15 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,10 @@ imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/anonymous-b
imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/inline-level.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/rendering/widgets/button-layout/propagate-text-decoration.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/rendering/widgets/the-select-element/option-checked-styling.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/rendering/widgets/the-select-element/option-add-label-quirks.html [ Failure ]

#[ iOS MacOS ] imported/w3c/web-platform-tests/html/rendering/widgets/the-select-element/option-add-label-quirks.html(layout-tests) is a constant IMAGE failure
imported/w3c/web-platform-tests/html/rendering/widgets/the-select-element/option-add-label-quirks.html [ Failure ImageOnlyFailure ]

imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/the-fieldset-and-legend-elements/legend-painting-order.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/input-image-inline-alt.html [ ImageOnlyFailure ]
webkit.org/b/252594 imported/w3c/web-platform-tests/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/video-inline-size-containment-no-crash.html [ Skip ]
Expand Down Expand Up @@ -2434,10 +2437,8 @@ webkit.org/b/233543 imported/w3c/web-platform-tests/css/css-masking/mask-image/m
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-clip-1.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-clip-2.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-composite-2c.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-image-2.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-image-3f.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-image-3g.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-image-3h.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-image-3i.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-image-data-url-image.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-masking/mask-image/mask-mode-d.html [ ImageOnlyFailure ]
Expand Down Expand Up @@ -4714,10 +4715,6 @@ webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/lch-010.html [
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-009.html [ ImageOnlyFailure ]
webkit.org/b/245347 imported/w3c/web-platform-tests/css/css-color/oklch-010.html [ ImageOnlyFailure ]

# Tests assume hsl() gets clipped, which is no longer true.
webkit.org/b/272940 imported/w3c/web-platform-tests/css/css-color/t424-hsl-clip-outside-gamut-b.xht [ ImageOnlyFailure ]
webkit.org/b/272940 imported/w3c/web-platform-tests/css/css-color/t425-hsla-clip-outside-device-gamut-b.xht [ ImageOnlyFailure ]

# currentColor support in relative color syntax.
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-a98rgb-01.html [ ImageOnlyFailure ]
webkit.org/b/245970 imported/w3c/web-platform-tests/css/css-color/relative-currentcolor-displayp3-01.html [ ImageOnlyFailure ]
Expand Down Expand Up @@ -6938,7 +6935,6 @@ imported/w3c/web-platform-tests/navigation-api/updateCurrentEntry-method/locatio
# Reftest failures:
imported/w3c/web-platform-tests/css/css-view-transitions/content-with-clip-root.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/content-with-transform-old-image.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/dialog-in-top-layer-during-transition-new.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/fractional-box-new.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/fractional-box-old.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-old.html [ ImageOnlyFailure ]
Expand All @@ -6957,7 +6953,7 @@ imported/w3c/web-platform-tests/css/css-view-transitions/root-to-shared-animatio
imported/w3c/web-platform-tests/css/css-view-transitions/snapshot-containing-block-absolute.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/span-with-overflowing-text.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/content-with-transform-new-image.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/dialog-in-top-layer-during-transition-old.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/dialog-in-rtl-iframe.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-new.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/massive-element-below-viewport-offscreen-new.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/massive-element-below-viewport-offscreen-old.html [ ImageOnlyFailure ]
Expand All @@ -6973,15 +6969,11 @@ imported/w3c/web-platform-tests/css/css-view-transitions/snapshot-containing-blo
imported/w3c/web-platform-tests/css/css-view-transitions/fractional-translation-from-position.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/scroller-child.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/scroller.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-view-transitions/content-with-clip.html [ ImageOnlyFailure ]

# Timeouts
imported/w3c/web-platform-tests/css/css-view-transitions/iframe-transition.sub.html [ Skip ]
imported/w3c/web-platform-tests/css/css-view-transitions/pseudo-get-computed-style.html [ Skip ]
imported/w3c/web-platform-tests/css/css-view-transitions/pseudo-computed-style-stays-in-sync-with-new-element.html [ Skip ]
imported/w3c/web-platform-tests/css/css-view-transitions/fragmented-during-transition-skips.html [ Skip ]
imported/w3c/web-platform-tests/css/css-view-transitions/root-element-display-none-during-transition-crash.html [ Skip ]
imported/w3c/web-platform-tests/css/css-view-transitions/iframe-transition-destroyed-document-crash.html [ Skip ]
imported/w3c/web-platform-tests/css/css-view-transitions/transition-in-hidden-page.html [ Skip ]

# Flakes
Expand Down Expand Up @@ -7462,5 +7454,3 @@ webkit.org/b/272417 imported/w3c/web-platform-tests/svg/path/property/priority.s

# re-import css/css-align WPT failure
webkit.org/b/271692 imported/w3c/web-platform-tests/css/css-align/blocks/align-content-block-break-overflow-020.html [ ImageOnlyFailure ]

webkit.org/b/273233 imported/w3c/web-platform-tests/css/css-fonts/matching/font-unicode-PUA-primary-font.html [ Skip ]
1 change: 0 additions & 1 deletion LayoutTests/accessibility-isolated-tree/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ accessibility/dynamically-ignored-canvas.html [ Failure ]
accessibility/frame-disconnect-textmarker-cache-crash.html [ Failure ]
accessibility/keyevents-for-actions-mimic-real-key-events.html [ Failure ]
accessibility/keyevents-posted-for-increment-actions.html [ Failure ]
accessibility/mac/area-with-aria-label.html [ Failure ]
accessibility/mac/document-attributes.html [ Failure ]
accessibility/mac/focus-setting-selection-syncronizing-not-clearing.html [ Failure ]
# Fails because of (1) stale focus ID for the iFrame and (2) iFrame #2 being ignored.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

// Fails because:
// 1. We fail to emit a newline before entering a table, right after "Foo text" (TextIterator::advance() -> TextIterator::handleNonTextNode() -> TextIterator::representNodeOffsetZero() -> shouldEmitNewlineBeforeNode() returns true)
// 2. We don't emit spaces between cells
// 3. We miss the table caption text entirely (it is rendered and selectable text, so we should be including it)
// 2. We don't emit spaces between cells. This happens because we ignore the whitespace-only RenderText that would generate these space text runs for us (they are ignored because they are whitespace only).
// Generating spaces for these runs happens in TextIterator::handleTextRun() at: if (isNewlineOrTab(rendererText[runStart])) { emitCharacter(' ', ...) }
output += `Web area string for start-to-end text marker range:\n\n${webArea.stringForTextMarkerRange(textMarkerRange)}\n`;
document.getElementById("test-contents").style.display = "none";
debug(output);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ This test ensures elements with CSS display: contents have the correct role.

<dfn class="testcase" id="dfn"></dfn>
AXRole: AXGroup
computedRoleString: definition
AXSubrole: AXDefinition
computedRoleString: term
AXSubrole: AXTerm

<div class="testcase" id="div"></div>
AXRole: AXGroup
Expand Down
26 changes: 26 additions & 0 deletions LayoutTests/accessibility/dynamic-table-caption-expected.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
This test ensures we maintain the right accessibility text for tables after dynamic caption changes.

AXTitle: Initial caption
AXDescription:
AXHelp:
PASS: text.includes('Initial caption') === true
AXTitle: Second caption
AXDescription:
AXHelp:
PASS: text.includes('Second caption') === true
AXTitle:
AXDescription:
AXHelp:
PASS: !text.includes('caption') === true
AXTitle: Final caption
AXDescription:
AXHelp:
PASS: text.includes('Final caption') === true

PASS successfullyParsed is true

TEST COMPLETE
Final caption
Author Title
Stephen Hawking A Brief History of Time
Carl Sagan Cosmos
79 changes: 79 additions & 0 deletions LayoutTests/accessibility/dynamic-table-caption.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/accessibility-helper.js"></script>
<script src="../resources/js-test.js"></script>
</head>
<body id="body">

<table id="table">
<caption id="caption">Initial caption</caption>
<thead>
<tr>
<th>Author</th>
<th>Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>Stephen Hawking</td>
<td>A Brief History of Time</td>
</tr>
<tr>
<td>Carl Sagan</td>
<td>Cosmos</td>
</tr>
</tbody>
</table>

<script>
var output = "This test ensures we maintain the right accessibility text for tables after dynamic caption changes.\n\n";

if (window.accessibilityController) {
window.jsTestIsAsync = true;

var table = accessibilityController.accessibleElementById("table");
var text = platformTextAlternatives(table);
output += `${text}\n`;
output += expect("text.includes('Initial caption')", "true");

setTimeout(async function() {
// Wait for page updates caused by initial load to settle down so we don't pass the test by accident.
await sleep(20);
document.getElementById("caption").innerText = "Second caption";

await waitFor(() => {
text = platformTextAlternatives(table);
return text.includes("Second caption");
});
output += `${text}\n`;
output += expect("text.includes('Second caption')", "true");

document.getElementById("body").appendChild(document.getElementById("caption"));
document.getElementById("caption").innerText = "Final caption";

await waitFor(() => {
text = platformTextAlternatives(table);
return !text.includes("caption");
});
output += `${text}\n`;
output += expect("!text.includes('caption')", "true");

let domTable = document.getElementById("table");
domTable.insertBefore(document.getElementById("caption"), domTable.firstElementChild);

await waitFor(() => {
text = platformTextAlternatives(table);
return text.includes("Final caption");
});
output += `${text}\n`;
output += expect("text.includes('Final caption')", "true");

debug(output);
finishJSTest();
}, 0);
}
</script>
</body>
</html>

Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@

This tests that aria-label works on area elements.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

PASS: accessibilityController.accessibleElementById('btn_prev').description === 'AXDescription: Previous'
PASS: accessibilityController.accessibleElementById('btn_next').description === 'AXDescription: Next'

PASS accessibilityController.focusedElement.description is 'AXDescription: Previous'
PASS accessibilityController.focusedElement.description is 'AXDescription: Next'
PASS successfullyParsed is true

TEST COMPLETE
Expand Down
26 changes: 9 additions & 17 deletions LayoutTests/accessibility/mac/area-with-aria-label.html
Original file line number Diff line number Diff line change
@@ -1,34 +1,26 @@
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script src="../../resources/accessibility-helper.js"></script>
<script src="../../resources/js-test.js"></script>
</head>
<body id="body">
<body>

<map name="forwardbackward">
<area id="btn_prev" role="button" alt="" tabindex="0" aria-label="Previous" shape="rect" coords="2,35,21,47" href="#">
<area id="btn_next" role="button" alt="" tabindex="0" aria-label="Next" shape="rect" coords="56,35,75,47" href="#">
</map>
<img id="fb" src="#" border="1" width="76" height="76" usemap="#forwardbackward" alt="">

<p id="description"></p>
<div id="console"></div>

<script>
let output = "This tests that aria-label works on area elements.\n\n";

description("This tests that aria-label works on area elements.");

if (window.accessibilityController) {

document.getElementById("btn_prev").focus();
shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Previous'");

document.getElementById("btn_next").focus();
shouldBe("accessibilityController.focusedElement.description", "'AXDescription: Next'");
}
if (window.accessibilityController) {
output += expect("accessibilityController.accessibleElementById('btn_prev').description", "'AXDescription: Previous'");
output += expect("accessibilityController.accessibleElementById('btn_next').description", "'AXDescription: Next'");

debug(output);
}
</script>

<script src="../../resources/js-test-post.js"></script>
</body>
</html>
92 changes: 46 additions & 46 deletions LayoutTests/accessibility/mac/malformed-table-expected.txt
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
This tests that contents in malformed tables are accessible.

PASS: table1.role === 'AXRole: AXTable'
PASS: table2.role === 'AXRole: AXTable'
PASS: table1ColumnCount === 2
PASS: table1RowCount === 2
PASS: table2ColumnCount === 2
PASS: table2RowCount === 2
PASS: table1.childAtIndex(0).domIdentifier === 'caption1'
PASS: table2.childAtIndex(0).domIdentifier === 'caption2'

Checking rows for table 1
PASS: rowA.isEqual(rowB) === true
PASS: rowA.role === 'AXRole: AXRow'
PASS: rowA.isEqual(rowB) === true
PASS: rowA.role === 'AXRole: AXRow'

Checking rows for table 2
PASS: rowA.isEqual(rowB) === true
PASS: rowA.role === 'AXRole: AXRow'
PASS: rowA.isEqual(rowB) === true
PASS: rowA.role === 'AXRole: AXRow'

Checking cells for table 1
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'

Checking cells for table 2
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'
PASS: cellA.isEqual(cellB) === true
PASS: cellA.role === 'AXRole: AXCell'

PASS successfullyParsed is true

TEST COMPLETE
Table with CSS and ARIA
Heading one Heading two
a b
Table with CSS and no ARIA
Heading one Heading two
a b
This tests that contents in malformed tables are accessible.

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".


PASS table1.role is 'AXRole: AXTable'
PASS table2.role is 'AXRole: AXTable'
PASS table1ColumnCount is 2
PASS table1RowCount is 2
PASS table2ColumnCount is 2
PASS table2RowCount is 2

Check rows for Table1
PASS rowa.isEqual(rowb) is true
PASS rowa.role is 'AXRole: AXRow'
PASS rowa.isEqual(rowb) is true
PASS rowa.role is 'AXRole: AXRow'

Check rows for Table2
PASS rowa.isEqual(rowb) is true
PASS rowa.role is 'AXRole: AXRow'
PASS rowa.isEqual(rowb) is true
PASS rowa.role is 'AXRole: AXRow'

Check cells for Table1
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'

Check cells for Table2
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS cella.isEqual(cellb) is true
PASS cella.role is 'AXRole: AXCell'
PASS successfullyParsed is true

TEST COMPLETE

0 comments on commit ce4af76

Please sign in to comment.