Deleted: trunk/LayoutTests/inspector/css/selector-dynamic-specificity-expected.txt (260038 => 260039)
--- trunk/LayoutTests/inspector/css/selector-dynamic-specificity-expected.txt 2020-04-13 20:59:07 UTC (rev 260038)
+++ trunk/LayoutTests/inspector/css/selector-dynamic-specificity-expected.txt 2020-04-13 21:24:11 UTC (rev 260039)
@@ -1,51 +0,0 @@
-Testing that dynamic selectors have expected specificity values depending on the context node.
-
-
-p - :is(div, article) (0, 0, 1) (dynamic)
-p - :is(div, .foo, #bar, div#bar) (no value) (dynamic)
-p - :matches(div, article) (0, 0, 1) (dynamic)
-p - :matches(div, .foo, #bar, div#bar) (no value) (dynamic)
-p - div:nth-child(odd) (0, 1, 1)
-p - :nth-child(odd of div) (0, 1, 1) (dynamic)
-p - :nth-child(odd of div, .foo, #bar, div#bar) (no value) (dynamic)
-p - :nth-child(even of div, .foo, #bar, div#bar) (no value) (dynamic)
-p - :not(span, #missing) (1, 0, 0)
-p - :not(:not(:is(div, .foo, #bar, div#bar))) (1, 0, 1)
-p - :not(:not(:matches(div, .foo, #bar, div#bar))) (1, 0, 1)
-
-div - :is(div, article) (0, 0, 1) (dynamic)
-div - :is(div, .foo, #bar, div#bar) (0, 0, 1) (dynamic)
-div - :matches(div, article) (0, 0, 1) (dynamic)
-div - :matches(div, .foo, #bar, div#bar) (0, 0, 1) (dynamic)
-div - div:nth-child(odd) (0, 1, 1)
-div - :nth-child(odd of div) (0, 1, 1) (dynamic)
-div - :nth-child(odd of div, .foo, #bar, div#bar) (0, 1, 1) (dynamic)
-div - :nth-child(even of div, .foo, #bar, div#bar) (no value) (dynamic)
-div - :not(span, #missing) (1, 0, 0)
-div - :not(:not(:is(div, .foo, #bar, div#bar))) (1, 0, 1)
-div - :not(:not(:matches(div, .foo, #bar, div#bar))) (1, 0, 1)
-
-.foo - :is(div, article) (0, 0, 1) (dynamic)
-.foo - :is(div, .foo, #bar, div#bar) (0, 1, 0) (dynamic)
-.foo - :matches(div, article) (0, 0, 1) (dynamic)
-.foo - :matches(div, .foo, #bar, div#bar) (0, 1, 0) (dynamic)
-.foo - div:nth-child(odd) (0, 1, 1)
-.foo - :nth-child(odd of div) (0, 1, 1) (dynamic)
-.foo - :nth-child(odd of div, .foo, #bar, div#bar) (no value) (dynamic)
-.foo - :nth-child(even of div, .foo, #bar, div#bar) (0, 2, 0) (dynamic)
-.foo - :not(span, #missing) (1, 0, 0)
-.foo - :not(:not(:is(div, .foo, #bar, div#bar))) (1, 0, 1)
-.foo - :not(:not(:matches(div, .foo, #bar, div#bar))) (1, 0, 1)
-
-#bar - :is(div, article) (0, 0, 1) (dynamic)
-#bar - :is(div, .foo, #bar, div#bar) (1, 0, 1) (dynamic)
-#bar - :matches(div, article) (0, 0, 1) (dynamic)
-#bar - :matches(div, .foo, #bar, div#bar) (1, 0, 1) (dynamic)
-#bar - div:nth-child(odd) (0, 1, 1)
-#bar - :nth-child(odd of div) (0, 1, 1) (dynamic)
-#bar - :nth-child(odd of div, .foo, #bar, div#bar) (1, 1, 1) (dynamic)
-#bar - :nth-child(even of div, .foo, #bar, div#bar) (no value) (dynamic)
-#bar - :not(span, #missing) (1, 0, 0)
-#bar - :not(:not(:is(div, .foo, #bar, div#bar))) (1, 0, 1)
-#bar - :not(:not(:matches(div, .foo, #bar, div#bar))) (1, 0, 1)
-
Deleted: trunk/LayoutTests/inspector/css/selector-dynamic-specificity.html (260038 => 260039)
--- trunk/LayoutTests/inspector/css/selector-dynamic-specificity.html 2020-04-13 20:59:07 UTC (rev 260038)
+++ trunk/LayoutTests/inspector/css/selector-dynamic-specificity.html 2020-04-13 21:24:11 UTC (rev 260039)
@@ -1,105 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-:is(div, article), /* dynamic, but statically always the same */
-:is(div, .foo, #bar, div#bar), /* dynamic, changing based on matched element */
-:matches(div, article), /* dynamic, but statically always the same */
-:matches(div, .foo, #bar, div#bar), /* dynamic, changing based on matched element */
-div:nth-child(odd), /* static, no selector list */
-:nth-child(odd of div), /* dynamic, but statically always the same */
-:nth-child(odd of div, .foo, #bar, div#bar), /* dynamic, changing based on matched element */
-:nth-child(even of div, .foo, #bar, div#bar), /* dynamic, changing based on matched element */
-:not(span, #missing), /* static, maximum in list */
-:not(:not(:is(div, .foo, #bar, div#bar))), /* static, is() inside not() is maximized */
-:not(:not(:matches(div, .foo, #bar, div#bar))), /* static, matches() inside not() is maximized */
-* /* ignored */
-{
- color: green;
-}
-</style>
-<script src=""
-<script>
-function test() {
- var nodeStyles;
- var documentNode;
-
- var currentSelector = null;
- var currentStepIndex = 0;
- var steps = ["p", "div", ".foo", "#bar"];
-
- function validateSelectors()
- {
- InspectorTest.log("");
-
- var seenRules = [];
-
- for (var i = 0; i < nodeStyles.matchedRules.length; ++i) {
- var rule = nodeStyles.matchedRules[i];
- if (rule.type !== WI.CSSStyleSheet.Type.Author)
- continue;
-
- if (seenRules.some(function(r) { return r.isEqualTo(rule); }))
- continue;
- seenRules.push(rule);
-
- for (var selector of rule.selectors) {
- if (selector.text === "*")
- continue;
-
- var output = currentSelector + " - " + selector.text;
- output += selector.specificity ? " (" + selector.specificity.join(", ") + ")" : " (no value)";
- if (selector.dynamic)
- output += " (dynamic)";
- InspectorTest.log(output);
- }
- }
-
- runNextStep();
- }
-
- function onStylesRefreshed()
- {
- nodeStyles.removeEventListener(WI.DOMNodeStyles.Event.Refreshed, onStylesRefreshed, this);
- validateSelectors();
- }
-
- function runNextStep()
- {
- if (currentStepIndex >= steps.length) {
- InspectorTest.completeTest();
- return;
- }
-
- currentSelector = steps[currentStepIndex++];
- documentNode.querySelector(currentSelector, function(contentNodeId) {
- if (contentNodeId) {
- var domNode = WI.domManager.nodeForId(contentNodeId);
- nodeStyles = WI.cssManager.stylesForNode(domNode);
-
- if (nodeStyles.needsRefresh)
- nodeStyles.addEventListener(WI.DOMNodeStyles.Event.Refreshed, onStylesRefreshed, this);
- else
- validateSelectors();
- } else {
- InspectorTest.log("DOM node not found.");
- InspectorTest.completeTest();
- }
- });
- }
-
- WI.domManager.requestDocument(function(node) {
- documentNode = node;
- runNextStep();
- });
-}
-</script>
-</head>
-<body _onload_="runTest()">
- <p>Testing that dynamic selectors have expected specificity values depending on the context node.</p>
-
- <div></div>
- <div class="foo"></div>
- <div id="bar"></div>
-</body>
-</html>