Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/WebKit/WebKit
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jul 4, 2024
2 parents b26873f + e5a7357 commit 7b32081
Show file tree
Hide file tree
Showing 2,942 changed files with 527,175 additions and 30,530 deletions.
7 changes: 7 additions & 0 deletions JSTests/microbenchmarks/double-to-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function test(num) {
return num + 'px';
}
noInline(test);

for (var i = 0; i < 1e6; ++i)
test(i + 30.4);
12 changes: 12 additions & 0 deletions JSTests/stress/double-to-string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}

function test(num) {
return num + 'px';
}
noInline(test);

for (var i = 0; i < 1e6; ++i)
shouldBe(test(i + 30.4), (i + 30.4) + 'px');
3 changes: 0 additions & 3 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -7542,10 +7542,7 @@ imported/w3c/web-platform-tests/svg/painting/reftests/markers-orient-002.svg [ I
imported/w3c/web-platform-tests/svg/painting/reftests/paint-context-001.svg [ ImageOnlyFailure ]
imported/w3c/web-platform-tests/svg/painting/reftests/paint-context-002.svg [ ImageOnlyFailure ]

# tests added with webkit.org/b/272414
webkit.org/b/272415 imported/w3c/web-platform-tests/svg/path/property/marker-path.svg [ ImageOnlyFailure ]
webkit.org/b/272416 imported/w3c/web-platform-tests/svg/path/property/mpath.svg [ ImageOnlyFailure ]
webkit.org/b/272417 imported/w3c/web-platform-tests/svg/path/property/priority.svg [ ImageOnlyFailure ]

# 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 ]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<style>
div {
font-family: Ahem;
font-size: 20px;
}
</style>
<div>X X</div>
<div>X X</div>
<div>X X</div>
<div>X X</div>
<div>X X</div>
47 changes: 47 additions & 0 deletions LayoutTests/fast/dynamic/block-inside-span-gets-removed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<style>
div {
font-family: Ahem;
font-size: 20px;
}
</style>
<div>
X<span>
<div class=replace_this>Y</div>
</span>
<div></div>
</div>

<div>
<div></div>
X<span>
<div class=replace_this>Y</div>
</span>
</div>

<div>
X<span>
<div class=replace_this>Y</div>
</span>
<div></div>
<div></div>
</div>

<div>
X<span>
<span>
<div class=replace_this>Y</div>
</span>
</span>
</div>

<div>
<span>
<div class=replace_this>Y</div>
</span>X
</div>
<script>
document.body.offsetHeight;
[...document.getElementsByClassName("replace_this")].forEach(replaceThis => {
replaceThis.replaceWith(document.createElement("span").textContent = "X");
});
</script>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CONSOLE MESSAGE: window.styleMedia is deprecated draft version of window.matchMedia API that is not implemented in Firefox and will be removed from the web platform in future.
CONSOLE MESSAGE: window.styleMedia is a deprecated draft version of window.matchMedia API, and it will be removed in the future.

PASS For attributes, each copy of the accessor property has distinct built-in function objects for its getters and setters.

Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

FAIL Unsafe eval violation sample is clipped to 40 characters. assert_throws_js: function "_ => {
eval("evil = '1234567890123456789012345678901234567890';");
}" did not throw
PASS Unsafe eval violation sample is clipped to 40 characters.
FAIL Function constructor - the other kind of eval - is clipped. assert_throws_js: function "_ => {
new Function("a", "b", "return '1234567890123456789012345678901234567890';");
}" did not throw
FAIL Trusted Types violation sample is clipped to 40 characters excluded the sink name. assert_equals: expected "Element innerHTML|1234567890123456789012345678901234567890" but got "Element innerHTML|1234567890123456789012"
PASS Trusted Types violation sample is clipped to 40 characters excluded the sink name.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!DOCTYPE html><!-- webkit-test-runner [ jscOptions=--useTrustedTypes=true ] -->
<html>
<head>
<script src="/resources/testharness.js"></script>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<title>CSS Basic User Interface Test: transparent accent color</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<style>

.container {
border: solid orange;
padding: 1ch;
margin: 1ch;
float: left;
}

input, #extract-canvas { color-scheme: light; }
#extract-canvas { background-color: canvas; }
#t3 { background: orange; }

</style>

<p>Test passes if in each box below, you see a pair of identically colored check-boxes.

<div id="extract-canvas"></div>
<div id=t1 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t2 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t3 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<script>

const testColors = [[255,0,0,0], [0,0,255,0.5], [0,0,255,0.5]];

function getColorComponents(color) {
return color.substring(color.indexOf("(") + 1).replace(/\s/g,"").split(",").map(parseFloat);
}

function constructCSSColor(components) {
return (components.length == 4 ? "rgba(" : "rgb(") + components.join(", ") + ")";
}

function computeExpectedColor(canvasColor, colorWithAlpha) {
const expected = [];
for (let i = 0; i < 3; i++)
expected.push(canvasColor[i] - canvasColor[i] * colorWithAlpha[3] + colorWithAlpha[i] * colorWithAlpha[3]);
return expected;
}

const canvasColorComponents = getColorComponents(getComputedStyle(document.getElementById("extract-canvas")).backgroundColor);
for (const [i, container] of document.querySelectorAll(".container").entries()) {
container.getElementsByClassName("test")[0].style.accentColor = constructCSSColor(computeExpectedColor(canvasColorComponents, testColors[i]));
container.getElementsByClassName("ref")[0].style.accentColor = constructCSSColor(computeExpectedColor(canvasColorComponents, testColors[i]));
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<title>CSS Basic User Interface Test: transparent accent color</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<link rel="match" href="reference/transparent-accent-color-001-ref.html">
<meta name="assert" content="If the color supplied is partially or fully transparent, it is precomposed over the color of the light mode canvas.">
<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-450">
<style>

.container {
border: solid orange;
padding: 1ch;
margin: 1ch;
float: left;
}

input, #extract-canvas { color-scheme: light; }
#extract-canvas { background-color: canvas; }
#t3 { background: orange; }

</style>

<p>Test passes if in each box below, you see a pair of identically colored check-boxes.

<div id="extract-canvas"></div>
<div id=t1 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t2 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t3 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<script>

const testColors = [[255,0,0,0], [0,0,255,0.5], [0,0,255,0.5]];

function getColorComponents(color) {
return color.substring(color.indexOf("(") + 1).replace(/\s/g,"").split(",").map(parseFloat);
}

function constructCSSColor(components) {
return (components.length == 4 ? "rgba(" : "rgb(") + components.join(", ") + ")";
}

function computeExpectedColor(canvasColor, colorWithAlpha) {
const expected = [];
for (let i = 0; i < 3; i++)
expected.push(canvasColor[i] - canvasColor[i] * colorWithAlpha[3] + colorWithAlpha[i] * colorWithAlpha[3]);
return expected;
}

const canvasColorComponents = getColorComponents(getComputedStyle(document.getElementById("extract-canvas")).backgroundColor);
for (const [i, container] of document.querySelectorAll(".container").entries()) {
container.getElementsByClassName("test")[0].style.accentColor = constructCSSColor(testColors[i]);
container.getElementsByClassName("ref")[0].style.accentColor = constructCSSColor(computeExpectedColor(canvasColorComponents, testColors[i]));
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<title>CSS Basic User Interface Test: transparent accent color</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<style>

.container {
border: solid orange;
padding: 1ch;
margin: 1ch;
float: left;
}

input, #extract-canvas { color-scheme: dark; }
#extract-canvas { background-color: canvas; }
#t3 { background: orange; }

</style>

<p>Test passes if in each box below, you see a pair of identically colored check-boxes.

<div id="extract-canvas"></div>
<div id=t1 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t2 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t3 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<script>

const testColors = [[255,0,0,0], [0,0,255,0.5], [0,0,255,0.5]];

function getColorComponents(color) {
return color.substring(color.indexOf("(") + 1).replace(/\s/g,"").split(",").map(parseFloat);
}

function constructCSSColor(components) {
return (components.length == 4 ? "rgba(" : "rgb(") + components.join(", ") + ")";
}

function computeExpectedColor(canvasColor, colorWithAlpha) {
const expected = [];
for (let i = 0; i < 3; i++)
expected.push(canvasColor[i] - canvasColor[i] * colorWithAlpha[3] + colorWithAlpha[i] * colorWithAlpha[3]);
return expected;
}

const canvasColorComponents = getColorComponents(getComputedStyle(document.getElementById("extract-canvas")).backgroundColor);
for (const [i, container] of document.querySelectorAll(".container").entries()) {
container.getElementsByClassName("test")[0].style.accentColor = constructCSSColor(computeExpectedColor(canvasColorComponents, testColors[i]));
container.getElementsByClassName("ref")[0].style.accentColor = constructCSSColor(computeExpectedColor(canvasColorComponents, testColors[i]));
}

</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<title>CSS Basic User Interface Test: transparent accent color</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-ui-4/#widget-accent">
<link rel="match" href="reference/transparent-accent-color-002-ref.html">
<meta name="assert" content="If the color supplied is partially or fully transparent, it is precomposed over the color of the dark mode canvas.">
<meta name="fuzzy" content="maxDifference=0-1; totalPixels=0-450">
<style>

.container {
border: solid orange;
padding: 1ch;
margin: 1ch;
float: left;
}

input, #extract-canvas { color-scheme: dark; }
#extract-canvas { background-color: canvas; }
#t3 { background: orange; }

</style>

<p>Test passes if in each box below, you see a pair of identically colored check-boxes.

<div id="extract-canvas"></div>
<div id=t1 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t2 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<div id=t3 class="container">
<input class=test type=checkbox checked>
<input class=ref type=checkbox checked>
</div>

<script>

const testColors = [[255,0,0,0], [0,0,255,0.5], [0,0,255,0.5]];

function getColorComponents(color) {
return color.substring(color.indexOf("(") + 1).replace(/\s/g,"").split(",").map(parseFloat);
}

function constructCSSColor(components) {
return (components.length == 4 ? "rgba(" : "rgb(") + components.join(", ") + ")";
}

function computeExpectedColor(canvasColor, colorWithAlpha) {
const expected = [];
for (let i = 0; i < 3; i++)
expected.push(canvasColor[i] - canvasColor[i] * colorWithAlpha[3] + colorWithAlpha[i] * colorWithAlpha[3]);
return expected;
}

const canvasColorComponents = getColorComponents(getComputedStyle(document.getElementById("extract-canvas")).backgroundColor);
for (const [i, container] of document.querySelectorAll(".container").entries()) {
container.getElementsByClassName("test")[0].style.accentColor = constructCSSColor(testColors[i]);
container.getElementsByClassName("ref")[0].style.accentColor = constructCSSColor(computeExpectedColor(canvasColorComponents, testColors[i]));
}

</script>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

FAIL window.stop() signals event.signal assert_true: expected true got false
PASS window.stop() signals event.signal

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

FAIL navigate() promises to 204s never settle assert_equals: expected 1 but got 2
FAIL navigate() promises to 205s never settle assert_equals: expected 1 but got 2
FAIL navigate() promises to Content-Disposition: attachment responses never settle assert_equals: expected 1 but got 2
FAIL navigate() promises to 204s never settle assert_equals: expected "http://localhost:8800/common/blank.html" but got "http://localhost:8800/common/blank.html?pipe=status(204)"
FAIL navigate() promises to 205s never settle assert_equals: expected "http://localhost:8800/common/blank.html" but got "http://localhost:8800/common/blank.html?pipe=status(205)"
PASS navigate() promises to Content-Disposition: attachment responses never settle

Loading

0 comments on commit 7b32081

Please sign in to comment.