Sync WPT with upstream (31-08-2025) (#39049)

Automated downstream sync of changes from upstream as of 31-08-2025
[no-wpt-sync]

Signed-off-by: WPT Sync Bot <ghbot+wpt-sync@servo.org>
This commit is contained in:
Servo WPT Sync 2025-08-31 03:40:16 +02:00 committed by GitHub
parent c92cd9e624
commit ce35161a6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
260 changed files with 8456 additions and 2411 deletions

View file

@ -12,3 +12,6 @@
[Revoke blob URL after creating Request, then clone Request, will fetch]
expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,3 @@
[frame-ancestors-path-ignored.window.html]
[A 'frame-ancestors' CSP directive with a URL that includes a path should be ignored.]
expected: FAIL

View file

@ -0,0 +1,3 @@
[report-strips-username-password.html]
[Reported blockedURI does not contain username or password.]
expected: FAIL

View file

@ -2,12 +2,6 @@
[globalCompositeOperation destination]
expected: FAIL
[globalCompositeOperation source-out]
expected: FAIL
[globalCompositeOperation destination-out]
expected: FAIL
[globalCompositeOperation xor]
expected: FAIL
@ -19,3 +13,9 @@
[globalCompositeOperation plus-lighter]
expected: FAIL
[globalCompositeOperation source-atop]
expected: FAIL
[globalCompositeOperation destination-atop]
expected: FAIL

View file

@ -133,3 +133,12 @@
[style(--x >= --y > --z)]
expected: FAIL
[style(0 = 0px)]
expected: FAIL
[style(0 >= 0px)]
expected: FAIL
[style(0 < 3px)]
expected: FAIL

View file

@ -1,2 +0,0 @@
[downloadable-font-scoped-to-document.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[grid-auto-margin-and-replaced-item-001.html]
expected: FAIL

View file

@ -0,0 +1,18 @@
[html-scroll-marker-target-before-after.html]
[0th scroll marker test]
expected: FAIL
[1th scroll marker test]
expected: FAIL
[2th scroll marker test]
expected: FAIL
[3th scroll marker test]
expected: FAIL
[4th scroll marker test]
expected: FAIL
[5th scroll marker test]
expected: FAIL

View file

@ -28,3 +28,6 @@
[Property scrollbar-gutter does not inherit]
expected: FAIL
[Property block-ellipsis has initial value no-ellipsis]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-023.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-024.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[block-ellipsis-025.html]
expected: FAIL

View file

@ -7,3 +7,6 @@
[e.style['block-ellipsis'\] = "\\" etc., etc. \\"" should set the property value]
expected: FAIL
[e.style['block-ellipsis'\] = "no-ellipsis" should set the property value]
expected: FAIL

View file

@ -40,3 +40,12 @@
[e.style['line-clamp'\] = "3 auto -webkit-legacy" should set the property value]
expected: FAIL
[e.style['line-clamp'\] = "7 no-ellipsis" should set the property value]
expected: FAIL
[e.style['line-clamp'\] = "no-ellipsis 10" should set the property value]
expected: FAIL
[e.style['line-clamp'\] = "no-ellipsis -webkit-legacy" should set the property value]
expected: FAIL

View file

@ -0,0 +1,18 @@
[scroll-marker-target-before-after.html]
[0th scroll marker test]
expected: FAIL
[1th scroll marker test]
expected: FAIL
[2th scroll marker test]
expected: FAIL
[3th scroll marker test]
expected: FAIL
[4th scroll marker test]
expected: FAIL
[5th scroll marker test]
expected: FAIL

View file

@ -0,0 +1,3 @@
[line-break-var-substitution.html]
[Test that line-break can be set with a var() substitution]
expected: FAIL

View file

@ -44,9 +44,6 @@
[CSS Values and Units Test: attr 16]
expected: FAIL
[CSS Values and Units Test: attr 18]
expected: FAIL
[CSS Values and Units Test: attr 20]
expected: FAIL
@ -58,3 +55,24 @@
[CSS Values and Units Test: attr 21]
expected: FAIL
[CSS Values and Units Test: attr 13]
expected: FAIL
[CSS Values and Units Test: attr 19]
expected: FAIL
[CSS Values and Units Test: attr 22]
expected: FAIL
[CSS Values and Units Test: attr 23]
expected: FAIL
[CSS Values and Units Test: attr 25]
expected: FAIL
[CSS Values and Units Test: attr 26]
expected: FAIL
[CSS Values and Units Test: attr 27]
expected: FAIL

View file

@ -592,3 +592,15 @@
[CSS Values and Units Test: CSS inline if() function 197]
expected: FAIL
[CSS Values and Units Test: CSS inline if() function 198]
expected: FAIL
[CSS Values and Units Test: CSS inline if() function 199]
expected: FAIL
[CSS Values and Units Test: CSS inline if() function 200]
expected: FAIL
[CSS Values and Units Test: CSS inline if() function 201]
expected: FAIL

View file

@ -0,0 +1,6 @@
[FormControlRange-basic.html]
[Tests FormControlRange constructor and inheritance.]
expected: FAIL
[Tests FormControlRange default values when no form control is set.]
expected: FAIL

View file

@ -4,3 +4,6 @@
[Navigating to a different document with link click]
expected: FAIL
[Navigating to a different document with form submission]
expected: FAIL

View file

@ -1,3 +0,0 @@
[same-document-refresh.html]
[Same-Document Referrer from Refresh]
expected: FAIL

View file

@ -1,3 +0,0 @@
[traverse_the_history_2.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,3 +0,0 @@
[traverse_the_history_3.html]
[Multiple history traversals, last would be aborted]
expected: FAIL

View file

@ -1,6 +1,3 @@
[embedded-opener-remove-frame.html]
[opener of discarded nested browsing context]
expected: FAIL
[opener of discarded auxiliary browsing context]
expected: FAIL

View file

@ -5156,6 +5156,30 @@
[ToggleEvent interface: new ToggleEvent("beforetoggle") must inherit property "source" with the proper type]
expected: FAIL
[NavigationTransition interface: attribute committed]
expected: FAIL
[NavigationPrecommitController interface: existence and properties of interface object]
expected: FAIL
[NavigationPrecommitController interface object length]
expected: FAIL
[NavigationPrecommitController interface object name]
expected: FAIL
[NavigationPrecommitController interface: existence and properties of interface prototype object]
expected: FAIL
[NavigationPrecommitController interface: existence and properties of interface prototype object's "constructor" property]
expected: FAIL
[NavigationPrecommitController interface: existence and properties of interface prototype object's @@unscopables property]
expected: FAIL
[NavigationPrecommitController interface: operation redirect(USVString, optional NavigationNavigateOptions)]
expected: FAIL
[idlharness.https.html?include=HTML.+]
[HTMLAllCollection interface: existence and properties of interface object]

View file

@ -1,6 +1,7 @@
[autofocus-dialog.html]
expected: TIMEOUT
[<dialog> can contain autofocus, without stopping page autofocus content from working]
expected: FAIL
[<dialog>-contained autofocus element gets focused when the dialog is shown]
expected: FAIL
expected: TIMEOUT

View file

@ -4,7 +4,7 @@
expected: FAIL
[Host element with delegatesFocus including no focusable descendants should be skipped]
expected: NOTRUN
expected: TIMEOUT
[Element with tabindex should support autofocus]
expected: FAIL
@ -13,4 +13,4 @@
expected: NOTRUN
[Host element with delegatesFocus should support autofocus]
expected: NOTRUN
expected: FAIL

View file

@ -0,0 +1,3 @@
[fragmented-mp4-end.html]
[fragmented-mp4-end]
expected: PRECONDITION_FAILED

View file

@ -1,4 +1,3 @@
[iframe_sandbox_popups_escaping-1.html]
expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
expected: TIMEOUT
expected: FAIL

View file

@ -1,3 +1,4 @@
[iframe_sandbox_popups_nonescaping-1.html]
expected: CRASH
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL

View file

@ -1,3 +1,4 @@
[iframe_sandbox_popups_nonescaping-2.html]
expected: CRASH
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL

View file

@ -1,4 +1,3 @@
[iframe_sandbox_popups_nonescaping-3.html]
expected: TIMEOUT
[Check that popups from a sandboxed iframe do not escape the sandbox]
expected: FAIL

View file

@ -0,0 +1,2 @@
[video_timeupdate_on_seek.html]
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[077.html]
[ adding several types of scripts through the DOM and removing some of them confuses scheduler ]
expected: FAIL

View file

@ -1,2 +0,0 @@
[modulepreload-cross-origin-referrerpolicy.sub.html]
expected: TIMEOUT

View file

@ -1,3 +0,0 @@
[modulepreload-inline-referrerpolicy.html]
[Inline modulepreload elements should respect the referrerpolicy attribute]
expected: FAIL

View file

@ -1,4 +0,0 @@
[modulepreload-referrer-check.html]
expected: TIMEOUT
[Modulepreload should send a referrer header]
expected: TIMEOUT

View file

@ -1,22 +0,0 @@
[modulepreload-referrerpolicy.html]
expected: TIMEOUT
[Modulepreload should use default referrer policy]
expected: TIMEOUT
[Modulepreload with no-referrer policy should not send referrer]
expected: NOTRUN
[Modulepreload with origin policy should send origin-only referrer]
expected: NOTRUN
[Modulepreload with same-origin policy should send full referrer for same-origin requests]
expected: NOTRUN
[Modulepreload with strict-origin policy should send origin-only referrer]
expected: NOTRUN
[Modulepreload with strict-origin-when-cross-origin policy should send full referrer for same-origin requests]
expected: NOTRUN
[Modulepreload with unsafe-url policy should send full referrer]
expected: NOTRUN

View file

@ -0,0 +1,4 @@
[cross-origin-tall-iframe.sub.html]
expected: TIMEOUT
[Intersection observer with cross-origin iframe and tall viewport]
expected: TIMEOUT

View file

@ -65,11 +65,11 @@
[success (style): main]
expected: FAIL
[Decode-error (script): main]
expected: FAIL
[404 (script): main]
expected: FAIL
[Decode-error (style): main]
expected: FAIL
[CORS (xhr): main]
expected: FAIL

View file

@ -14,3 +14,6 @@
[Script source set via TrustedHTML sink Element.setHTMLUnsafe() drops trustworthiness.]
expected: FAIL
[Script source set via Node.textContent drops trustworthiness.]
expected: FAIL

View file

@ -88,3 +88,6 @@
[Default policy's calls when cloning a script via Range.cloneContents().]
expected: FAIL
[Verify when the default policy is called for script set source via Node.textContent.]
expected: FAIL

View file

@ -51,9 +51,6 @@
[trusted-types-navigation.html?31-35]
expected: CRASH
[Navigate a frame via form-submission with javascript:-urls in report-only mode.]
expected: FAIL
[Navigate a frame via form-submission with javascript:-urls w/ default policy in report-only mode.]
expected: TIMEOUT
@ -73,15 +70,9 @@
[trusted-types-navigation.html?26-30]
[Navigate a window via form-submission with javascript:-urls w/ default policy in enforcing mode.]
expected: FAIL
[Navigate a window via form-submission with javascript:-urls in report-only mode.]
expected: FAIL
[Navigate a window via form-submission with javascript:-urls w/ default policy in report-only mode.]
expected: FAIL
[Navigate a frame via form-submission with javascript:-urls in enforcing mode.]
expected: FAIL
@ -91,9 +82,6 @@
[trusted-types-navigation.html?06-10]
expected: CRASH
[Navigate a frame via anchor with javascript:-urls w/ default policy in enforcing mode.]
expected: FAIL
[Navigate a frame via anchor with javascript:-urls in report-only mode.]
expected: FAIL

View file

@ -0,0 +1,2 @@
[source-phase-js-string.tentative.html]
expected: ERROR

View file

@ -70,3 +70,6 @@
[# AUDIT TASK RUNNER FINISHED: 1 out of 1 tasks were failed.]
expected: FAIL
[FFT scaling tests — Test Scaling of FFT in AnalyserNode]
expected: FAIL

View file

@ -0,0 +1,3 @@
[context-time-monotonic-on-setsinkid.https.html]
[currentTime and getOutputTimestamp().contextTime should not reset after setSinkId]
expected: FAIL

View file

@ -16,3 +16,9 @@
[X Test 4: g2.disconnect(g1.gain) did not throw an exception.]
expected: FAIL
[Test 3: Disconnect nodes between contexts]
expected: FAIL
[Test 4: Disconnect AudioParam between contexts]
expected: FAIL

View file

@ -13,3 +13,6 @@
[# AUDIT TASK RUNNER FINISHED: 1 out of 5 tasks were failed.]
expected: FAIL
[AudioNodeOptions immutability]
expected: FAIL

View file

@ -7,3 +7,6 @@
[# AUDIT TASK RUNNER FINISHED: 1 out of 3 tasks were failed.]
expected: FAIL
[Equal-power panner model of AudioPannerNode]
expected: FAIL

View file

@ -0,0 +1,2 @@
[render_state_update.https.html]
expected: ERROR

View file

@ -29,6 +29,33 @@ test(function() {
desc: "blob2."
});
test_blob(function() {
var blob = new Blob(["abcd"]);
return blob.slice(undefined, undefined, "content/type");
}, {
expected: "abcd",
type: "content/type",
desc: "undefined start/end Blob slice"
});
test_blob(function() {
var blob = new Blob(["abcd"]);
return blob.slice(undefined, 2, "content/type");
}, {
expected: "ab",
type: "content/type",
desc: "undefined start Blob slice"
});
test_blob(function() {
var blob = new Blob(["abcd"]);
return blob.slice(2, undefined, "content/type");
}, {
expected: "cd",
type: "content/type",
desc: "undefined end Blob slice"
});
test_blob(function() {
return new Blob().slice(0,0,null);
}, {

View file

@ -5,13 +5,13 @@
'use_strict';
promise_test(async t => {
const db = (await new Promise(resolve => {
const request = self.indexedDB.open('db', 1);
request.addEventListener('upgradeneeded', resolve, {once: true});
})).target.result;
const store = db.createObjectStore('store', {keyPath: 'a.b', autoIncrement: true});
store.put({});
const index = store.createIndex('index', 'keypath');
db.close();
}, "Assure no crash when populating index");
indexeddb_test(
(t, db, tx) => {
const store = db.createObjectStore('store', { keyPath: 'a.b', autoIncrement: true });
store.put({});
const index = store.createIndex('index', 'keypath');
t.done();
},
/*open_func=*/null,
"Assure no crash when populating index",
);

View file

@ -18,3 +18,10 @@ promise_test(async t => {
});
}, 'Aborting Proofreader.proofread()');
promise_test(async t => {
const proofreader = await createProofreader({includeCorrectionTypes: true});
await testAbortPromise(t, signal => {
return proofreader.proofread(kTestPrompt, { signal: signal });
});
}, 'Aborting Proofreader.proofread() including correction types');

View file

@ -8,6 +8,7 @@
promise_test(async (t) => {
const proofreader = await createProofreader();
let result = await proofreader.proofread('');
assert_equals(typeof result, 'object');
assert_equals(result.correctedInput, '');
assert_equals(result.corrections, undefined);
}, 'Proofreader.proofread() with an empty input returns an empty text');
@ -15,6 +16,7 @@ promise_test(async (t) => {
promise_test(async (t) => {
const proofreader = await createProofreader();
let result = await proofreader.proofread(' ');
assert_equals(typeof result, 'object');
assert_equals(result.correctedInput, ' ');
assert_equals(result.corrections, undefined);
}, 'Proofreader.proofread() with a whitespace input returns a whitespace text');
@ -22,10 +24,28 @@ promise_test(async (t) => {
promise_test(async (t) => {
const proofreader = await createProofreader();
const result = await proofreader.proofread(kTestPrompt);
assert_equals(typeof result, 'object');
assert_not_equals(result.correctedInput, '');
}, 'Proofreader.proofread() with non-empty input returns a non-empty result');
// TODO: add a test for non-empty corrections, kTestPrompt with grammar error.
promise_test(async (t) => {
const input = "can you profread fir me";
const proofreader = await createProofreader();
const result = await proofreader.proofread(input);
assert_equals(typeof result, 'object');
assert_not_equals(result.correctedInput, input);
assert_greater_than(result.corrections.length, 0);
}, 'Proofreader.proofread() returns a list of corrections');
promise_test(async (t) => {
const input = "can you profread fir me";
const proofreader = await createProofreader({includeCorrectionTypes: true});
const result = await proofreader.proofread(input);
assert_equals(typeof result, 'object');
assert_not_equals(result.correctedInput, input);
assert_greater_than(result.corrections.length, 0);
assert_not_equals(result.corrections[0].type, undefined);
}, 'Proofreader.proofread() returns correction types when requested');
promise_test(async (t) => {
await testDestroy(t, createProofreader, {}, [

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/content-security-policy/support/testharness-helper.js"></script>
<meta http-equiv="Content-Security-Policy" content="img-src 'none'">
</head>
<body>
<script>
async_test(t => {
addEventListener("securitypolicyviolation", t.step_func_done(e => {
assert_equals(e.blockedURI, "https://evil.com/img.png");
}));
var i = document.createElement("img");
i.src = "https://user:password@evil.com/img.png";
}, "Reported blockedURI does not contain username or password.");
</script>
</body>

View file

@ -15,7 +15,7 @@ body {
.cb {
position: relative;
font: 20px/1 Ahem, monospace;
font: 20px/1 Ahem;
}
.scroller {
@ -64,6 +64,8 @@ body {
<script>
promise_test(async () => {
await document.fonts.load('20px/1 Ahem');
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<title>Tests position fallback with initially out-of-viewport anchor in vertial-rl</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
<link rel="author" href="mailto:xiaochengh@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#scroll">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#fallback-apply">

View file

@ -1,5 +1,6 @@
<!DOCTYPE html>
<title>Tests position fallback with initially out-of-viewport anchor in vertial-rl rtl</title>
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
<link rel="author" href="mailto:xiaochengh@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#scroll">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#fallback-apply">

View file

@ -0,0 +1,68 @@
<!DOCTYPE html>
<title>CSS Anchor Positioning: last successful position fallback with animation</title>
<link rel="author" title="Kiet Ho" href="mailto:kiet.ho@apple.com">
<meta name="description" content="Tests a bug in WebKit where the last-successful position fallback isn't remembered when the anchor-positioned element is animated">
<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#last-successful-position-fallback">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/test-common.js"></script>
<style>
#container {
position: relative;
width: 400px;
height: 400px;
background: teal;
}
#anchor {
position: relative;
top: 100px;
left: 100px;
width: 100px;
height: 100px;
background: red;
anchor-name: --a;
}
/* Dummy animation keyframe */
@keyframes anime {
from { background: #000000; }
to { background: #ffffff; }
}
#anchored {
position-anchor: --a;
position-try-fallbacks: flip-block;
position: absolute;
width: 100px;
height: 200px;
position-area: top center;
background: lime;
animation: anime 1s linear;
}
</style>
<div id="container">
<div id="anchor"></div>
<div id="anchored"></div>
</div>
<script>
promise_test(async () => {
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();
assert_equals(anchored.offsetTop, 200);
}, "Starts rendering with flip-block");
promise_test(async () => {
anchor.style.top = "150px";
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();
assert_equals(anchored.offsetTop, 200);
}, "No successful position, keep flip-block");
promise_test(async () => {
anchor.style.top = "200px";
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();
assert_equals(anchored.offsetTop, 0);
}, "Base position without fallback now successful");
</script>

View file

@ -0,0 +1,59 @@
<!DOCTYPE html>
<title>CSS Anchor Positioning: switch from using fallback style to base style</title>
<meta name="description" content="Tests a bug in WebKit where if a fallback is initially used, then the base style is used, WebKit will remember the fallback to be the last successful position fallback instead of the base style.">
<link rel="author" title="Kiet Ho" href="mailto:kiet.ho@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#last-successful-position-fallback">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/test-common.js"></script>
<style>
#container {
position: relative;
width: 600px;
height: 300px;
background: teal;
}
#anchor {
position: relative;
top: 100px;
left: 100px;
width: 100px;
height: 100px;
background: red;
anchor-name: --a;
}
#anchored {
position-anchor: --a;
position-try-fallbacks: flip-inline;
position: absolute;
width: 200px;
height: 100px;
position-area: left center;
background: lime;
}
</style>
<div id="container">
<div id="anchor"></div>
<div id="anchored"></div>
</div>
<script>
promise_test(async () => {
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();
assert_equals(anchored.offsetLeft, 200);
}, "Starts rendering with flip-inline fallback");
promise_test(async () => {
anchor.style.left = "350px";
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();
assert_equals(anchored.offsetLeft, 150);
}, "Base position without fallback now successful");
promise_test(async () => {
anchor.style.left = "300px";
await waitUntilNextAnimationFrame();
await waitUntilNextAnimationFrame();
assert_equals(anchored.offsetLeft, 100);
}, "Both base position and flip-inline works, keep base position since it's the last successful option");
</script>

View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<title>Tests the scrollable containing-block usage with position-area.</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#scrollable-containing-block">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/12552">
<style>
.scroller {
/* Use overflow hidden instead of scroll to mitigate scrollbar differences. */
overflow: hidden;
position: relative;
width: 80px;
height: 80px;
margin: 10px;
border: solid 3px;
padding: 10px;
}
.filler {
min-width: 180px;
min-height: 180px;
}
.anchor {
anchor-name: --a;
width: 50px;
height: 50px;
position: relative;
left: 60px;
top: 60px;
background: orange;
}
.target {
position: absolute;
position-anchor: --a;
place-self: stretch;
background: cyan;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.target')">
<!-- top -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-area: top;" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="70"></div>
</div>
<!-- right -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-area: right;" data-offset-x="120" data-offset-y="0" data-expected-width="80" data-expected-height="200"></div>
</div>
<!-- bottom -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-area: bottom;" data-offset-x="0" data-offset-y="120" data-expected-width="200" data-expected-height="80"></div>
</div>
<!-- left -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-area: left;" data-offset-x="0" data-offset-y="0" data-expected-width="70" data-expected-height="200"></div>
</div>

View file

@ -0,0 +1,126 @@
<!DOCTYPE html>
<title>Tests where the "padding edge" should be for various display types.</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#scrollable-containing-block">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/12552">
<style>
.scroller {
/* Use overflow hidden instead of scroll to mitigate scrollbar differences. */
overflow: hidden;
position: relative;
width: 80px;
height: 80px;
margin: 10px;
border: solid 3px;
padding: 10px;
}
.filler {
background: orange;
min-width: 180px;
min-height: 180px;
}
.translate {
translate: 50px;
}
.relative {
position: relative;
left: 20px;
top: 40px;
}
.anchor {
anchor-name: --a;
}
.target {
position-anchor: --a;
position: absolute;
inset: 0;
place-self: stretch;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.target')">
<!-- Base case, block layout no shift. -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Block layout with relative shift. -->
<div class="scroller">
<div class="filler relative"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Block layout with translate shift. -->
<div class="scroller">
<div class="filler translate"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Flex layout with no shift. -->
<div class="scroller" style="display: flex;">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Flex layout with relative shift. -->
<div class="scroller" style="display: flex;">
<div class="filler relative"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Flex layout with translate shift. -->
<div class="scroller" style="display: flex;">
<div class="filler translate"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Grid layout with no shift. -->
<div class="scroller" style="display: grid;">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Grid layout with relative shift. -->
<div class="scroller" style="display: grid;">
<div class="filler relative"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Grid layout with translate shift. -->
<div class="scroller" style="display: grid;">
<div class="filler translate"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Grid layout with template. -->
<div class="scroller" style="display: grid; grid-template: 180px / 180px">
<div class="anchor"></div>
<div class="target" data-offset-x="0" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Use flexbox to trigger up scrollable area. -->
<div class="scroller" style="display: flex; flex-direction: column-reverse;">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-offset-x="0" data-offset-y="-100" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Use flexbox to trigger right scrollable area. -->
<div class="scroller" style="display: flex; flex-direction: row-reverse;">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-offset-x="-100" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- Use RTL to trigger right scrollable area. -->
<div class="scroller" style="direction: rtl;">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-offset-x="-100" data-offset-y="0" data-expected-width="200" data-expected-height="200"></div>
</div>

View file

@ -0,0 +1,60 @@
<!DOCTYPE html>
<title>Tests that finding a default anchor triggers the new scrollable containing-block.</title>
<link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/">
<link rel="help" href="https://drafts.csswg.org/css-position-4/#scrollable-containing-block">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/12552">
<style>
.scroller {
/* Use overflow hidden instead of scroll to mitigate scrollbar differences. */
overflow: hidden;
position: relative;
width: 80px;
height: 80px;
margin: 10px;
border: solid 3px;
padding: 10px;
}
.filler {
min-width: 180px;
min-height: 180px;
}
.anchor {
anchor-name: --a;
}
.target {
position: absolute;
inset: 0;
place-self: stretch;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/check-layout-th.js"></script>
<body onload="checkLayout('.target')">
<!-- No default anchor should use the regular containing-block. -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" data-expected-width="100" data-expected-height="100"></div>
</div>
<!-- A default anchor - should use the scrollable containing-block. -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-anchor: --a;" data-expected-width="200" data-expected-height="200"></div>
</div>
<!-- A non-valid default anchor - should use the regular containing-block. -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-anchor: --b;" data-expected-width="100" data-expected-height="100"></div>
</div>
<!-- Only specifying position-area - should use the regular containing-block. -->
<div class="scroller">
<div class="filler"><div class="anchor"></div></div>
<div class="target" style="position-area: top;" data-expected-width="100" data-expected-height="100"></div>
</div>

View file

@ -130,6 +130,10 @@
test_query('style(5 >= calc(3 + 1))', true);
test_query('style(1px <= 1em)', true);
test_query('style(5 >= 3)', true);
test_query('style(0 = 0px)', true);
test_query('style(0 = 0deg)', false);
test_query('style(0 >= 0px)', true);
test_query('style(0 < 3px)', true);
test_query('style(3px >= 3px)', true);
test_query('style(3px > 3px)', false);
test_query('style(1em > 1px)', true);

View file

@ -7,7 +7,7 @@
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<div id="computedStyleTest">Abc</span></div>
<div id="computedStyleTest">Abc</div>
<div id="inheritanceTest"><span style="font-stretch:125%;">Abc</span><span style="font-stretch:expanded;">Abc</span><span style="font-weight: 700;">Abc</span></div>
<script>

View file

@ -0,0 +1,14 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS test reference</title>
<style>
select {
width: 100px;
color: transparent;
/* Makes mismatches less likely by not using rounded corners etc */
appearance: none;
border: none;
background: none;
}
</style>
<select><option>abc</option></select>

View file

@ -0,0 +1,18 @@
<!doctype html>
<meta charset="utf-8">
<title>Printing shows the right selected option</title>
<link rel="mismatch" href="select-combobox-print-notref.html">
<link rel="help" href="https://bugzil.la/1984884">
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.com">
<style>
select {
width: 100px;
color: inherit;
/* Makes mismatches less likely by not using rounded corners etc */
appearance: none;
border: none;
background: none;
}
</style>
<select><option>abc</option></select>

View file

@ -0,0 +1,84 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: :target-before and :target-after on html anchor scroll markers</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11600">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/css-transitions/support/helper.js"></script>
<style>
.scroller {
width: 600px;
height: 300px;
overflow: scroll;
}
.scroller div {
width: 600px;
height: 300px;
margin-bottom: 20px;
background: green;
}
.wrapper {
scroll-target-group: auto;
}
.wrapper a {
color: blue;
}
.wrapper a:target-current {
color: green;
}
.wrapper a:target-before {
color: red;
}
.wrapper a:target-after {
color: yellow;
}
</style>
<div class="scroller">
<div id="first"></div>
<div id="second"></div>
<div id="third"></div>
<div id="fourth"></div>
<div id="fifth"></div>
<div id="sixth"></div>
</div>
<div class="wrapper">
<a href="#first">First</a>
<a href="#second">Second</a>
<a href="#third">Third</a>
<a href="#fourth">Fourth</a>
<a href="#fifth">Fifth</a>
<a href="#sixth">Sixth</a>
</div>
<script>
function checkScrollMarkers(scrollMarkers, targetCurrentIndex) {
for (let i = 0; i < scrollMarkers.length; ++i) {
if (i < targetCurrentIndex) {
assert_equals(getComputedStyle(scrollMarkers[i]).color, "rgb(255, 0, 0)", "scroll marker before the :target-current one should be red as :target-before");
} else if (i === targetCurrentIndex) {
assert_equals(getComputedStyle(scrollMarkers[i]).color, "rgb(0, 128, 0)", "the :target-current scroll marker should be green");
} else {
assert_equals(getComputedStyle(scrollMarkers[i]).color, "rgb(255, 255, 0)", "scroll marker before the :target-current one should be yellow as :target-after");
}
}
}
const scroller = document.querySelector(".scroller");
const scrollTargets = scroller.querySelectorAll("div");
const wrapper = document.querySelector(".wrapper");
const scrollMarkers = wrapper.querySelectorAll("a");
for (let i = 0; i < scrollTargets.length; ++i) {
promise_test(async t => {
// Make i-th scroll marker :target-current.
scrollTargets[i].scrollIntoView();
await waitForAnimationFrames(2);
// Check the :target-before/:target-after relations on all scroll markers.
checkScrollMarkers(scrollMarkers, i);
}, i + "th scroll marker test");
}
</script>

View file

@ -15,7 +15,7 @@
<div id="target"></div>
</div>
<script>
assert_inherited('block-ellipsis', 'none', 'auto');
assert_inherited('block-ellipsis', 'no-ellipsis', 'auto');
assert_not_inherited('continue', 'auto', 'collapse');
assert_not_inherited('max-lines', 'none', '2');
assert_not_inherited('overflow-block', 'visible', 'scroll');

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: no-ellipsis when there's not enough room</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#block-ellipsis">
<link rel="match" href="reference/block-ellipsis-023-ref.html">
<meta name="assert" content="block-ellipsis: no-ellipsis must not displace content to make room for the (non-existant) ellipsis">
<style>
.clamp {
line-clamp: 4 no-ellipsis;
width: 32ch;
font-family: monospace;
}
</style>
<div class="clamp">
Test passes if there are 4 lines
and the last two are identical
supercalifragilisticexpialidocious
supercalifragilisticexpialidocious
Test fails: this should not be visible
</div>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: empty string and no-ellipsis</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#block-ellipsis">
<link rel="match" href="reference/block-ellipsis-023-ref.html">
<meta name="assert" content="block-ellipsis: '' has the same effect as no-ellipsis, and must not displace content to make room for the (non-existant) ellipsis">
<style>
.clamp {
line-clamp: 4 "";
width: 32ch;
font-family: monospace;
}
</style>
<div class="clamp">
Test passes if there are 4 lines
and the last two are identical
supercalifragilisticexpialidocious
supercalifragilisticexpialidocious
Test fails: this should not be visible
</div>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: no-ellipsis when there's not enough room</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#block-ellipsis">
<link rel="match" href="reference/block-ellipsis-025-ref.html">
<meta name="assert" content="the block overflow ellipsis displaces text, taking soft wrap opportunities into account. This may result in the entire line being displaced, and just the ellipsis being left.">
<style>
.clamp {
line-clamp: 4;
width: 32.5ch;
font-family: monospace;
}
</style>
<div class="clamp">
Test passes if there are 4 lines
and the last one only contains …
supercalifragilisticexpialidocious
supercalifragilisticexpialidocious
Test fails: this should not be visible
</div>

View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: test reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<style>
.clamp {
width: 32ch;
font-family: monospace;
}
</style>
<div class="clamp">
Test passes if there are 4 lines
and the last two are identical
supercalifragilisticexpialidocious
supercalifragilisticexpialidocious
</div>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Overflow: test reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net">
<style>
.clamp {
line-clamp: 4;
width: 32.5ch;
font-family: monospace;
}
</style>
<div class="clamp">
Test passes if there are 4 lines
and the last one only contains …
supercalifragilisticexpialidocious
</div>

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>CSS Overflow: parsing block-ellipsis with invalid values</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#propdef-block-ellipsis">
<meta name="assert" content="block-ellipsis supports only the grammar 'none | auto | <string>'.">
<meta name="assert" content="block-ellipsis supports only the grammar 'no-ellipsis | auto | <string>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
@ -12,10 +12,13 @@
<body>
<script>
test_invalid_value("block-ellipsis", 'hidden');
test_invalid_value("block-ellipsis", 'none');
test_invalid_value("block-ellipsis", 'none auto');
test_invalid_value("block-ellipsis", 'no-ellipsis auto');
test_invalid_value("block-ellipsis", 'auto "string"');
test_invalid_value("block-ellipsis", '"string" none');
test_invalid_value("block-ellipsis", '"string" no-ellipsis');
test_invalid_value("block-ellipsis", '"first" "second"');
</script>
</body>

View file

@ -4,14 +4,14 @@
<meta charset="utf-8">
<title>CSS Overflow: parsing block-ellipsis with valid values</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#propdef-block-ellipsis">
<meta name="assert" content="block-ellipsis supports the full grammar 'none | auto | <string>'.">
<meta name="assert" content="block-ellipsis supports the full grammar 'no-ellipsis | auto | <string>'.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
test_valid_value("block-ellipsis", 'none');
test_valid_value("block-ellipsis", 'no-ellipsis');
test_valid_value("block-ellipsis", 'auto');
test_valid_value("block-ellipsis", '" etc., etc. "');
</script>

View file

@ -16,6 +16,7 @@ test_invalid_value("line-clamp", '0');
test_invalid_value("line-clamp", '-5');
test_invalid_value("line-clamp", 'none 2');
test_invalid_value("line-clamp", 'none no-ellipsis');
test_invalid_value("line-clamp", '3 none');
test_invalid_value("line-clamp", '-webkit-legacy');

View file

@ -19,16 +19,17 @@ test_valid_value("line-clamp", '6');
test_valid_value("line-clamp", 'auto');
test_valid_value("line-clamp", '" etc., etc. "');
test_valid_value("line-clamp", '7 none');
test_valid_value("line-clamp", '7 no-ellipsis');
test_valid_value("line-clamp", '8 auto', '8');
test_valid_value("line-clamp", '9 " etc., etc. "');
test_valid_value("line-clamp", 'none 10', '10 none');
test_valid_value("line-clamp", 'no-ellipsis 10', '10 no-ellipsis');
test_valid_value("line-clamp", 'auto 11', '11');
test_valid_value("line-clamp", '" etc., etc. " 12', '12 " etc., etc. "');
test_valid_value("line-clamp", '1 -webkit-legacy');
test_valid_value("line-clamp", 'auto -webkit-legacy');
test_valid_value("line-clamp", 'no-ellipsis -webkit-legacy');
test_valid_value("line-clamp", '3 auto -webkit-legacy', '3 -webkit-legacy');
</script>
</body>

View file

@ -18,7 +18,9 @@ test_invalid_value("-webkit-line-clamp", '0');
test_invalid_value("-webkit-line-clamp", '-5');
test_invalid_value("-webkit-line-clamp", 'none "~"');
test_invalid_value("-webkit-line-clamp", '1 no-ellipsis');
test_invalid_value("-webkit-line-clamp", '1 "~"');
test_invalid_value("-webkit-line-clamp", '1 -webkit-legacy');
</script>
</body>
</html>

View file

@ -0,0 +1,83 @@
<!doctype html>
<meta charset="utf-8">
<title>CSS Test: :target-before and :target-after on ::scroll-marker</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-marker-pseudo">
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/11600">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/css-transitions/support/helper.js"></script>
<style>
.scroller {
width: 600px;
height: 300px;
overflow: scroll;
scroll-marker-group: after;
}
.scroller div {
width: 600px;
height: 300px;
margin-bottom: 20px;
background: green;
}
.scroller::scroll-marker-group {
border: 3px solid black;
padding: 5px;
height: 20px;
display: block;
}
.scroller div::scroll-marker {
content: "";
width: 10px;
height: 10px;
background-color: blue;
border-radius: 100%;
display: inline-block;
}
.scroller div::scroll-marker:target-current {
background-color: green;
}
.scroller div::scroll-marker:target-before {
background-color: red;
}
.scroller div::scroll-marker:target-after {
background-color: yellow;
}
</style>
<div class="scroller">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<script>
function checkScrollMarkers(markerTargets, targetCurrentIndex) {
for (let i = 0; i < markerTargets.length; ++i) {
if (i < targetCurrentIndex) {
assert_equals(getComputedStyle(markerTargets[i], "::scroll-marker").backgroundColor, "rgb(255, 0, 0)", "::scroll-marker before the :target-current one should be red as :target-before");
} else if (i === targetCurrentIndex) {
assert_equals(getComputedStyle(markerTargets[i], "::scroll-marker").backgroundColor, "rgb(0, 128, 0)", "the :target-current ::scroll-marker should be green");
} else {
assert_equals(getComputedStyle(markerTargets[i], "::scroll-marker").backgroundColor, "rgb(255, 255, 0)", "::scroll-marker before the :target-current one should be yellow as :target-after");
}
}
}
const scroller = document.querySelector(".scroller");
const markerTargets = scroller.querySelectorAll("div");
for (let i = 0; i < markerTargets.length; ++i) {
promise_test(async t => {
// Make i-th scroll marker :target-current.
markerTargets[i].scrollIntoView();
await waitForAnimationFrames(2);
// Check the :target-before/:target-after relations on all scroll markers.
checkScrollMarkers(markerTargets, i);
}, i + "th scroll marker test");
}
</script>

View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Reference: ::first-line on list item with block children</title>
<link rel="author" title="Minseong Kim" href="mailto:jja08111@gmail.com">
<style>
#test::first-line {
background: yellow;
}
</style>
<body>
<ol>
<li>
<div id="test">First line</div>
<div>Second line</div>
</li>
</ol>
</body>

View file

@ -0,0 +1,20 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Test: ::first-line on list item with block children</title>
<link rel="author" title="Minseong Kim" href="mailto:jja08111@gmail.com">
<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-text-line">
<link rel="match" href="first-line-on-list-item-with-block-children-ref.html">
<meta name=assert content="For a block container containing block-level children, the ::first-line pseudo-element applies to the first formatted line of its first in-flow block-level child">
<style>
li::first-line {
background: yellow;
}
</style>
<body>
<ol>
<li>
<div>First line</div>
<div>Second line</div>
</li>
</ol>
</body>

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
div {
font: 16px/5 Ahem;
}
span {
color: transparent;
font-size: 50%; /* annotation */
}
</style>
<div>X<span>XXX</span>X</div>

View file

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="UTF-8">
<title>Tests for ruby-overhang: none -> auto</title>
<link rel="help" href="https://drafts.csswg.org/css-ruby-1/#ruby-overhang">
<link rel="match" href="ruby-overhang-dynamic-ref.html">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
.reftest-wait .overhangNone {
ruby-overhang: none;
}
div {
font: 16px/5 Ahem;
}
ruby, rt {
color: transparent;
}
</style>
<div class=overhangNone>X<ruby>X<rt>XXXX</rt></ruby>X</div>
<script>
requestAnimationFrame(() => {
document.documentElement.classList.remove('reftest-wait');
});
</script>

View file

@ -0,0 +1,18 @@
<!DOCTYPE html>
<title>CSS Text: Setting line-break:anywhere with variable substitution</title>
<link rel="help" href="https://www.w3.org/TR/css-text-3/#propdef-line-break">
<link rel="help" href="https://crbug.com/441536815">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#target {
--lb: anywhere;
line-break: var(--lb);
}
</style>
<div id="target"></div>
<script>
test(() => {
assert_equals(getComputedStyle(target).lineBreak, "anywhere");
}, "Test that line-break can be set with a var() substitution");
</script>

View file

@ -15,6 +15,7 @@ test_invalid_value("line-break", "none");
test_invalid_value("line-break", "auto loose");
test_invalid_value("line-break", "strict normal");
test_invalid_value("line-break", "anywhere anywhere");
test_invalid_value("line-break", "after-white-space");
</script>
</body>
</html>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<head>
<title>CSS Typed OM: Invalidation on modifying PropertyMap</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om/#dom-stylepropertymap-set">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
div { color: red; }
</style>
</head>
<div id="target">This text should be green.</div>
<script>
test(() => {
document.body.offsetTop;
document.styleSheets[0].cssRules[0].styleMap.set('color', 'green');
assert_equals(getComputedStyle(target).color, 'rgb(0, 128, 0)');
});
</script>

View file

@ -64,7 +64,7 @@
attrElem.removeAttribute('data-bar');
attrElem.setAttribute('data-bar', 'var(--x)');
test_attr_cycle('--x', 'attr(data-foo type(*), attr(data-bar))', 'attr(data-foo type(*))');
test_attr_cycle('--x', 'attr(data-foo type(*), attr(data-bar type(*)))', 'attr(data-foo type(*))');
attrElem.removeAttribute('data-bar');
attrElem.style.setProperty('--x', 'attr(data-foo type(*))');
@ -74,17 +74,32 @@
attrElem.removeAttribute('data-bar');
/* Cycle with fallback */
test_attr_cycle('--x', 'attr(data-foo type(<length>), 11px)', 'attr(data-foo type(<length>))');
test_attr_cycle('--x', 'attr(data-foo type(<length>))', 'attr(data-foo type(<length>), 11px)');
test_attr_cycle('--y', 'attr(data-foo type(*), 11px)', 'attr(data-foo type(*))');
test_attr_cycle('--x', 'attr(data-foo type(<length>), 3px)', 'var(--x)');
test_attr_cycle('--x', 'attr(data-foo type(<length>), 3px)', 'var(--x, 11px)');
attrElem.style.setProperty('--y', 'attr(data-foo)');
test_attr_no_cycle('--x', 'attr(data-foo type(<custom-ident>), 3px)', 'var(--y)', '3px');
attrElem.style.setProperty('--y', null);
/* Cycle within attributes, so we should fallback. */
test_attr_no_cycle('--x', 'attr(data-foo type(<length>), 11px)', 'attr(data-foo type(<length>), 3px)', '11px');
test_attr_no_cycle('--x', 'attr(data-foo type(<length>), 11px)', 'attr(data-foo type(<length>))', '11px');
test_attr_no_cycle('--y', 'attr(data-foo type(*), 11px)', 'attr(data-foo type(*))', '11px');
attrElem.setAttribute('data-bar', '11px');
test_attr_cycle('--x', 'attr(data-foo type(<length>), attr(data-bar type(<length>)))', 'attr(data-foo type(*))');
test_attr_no_cycle('--x', 'attr(data-foo type(<length>), attr(data-bar type(<length>)))', 'attr(data-foo type(*))', '11px');
attrElem.removeAttribute('data-bar');
attrElem.setAttribute('data-bar', 'abc');
test_attr_cycle('--y', 'attr(data-foo type(*), attr(data-bar))', 'attr(data-foo type(*))');
test_attr_no_cycle('--y', 'attr(data-foo type(*), attr(data-bar))', 'attr(data-foo type(*))', '"abc"');
attrElem.removeAttribute('data-bar');
attrElem.setAttribute('data-bar', 'attr(data-baz type(*), 3px)');
attrElem.setAttribute('data-baz', 'attr(data-foo type(*), 4px)');
test_attr_no_cycle('--y', 'attr(data-foo type(*), 1px)', 'attr(data-bar type(*), 2px)', '1px');
attrElem.removeAttribute('data-bar');
attrElem.removeAttribute('data-baz');
/* Cycle with var() and fallback */
attrElem.style.setProperty('--x', 'var(--y)');
test_attr_cycle('--y', 'var(--x, 100)', 'var(--y)');
@ -121,4 +136,7 @@
test_attr_no_cycle('--y', 'attr(data-foo type(*))', 'attr(data-bar, 11) var(--x, 3)', '"var(--x)" "attr(data-bar, 11) var(--x, 3)"');
attrElem.removeAttribute('data-bar');
attrElem.style.setProperty('--x', null);
/* No cycle, wrong attr syntax in attribute */
test_attr_no_cycle('--x', 'attr(data-foo type(*), abc)', 'attr(data-foo', 'abc');
</script>

View file

@ -528,6 +528,10 @@
// style() queries with range syntax in the condition, literals on both sides of equation
test_if_with_custom_properties('if(style(5 > 3): true_value; else: false_value)', [], 'true_value');
test_if_with_custom_properties('if(style(0 = 0): true_value; else: false_value)', [], 'true_value');
test_if_with_custom_properties('if(style(0 = 0px): true_value; else: false_value)', [], 'true_value');
test_if_with_custom_properties('if(style(0 = 0%): true_value; else: false_value)', [], 'false_value');
test_if_with_custom_properties('if(style(0 < 3px): true_value; else: false_value)', [], 'true_value');
test_if_with_custom_properties('if(style(5 > 3 !invalid): true_value; else: false_value)', [], 'false_value');
test_if_with_custom_properties('if(style(5 !invalid > 3): true_value; else: false_value)', [], 'false_value');
test_if_with_custom_properties('if(style(5 > 3 !): true_value; else: false_value)', [], 'false_value');

View file

@ -0,0 +1,4 @@
features:
- name: sibling-count
files: "**"

View file

@ -0,0 +1,13 @@
<link rel=help href="https://bug1982469.bmoattachments.org/attachment.cgi?id=9506532">
<script>
let a;
const func_01 = function(arg) {
try { arg.currentTarget.replaceChild(a, arg.currentTarget.childNodes[0]) } catch (e) {}
}
window.addEventListener("DOMContentLoaded", () => {
a = document.createElement("style")
document.documentElement.getBoundingClientRect();
document.addEventListener("readystatechange", func_01, {})
document.startViewTransition(func_01)
})
</script>

View file

@ -31,15 +31,15 @@
};
["DOMMatrix", "DOMMatrixReadOnly"].forEach(function(constr) {
test(function() {
checkDOMMatrix(new self[constr](), initial);
checkMatrix(new self[constr](), initial);
}, `new ${constr}()`);
test(function() {
checkDOMMatrix(new self[constr](undefined), initial);
checkMatrix(new self[constr](undefined), initial);
}, `new ${constr}(undefined)`);
test(function() {
checkDOMMatrix(new self[constr](new self[constr]()), initial);
checkMatrix(new self[constr](new self[constr]()), initial);
}, `new ${constr}(new ${constr}())`);
['none',
@ -51,7 +51,7 @@
'',
].forEach(function(string) {
test(function() {
checkDOMMatrix(new self[constr](string), initial);
checkMatrix(new self[constr](string), initial);
}, `new ${constr}(${format_value(string)})`);
});
@ -61,12 +61,12 @@
0.0, 2.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0]);
checkDOMMatrix(new self[constr](float32Array), scaleTranslate2D, false);
checkMatrix(new self[constr](float32Array), matrix3D(scaleTranslate2D));
}, `new ${constr}(float32Array) 16 elements`);
test(function() {
var float32Array = new Float32Array([2.0, 0.0, 0.0, 2.0, 10.0, 10.0]);
checkDOMMatrix(new self[constr](float32Array), scaleTranslate2D);
checkMatrix(new self[constr](float32Array), scaleTranslate2D);
}, `new ${constr}(float32Array) 6 elements`);
test(function() {
@ -75,12 +75,12 @@
0.0, 2.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0]);
checkDOMMatrix(new self[constr](float64Array), scaleTranslate2D, false);
checkMatrix(new self[constr](float64Array), matrix3D(scaleTranslate2D));
}, `new ${constr}(float64Array) 16 elements`);
test(function() {
var float64Array = new Float64Array([2.0, 0.0, 0.0, 2.0, 10.0, 10.0]);
checkDOMMatrix(new self[constr](float64Array), scaleTranslate2D);
checkMatrix(new self[constr](float64Array), scaleTranslate2D);
}, `new ${constr}((float64Array) 6 elements`);
[
@ -91,8 +91,8 @@
[2.0, 0.0, 0.0, 2.0, 10.0, 10.0],
].forEach(function(sequence) {
test(function() {
checkDOMMatrix(new self[constr](sequence), scaleTranslate2D,
sequence.length == 6);
var expected = sequence.length == 6 ? scaleTranslate2D : matrix3D(scaleTranslate2D);
checkMatrix(new self[constr](sequence), expected);
}, `new ${constr}(sequence) ${sequence.length} elements`);
});
@ -163,7 +163,7 @@
1.0, 2.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0];
checkDOMMatrix(new self[constr](sequence), {
checkMatrix(new self[constr](sequence), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,
@ -179,7 +179,7 @@
1.0, 2.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
10.0, 10.0, 0.0, 1.0]);
checkDOMMatrix(new self[constr](matrix), {
checkMatrix(new self[constr](matrix), {
m11: 2, m21: 1, m31: 0, m41: 10,
m12: 1, m22: 2, m32: 0, m42: 10,
m13: 0, m23: 0, m33: 1, m43: 0,

View file

@ -28,55 +28,55 @@
test(function() {
var matrix = initialMatrix();
matrix.translate(1,5,3);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test translate() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.scale(1,5,3,0,1,3);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test scale() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.scaleNonUniform(1,5);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test scaleNonUniform() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.scale3d(3,2,1,1);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test scale3d() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.rotate(Math.PI, Math.PI/2, Math.PI/6);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test rotate() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.rotateFromVector(10,-4);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test rotateFromVector() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.rotateAxisAngle(3,4,5, Math.PI/6);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test rotateAxisAngle() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.skewX(20);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test skewX() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.skewY(20);
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test skewY() doesn't mutate");
test(function() {
@ -87,25 +87,25 @@
m41:5, m42:0, m43: 2, m44:1,
is2D: false,
isIdentity:false });
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test multiply() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.flipX();
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test flipX() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.flipY();
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test flipY() doesn't mutate");
test(function() {
var matrix = initialMatrix();
matrix.inverse();
checkDOMMatrix(matrix, initialMatrix());
checkMatrix(matrix, initialMatrix());
},"test inverse() doesn't mutate");
</script>

View file

@ -4,6 +4,7 @@
<title>Geometry Interfaces: Test DOMMatrix non-mutating methods</title>
<link href="mailto:peter.hall@algomi.com" rel="author" title="Peter Hall">
<link rel="help" href="https://drafts.fxtf.org/geometry-1/#DOMMatrix">
<script src="support/dommatrix-test-util.js"></script>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
@ -105,7 +106,7 @@
m.m43 += tx * m.m13 + ty * m.m23 + tz * m.m33;
m.m44 += tx * m.m14 + ty * m.m24 + tz * m.m34;
});
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test translate()");
test(function() {
@ -127,7 +128,7 @@
m.m33 *= sz;
m.m34 *= sz;
});
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scale() without offsets");
test(function() {
@ -136,35 +137,35 @@
.translate(11, 7, 13)
.scale(2, 5, 3)
.translate(-11, -7, -13);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scale() with offsets");
test(function() {
var result = new DOMMatrixReadOnly([1, 2, 3, 4, 5, 6])
.scale(1, 1, 1, 1, 1, 1);
var expected = new DOMMatrixReadOnly([1, 2, 0, 0, 3, 4, 0, 0, 0, 0, 1, 0, 5, 6, 0, 1]);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scale() with identity scale and nonzero originZ");
test(function() {
var result = initialDOMMatrix().scaleNonUniform();
var expected = initialDOMMatrix()
.scale(1, 1, 1, 0, 0, 0);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scaleNonUniform()");
test(function() {
var result = initialDOMMatrix().scaleNonUniform(6);
var expected = initialDOMMatrix()
.scale(6, 1, 1, 0, 0, 0);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scaleNonUniform() with sx");
test(function() {
var result = initialDOMMatrix().scaleNonUniform(5, 7);
var expected = initialDOMMatrix()
.scale(5, 7, 1, 0, 0, 0);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scaleNonUniform() with sx, sy");
test(function() {
@ -173,19 +174,19 @@
.translate(5, 2, 3)
.scale(7, 7, 7)
.translate(-5, -2, -3);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test scale3d()");
test(function() {
var result = initialDOMMatrix().rotate(-90);
var expected = initialDOMMatrix().multiply(getRotationMatrix(0, 0, 1, -90));
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotate() 2d");
test(function() {
var result = initialDOMMatrix().rotate(180, 180, 90);
var expected = initialDOMMatrix().rotate(0,0,-90);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotate()");
test(function() {
@ -194,43 +195,43 @@
.rotate(0, 0, 90)
.rotate(0, 90, 0)
.rotate(90, 0, 0);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotate() order");
test(function() {
var result = initialDOMMatrix().rotateFromVector(1, 1);
var expected = initialDOMMatrix().rotate(45);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotateFromVector()");
test(function() {
var result = initialDOMMatrix().rotateFromVector(0, 1);
var expected = initialDOMMatrix().rotate(90);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotateFromVector() with x being zero");
test(function() {
var result = initialDOMMatrix().rotateFromVector(1, 0);
var expected = initialDOMMatrix()
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotateFromVector() with y being zero");
test(function() {
var result = initialDOMMatrix().rotateFromVector(0, 0);
var expected = initialDOMMatrix()
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotateFromVector() with two zeros");
test(function() {
var result = initialDOMMatrix().rotateAxisAngle(3, 3, 3, 120);
var expected = initialDOMMatrix().multiply(getRotationMatrix(3, 3, 3, 120));
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotateAxisAngle() ");
test(function() {
var result = new DOMMatrix([1, 1, 1, 1, 1, 1]).rotateAxisAngle(0, 0, 3, 90);
var expected = new DOMMatrix([1, 1, -1, -1, 1, 1]);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test rotateAxisAngle() on 2D matrix with 2D rotation");
test(function() {
@ -243,7 +244,7 @@
0, 0, 1, 0,
0, 0, 0, 1])
var expected = initialDOMMatrix().multiply(skew);
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test skewX()");
test(function() {
@ -256,24 +257,24 @@
0, 0, 1, 0,
0, 0, 0, 1])
var expected = initialDOMMatrix().multiply(skew);
checkDOMMatrix(result, expected);
checkMatrix(result, result, { epsilon });
},"test skewY()");
test(function() {
var result = initialDOMMatrix().multiply(initialDOMMatrix().inverse());
checkDOMMatrix(result, identity());
checkMatrix(result, identity(), { epsilon });
},"test multiply with inverse is identity");
test(function() {
var result = initialDOMMatrix().flipX();
var expected = initialDOMMatrix().multiply(new DOMMatrix([-1, 0, 0, 1, 0, 0]));
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test flipX()");
test(function() {
var result = initialDOMMatrix().flipY();
var expected = initialDOMMatrix().multiply(new DOMMatrix([1, 0, 0, -1, 0, 0]));
checkDOMMatrix(result, expected);
checkMatrix(result, expected, { epsilon });
},"test flipY()");
test(function() {
@ -292,26 +293,6 @@
checkDOMPoint(result, expected);
},"test transformPoint() - 3d matrix");
function checkDOMMatrix(m, exp) {
assert_approx_equals(m.m11, exp.m11, epsilon, "Expected value for m11 is " + exp.m11);
assert_approx_equals(m.m12, exp.m12, epsilon, "Expected value for m12 is " + exp.m12);
assert_approx_equals(m.m13, exp.m13, epsilon, "Expected value for m13 is " + exp.m13);
assert_approx_equals(m.m14, exp.m14, epsilon, "Expected value for m14 is " + exp.m14);
assert_approx_equals(m.m21, exp.m21, epsilon, "Expected value for m21 is " + exp.m21);
assert_approx_equals(m.m22, exp.m22, epsilon, "Expected value for m22 is " + exp.m22);
assert_approx_equals(m.m23, exp.m23, epsilon, "Expected value for m23 is " + exp.m23);
assert_approx_equals(m.m24, exp.m24, epsilon, "Expected value for m24 is " + exp.m24);
assert_approx_equals(m.m31, exp.m31, epsilon, "Expected value for m31 is " + exp.m31);
assert_approx_equals(m.m32, exp.m32, epsilon, "Expected value for m32 is " + exp.m32);
assert_approx_equals(m.m33, exp.m33, epsilon, "Expected value for m33 is " + exp.m33);
assert_approx_equals(m.m34, exp.m34, epsilon, "Expected value for m34 is " + exp.m34);
assert_approx_equals(m.m41, exp.m41, epsilon, "Expected value for m41 is " + exp.m41);
assert_approx_equals(m.m42, exp.m42, epsilon, "Expected value for m42 is " + exp.m42);
assert_approx_equals(m.m43, exp.m43, epsilon, "Expected value for m43 is " + exp.m43);
assert_approx_equals(m.m44, exp.m44, epsilon, "Expected value for m44 is " + exp.m44);
assert_equals(m.is2D, exp.is2D, "Expected value for is2D is " + exp.is2D);
}
function checkDOMPoint(p, exp) {
assert_equals(p.x, exp.x, "x is not matched");
assert_equals(p.y, exp.y, "y is not matched");

View file

@ -10,9 +10,6 @@ test(function() {
assert_true(m.isIdentity);
var m1 = m.inverse();
assert_true(m1.isIdentity);
// Use checkMatrix() instead of checkDOMMatrix() because checkMatrix() has
// a default epsilon = Number.MIN_VALUE which can at least pass
// assert_approx_equal(0, -0, epsilon).
checkMatrix(m, m1);
m.invertSelf();
checkMatrix(m, m1);

View file

@ -13,13 +13,12 @@
[[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]],
].forEach(([actual_array, expected_array]) => {
var is2D = false;
test(() => {
const actual = new DOMMatrix(actual_array);
const actualInvertSelfReturnValue = actual.invertSelf();
assert_true(actual === actualInvertSelfReturnValue);
const expected = new DOMMatrix(expected_array);
checkDOMMatrix(actual, expected, is2D);
checkMatrix(actual, expected);
}, `new DOMMatrix([${actual_array}]).invertSelf()`);
});
</script>

View file

@ -16,10 +16,10 @@ function matrix3D(dict) {
m21: 0, m22: 1, m23: 0, m24: 0,
m31: 0, m32: 0, m33: 1, m34: 0,
m41: 0, m42: 0, m43: 0, m44: 1}
matrix.is2D = false;
for (let member in dict) {
matrix[member] = dict[member];
}
matrix.is2D = false;
matrix.a = matrix.m11;
matrix.b = matrix.m12;
matrix.c = matrix.m21;
@ -45,32 +45,6 @@ function checkMatrix(actual, expected, { epsilon = Number.MIN_VALUE } = {}) {
}
}
// checkMatrix and checkDOMMatrix should probably be merged...
function checkDOMMatrix(m, exp, is2D) {
if (is2D === undefined) {
is2D = exp.is2D;
}
assert_equals(m.m11, exp.m11, "Expected value for m11 is " + exp.m11);
assert_equals(m.m12, exp.m12, "Expected value for m12 is " + exp.m12);
assert_equals(m.m13, exp.m13, "Expected value for m13 is " + exp.m13);
assert_equals(m.m14, exp.m14, "Expected value for m14 is " + exp.m14);
assert_equals(m.m21, exp.m21, "Expected value for m21 is " + exp.m21);
assert_equals(m.m22, exp.m22, "Expected value for m22 is " + exp.m22);
assert_equals(m.m23, exp.m23, "Expected value for m23 is " + exp.m23);
assert_equals(m.m24, exp.m24, "Expected value for m24 is " + exp.m24);
assert_equals(m.m31, exp.m31, "Expected value for m31 is " + exp.m31);
assert_equals(m.m32, exp.m32, "Expected value for m32 is " + exp.m32);
assert_equals(m.m33, exp.m33, "Expected value for m33 is " + exp.m33);
assert_equals(m.m34, exp.m34, "Expected value for m34 is " + exp.m34);
assert_equals(m.m41, exp.m41, "Expected value for m41 is " + exp.m41);
assert_equals(m.m42, exp.m42, "Expected value for m42 is " + exp.m42);
assert_equals(m.m43, exp.m43, "Expected value for m43 is " + exp.m43);
assert_equals(m.m44, exp.m44, "Expected value for m44 is " + exp.m44);
assert_equals(m.is2D, is2D, "Expected value for is2D is " + is2D);
assert_equals(m.isIdentity, exp.isIdentity, "Expected value for isIdentity is " + exp.isIdentity);
}
function identity() {
return new DOMMatrix(
[1, 0, 0, 0,

View file

@ -31,4 +31,8 @@
test_invalid_selector(':heading(2, 3n)');
test_invalid_selector(':heading(2 of .foo)');
test_invalid_selector(':heading(2n of .foo)');
test_invalid_selector(':heading(calc(1))');
test_invalid_selector(':heading(max(1, 2))');
test_invalid_selector(':heading(min(1, 2)');
test_invalid_selector(':heading(var(--level))');
</script>

View file

@ -105,10 +105,15 @@ async function waitForScrollReset(test, scroller, x = 0, y = 0) {
async function createScrollendPromiseForTarget(test,
target_div,
timeoutMs = 500) {
timeoutMs = 500,
targetIsRoot = false) {
return waitForScrollendEvent(test, target_div, timeoutMs).then(evt => {
assert_false(evt.cancelable, 'Event is not cancelable');
assert_false(evt.bubbles, 'Event targeting element does not bubble');
if (targetIsRoot) {
assert_true(evt.bubbles, 'Event targeting element does not bubble');
} else {
assert_false(evt.bubbles, 'Event targeting element does not bubble');
}
});
}

Some files were not shown because too many files have changed in this diff Show more