Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Oct 3, 2024
2 parents e94a0f0 + e53fce2 commit f21e2cb
Show file tree
Hide file tree
Showing 146 changed files with 2,927 additions and 692 deletions.
4 changes: 4 additions & 0 deletions JSTests/stress/get-array-length-concurrently-change-mode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//@ requireOptions("--watchdog=10000", "--watchdog-exception-ok")
// This defeats the watchdog on Windows, so we bail after 10 seconds explicitly
const start = Date.now();
function main() {
runString(`
function bar(_a) {
Expand All @@ -14,6 +16,8 @@ function main() {
}
bar('bar()');
`);
if (Date.now() - start > 10000)
return
main();
}
main();
3 changes: 2 additions & 1 deletion LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -7449,8 +7449,9 @@ imported/w3c/web-platform-tests/scroll-animations/css/scroll-timeline-inline-ori
imported/w3c/web-platform-tests/scroll-animations/scroll-timelines/custom-property.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/scroll-animations/view-timelines/range-boundary.html [ ImageOnlyFailure ]

# webkit.org/b/229520 CSS @scope unimplemented
# CSS @scope with shadow DOM
imported/w3c/web-platform-tests/css/css-cascade/scope-visited.html [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/css/css-cascade/scope-shadow-sharing.html [ ImageOnlyFailure ]

webkit.org/b/263923 animations/transition-and-animation-2.html [ Failure Pass ]

Expand Down

This file was deleted.

68 changes: 0 additions & 68 deletions LayoutTests/editing/async-clipboard/clipboard-interfaces.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ Testing thirdItem:
PASS thirdItem.types is ['text/uri-list', 'text/plain']
PASS getType("text/uri-list") resolved to ""
PASS getType("text/plain") resolved to ""
Testing fourthItem:
PASS fourthItem.types is []
PASS successfullyParsed is true

TEST COMPLETE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}), new ClipboardItem({
"text/uri-list" : Promise.resolve(""),
"text/plain" : Promise.resolve(textBlob(""))
}), new ClipboardItem({ })
})
]);
doneWritingItems = true;
});
Expand All @@ -59,9 +59,6 @@
await checkClipboardItemString(thirdItem, "text/uri-list", "");
await checkClipboardItemString(thirdItem, "text/plain", "");

debug("Testing fourthItem:");
shouldBe("fourthItem.types", "[]");

copyButton.remove();
pasteButton.remove();
finishJSTest();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AsyncOverflowScrollingEnabled=true ] -->
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AsyncOverflowScrollingEnabled=true SelectionHonorsOverflowScrolling=true ] -->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Verifies that the selection highlight is clipped to overflow scrolling container. Select all the text in the scrollable container below, scroll the container to the top, and then tap the button. Verify that a click event is dispatched on the button

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

1. Select all of the below text
Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo.

You can quote them, disagree with them, glorify or vilify them. About the only thing you can’t do is ignore them.

Because they change things. They push the human race forward. And while some may see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.


2. Then tap here
PASS Selected text
PASS handledClick became true
PASS successfullyParsed is true

TEST COMPLETE

Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true AsyncOverflowScrollingEnabled=true SelectionHonorsOverflowScrolling=true ] -->
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<script src="../../../resources/ui-helper.js"></script>
<script src="../../../resources/js-test.js"></script>
<style>
body, html {
font-size: 16px;
font-family: system-ui;
}

#target {
border: 1px solid tomato;
padding: 3px;
font-size: 24px;
}

.scrollable {
width: 300px;
height: 150px;
border: solid 1px lightgray;
border-radius: 4px;
box-sizing: border-box;
overflow-y: scroll;
line-height: 1.5em;
outline: none;
padding: 1em;
}

button {
font-size: 18px;
padding: 0.5em;
border: 0.5px solid lightgray;
border-radius: 6px;
background-color: white;
}
</style>
<script>
jsTestIsAsync = true;
handledClick = false;

addEventListener("load", async () => {
let button = document.querySelector("button");
let scroller = document.querySelector(".scrollable");

description("Verifies that the selection highlight is clipped to overflow scrolling container. Select all the text in the scrollable container below, scroll the container to the top, and then tap the button. Verify that a click event is dispatched on the button");
button.addEventListener("click", () => {
handledClick = true;
});

await UIHelper.longPressElement(document.querySelector(".scrollable"));
await UIHelper.waitForSelectionToAppear();
testPassed("Selected text");

getSelection().selectAllChildren(scroller);
await UIHelper.ensureStablePresentationUpdate();

await UIHelper.activateElement(button);
await shouldBecomeEqual("handledClick", "true");

finishJSTest();
});
</script>
</head>
<body>
<div id="description"></div>
<div class="scrollable">
<strong>1. Select all of the below text</strong>
<p>Here’s to the crazy ones. The misfits. The rebels. The troublemakers. The round pegs in the square holes. The ones who see things differently. They’re not fond of rules. And they have no respect for the status quo.</p>
<p>You can quote them, disagree with them, glorify or vilify them. About the only thing you can’t do is ignore them.</p>
<p>Because they change things. They push the human race forward. And while some may see them as the crazy ones, we see genius. Because the people who are crazy enough to think they can change the world, are the ones who do.</p>
</div>
<br>
<div><button>2. Then tap here</button></div>
<div id="console"></div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div style="color: green">This is green</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<style>
[style*="display: none;"] { display:block !important; color: green; }
</style>
<div id=t>This is green</div>
<script>
document.body.offsetTop;
t.style.display = "block";
document.body.offsetTop;
t.style.display = "none";
</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This test passes if it doesn't crash.
13 changes: 13 additions & 0 deletions LayoutTests/fast/css/grid-span-calc-negative-crash.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<style>
#c {
display: grid;
}
#e {
grid-column-start: span calc(-1);
}
</style>
<div id=c><div id=e>This test passes if it doesn't crash.</div></div>
7 changes: 7 additions & 0 deletions LayoutTests/imported/w3c/resources/resource-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,14 @@
"web-platform-tests/css/css-cascade/important-prop-ref.html",
"web-platform-tests/css/css-cascade/initial-color-background-001-ref.html",
"web-platform-tests/css/css-cascade/layer-stylesheet-sharing-ref.html",
"web-platform-tests/css/css-cascade/reference/all-green.html",
"web-platform-tests/css/css-cascade/reference/ref-filled-green-100px-square.xht",
"web-platform-tests/css/css-cascade/reference/ref-green-text.html",
"web-platform-tests/css/css-cascade/revert-layer-015-ref.html",
"web-platform-tests/css/css-cascade/scope-featureless-ref.html",
"web-platform-tests/css/css-cascade/scope-part-ref.html",
"web-platform-tests/css/css-cascade/scope-pseudo-element-ref.html",
"web-platform-tests/css/css-cascade/scope-shadow-sharing-ref.html",
"web-platform-tests/css/css-cascade/scope-visited-ref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-change-checkbox-notref.html",
"web-platform-tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-iframe-background-mismatch-used-preferred-ref.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@

PASS ClipboardItem({string, Blob}) succeeds with different types
PASS ClipboardItem() succeeds with empty options
FAIL ClipboardItem({}) fails with empty dictionary input assert_throws_js: function "() => {new ClipboardItem({});}" did not throw
FAIL ClipboardItem(Blob) fails assert_throws_js: function "() => {new ClipboardItem(blob);}" did not throw
FAIL ClipboardItem() fails with null input assert_throws_js: function "() => {new ClipboardItem(null);}" did not throw
PASS ClipboardItem({}) fails with empty dictionary input
PASS ClipboardItem(Blob) fails
PASS ClipboardItem() fails with null input
PASS ClipboardItem() fails with no input
PASS types() returns correct values
PASS getType(DOMString valid type) succeeds with correct output
PASS getType(DOMString invalid type) succeeds with correct output
PASS getType(DOMString type) rejects correctly when querying for missing type
PASS getType(DOMString valid type) converts DOMString to Blob
PASS getType(DOMString invalid type) converts DOMString to Blob
PASS supports(text/plain) returns true
PASS supports(text/html) returns true
PASS supports(image/png) returns true
PASS supports(text/uri-list) returns true
FAIL supports(image/svg+xml) returns true assert_equals: expected true but got false
FAIL supports(web foo/bar) returns true assert_equals: expected true but got false
FAIL supports(web text/html) returns true assert_equals: expected true but got false
PASS supports(web ) returns false
PASS supports(web) returns false
PASS supports(web foo) returns false
PASS supports(foo/bar) returns false
PASS supports(weB text/html) returns false
PASS supports( web text/html) returns false
PASS supports(not a/real type) returns false
PASS supports() returns false
PASS supports( ) returns false

Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,30 @@
const text = await (new Response(blob)).text();
assert_equals(text, 'xxx');
}, "getType(DOMString invalid type) converts DOMString to Blob");
</script>

[
// mandatory data types
['text/plain', true],
['text/html', true],
['image/png', true],
// optional data types
['text/uri-list', true],
['image/svg+xml', true],
['web foo/bar', true],
['web text/html', true],
// invalid types
['web ', false],
['web', false],
['web foo', false],
['foo/bar', false],
['weB text/html', false],
[' web text/html', false],
['not a/real type', false],
['', false],
[' ', false],
].forEach(([type, result]) => {
promise_test(async () => {
assert_equals(ClipboardItem.supports(type), result);
}, `supports(${type}) returns ${result ? "true" : "false"}`);
});
</script>
Loading

0 comments on commit f21e2cb

Please sign in to comment.