view-transition: Support only-child pseudo class. [chromium/src : main]

1 view
Skip to first unread message

Khushal Sagar (Gerrit)

unread,
Nov 24, 2022, 10:11:39 AM11/24/22
to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Xiaocheng Hu, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

Attention is currently required from: Vladimir Levin, Xiaocheng Hu.

Patch set 2:Auto-Submit +1Commit-Queue +1

View Change

    To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
    Gerrit-Change-Number: 4054641
    Gerrit-PatchSet: 2
    Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
    Gerrit-Reviewer: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
    Gerrit-Attention: Xiaocheng Hu <xiaoc...@chromium.org>
    Gerrit-Comment-Date: Thu, 24 Nov 2022 15:09:44 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    Gerrit-MessageType: comment

    Khushal Sagar (Gerrit)

    unread,
    Nov 24, 2022, 10:12:12 AM11/24/22
    to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

    Attention is currently required from: Vladimir Levin.

    View Change

    1 comment:

    To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
    Gerrit-Change-Number: 4054641
    Gerrit-PatchSet: 2
    Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
    Gerrit-Comment-Date: Thu, 24 Nov 2022 15:10:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Khushal Sagar (Gerrit)

    unread,
    Nov 24, 2022, 10:14:20 AM11/24/22
    to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

    Attention is currently required from: Vladimir Levin.

    View Change

    1 comment:

    • File third_party/blink/renderer/core/css/selector_checker.cc:

      • Patch Set #1, Line 1270:

              if (context.pseudo_id == kPseudoIdViewTransition) {
        DCHECK(element.IsDocumentElement());
        DCHECK(ViewTransitionUtils::GetActiveTransition(element.GetDocument()));
        return !element.hasChildren();
        }

        I was initially trying to handle the case where ::view-transition is the only node under html but I don't know if its possible and seems like a quirky edge-case so I went with the simpler option.

        You can look at the diff between ps 1 and 2 for the extra code to support it properly. Happy to add this if you feel otherwise and have a test case in mind.

    To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
    Gerrit-Change-Number: 4054641
    Gerrit-PatchSet: 2
    Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
    Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
    Gerrit-CC: Alexis Menard <alexis...@intel.com>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
    Gerrit-Comment-Date: Thu, 24 Nov 2022 15:12:09 +0000

    Blink W3C Test Autoroller (Gerrit)

    unread,
    Nov 24, 2022, 10:17:44 AM11/24/22
    to Khushal Sagar, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Chromium LUCI CQ, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

    Attention is currently required from: Vladimir Levin.

    Exportable changes to web-platform-tests were detected in this CL and a pull request in the upstream repo has been made: https://github.com/web-platform-tests/wpt/pull/37143.

    When this CL lands, the bot will automatically merge the PR on GitHub if the required GitHub checks pass; otherwise, ecosystem-infra@ team will triage the failures and may contact you.

    WPT Export docs:
    https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md#Automatic-export-process

    View Change

      To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
      Gerrit-Change-Number: 4054641
      Gerrit-PatchSet: 2
      Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Comment-Date: Thu, 24 Nov 2022 15:15:33 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: No
      Gerrit-MessageType: comment

      Khushal Sagar (Gerrit)

      unread,
      Nov 24, 2022, 11:30:29 AM11/24/22
      to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Chromium LUCI CQ, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

      Attention is currently required from: Vladimir Levin.

      Patch set 3:Auto-Submit +1Commit-Queue +1

      View Change

      1 comment:

      • File third_party/blink/renderer/core/css/selector_checker.cc:

        • Patch Set #1, Line 1270:

                if (context.pseudo_id == kPseudoIdViewTransition) {
          DCHECK(element.IsDocumentElement());
          DCHECK(ViewTransitionUtils::GetActiveTransition(element.GetDocument()));
          return !element.hasChildren();
          }

        • I was initially trying to handle the case where ::view-transition is the only node under html but I […]

          Talked offline, let's resolve this before supporting it on view-transition. Its not useful there anyway.

      To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
      Gerrit-Change-Number: 4054641
      Gerrit-PatchSet: 3
      Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Comment-Date: Thu, 24 Nov 2022 16:28:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Khushal Sagar <khusha...@chromium.org>
      Gerrit-MessageType: comment

      Vladimir Levin (Gerrit)

      unread,
      Nov 24, 2022, 12:25:17 PM11/24/22
      to Khushal Sagar, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

      Attention is currently required from: Khushal Sagar.

      View Change

      6 comments:

      • File third_party/blink/renderer/core/css/selector_checker.cc:

        • Patch Set #3, Line 296: // cases like: div::-webkit-scrollbar-thumb:hover { }

          nit: Can you update the comment please

        • Patch Set #3, Line 1248: DCHECK(context.pseudo_argument);

          What happens if the argument is '*'? Does this still evaluate to true?

        • Patch Set #3, Line 1690: return false;

          I don't think this is a good change. Is this needed? I'd rather explicitly handle the view transition pseudos if so

      • File third_party/blink/renderer/core/view_transition/view_transition_style_tracker.cc:

        • Patch Set #3, Line 292: return element_data_map_.size() <= 1;

          Is there a usecase for element_data_map_.size() == 0? If we don't have a root, and there are no shared elements, we shouldn't be here, right? Should this be a DCHECK?

        • Patch Set #3, Line 300: new_root_data_->names.Contains(view_transition_name)) {

          How do we store old shared element that becomes new root? I feel like this needs to drop the "is_old_root" condition

        • Patch Set #3, Line 317: if (is_new_root && old_root_data_ &&

          ditto, it shouldn't matter whether this is the new root, as long as there is an old root this would trigger

      To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
      Gerrit-Change-Number: 4054641
      Gerrit-PatchSet: 3
      Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Comment-Date: Thu, 24 Nov 2022 17:21:19 +0000

      Khushal Sagar (Gerrit)

      unread,
      Nov 24, 2022, 3:29:48 PM11/24/22
      to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Chromium LUCI CQ, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

      Attention is currently required from: Vladimir Levin.

      Patch set 4:Auto-Submit +1Commit-Queue +1

      View Change

      6 comments:

      • File third_party/blink/renderer/core/css/selector_checker.cc:

        • Patch Set #3, Line 296: // cases like: div::-webkit-scrollbar-thumb:hover { }

          nit: Can you update the comment please

        • Done

        • Patch Set #3, Line 1248: DCHECK(context.pseudo_argument);

          What happens if the argument is '*'? Does this still evaluate to true?

        • Yeah, this value maps to the pseudo-element for which the selector is being checked so its that pseudo-element's name.

        • I don't think this is a good change. […]

          This is debug leftovers, my bad. Removed.

      • File third_party/blink/renderer/core/view_transition/view_transition_style_tracker.cc:

        • Is there a usecase for element_data_map_. […]

          Yup, this can never be 0 if no root names exist so should be a DCHECK. Done.

        • How do we store old shared element that becomes new root? I feel like this needs to drop the "is_old […]

          Yeah, that case was incorrect. Fixed and I updated the WPT to include it.

        • ditto, it shouldn't matter whether this is the new root, as long as there is an old root this would […]

          Fixed this too.

      To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
      Gerrit-Change-Number: 4054641
      Gerrit-PatchSet: 4
      Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Vladimir Levin <vmp...@chromium.org>
      Gerrit-Comment-Date: Thu, 24 Nov 2022 20:27:56 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Vladimir Levin <vmp...@chromium.org>
      Gerrit-MessageType: comment

      Vladimir Levin (Gerrit)

      unread,
      Nov 25, 2022, 10:50:52 AM11/25/22
      to Khushal Sagar, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Blink W3C Test Autoroller, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

      Attention is currently required from: Khushal Sagar.

      Patch set 4:Code-Review +1

      View Change

      2 comments:

      • Patchset:

      • File third_party/blink/renderer/core/view_transition/view_transition_style_tracker.cc:

      To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
      Gerrit-Change-Number: 4054641
      Gerrit-PatchSet: 4
      Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Comment-Date: Fri, 25 Nov 2022 15:48:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Gerrit-MessageType: comment

      Khushal Sagar (Gerrit)

      unread,
      Nov 25, 2022, 7:36:09 PM11/25/22
      to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Vladimir Levin, Blink W3C Test Autoroller, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

      Patch set 5:Auto-Submit +1Commit-Queue +2

      View Change

      1 comment:

      • File third_party/blink/renderer/core/view_transition/view_transition_style_tracker.cc:

        • Done

      To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
      Gerrit-Change-Number: 4054641
      Gerrit-PatchSet: 5
      Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
      Gerrit-CC: Alexis Menard <alexis...@intel.com>
      Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
      Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
      Gerrit-Comment-Date: Sat, 26 Nov 2022 00:33:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes

      Khushal Sagar (Gerrit)

      unread,
      Nov 26, 2022, 2:31:43 AM11/26/22
      to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Vladimir Levin, Blink W3C Test Autoroller, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

      Attention is currently required from: Khushal Sagar.

      Patch set 5:Commit-Queue +2

      View Change

        To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
        Gerrit-Change-Number: 4054641
        Gerrit-PatchSet: 5
        Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
        Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
        Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
        Gerrit-CC: Alexis Menard <alexis...@intel.com>
        Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
        Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
        Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
        Gerrit-Comment-Date: Sat, 26 Nov 2022 07:29:23 +0000

        Khushal Sagar (Gerrit)

        unread,
        Nov 26, 2022, 9:09:50 AM11/26/22
        to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Sakib Shabir, 이임순, Vladimir Levin, Blink W3C Test Autoroller, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

        Attention is currently required from: Khushal Sagar.

        Patch set 5:Commit-Queue +2

        View Change

          To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
          Gerrit-Change-Number: 4054641
          Gerrit-PatchSet: 5
          Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
          Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
          Gerrit-Reviewer: Sakib Shabir <s1.ta...@samsung.com>
          Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
          Gerrit-CC: Alexis Menard <alexis...@intel.com>
          Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
          Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-CC: 이임순 <dblun...@gmail.com>
          Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
          Gerrit-Comment-Date: Sat, 26 Nov 2022 14:07:02 +0000

          Khushal Sagar (Gerrit)

          unread,
          Nov 27, 2022, 12:35:39 AM11/27/22
          to apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Sakib Shabir, 이임순, Vladimir Levin, Blink W3C Test Autoroller, Chromium LUCI CQ, Alexis Menard, chromium...@chromium.org, Olga Gerchikov
          Gerrit-Comment-Date: Sun, 27 Nov 2022 05:32:48 +0000

          Chromium LUCI CQ (Gerrit)

          unread,
          Nov 27, 2022, 1:37:10 AM11/27/22
          to Khushal Sagar, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Sakib Shabir, 이임순, Vladimir Levin, Blink W3C Test Autoroller, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

          Chromium LUCI CQ submitted this change.

          View Change



          4 is the latest approved patch-set.
          The change was submitted with unreviewed changes in the following files:

          ```
          The name of the file: third_party/blink/renderer/core/view_transition/view_transition_style_tracker.cc
          Insertions: 1, Deletions: 1.

          @@ -289,7 +289,7 @@
          if (has_root) {
          return element_data_map_.empty();
          } else {
          - DCHECK(element_data_map_.empty());
          + DCHECK(!element_data_map_.empty());
          return element_data_map_.size() == 1;
          }
          }
          ```
          ```
          The name of the file: third_party/blink/web_tests/external/wpt/css/css-view-transitions/only-child-group.html
          Insertions: 41, Deletions: 1.

          @@ -11,6 +11,9 @@
          ::view-transition-group(root) {
          background-color: blue;
          }
          +::view-transition-group(target) {
          + background-color: blue;
          +}
          ::view-transition-group(*) {
          color: blue;
          }
          @@ -18,15 +21,19 @@
          ::view-transition-group(root):only-child {
          background-color: red;
          }
          +::view-transition-group(target):only-child {
          + background-color: red;
          +}
          ::view-transition-group(*):only-child {
          color: red;
          }

          -#target {
          +div {
          contain: layout;
          }
          </style>
          <div id="target"></div>
          +<div id="target2"></div>

          <script>
          promise_test(() => {
          @@ -57,4 +64,37 @@
          });
          });
          }, ":only-child should not match because ::view-transition-group is generated for multiple elements");
          +
          +promise_test(() => {
          + return new Promise(async (resolve, reject) => {
          + document.documentElement.style.viewTransitionName = "none";
          + target.style.viewTransitionName = "target";
          + let transition = document.startViewTransition();
          + transition.ready.then(() => {
          + let style = getComputedStyle(
          + document.documentElement, ":view-transition-group(target)");
          + if (style.backgroundColor == "rgb(255, 0, 0)" && style.color == "rgb(255, 0, 0)")
          + resolve();
          + else
          + reject(style.backgroundColor + " and " + style.color);
          + });
          + });
          +}, ":only-child should match because ::view-transition-group is generated for sub element only");
          +
          +promise_test(() => {
          + return new Promise(async (resolve, reject) => {
          + document.documentElement.style.viewTransitionName = "none";
          + target.style.viewTransitionName = "target";
          + target2.style.viewTransitionName = "target2";
          + let transition = document.startViewTransition();
          + transition.ready.then(() => {
          + let style = getComputedStyle(
          + document.documentElement, ":view-transition-group(target)");
          + if (style.backgroundColor == "rgb(0, 0, 255)" && style.color == "rgb(0, 0, 255)")
          + resolve();
          + else
          + reject(style.backgroundColor + " and " + style.color);
          + });
          + });
          +}, ":only-child should not match because ::view-transition-group is generated for multiple sub elements");
          </script>
          ```

          Approvals: Khushal Sagar: Send CL to CQ automatically after approval; Commit Vladimir Levin: Looks good to me
          view-transition: Support only-child pseudo class.

          Add support for parsing and matching only-child pseudo-class on view
          transition pseudo-elements.

          R=vmp...@chromium.org

          Bug: 1393279
          Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
          Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4054641
          Reviewed-by: Vladimir Levin <vmp...@chromium.org>
          Auto-Submit: Khushal Sagar <khusha...@chromium.org>
          Commit-Queue: Khushal Sagar <khusha...@chromium.org>
          Cr-Commit-Position: refs/heads/main@{#1075953}
          ---
          M third_party/blink/renderer/core/css/element_rule_collector.cc
          M third_party/blink/renderer/core/css/parser/css_selector_parser.cc
          M third_party/blink/renderer/core/css/selector_checker.cc
          M third_party/blink/renderer/core/css/selector_checker.h
          M third_party/blink/renderer/core/view_transition/view_transition.cc
          M third_party/blink/renderer/core/view_transition/view_transition.h
          M third_party/blink/renderer/core/view_transition/view_transition_style_tracker.cc
          M third_party/blink/renderer/core/view_transition/view_transition_style_tracker.h
          A third_party/blink/web_tests/external/wpt/css/css-view-transitions/only-child-group.html
          A third_party/blink/web_tests/external/wpt/css/css-view-transitions/only-child-image-pair.html
          A third_party/blink/web_tests/external/wpt/css/css-view-transitions/only-child-new.html
          A third_party/blink/web_tests/external/wpt/css/css-view-transitions/only-child-old.html
          A third_party/blink/web_tests/external/wpt/css/css-view-transitions/only-child-view-transition.html
          13 files changed, 589 insertions(+), 0 deletions(-)


          To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
          Gerrit-Change-Number: 4054641
          Gerrit-PatchSet: 6
          Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
          Gerrit-Reviewer: Sakib Shabir <s1.ta...@samsung.com>
          Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
          Gerrit-CC: Alexis Menard <alexis...@intel.com>
          Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
          Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
          Gerrit-CC: 이임순 <dblun...@gmail.com>
          Gerrit-MessageType: merged

          Blink W3C Test Autoroller (Gerrit)

          unread,
          Nov 27, 2022, 2:12:09 AM11/27/22
          to Khushal Sagar, Chromium LUCI CQ, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, Sakib Shabir, 이임순, Vladimir Levin, Alexis Menard, chromium...@chromium.org, Olga Gerchikov

          The WPT PR for this CL has been merged upstream! https://github.com/web-platform-tests/wpt/pull/37143

          View Change

            To view, visit change 4054641. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: I8ae43195ada6f4d8f2f6f158c4a9546aa9625cd2
            Gerrit-Change-Number: 4054641
            Gerrit-PatchSet: 6
            Gerrit-Owner: Khushal Sagar <khusha...@chromium.org>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
            Gerrit-Reviewer: Sakib Shabir <s1.ta...@samsung.com>
            Gerrit-Reviewer: Vladimir Levin <vmp...@chromium.org>
            Gerrit-CC: Alexis Menard <alexis...@intel.com>
            Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
            Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
            Gerrit-CC: 이임순 <dblun...@gmail.com>
            Gerrit-Comment-Date: Sun, 27 Nov 2022 07:09:04 +0000
            Reply all
            Reply to author
            Forward
            0 new messages