Auto merge of #24301 - servo-wpt-sync:wpt_update_26-09-2019, r=jdm

Sync WPT with upstream (26-09-2019)

Automated downstream sync of changes from upstream as of 26-09-2019.
[no-wpt-sync]

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24301)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-09-26 14:21:05 -04:00 committed by GitHub
commit 9e6c0de73d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
122 changed files with 2585 additions and 569 deletions

View file

@ -14,6 +14,9 @@
[Revoke blob URL after creating Request, will fetch] [Revoke blob URL after creating Request, will fetch]
expected: FAIL expected: FAIL
[Revoke blob URL after calling fetch, fetch should succeed]
expected: FAIL
[url-with-fetch.any.html] [url-with-fetch.any.html]
[Untitled] [Untitled]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
[pre-wrap-017.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[pre-wrap-018.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[pre-wrap-019.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[pre-wrap-020.html]
expected: FAIL

View file

@ -1,2 +0,0 @@
[white-space-intrinsic-size-004.html]
expected: FAIL

View file

@ -1,5 +1,4 @@
[perspective-interpolation.html] [perspective-interpolation.html]
expected: CRASH
[ perspective interpolation] [ perspective interpolation]
expected: FAIL expected: FAIL

View file

@ -0,0 +1,2 @@
[fill-box-mutation-001.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[fill-box-mutation-002.html]
expected: FAIL

View file

@ -23,3 +23,45 @@
[e.style['transform'\] = "rotate(min(1turn))" should set the property value] [e.style['transform'\] = "rotate(min(1turn))" should set the property value]
expected: FAIL expected: FAIL
[e.style['transform'\] = "rotate(min(1deg, 2deg, 3deg))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(calc(1rad + min(1deg)))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(max(3deg, 2deg, 1deg))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(calc(1rad + max(1deg)))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(min(3deg, 2deg, 1deg))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(max(0.25turn, 1.57rad, 90deg))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(calc(min(1deg) + 1rad))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(max(90deg, 1.57rad, 0.25turn))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(min(90deg, 1.57rad, 0.25turn))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(min(0.25turn, 1.57rad, 90deg))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(calc(max(1deg) + max(2deg)))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(calc(max(1deg) + 1rad))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(max(1deg, 2deg, 3deg))" should set the property value]
expected: FAIL
[e.style['transform'\] = "rotate(calc(min(1deg) + min(2deg)))" should set the property value]
expected: FAIL

View file

@ -0,0 +1,61 @@
[minmax-time-serialize.html]
[e.style['transition-delay'\] = "calc(min(1s) + min(2s))" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(max(1s) + max(2s))" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(max(2s) + max(1s))" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "min(1ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(1s + max(2s))" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "max(1ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "min(1s, 1000ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(min(2s) + min(1s))" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(max(2s) + 1s)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "max(1ms, 2ms, 3ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "min(1ms, 2ms, 3ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "min(1000ms, 1s)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "min(1s)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(1s + min(2s))" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "max(1s)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "calc(min(2s) + 1s)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "max(1s, 1000ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "max(1000ms, 1s)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "max(3ms, 2ms, 1ms)" should set the property value]
expected: FAIL
[e.style['transition-delay'\] = "min(3ms, 2ms, 1ms)" should set the property value]
expected: FAIL

View file

@ -1,2 +0,0 @@
[matchMedia-display-none-iframe.html]
expected: ERROR

View file

@ -829,3 +829,6 @@
[XPathEvaluator interface: existence and properties of interface prototype object] [XPathEvaluator interface: existence and properties of interface prototype object]
expected: FAIL expected: FAIL
[ShadowRoot interface: attribute onslotchange]
expected: FAIL

View file

@ -0,0 +1,2 @@
[contenttype_txt.html]
expected: CRASH

View file

@ -315,27 +315,15 @@
[<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html] [<iframe>: combined response Content-Type: text/html;charset=gbk text/plain text/html]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;" \\" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: */* text/html] [<iframe>: combined response Content-Type: */* text/html]
expected: FAIL expected: FAIL
[<iframe>: separate response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: combined response Content-Type: text/html;" text/plain]
expected: FAIL
[<iframe>: separate response Content-Type: text/html */*;charset=gbk]
expected: FAIL
[<iframe>: separate response Content-Type: text/plain */*] [<iframe>: separate response Content-Type: text/plain */*]
expected: FAIL expected: FAIL
[<iframe>: separate response Content-Type: text/html;" \\" text/plain] [<iframe>: combined response Content-Type: text/html */*]
expected: FAIL expected: FAIL
[<iframe>: combined response Content-Type: text/html;x=" text/plain] [<iframe>: separate response Content-Type: text/plain */*;charset=gbk]
expected: FAIL expected: FAIL

View file

@ -56,9 +56,3 @@
[separate text/javascript x/x] [separate text/javascript x/x]
expected: FAIL expected: FAIL
[separate text/javascript;charset=windows-1252 error text/javascript]
expected: FAIL
[separate text/javascript ]
expected: FAIL

View file

@ -11,6 +11,6 @@
[X-Content-Type-Options%3A%20nosniff%0C] [X-Content-Type-Options%3A%20nosniff%0C]
expected: FAIL expected: FAIL
[Content-Type-Options%3A%20nosniff] [X-Content-Type-Options%3A%20%22nosniFF%22]
expected: FAIL expected: FAIL

View file

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

View file

@ -1454,6 +1454,9 @@
[SVGElement interface: attribute autofocus] [SVGElement interface: attribute autofocus]
expected: FAIL expected: FAIL
[SVGElement interface: attribute onslotchange]
expected: FAIL
[idlharness.https.html?include=(Document|Window)] [idlharness.https.html?include=(Document|Window)]
[Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type] [Document interface: documentWithHandlers must inherit property "queryCommandEnabled(DOMString)" with the proper type]
@ -1849,6 +1852,24 @@
[Document interface: calling queryCommandState(DOMString) on documentWithHandlers with too few arguments must throw TypeError] [Document interface: calling queryCommandState(DOMString) on documentWithHandlers with too few arguments must throw TypeError]
expected: FAIL expected: FAIL
[Document interface: new Document() must inherit property "onslotchange" with the proper type]
expected: FAIL
[Document interface: documentWithHandlers must inherit property "onslotchange" with the proper type]
expected: FAIL
[Window interface: window must inherit property "onslotchange" with the proper type]
expected: FAIL
[Document interface: attribute onslotchange]
expected: FAIL
[Window interface: attribute onslotchange]
expected: FAIL
[Document interface: iframe.contentDocument must inherit property "onslotchange" with the proper type]
expected: FAIL
[idlharness.https.html?include=HTML.*] [idlharness.https.html?include=HTML.*]
[HTMLInputElement interface: calling setCustomValidity(DOMString) on createInput("hidden") with too few arguments must throw TypeError] [HTMLInputElement interface: calling setCustomValidity(DOMString) on createInput("hidden") with too few arguments must throw TypeError]
@ -5097,3 +5118,9 @@
[HTMLElement interface: attribute autofocus] [HTMLElement interface: attribute autofocus]
expected: FAIL expected: FAIL
[HTMLElement interface: attribute onslotchange]
expected: FAIL
[HTMLElement interface: document.createElement("noscript") must inherit property "onslotchange" with the proper type]
expected: FAIL

View file

@ -0,0 +1,7 @@
[toggleEvent.html]
[Calling open twice on 'details' fires only one toggle event]
expected: FAIL
[Setting open=true to opened 'details' element should not fire a toggle event at the 'details' element]
expected: FAIL

View file

@ -387,3 +387,12 @@
[onformdata: the default value must be null] [onformdata: the default value must be null]
expected: FAIL expected: FAIL
[onslotchange: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onslotchange: the content attribute must be compiled into a function as the corresponding property]
expected: FAIL
[onslotchange: the default value must be null]
expected: FAIL

View file

@ -78,3 +78,12 @@
[not shadowed formdata (document.createElement("body"))] [not shadowed formdata (document.createElement("body"))]
expected: FAIL expected: FAIL
[not shadowed slotchange (window)]
expected: FAIL
[not shadowed slotchange (document.createElement("body"))]
expected: FAIL
[not shadowed slotchange (document.body)]
expected: FAIL

View file

@ -71,3 +71,12 @@
[not shadowed formdata (window)] [not shadowed formdata (window)]
expected: FAIL expected: FAIL
[not shadowed slotchange (window)]
expected: FAIL
[not shadowed slotchange (document.createElement("frameset"))]
expected: FAIL
[not shadowed slotchange (document.body)]
expected: FAIL

View file

@ -32,3 +32,9 @@
[formdata is unaffected on a windowless body] [formdata is unaffected on a windowless body]
expected: FAIL expected: FAIL
[slotchange is unaffected on a windowless frameset]
expected: FAIL
[slotchange is unaffected on a windowless body]
expected: FAIL

View file

@ -221,3 +221,12 @@
[XRSession interface: operation end()] [XRSession interface: operation end()]
expected: FAIL expected: FAIL
[XR interface: operation isSessionSupported(XRSessionMode)]
expected: FAIL
[XR interface: calling isSessionSupported(XRSessionMode) on navigator.xr with too few arguments must throw TypeError]
expected: FAIL
[XR interface: navigator.xr must inherit property "isSessionSupported(XRSessionMode)" with the proper type]
expected: FAIL

View file

@ -0,0 +1,2 @@
[Worker-constructor.html]
expected: ERROR

View file

@ -2835,7 +2835,6 @@
- name: 2d.pattern.image.incomplete.nosrc - name: 2d.pattern.image.incomplete.nosrc
testing: testing:
- 2d.pattern.incomplete.image - 2d.pattern.incomplete.image
mozilla: { throws }
code: | code: |
var img = new Image(); var img = new Image();
@assert ctx.createPattern(img, 'repeat') === null; @assert ctx.createPattern(img, 'repeat') === null;

View file

@ -3,18 +3,18 @@
/** /**
* This file contains the webplatform smoke tests for the optional * This file contains the webplatform smoke tests for the optional
* relaxedDurability parameter of the IndexedDB transaction API. * durability parameter of the IndexedDB transaction API.
* *
* @author enne@chromium.org * @author enne@chromium.org
*/ */
// Smoke test optional parameter on IndexedDB.transaction. // Smoke test optional parameter on IndexedDB.transaction.
let cases = [ let cases = [
undefined, { options: undefined, expected: 'default' },
{}, { options: {}, expected: 'default' },
{durability: "default"}, { options: { durability: 'default'}, expected: 'default' },
{durability: "relaxed"}, { options: { durability: 'relaxed'}, expected: 'relaxed' },
{durability: "strict"}, { options: { durability: 'strict'}, expected: 'strict' },
]; ];
for (let i = 0; i < cases.length; ++i) { for (let i = 0; i < cases.length; ++i) {
@ -22,11 +22,13 @@ for (let i = 0; i < cases.length; ++i) {
const db = await createDatabase(testCase, db => { const db = await createDatabase(testCase, db => {
createBooksStore(testCase, db); createBooksStore(testCase, db);
}); });
const txn = db.transaction(['books'], 'readwrite', cases[i]); const txn = db.transaction(['books'], 'readwrite', cases[i].options);
const objectStore = txn.objectStore('books'); const objectStore = txn.objectStore('books');
objectStore.put({isbn: 'one', title: 'title1'}); objectStore.put({isbn: 'one', title: 'title1'});
await promiseForTransaction(testCase, txn); await promiseForTransaction(testCase, txn);
assert_equals(txn.durability, cases[i].expected);
const txn2 = db.transaction(['books'], 'readonly'); const txn2 = db.transaction(['books'], 'readonly');
const objectStore2 = txn2.objectStore('books'); const objectStore2 = txn2.objectStore('books');
const getTitle1 = objectStore2.get('one'); const getTitle1 = objectStore2.get('one');
@ -38,3 +40,14 @@ for (let i = 0; i < cases.length; ++i) {
db.close(); db.close();
}, 'Committed data can be read back out: case ' + i); }, 'Committed data can be read back out: case ' + i);
} }
promise_test(async testCase => {
const db = await createDatabase(testCase, db => {
createBooksStore(testCase, db);
});
assert_throws(new TypeError(), function() {
db.transaction(['books'], 'readwrite', { durability: 'invalid' });
});
db.close();
}, 'Invalid durability option throws a TypeError');

View file

@ -1,4 +1,4 @@
spec: https://wicg.github.io/animation-worklet/ spec: https://drafts.css-houdini.org/css-animationworklet/
suggested_reviewers: suggested_reviewers:
- flackr - flackr
- majido - majido

View file

@ -6,7 +6,7 @@
// https://wicg.github.io/animation-worklet/ // https://wicg.github.io/animation-worklet/
idl_test( idl_test(
['animation-worklet'], ['css-animation-worklet'],
['worklets', 'web-animations', 'html', 'cssom', 'dom'], ['worklets', 'web-animations', 'html', 'cssom', 'dom'],
idl_array => { idl_array => {
idl_array.add_objects({ idl_array.add_objects({

View file

@ -2,3 +2,4 @@ spec: https://w3c.github.io/battery/
suggested_reviewers: suggested_reviewers:
- anssiko - anssiko
- zqzhang - zqzhang
- Honry

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
const relative_path = '/feature-policy/resources/feature-policy-battery.html';
const base_src = '/feature-policy/resources/redirect-on-load.html#';
const same_origin_src = base_src + relative_path;
const cross_origin_src = base_src + 'https://{{domains[www]}}:{{ports[https][0]}}' +
relative_path;
const header = 'Feature-Policy allow="battery"';
async_test(t => {
test_feature_availability(
'navigator.getBattery()', t, same_origin_src,
expect_feature_available_default, 'battery');
}, `${header} allows same-origin relocation.`);
async_test(t => {
test_feature_availability(
'navigator.getBattery()', t, cross_origin_src,
expect_feature_unavailable_default, 'battery');
}, `${header} disallows cross-origin relocation.`);
</script>
</body>

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
const same_origin_src = '/feature-policy/resources/feature-policy-battery.html';
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
same_origin_src;
const feature_name = 'Feature policy "battery"';
const header = 'allow="battery" attribute';
async_test(t => {
test_feature_availability(
'navigator.getBattery()', t, same_origin_src,
expect_feature_available_default, 'battery');
}, `${feature_name} can be enabled in same-origin iframe using ${header}`);
async_test(t => {
test_feature_availability(
'navigator.getBattery()', t, cross_origin_src,
expect_feature_available_default, 'battery');
}, `${feature_name} can be enabled in cross-origin iframe using ${header}`);
</script>
</body>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
const same_origin_src = '/feature-policy/resources/feature-policy-battery.html';
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
same_origin_src;
const header = 'Feature-Policy header {"battery" : ["*"]}';
promise_test(
async () => await navigator.getBattery(),
`${header} allows the top-level document.`);
async_test(t => {
test_feature_availability('navigator.getBattery()', t, same_origin_src,
expect_feature_available_default);
}, `${header} allows same-origin iframes.`);
async_test(t => {
test_feature_availability('navigator.getBattery()', t, cross_origin_src,
expect_feature_available_default);
}, `${header} allows cross-origin iframes.`);
</script>
</body>

View file

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Battery Test: navigator.getBattery() is not allowed in non top-level browsing context</title> <title>Battery Test: navigator.getBattery() is allowed in same origin iframe</title>
<link rel="author" title="Intel" href="http://www.intel.com"> <link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://www.w3.org/TR/battery-status/"> <link rel="help" href="https://www.w3.org/TR/battery-status/">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
@ -16,12 +16,11 @@ function load_iframe(iframe, src) {
}); });
} }
promise_test(t => { promise_test(async t => {
var iframe = document.getElementById('blank'); let iframe = document.getElementById('blank');
var src = 'support-iframe.html'; const src = 'support-iframe.html';
return load_iframe(iframe, src) iframe = await load_iframe(iframe, src);
.then(iframe => promise_rejects(t, 'SecurityError', await iframe.contentWindow.navigator.getBattery();
iframe.contentWindow.navigator.getBattery())); }, "navigator.getBattery() is allowed in same origin iframe");
}, "throw a 'SecurityError' when invoking navigator.getBattery() within iframe");
</script> </script>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
const same_origin_src = '/feature-policy/resources/feature-policy-battery.html';
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
same_origin_src;
const header = 'Default "battery" feature policy ["self"]';
promise_test(
async () => await navigator.getBattery(),
`${header} allows the top-level document.`);
async_test(t => {
test_feature_availability('navigator.getBattery()', t, same_origin_src,
expect_feature_available_default);
}, `${header} allows same-origin iframes.`);
async_test(t => {
test_feature_availability('navigator.getBattery()', t, cross_origin_src,
expect_feature_unavailable_default);
}, `${header} disallows cross-origin iframes.`);
</script>
</body>

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<body>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/feature-policy/resources/featurepolicy.js></script>
<script>
'use strict';
const same_origin_src = '/feature-policy/resources/feature-policy-battery.html';
const cross_origin_src = 'https://{{domains[www]}}:{{ports[https][0]}}' +
same_origin_src;
const header = 'Feature-Policy header {"battery" : []}';
promise_test(async t => {
await promise_rejects(t, 'NotAllowedError', navigator.getBattery());
}, `${header} disallows the top-level document.`);
async_test(t => {
test_feature_availability('navigator.getBattery()', t, same_origin_src,
expect_feature_unavailable_default);
}, `${header} disallows same-origin iframes.`);
async_test(t => {
test_feature_availability('navigator.getBattery()', t, cross_origin_src,
expect_feature_unavailable_default);
}, `${header} disallows cross-origin iframes.`);
</script>
</body>

View file

@ -0,0 +1 @@
Feature-Policy: battery 'none'

View file

@ -0,0 +1,27 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Battery Test: navigator.getBattery() is not allowed in cross origin iframe</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<link rel="help" href="https://www.w3.org/TR/battery-status/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<iframe id="blank" src="about:blank" style="display: none"></iframe>
<script>
function load_iframe(iframe, src) {
return new Promise((resolve, reject) => {
iframe.onload = () => resolve(iframe);
iframe.src = src;
});
}
promise_test(async t => {
let iframe = document.getElementById('blank');
const path = location.pathname.substring(0, location.pathname.lastIndexOf('/') + 1);
const src = 'https://{{domains[www1]}}:{{ports[https][0]}}' + path + 'support-iframe.html';
iframe = await load_iframe(iframe, src);
await promise_rejects(t, 'NotAllowedError', iframe.contentWindow.navigator.getBattery());
}, "throw a 'NotAllowedError' when invoking navigator.getBattery() within cross-origin iframe");
</script>

View file

@ -0,0 +1,3 @@
<link rel="stylesheet" href="/fonts/ahem.css">
<meta name="flags" content="ahem">
<div style="opacity: 0.5; letter-spacing: -0.6em; font: 100px/1 Ahem; white-space: pre">X X X</div>

View file

@ -0,0 +1,6 @@
<link rel="help" href="http://www.w3.org/TR/css3-color/#transparency">
<link rel="match" href="opacity-overlapping-letters-ref.html">
<link rel="stylesheet" href="/fonts/ahem.css">
<meta name="flags" content="ahem">
<meta name="assert" content="Opacity should be apply on the whole text content atomically.">
<div style="opacity: 0.5; letter-spacing: -0.6em; font: 100px/1 Ahem">XXXXX</div>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateColumns</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#resolved-track-list" title="7.2.6. Resolved Value of a Track Listing">
<meta name="assert" content="Checks the resolved value of grid-template-columns on an element which is not a grid container.">
<style>
#target {
display: block;
height: 1px;
font-size: 1px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("grid-template-columns", "none");
test_computed_value("grid-template-columns", "1px");
test_computed_value("grid-template-columns", "1px [a]");
test_computed_value("grid-template-columns", "1px [a] 2px");
test_computed_value("grid-template-columns", "[a] 1px");
test_computed_value("grid-template-columns", "[a] 1px [b]");
test_computed_value("grid-template-columns", "1px repeat(1, 2px) 3px");
test_computed_value("grid-template-columns", "1px repeat(auto-fill, 2px) 3px");
test_computed_value("grid-template-columns", "1px repeat(auto-fit, 2px) 3px");
test_computed_value("grid-template-columns", "1px [a] repeat(1, [b] 2px [c]) [d] 3px");
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fill, [b] 2px [c]) [d] 3px");
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fit, [b] 2px [c]) [d] 3px");
test_computed_value("grid-template-columns", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-rows", "100% [a] repeat(1, [b] 200% [c]) [d] 300%");
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fill, [b] 200% [c]) [d] 300%");
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fit, [b] 200% [c]) [d] 300%");
test_computed_value("grid-template-columns", "[a] 1em repeat(1, 2em [b] 3em) 4em [d]", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
</script>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateColumns</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#resolved-track-list" title="7.2.6. Resolved Value of a Track Listing">
<meta name="assert" content="Checks the resolved value of grid-template-columns on a grid container.">
<style>
#target {
display: grid;
width: 1px;
font-size: 1px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("grid-template-columns", "none");
test_computed_value("grid-template-columns", "1px");
test_computed_value("grid-template-columns", "1px [a]");
test_computed_value("grid-template-columns", "1px [a] 2px");
test_computed_value("grid-template-columns", "[a] 1px");
test_computed_value("grid-template-columns", "[a] 1px [b]");
test_computed_value("grid-template-columns", "1px repeat(1, 2px) 3px", "1px 2px 3px");
test_computed_value("grid-template-columns", "1px repeat(auto-fill, 2px) 3px", "1px 2px 3px");
test_computed_value("grid-template-columns", "1px repeat(auto-fit, 2px) 3px", "1px 0px 3px");
test_computed_value("grid-template-columns", "1px [a] repeat(1, [b] 2px [c]) [d] 3px", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fill, [b] 2px [c]) [d] 3px", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-columns", "1px [a] repeat(auto-fit, [b] 2px [c]) [d] 3px", "1px [a b] 0px [c d] 3px");
test_computed_value("grid-template-columns", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-columns", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]", "[a] 1px 0px [b] 0px 4px [d]");
test_computed_value("grid-template-columns", "100% [a] repeat(1, [b] 200% [c]) [d] 300%", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-columns", "100% [a] repeat(auto-fill, [b] 200% [c]) [d] 300%", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-columns", "100% [a] repeat(auto-fit, [b] 200% [c]) [d] 300%", "1px [a b] 0px [c d] 3px");
test_computed_value("grid-template-columns", "[a] 1em repeat(1, 2em [b] 3em) 4em [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-columns", "[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]", "[a] 1px 0px [b] 0px 4px [d]");
</script>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateRows</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#resolved-track-list" title="7.2.6. Resolved Value of a Track Listing">
<meta name="assert" content="Checks the resolved value of grid-template-rows on an element which is not a grid container.">
<style>
#target {
display: block;
height: 1px;
font-size: 1px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("grid-template-rows", "none");
test_computed_value("grid-template-rows", "1px");
test_computed_value("grid-template-rows", "1px [a]");
test_computed_value("grid-template-rows", "1px [a] 2px");
test_computed_value("grid-template-rows", "[a] 1px");
test_computed_value("grid-template-rows", "[a] 1px [b]");
test_computed_value("grid-template-rows", "1px repeat(1, 2px) 3px");
test_computed_value("grid-template-rows", "1px repeat(auto-fill, 2px) 3px");
test_computed_value("grid-template-rows", "1px repeat(auto-fit, 2px) 3px");
test_computed_value("grid-template-rows", "1px [a] repeat(1, [b] 2px [c]) [d] 3px");
test_computed_value("grid-template-rows", "1px [a] repeat(auto-fill, [b] 2px [c]) [d] 3px");
test_computed_value("grid-template-rows", "1px [a] repeat(auto-fit, [b] 2px [c]) [d] 3px");
test_computed_value("grid-template-rows", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-rows", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-rows", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-rows", "100% [a] repeat(1, [b] 200% [c]) [d] 300%");
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fill, [b] 200% [c]) [d] 300%");
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fit, [b] 200% [c]) [d] 300%");
test_computed_value("grid-template-rows", "[a] 1em repeat(1, 2em [b] 3em) 4em [d]", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-rows", "[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]");
test_computed_value("grid-template-rows", "[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]");
</script>

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Grid Layout Test: getComputedStyle().gridTemplateRows</title>
<link rel="author" title="Oriol Brufau" href="mailto:obrufau@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-grid/#resolved-track-list" title="7.2.6. Resolved Value of a Track Listing">
<meta name="assert" content="Checks the resolved value of grid-template-rows on a grid container.">
<style>
#target {
display: grid;
height: 1px;
font-size: 1px;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/computed-testcommon.js"></script>
<div id="target"></div>
<script>
test_computed_value("grid-template-rows", "none");
test_computed_value("grid-template-rows", "1px");
test_computed_value("grid-template-rows", "1px [a]");
test_computed_value("grid-template-rows", "1px [a] 2px");
test_computed_value("grid-template-rows", "[a] 1px");
test_computed_value("grid-template-rows", "[a] 1px [b]");
test_computed_value("grid-template-rows", "1px repeat(1, 2px) 3px", "1px 2px 3px");
test_computed_value("grid-template-rows", "1px repeat(auto-fill, 2px) 3px", "1px 2px 3px");
test_computed_value("grid-template-rows", "1px repeat(auto-fit, 2px) 3px", "1px 0px 3px");
test_computed_value("grid-template-rows", "1px [a] repeat(1, [b] 2px [c]) [d] 3px", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-rows", "1px [a] repeat(auto-fill, [b] 2px [c]) [d] 3px", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-rows", "1px [a] repeat(auto-fit, [b] 2px [c]) [d] 3px", "1px [a b] 0px [c d] 3px");
test_computed_value("grid-template-rows", "[a] 1px repeat(1, 2px [b] 3px) 4px [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-rows", "[a] 1px repeat(auto-fill, 2px [b] 3px) 4px [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-rows", "[a] 1px repeat(auto-fit, 2px [b] 3px) 4px [d]", "[a] 1px 0px [b] 0px 4px [d]");
test_computed_value("grid-template-rows", "100% [a] repeat(1, [b] 200% [c]) [d] 300%", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fill, [b] 200% [c]) [d] 300%", "1px [a b] 2px [c d] 3px");
test_computed_value("grid-template-rows", "100% [a] repeat(auto-fit, [b] 200% [c]) [d] 300%", "1px [a b] 0px [c d] 3px");
test_computed_value("grid-template-rows", "[a] 1em repeat(1, 2em [b] 3em) 4em [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-rows", "[a] 1em repeat(auto-fill, 2em [b] 3em) 4em [d]", "[a] 1px 2px [b] 3px 4px [d]");
test_computed_value("grid-template-rows", "[a] 1em repeat(auto-fit, 2em [b] 3em) 4em [d]", "[a] 1px 0px [b] 0px 4px [d]");
</script>

View file

@ -13,6 +13,9 @@
padding: 1px; padding: 1px;
background: black; background: black;
} }
#reference {
text-align: center;
}
</style> </style>
<body> <body>
<div id="justify"><span></span></div> <div id="justify"><span></span></div>
@ -29,5 +32,5 @@ test(function() {
const ref_rect = ref_element.firstElementChild.getBoundingClientRect(); const ref_rect = ref_element.firstElementChild.getBoundingClientRect();
assert_equals(justify_rect.left, ref_rect.left); assert_equals(justify_rect.left, ref_rect.left);
assert_equals(justify_rect.right, ref_rect.right); assert_equals(justify_rect.right, ref_rect.right);
}, 'Left and right edges of empty inlines should align.'); }, 'content that cannot be justified should be centered when text-align-last is justify');
</script> </script>

View file

@ -0,0 +1,18 @@
<!doctype html>
<html>
<head>
<title>pre(white-space's one of values) crash if there is no available width</title>
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=999863">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>test(()=>{})</script>
</head>
<body>
abc<b style="margin-left: 100%; white-space: pre;">def</b>
<div>
<li>
<a href="dummy">success if does not crash</a>
</li>
</div>
</body>
</html>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with right alignement</title> <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with right alignement</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-012-ref.html"> <link rel="match" href="reference/pre-wrap-012-ref.html">
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of the line hang, so they do not have any effect when right-aligning."> <meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when right-aligning.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
div { div {
@ -22,6 +22,5 @@ div {
</style> </style>
<body> <body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div>XX&#x20; <div>XX XX</div>
XX </div>
</body> </body>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with center alignement</title> <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with center alignement</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-013-ref.html"> <link rel="match" href="reference/pre-wrap-013-ref.html">
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of the line hang, so they do not have any effect when centering."> <meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when centering.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
div { div {
@ -22,6 +22,5 @@ div {
</style> </style>
<body> <body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div>XX&#x20; <div>XX XX</div>
XX </div>
</body> </body>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with justification</title> <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with justification</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-014-ref.html"> <link rel="match" href="reference/pre-wrap-014-ref.html">
<meta name="assert" content="When white-space is pre-wrap, spaces at the end of the line hang, so they do not have any effect when justifying."> <meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines hang, so they do not have any effect when justifying.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
div { div {
@ -27,6 +27,6 @@ span {
</style> </style>
<body> <body>
<p>Test passes if there is a <strong>filled green rectangle</strong> and <strong>no red</strong>.</p> <p>Test passes if there is a <strong>filled green rectangle</strong> and <strong>no red</strong>.</p>
<div><span>X X</span>&#x20; <div><span>X X</span> X</div>
X</div><!-- invisible last line, because justification works on non-last lines--> <!-- invisible last line, because justification works on non-last lines-->
</body> </body>

View file

@ -0,0 +1,30 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: pre-wrap trailing spaces and max-content</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-001-ref.html">
<meta name="assert" content="When white-space is pre-wrap, trailing spaces spaces are taken into account for max-content">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
#red {
position: absolute;
z-index:-1;
width: 40px;
height: 40px;
background: red;
}
#test {
margin-left: -1em;
font: 40px/1 Ahem;
color: white;
background: green;
width: max-content;
white-space: pre-wrap
}
</style>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<div id=red></div>
<div id=test>X&#x0020;</div>

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: pre-wrap spaces and centering</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-018-ref.html">
<meta name="assert" content="conditionally hanging white space at the end of lines with forced breaks provides symmetry with the start of the line">
<style>
div {
font-size: 2rem;
margin: 1rem;
}
#test {
white-space: pre-wrap;
width: 5ch;
border: solid 1px;
font-family: monospace;
text-align: center;
text-decoration: underline;
}
#ref {
white-space: pre;
width: 5ch;
border: solid 1px;
font-family: monospace;
}
#ref span {
text-decoration: underline;
}
</style>
<p>Test passes if the two boxes below are identical.
<div id=test> 0 </div>
<div id=ref> <span> 0 </span></div>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: trailing pre-wrap spaces and hanging</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-019-ref.html">
<meta name="assert" content="trailing pre-wrap spaces hang at soft-wrapped lines, and hang conditionally before forced breaks.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font-size: 2rem;
font-family: Ahem;
width: 3ch;
}
#test1, #test2 {
white-space: pre-wrap;
color: green;
}
#test2 {
text-align: right;
}
.ref {
white-space: pre;
color: red;
position: absolute;
z-index: -1;
}
</style>
<p>Test passes if there are green squares below and no red.
<div class=ref> 0 <br>0 0 <br>0 </div>
<div id=test1> 0 0 0 0 </div>
<div class=ref> 0<br>0 0 <br> 0</div>
<div id=test2> 0 0 0 0 </div>

View file

@ -0,0 +1,32 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Text level 3 Test: trailing pre-wrap spaces and conditional hanging</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/pre-wrap-020-ref.html">
<meta name="assert" content="trailing pre-wrap spaces hang conditionally before forced breaks, which is different from not hanging at all, as it doesn't cause wrapping at earlier opportunities.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font-size: 2rem;
font-family: Ahem;
width: 3ch;
}
#test {
white-space: pre-wrap;
color: green;
}
.ref {
white-space: pre;
color: red;
position: absolute;
z-index: -1;
}
</style>
<p>Test passes if there are green rectangles below and no red.
<div class=ref>0 0<br>0 0</div>
<div id=test>0 0 0 0 </div>

View file

@ -0,0 +1,23 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test reference</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<style>
div {
font-size: 2rem;
margin: 1rem;
white-space: pre;
width: 5ch;
border: solid 1px;
font-family: monospace;
}
span {
text-decoration: underline;
}
</style>
<p>Test passes if the two boxes below are identical.
<div> <span> 0 </span></div>
<div> <span> 0 </span></div>

View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test reference</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font-size: 2rem;
font-family: Ahem;
width: 3ch;
white-space: pre;
color: green;
}
</style>
<p>Test passes if there are green squares below and no red.
<div class=ref> 0 <br>0 0 <br>0 </div>
<div class=ref> 0<br>0 0 <br> 0</div>

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>test reference</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font-size: 2rem;
font-family: Ahem;
width: 3ch;
white-space: pre;
color: green;
}
</style>
<p>Test passes if there are green rectangles below and no red.
<div>0 0<br>0 0</div>

View file

@ -0,0 +1,5 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test reference</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<p>Test passes if there is <strong>no red</strong> below.</p>

View file

@ -2,14 +2,13 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>test reference</title> <title>test reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
div { div {
color: transparent; color: transparent;
font-family: Ahem; font-family: monospace;
font-size: 50px; font-size: 50px;
width: 3ch; width: 3ch;
height: 2ch; height: 2em;
background: green; background: green;
} }
</style> </style>

View file

@ -2,7 +2,19 @@
<meta charset=utf-8> <meta charset=utf-8>
<title>CSS test Reference</title> <title>CSS test Reference</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style>
div {
font-size: 20px;
font-family: Ahem;
line-height: 1em;
white-space: pre-wrap;
}
#test { color: orange; }
#ref { color: blue; }
</style>
<p>This test passes if the letters below are spaced equally. <p>This test passes if the orange blocks below are vertically aligned with the blue ones.
<div>X X X X</div> <div id=test>X X X X</div>
<div id=ref>X X X X</div>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with right alignement in a textarea</title> <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with right alignement in a textarea</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html"> <link rel="match" href="reference/pre-wrap-012-ref.html">
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when right-aligning in a textarea."> <meta name="assert" content="When white-space is pre-wrap, only spaces at the end of soft-wrapped lines get collapsed or hanged, so they do not have any effect when right aligning.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
textarea { textarea {
@ -25,7 +25,7 @@ textarea {
white-space: pre-wrap; white-space: pre-wrap;
color: green; color: green;
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat; background: linear-gradient(red, red) 1ch 0/2ch 2ch no-repeat;
width: 3ch; width: 3ch;
text-align: right; text-align: right;

View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with center alignement in a textarea</title> <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped line and white-space:pre-wrap with center alignement in a textarea</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html"> <link rel="match" href="reference/pre-wrap-013-ref.html">
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when centering in a textarea."> <meta name="assert" content="When white-space is pre-wrap, spaces at the end of soft-wrapped lines get collapsed or hanged, so they do not have any effect when centering.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
textarea { textarea {
@ -25,7 +25,7 @@ textarea {
white-space: pre-wrap; white-space: pre-wrap;
color: green; color: green;
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat; background: linear-gradient(red, red) 0.5ch 0/2ch 2ch no-repeat;
width: 3ch; width: 3ch;
text-align: center; text-align: center;
@ -33,6 +33,5 @@ textarea {
</style> </style>
<body> <body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> <p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p>
<textarea>XX&#x20; <textarea>XX XX</textarea>
XX </textarea>
</body> </body>

View file

@ -1,10 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<meta charset="utf-8"> <meta charset="utf-8">
<title>CSS Text level 3 Test: preserved white space at the end of and white-space:pre-wrap with justification in a textarea</title> <title>CSS Text level 3 Test: preserved white space at the end of soft-wrapped lines and white-space:pre-wrap with justification in a textarea</title>
<link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="http://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/textarea-pre-wrap-001-ref.html"> <link rel="match" href="reference/textarea-pre-wrap-014-ref.html">
<meta name="assert" content="When white-space is pre-wrap, only spaces that overflow the line get collapsed or hanged, the ones that fit have an effect when justifying in a textarea."> <meta name="assert" content="When white-space is pre-wrap, spaces at the end of a soft-wrapped line get collapsed or hanged, and don't influence justification.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
textarea { textarea {
@ -23,17 +23,15 @@ textarea {
font-family: Ahem; font-family: Ahem;
line-height: 1em; line-height: 1em;
white-space: pre-wrap; white-space: pre-wrap;
color: green; color: white;
background: linear-gradient(red, red) 0 0/2ch 2ch no-repeat; background: linear-gradient(red, red) 3ch 0/2ch 1ch no-repeat;
width: 3ch; width: 4ch;
text-align: justify; text-align: justify;
text-justify: inter-character;
} }
</style> </style>
<body> <body>
<p>Test passes if there is a <strong>filled green square</strong> and <strong>no red</strong>.</p> <p>Test passes if there is <strong>no red</strong> below.</p>
<textarea>X&#8203;X&#x20; <textarea>X X X</textarea>
X&#8203;X </textarea>
</body> </body>

View file

@ -6,8 +6,7 @@
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<meta name="flags" content=""> <meta name="flags" content="">
<link rel="match" href="reference/white-space-intrinsic-size-004-ref.html"> <link rel="match" href="reference/white-space-intrinsic-size-004-ref.html">
<meta name="assert" content="Preserved spaces at the end of the line do affect the intrinsic max-content size when white-space is pre-wrap, as hanging does not prevent contributing to the max-content size. The value of overflow-wrap makes no difference."> <meta name="assert" content="Preserved spaces at the end of the line do affect the intrinsic max-content size when white-space is pre-wrap, as spaces before a forced break, at the end of un unwrapped line, only hanging conditionally, which does not prevent contributing to the max-content size. The value of overflow-wrap makes no difference.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
aside { aside {
float: left; float: left;
@ -18,10 +17,10 @@ aside:last-of-type { overflow-wrap: break-word; }
div { div {
background: red; background: red;
color: transparent; color: transparent;
font-family: Ahem; font-family: monospace;
font-size: 50px; font-size: 50px;
width: 3ch; width: 3ch;
height: 2em; line-height: 1;
} }
</style> </style>

View file

@ -1,19 +1,18 @@
<!doctype html> <!doctype html>
<meta charset=utf-8> <meta charset=utf-8>
<title>CSS Text test: hanging trailing spaces with white-space:pre-wrap</title> <title>CSS Text test: alignement and trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-001-ref.html"> <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-001-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap."> <meta name="assert" content="Preserved white space with pre-wrap at the end of a line ending with a forced line break conditionally hangs, so it does affect alignment.">
<style> <style>
div { div {
white-space: pre-wrap; white-space: pre-wrap;
font-family: monospace; font-family: monospace;
} }
div:nth-of-type(1),
div:nth-of-type(2) { div:nth-of-type(2) {
width: 5ch; width: 7ch;
text-align: right; text-align: right;
} }
div:nth-of-type(3), div:nth-of-type(3),
@ -25,7 +24,7 @@ div:nth-of-type(4) {
<p>This test passes if the 4 letters below are verticaly aligned. <p>This test passes if the 4 letters below are verticaly aligned.
<div>P</div> <div> P</div>
<div>A </div> <div>A </div>
<div>S</div> <div> S </div>
<div>S </div> <div> S </div>

View file

@ -1,20 +1,28 @@
<!doctype html> <!doctype html>
<meta charset=utf-8> <meta charset=utf-8>
<title>CSS Text test: intrinsic maximum sizing of trailing spaces with white-space:pre-wrap</title> <title>CSS Text test: intrinsic maximum sizing and alignment of trailing spaces with white-space:pre-wrap</title>
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html"> <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-002-ref.html">
<meta name="assert" content="Hanging preserved white space at the end of the line when white-space is pre-wrap has no effect on the max-content size."> <meta name="assert" content="Preserved white space with white-space is pre-wrap at the end of the line before a forced-break only hangs conditionally, and therefore is included in the max-content size, and taken into account for alignemnt (since it doesn't actually hang in this situation).">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
div {
font-size: 20px;
font-family: Ahem;
line-height: 1em;
white-space: pre-wrap;
}
span { span {
display: inline-block; display: inline-block;
white-space: pre-wrap;
} }
#s1 { text-align: right; } #s1 { text-align: right; }
#s2 { text-align: center; } #s2 { text-align: center; }
#test { color: orange; }
#ref { color: blue; }
</style> </style>
<p>This test passes if the letters below are spaced equally. <p>This test passes if the orange blocks below are vertically aligned with the blue ones.
<div><span id=s1>X </span><span id=s2>X </span>X X</div> <div id=test><span id=s1>X </span><span id=s2> X </span> X X</div>
<div id=ref>X X X X</div>

View file

@ -4,7 +4,7 @@
<link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/"> <link rel="author" title="Florian Rivoal" href="https://florian.rivoal.net/">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-003-ref.html"> <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-003-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size."> <meta name="assert" content="Preserved white space at the end of soft-wrapped lines is hanged when white-space is pre-wrap, and therefore does not count when computing the (minimum) intrinsic size.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>

View file

@ -4,7 +4,7 @@
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com"> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html"> <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap."> <meta name="assert" content="Preserved white space at the end of a soft-wrapped line is hanged when white-space is pre-wrap.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css"> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
<style> <style>
div { div {

View file

@ -4,7 +4,7 @@
<link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" /> <link rel="author" title="Javier Fernandez" href="mailto:jfernandez@igalia.com" />
<link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2"> <link rel="help" href="https://drafts.csswg.org/css-text-3/#white-space-phase-2">
<link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html"> <link rel="match" href="reference/white-space-pre-wrap-trailing-spaces-004-ref.html">
<meta name="assert" content="Preserved white space at the end of the line is hanged when white-space is pre-wrap."> <meta name="assert" content="Preserved white space at the end of a soft-wrapped line is hanged when white-space is pre-wrap.">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> <link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<style> <style>
div { div {

View file

@ -9,9 +9,44 @@
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script> <script src="/css/support/interpolation-testcommon.js"></script>
<style>
.parent {
scale: 0.5 1 2
}
.target {
width: 10px;
height: 10px;
background-color: black;
scale: 1.1 1;
}
.expected {
background-color: green;
}
</style>
</head> </head>
<body> <body>
<template id="target-template">
<div class="parent">
<div class="target"></div>
</div>
</template>
<script> <script>
// Matching two <number> version.
test_interpolation({
property: 'scale',
from: '-10 5',
to: '10 -5',
}, [
{at: -1, expect: '-30 15'},
{at: 0, expect: '-10 5'},
{at: 0.25, expect: '-5 2.5'},
{at: 0.75, expect: '5 -2.5'},
{at: 1, expect: '10 -5'},
{at: 2, expect: '30 -15'},
]);
// Matching three <number> version.
test_interpolation({ test_interpolation({
property: 'scale', property: 'scale',
from: '2 30 400', from: '2 30 400',
@ -25,6 +60,7 @@
{at: 2, expect: '18 190 2000'} {at: 2, expect: '18 190 2000'}
]); ]);
// From three <number> to two <number>; test that it expands correctly.
test_interpolation({ test_interpolation({
property: 'scale', property: 'scale',
from: '26 17 9', from: '26 17 9',
@ -38,6 +74,48 @@
{at: 2, expect: '-22 -15 -7'} {at: 2, expect: '-22 -15 -7'}
]); ]);
// Test one <number> is expanded correctly.
test_interpolation({
property: 'scale',
from: '1',
to: '10 -5 0',
}, [
{at: -1, expect: '-8 7 2'},
{at: 0, expect: '1'},
{at: 0.25, expect: '3.25 -0.5 0.75'},
{at: 0.75, expect: '7.75 -3.5 0.25'},
{at: 1, expect: '10 -5 0'},
{at: 2, expect: '19 -11 -1'},
]);
test_interpolation({
property: 'scale',
from: '-10 5 1',
to: '1',
}, [
{at: -1, expect: '-21 9 1'},
{at: 0, expect: '-10 5 1'},
{at: 0.25, expect: '-7.25 4 1'},
{at: 0.75, expect: '-1.75 2 1'},
{at: 1, expect: '1'},
{at: 2, expect: '12 -3 1'},
]);
// Handling of the none value.
test_interpolation({
property: 'scale',
from: 'none',
to: 'none',
}, [
{at: -1, expect: 'none'},
{at: 0, expect: 'none'},
{at: 0.125, expect: 'none'},
{at: 0.875, expect: 'none'},
{at: 1, expect: 'none'},
{at: 2, expect: 'none'}
]);
// Going from none to a valid value; test that it converts properly.
test_interpolation({ test_interpolation({
property: 'scale', property: 'scale',
from: 'none', from: 'none',
@ -51,17 +129,114 @@
{at: 2, expect: '7 5 3'} {at: 2, expect: '7 5 3'}
]); ]);
// Test neutral keyframe; make sure it adds the underlying.
test_interpolation({ test_interpolation({
property: 'scale', property: 'scale',
from: 'none', from: neutralKeyframe,
to: 'none', to: '1.5 1',
}, [ }, [
{at: -1, expect: 'none'}, {at: -1, expect: '0.7 1'},
{at: 0, expect: '1.1 1'},
{at: 0.25, expect: '1.2 1'},
{at: 0.75, expect: '1.4 1'},
{at: 1, expect: '1.5 1'},
{at: 2, expect: '1.9 1'},
]);
// Test initial value; for 'scale' this is 'none'.
test_interpolation({
property: 'scale',
from: 'initial',
to: '2 0.5 1',
}, [
{at: -1, expect: '0 1.5 1'},
{at: 0, expect: 'none'}, {at: 0, expect: 'none'},
{at: 0.125, expect: 'none'}, {at: 0.25, expect: '1.25 0.875 1'},
{at: 0.875, expect: 'none'}, {at: 0.75, expect: '1.75 0.625 1'},
{at: 1, expect: '2 0.5 1'},
{at: 2, expect: '3 0 1'},
]);
test_interpolation({
property: 'scale',
from: '2 0.5 1',
to: 'initial',
}, [
{at: -1, expect: '3 0 1'},
{at: 0, expect: '2 0.5 1'},
{at: 0.25, expect: '1.75 0.6251 1'},
{at: 0.75, expect: '1.25 0.875 1'},
{at: 1, expect: 'none'}, {at: 1, expect: 'none'},
{at: 2, expect: 'none'} {at: 2, expect: '0 1.5 1'},
]);
// Test unset value; for 'scale' this is 'none'.
test_interpolation({
property: 'scale',
from: 'unset',
to: '1.5 1',
}, [
{at: -1, expect: '0.5 1'},
{at: 0, expect: 'none'},
{at: 0.25, expect: '1.125 1'},
{at: 0.75, expect: '1.375 1'},
{at: 1, expect: '1.5 1'},
{at: 2, expect: '2 1'},
]);
// Test inherited value.
test_interpolation({
property: 'scale',
from: 'inherit',
to: '2 0.5 1',
}, [
{at: -1, expect: '-1 1.5 3'},
{at: 0, expect: '0.5 1 2'},
{at: 0.25, expect: '0.875 0.875 1.75'},
{at: 0.75, expect: '1.625 0.625 1.25'},
{at: 1, expect: '2 0.5 1'},
{at: 2, expect: '3.5 0 0'},
]);
test_interpolation({
property: 'scale',
from: '2 0.5 1',
to: 'inherit',
}, [
{at: -1, expect: '3.5 0 0'},
{at: 0, expect: '2 0.5 1'},
{at: 0.25, expect: '1.625 0.625 1.25'},
{at: 0.75, expect: '0.875 0.875 1.75'},
{at: 1, expect: '0.5 1 2'},
{at: 2, expect: '-1 1.5 3'},
]);
// Test combination of initial and inherit.
test_interpolation({
property: 'scale',
from: 'initial',
to: 'inherit',
}, [
{at: -1, expect: '1.5 1 0'},
{at: 0, expect: 'none'},
{at: 0.25, expect: '0.875 1 1.25'},
{at: 0.75, expect: '0.625 1 1.75'},
{at: 1, expect: '0.5 1 2'},
{at: 2, expect: '0 1 3'},
]);
test_interpolation({
property: 'scale',
from: 'inherit',
to: 'initial',
}, [
{at: -1, expect: '0 1 3'},
{at: 0, expect: '0.5 1 2'},
{at: 0.25, expect: '0.625 1 1.75'},
{at: 0.75, expect: '0.875 1 1.25'},
{at: 1, expect: 'none'},
{at: 2, expect: '1.5 1 0'},
]); ]);
</script> </script>
</body> </body>

View file

@ -18,10 +18,70 @@
width: 10px; width: 10px;
height: 10px; height: 10px;
} }
.parent {
translate: 100px 200px 300px;
}
.target {
width: 100px;
height: 100px;
background-color: black;
translate: 10px;
}
.expected {
background-color: green;
}
</style> </style>
</head> </head>
<body> <body>
<template id="target-template">
<div class="parent">
<div class="target"></div>
</div>
</template>
<script> <script>
// Matching one-length (pixels) animation.
test_interpolation({
property: 'translate',
from: '-100px',
to: '100px',
}, [
{at: -1, expect: '-300px'},
{at: 0, expect: '-100px'},
{at: 0.25, expect: '-50px'},
{at: 0.75, expect: '50px'},
{at: 1, expect: '100px'},
{at: 2, expect: '300px'},
]);
// Matching one-length (percentage) animation.
test_interpolation({
property: 'translate',
from: '-100%',
to: '100%',
}, [
{at: -1, expect: '-300%'},
{at: 0, expect: '-100%'},
{at: 0.25, expect: '-50%'},
{at: 0.75, expect: '50%'},
{at: 1, expect: '100%'},
{at: 2, expect: '300%'},
]);
// Matching two-length (all pixels) animation.
test_interpolation({
property: 'translate',
from: '-100px -50px',
to: '100px 50px',
}, [
{at: -1, expect: '-300px -150px'},
{at: 0, expect: '-100px -50px'},
{at: 0.25, expect: '-50px -25px'},
{at: 0.75, expect: '50px 25px'},
{at: 1, expect: '100px 50px'},
{at: 2, expect: '300px 150px'},
]);
// Matching three-length (all pixels) animation.
test_interpolation({ test_interpolation({
property: 'translate', property: 'translate',
from: '220px 240px 260px', from: '220px 240px 260px',
@ -35,6 +95,35 @@
{at: 2, expect: '380px 560px 740px'} {at: 2, expect: '380px 560px 740px'}
]); ]);
// Going from one length to three lengths.
test_interpolation({
property: 'translate',
from: '0px',
to: '-100px -50px 100px',
}, [
{at: -1, expect: '100px 50px -100px'},
{at: 0, expect: '0px'},
{at: 0.25, expect: '-25px -12.5px 25px'},
{at: 0.75, expect: '-75px -37.5px 75px'},
{at: 1, expect: '-100px -50px 100px'},
{at: 2, expect: '-200px -100px 200px'},
]);
// Going from three lengths to one length.
test_interpolation({
property: 'translate',
from: '-100px -50px 100px',
to: '0px',
}, [
{at: -1, expect: '-200px -100px 200px'},
{at: 0, expect: '-100px -50px 100px'},
{at: 0.25, expect: '-75px -37.5px 75px'},
{at: 0.75, expect: '-25px -12.5px 25px'},
{at: 1, expect: '0px'},
{at: 2, expect: '100px 50px -100px'},
]);
// Going from three-lengths to two-percentages.
test_interpolation({ test_interpolation({
property: 'translate', property: 'translate',
from: '480px 400px 320px', from: '480px 400px 320px',
@ -48,6 +137,21 @@
{at: 2, expect: 'calc(480% - 480px) calc(320% - 400px) -320px'} {at: 2, expect: 'calc(480% - 480px) calc(320% - 400px) -320px'}
]); ]);
// Handling of the none value.
test_interpolation({
property: 'translate',
from: 'none',
to: 'none',
}, [
{at: -1, expect: 'none'},
{at: 0, expect: 'none'},
{at: 0.125, expect: 'none'},
{at: 0.875, expect: 'none'},
{at: 1, expect: 'none'},
{at: 2, expect: 'none'}
]);
// Going from none to a valid value; test that it converts properly.
test_interpolation({ test_interpolation({
property: 'translate', property: 'translate',
from: 'none', from: 'none',
@ -61,17 +165,114 @@
{at: 2, expect: '16px 160% 1600px'} {at: 2, expect: '16px 160% 1600px'}
]); ]);
// Test neutral keyframe; make sure it adds the underlying.
test_interpolation({ test_interpolation({
property: 'translate', property: 'translate',
from: 'none', from: neutralKeyframe,
to: 'none', to: '20px',
}, [ }, [
{at: -1, expect: 'none'}, {at: -1, expect: '0px'},
{at: 0, expect: '10px'},
{at: 0.25, expect: '12.5px'},
{at: 0.75, expect: '17.5px'},
{at: 1, expect: '20px'},
{at: 2, expect: '30px'},
]);
// Test initial value; for 'scale' this is 'none'.
test_interpolation({
property: 'translate',
from: 'initial',
to: '200px 100px 200px',
}, [
{at: -1, expect: '-200px -100px -200px'},
{at: 0, expect: 'none'}, {at: 0, expect: 'none'},
{at: 0.125, expect: 'none'}, {at: 0.25, expect: '50px 25px 50px'},
{at: 0.875, expect: 'none'}, {at: 0.75, expect: '150px 75px 150px'},
{at: 1, expect: '200px 100px 200px'},
{at: 2, expect: '400px 200px 400px'},
]);
test_interpolation({
property: 'translate',
from: '200px 100px 400px',
to: 'initial',
}, [
{at: -1, expect: '400px 200px 800px'},
{at: 0, expect: '200px 100px 400px'},
{at: 0.25, expect: '150px 75px 300px'},
{at: 0.75, expect: '50px 25px 100px'},
{at: 1, expect: 'none'}, {at: 1, expect: 'none'},
{at: 2, expect: 'none'} {at: 2, expect: '-200px -100px -400px'},
]);
// Test unset value; for 'translate' this is 'none'.
test_interpolation({
property: 'translate',
from: 'unset',
to: '20px',
}, [
{at: -1, expect: '-20px'},
{at: 0, expect: 'none'},
{at: 0.25, expect: '5px'},
{at: 0.75, expect: '15px'},
{at: 1, expect: '20px'},
{at: 2, expect: '40px'},
]);
// Test inherited value.
test_interpolation({
property: 'translate',
from: 'inherit',
to: '200px 100px 200px',
}, [
{at: -1, expect: '0px 300px 400px'},
{at: 0, expect: '100px 200px 300px'},
{at: 0.25, expect: '125px 175px 275px'},
{at: 0.75, expect: '175px 125px 225px'},
{at: 1, expect: '200px 100px 200px'},
{at: 2, expect: '300px 0px 100px'},
]);
test_interpolation({
property: 'translate',
from: '200px 100px 200px',
to: 'inherit',
}, [
{at: -1, expect: '300px 0px 100px'},
{at: 0, expect: '200px 100px 200px'},
{at: 0.25, expect: '175px 125px 225px'},
{at: 0.75, expect: '125px 175px 275px'},
{at: 1, expect: '100px 200px 300px'},
{at: 2, expect: '0px 300px 400px'},
]);
// Test combination of initial and inherit.
test_interpolation({
property: 'translate',
from: 'initial',
to: 'inherit',
}, [
{at: -1, expect: '-100px -200px -300px'},
{at: 0, expect: 'none'},
{at: 0.25, expect: '25px 50px 75px'},
{at: 0.75, expect: '75px 150px 225px'},
{at: 1, expect: '100px 200px 300px'},
{at: 2, expect: '200px 400px 600px'},
]);
test_interpolation({
property: 'translate',
from: 'inherit',
to: 'initial',
}, [
{at: -1, expect: '200px 400px 600px'},
{at: 0, expect: '100px 200px 300px'},
{at: 0.25, expect: '75px 150px 225px'},
{at: 0.75, expect: '25px 50px 75px'},
{at: 1, expect: 'none'},
{at: 2, expect: '-100px -200px -300px'},
]); ]);
</script> </script>
</body> </body>

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html class="reftest-wait">
<title>transform-box: fill-box, image mutated</title>
<link rel="match" href="reference/greensquare200x200.html">
<link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-box">
<style>
#target {
transform-box: fill-box;
transform: translate(-50%, 0);
}
</style>
<p>There should be a green 200x200 rectangle below, and no red.</p>
<svg width="400" height="200">
<rect width="200" height="200" fill="red"/>
<image id="target" x="100" width="100" height="200"
href="/css/css-transforms/support/1x1-green.png"/>
</svg>
<script>
requestAnimationFrame(function() {
requestAnimationFrame(function() {
document.querySelector('#target').setAttribute('width', 200);
document.documentElement.classList.remove('reftest-wait');
});
});
</script>

View file

@ -26,6 +26,7 @@ test_computed_value("transition-timing-function", "cubic-bezier(0, 0.7, 1, 1.3)"
test_computed_value("transition-timing-function", "step-start", "steps(1, start)"); test_computed_value("transition-timing-function", "step-start", "steps(1, start)");
test_computed_value("transition-timing-function", "step-end", "steps(1)"); test_computed_value("transition-timing-function", "step-end", "steps(1)");
test_computed_value("transition-timing-function", "steps(4)");
test_computed_value("transition-timing-function", "steps(4, start)"); test_computed_value("transition-timing-function", "steps(4, start)");
test_computed_value("transition-timing-function", "steps(2, end)", "steps(2)"); test_computed_value("transition-timing-function", "steps(2, end)", "steps(2)");
test_computed_value("transition-timing-function", "steps(2, jump-start)"); test_computed_value("transition-timing-function", "steps(2, jump-start)");

View file

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func"> <link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#angles"> <link rel="help" href="https://drafts.csswg.org/css-values-4/#angles">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-type-checking"> <link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org"> <link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
@ -20,6 +20,20 @@ test_valid_angle('max(1rad)', 'max(1rad)');
test_valid_angle('max(1turn)', 'max(1turn)'); test_valid_angle('max(1turn)', 'max(1turn)');
test_valid_angle('max(1grad)', 'max(1grad)'); test_valid_angle('max(1grad)', 'max(1grad)');
// TODO(crbug.com/978682): Complete this test suite test_valid_angle('min(1deg, 2deg, 3deg)', 'min(1deg, 2deg, 3deg)');
test_valid_angle('min(3deg, 2deg, 1deg)', 'min(3deg, 2deg, 1deg)');
test_valid_angle('min(90deg, 1.57rad, 0.25turn)', 'min(90deg, 1.57rad, 0.25turn)');
test_valid_angle('min(0.25turn, 1.57rad, 90deg)', 'min(0.25turn, 1.57rad, 90deg)');
test_valid_angle('max(1deg, 2deg, 3deg)', 'max(1deg, 2deg, 3deg)');
test_valid_angle('max(3deg, 2deg, 1deg)', 'max(3deg, 2deg, 1deg)');
test_valid_angle('max(90deg, 1.57rad, 0.25turn)', 'max(90deg, 1.57rad, 0.25turn)');
test_valid_angle('max(0.25turn, 1.57rad, 90deg)', 'max(0.25turn, 1.57rad, 90deg)');
test_valid_angle('calc(min(1deg) + min(2deg))', 'calc(min(1deg) + min(2deg))');
test_valid_angle('calc(max(1deg) + max(2deg))', 'calc(max(1deg) + max(2deg))');
test_valid_angle('calc(1rad + min(1deg))', 'calc(1rad + min(1deg))');
test_valid_angle('calc(min(1deg) + 1rad)', 'calc(1rad + min(1deg))');
test_valid_angle('calc(1rad + max(1deg))', 'calc(1rad + max(1deg))');
test_valid_angle('calc(max(1deg) + 1rad)', 'calc(1rad + max(1deg))');
</script> </script>

View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/css-values-4/#comp-func">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#time">
<link rel="help" href="https://drafts.csswg.org/css-values-4/#calc-serialize">
<link rel="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../support/parsing-testcommon.js"></script>
<script>
function test_valid_time(value, expected) {
test_valid_value('transition-delay', value, expected);
}
test_valid_time('min(1ms)', 'min(1ms)');
test_valid_time('min(1s)', 'min(1s)');
test_valid_time('max(1ms)', 'max(1ms)');
test_valid_time('max(1s)', 'max(1s)');
test_valid_time('min(1ms, 2ms, 3ms)', 'min(1ms, 2ms, 3ms)');
test_valid_time('min(3ms, 2ms, 1ms)', 'min(3ms, 2ms, 1ms)');
test_valid_time('max(1ms, 2ms, 3ms)', 'max(1ms, 2ms, 3ms)');
test_valid_time('max(3ms, 2ms, 1ms)', 'max(3ms, 2ms, 1ms)');
test_valid_time('min(1000ms, 1s)', 'min(1000ms, 1s)');
test_valid_time('min(1s, 1000ms)', 'min(1s, 1000ms)');
test_valid_time('max(1000ms, 1s)', 'max(1000ms, 1s)');
test_valid_time('max(1s, 1000ms)', 'max(1s, 1000ms)');
test_valid_time('calc(min(1s) + min(2s))', 'calc(min(1s) + min(2s))');
test_valid_time('calc(min(2s) + min(1s))', 'calc(min(2s) + min(1s))');
test_valid_time('calc(max(1s) + max(2s))', 'calc(max(1s) + max(2s))');
test_valid_time('calc(max(2s) + max(1s))', 'calc(max(2s) + max(1s))');
test_valid_time('calc(1s + min(2s))', 'calc(1s + min(2s))');
test_valid_time('calc(min(2s) + 1s)', 'calc(1s + min(2s))');
test_valid_time('calc(1s + max(2s))', 'calc(1s + max(2s))');
test_valid_time('calc(max(2s) + 1s)', 'calc(1s + max(2s))');
</script>

View file

@ -145,4 +145,5 @@ Additional browser-specific documentation:
chrome_android chrome_android
android_webview android_webview
safari safari
webkitgtk_minibrowser
``` ```

View file

@ -0,0 +1,32 @@
# WebKitGTK MiniBrowser
To be able to run tests with the WebKitGTK MiniBrowser you need the
following packages installed:
* Fedora: `webkit2gtk3-devel`
* Debian or Ubuntu: `webkit2gtk-driver`
The WebKitGTK MiniBrowser is not installed on the default binary path.
The `wpt` script will try to automatically locate it, but if you need
to run it manually you can find it on any of this paths:
* Fedora: `/usr/libexec/webkit2gtk-4.0/MiniBrowser`
* Debian or Ubuntu: `/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser`
* Note: if the machine architecture is not `x86_64`, then it will be located
inside:
`/usr/lib/${TRIPLET}/webkit2gtk-4.0/MiniBrowser`
where `TRIPLET=$(gcc -dumpmachine)`
Known issues:
* On a docker container WebKitWebDriver fails to listen on localhost,
because the docker container doesn't provide an IPv6 localhost address.
To workaround this issue, manually tell it to only listen on IPv4 localhost
by passing this parameter to wpt run: `--webdriver-arg=--host=127.0.0.1`
Example:
```bash
./wpt run --webdriver-arg=--host=127.0.0.1 webkitgtk_minibrowser TESTS
```

View file

@ -0,0 +1,9 @@
<script>
'use strict';
Promise.resolve().then(() => navigator.getBattery()).then(battery => {
window.parent.postMessage({ enabled: true }, '*');
}, error => {
window.parent.postMessage({ enabled: false }, '*');
});
</script>

View file

@ -95,8 +95,20 @@ function addTest(func, desc) {
promiseTest: false}); promiseTest: false});
} }
function addPromiseTest(func, desc) {
testList.push(
{tests: [
{func: func.bind(null, C),
desc: desc + " (cross-origin)"},
{func: func.bind(null, E),
desc: desc + " (same-origin + document.domain)"},
{func: func.bind(null, G),
desc: desc + " (cross-site)"}],
promiseTest: true});
}
/** /**
* A similar helper, but for the subframes that load frame-with-then.html * Similar helpers, but for the subframes that load frame-with-then.html
*/ */
function addThenTest(func, desc) { function addThenTest(func, desc) {
testList.push( testList.push(
@ -110,8 +122,17 @@ function addThenTest(func, desc) {
promiseTest: false}); promiseTest: false});
} }
function addPromiseTest(func, desc) { function addPromiseThenTest(func, desc) {
testList.push({tests:[{func, desc}], promiseTest: true}); } testList.push(
{tests: [
{func: func.bind(null, D),
desc: desc + " (cross-origin)"},
{func: func.bind(null, F),
desc: desc + " (same-origin + document.domain)"},
{func: func.bind(null, H),
desc: desc + " (cross-site)"}],
promiseTest: true});
}
/* /*
* Basic sanity testing. * Basic sanity testing.
@ -135,20 +156,64 @@ addTest(function(win) {
* Also tests for [[GetOwnProperty]] and [[HasOwnProperty]] behavior. * Also tests for [[GetOwnProperty]] and [[HasOwnProperty]] behavior.
*/ */
var whitelistedWindowIndices = ['0', '1'];
var whitelistedWindowPropNames = ['location', 'postMessage', 'window', 'frames', 'self', 'top', 'parent',
'opener', 'closed', 'close', 'blur', 'focus', 'length', 'then'];
whitelistedWindowPropNames = whitelistedWindowPropNames.concat(whitelistedWindowIndices);
whitelistedWindowPropNames.sort();
var whitelistedLocationPropNames = ['href', 'replace', 'then'];
whitelistedLocationPropNames.sort();
var whitelistedSymbols = [Symbol.toStringTag, Symbol.hasInstance, var whitelistedSymbols = [Symbol.toStringTag, Symbol.hasInstance,
Symbol.isConcatSpreadable]; Symbol.isConcatSpreadable];
var whitelistedWindowProps = whitelistedWindowPropNames.concat(whitelistedSymbols); var windowWhitelists = {
namedFrames: ['donotleakme'],
indices: ['0', '1'],
getters: ['location', 'window', 'frames', 'self', 'top', 'parent',
'opener', 'closed', 'length'],
setters: ['location'],
methods: ['postMessage', 'close', 'blur', 'focus'],
// These are methods which return promises and, therefore, when called with a
// cross-origin `this` object, do not throw immediately, but instead return a
// Promise which rejects with the same SecurityError that they would
// otherwise throw. They are not, however, cross-origin accessible.
promiseMethods: ['createImageBitmap', 'fetch'],
}
windowWhitelists.propNames = Array.from(new Set([...windowWhitelists.indices,
...windowWhitelists.getters,
...windowWhitelists.setters,
...windowWhitelists.methods,
'then'])).sort();
windowWhitelists.props = windowWhitelists.propNames.concat(whitelistedSymbols);
var locationWhitelists = {
getters: [],
setters: ['href'],
methods: ['replace'],
promiseMethods: [],
}
locationWhitelists.propNames = Array.from(new Set([...locationWhitelists.getters,
...locationWhitelists.setters,
...locationWhitelists.methods,
'then'])).sort();
// Define various sets of arguments to call cross-origin methods with. Arguments
// for any cross-origin-callable method must be valid, and should aim to have no
// side-effects. Any method without an entry in this list will be called with
// an empty arguments list.
var methodArgs = new Map(Object.entries({
// As a basic smoke test, we call one cross-origin-inaccessible method with
// both valid and invalid arguments to make sure that it rejects with the
// same SecurityError regardless.
assign: [
[],
["javascript:undefined"],
],
// Note: If we post a message to frame.html with a matching origin, its
// "onmessage" handler will change its `document.domain`, and potentially
// invalidate subsequent tests, so be sure to only pass non-matching origins.
postMessage: [
["foo", "http://does-not.exist/"],
["foo", {}],
],
replace: [["javascript:undefined"]],
}));
addTest(function(win) { addTest(function(win) {
for (var prop in window) { for (var prop in window) {
if (whitelistedWindowProps.indexOf(prop) != -1) { if (windowWhitelists.props.indexOf(prop) != -1) {
win[prop]; // Shouldn't throw. win[prop]; // Shouldn't throw.
Object.getOwnPropertyDescriptor(win, prop); // Shouldn't throw. Object.getOwnPropertyDescriptor(win, prop); // Shouldn't throw.
assert_true(Object.prototype.hasOwnProperty.call(win, prop), "hasOwnProperty for " + String(prop)); assert_true(Object.prototype.hasOwnProperty.call(win, prop), "hasOwnProperty for " + String(prop));
@ -162,6 +227,11 @@ addTest(function(win) {
if (prop != 'location') if (prop != 'location')
assert_throws("SecurityError", function() { win[prop] = undefined; }, "Should throw when writing to " + prop + " on Window"); assert_throws("SecurityError", function() { win[prop] = undefined; }, "Should throw when writing to " + prop + " on Window");
} }
for (var prop of windowWhitelists.namedFrames) {
win[prop]; // Shouldn't throw.
Object.getOwnPropertyDescriptor(win, prop); // Shouldn't throw.
assert_true(Object.prototype.hasOwnProperty.call(win, prop), "hasOwnProperty for " + String(prop));
}
for (var prop in location) { for (var prop in location) {
if (prop == 'replace') { if (prop == 'replace') {
win.location[prop]; // Shouldn't throw. win.location[prop]; // Shouldn't throw.
@ -186,6 +256,60 @@ addTest(function(win) {
} }
}, "Only whitelisted properties are accessible cross-origin"); }, "Only whitelisted properties are accessible cross-origin");
addPromiseTest(async function(win, test_obj) {
async function checkProperties(objName, whitelists) {
var localObj = window[objName];
var otherObj = win[objName];
for (var prop in localObj) {
let desc;
for (let obj = localObj; !desc; obj = Object.getPrototypeOf(obj)) {
desc = Object.getOwnPropertyDescriptor(obj, prop);
}
if ("value" in desc) {
if (typeof desc.value === "function" && String(desc.value).includes("[native code]")) {
if (whitelists.promiseMethods.includes(prop)) {
await promise_rejects(test_obj, "SecurityError", desc.value.call(otherObj),
`Should throw when calling ${objName}.${prop} with cross-origin this object`);
} else if (!whitelists.methods.includes(prop)) {
for (let args of methodArgs.get(prop) || [[]]) {
assert_throws("SecurityError", desc.value.bind(otherObj, ...args),
`Should throw when calling ${objName}.${prop} with cross-origin this object`);
}
} else {
for (let args of methodArgs.get(prop) || [[]]) {
desc.value.apply(otherObj, args); // Shouldn't throw.
}
}
}
} else {
if (desc.get) {
if (whitelists.getters.includes(prop)) {
desc.get.call(otherObj); // Shouldn't throw.
} else {
assert_throws("SecurityError", desc.get.bind(otherObj),
`Should throw when calling ${objName}.${prop} getter with cross-origin this object`);
}
}
if (desc.set) {
if (whitelists.setters.includes(prop)) {
desc.set.call(otherObj, "javascript:undefined"); // Shouldn't throw.
} else {
assert_throws("SecurityError", desc.set.bind(otherObj, "foo"),
`Should throw when calling ${objName}.${prop} setter with cross-origin this object`);
}
}
}
}
}
await checkProperties("location", locationWhitelists);
await checkProperties("window", windowWhitelists);
}, "Only whitelisted properties are usable as cross-origin this objects");
/* /*
* ES Internal Methods. * ES Internal Methods.
*/ */
@ -291,7 +415,7 @@ function checkPropertyDescriptor(desc, propName, expectWritable) {
} }
addTest(function(win) { addTest(function(win) {
whitelistedWindowProps.forEach(function(prop) { windowWhitelists.props.forEach(function(prop) {
var desc = Object.getOwnPropertyDescriptor(win, prop); var desc = Object.getOwnPropertyDescriptor(win, prop);
checkPropertyDescriptor(desc, prop, prop == 'location'); checkPropertyDescriptor(desc, prop, prop == 'location');
}); });
@ -367,9 +491,9 @@ addTest(function(win) {
let i = 0; let i = 0;
for (var prop in win) { for (var prop in win) {
i++; i++;
assert_true(whitelistedWindowIndices.includes(prop), prop + " is not safelisted for a cross-origin Window"); assert_true(windowWhitelists.indices.includes(prop), prop + " is not safelisted for a cross-origin Window");
} }
assert_equals(i, whitelistedWindowIndices.length, "Enumerate all enumerable safelisted cross-origin Window properties"); assert_equals(i, windowWhitelists.indices.length, "Enumerate all enumerable safelisted cross-origin Window properties");
i = 0; i = 0;
for (var prop in win.location) { for (var prop in win.location) {
i++; i++;
@ -383,13 +507,13 @@ addTest(function(win) {
addTest(function(win) { addTest(function(win) {
assert_array_equals(Object.getOwnPropertyNames(win).sort(), assert_array_equals(Object.getOwnPropertyNames(win).sort(),
whitelistedWindowPropNames, windowWhitelists.propNames,
"Object.getOwnPropertyNames() gives the right answer for cross-origin Window"); "Object.getOwnPropertyNames() gives the right answer for cross-origin Window");
assert_array_equals(Object.keys(win).sort(), assert_array_equals(Object.keys(win).sort(),
whitelistedWindowIndices, windowWhitelists.indices,
"Object.keys() gives the right answer for cross-origin Window"); "Object.keys() gives the right answer for cross-origin Window");
assert_array_equals(Object.getOwnPropertyNames(win.location).sort(), assert_array_equals(Object.getOwnPropertyNames(win.location).sort(),
whitelistedLocationPropNames, locationWhitelists.propNames,
"Object.getOwnPropertyNames() gives the right answer for cross-origin Location"); "Object.getOwnPropertyNames() gives the right answer for cross-origin Location");
assert_equals(Object.keys(win.location).length, 0, assert_equals(Object.keys(win.location).length, 0,
"Object.keys() gives the right answer for cross-origin Location"); "Object.keys() gives the right answer for cross-origin Location");
@ -405,16 +529,16 @@ addTest(function(win) {
addTest(function(win) { addTest(function(win) {
var allWindowProps = Reflect.ownKeys(win); var allWindowProps = Reflect.ownKeys(win);
indexedWindowProps = allWindowProps.slice(0, whitelistedWindowIndices.length); indexedWindowProps = allWindowProps.slice(0, windowWhitelists.indices.length);
stringWindowProps = allWindowProps.slice(0, -1 * whitelistedSymbols.length); stringWindowProps = allWindowProps.slice(0, -1 * whitelistedSymbols.length);
symbolWindowProps = allWindowProps.slice(-1 * whitelistedSymbols.length); symbolWindowProps = allWindowProps.slice(-1 * whitelistedSymbols.length);
// stringWindowProps should have "then" last in this case. Do this // stringWindowProps should have "then" last in this case. Do this
// check before we call stringWindowProps.sort() below. // check before we call stringWindowProps.sort() below.
assert_equals(stringWindowProps[stringWindowProps.length - 1], "then", assert_equals(stringWindowProps[stringWindowProps.length - 1], "then",
"'then' property should be added to the end of the string list if not there"); "'then' property should be added to the end of the string list if not there");
assert_array_equals(indexedWindowProps, whitelistedWindowIndices, assert_array_equals(indexedWindowProps, windowWhitelists.indices,
"Reflect.ownKeys should start with the indices exposed on the cross-origin window."); "Reflect.ownKeys should start with the indices exposed on the cross-origin window.");
assert_array_equals(stringWindowProps.sort(), whitelistedWindowPropNames, assert_array_equals(stringWindowProps.sort(), windowWhitelists.propNames,
"Reflect.ownKeys should continue with the cross-origin window properties for a cross-origin Window."); "Reflect.ownKeys should continue with the cross-origin window properties for a cross-origin Window.");
assert_array_equals(symbolWindowProps, whitelistedSymbols, assert_array_equals(symbolWindowProps, whitelistedSymbols,
"Reflect.ownKeys should end with the cross-origin symbols for a cross-origin Window."); "Reflect.ownKeys should end with the cross-origin symbols for a cross-origin Window.");
@ -422,7 +546,7 @@ addTest(function(win) {
var allLocationProps = Reflect.ownKeys(win.location); var allLocationProps = Reflect.ownKeys(win.location);
stringLocationProps = allLocationProps.slice(0, -1 * whitelistedSymbols.length); stringLocationProps = allLocationProps.slice(0, -1 * whitelistedSymbols.length);
symbolLocationProps = allLocationProps.slice(-1 * whitelistedSymbols.length); symbolLocationProps = allLocationProps.slice(-1 * whitelistedSymbols.length);
assert_array_equals(stringLocationProps.sort(), whitelistedLocationPropNames, assert_array_equals(stringLocationProps.sort(), locationWhitelists.propNames,
"Reflect.ownKeys should start with the cross-origin window properties for a cross-origin Location.") "Reflect.ownKeys should start with the cross-origin window properties for a cross-origin Location.")
assert_array_equals(symbolLocationProps, whitelistedSymbols, assert_array_equals(symbolLocationProps, whitelistedSymbols,
"Reflect.ownKeys should end with the cross-origin symbols for a cross-origin Location.") "Reflect.ownKeys should end with the cross-origin symbols for a cross-origin Location.")
@ -507,59 +631,23 @@ addTest(function(win) {
assert_equals({}.toString.call(win.location), "[object Object]"); assert_equals({}.toString.call(win.location), "[object Object]");
}, "{}.toString.call() does the right thing on cross-origin objects"); }, "{}.toString.call() does the right thing on cross-origin objects");
addPromiseTest(function() { addPromiseTest(function(win) {
return Promise.resolve(C).then((arg) => { return Promise.resolve(win).then((arg) => {
assert_equals(arg, C); assert_equals(arg, win);
}); });
}, "Resolving a promise with a cross-origin window without a 'then' subframe should work (cross-origin)."); }, "Resolving a promise with a cross-origin window without a 'then' subframe should work");
addPromiseTest(function() { addPromiseThenTest(function(win) {
return Promise.resolve(E).then((arg) => { return Promise.resolve(win).then((arg) => {
assert_equals(arg, E); assert_equals(arg, win);
}); });
}, "Resolving a promise with a cross-origin window without a 'then' subframe should work (same-origin + document.domain)."); }, "Resolving a promise with a cross-origin window with a 'then' subframe should work");
addPromiseTest(function() { addPromiseThenTest(function(win) {
return Promise.resolve(G).then((arg) => { return Promise.resolve(win.location).then((arg) => {
assert_equals(arg, G); assert_equals(arg, win.location);
}); });
}, "Resolving a promise with a cross-origin window without a 'then' subframe should work (cross-site)."); }, "Resolving a promise with a cross-origin location should work");
addPromiseTest(function() {
return Promise.resolve(D).then((arg) => {
assert_equals(arg, D);
});
}, "Resolving a promise with a cross-origin window with a 'then' subframe should work (cross-origin).");
addPromiseTest(function() {
return Promise.resolve(F).then((arg) => {
assert_equals(arg, F);
});
}, "Resolving a promise with a cross-origin window with a 'then' subframe should work (same-origin + document.domain).");
addPromiseTest(function() {
return Promise.resolve(H).then((arg) => {
assert_equals(arg, H);
});
}, "Resolving a promise with a cross-origin window with a 'then' subframe should work (cross-site).");
addPromiseTest(function() {
return Promise.resolve(D.location).then((arg) => {
assert_equals(arg, D.location);
});
}, "Resolving a promise with a cross-origin location should work (cross-origin).");
addPromiseTest(function() {
return Promise.resolve(F.location).then((arg) => {
assert_equals(arg, F.location);
});
}, "Resolving a promise with a cross-origin location should work (same-origin + document.domain).");
addPromiseTest(function() {
return Promise.resolve(H.location).then((arg) => {
assert_equals(arg, H.location);
});
}, "Resolving a promise with a cross-origin location should work (cross-site).");
addTest(function(win) { addTest(function(win) {
var desc = Object.getOwnPropertyDescriptor(window, "onmouseenter"); var desc = Object.getOwnPropertyDescriptor(window, "onmouseenter");
@ -598,19 +686,22 @@ function testDone() {
} }
} }
function runNextTest() { async function runNextTest() {
var entry = testList.shift(); var entry = testList.shift();
if (entry.promiseTest) { if (entry.promiseTest) {
test(function() { for (let t of entry.tests) {
assert_equals(entry.tests.length, 1, "We can't handle this yet"); await new Promise(resolve => {
}); promise_test(test_obj => {
promise_test(() => entry.tests[0].func().finally(testDone), entry.tests[0].desc); return new Promise(res => res(t.func(test_obj))).finally(resolve);
}, t.desc);
});
}
} else { } else {
for (t of entry.tests) { for (let t of entry.tests) {
test(t.func, t.desc); test(t.func, t.desc);
} }
testDone();
} }
testDone();
} }
reloadSubframes(runNextTest); reloadSubframes(runNextTest);

View file

@ -1,9 +1,7 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<title>DOM img complete Test</title> <title>DOM img complete Test</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> <meta charset=UTF-8>
<link rel="author" title="Anselm Hannemann" href="http://anselm-hannemann.com/" /> <link rel="author" title="Anselm Hannemann" href="http://anselm-hannemann.com/" />
<link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-img-complete" />
<meta name="assert" content="Tests the complete status of the img-element">
<script src="/resources/testharness.js"></script> <script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script> <script src="/resources/testharnessreport.js"></script>
@ -82,42 +80,41 @@
}, "img src and srcset omitted on image after it started a load"); }, "img src and srcset omitted on image after it started a load");
// test if set to true after img is completely available // test if set to true after img is completely available
var t = async_test("async src complete test"); async_test(t => {
t.step(function(){
var loaded = false; var loaded = false;
document.getElementById("imgTestTag3").onload = t.step_func_done(function(){ const img = document.getElementById("imgTestTag3");
img.onload = t.step_func_done(function(){
assert_false(loaded); assert_false(loaded);
loaded = true; loaded = true;
assert_true(document.getElementById("imgTestTag3").complete); assert_true(img.complete);
var currentSrc = document.getElementById("imgTestTag3").currentSrc; var currentSrc = img.currentSrc;
var expectedUrl = new URL("3.jpg", window.location); var expectedUrl = new URL("3.jpg", window.location);
assert_equals(new URL(currentSrc).pathname, expectedUrl.pathname); assert_equals(new URL(currentSrc).pathname, expectedUrl.pathname);
}, "Only one onload, despite setting the src twice"); }, "Only one onload, despite setting the src twice");
document.getElementById("imgTestTag3").src = 'test' + Math.random(); img.src = 'test' + Math.random();
//test if img.complete is set to false if src is changed //test if img.complete is set to false if src is changed
assert_false(document.getElementById("imgTestTag3").complete, "src changed, should be set to false") assert_false(img.complete, "src changed, should be set to false")
//change src again, should make only one request as per 'await stable state' //change src again, should make only one request as per 'await stable state'
document.getElementById("imgTestTag3").src = '3.jpg?nocache=' + Math.random(); img.src = '3.jpg?nocache=' + Math.random();
}); }, "async src complete test");
var t1 = async_test("async srcset complete test"); async_test(t => {
t1.step(function(){
var loaded = false; var loaded = false;
document.getElementById("imgTestTag5").onload = t1.step_func_done(function(){ const img = document.getElementById("imgTestTag5")
img.onload = t.step_func_done(function(){
assert_false(loaded); assert_false(loaded);
loaded = true; loaded = true;
assert_true(document.getElementById("imgTestTag5").complete); assert_true(img.complete);
}, "Only one onload, despite setting the srcset twice"); }, "Only one onload, despite setting the srcset twice");
//Test if src, srcset is omitted //Test if src, srcset is omitted
assert_true(document.getElementById("imgTestTag5").complete) assert_true(img.complete)
document.getElementById("imgTestTag5").srcset = "/images/green-256x256.png 1x"; img.srcset = "/images/green-256x256.png 1x";
//test if img.complete is set to false if srcset is present //test if img.complete is set to false if srcset is present
assert_false(document.getElementById("imgTestTag5").complete, "srcset present, should be set to false"); assert_false(img.complete, "srcset present, should be set to false");
//change src again, should make only one request as per 'await stable state' //change src again, should make only one request as per 'await stable state'
document.getElementById("imgTestTag5").srcset="/images/green-256x256.png 1.6x" img.srcset="/images/green-256x256.png 1.6x"
}); }, "async srcset complete test");
// https://html.spec.whatwg.org/multipage/multipage/embedded-content-1.html#update-the-image-data // https://html.spec.whatwg.org/multipage/multipage/embedded-content-1.html#update-the-image-data
// says to "await a stable state" before fetching so we use a separate <script> // says to "await a stable state" before fetching so we use a separate <script>
@ -125,86 +122,79 @@
</script> </script>
<script> <script>
// test: The final task that is queued by the networking task source once the resource has been fetched has been queued, but has not yet been run, and the img element is not in the broken state // test: The final task that is queued by the networking task source once the resource has been fetched has been queued, but has not yet been run, and the img element is not in the broken state
async_test(function(t) { test(function() {
assert_false(imageInstance.complete, "imageInstance.complete should be false"); assert_false(imageInstance.complete, "imageInstance.complete should be false");
var startTime = Date.now(); var startTime = Date.now();
while (true) { while (true) {
if (Date.now() - startTime > 2000) if (Date.now() - startTime > 2000) {
assert_unreached('.complete didn\'t change to true'); assert_false(imageInstance.complete, "imageInstance.complete should remain false");
if (imageInstance.complete === true) break; break;
}
if (imageInstance.complete === true) {
assert_unreached(".complete should not change within a task");
}
} }
t.done();
}, },
'IDL attribute complete returns true when image resource has been fetched but not run yet & image is not in broken state'); 'IDL attribute complete cannot "randomly" change during a task');
// test if broken img does not pass // test if broken img does not pass
var t2 = async_test("async src broken test"); async_test(t => {
var img4 = document.getElementById("imgTestTag4"); const img = document.getElementById("imgTestTag4");
t2.step( img.src = 'brokenimg.jpg';
function(){
img4.src = 'brokenimg.jpg';
//test if img.complete is set to false if src is changed //test if img.complete is set to false if src is changed
assert_false(img4.complete, "src changed to broken img, should be set to false"); assert_false(img.complete, "src changed to broken img, should be set to false");
});
img4.onload = img4.onerror = t2.step_func(function(event){ img.onload = img.onerror = t.step_func_done(function(event){
assert_equals(event.type, "error"); assert_equals(event.type, "error");
assert_true(img4.complete); assert_true(img.complete);
t2.done(); });
}); }, "async src broken test");
var t3 = async_test("async src removal test"); async_test(t => {
t3.step(function() {
var img = document.createElement("img"); var img = document.createElement("img");
assert_true(img.complete); assert_true(img.complete);
img.src = `3.jpg?nocache=${Math.random()}`; img.src = `3.jpg?nocache=${Math.random()}`;
assert_false(img.complete); assert_false(img.complete);
img.onload = this.step_func_done(() => { img.onload = t.step_func_done(() => {
assert_true(img.complete); assert_true(img.complete);
img.removeAttribute("src"); img.removeAttribute("src");
assert_true(img.complete, "Should be complete, since we removed the src"); assert_true(img.complete, "Should be complete, since we removed the src");
}); });
}); }, "async src removal test");
var t4 = async_test("async srcset removal test"); async_test(t => {
t4.step(function() {
var img = document.createElement("img"); var img = document.createElement("img");
assert_true(img.complete); assert_true(img.complete);
img.srcset = `3.jpg?nocache=${Math.random()} 1x`; img.srcset = `3.jpg?nocache=${Math.random()} 1x`;
assert_false(img.complete); assert_false(img.complete);
img.onload = this.step_func_done(() => { img.onload = t.step_func_done(() => {
assert_true(img.complete); assert_true(img.complete);
img.removeAttribute("srcset"); img.removeAttribute("srcset");
assert_true(img.complete, "Should be complete, since we removed the srcset"); assert_true(img.complete, "Should be complete, since we removed the srcset");
}); });
}); }, "async srcset removal test");
var t5 = async_test("async src available image lookup test"); async_test(t => {
t5.step(function() {
var preload = document.createElement("img"); var preload = document.createElement("img");
var url = `3.jpg?nocache=${Math.random()}`; var url = `3.jpg?nocache=${Math.random()}`;
preload.src = url; preload.src = url;
preload.onload = this.step_func_done(function() { preload.onload = t.step_func_done(function() {
var img = document.createElement("img"); var img = document.createElement("img");
assert_true(img.complete); assert_true(img.complete);
img.src = url; img.src = url;
assert_true(img.complete, "Should be complete because we should hit the available image cache"); assert_true(img.complete, "Should be complete because we should hit the available image cache");
}); });
}); }, "async src available image lookup test");
var t6 = async_test("async pending request test"); async_test(t => {
t6.step(function() {
var img = document.createElement("img"); var img = document.createElement("img");
img.src = `3.jpg?nocache=${Math.random()}`; img.src = `3.jpg?nocache=${Math.random()}`;
img.onload = this.step_func_done(function() { img.onload = t.step_func_done(function() {
assert_true(img.complete); assert_true(img.complete);
img.src = `3.jpg?nocache=${Math.random()}`; img.src = `3.jpg?nocache=${Math.random()}`;
// This is not strictly per spec, but that's a spec bug. See
// https://github.com/whatwg/html/issues/4884
assert_false(img.complete, "Should not be complete because we have started a new load"); assert_false(img.complete, "Should not be complete because we have started a new load");
}); });
}); }, "async pending request test");
</script> </script>

View file

@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT // GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports // Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports) // (https://github.com/tidoust/reffy-reports)
// Source: CSS Animation Worklet API (https://wicg.github.io/animation-worklet/) // Source: CSS Animation Worklet API (https://drafts.css-houdini.org/css-animationworklet-1/)
[Exposed=Window] [Exposed=Window]
partial namespace CSS { partial namespace CSS {

View file

@ -3,9 +3,10 @@
// (https://github.com/tidoust/reffy-reports) // (https://github.com/tidoust/reffy-reports)
// Source: DOM Standard (https://dom.spec.whatwg.org/) // Source: DOM Standard (https://dom.spec.whatwg.org/)
[Constructor(DOMString type, optional EventInit eventInitDict = {}), [Exposed=(Window,Worker,AudioWorklet)]
Exposed=(Window,Worker,AudioWorklet)]
interface Event { interface Event {
constructor(DOMString type, optional EventInit eventInitDict = {});
readonly attribute DOMString type; readonly attribute DOMString type;
readonly attribute EventTarget? target; readonly attribute EventTarget? target;
readonly attribute EventTarget? srcElement; // historical readonly attribute EventTarget? srcElement; // historical
@ -45,9 +46,10 @@ partial interface Window {
[Replaceable] readonly attribute any event; // historical [Replaceable] readonly attribute any event; // historical
}; };
[Constructor(DOMString type, optional CustomEventInit eventInitDict = {}), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface CustomEvent : Event { interface CustomEvent : Event {
constructor(DOMString type, optional CustomEventInit eventInitDict = {});
readonly attribute any detail; readonly attribute any detail;
void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null); void initCustomEvent(DOMString type, optional boolean bubbles = false, optional boolean cancelable = false, optional any detail = null);
@ -57,9 +59,10 @@ dictionary CustomEventInit : EventInit {
any detail = null; any detail = null;
}; };
[Constructor, [Exposed=(Window,Worker,AudioWorklet)]
Exposed=(Window,Worker,AudioWorklet)]
interface EventTarget { interface EventTarget {
constructor();
void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {}); void addEventListener(DOMString type, EventListener? callback, optional (AddEventListenerOptions or boolean) options = {});
void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {}); void removeEventListener(DOMString type, EventListener? callback, optional (EventListenerOptions or boolean) options = {});
boolean dispatchEvent(Event event); boolean dispatchEvent(Event event);
@ -78,13 +81,15 @@ dictionary AddEventListenerOptions : EventListenerOptions {
boolean once = false; boolean once = false;
}; };
[Constructor, [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface AbortController { interface AbortController {
constructor();
[SameObject] readonly attribute AbortSignal signal; [SameObject] readonly attribute AbortSignal signal;
void abort(); void abort();
}; };
[Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface AbortSignal : EventTarget { interface AbortSignal : EventTarget {
readonly attribute boolean aborted; readonly attribute boolean aborted;
@ -155,9 +160,10 @@ interface HTMLCollection {
getter Element? namedItem(DOMString name); getter Element? namedItem(DOMString name);
}; };
[Constructor(MutationCallback callback), [Exposed=Window]
Exposed=Window]
interface MutationObserver { interface MutationObserver {
constructor(MutationCallback callback);
void observe(Node target, optional MutationObserverInit options = {}); void observe(Node target, optional MutationObserverInit options = {});
void disconnect(); void disconnect();
sequence<MutationRecord> takeRecords(); sequence<MutationRecord> takeRecords();
@ -250,9 +256,10 @@ dictionary GetRootNodeOptions {
boolean composed = false; boolean composed = false;
}; };
[Constructor, [Exposed=Window]
Exposed=Window]
interface Document : Node { interface Document : Node {
constructor();
[SameObject] readonly attribute DOMImplementation implementation; [SameObject] readonly attribute DOMImplementation implementation;
readonly attribute USVString URL; readonly attribute USVString URL;
readonly attribute USVString documentURI; readonly attribute USVString documentURI;
@ -315,15 +322,16 @@ interface DocumentType : Node {
readonly attribute DOMString systemId; readonly attribute DOMString systemId;
}; };
[Constructor, [Exposed=Window]
Exposed=Window]
interface DocumentFragment : Node { interface DocumentFragment : Node {
constructor();
}; };
[Exposed=Window] [Exposed=Window]
interface ShadowRoot : DocumentFragment { interface ShadowRoot : DocumentFragment {
readonly attribute ShadowRootMode mode; readonly attribute ShadowRootMode mode;
readonly attribute Element host; readonly attribute Element host;
attribute EventHandler onslotchange;
}; };
enum ShadowRootMode { "open", "closed" }; enum ShadowRootMode { "open", "closed" };
@ -376,6 +384,7 @@ interface Element : Node {
dictionary ShadowRootInit { dictionary ShadowRootInit {
required ShadowRootMode mode; required ShadowRootMode mode;
boolean delegatesFocus = false;
}; };
[Exposed=Window, [Exposed=Window,
@ -414,12 +423,14 @@ interface CharacterData : Node {
void replaceData(unsigned long offset, unsigned long count, DOMString data); void replaceData(unsigned long offset, unsigned long count, DOMString data);
}; };
[Constructor(optional DOMString data = ""), [Exposed=Window]
Exposed=Window]
interface Text : CharacterData { interface Text : CharacterData {
constructor(optional DOMString data = "");
[NewObject] Text splitText(unsigned long offset); [NewObject] Text splitText(unsigned long offset);
readonly attribute DOMString wholeText; readonly attribute DOMString wholeText;
}; };
[Exposed=Window] [Exposed=Window]
interface CDATASection : Text { interface CDATASection : Text {
}; };
@ -427,9 +438,9 @@ interface CDATASection : Text {
interface ProcessingInstruction : CharacterData { interface ProcessingInstruction : CharacterData {
readonly attribute DOMString target; readonly attribute DOMString target;
}; };
[Constructor(optional DOMString data = ""), [Exposed=Window]
Exposed=Window]
interface Comment : CharacterData { interface Comment : CharacterData {
constructor(optional DOMString data = "");
}; };
[Exposed=Window] [Exposed=Window]
@ -448,14 +459,15 @@ dictionary StaticRangeInit {
required unsigned long endOffset; required unsigned long endOffset;
}; };
[Constructor(StaticRangeInit init), [Exposed=Window]
Exposed=Window]
interface StaticRange : AbstractRange { interface StaticRange : AbstractRange {
constructor(StaticRangeInit init);
}; };
[Constructor, [Exposed=Window]
Exposed=Window]
interface Range : AbstractRange { interface Range : AbstractRange {
constructor();
readonly attribute Node commonAncestorContainer; readonly attribute Node commonAncestorContainer;
void setStart(Node node, unsigned long offset); void setStart(Node node, unsigned long offset);
@ -602,7 +614,9 @@ interface mixin XPathEvaluatorBase {
}; };
Document includes XPathEvaluatorBase; Document includes XPathEvaluatorBase;
[Exposed=Window, Constructor] [Exposed=Window]
interface XPathEvaluator {}; interface XPathEvaluator {
constructor();
};
XPathEvaluator includes XPathEvaluatorBase; XPathEvaluator includes XPathEvaluatorBase;

View file

@ -100,9 +100,10 @@ partial interface mixin DocumentOrShadowRoot {
readonly attribute Element? activeElement; readonly attribute Element? activeElement;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLElement : Element { interface HTMLElement : Element {
[HTMLConstructor] constructor();
// metadata attributes // metadata attributes
[CEReactions] attribute DOMString title; [CEReactions] attribute DOMString title;
[CEReactions] attribute DOMString lang; [CEReactions] attribute DOMString lang;
@ -128,9 +129,10 @@ HTMLElement includes DocumentAndElementEventHandlers;
HTMLElement includes ElementContentEditable; HTMLElement includes ElementContentEditable;
HTMLElement includes HTMLOrSVGElement; HTMLElement includes HTMLOrSVGElement;
// Note: intentionally not [HTMLConstructor]
[Exposed=Window] [Exposed=Window]
interface HTMLUnknownElement : HTMLElement { }; interface HTMLUnknownElement : HTMLElement {
// Note: intentionally no [HTMLConstructor]
};
interface mixin HTMLOrSVGElement { interface mixin HTMLOrSVGElement {
[SameObject] readonly attribute DOMStringMap dataset; [SameObject] readonly attribute DOMStringMap dataset;
@ -150,32 +152,37 @@ interface DOMStringMap {
[CEReactions] deleter void (DOMString name); [CEReactions] deleter void (DOMString name);
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLHtmlElement : HTMLElement { interface HTMLHtmlElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor] interface HTMLHeadElement : HTMLElement {
interface HTMLHeadElement : HTMLElement {}; [HTMLConstructor] constructor();
};
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTitleElement : HTMLElement { interface HTMLTitleElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString text; [CEReactions] attribute DOMString text;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLBaseElement : HTMLElement { interface HTMLBaseElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString href; [CEReactions] attribute USVString href;
[CEReactions] attribute DOMString target; [CEReactions] attribute DOMString target;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLLinkElement : HTMLElement { interface HTMLLinkElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString href; [CEReactions] attribute USVString href;
[CEReactions] attribute DOMString? crossOrigin; [CEReactions] attribute DOMString? crossOrigin;
[CEReactions] attribute DOMString rel; [CEReactions] attribute DOMString rel;
@ -194,9 +201,10 @@ interface HTMLLinkElement : HTMLElement {
}; };
HTMLLinkElement includes LinkStyle; HTMLLinkElement includes LinkStyle;
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLMetaElement : HTMLElement { interface HTMLMetaElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString httpEquiv; [CEReactions] attribute DOMString httpEquiv;
[CEReactions] attribute DOMString content; [CEReactions] attribute DOMString content;
@ -204,50 +212,57 @@ interface HTMLMetaElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLStyleElement : HTMLElement { interface HTMLStyleElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString media; [CEReactions] attribute DOMString media;
// also has obsolete members // also has obsolete members
}; };
HTMLStyleElement includes LinkStyle; HTMLStyleElement includes LinkStyle;
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLBodyElement : HTMLElement { interface HTMLBodyElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
HTMLBodyElement includes WindowEventHandlers; HTMLBodyElement includes WindowEventHandlers;
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLHeadingElement : HTMLElement { interface HTMLHeadingElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLParagraphElement : HTMLElement { interface HTMLParagraphElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLHRElement : HTMLElement { interface HTMLHRElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLPreElement : HTMLElement { interface HTMLPreElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLQuoteElement : HTMLElement { interface HTMLQuoteElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString cite; [CEReactions] attribute USVString cite;
}; };
@ -261,9 +276,10 @@ interface HTMLOListElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLUListElement : HTMLElement { interface HTMLUListElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
@ -282,21 +298,24 @@ interface HTMLLIElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDListElement : HTMLElement { interface HTMLDListElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDivElement : HTMLElement { interface HTMLDivElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLAnchorElement : HTMLElement { interface HTMLAnchorElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString target; [CEReactions] attribute DOMString target;
[CEReactions] attribute DOMString download; [CEReactions] attribute DOMString download;
[CEReactions] attribute USVString ping; [CEReactions] attribute USVString ping;
@ -313,9 +332,10 @@ interface HTMLAnchorElement : HTMLElement {
}; };
HTMLAnchorElement includes HTMLHyperlinkElementUtils; HTMLAnchorElement includes HTMLHyperlinkElementUtils;
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDataElement : HTMLElement { interface HTMLDataElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString value; [CEReactions] attribute DOMString value;
}; };
@ -325,13 +345,15 @@ interface HTMLTimeElement : HTMLElement {
[CEReactions] attribute DOMString dateTime; [CEReactions] attribute DOMString dateTime;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor] interface HTMLSpanElement : HTMLElement {
interface HTMLSpanElement : HTMLElement {}; [HTMLConstructor] constructor();
};
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLBRElement : HTMLElement { interface HTMLBRElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
@ -349,20 +371,23 @@ interface mixin HTMLHyperlinkElementUtils {
[CEReactions] attribute USVString hash; [CEReactions] attribute USVString hash;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLModElement : HTMLElement { interface HTMLModElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString cite; [CEReactions] attribute USVString cite;
[CEReactions] attribute DOMString dateTime; [CEReactions] attribute DOMString dateTime;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor] interface HTMLPictureElement : HTMLElement {
interface HTMLPictureElement : HTMLElement {}; [HTMLConstructor] constructor();
};
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLSourceElement : HTMLElement { interface HTMLSourceElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString src; [CEReactions] attribute USVString src;
[CEReactions] attribute DOMString type; [CEReactions] attribute DOMString type;
[CEReactions] attribute USVString srcset; [CEReactions] attribute USVString srcset;
@ -395,9 +420,10 @@ interface HTMLImageElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLIFrameElement : HTMLElement { interface HTMLIFrameElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString src; [CEReactions] attribute USVString src;
[CEReactions] attribute DOMString srcdoc; [CEReactions] attribute DOMString srcdoc;
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
@ -415,9 +441,10 @@ interface HTMLIFrameElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLEmbedElement : HTMLElement { interface HTMLEmbedElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString src; [CEReactions] attribute USVString src;
[CEReactions] attribute DOMString type; [CEReactions] attribute DOMString type;
[CEReactions] attribute DOMString width; [CEReactions] attribute DOMString width;
@ -427,9 +454,10 @@ interface HTMLEmbedElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLObjectElement : HTMLElement { interface HTMLObjectElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString data; [CEReactions] attribute USVString data;
[CEReactions] attribute DOMString type; [CEReactions] attribute DOMString type;
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
@ -451,9 +479,10 @@ interface HTMLObjectElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLParamElement : HTMLElement { interface HTMLParamElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString value; [CEReactions] attribute DOMString value;
@ -476,9 +505,10 @@ interface HTMLVideoElement : HTMLMediaElement {
NamedConstructor=Audio(optional DOMString src)] NamedConstructor=Audio(optional DOMString src)]
interface HTMLAudioElement : HTMLMediaElement {}; interface HTMLAudioElement : HTMLMediaElement {};
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTrackElement : HTMLElement { interface HTMLTrackElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString kind; [CEReactions] attribute DOMString kind;
[CEReactions] attribute USVString src; [CEReactions] attribute USVString src;
[CEReactions] attribute DOMString srclang; [CEReactions] attribute DOMString srclang;
@ -679,16 +709,18 @@ dictionary TrackEventInit : EventInit {
(VideoTrack or AudioTrack or TextTrack)? track = null; (VideoTrack or AudioTrack or TextTrack)? track = null;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLMapElement : HTMLElement { interface HTMLMapElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
[SameObject] readonly attribute HTMLCollection areas; [SameObject] readonly attribute HTMLCollection areas;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLAreaElement : HTMLElement { interface HTMLAreaElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString alt; [CEReactions] attribute DOMString alt;
[CEReactions] attribute DOMString coords; [CEReactions] attribute DOMString coords;
[CEReactions] attribute DOMString shape; [CEReactions] attribute DOMString shape;
@ -703,9 +735,10 @@ interface HTMLAreaElement : HTMLElement {
}; };
HTMLAreaElement includes HTMLHyperlinkElementUtils; HTMLAreaElement includes HTMLHyperlinkElementUtils;
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTableElement : HTMLElement { interface HTMLTableElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute HTMLTableCaptionElement? caption; [CEReactions] attribute HTMLTableCaptionElement? caption;
HTMLTableCaptionElement createCaption(); HTMLTableCaptionElement createCaption();
[CEReactions] void deleteCaption(); [CEReactions] void deleteCaption();
@ -728,23 +761,26 @@ interface HTMLTableElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTableCaptionElement : HTMLElement { interface HTMLTableCaptionElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTableColElement : HTMLElement { interface HTMLTableColElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute unsigned long span; [CEReactions] attribute unsigned long span;
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTableSectionElement : HTMLElement { interface HTMLTableSectionElement : HTMLElement {
[HTMLConstructor] constructor();
[SameObject] readonly attribute HTMLCollection rows; [SameObject] readonly attribute HTMLCollection rows;
HTMLTableRowElement insertRow(optional long index = -1); HTMLTableRowElement insertRow(optional long index = -1);
[CEReactions] void deleteRow(long index); [CEReactions] void deleteRow(long index);
@ -752,9 +788,10 @@ interface HTMLTableSectionElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTableRowElement : HTMLElement { interface HTMLTableRowElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute long rowIndex; readonly attribute long rowIndex;
readonly attribute long sectionRowIndex; readonly attribute long sectionRowIndex;
[SameObject] readonly attribute HTMLCollection cells; [SameObject] readonly attribute HTMLCollection cells;
@ -764,9 +801,10 @@ interface HTMLTableRowElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTableCellElement : HTMLElement { interface HTMLTableCellElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute unsigned long colSpan; [CEReactions] attribute unsigned long colSpan;
[CEReactions] attribute unsigned long rowSpan; [CEReactions] attribute unsigned long rowSpan;
[CEReactions] attribute DOMString headers; [CEReactions] attribute DOMString headers;
@ -807,17 +845,19 @@ interface HTMLFormElement : HTMLElement {
boolean reportValidity(); boolean reportValidity();
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLLabelElement : HTMLElement { interface HTMLLabelElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute HTMLFormElement? form; readonly attribute HTMLFormElement? form;
[CEReactions] attribute DOMString htmlFor; [CEReactions] attribute DOMString htmlFor;
readonly attribute HTMLElement? control; readonly attribute HTMLElement? control;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLInputElement : HTMLElement { interface HTMLInputElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString accept; [CEReactions] attribute DOMString accept;
[CEReactions] attribute DOMString alt; [CEReactions] attribute DOMString alt;
[CEReactions] attribute DOMString autocomplete; [CEReactions] attribute DOMString autocomplete;
@ -878,9 +918,10 @@ interface HTMLInputElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLButtonElement : HTMLElement { interface HTMLButtonElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute boolean disabled; [CEReactions] attribute boolean disabled;
readonly attribute HTMLFormElement? form; readonly attribute HTMLFormElement? form;
[CEReactions] attribute USVString formAction; [CEReactions] attribute USVString formAction;
@ -902,9 +943,10 @@ interface HTMLButtonElement : HTMLElement {
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLSelectElement : HTMLElement { interface HTMLSelectElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString autocomplete; [CEReactions] attribute DOMString autocomplete;
[CEReactions] attribute boolean disabled; [CEReactions] attribute boolean disabled;
readonly attribute HTMLFormElement? form; readonly attribute HTMLFormElement? form;
@ -938,15 +980,17 @@ interface HTMLSelectElement : HTMLElement {
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDataListElement : HTMLElement { interface HTMLDataListElement : HTMLElement {
[HTMLConstructor] constructor();
[SameObject] readonly attribute HTMLCollection options; [SameObject] readonly attribute HTMLCollection options;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLOptGroupElement : HTMLElement { interface HTMLOptGroupElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute boolean disabled; [CEReactions] attribute boolean disabled;
[CEReactions] attribute DOMString label; [CEReactions] attribute DOMString label;
}; };
@ -966,9 +1010,10 @@ interface HTMLOptionElement : HTMLElement {
readonly attribute long index; readonly attribute long index;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTextAreaElement : HTMLElement { interface HTMLTextAreaElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString autocomplete; [CEReactions] attribute DOMString autocomplete;
[CEReactions] attribute unsigned long cols; [CEReactions] attribute unsigned long cols;
[CEReactions] attribute DOMString dirName; [CEReactions] attribute DOMString dirName;
@ -1006,9 +1051,10 @@ interface HTMLTextAreaElement : HTMLElement {
void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLOutputElement : HTMLElement { interface HTMLOutputElement : HTMLElement {
[HTMLConstructor] constructor();
[SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor; [SameObject, PutForwards=value] readonly attribute DOMTokenList htmlFor;
readonly attribute HTMLFormElement? form; readonly attribute HTMLFormElement? form;
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
@ -1027,18 +1073,20 @@ interface HTMLOutputElement : HTMLElement {
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLProgressElement : HTMLElement { interface HTMLProgressElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute double value; [CEReactions] attribute double value;
[CEReactions] attribute double max; [CEReactions] attribute double max;
readonly attribute double position; readonly attribute double position;
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLMeterElement : HTMLElement { interface HTMLMeterElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute double value; [CEReactions] attribute double value;
[CEReactions] attribute double min; [CEReactions] attribute double min;
[CEReactions] attribute double max; [CEReactions] attribute double max;
@ -1048,9 +1096,10 @@ interface HTMLMeterElement : HTMLElement {
readonly attribute NodeList labels; readonly attribute NodeList labels;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLFieldSetElement : HTMLElement { interface HTMLFieldSetElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute boolean disabled; [CEReactions] attribute boolean disabled;
readonly attribute HTMLFormElement? form; readonly attribute HTMLFormElement? form;
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
@ -1067,9 +1116,10 @@ interface HTMLFieldSetElement : HTMLElement {
void setCustomValidity(DOMString error); void setCustomValidity(DOMString error);
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLLegendElement : HTMLElement { interface HTMLLegendElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute HTMLFormElement? form; readonly attribute HTMLFormElement? form;
// also has obsolete members // also has obsolete members
@ -1107,15 +1157,17 @@ dictionary FormDataEventInit : EventInit {
required FormData formData; required FormData formData;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDetailsElement : HTMLElement { interface HTMLDetailsElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute boolean open; [CEReactions] attribute boolean open;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDialogElement : HTMLElement { interface HTMLDialogElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute boolean open; [CEReactions] attribute boolean open;
attribute DOMString returnValue; attribute DOMString returnValue;
[CEReactions] void show(); [CEReactions] void show();
@ -1123,9 +1175,10 @@ interface HTMLDialogElement : HTMLElement {
[CEReactions] void close(optional DOMString returnValue); [CEReactions] void close(optional DOMString returnValue);
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLScriptElement : HTMLElement { interface HTMLScriptElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute USVString src; [CEReactions] attribute USVString src;
[CEReactions] attribute DOMString type; [CEReactions] attribute DOMString type;
[CEReactions] attribute boolean noModule; [CEReactions] attribute boolean noModule;
@ -1139,15 +1192,17 @@ interface HTMLScriptElement : HTMLElement {
// also has obsolete members // also has obsolete members
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLTemplateElement : HTMLElement { interface HTMLTemplateElement : HTMLElement {
[HTMLConstructor] constructor();
readonly attribute DocumentFragment content; readonly attribute DocumentFragment content;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLSlotElement : HTMLElement { interface HTMLSlotElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
sequence<Node> assignedNodes(optional AssignedNodesOptions options = {}); sequence<Node> assignedNodes(optional AssignedNodesOptions options = {});
sequence<Element> assignedElements(optional AssignedNodesOptions options = {}); sequence<Element> assignedElements(optional AssignedNodesOptions options = {});
@ -1395,19 +1450,21 @@ interface TextMetrics {
readonly attribute double ideographicBaseline; readonly attribute double ideographicBaseline;
}; };
[Constructor(unsigned long sw, unsigned long sh), [Exposed=(Window,Worker),
Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh),
Exposed=(Window,Worker),
Serializable] Serializable]
interface ImageData { interface ImageData {
constructor(unsigned long sw, unsigned long sh);
constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh);
readonly attribute unsigned long width; readonly attribute unsigned long width;
readonly attribute unsigned long height; readonly attribute unsigned long height;
readonly attribute Uint8ClampedArray data; readonly attribute Uint8ClampedArray data;
}; };
[Constructor(optional (Path2D or DOMString) path), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface Path2D { interface Path2D {
constructor(optional (Path2D or DOMString) path);
void addPath(Path2D path, optional DOMMatrix2DInit transform = {}); void addPath(Path2D path, optional DOMMatrix2DInit transform = {});
}; };
Path2D includes CanvasPath; Path2D includes CanvasPath;
@ -1431,8 +1488,10 @@ dictionary ImageEncodeOptions {
enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2" }; enum OffscreenRenderingContextId { "2d", "bitmaprenderer", "webgl", "webgl2" };
[Constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height), Exposed=(Window,Worker), Transferable] [Exposed=(Window,Worker), Transferable]
interface OffscreenCanvas : EventTarget { interface OffscreenCanvas : EventTarget {
constructor([EnforceRange] unsigned long long width, [EnforceRange] unsigned long long height);
attribute [EnforceRange] unsigned long long width; attribute [EnforceRange] unsigned long long width;
attribute [EnforceRange] unsigned long long height; attribute [EnforceRange] unsigned long long height;
@ -1737,9 +1796,10 @@ interface mixin NavigatorOnLine {
readonly attribute boolean onLine; readonly attribute boolean onLine;
}; };
[Constructor(DOMString type, optional ErrorEventInit eventInitDict = {}), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface ErrorEvent : Event { interface ErrorEvent : Event {
constructor(DOMString type, optional ErrorEventInit eventInitDict = {});
readonly attribute DOMString message; readonly attribute DOMString message;
readonly attribute USVString filename; readonly attribute USVString filename;
readonly attribute unsigned long lineno; readonly attribute unsigned long lineno;
@ -1755,8 +1815,10 @@ dictionary ErrorEventInit : EventInit {
any error = null; any error = null;
}; };
[Constructor(DOMString type, PromiseRejectionEventInit eventInitDict), Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface PromiseRejectionEvent : Event { interface PromiseRejectionEvent : Event {
constructor(DOMString type, PromiseRejectionEventInit eventInitDict);
readonly attribute Promise<any> promise; readonly attribute Promise<any> promise;
readonly attribute any reason; readonly attribute any reason;
}; };
@ -1834,6 +1896,7 @@ interface mixin GlobalEventHandlers {
attribute EventHandler onseeked; attribute EventHandler onseeked;
attribute EventHandler onseeking; attribute EventHandler onseeking;
attribute EventHandler onselect; attribute EventHandler onselect;
attribute EventHandler onslotchange;
attribute EventHandler onstalled; attribute EventHandler onstalled;
attribute EventHandler onsubmit; attribute EventHandler onsubmit;
attribute EventHandler onsuspend; attribute EventHandler onsuspend;
@ -2012,9 +2075,10 @@ interface mixin AnimationFrameProvider {
Window includes AnimationFrameProvider; Window includes AnimationFrameProvider;
DedicatedWorkerGlobalScope includes AnimationFrameProvider; DedicatedWorkerGlobalScope includes AnimationFrameProvider;
[Constructor(DOMString type, optional MessageEventInit eventInitDict = {}), [Exposed=(Window,Worker,AudioWorklet)]
Exposed=(Window,Worker,AudioWorklet)]
interface MessageEvent : Event { interface MessageEvent : Event {
constructor(DOMString type, optional MessageEventInit eventInitDict = {});
readonly attribute any data; readonly attribute any data;
readonly attribute USVString origin; readonly attribute USVString origin;
readonly attribute DOMString lastEventId; readonly attribute DOMString lastEventId;
@ -2034,8 +2098,10 @@ dictionary MessageEventInit : EventInit {
typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource; typedef (WindowProxy or MessagePort or ServiceWorker) MessageEventSource;
[Constructor(USVString url, optional EventSourceInit eventSourceInitDict = {}), Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface EventSource : EventTarget { interface EventSource : EventTarget {
constructor(USVString url, optional EventSourceInit eventSourceInitDict = {});
readonly attribute USVString url; readonly attribute USVString url;
readonly attribute boolean withCredentials; readonly attribute boolean withCredentials;
@ -2057,8 +2123,10 @@ dictionary EventSourceInit {
}; };
enum BinaryType { "blob", "arraybuffer" }; enum BinaryType { "blob", "arraybuffer" };
[Constructor(USVString url, optional (DOMString or sequence<DOMString>) protocols = []), Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface WebSocket : EventTarget { interface WebSocket : EventTarget {
constructor(USVString url, optional (DOMString or sequence<DOMString>) protocols = []);
readonly attribute USVString url; readonly attribute USVString url;
// ready state // ready state
@ -2086,9 +2154,10 @@ interface WebSocket : EventTarget {
void send(ArrayBufferView data); void send(ArrayBufferView data);
}; };
[Constructor(DOMString type, optional CloseEventInit eventInitDict = {}), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface CloseEvent : Event { interface CloseEvent : Event {
constructor(DOMString type, optional CloseEventInit eventInitDict = {});
readonly attribute boolean wasClean; readonly attribute boolean wasClean;
readonly attribute unsigned short code; readonly attribute unsigned short code;
readonly attribute USVString reason; readonly attribute USVString reason;
@ -2122,8 +2191,10 @@ dictionary PostMessageOptions {
sequence<object> transfer = []; sequence<object> transfer = [];
}; };
[Constructor(DOMString name), Exposed=(Window,Worker)] [Exposed=(Window,Worker)]
interface BroadcastChannel : EventTarget { interface BroadcastChannel : EventTarget {
constructor(DOMString name);
readonly attribute DOMString name; readonly attribute DOMString name;
void postMessage(any message); void postMessage(any message);
void close(); void close();
@ -2172,9 +2243,10 @@ interface mixin AbstractWorker {
attribute EventHandler onerror; attribute EventHandler onerror;
}; };
[Constructor(USVString scriptURL, optional WorkerOptions options = {}), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface Worker : EventTarget { interface Worker : EventTarget {
constructor(USVString scriptURL, optional WorkerOptions options = {});
void terminate(); void terminate();
void postMessage(any message, sequence<object> transfer); void postMessage(any message, sequence<object> transfer);
@ -2193,9 +2265,10 @@ enum WorkerType { "classic", "module" };
Worker includes AbstractWorker; Worker includes AbstractWorker;
[Constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {}), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface SharedWorker : EventTarget { interface SharedWorker : EventTarget {
constructor(USVString scriptURL, optional (DOMString or WorkerOptions) options = {});
readonly attribute MessagePort port; readonly attribute MessagePort port;
}; };
SharedWorker includes AbstractWorker; SharedWorker includes AbstractWorker;
@ -2264,9 +2337,10 @@ dictionary StorageEventInit : EventInit {
Storage? storageArea = null; Storage? storageArea = null;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLMarqueeElement : HTMLElement { interface HTMLMarqueeElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString behavior; [CEReactions] attribute DOMString behavior;
[CEReactions] attribute DOMString bgColor; [CEReactions] attribute DOMString bgColor;
[CEReactions] attribute DOMString direction; [CEReactions] attribute DOMString direction;
@ -2287,17 +2361,19 @@ interface HTMLMarqueeElement : HTMLElement {
void stop(); void stop();
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLFrameSetElement : HTMLElement { interface HTMLFrameSetElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString cols; [CEReactions] attribute DOMString cols;
[CEReactions] attribute DOMString rows; [CEReactions] attribute DOMString rows;
}; };
HTMLFrameSetElement includes WindowEventHandlers; HTMLFrameSetElement includes WindowEventHandlers;
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLFrameElement : HTMLElement { interface HTMLFrameElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
[CEReactions] attribute DOMString scrolling; [CEReactions] attribute DOMString scrolling;
[CEReactions] attribute USVString src; [CEReactions] attribute USVString src;
@ -2348,9 +2424,10 @@ partial interface HTMLTableColElement {
[CEReactions] attribute DOMString width; [CEReactions] attribute DOMString width;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLDirectoryElement : HTMLElement { interface HTMLDirectoryElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute boolean compact; [CEReactions] attribute boolean compact;
}; };
@ -2367,9 +2444,10 @@ partial interface HTMLEmbedElement {
[CEReactions] attribute DOMString name; [CEReactions] attribute DOMString name;
}; };
[Exposed=Window, [Exposed=Window]
HTMLConstructor]
interface HTMLFontElement : HTMLElement { interface HTMLFontElement : HTMLElement {
[HTMLConstructor] constructor();
[CEReactions] attribute [TreatNullAs=EmptyString] DOMString color; [CEReactions] attribute [TreatNullAs=EmptyString] DOMString color;
[CEReactions] attribute DOMString face; [CEReactions] attribute DOMString face;
[CEReactions] attribute DOMString size; [CEReactions] attribute DOMString size;

View file

@ -1,7 +1,7 @@
// GENERATED CONTENT - DO NOT EDIT // GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into reffy-reports // Content was automatically extracted by Reffy into reffy-reports
// (https://github.com/tidoust/reffy-reports) // (https://github.com/tidoust/reffy-reports)
// Source: Scroll-linked Animations (https://wicg.github.io/scroll-animations/) // Source: Scroll-linked Animations (https://drafts.csswg.org/scroll-animations-1/)
enum ScrollDirection { enum ScrollDirection {
"block", "block",

View file

@ -13,8 +13,6 @@ dictionary NDEFMessageInit {
sequence<NDEFRecordInit> records; sequence<NDEFRecordInit> records;
}; };
typedef any NDEFRecordData;
[Exposed=Window] [Exposed=Window]
interface NDEFRecord { interface NDEFRecord {
constructor(NDEFRecordInit recordInit); constructor(NDEFRecordInit recordInit);
@ -34,7 +32,7 @@ dictionary NDEFRecordInit {
USVString mediaType; USVString mediaType;
USVString id; USVString id;
NDEFRecordData data; any data;
}; };
typedef DOMString NDEFRecordType; typedef DOMString NDEFRecordType;

View file

@ -9,7 +9,7 @@ partial interface Navigator {
[SecureContext, Exposed=Window] interface XR : EventTarget { [SecureContext, Exposed=Window] interface XR : EventTarget {
// Methods // Methods
Promise<void> supportsSession(XRSessionMode mode); Promise<boolean> isSessionSupported(XRSessionMode mode);
[NewObject] Promise<XRSession> requestSession(XRSessionMode mode, optional XRSessionInit options = {}); [NewObject] Promise<XRSession> requestSession(XRSessionMode mode, optional XRSessionInit options = {});
// Events // Events
@ -122,9 +122,9 @@ enum XREye {
readonly attribute long height; readonly attribute long height;
}; };
[SecureContext, Exposed=Window, [SecureContext, Exposed=Window]
Constructor(optional DOMPointInit position = {}, optional DOMPointInit orientation = {})]
interface XRRigidTransform { interface XRRigidTransform {
constructor(optional DOMPointInit position = {}, optional DOMPointInit orientation = {});
[SameObject] readonly attribute DOMPointReadOnly position; [SameObject] readonly attribute DOMPointReadOnly position;
[SameObject] readonly attribute DOMPointReadOnly orientation; [SameObject] readonly attribute DOMPointReadOnly orientation;
readonly attribute Float32Array matrix; readonly attribute Float32Array matrix;
@ -180,10 +180,11 @@ dictionary XRWebGLLayerInit {
double framebufferScaleFactor = 1.0; double framebufferScaleFactor = 1.0;
}; };
[SecureContext, Exposed=Window, Constructor(XRSession session, [SecureContext, Exposed=Window]
XRWebGLRenderingContext context,
optional XRWebGLLayerInit layerInit = {})]
interface XRWebGLLayer { interface XRWebGLLayer {
constructor(XRSession session,
XRWebGLRenderingContext context,
optional XRWebGLLayerInit layerInit = {});
// Attributes // Attributes
readonly attribute boolean antialias; readonly attribute boolean antialias;
readonly attribute boolean ignoreDepthValues; readonly attribute boolean ignoreDepthValues;
@ -207,8 +208,9 @@ partial interface mixin WebGLRenderingContextBase {
Promise<void> makeXRCompatible(); Promise<void> makeXRCompatible();
}; };
[SecureContext, Exposed=Window, Constructor(DOMString type, XRSessionEventInit eventInitDict)] [SecureContext, Exposed=Window]
interface XRSessionEvent : Event { interface XRSessionEvent : Event {
constructor(DOMString type, XRSessionEventInit eventInitDict);
[SameObject] readonly attribute XRSession session; [SameObject] readonly attribute XRSession session;
}; };
@ -216,8 +218,9 @@ dictionary XRSessionEventInit : EventInit {
required XRSession session; required XRSession session;
}; };
[SecureContext, Exposed=Window, Constructor(DOMString type, XRInputSourceEventInit eventInitDict)] [SecureContext, Exposed=Window]
interface XRInputSourceEvent : Event { interface XRInputSourceEvent : Event {
constructor(DOMString type, XRInputSourceEventInit eventInitDict);
[SameObject] readonly attribute XRFrame frame; [SameObject] readonly attribute XRFrame frame;
[SameObject] readonly attribute XRInputSource inputSource; [SameObject] readonly attribute XRInputSource inputSource;
}; };
@ -227,8 +230,9 @@ dictionary XRInputSourceEventInit : EventInit {
required XRInputSource inputSource; required XRInputSource inputSource;
}; };
[SecureContext, Exposed=Window, Constructor(DOMString type, XRInputSourcesChangeEventInit eventInitDict)] [SecureContext, Exposed=Window]
interface XRInputSourcesChangeEvent : Event { interface XRInputSourcesChangeEvent : Event {
constructor(DOMString type, XRInputSourcesChangeEventInit eventInitDict);
[SameObject] readonly attribute XRSession session; [SameObject] readonly attribute XRSession session;
[SameObject] readonly attribute FrozenArray<XRInputSource> added; [SameObject] readonly attribute FrozenArray<XRInputSource> added;
[SameObject] readonly attribute FrozenArray<XRInputSource> removed; [SameObject] readonly attribute FrozenArray<XRInputSource> removed;
@ -241,8 +245,9 @@ dictionary XRInputSourcesChangeEventInit : EventInit {
}; };
[SecureContext, Exposed=Window, Constructor(DOMString type, XRReferenceSpaceEventInit eventInitDict)] [SecureContext, Exposed=Window]
interface XRReferenceSpaceEvent : Event { interface XRReferenceSpaceEvent : Event {
constructor(DOMString type, XRReferenceSpaceEventInit eventInitDict);
[SameObject] readonly attribute XRReferenceSpace referenceSpace; [SameObject] readonly attribute XRReferenceSpace referenceSpace;
[SameObject] readonly attribute XRRigidTransform? transform; [SameObject] readonly attribute XRRigidTransform? transform;
}; };

View file

@ -28,9 +28,10 @@ enum XMLHttpRequestResponseType {
"text" "text"
}; };
[Constructor, [Exposed=(Window,DedicatedWorker,SharedWorker)]
Exposed=(Window,DedicatedWorker,SharedWorker)]
interface XMLHttpRequest : XMLHttpRequestEventTarget { interface XMLHttpRequest : XMLHttpRequestEventTarget {
constructor();
// event handler // event handler
attribute EventHandler onreadystatechange; attribute EventHandler onreadystatechange;
@ -64,11 +65,13 @@ interface XMLHttpRequest : XMLHttpRequestEventTarget {
readonly attribute USVString responseText; readonly attribute USVString responseText;
[Exposed=Window] readonly attribute Document? responseXML; [Exposed=Window] readonly attribute Document? responseXML;
}; };
typedef (File or USVString) FormDataEntryValue; typedef (File or USVString) FormDataEntryValue;
[Constructor(optional HTMLFormElement form), [Exposed=(Window,Worker)]
Exposed=(Window,Worker)]
interface FormData { interface FormData {
constructor(optional HTMLFormElement form);
void append(USVString name, USVString value); void append(USVString name, USVString value);
void append(USVString name, Blob blobValue, optional USVString filename); void append(USVString name, Blob blobValue, optional USVString filename);
void delete(USVString name); void delete(USVString name);
@ -79,9 +82,11 @@ interface FormData {
void set(USVString name, Blob blobValue, optional USVString filename); void set(USVString name, Blob blobValue, optional USVString filename);
iterable<USVString, FormDataEntryValue>; iterable<USVString, FormDataEntryValue>;
}; };
[Constructor(DOMString type, optional ProgressEventInit eventInitDict),
Exposed=(Window,DedicatedWorker,SharedWorker)] [Exposed=(Window,DedicatedWorker,SharedWorker)]
interface ProgressEvent : Event { interface ProgressEvent : Event {
constructor(DOMString type, optional ProgressEventInit eventInitDict = {});
readonly attribute boolean lengthComputable; readonly attribute boolean lengthComputable;
readonly attribute unsigned long long loaded; readonly attribute unsigned long long loaded;
readonly attribute unsigned long long total; readonly attribute unsigned long long total;

View file

@ -46,5 +46,5 @@ function retryShowsErrorMember(button) {
</ol> </ol>
<small> <small>
If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a>
and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">owners</a>.
</small> </small>

View file

@ -61,5 +61,5 @@ function retryShowsPayerMember(button, error) {
</ol> </ol>
<small> <small>
If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a>
and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">owners</a>.
</small> </small>

View file

@ -94,5 +94,5 @@ function retryShowsShippingAddressMember(button, error) {
</ol> </ol>
<small> <small>
If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a> If you find a buggy test, please <a href="https://github.com/w3c/web-platform-tests/issues">file a bug</a>
and tag one of the <a href="https://github.com/w3c/web-platform-tests/blob/master/payment-request/OWNERS">owners</a>. and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">owners</a>.
</small> </small>

View file

@ -69,5 +69,5 @@ function runTest(button, options, expected){
</ol> </ol>
<small> <small>
If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a>
and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/OWNERS">owners</a>. and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">owners</a>.
</small> </small>

View file

@ -64,5 +64,5 @@ function testImmediateUpdate({ textContent: testName }) {
</ol> </ol>
<small> <small>
If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a>
and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/OWNERS">owners</a>. and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">owners</a>.
</small> </small>

View file

@ -52,5 +52,5 @@ function runTest(button) {
</ol> </ol>
<small> <small>
If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a> If you find a buggy test, please <a href="https://github.com/web-platform-tests/wpt/issues">file a bug</a>
and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/OWNERS">owners</a>. and tag one of the <a href="https://github.com/web-platform-tests/wpt/blob/master/payment-request/META.yml">owners</a>.
</small> </small>

View file

@ -184,10 +184,8 @@ def main():
pr = get_pr(owner, repo, head_rev) pr = get_pr(owner, repo, head_rev)
if pr is None: if pr is None:
# This should only really happen during testing return Status.FAIL
tag_name = "merge_commit_%s" % head_rev tag_name = "merge_pr_%s" % pr
else:
tag_name = "merge_pr_%s" % pr
manifest_path = os.path.expanduser(os.path.join("~", "meta", "MANIFEST.json")) manifest_path = os.path.expanduser(os.path.join("~", "meta", "MANIFEST.json"))

View file

@ -66,7 +66,7 @@ def score_name(name):
# type: (str) -> Optional[int] # type: (str) -> Optional[int]
"""Score how much we like each filename, lower wins, None rejects""" """Score how much we like each filename, lower wins, None rejects"""
# Accept both ways of naming the manfest asset, even though # Accept both ways of naming the manifest asset, even though
# there's no longer a reason to include the commit sha. # there's no longer a reason to include the commit sha.
if name.startswith("MANIFEST-") or name.startswith("MANIFEST."): if name.startswith("MANIFEST-") or name.startswith("MANIFEST."):
if zstandard and name.endswith("json.zst"): if zstandard and name.endswith("json.zst"):

View file

@ -77,7 +77,7 @@ def create_parser():
help="Never attempt to download the manifest.") help="Never attempt to download the manifest.")
parser.add_argument( parser.add_argument(
"--cache-root", action="store", default=os.path.join(wpt_root, ".wptcache"), "--cache-root", action="store", default=os.path.join(wpt_root, ".wptcache"),
help="Path in which to store any caches (default <tests_root>/.wptcache/") help="Path in which to store any caches (default <tests_root>/.wptcache/)")
return parser return parser

View file

@ -1104,6 +1104,42 @@ class WebKit(Browser):
return None return None
class WebKitGTKMiniBrowser(WebKit):
def find_binary(self, venv_path=None, channel=None):
libexecpaths = ["/usr/libexec/webkit2gtk-4.0"] # Fedora path
triplet = "x86_64-linux-gnu"
# Try to use GCC to detect this machine triplet
gcc = find_executable("gcc")
if gcc:
try:
triplet = call(gcc, "-dumpmachine").strip()
except subprocess.CalledProcessError:
pass
# Add Debian/Ubuntu path
libexecpaths.append("/usr/lib/%s/webkit2gtk-4.0" % triplet)
return find_executable("MiniBrowser", os.pathsep.join(libexecpaths))
def find_webdriver(self, channel=None):
return find_executable("WebKitWebDriver")
def version(self, binary=None, webdriver_binary=None):
if binary is None:
return None
try: # WebKitGTK MiniBrowser before 2.26.0 doesn't support --version
output = call(binary, "--version").strip()
except subprocess.CalledProcessError:
return None
# Example output: "WebKitGTK 2.26.1"
if output:
m = re.match(r"WebKitGTK (.+)", output)
if not m:
self.logger.warning("Failed to extract version from: %s" % output)
return None
return m.group(1)
return None
class Epiphany(Browser): class Epiphany(Browser):
"""Epiphany-specific interface.""" """Epiphany-specific interface."""

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