Skip to content

Commit 3550f60

Browse files
committed
2 parents ac190c6 + c22ccfd commit 3550f60

File tree

608 files changed

+5868
-3948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

608 files changed

+5868
-3948
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ runDefault("--useConcurrentJIT=0", "--jitPolicyScale=0.5")
2+
3+
function test(value) {
4+
}
5+
noInline(test);
6+
7+
const v19 = [11, 22, 33, 44, 55, 66, 77];
8+
for (const v20 in v19) {
9+
const v24 = new Proxy({}, {});
10+
v19.__proto__ = v24;
11+
test(v20)
12+
for(let i=0; i<200; i++){}
13+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import * as assert from "../assert.js";
2+
import { compile, instantiate } from "./wast-wrapper.js";
3+
4+
let wat = `(module
5+
(type $vec (array i32))
6+
7+
(func $new (export "new") (param i32) (result (ref $vec))
8+
i32.const 0
9+
local.get 0
10+
array.new $vec
11+
)
12+
)`
13+
14+
let instance = await instantiate(wat);
15+
let ui32Max = 0xFFFFFFFF;
16+
17+
// Prime the LocalAllocator so we hit the bump path rather than going straight to the slow path.
18+
instance.exports.new(2);
19+
for (let i = 0; i < 1000; ++i) {
20+
try {
21+
instance.exports.new(ui32Max - i);
22+
} catch {
23+
continue;
24+
}
25+
throw new Error("allocation shouldn't succeed");
26+
}

LayoutTests/TestExpectations

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7877,3 +7877,6 @@ imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/hidden-until-f
78777877

78787878
# This test hits an assert in debug
78797879
webkit.org/b/290133 [ Debug ] svg/dom/SVGGeometry-isPointInFill-with-null-path.html [ Skip ]
7880+
7881+
# The color input only has a swatch overlay on macOS
7882+
fast/forms/color/input-color-swatch-overlay-appearance.html [ Skip ]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
This test ensures we include the AXAttachment attribute in attributed strings created from ranges that include images.
2+
3+
Attributes in range {0, 1}:
4+
AXAttachment: {present}
5+
Attributes in range {1, 3}:
6+
AXFont: {
7+
AXFontFamily = Times;
8+
AXFontName = "Times-Roman";
9+
AXFontSize = 16;
10+
}
11+
AXForegroundColor: (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1) ( 0 0 0 1 )
12+
AXBackgroundColor: (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1) ( 0 0 0 0 )
13+
[ATTACHMENT]xyz
14+
PASS successfullyParsed is true
15+
16+
TEST COMPLETE
17+
xyz
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2+
<html>
3+
<head>
4+
<script src="../../resources/accessibility-helper.js"></script>
5+
<script src="../../resources/js-test.js"></script>
6+
</head>
7+
<body>
8+
9+
<div id="wrapper" role="group" aria-label="wrapper text">
10+
<img src="/Users/twilco/projects/OpenSource/LayoutTests/accessibility/resources/cake.png"/>xyz
11+
</div>
12+
13+
<script>
14+
var output = "This test ensures we include the AXAttachment attribute in attributed strings created from ranges that include images.\n\n";
15+
16+
if (window.accessibilityController) {
17+
window.jsTestIsAsync = true;
18+
19+
var webarea = accessibilityController.rootElement.childAtIndex(0);
20+
21+
setTimeout(async function() {
22+
output += webarea.attributedStringForTextMarkerRange(await selectElementTextById("wrapper", webarea)).replace(String.fromCharCode(65532), "[ATTACHMENT]");
23+
24+
debug(output);
25+
finishJSTest();
26+
}, 0);
27+
28+
29+
}
30+
</script>
31+
</body>
32+
</html>
33+
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This test ensures we can create valid text marker ranges from positions adjacent to replaced elements.
2+
3+
PASS: webarea.stringForTextMarkerRange(range) === ''
4+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === ''
5+
PASS: webarea.stringForTextMarkerRange(range) === 'x'
6+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === 'x'
7+
PASS: webarea.stringForTextMarkerRange(range) === 'y'
8+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === 'y'
9+
PASS: webarea.stringForTextMarkerRange(range) === 'z'
10+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === 'z'
11+
PASS: webarea.stringForTextMarkerRange(range) === 'z'
12+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === 'z'
13+
PASS: webarea.stringForTextMarkerRange(range) === 'y'
14+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === 'y'
15+
PASS: webarea.stringForTextMarkerRange(range) === 'x'
16+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === 'x'
17+
PASS: webarea.stringForTextMarkerRange(range) === ''
18+
PASS: webarea.attributedStringForTextMarkerRange(range).slice(-1) === ''
19+
20+
PASS successfullyParsed is true
21+
22+
TEST COMPLETE
23+
xyz
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2+
<html>
3+
<head>
4+
<script src="../../resources/accessibility-helper.js"></script>
5+
<script src="../../resources/js-test.js"></script>
6+
</head>
7+
<body>
8+
9+
<div id="editable" contenteditable="true"><img src="../resources/cake.png" />xyz</div>
10+
11+
<script>
12+
var output = "This test ensures we can create valid text marker ranges from positions adjacent to replaced elements.\n\n";
13+
// The bug that inspired this fix was that for text selection changes adjacent to replaced elements (like images), we
14+
// would post an AXSelectedTextChanged notification but fail to include a valid text marker range. This happened thanks
15+
// to a bug in how we text marker ranges when |shouldCreateAXThreadCompatibleMarkers()| is true. This meant VoiceOver
16+
// wasn't announcing characters as you moved between them.
17+
18+
var range;
19+
var webarea;
20+
var editable = document.getElementById("editable");
21+
async function select(domNode, startIndex, endIndex, expectedCharacter, searchBackwards) {
22+
const selection = window.getSelection();
23+
selection.removeAllRanges();
24+
25+
await waitFor(() => {
26+
const selectedRange = webarea.selectedTextMarkerRange();
27+
return !webarea.isTextMarkerRangeValid(selectedRange);
28+
});
29+
30+
const domRange = document.createRange();
31+
domRange.setStart(domNode, startIndex);
32+
domRange.setEnd(domNode, endIndex);
33+
selection.addRange(domRange);
34+
35+
let selectedRange;
36+
await waitFor(() => {
37+
selectedRange = webarea.selectedTextMarkerRange();
38+
return webarea.isTextMarkerRangeValid(selectedRange);
39+
});
40+
41+
let start, end;
42+
if (searchBackwards) {
43+
end = webarea.endTextMarkerForTextMarkerRange(selectedRange);
44+
start = webarea.previousTextMarker(end);
45+
} else {
46+
start = webarea.startTextMarkerForTextMarkerRange(selectedRange);
47+
end = webarea.nextTextMarker(start);
48+
}
49+
50+
range = webarea.textMarkerRangeForMarkers(start, end);
51+
output += expect("webarea.stringForTextMarkerRange(range)", `'${expectedCharacter}'`)
52+
output += expect("webarea.attributedStringForTextMarkerRange(range).slice(-1)", `'${expectedCharacter}'`)
53+
}
54+
55+
if (window.accessibilityController) {
56+
window.jsTestIsAsync = true;
57+
58+
webarea = accessibilityController.rootElement.childAtIndex(0);
59+
setTimeout(async function() {
60+
// |<img>xyz
61+
await select(editable, 0, 0, String.fromCharCode(65532));
62+
// <img>|xyz
63+
await select(editable, 1, 1, "x");
64+
// <img>x|yz
65+
await select(editable.childNodes[1], 1, 1, "y");
66+
// <img>xy|z
67+
await select(editable.childNodes[1], 2, 2, "z");
68+
// <img>xyz|
69+
await select(editable.childNodes[1], 3, 3, "z", /* searchBackwards */ true);
70+
// <img>xy|z
71+
await select(editable.childNodes[1], 2, 2, "y", /* searchBackwards */ true);
72+
// <img>x|yz
73+
await select(editable.childNodes[1], 1, 1, "x", /* searchBackwards */ true);
74+
// <img>|xyz
75+
await select(editable.childNodes[1], 0, 0, String.fromCharCode(65532), /* searchBackwards */ true);
76+
77+
debug(output);
78+
finishJSTest();
79+
}, 0);
80+
}
81+
</script>
82+
</body>
83+
</html>
84+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This test passes if WebKit does not crash.
2+
PASS.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<style>
5+
table { -webkit-column-count: 3; transform-origin: 81; column-span: all; }
6+
.multicol { -webkit-column-count: 7; }
7+
</style>
8+
<script>
9+
if (window.testRunner) {
10+
testRunner.waitUntilDone();
11+
testRunner.dumpAsText();
12+
}
13+
function runTest() {
14+
getSelection().deleteFromDocument();
15+
setTimeout(() => {
16+
let count = location.search ? +location.search.substring(1) : 1;
17+
if (count >= 20) {
18+
document.open();
19+
document.write('This test passes if WebKit does not crash.<br>PASS.');
20+
document.close();
21+
if (window.testRunner)
22+
testRunner.notifyDone();
23+
} else
24+
location.href = '?' + (count + 1);
25+
}, 10);
26+
}
27+
28+
function selectAll() {
29+
document.execCommand("selectAll", false);
30+
}
31+
32+
</script>
33+
</head>
34+
<body onload=runTest()>
35+
<div class="multicol" tabindex="1" autofocus>
36+
<table>
37+
<th>
38+
<table>a</table>
39+
</th>
40+
<tr>b</tr>
41+
</table>
42+
</div>
43+
<li class="multicol">
44+
<iframe allowfullscreen="true" srcdoc=")#&quot;~KVv8CRs" loopstart="1">c</iframe>
45+
</li>
46+
<details open="true" ontoggle="selectAll()">d</details>
47+
</body>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PASS if no crash.

0 commit comments

Comments
 (0)