From 463ae403e281601424bd68bf8e028563b027d1a8 Mon Sep 17 00:00:00 2001 From: Noam Rosenthal Date: Mon, 12 Feb 2024 08:40:50 +0000 Subject: [PATCH] Bug 1877740 [wpt PR 44322] - Implement view-transition-class selector matching, a=testonly Automatic update from web-platform-tests Implement view-transition-class selector matching Selector checker now matches classes from selector to classes from pseudo-element. The classes aren't saved on the pseudo-element, but rather in the ViewTransitionStyleTracker, in the element map. Bug: 1519997 Change-Id: Iee74bb5d8e6f1ced0edfbcdc1ac9eec32497e97f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5253451 Reviewed-by: Vladimir Levin Reviewed-by: Nate Chapin Reviewed-by: Camille Lamy Reviewed-by: Khushal Sagar Cr-Commit-Position: refs/heads/main@{#1257975} -- wpt-commits: 50cdae7b23a8ab23a1ebeacc71d254105c710b15 wpt-pr: 44322 --- .../pseudo-with-classes-entry.html | 54 +++++++++++++++++++ .../pseudo-with-classes-exit.html | 54 +++++++++++++++++++ .../pseudo-with-classes-match-ident.html | 41 ++++++++++++++ ...-with-classes-match-multiple-wildcard.html | 41 ++++++++++++++ .../pseudo-with-classes-match-multiple.html | 41 ++++++++++++++ .../pseudo-with-classes-match-wildard.html | 41 ++++++++++++++ .../pseudo-with-classes-mismatch-ident.html | 46 ++++++++++++++++ .../pseudo-with-classes-mismatch-partial.html | 45 ++++++++++++++++ ...pseudo-with-classes-mismatch-wildcard.html | 46 ++++++++++++++++ ...eudo-with-classes-multiple-vt-classes.html | 41 ++++++++++++++ ...th-classes-new-with-class-old-without.html | 46 ++++++++++++++++ ...th-classes-old-with-class-new-without.html | 51 ++++++++++++++++++ .../pseudo-with-classes-ref.html | 15 ++++++ ...do-with-classes-view-transition-group.html | 37 +++++++++++++ ...th-classes-view-transition-image-pair.html | 37 +++++++++++++ 15 files changed, 636 insertions(+) create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-entry.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-exit.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-ident.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-wildard.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-ident.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-partial.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-wildcard.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-old-with-class-new-without.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-ref.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-group.html create mode 100644 testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-entry.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-entry.html new file mode 100644 index 000000000000..44f95dccbf41 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-entry.html @@ -0,0 +1,54 @@ + + +View transition classes: entry animation should consider view-transition-class from new state + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-exit.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-exit.html new file mode 100644 index 000000000000..c687461f18ea --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-exit.html @@ -0,0 +1,54 @@ + + +View transition classes: exit animation should consider view-transition-class from old state + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-ident.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-ident.html new file mode 100644 index 000000000000..1418a90bc455 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-ident.html @@ -0,0 +1,41 @@ + + +View transition classes: selector should match ident.class + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html new file mode 100644 index 000000000000..53eaacfe799b --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple-wildcard.html @@ -0,0 +1,41 @@ + + +View transition classes: selector should match with wildcard and multiple classes + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple.html new file mode 100644 index 000000000000..1ab69340b4be --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-multiple.html @@ -0,0 +1,41 @@ + + +View transition classes: selector should match with multiple classes + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-wildard.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-wildard.html new file mode 100644 index 000000000000..13490d58786b --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-match-wildard.html @@ -0,0 +1,41 @@ + + +View transition classes: selector should match with wildcard + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-ident.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-ident.html new file mode 100644 index 000000000000..97db64fca200 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-ident.html @@ -0,0 +1,46 @@ + + +View transition classes: selector should not match different ident + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-partial.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-partial.html new file mode 100644 index 000000000000..9d9838036bc7 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-partial.html @@ -0,0 +1,45 @@ + + +View transition classes: selector should not match if only some classes match + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-wildcard.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-wildcard.html new file mode 100644 index 000000000000..722e41304550 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-mismatch-wildcard.html @@ -0,0 +1,46 @@ + + +View transition classes: selector should not match if only some classes match (with *) + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html new file mode 100644 index 000000000000..d7ca0a049361 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-multiple-vt-classes.html @@ -0,0 +1,41 @@ + + +View transition classes: selector should match when view-transition-class has multiple idents + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html new file mode 100644 index 000000000000..5aedc33b3c10 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-new-with-class-old-without.html @@ -0,0 +1,46 @@ + + +View transition classes: view-transition-class should apply if applied only in new state + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-old-with-class-new-without.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-old-with-class-new-without.html new file mode 100644 index 000000000000..6c153253e00a --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-old-with-class-new-without.html @@ -0,0 +1,51 @@ + + +View transition classes: view-transition-class should not apply if applied only in old state + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-ref.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-ref.html new file mode 100644 index 000000000000..89b3a8a78efd --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-ref.html @@ -0,0 +1,15 @@ + + +View transitions: reference expectation + + +
+ diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-group.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-group.html new file mode 100644 index 000000000000..3e4dbb303c61 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-group.html @@ -0,0 +1,37 @@ + + +View transition classes: group selectors should respect classes + + + + + + + +
+ + diff --git a/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html new file mode 100644 index 000000000000..8f0f2ef2a974 --- /dev/null +++ b/testing/web-platform/tests/css/css-view-transitions/pseudo-with-classes-view-transition-image-pair.html @@ -0,0 +1,37 @@ + + +View transition classes: group selectors should respect classes + + + + + + + +
+ +