Skip to content

Commit 9edc021

Browse files
committed
2 parents 85b0bed + 9338c51 commit 9edc021

File tree

339 files changed

+5177
-3492
lines changed

Some content is hidden

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

339 files changed

+5177
-3492
lines changed

LayoutTests/TestExpectations

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,9 @@ imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-e
973973
imported/w3c/web-platform-tests/html/rendering/the-details-element/details-pseudo-elements-004.html [ ImageOnlyFailure ]
974974
imported/w3c/web-platform-tests/html/rendering/the-details-element/details-pseudo-elements-005.html [ ImageOnlyFailure ]
975975

976+
# https://bugs.webkit.org/show_bug.cgi?id=228843
977+
imported/w3c/web-platform-tests/html/rendering/the-details-element/auto-expand-details-text-fragment.html [ Skip ]
978+
976979
# Cross-Origin-Embedder-Policy: credentialless is not supported.
977980
imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/credentialless
978981

@@ -7945,6 +7948,8 @@ imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/hidden-until-f
79457948
imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/hidden-until-found-004.html [ ImageOnlyFailure ]
79467949
imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/hidden-until-found-005.html [ ImageOnlyFailure ]
79477950
imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/hidden-until-found-007.html [ ImageOnlyFailure ]
7951+
imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/beforematch-scroll-to-text-fragment.html [ Skip ]
7952+
imported/w3c/web-platform-tests/html/editing/the-hidden-attribute/hidden-until-found-text-fragment.html [ Skip ]
79487953

79497954
# This test hits an assert in debug
79507955
webkit.org/b/290133 [ Debug ] svg/dom/SVGGeometry-isPointInFill-with-null-path.html [ Skip ]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<style>
2+
div {
3+
display: inline-block;
4+
}
5+
input {
6+
font-size: 40px;
7+
}
8+
</style>
9+
PASS if this and<div><input id=foobar type=text value="this"></div>are vertically aligned.
10+
<script>
11+
foobar.focus();
12+
foobar.setSelectionRange(4, 4);
13+
</script>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<style>
2+
div {
3+
display: inline-block;
4+
}
5+
input {
6+
font-size: 40px;
7+
}
8+
</style>
9+
PASS if this and<div><input id=change_this type=text value="test"></div>are vertically aligned.
10+
<script>
11+
change_this.focus();
12+
change_this.setSelectionRange(0, 4);
13+
document.execCommand('Delete', false, null);
14+
document.execCommand("InsertText", true, "this");
15+
</script>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
2+
Checking cursors with device pixel ratio of 1
3+
----------------------------------------------
4+
SUBTEST: top of view
5+
TEST CASE: y=0: Used custom cursor.
6+
TEST CASE: y=2: Ignored custom cursor.
7+
TEST CASE: y=24: Ignored custom cursor.
8+
TEST CASE: hidpi, y=0: Used custom cursor.
9+
TEST CASE: hidpi, y=2: Ignored custom cursor.
10+
TEST CASE: hidpi, y=49: Ignored custom cursor.
11+
12+
SUBTEST: middle of view
13+
TEST CASE: y=0: Used custom cursor.
14+
TEST CASE: y=2: Used custom cursor.
15+
TEST CASE: y=24: Used custom cursor.
16+
TEST CASE: hidpi, y=0: Used custom cursor.
17+
TEST CASE: hidpi, y=2: Used custom cursor.
18+
TEST CASE: hidpi, y=49: Used custom cursor.
19+
20+
SUBTEST: top of view (by scrolling)
21+
TEST CASE: y=0: Used custom cursor.
22+
TEST CASE: y=2: Ignored custom cursor.
23+
TEST CASE: y=24: Ignored custom cursor.
24+
TEST CASE: hidpi, y=0: Used custom cursor.
25+
TEST CASE: hidpi, y=2: Ignored custom cursor.
26+
TEST CASE: hidpi, y=49: Ignored custom cursor.
27+
28+
SUBTEST: out of view (by scrolling)
29+
TEST CASE: y=0: Ignored custom cursor.
30+
TEST CASE: y=2: Ignored custom cursor.
31+
TEST CASE: y=24: Ignored custom cursor.
32+
TEST CASE: hidpi, y=0: Ignored custom cursor.
33+
TEST CASE: hidpi, y=2: Ignored custom cursor.
34+
TEST CASE: hidpi, y=49: Ignored custom cursor.
35+
36+
Checking cursors with device pixel ratio of 2
37+
----------------------------------------------
38+
SUBTEST: top of view
39+
TEST CASE: y=0: Used custom cursor.
40+
TEST CASE: y=2: Ignored custom cursor.
41+
TEST CASE: y=24: Ignored custom cursor.
42+
TEST CASE: hidpi, y=0: Used custom cursor.
43+
TEST CASE: hidpi, y=2: Ignored custom cursor.
44+
TEST CASE: hidpi, y=49: Ignored custom cursor.
45+
46+
SUBTEST: middle of view
47+
TEST CASE: y=0: Used custom cursor.
48+
TEST CASE: y=2: Used custom cursor.
49+
TEST CASE: y=24: Used custom cursor.
50+
TEST CASE: hidpi, y=0: Used custom cursor.
51+
TEST CASE: hidpi, y=2: Used custom cursor.
52+
TEST CASE: hidpi, y=49: Used custom cursor.
53+
54+
SUBTEST: top of view (by scrolling)
55+
TEST CASE: y=0: Used custom cursor.
56+
TEST CASE: y=2: Ignored custom cursor.
57+
TEST CASE: y=24: Ignored custom cursor.
58+
TEST CASE: hidpi, y=0: Used custom cursor.
59+
TEST CASE: hidpi, y=2: Ignored custom cursor.
60+
TEST CASE: hidpi, y=49: Ignored custom cursor.
61+
62+
SUBTEST: out of view (by scrolling)
63+
TEST CASE: y=0: Ignored custom cursor.
64+
TEST CASE: y=2: Ignored custom cursor.
65+
TEST CASE: y=24: Ignored custom cursor.
66+
TEST CASE: hidpi, y=0: Ignored custom cursor.
67+
TEST CASE: hidpi, y=2: Ignored custom cursor.
68+
TEST CASE: hidpi, y=49: Ignored custom cursor.
69+
70+
PASS successfullyParsed is true
71+
72+
TEST COMPLETE
73+
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script src="../../resources/js-test.js"></script>
5+
<script src="../../resources/image-preload-helper.js"></script>
6+
<style type="text/css">
7+
body {
8+
margin: 0;
9+
height: 200vh;
10+
}
11+
12+
#test-container {
13+
display: flex;
14+
flex-direction: horizontal;
15+
}
16+
17+
#test-container > div {
18+
writing-mode: vertical-rl;
19+
}
20+
21+
#test-container.middle {
22+
margin-top: 50vh;
23+
}
24+
</style>
25+
</head>
26+
<body>
27+
<div id="test-container">
28+
<div style='cursor: -webkit-image-set(url(resources/greenbox.png) 1x), pointer'>y=0</div>
29+
<div style='cursor: -webkit-image-set(url(resources/greenbox.png) 1x) 12 2, pointer'>y=2</div>
30+
<div style='cursor: -webkit-image-set(url(resources/greenbox.png) 1x) 12 24, pointer'>y=24</div>
31+
<div style='cursor: -webkit-image-set(url(resources/greenbox200.png) 8x), pointer'>hidpi, y=0</div>
32+
<div style='cursor: -webkit-image-set(url(resources/greenbox200.png) 8x) 25 2, pointer'>hidpi, y=2</div>
33+
<div style='cursor: -webkit-image-set(url(resources/greenbox200.png) 8x) 25 49, pointer'>hidpi, y=49</div>
34+
</div>
35+
<br/>
36+
<div id="console"></div>
37+
<script>
38+
var testContainer = document.getElementById('test-container');
39+
40+
async function checkCursors() {
41+
debug('Checking cursors with device pixel ratio of ' + window.devicePixelRatio);
42+
debug('----------------------------------------------');
43+
44+
var nodesToTest = document.querySelectorAll('#test-container > div');
45+
async function subtest(description) {
46+
debug("SUBTEST: " + description);
47+
for (var i = 0; i < nodesToTest.length; i++) {
48+
var node = nodesToTest[i];
49+
await eventSender.asyncMouseMoveTo(node.offsetLeft + 3, node.offsetTop - document.documentElement.scrollTop + 1);
50+
var result = window.internals.getCurrentCursorInfo().includes("type=Custom") ? "Used custom cursor." : "Ignored custom cursor.";
51+
debug('TEST CASE: ' + node.textContent + ': ' + result);
52+
}
53+
debug('');
54+
}
55+
56+
await subtest("top of view");
57+
testContainer.classList.add("middle");
58+
await subtest("middle of view");
59+
document.documentElement.scrollTop = testContainer.offsetTop;
60+
await subtest("top of view (by scrolling)");
61+
document.documentElement.scrollTop = testContainer.offsetTop * 2;
62+
await subtest("out of view (by scrolling)");
63+
testContainer.classList.remove("middle");
64+
document.documentElement.scrollTop = 0;
65+
}
66+
67+
async function runTests() {
68+
if (window.eventSender) {
69+
await checkCursors();
70+
// Repeat in high-dpi mode
71+
testRunner.setBackingScaleFactor(2, async function() {
72+
await checkCursors();
73+
testContainer.style.display = 'none';
74+
finishJSTest();
75+
});
76+
} else {
77+
finishJSTest();
78+
}
79+
}
80+
81+
if (!window.eventSender)
82+
testFailed('This test must run in the test runner.');
83+
84+
if (window.testRunner) {
85+
testRunner.dumpAsText();
86+
testRunner.waitUntilDone();
87+
window.jsTestIsAsync = true;
88+
}
89+
90+
// Now wait for each image to load or fail to load before starting tests.
91+
// Without this we can get null images in the cursors - eg. no known size.
92+
preloadImagesFromStyle(testContainer, 2, runTests);
93+
94+
</script>
95+
</body>
96+
</html>

LayoutTests/fast/events/mouse-cursor.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<script src="../../resources/js-test-pre.js"></script>
55
<script src="../../resources/image-preload-helper.js"></script>
66
<style type="text/css">
7+
#test-container {
8+
margin: 30px;
9+
}
710
</style>
811
</head>
912
<body>
Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,15 @@
1-
Ideally, all ovals below should be reported as having width=37, height=33. Currently rounding prevents us from doing this.
21

32

4-
Zoom 1% PASS: 100x100 close enough to 37x33
3+
PASS Zoom 4% should not affect width/height of images.
4+
PASS Zoom 5% should not affect width/height of images.
5+
PASS Zoom 30% should not affect width/height of images.
6+
PASS Zoom 33% should not affect width/height of images.
7+
PASS Zoom 50% should not affect width/height of images.
8+
PASS Zoom 70% should not affect width/height of images.
9+
PASS Zoom 100% should not affect width/height of images.
10+
PASS Zoom 111% should not affect width/height of images.
11+
PASS Zoom 150% should not affect width/height of images.
12+
PASS Zoom 333% should not affect width/height of images.
13+
PASS Zoom 400% should not affect width/height of images.
14+
PASS Zoom 1234% should not affect width/height of images.
515

6-
7-
Zoom 2% PASS: 50x50 close enough to 37x33
8-
9-
10-
Zoom 3% PASS: 33x33 close enough to 37x33
11-
12-
13-
Zoom 4% PASS: 25x25 close enough to 37x33
14-
15-
16-
Zoom 5% PASS: 40x40 close enough to 37x33
17-
18-
19-
Zoom 30% PASS: 36x33 close enough to 37x33
20-
21-
22-
Zoom 33% PASS: 36x33 close enough to 37x33
23-
24-
25-
Zoom 50% PASS: 38x34 close enough to 37x33
26-
27-
28-
Zoom 70% PASS: 37x32 close enough to 37x33
29-
30-
31-
Zoom 100% PASS: 37x33
32-
33-
34-
Zoom 111% PASS: 37x34 close enough to 37x33
35-
36-
37-
Zoom 150% PASS: 38x34 close enough to 37x33
38-
39-
40-
Zoom 333% PASS: 37x33
41-
42-
43-
Zoom 400% PASS: 37x33
44-
45-
46-
Zoom 1234% PASS: 37x33
Lines changed: 33 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,40 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script type="text/javascript">
5-
if (window.testRunner)
6-
testRunner.dumpAsText();
7-
8-
function update() {
9-
var el = document.getElementById('subpixel-test');
10-
var hasSubpixelSupport = el.getBoundingClientRect().width == 4.5;
11-
el.parentNode.removeChild(el);
12-
13-
// These arrays will become unnecessary if we fix the rounding issues that make us not always report "37x33".
14-
var expectedWidths, expectedHeights;
15-
if (hasSubpixelSupport) {
16-
expectedWidths = [100, 50, 33, 25, 40, 36, 36, 38, 37, 37, 37, 38, 37, 37, 37];
17-
expectedHeights = [100, 50, 33, 25, 40, 33, 33, 34, 32, 33, 34, 34, 33, 33, 33];
18-
} else {
19-
expectedWidths = [100, 50, 33, 25, 20, 36, 36, 36, 35, 37, 37, 37, 37, 37, 37];
20-
expectedHeights = [100, 50, 33, 25, 20, 30, 30, 32, 32, 33, 33, 33, 33, 33, 33];
21-
}
22-
for (i = 0; i < 15; ++i) {
23-
var oval = document.getElementById('oval' + i);
24-
var status = document.getElementById('status' + i);
25-
var sizes = document.getElementById('sizes' + i);
26-
if ((oval.width == expectedWidths[i]) && (oval.height == expectedHeights[i])) {
27-
status.style.color = "green";
28-
status.innerHTML = "PASS";
29-
sizes.innerHTML = oval.width + "x" + oval.height + (((oval.width != 37) || (oval.height != 33)) ? " close enough to 37x33" : "");
30-
} else {
31-
status.style.color = "red";
32-
status.innerHTML = "FAIL";
33-
sizes.innerHTML = oval.width + "x" + oval.height + " not close enough to 37x33";
34-
}
35-
}
36-
}
37-
window.onload = update;
38-
</script>
4+
<script src="../../resources/testharness.js"></script>
5+
<script src="../../resources/testharnessreport.js"></script>
396
</head>
407
<body>
41-
<p>Ideally, all ovals below should be reported as having width=37, height=33. Currently rounding prevents us from doing this.</p>
42-
<img id="oval0" src="resources/oval.png" style="zoom: 1%">
43-
<p>Zoom 1% <span id="status0"></span>: <span id="sizes0"></span></p>
44-
<img id="oval1" src="resources/oval.png" style="zoom: 2%">
45-
<p>Zoom 2% <span id="status1"></span>: <span id="sizes1"></span></p>
46-
<img id="oval2" src="resources/oval.png" style="zoom: 3%">
47-
<p>Zoom 3% <span id="status2"></span>: <span id="sizes2"></span></p>
48-
<img id="oval3" src="resources/oval.png" style="zoom: 4%">
49-
<p>Zoom 4% <span id="status3"></span>: <span id="sizes3"></span></p>
50-
<img id="oval4" src="resources/oval.png" style="zoom: 5%">
51-
<p>Zoom 5% <span id="status4"></span>: <span id="sizes4"></span></p>
52-
<img id="oval5" src="resources/oval.png" style="zoom: 30%">
53-
<p>Zoom 30% <span id="status5"></span>: <span id="sizes5"></span></p>
54-
<img id="oval6" src="resources/oval.png" style="zoom: 33%">
55-
<p>Zoom 33% <span id="status6"></span>: <span id="sizes6"></span></p>
56-
<img id="oval7" src="resources/oval.png" style="zoom: 50%">
57-
<p>Zoom 50% <span id="status7"></span>: <span id="sizes7"></span></p>
58-
<img id="oval8" src="resources/oval.png" style="zoom: 70%">
59-
<p>Zoom 70% <span id="status8"></span>: <span id="sizes8"></span></p>
60-
<img id="oval9" src="resources/oval.png" style="zoom: 100%">
61-
<p>Zoom 100% <span id="status9"></span>: <span id="sizes9"></span></p>
62-
<img id="oval10" src="resources/oval.png" style="zoom: 111%">
63-
<p>Zoom 111% <span id="status10"></span>: <span id="sizes10"></span></p>
64-
<img id="oval11" src="resources/oval.png" style="zoom: 150%">
65-
<p>Zoom 150% <span id="status11"></span>: <span id="sizes11"></span></p>
66-
<img id="oval12" src="resources/oval.png" style="zoom: 333%">
67-
<p>Zoom 333% <span id="status12"></span>: <span id="sizes12"></span></p>
68-
<img id="oval13" src="resources/oval.png" style="zoom: 400%">
69-
<p>Zoom 400% <span id="status13"></span>: <span id="sizes13"></span></p>
70-
<img id="oval14" src="resources/oval.png" style="zoom: 1234%">
71-
<p>Zoom 1234% <span id="status14"></span>: <span id="sizes14"></span></p>
72-
<div id="subpixel-test" style="width: 4.5px; height: 10px;"></div>
8+
<img id="oval0" src="resources/oval.png" style="zoom: 4%">
9+
<img id="oval1" src="resources/oval.png" style="zoom: 5%">
10+
<img id="oval2" src="resources/oval.png" style="zoom: 30%">
11+
<img id="oval3" src="resources/oval.png" style="zoom: 33%">
12+
<img id="oval4" src="resources/oval.png" style="zoom: 50%">
13+
<img id="oval5" src="resources/oval.png" style="zoom: 70%">
14+
<img id="oval6" src="resources/oval.png" style="zoom: 100%">
15+
<img id="oval7" src="resources/oval.png" style="zoom: 111%">
16+
<img id="oval8" src="resources/oval.png" style="zoom: 150%">
17+
<img id="oval9" src="resources/oval.png" style="zoom: 333%">
18+
<img id="oval10" src="resources/oval.png" style="zoom: 400%">
19+
<img id="oval11" src="resources/oval.png" style="zoom: 1234%">
20+
<script>
21+
const EXPECTED_WIDTH = 37;
22+
const EXPECTED_HEIGHT = 33;
23+
for (i = 0; i < 12; ++i) {
24+
const oval = document.getElementById('oval' + i);
25+
const testDesc = `Zoom ${oval.style.zoom} should not affect width/height of images.`;
26+
const testBody = () => {
27+
assert_equals(oval.width, EXPECTED_WIDTH, oval.getAttribute('style'));
28+
assert_equals(oval.height, EXPECTED_HEIGHT, oval.getAttribute('style'));
29+
};
30+
if (oval.complete) {
31+
test(testBody, testDesc);
32+
} else {
33+
async_test(t => {
34+
oval.onload = t.step_func_done(testBody);
35+
}, testDesc);
36+
}
37+
}
38+
</script>
7339
</body>
7440
</html>

0 commit comments

Comments
 (0)