Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-03-09 20:14:20 UTC (rev 274167)
@@ -1,3 +1,35 @@
+2021-03-09 Chris Dumez <[email protected]>
+
+ Resync web-platform-tests/dom tests from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=222983
+
+ Reviewed by Geoffrey Garen.
+
+ Resync web-platform-tests/dom tests from upstream 7a9388b0f029e03.
+
+ * web-platform-tests/dom/events/Event-dispatch-click-expected.txt:
+ * web-platform-tests/dom/events/Event-dispatch-click.html:
+ * web-platform-tests/dom/events/Event-dispatch-redispatch.html:
+ * web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling-expected.txt: Added.
+ * web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html: Added.
+ * web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt:
+ * web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default-expected.txt: Added.
+ * web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.html: Added.
+ * web-platform-tests/dom/events/w3c-import.log:
+ * web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt:
+ * web-platform-tests/dom/nodes/Document-createEvent.https.html:
+ * web-platform-tests/dom/nodes/Document-createEvent.js:
+ * web-platform-tests/dom/nodes/Element-matches-expected.txt:
+ * web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt:
+ * web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt:
+ * web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt:
+ * web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt:
+ * web-platform-tests/dom/nodes/aria-element-reflection.tentative.html:
+ * web-platform-tests/dom/nodes/selectors.js:
+ * web-platform-tests/dom/slot-recalc-expected.txt: Added.
+ * web-platform-tests/dom/slot-recalc.html: Added.
+ * web-platform-tests/dom/w3c-import.log:
+
2021-03-09 Antoine Quint <[email protected]>
Correctly blend column-width and column-count CSS properties
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -1,4 +1,6 @@
+Harness Error (TIMEOUT), message = null
+
PASS basic with click()
PASS basic with dispatchEvent()
PASS basic with wrong event class
@@ -22,6 +24,10 @@
PASS disabled radio should get legacy-canceled-activation behavior
PASS disabled checkbox should get legacy-canceled-activation behavior 2
PASS disabled radio should get legacy-canceled-activation behavior 2
+TIMEOUT disabling checkbox in onclick listener shouldn't suppress oninput Test timed out
+TIMEOUT disabling checkbox in onclick listener shouldn't suppress onchange Test timed out
+TIMEOUT disabling radio in onclick listener shouldn't suppress oninput Test timed out
+TIMEOUT disabling radio in onclick listener shouldn't suppress onchange Test timed out
PASS disconnected form should not submit
PASS disabled submit button should not activate
PASS submit button should not activate if the event listener disables it
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click.html (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click.html 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-click.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -289,6 +289,23 @@
assert_false(input.checked);
}, `disabled radio should get legacy-canceled-activation behavior 2`);
+for (const type of ["checkbox", "radio"]) {
+ for (const handler of ["oninput", "onchange"]) {
+ async_test(t => {
+ const input = document.createElement("input");
+ input.type = type;
+ input._onclick_ = t.step_func(ev => {
+ input.disabled = true;
+ });
+ input[handler] = t.step_func(ev => {
+ assert_equals(input.checked, true);
+ t.done();
+ });
+ input.click();
+ }, `disabling ${type} in onclick listener shouldn't suppress ${handler}`);
+ }
+}
+
async_test(function(t) {
var form = document.createElement("form")
var didSubmit = false
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -105,13 +105,7 @@
await waitForLoad;
let bounds = buttonElement.getBoundingClientRect();
test(() => { assert_true(true); }, `Synthesizing click on button...`);
- new test_driver.Actions()
- .pointerMove(Math.floor(bounds.width / 5),
- Math.floor(bounds.height / 2),
- {origin: buttonElement})
- .pointerDown({button: test_driver.Actions.prototype.ButtonType.LEFT})
- .pointerUp({button: test_driver.Actions.prototype.ButtonType.LEFT})
- .send()
+ new test_driver.click(buttonElement)
.then(() => {
test_mouseup_redispatching.step(() => {
assert_not_equals(clickEvent, undefined, "mouseup and click events should've been fired");
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling-expected.txt (0 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -0,0 +1,3 @@
+
+PASS Event-stopPropagation-cancel-bubbling
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html (0 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Joey Arhar" href=""
+<script src=""
+<script src=""
+<body>
+<script>
+test(t => {
+ const element = document.createElement('div');
+
+ element.addEventListener('click', () => {
+ event.stopPropagation();
+ }, { capture: true });
+
+ element.addEventListener('click',
+ t.unreached_func('stopPropagation in the capture handler should have canceled this bubble handler.'));
+
+ element.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
+});
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-dispatchEvent-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -19,7 +19,6 @@
PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (StorageEvent).
PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (SVGEvents).
PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (TextEvent).
-FAIL If the event's initialized flag is not set, an InvalidStateError must be thrown (TouchEvent). The operation is not supported.
PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (UIEvent).
PASS If the event's initialized flag is not set, an InvalidStateError must be thrown (UIEvents).
PASS If the event's dispatch flag is set, an InvalidStateError must be thrown.
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default-expected.txt (0 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -0,0 +1,4 @@
+This is a manual test since there is no way to synthesize wheel events. Scroll by wheel in the middle of the page to run the test.
+
+FAIL Wheel events are non-cancelable since the event listener is treated as passive. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: action"
+
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.html (0 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<title>Default passive document level wheel event listener manual test</title>
+<link rel="help" href=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<body _onload_=runTest()>
+<div>This is a manual test since there is no way to synthesize wheel events.
+Scroll by wheel in the middle of the page to run the test.</div>
+</body>
+<script>
+var cancelable = true;
+var wheel_arrived = false;
+document.addEventListener("wheel", function (event) {
+ cancelable = event.cancelable;
+ wheel_arrived = true;
+ event.preventDefault();
+});
+
+function waitFor(condition) {
+ const MAX_FRAME = 200;
+ return new Promise((resolve, reject) => {
+ function tick(frames) {
+ // We requestAnimationFrame either for 200 frames or until condition is
+ // met.
+ if (frames >= MAX_FRAME)
+ reject("Condition did not become true after 200 frames");
+ else if (condition())
+ resolve();
+ else
+ requestAnimationFrame(tick.bind(this, frames + 1));
+ }
+ tick(0);
+ });
+}
+
+function runTest() {
+ promise_test (async () => {
+ const pos_x = Math.floor(window.innerWidth / 2);
+ const pos_y = Math.floor(window.innerHeight / 2);
+ const delta_x = 0;
+ const delta_y = 100;
+ await new test_driver.Actions()
+ .scroll(pos_x, pos_y, delta_x, delta_y).send();
+ await waitFor(()=> { return wheel_arrived; });
+ assert_false(cancelable);
+ }, "Wheel events are non-cancelable since the event listener is treated as passive.");
+}
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log 2021-03-09 20:14:20 UTC (rev 274167)
@@ -51,6 +51,7 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-propagation.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-returnValue.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopImmediatePropagation.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-stopPropagation-cancel-bubbling.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-subclasses-constructors.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-high-resolution.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-timestamp-safe-resolution.html
@@ -74,6 +75,7 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-removeEventListener.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventTarget-this-of-listener.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-touchmove-event-listener-passive-by-default.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/events/document-level-wheel-event-listener-passive-by-default.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-disabled-dynamic.html
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global-extra.window.js
/LayoutTests/imported/w3c/web-platform-tests/dom/events/event-global.html
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -121,13 +121,6 @@
FAIL TEXTEVENT should be an alias for CompositionEvent. assert_equals: expected object "[object CompositionEvent]" but got object "[object TextEvent]"
PASS createEvent('TEXTEVENT') should be initialized correctly.
PASS Should throw NOT_SUPPORTED_ERR for pluralized legacy event interface "TextEvents"
-FAIL TouchEvent should be an alias for TouchEvent. The operation is not supported.
-FAIL createEvent('TouchEvent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL touchevent should be an alias for TouchEvent. The operation is not supported.
-FAIL createEvent('touchevent') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-FAIL TOUCHEVENT should be an alias for TouchEvent. The operation is not supported.
-FAIL createEvent('TOUCHEVENT') should be initialized correctly. undefined is not an object (evaluating 'ev.type')
-PASS Should throw NOT_SUPPORTED_ERR for pluralized legacy event interface "TouchEvents"
PASS UIEvent should be an alias for UIEvent.
PASS createEvent('UIEvent') should be initialized correctly.
PASS uievent should be an alias for UIEvent.
@@ -274,6 +267,8 @@
PASS Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "SyncEvents"
PASS Should throw NOT_SUPPORTED_ERR for non-legacy event interface "TimeEvent"
PASS Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "TimeEvents"
+PASS Should throw NOT_SUPPORTED_ERR for non-legacy event interface "TouchEvent"
+PASS Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "TouchEvents"
PASS Should throw NOT_SUPPORTED_ERR for non-legacy event interface "TrackEvent"
PASS Should throw NOT_SUPPORTED_ERR for pluralized non-legacy event interface "TrackEvents"
PASS Should throw NOT_SUPPORTED_ERR for non-legacy event interface "TransitionEvent"
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https.html (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https.html 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.https.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -134,6 +134,7 @@
"SpeechSynthesisEvent",
"SyncEvent",
"TimeEvent",
+ "TouchEvent",
"TrackEvent",
"TransitionEvent",
"WebGLContextEvent",
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.js (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.js 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Document-createEvent.js 2021-03-09 20:14:20 UTC (rev 274167)
@@ -17,7 +17,6 @@
"StorageEvent": "StorageEvent",
"SVGEvents": "Event",
"TextEvent": "CompositionEvent",
- "TouchEvent": "TouchEvent",
"UIEvent": "UIEvent",
"UIEvents": "UIEvent",
};
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-matches-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -166,7 +166,7 @@
PASS In-document Element.matches: :empty pseudo-class selector, matching empty p elements (with no refNodes): #pseudo-empty p:empty
PASS In-document Element.matches: :empty pseudo-class selector, matching all empty elements (with no refNodes): #pseudo-empty :empty
PASS In-document Element.matches: :link and :visited pseudo-class selectors, matching a and area elements with href attributes (with no refNodes): #pseudo-link :link, #pseudo-link :visited
-PASS In-document Element.matches: :link and :visited pseudo-class selectors, matching link elements with href attributes (with no refNodes): #head :link, #head :visited
+PASS In-document Element.matches: :link and :visited pseudo-class selectors, matching no elements (with no refNodes): #head :link, #head :visited
PASS In-document Element.matches: :target pseudo-class selector, matching the element referenced by the URL fragment identifier (with no refNodes): :target
PASS In-document Element.matches: :lang pseudo-class selector, matching inherited language (with no refNodes): #pseudo-lang-div1:lang(en)
PASS In-document Element.matches: :lang pseudo-class selector, matching specified language with exact value (with no refNodes): #pseudo-lang-div2:lang(fr)
@@ -658,7 +658,7 @@
PASS In-document Element.matches: :empty pseudo-class selector, matching empty p elements (with refNode Element): p:empty
PASS In-document Element.matches: :empty pseudo-class selector, matching all empty elements (with refNode Element): :empty
PASS In-document Element.matches: :link and :visited pseudo-class selectors, matching a and area elements with href attributes (with refNode Element): :link, #pseudo-link :visited
-PASS In-document Element.matches: :link and :visited pseudo-class selectors, matching link elements with href attributes (with refNode Element): :link, #head :visited
+PASS In-document Element.matches: :link and :visited pseudo-class selectors, matching no elements (with refNode Element): :link, #head :visited
PASS In-document Element.matches: :lang pseudo-class selector, matching inherited language (1) (with no refNodes): #pseudo-lang-div1:lang(en)
PASS In-document Element.matches: :lang pseudo-class selector, matching specified language with exact value (1) (with no refNodes): #pseudo-lang-div2:lang(fr)
PASS In-document Element.matches: :lang pseudo-class selector, matching specified language with partial value (1) (with no refNodes): #pseudo-lang-div3:lang(en)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-webkitMatchesSelector-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -166,7 +166,7 @@
PASS In-document Element.webkitMatchesSelector: :empty pseudo-class selector, matching empty p elements (with no refNodes): #pseudo-empty p:empty
PASS In-document Element.webkitMatchesSelector: :empty pseudo-class selector, matching all empty elements (with no refNodes): #pseudo-empty :empty
PASS In-document Element.webkitMatchesSelector: :link and :visited pseudo-class selectors, matching a and area elements with href attributes (with no refNodes): #pseudo-link :link, #pseudo-link :visited
-PASS In-document Element.webkitMatchesSelector: :link and :visited pseudo-class selectors, matching link elements with href attributes (with no refNodes): #head :link, #head :visited
+PASS In-document Element.webkitMatchesSelector: :link and :visited pseudo-class selectors, matching no elements (with no refNodes): #head :link, #head :visited
PASS In-document Element.webkitMatchesSelector: :target pseudo-class selector, matching the element referenced by the URL fragment identifier (with no refNodes): :target
PASS In-document Element.webkitMatchesSelector: :lang pseudo-class selector, matching inherited language (with no refNodes): #pseudo-lang-div1:lang(en)
PASS In-document Element.webkitMatchesSelector: :lang pseudo-class selector, matching specified language with exact value (with no refNodes): #pseudo-lang-div2:lang(fr)
@@ -658,7 +658,7 @@
PASS In-document Element.webkitMatchesSelector: :empty pseudo-class selector, matching empty p elements (with refNode Element): p:empty
PASS In-document Element.webkitMatchesSelector: :empty pseudo-class selector, matching all empty elements (with refNode Element): :empty
PASS In-document Element.webkitMatchesSelector: :link and :visited pseudo-class selectors, matching a and area elements with href attributes (with refNode Element): :link, #pseudo-link :visited
-PASS In-document Element.webkitMatchesSelector: :link and :visited pseudo-class selectors, matching link elements with href attributes (with refNode Element): :link, #head :visited
+PASS In-document Element.webkitMatchesSelector: :link and :visited pseudo-class selectors, matching no elements (with refNode Element): :link, #head :visited
PASS In-document Element.webkitMatchesSelector: :lang pseudo-class selector, matching inherited language (1) (with no refNodes): #pseudo-lang-div1:lang(en)
PASS In-document Element.webkitMatchesSelector: :lang pseudo-class selector, matching specified language with exact value (1) (with no refNodes): #pseudo-lang-div2:lang(fr)
PASS In-document Element.webkitMatchesSelector: :lang pseudo-class selector, matching specified language with partial value (1) (with no refNodes): #pseudo-lang-div3:lang(en)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -595,8 +595,8 @@
PASS Document.querySelector: :empty pseudo-class selector, matching all empty elements: #pseudo-empty :empty
PASS Document.querySelectorAll: :link and :visited pseudo-class selectors, matching a and area elements with href attributes: #pseudo-link :link, #pseudo-link :visited
PASS Document.querySelector: :link and :visited pseudo-class selectors, matching a and area elements with href attributes: #pseudo-link :link, #pseudo-link :visited
-PASS Document.querySelectorAll: :link and :visited pseudo-class selectors, matching link elements with href attributes: #head :link, #head :visited
-PASS Document.querySelector: :link and :visited pseudo-class selectors, matching link elements with href attributes: #head :link, #head :visited
+FAIL Document.querySelectorAll: :link and :visited pseudo-class selectors, matching no elements: #head :link, #head :visited assert_equals: The method should return the expected number of matches. expected 0 but got 2
+FAIL Document.querySelector: :link and :visited pseudo-class selectors, matching no elements: #head :link, #head :visited assert_equals: The method should not match anything. expected null but got Element node <link id="pseudo-link-link1" href=""
PASS Document.querySelectorAll: :target pseudo-class selector, matching the element referenced by the URL fragment identifier: :target
PASS Document.querySelector: :target pseudo-class selector, matching the element referenced by the URL fragment identifier: :target
PASS Document.querySelectorAll: :lang pseudo-class selector, matching inherited language: #pseudo-lang-div1:lang(en)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/ParentNode-querySelector-All-xht-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -595,8 +595,8 @@
PASS Document.querySelector: :empty pseudo-class selector, matching all empty elements: #pseudo-empty :empty
PASS Document.querySelectorAll: :link and :visited pseudo-class selectors, matching a and area elements with href attributes: #pseudo-link :link, #pseudo-link :visited
PASS Document.querySelector: :link and :visited pseudo-class selectors, matching a and area elements with href attributes: #pseudo-link :link, #pseudo-link :visited
-PASS Document.querySelectorAll: :link and :visited pseudo-class selectors, matching link elements with href attributes: #head :link, #head :visited
-PASS Document.querySelector: :link and :visited pseudo-class selectors, matching link elements with href attributes: #head :link, #head :visited
+FAIL Document.querySelectorAll: :link and :visited pseudo-class selectors, matching no elements: #head :link, #head :visited assert_equals: The method should return the expected number of matches. expected 0 but got 2
+FAIL Document.querySelector: :link and :visited pseudo-class selectors, matching no elements: #head :link, #head :visited assert_equals: The method should not match anything. expected null but got Element node <link id="pseudo-link-link1" href=""
PASS Document.querySelectorAll: :target pseudo-class selector, matching the element referenced by the URL fragment identifier: :target
PASS Document.querySelector: :target pseudo-class selector, matching the element referenced by the URL fragment identifier: :target
PASS Document.querySelectorAll: :lang pseudo-class selector, matching inherited language: #pseudo-lang-div1:lang(en)
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -11,6 +11,10 @@
Item 2
Item 1
Item 2
+Hello world!
+I am an apple
+I am a pear
+I am a banana
Billing
Name
@@ -51,7 +55,9 @@
FAIL aria-details assert_equals: expected (object) null but got (undefined) undefined
FAIL Deleting a reflected element should return null for the IDL attribute and cause the content attribute to become stale. assert_equals: expected (object) Element node <div role="option" id="contentAttrElement">Item 1</div> but got (undefined) undefined
FAIL Changing the ID of an element causes the content attribute to become out of sync. assert_equals: expected (object) Element node <div role="option" id="changingIdElement">Item 1</div> but got (undefined) undefined
-FAIL Reparenting an element into a descendant shadow scope nullifies the element reference. assert_equals: expected (string) "lightElement" but got (object) null
+FAIL Reparenting an element into a descendant shadow scope hides the element reference. assert_equals: null before expected (object) null but got (undefined) undefined
+FAIL Reparenting referenced element cannot cause retargeting of reference. assert_equals: expected (string) "apple" but got (object) null
+FAIL Element reference set in invalid scope remains intact throughout move to valid scope. assert_equals: expected null but got Element node <div id="toast"></div>
FAIL aria-labelledby. assert_array_equals: parsed content attribute sets element references. value is undefined, expected array
FAIL aria-controls. assert_array_equals: value is undefined, expected array
FAIL aria-describedby. assert_array_equals: value is undefined, expected array
@@ -60,4 +66,7 @@
FAIL shadow DOM behaviour for FrozenArray element reflection. assert_equals: expected (object) null but got (undefined) undefined
FAIL Moving explicitly set elements across shadow DOM boundaries. assert_equals: expected (string) "buttonDescription1 buttonDescription2" but got (object) null
FAIL Moving explicitly set elements around within the same scope, and removing from the DOM. assert_array_equals: aria-labeled by is supported by IDL getter. value is undefined, expected array
+PASS Reparenting.
+FAIL Attaching element reference before it's inserted into the DOM. assert_equals: Referenced element not inserted into document, so is in an invalid scope. expected null but got Element node <span id="toSpan"></span>
+FAIL Cross-document references and moves. assert_equals: Cross-document is an invalid scope, so reference will not be visible. expected null but got Element node <span></span>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/aria-element-reflection.tentative.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -181,10 +181,8 @@
deletionParent.ariaActiveDescendantElement = idlAttrElement;
assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idlAttrElement");
- // The element is still retrieved because it was explicitly set, and was at that point
- // in a valid scope.
deletionParent.removeChild(idlAttrElement);
- assert_equals(deletionParent.ariaActiveDescendantElement, idlAttrElement);
+ assert_equals(deletionParent.ariaActiveDescendantElement, null);
// The content attribute will still reflect the id.
assert_equals(deletionParent.getAttribute("aria-activedescendant"), "idlAttrElement");
@@ -221,8 +219,9 @@
}, "Changing the ID of an element causes the content attribute to become out of sync.");
</script>
+ <!-- TODO(chrishall): change naming scheme to inner/outer -->
<div id="lightParent" role="listbox">
- <div role="option" id="lightElement">Hello world!</div>
+ <div id="lightElement" role="option">Hello world!</div>
</div>
<div id="shadowHostElement"></div>
@@ -231,23 +230,104 @@
const lightElement = document.getElementById("lightElement");
const shadowRoot = shadowHostElement.attachShadow({mode: "open"});
+ assert_equals(lightParent.ariaActiveDescendantElement, null, 'null before');
+ assert_equals(lightParent.getAttribute('aria-activedescendant'), null, 'null before');
+
lightParent.ariaActiveDescendantElement = lightElement;
assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
+ assert_equals(lightParent.getAttribute('aria-activedescendant'), "lightElement");
- // Move the referenced element into shadow DOM. As it was explicitly set,
- // it is still able to be gotten even though it is in a different scope.
+ // Move the referenced element into shadow DOM.
+ // This will cause the computed attr-associated element to be null as the
+ // referenced element will no longer be in a valid scope.
+ // The underlying reference is kept intact, so if the referenced element is
+ // later restored to a valid scope the computed attr-associated element will
+ // then reflect
shadowRoot.appendChild(lightElement);
- assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
+ assert_equals(lightParent.ariaActiveDescendantElement, null, "computed attr-assoc element should be null as referenced element is in an invalid scope");
assert_equals(lightParent.getAttribute("aria-activedescendant"), "lightElement");
// Move the referenced element back into light DOM.
+ // Since the underlying reference was kept intact, after moving the
+ // referenced element back to a valid scope should be reflected in the
+ // computed attr-associated element.
lightParent.appendChild(lightElement);
- assert_equals(lightParent.ariaActiveDescendantElement, lightElement);
+ assert_equals(lightParent.ariaActiveDescendantElement, lightElement, "computed attr-assoc element should be restored as referenced element is back in a valid scope");
assert_equals(lightParent.getAttribute("aria-activedescendant"), "lightElement");
- }, "Reparenting an element into a descendant shadow scope nullifies the element reference.");
+ }, "Reparenting an element into a descendant shadow scope hides the element reference.");
</script>
- <div id="billingElement">Billing</div>
+ <div id='fruitbowl' role='listbox'>
+ <div id='apple' role='option'>I am an apple</div>
+ <div id='pear' role='option'>I am a pear</div>
+ <div id='banana' role='option'>I am a banana</div>
+ </div>
+ <div id='shadowFridge'></div>
+
+ <script>
+ test(function(t) {
+ const shadowRoot = shadowFridge.attachShadow({mode: "open"});
+ const banana = document.getElementById("banana");
+
+ fruitbowl.ariaActiveDescendantElement = apple;
+ assert_equals(fruitbowl.ariaActiveDescendantElement, apple);
+ assert_equals(fruitbowl.getAttribute("aria-activedescendant"), "apple");
+
+ // Move the referenced element into shadow DOM.
+ shadowRoot.appendChild(apple);
+ assert_equals(fruitbowl.ariaActiveDescendantElement, null, "computed attr-assoc element should be null as referenced element is in an invalid scope");
+ // Note that the content attribute is NOT cleared.
+ assert_equals(fruitbowl.getAttribute("aria-activedescendant"), "apple");
+
+ // let us rename our banana to an apple
+ banana.setAttribute("id", "apple");
+ const lyingBanana = document.getElementById("apple");
+ assert_equals(lyingBanana, banana);
+
+ // our ariaActiveDescendantElement thankfully isn't tricked.
+ // this is thanks to the underlying reference being kept intact, it is
+ // checked and found to be in an invalid scope and therefore the content
+ // attribute fallback isn't used.
+ assert_equals(fruitbowl.ariaActiveDescendantElement, null);
+ // our content attribute still returns "apple",
+ // even though fetching that by id would give us our lying banana.
+ assert_equals(fruitbowl.getAttribute("aria-activedescendant"), "apple");
+
+ // when we remove our IDL attribute, the content attribute is also thankfully cleared.
+ fruitbowl.ariaActiveDescendantElement = null;
+ assert_equals(fruitbowl.ariaActiveDescendantElement, null);
+ assert_equals(fruitbowl.getAttribute("aria-activedescendant"), null);
+ }, "Reparenting referenced element cannot cause retargeting of reference.");
+ </script>
+
+ <div id='toaster' role='listbox'></div>
+ <div id='shadowPantry'></div>
+
+ <script>
+ test(function(t) {
+ const shadowRoot = shadowPantry.attachShadow({mode: "open"});
+
+ // Our toast starts in the shadowPantry.
+ const toast = document.createElement("div");
+ toast.setAttribute("id", "toast");
+ shadowRoot.appendChild(toast);
+
+ // Prepare my toast for toasting
+ toaster.ariaActiveDescendantElement = toast;
+ assert_equals(toaster.ariaActiveDescendantElement, null);
+ assert_equals(toaster.getAttribute("aria-activedescendant"), "");
+
+ // Time to make some toast
+ toaster.appendChild(toast);
+ assert_equals(toaster.ariaActiveDescendantElement, toast);
+ // Current spec behaviour:
+ assert_equals(toaster.getAttribute("aria-activedescendant"), "");
+ }, "Element reference set in invalid scope remains intact throughout move to valid scope.");
+ </script>
+
+ <div id="billingElementContainer">
+ <div id="billingElement">Billing</div>
+ </div>
<div>
<div id="nameElement">Name</div>
<input type="text" id="input1" aria-labelledby="billingElement nameElement"/>
@@ -267,9 +347,15 @@
assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement], "Testing IDL setter/getter.");
assert_equals(input2.getAttribute("aria-labelledby"), "billingElement addressElement");
- // Remove the element from the DOM, but as it was explicitly set whilst in a valid scope
- // it can still be retrieved.
+ // Remove the billingElement from the DOM.
+ // As it was explicitly set the underlying association will remain intact,
+ // but it will be hidden until the element is moved back into a valid scope.
billingElement.remove();
+ assert_array_equals(input2.ariaLabelledByElements, [addressElement]);
+
+ // Insert the billingElement back into the DOM and check that it is visible
+ // again, as the underlying association should have been kept intact.
+ billingElementContainer.appendChild(billingElement);
assert_array_equals(input2.ariaLabelledByElements, [billingElement, addressElement]);
input2.ariaLabelledByElements = [];
@@ -445,8 +531,8 @@
// Elements that cross into shadow DOM are dropped, only reflect the valid
// elements in IDL and in the content attribute.
lightDomHeading.ariaFlowToElements = [shadowChild1, shadowChild2, lightDomText1, lightDomText2];
- assert_array_equals(lightDomHeading.ariaFlowToElements, [lightDomText1, lightDomText2]);
- assert_equals(lightDomHeading.getAttribute("aria-flowto"), "lightDomText1 lightDomText2", "empty content attribute if any given elements cross shadow boundaries");
+ assert_array_equals(lightDomHeading.ariaFlowToElements, [lightDomText1, lightDomText2], "IDL should only include valid elements");
+ assert_equals(lightDomHeading.getAttribute("aria-flowto"), "", "empty content attribute if any given elements cross shadow boundaries");
// Using a mixture of elements in the same scope and in a shadow including
// ancestor should set the IDL attribute, but should reflect the empty
@@ -479,7 +565,7 @@
describedElement.ariaDescribedByElements = [description1, description2];
// All elements were in the same scope, so elements are gettable and the content attribute reflects the ids.
- assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
+ assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2], "same scope reference");
assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
outerShadowRoot.appendChild(describedElement);
@@ -486,7 +572,7 @@
// Explicitly set attr-associated-elements should still be gettable because we are referencing elements in a lighter scope.
// The content attr still reflects the ids from the explicit elements because they were in a valid scope at the time of setting.
- assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
+ assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2], "lighter scope reference");
assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
// Move the explicitly set elements into a deeper shadow DOM to test the relationship should not be gettable.
@@ -493,15 +579,14 @@
innerShadowRoot.appendChild(description1);
innerShadowRoot.appendChild(description2);
- // Explicitly set elements are still retrieved, because they were in a valid scope when they were set.
- // The content attribute still reflects the ids.
- assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
+ // Explicitly set elements are no longer retrievable, because they are no longer in a valid scope.
+ assert_array_equals(describedElement.ariaDescribedByElements, [], "invalid scope reference");
assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
// Move into the same shadow scope as the explicitly set elements to test that the elements are gettable
// and reflect the correct IDs onto the content attribute.
innerShadowRoot.appendChild(describedElement);
- assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2]);
+ assert_array_equals(describedElement.ariaDescribedByElements, [description1, description2], "restored valid scope reference");
assert_equals(describedElement.getAttribute("aria-describedby"), "buttonDescription1 buttonDescription2");
}, "Moving explicitly set elements across shadow DOM boundaries.");
</script>
@@ -539,20 +624,21 @@
headingElement.ariaLabelledByElements = [headingLabel1, headingLabel2];
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2", "Elements are set again, so the content attribute is updated.");
- // Remove the referring element from the DOM, elements are gettable.
+ // Remove the referring element from the DOM, elements are no longer longer exposed,
+ // underlying internal reference is still kept intact.
headingElement.remove();
- assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2], "Element is no longer in the document, but references should be gettable.");
+ assert_array_equals(headingElement.ariaLabelledByElements, [], "Element is no longer in the document, so references should no longer be exposed.");
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
// Insert it back in.
sameScopeContainer.appendChild(headingElement);
- assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2]);
+ assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2], "Element is restored to valid scope, so should be gettable.");
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
- // Remove everything from the DOM, everything is still gettable.
+ // Remove everything from the DOM, nothing is exposed again.
headingLabel1.remove();
headingLabel2.remove();
- assert_array_equals(headingElement.ariaLabelledByElements, [headingLabel1, headingLabel2]);
+ assert_array_equals(headingElement.ariaLabelledByElements, []);
assert_equals(headingElement.getAttribute("aria-labelledby"), "headingLabel1 headingLabel2");
assert_equals(document.getElementById("headingLabel1"), null);
assert_equals(document.getElementById("headingLabel2"), null);
@@ -570,4 +656,69 @@
<option id="second">Second option</option>
</optgroup>
- <script>
\ No newline at end of file
+ <script>
+ test(function(t) {
+ input.ariaActiveDescendantElement = first;
+ first.parentElement.appendChild(first);
+
+ // This behaviour is currently under discussion by WHATWG.
+ // See: https://github.com/whatwg/html/pull/3917#issuecomment-527263562
+ assert_equals(input.ariaActiveDescendantElement, first);
+ }, "Reparenting.");
+ </script>
+
+ <div id='fromDiv'></div>
+
+ <script>
+ test(function(t) {
+ const toSpan = document.createElement('span');
+ toSpan.setAttribute("id", "toSpan");
+ fromDiv.ariaActiveDescendantElement = toSpan;
+
+ assert_equals(fromDiv.ariaActiveDescendantElement, null, "Referenced element not inserted into document, so is in an invalid scope.");
+ assert_equals(fromDiv.getAttribute("aria-activedescendant"), "", "Invalid scope, so content attribute not set.");
+
+ fromDiv.appendChild(toSpan);
+ assert_equals(fromDiv.ariaActiveDescendantElement, toSpan, "Referenced element now inserted into the document.");
+ assert_equals(fromDiv.getAttribute("aria-activedescendant"), "", "Content attribute remains empty, as it is only updated at set time.");
+
+ }, "Attaching element reference before it's inserted into the DOM.");
+ </script>
+
+ <div id='originalDocumentDiv'></div>
+
+ <script>
+ test(function(t) {
+ const newDoc = document.implementation.createHTMLDocument('new document');
+ const newDocSpan = newDoc.createElement('span');
+ newDoc.body.appendChild(newDocSpan);
+
+ // Create a reference across documents.
+ originalDocumentDiv.ariaActiveDescendantElement = newDocSpan;
+
+ assert_equals(originalDocumentDiv.ariaActiveDescendantElement, null, "Cross-document is an invalid scope, so reference will not be visible.");
+ assert_equals(fromDiv.getAttribute("aria-activedescendant"), "", "Invalid scope when set, so content attribute not set.");
+
+ // "Move" span to first document.
+ originalDocumentDiv.appendChild(newDocSpan);
+
+ // Implementation defined: moving object into same document from other document may cause reference to become visible.
+ assert_equals(originalDocumentDiv.ariaActiveDescendantElement, newDocSpan, "Implementation defined: moving object back *may* make reference visible.");
+ assert_equals(fromDiv.getAttribute("aria-activedescendant"), "", "Invalid scope when set, so content attribute not set.");
+ }, "Cross-document references and moves.");
+ </script>
+
+ <!-- TODO(chrishall): add additional GC test covering:
+ if an element is in an invalid scope but attached to the document, it's
+ not GC'd;
+ -->
+
+ <!-- TODO(chrishall): add additional GC test covering:
+ if an element is not attached to the document, but is in a tree fragment
+ which is not GC'd because there is a script reference to another element
+ in the tree fragment, and the relationship is valid because it is between
+ two elements in that tree fragment, the relationship is exposed *and* the
+ element is not GC'd
+ -->
+
+</html>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/selectors.js (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/selectors.js 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/selectors.js 2021-03-09 20:14:20 UTC (rev 274167)
@@ -219,7 +219,7 @@
// Implementations may treat all visited links as unvisited, so these cannot be tested separately.
// The only guarantee is that ":link,:visited" matches the set of all visited and unvisited links and that they are individually mutually exclusive sets.
{name: ":link and :visited pseudo-class selectors, matching a and area elements with href attributes", selector: "#pseudo-link :link, #pseudo-link :visited", expect: ["pseudo-link-a1", "pseudo-link-a2", "pseudo-link-area1"], level: 1, testType: TEST_QSA | TEST_MATCH},
- {name: ":link and :visited pseudo-class selectors, matching link elements with href attributes", selector: "#head :link, #head :visited", expect: ["pseudo-link-link1", "pseudo-link-link2"], exclude: ["element", "fragment", "detached"], level: 1, testType: TEST_QSA | TEST_MATCH},
+ {name: ":link and :visited pseudo-class selectors, matching no elements", selector: "#head :link, #head :visited", expect: [] /*no matches*/, exclude: ["element", "fragment", "detached"], level: 1, testType: TEST_QSA | TEST_MATCH},
{name: ":link and :visited pseudo-class selectors, not matching link elements with href attributes", selector: "#head :link, #head :visited", expect: [] /*no matches*/, exclude: ["document"], level: 1, testType: TEST_QSA},
{name: ":link and :visited pseudo-class selectors, chained, mutually exclusive pseudo-classes match nothing", selector: ":link:visited", expect: [] /*no matches*/, exclude: ["document"], level: 1, testType: TEST_QSA},
@@ -600,7 +600,7 @@
// Implementations may treat all visited links as unvisited, so these cannot be tested separately.
// The only guarantee is that ":link,:visited" matches the set of all visited and unvisited links and that they are individually mutually exclusive sets.
{name: ":link and :visited pseudo-class selectors, matching a and area elements with href attributes", selector: " :link, #pseudo-link :visited", ctx: "#pseudo-link", expect: ["pseudo-link-a1", "pseudo-link-a2", "pseudo-link-area1"], level: 1, testType: TEST_FIND | TEST_MATCH},
- {name: ":link and :visited pseudo-class selectors, matching link elements with href attributes", selector: " :link, #head :visited", ctx: "#head", expect: ["pseudo-link-link1", "pseudo-link-link2"], exclude: ["element", "fragment", "detached"], level: 1, testType: TEST_FIND | TEST_MATCH},
+ {name: ":link and :visited pseudo-class selectors, matching no elements", selector: " :link, #head :visited", ctx: "#head", expect: [] /*no matches*/, exclude: ["element", "fragment", "detached"], level: 1, testType: TEST_FIND | TEST_MATCH},
{name: ":link and :visited pseudo-class selectors, not matching link elements with href attributes", selector: " :link, #head :visited", ctx: "#head", expect: [] /*no matches*/, exclude: ["document"], level: 1, testType: TEST_FIND},
{name: ":link and :visited pseudo-class selectors, chained, mutually exclusive pseudo-classes match nothing", selector: ":link:visited", ctx: "#html", expect: [] /*no matches*/, exclude: ["document"], level: 1, testType: TEST_FIND},
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-expected.txt (0 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-expected.txt (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc-expected.txt 2021-03-09 20:14:20 UTC (rev 274167)
@@ -0,0 +1,12 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x84
+ RenderBlock {HTML} at (0,0) size 800x84
+ RenderBody {BODY} at (8,16) size 784x52
+ RenderBlock {DIV} at (0,0) size 784x52
+ RenderBlock {P} at (0,0) size 784x18
+ RenderText {#text} at (0,0) size 233x18
+ text run at (0,0) width 233: "there should be more text below this"
+ RenderBlock {P} at (0,34) size 784x18
+ RenderText {#text} at (0,0) size 167x18
+ text run at (0,0) width 167: "PASS if this text is visible"
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc.html (0 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc.html 2021-03-09 20:14:20 UTC (rev 274167)
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="author" title="Joey Arhar" href=""
+<link rel="help" href=""
+
+<link rel="match" href=""
+
+<body>
+<script>
+const host = document.createElement('div');
+document.body.appendChild(host);
+const root = host.attachShadow({mode: 'open'});
+
+const slot = document.createElement('slot');
+slot.innerHTML = `<p>there should be more text below this</p>`;
+root.appendChild(slot);
+
+_onload_ = () => {
+ const shouldBeVisible = document.createElement('p');
+ shouldBeVisible.textContent = 'PASS if this text is visible';
+ slot.appendChild(shouldBeVisible);
+};
+</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log (274166 => 274167)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log 2021-03-09 20:11:42 UTC (rev 274166)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/w3c-import.log 2021-03-09 20:14:20 UTC (rev 274167)
@@ -22,5 +22,6 @@
/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.any.js
/LayoutTests/imported/w3c/web-platform-tests/dom/idlharness.window.js
/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/slot-recalc.html
/LayoutTests/imported/w3c/web-platform-tests/dom/svg-insert-crash.html
/LayoutTests/imported/w3c/web-platform-tests/dom/window-extends-event-target.html