From b56e9edc37749319702ecacd013d7645ab6812e9 Mon Sep 17 00:00:00 2001 From: Miyoung Shin Date: Wed, 11 Nov 2020 01:07:49 -0800 Subject: [PATCH] [selectors4] Implement :dir pseudo-class This patch adds support for the new ":dir" pseudo-class. The patch is covered by several of tests imported from the web tests including generic tests in addition to the tests from Firefox and apart from some minor changes on current tests to add the new selector. Intent-to-ship thread is available at: https://groups.google.com/u/1/a/chromium.org/g/blink-dev/c/p0Wc66rbVOc BUG=576815 Change-Id: I503c6af95d9c5817e3e71b1b2025a5562929f0d8 --- ...selectors-dir-selector-change-001-ref.html | 16 +++++++++++ .../selectors-dir-selector-change-001.html | 26 ++++++++++++++++++ .../selectors-dir-selector-change-002.html | 27 +++++++++++++++++++ ...selectors-dir-selector-change-003-ref.html | 16 +++++++++++ .../selectors-dir-selector-change-003.html | 23 ++++++++++++++++ ...selectors-dir-selector-change-004-ref.html | 17 ++++++++++++ .../selectors-dir-selector-change-004.html | 24 +++++++++++++++++ .../selectors-dir-selector-ltr-002.html | 26 ++++++++++++++++++ .../selectors-dir-selector-ltr-003.html | 26 ++++++++++++++++++ ...tors-dir-selector-white-space-001-ref.html | 18 +++++++++++++ ...electors-dir-selector-white-space-001.html | 27 +++++++++++++++++++ 11 files changed, 246 insertions(+) create mode 100644 css/selectors/selectors-dir-selector-change-001-ref.html create mode 100644 css/selectors/selectors-dir-selector-change-001.html create mode 100644 css/selectors/selectors-dir-selector-change-002.html create mode 100644 css/selectors/selectors-dir-selector-change-003-ref.html create mode 100644 css/selectors/selectors-dir-selector-change-003.html create mode 100644 css/selectors/selectors-dir-selector-change-004-ref.html create mode 100644 css/selectors/selectors-dir-selector-change-004.html create mode 100644 css/selectors/selectors-dir-selector-ltr-002.html create mode 100644 css/selectors/selectors-dir-selector-ltr-003.html create mode 100644 css/selectors/selectors-dir-selector-white-space-001-ref.html create mode 100644 css/selectors/selectors-dir-selector-white-space-001.html diff --git a/css/selectors/selectors-dir-selector-change-001-ref.html b/css/selectors/selectors-dir-selector-change-001-ref.html new file mode 100644 index 00000000000000..8c79c8328f0b2b --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-001-ref.html @@ -0,0 +1,16 @@ + + + + + + +
+
+
+ The background color should be lime +
+
+ + diff --git a/css/selectors/selectors-dir-selector-change-001.html b/css/selectors/selectors-dir-selector-change-001.html new file mode 100644 index 00000000000000..beb9b553012f77 --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-001.html @@ -0,0 +1,26 @@ + + + + CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from default(ltr) to rtl + + + + + + +
+
+
+ The background color should be lime +
+
+ + + diff --git a/css/selectors/selectors-dir-selector-change-002.html b/css/selectors/selectors-dir-selector-change-002.html new file mode 100644 index 00000000000000..eccfde5140e272 --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-002.html @@ -0,0 +1,27 @@ + + + + CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from default(ltr) to rtl + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + diff --git a/css/selectors/selectors-dir-selector-change-003-ref.html b/css/selectors/selectors-dir-selector-change-003-ref.html new file mode 100644 index 00000000000000..8c79c8328f0b2b --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-003-ref.html @@ -0,0 +1,16 @@ + + + + + + +
+
+
+ The background color should be lime +
+
+ + diff --git a/css/selectors/selectors-dir-selector-change-003.html b/css/selectors/selectors-dir-selector-change-003.html new file mode 100644 index 00000000000000..5459e59132c52d --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-003.html @@ -0,0 +1,23 @@ + + + + CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from rtl to auto + + + + + + +
+
+
+ The background color should be lime +
+
+ + + diff --git a/css/selectors/selectors-dir-selector-change-004-ref.html b/css/selectors/selectors-dir-selector-change-004-ref.html new file mode 100644 index 00000000000000..9a130cb2e5c71b --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-004-ref.html @@ -0,0 +1,17 @@ + + + + + + + +
+
+
+ מקור השם עברית +
+
+ + diff --git a/css/selectors/selectors-dir-selector-change-004.html b/css/selectors/selectors-dir-selector-change-004.html new file mode 100644 index 00000000000000..e5040f63f5b3ce --- /dev/null +++ b/css/selectors/selectors-dir-selector-change-004.html @@ -0,0 +1,24 @@ + + + + CSS Selectors Level 4 Test: Check for correctly updating :dir matching on directionality change from ltr to rtl + + + + + + + +
+
+
+ The background color should be lime +
+
+ + + diff --git a/css/selectors/selectors-dir-selector-ltr-002.html b/css/selectors/selectors-dir-selector-ltr-002.html new file mode 100644 index 00000000000000..bbb3f26a780b13 --- /dev/null +++ b/css/selectors/selectors-dir-selector-ltr-002.html @@ -0,0 +1,26 @@ + + + + CSS Selectors Level 4 Test: exception handling for an invalid identifier of dir() + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + diff --git a/css/selectors/selectors-dir-selector-ltr-003.html b/css/selectors/selectors-dir-selector-ltr-003.html new file mode 100644 index 00000000000000..821a33616fca69 --- /dev/null +++ b/css/selectors/selectors-dir-selector-ltr-003.html @@ -0,0 +1,26 @@ + + + + CSS Selectors Level 4 Test: exception handling for multiple identifiers of dir() + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + diff --git a/css/selectors/selectors-dir-selector-white-space-001-ref.html b/css/selectors/selectors-dir-selector-white-space-001-ref.html new file mode 100644 index 00000000000000..955a2dd603d625 --- /dev/null +++ b/css/selectors/selectors-dir-selector-white-space-001-ref.html @@ -0,0 +1,18 @@ + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+ + diff --git a/css/selectors/selectors-dir-selector-white-space-001.html b/css/selectors/selectors-dir-selector-white-space-001.html new file mode 100644 index 00000000000000..d3128a03734dc9 --- /dev/null +++ b/css/selectors/selectors-dir-selector-white-space-001.html @@ -0,0 +1,27 @@ + + + + CSS Selectors Level 4 Test: Verify for an identifier with leading and tailing whitespace of dir() + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+ +