Reland "Fix getPropertyValue() and setProperty() behavior for 'all'" [chromium/src : main]

0 views
Skip to first unread message

chromeperf@appspot.gserviceaccount.com (Gerrit)

unread,
Mar 7, 2026, 1:50:18 AMMar 7
to Suyeon Ji, Jinho Bang, Chromium LUCI CQ, Rune Lillesveen, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org

Message from chrom...@appspot.gserviceaccount.com

📍 Job linux-perf/blink_perf.css complete.

  • CSSPropertyUpdateValue: base median = 25353.128994718958 -> patched median = 25480.101536695685


See results at: https://pinpoint-dot-chromeperf.appspot.com/job/17139b40090000

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
Gerrit-Change-Number: 7637951
Gerrit-PatchSet: 4
Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Comment-Date: Sat, 07 Mar 2026 06:50:09 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Suyeon Ji (Gerrit)

unread,
Mar 7, 2026, 6:12:08 AMMar 7
to chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, Rune Lillesveen, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
Attention needed from Jinho Bang and Rune Lillesveen

Suyeon Ji added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Suyeon Ji . resolved

Hi, please take a look. Thank you!

Open in Gerrit

Related details

Attention is currently required from:
  • Jinho Bang
  • Rune Lillesveen
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
Gerrit-Change-Number: 7637951
Gerrit-PatchSet: 6
Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Jinho Bang <zi...@chromium.org>
Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
Gerrit-Comment-Date: Sat, 07 Mar 2026 11:11:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Rune Lillesveen (Gerrit)

unread,
Mar 9, 2026, 5:23:51 AMMar 9
to Suyeon Ji, Steinar H Gunderson, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org, Rune Lillesveen
Attention needed from Jinho Bang, Steinar H Gunderson and Suyeon Ji

Rune Lillesveen added 1 comment

Patchset-level comments
Rune Lillesveen . resolved

Adding sesse@ who should be a better reviewer for this.

Open in Gerrit

Related details

Attention is currently required from:
  • Jinho Bang
  • Steinar H Gunderson
  • Suyeon Ji
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
Gerrit-Change-Number: 7637951
Gerrit-PatchSet: 6
Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
Gerrit-Attention: Suyeon Ji <zees...@gmail.com>
Gerrit-Attention: Jinho Bang <zi...@chromium.org>
Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
Gerrit-Comment-Date: Mon, 09 Mar 2026 09:23:37 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Steinar H Gunderson (Gerrit)

unread,
Mar 10, 2026, 9:55:56 AMMar 10
to Suyeon Ji, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
Attention needed from Jinho Bang and Suyeon Ji

Steinar H Gunderson added 1 comment

Commit Message
Line 7, Patchset 6 (Latest):Reland "Fix getPropertyValue() and setProperty() behavior for 'all'"
Steinar H Gunderson . unresolved

Do you want me to review this as a reland with minor changes, or fully from scratch? The latter would be quite a bit more involved.

Open in Gerrit

Related details

Attention is currently required from:
  • Jinho Bang
  • Suyeon Ji
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
    Gerrit-Change-Number: 7637951
    Gerrit-PatchSet: 6
    Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
    Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
    Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Suyeon Ji <zees...@gmail.com>
    Gerrit-Attention: Jinho Bang <zi...@chromium.org>
    Gerrit-Comment-Date: Tue, 10 Mar 2026 13:55:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Steinar H Gunderson (Gerrit)

    unread,
    Mar 10, 2026, 10:08:02 AMMar 10
    to Suyeon Ji, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
    Attention needed from Jinho Bang and Suyeon Ji

    Steinar H Gunderson added 11 comments

    File third_party/blink/renderer/core/css/css_property_value_set.h
    Line 205, Patchset 6 (Latest): using HasAllField = MayHaveLogicalPropertiesField::DefineNextValue<bool, 1>;
    Steinar H Gunderson . unresolved

    Do we need to define this for immutable sets? We should be consistent with MayHaveLogicalPropertiesField, I guess.

    File third_party/blink/renderer/core/css/css_property_value_set.cc
    Line 111, Patchset 6 (Latest): bits_.set<HasAllField>(bits_.get<HasAllField>() ||
    Steinar H Gunderson . unresolved

    I know MayHaveLogicalPropertiesField is already written this way, but I don't think it makes sense to do all this bit manipulation per-property. Shouldn't we just have a bool instead, and set it after the loop? Same below, unless we take it out of the immutable sets. (And same for MayHaveLogicalPropertiesField.)

    Line 246, Patchset 6 (Latest): for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
    Steinar H Gunderson . unresolved

    All other code here uses ++i, not i++.

    Line 246, Patchset 6 (Latest): for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
    Steinar H Gunderson . unresolved

    Why do you start only after all_index? Do you have some sort of guarantee of ordering here?

    Line 248, Patchset 6 (Latest): if (property.IsAffectedByAll() &&
    Steinar H Gunderson . unresolved

    This definitely requires some sort of comment.

    Line 282, Patchset 6 (Latest): if constexpr (std::is_same_v<T, CSSPropertyID>) {
    Steinar H Gunderson . unresolved

    Why does this not hold for CSSProperty?

    Line 283, Patchset 6 (Latest): if (bits_.get<HasAllField>() &&
    Steinar H Gunderson . unresolved

    This needs a comment. What is the logic here?

    Line 571, Patchset 6 (Latest): if (bits_.get<HasAllField>()) [[unlikely]] {
    Steinar H Gunderson . unresolved

    Please don't add [[likely]]/[[unlikely]].

    Line 574, Patchset 6 (Latest): if (property_id == CSSPropertyID::kAll ||
    Steinar H Gunderson . unresolved

    This needs a comment.

    Line 606, Patchset 6 (Latest): bits_.set<HasAllField>(bits_.get<HasAllField>() ||
    Steinar H Gunderson . unresolved

    Isn't this more logically written as

    ```
    if (id == CSSPropertyID::kAll) {
    bits_.set<HasAllField>(true);
    }
    ```

    ? Same below.

    But we need a comment saying why “all” figures here in a longhand function, despite being a shorthand in the spec.

    Same below.

    Line 646, Patchset 6 (Latest): property_vector_.clear();
    Steinar H Gunderson . unresolved

    Should we perhaps call Clear() instead?

    Gerrit-Comment-Date: Tue, 10 Mar 2026 14:07:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Suyeon Ji (Gerrit)

    unread,
    Mar 12, 2026, 12:45:50 AM (13 days ago) Mar 12
    to Steinar H Gunderson, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
    Attention needed from Jinho Bang, Steinar H Gunderson and Suyeon Ji

    Message from Suyeon Ji

    Set Ready For Review

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jinho Bang
    • Steinar H Gunderson
    • Suyeon Ji
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
    Gerrit-Change-Number: 7637951
    Gerrit-PatchSet: 7
    Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
    Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
    Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Suyeon Ji <zees...@gmail.com>
    Gerrit-Attention: Jinho Bang <zi...@chromium.org>
    Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
    Gerrit-Comment-Date: Thu, 12 Mar 2026 04:45:18 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Suyeon Ji (Gerrit)

    unread,
    Mar 12, 2026, 12:48:41 AM (13 days ago) Mar 12
    to Steinar H Gunderson, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
    Attention needed from Jinho Bang and Steinar H Gunderson

    Suyeon Ji added 12 comments

    Commit Message
    Line 7, Patchset 6:Reland "Fix getPropertyValue() and setProperty() behavior for 'all'"
    Steinar H Gunderson . resolved

    Do you want me to review this as a reland with minor changes, or fully from scratch? The latter would be quite a bit more involved.

    Suyeon Ji

    Thank you for your detailed review!

    File third_party/blink/renderer/core/css/css_property_value_set.h
    Line 205, Patchset 6: using HasAllField = MayHaveLogicalPropertiesField::DefineNextValue<bool, 1>;
    Steinar H Gunderson . resolved

    Do we need to define this for immutable sets? We should be consistent with MayHaveLogicalPropertiesField, I guess.

    Suyeon Ji

    I'm not sure if this is exactly what you were asking for, but unlike MayHaveLogicalPropertiesField, this is required even for immutable sets, for instance, during SerializeShorthand(). Since Chromium treats the all shorthand as a longhand, handling it at runtime is the intended way to fix this bug and align with the spec.

    File third_party/blink/renderer/core/css/css_property_value_set.cc
    Line 111, Patchset 6: bits_.set<HasAllField>(bits_.get<HasAllField>() ||
    Steinar H Gunderson . resolved

    I know MayHaveLogicalPropertiesField is already written this way, but I don't think it makes sense to do all this bit manipulation per-property. Shouldn't we just have a bool instead, and set it after the loop? Same below, unless we take it out of the immutable sets. (And same for MayHaveLogicalPropertiesField.)

    Suyeon Ji

    I updated it to use a bool and set it after the loop as you commented.

    Line 246, Patchset 6: for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
    Steinar H Gunderson . resolved

    All other code here uses ++i, not i++.

    Suyeon Ji

    Done

    Line 246, Patchset 6: for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
    Steinar H Gunderson . resolved

    Why do you start only after all_index? Do you have some sort of guarantee of ordering here?

    Suyeon Ji

    The CSS shorthand all resets every property it affects. With this patch, the index of all and the properties affected by it are guaranteed to be in a consistent order. This means that properties from index 0 up to all's index have already been reset by all, so they can be treated as having the same value as all.

    For example,
    Given `left: 10px; all: revert; right: 20px`:
    vector: [left: 10px, all: revert, right: 20px]

    left (index 0 < 1) is reset by all, right (index 2 > 1) keeps its own value.
    No need to store all's value into each property, index comparison is sufficient.

    Given `left: 10px; all: revert; right: 20px; all: inherit`:
    vector: [left: 10px, right: 20px, all: inherit]

    all is removed and re-appended, so both left and right are now before all and both are reset.

    Line 248, Patchset 6: if (property.IsAffectedByAll() &&
    Steinar H Gunderson . resolved

    This definitely requires some sort of comment.

    Suyeon Ji

    I added a comment before the `for` loop. Thanks!

    Line 282, Patchset 6: if constexpr (std::is_same_v<T, CSSPropertyID>) {
    Steinar H Gunderson . resolved

    Why does this not hold for CSSProperty?

    Suyeon Ji

    I assume it wasn't needed here because this template is only instantiated for CSSPropertyID, AtRuleDescriptorID, and AtomicString, but not for CSSProperty. Does this align with your understanding?

    Line 283, Patchset 6: if (bits_.get<HasAllField>() &&
    Steinar H Gunderson . resolved

    This needs a comment. What is the logic here?

    Suyeon Ji

    I added a comment. please take a look again.

    Line 571, Patchset 6: if (bits_.get<HasAllField>()) [[unlikely]] {
    Steinar H Gunderson . resolved

    Please don't add [[likely]]/[[unlikely]].

    Suyeon Ji

    I saw a 1.5% performance regression in blink_perf.css/CSSPropertyUpdateValue.html without [[unlikely]] when I ran it on my Mac. Since this code is called so frequently, I'm wondering, is a 1.5% regression small enough to ignore, or will PGO automatically optimize this anyway?

    Line 574, Patchset 6: if (property_id == CSSPropertyID::kAll ||
    Steinar H Gunderson . resolved

    This needs a comment.

    Suyeon Ji

    Done

    Line 606, Patchset 6: bits_.set<HasAllField>(bits_.get<HasAllField>() ||
    Steinar H Gunderson . resolved

    Isn't this more logically written as

    ```
    if (id == CSSPropertyID::kAll) {
    bits_.set<HasAllField>(true);
    }
    ```

    ? Same below.

    But we need a comment saying why “all” figures here in a longhand function, despite being a shorthand in the spec.

    Same below.

    Suyeon Ji

    Done, thank you for detailed.

    Line 646, Patchset 6: property_vector_.clear();
    Steinar H Gunderson . resolved

    Should we perhaps call Clear() instead?

    Suyeon Ji

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Jinho Bang
    • Steinar H Gunderson
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
      Gerrit-Change-Number: 7637951
      Gerrit-PatchSet: 7
      Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
      Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
      Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-Attention: Jinho Bang <zi...@chromium.org>
      Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
      Gerrit-Comment-Date: Thu, 12 Mar 2026 04:48:09 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Steinar H Gunderson <se...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Steinar H Gunderson (Gerrit)

      unread,
      Mar 12, 2026, 5:02:16 AM (13 days ago) Mar 12
      to Suyeon Ji, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
      Attention needed from Jinho Bang and Suyeon Ji

      Steinar H Gunderson added 1 comment

      File third_party/blink/renderer/core/css/css_property_value_set.cc
      Line 246, Patchset 6: for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
      Steinar H Gunderson . unresolved

      Why do you start only after all_index? Do you have some sort of guarantee of ordering here?

      Suyeon Ji

      The CSS shorthand all resets every property it affects. With this patch, the index of all and the properties affected by it are guaranteed to be in a consistent order. This means that properties from index 0 up to all's index have already been reset by all, so they can be treated as having the same value as all.

      For example,
      Given `left: 10px; all: revert; right: 20px`:
      vector: [left: 10px, all: revert, right: 20px]

      left (index 0 < 1) is reset by all, right (index 2 > 1) keeps its own value.
      No need to store all's value into each property, index comparison is sufficient.

      Given `left: 10px; all: revert; right: 20px; all: inherit`:
      vector: [left: 10px, right: 20px, all: inherit]

      all is removed and re-appended, so both left and right are now before all and both are reset.

      Steinar H Gunderson

      What is this consistent order? Is it documented anywhere? I don't think I see any new ordering code here.

      More importantly, I think this is just too subtle. Some properties are removed on insert (and we try to maintain that invariant, seemingly without documenting it) but some are not and must be filtered on get? Is there a good reason why we cannot choose one or the other, consistently? It would seem reasonable to me that set('all', ...) removes the offending elements, so that they also disappear on iteration.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Jinho Bang
      • Suyeon Ji
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
        Gerrit-Change-Number: 7637951
        Gerrit-PatchSet: 7
        Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
        Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
        Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Suyeon Ji <zees...@gmail.com>
        Gerrit-Attention: Jinho Bang <zi...@chromium.org>
        Gerrit-Comment-Date: Thu, 12 Mar 2026 09:02:02 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Suyeon Ji <zees...@gmail.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Suyeon Ji (Gerrit)

        unread,
        Mar 15, 2026, 9:41:51 AM (10 days ago) Mar 15
        to Steinar H Gunderson, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
        Attention needed from Jinho Bang and Steinar H Gunderson

        Suyeon Ji added 1 comment

        File third_party/blink/renderer/core/css/css_property_value_set.cc
        Line 246, Patchset 6: for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
        Steinar H Gunderson . resolved

        Why do you start only after all_index? Do you have some sort of guarantee of ordering here?

        Suyeon Ji

        The CSS shorthand all resets every property it affects. With this patch, the index of all and the properties affected by it are guaranteed to be in a consistent order. This means that properties from index 0 up to all's index have already been reset by all, so they can be treated as having the same value as all.

        For example,
        Given `left: 10px; all: revert; right: 20px`:
        vector: [left: 10px, all: revert, right: 20px]

        left (index 0 < 1) is reset by all, right (index 2 > 1) keeps its own value.
        No need to store all's value into each property, index comparison is sufficient.

        Given `left: 10px; all: revert; right: 20px; all: inherit`:
        vector: [left: 10px, right: 20px, all: inherit]

        all is removed and re-appended, so both left and right are now before all and both are reset.

        Steinar H Gunderson

        What is this consistent order? Is it documented anywhere? I don't think I see any new ordering code here.

        More importantly, I think this is just too subtle. Some properties are removed on insert (and we try to maintain that invariant, seemingly without documenting it) but some are not and must be filtered on get? Is there a good reason why we cannot choose one or the other, consistently? It would seem reasonable to me that set('all', ...) removes the offending elements, so that they also disappear on iteration.

        Suyeon Ji

        Sorry for the delay. I've updated the patch after carefully reviewing your feedback.

        In a previous patchset[1], I had implemented this using RemovePropertiesAffectedByAll(). I was initially concerned about potential side effects due to a subtle difference in cascade_expansion_test[2], but since removeProperty("all") already uses the same approach, I followed your suggestion and adopted it here as well.

        I may not fully understand your intention, but even with RemovePropertiesAffectedByAll(), the filtering is still necessary to detect when a property set after 'all' overrides it.

        ```
        style.setProperty("all", "revert"); // [all:revert]
        style.setProperty("width", "50px"); // [all:revert, width:50px]
        style.getPropertyValue("width"); // "50px"
        style.getPropertyValue("color"); // "revert"
        style.getPropertyValue("all"); // ""
        ```

        [1] https://chromium-review.googlesource.com/c/chromium/src/+/7579493/9
        [2] https://chromium-review.googlesource.com/c/chromium/src/+/7579493/9/third_party/blink/renderer/core/css/resolver/cascade_expansion_test.cc

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Jinho Bang
        • Steinar H Gunderson
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
          Gerrit-Change-Number: 7637951
          Gerrit-PatchSet: 14
          Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
          Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
          Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-Attention: Jinho Bang <zi...@chromium.org>
          Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
          Gerrit-Comment-Date: Sun, 15 Mar 2026 13:41:13 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Steinar H Gunderson (Gerrit)

          unread,
          Mar 16, 2026, 5:35:32 AM (9 days ago) Mar 16
          to Suyeon Ji, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
          Attention needed from Jinho Bang and Suyeon Ji

          Steinar H Gunderson added 1 comment

          File third_party/blink/renderer/core/css/css_property_value_set.cc
          Line 246, Patchset 6: for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
          Steinar H Gunderson . unresolved
          Steinar H Gunderson

          Let me try to understand what the strategy is. Are you saying that

          1) “all” is kept as a longhand, even though it is a shorthand by the standard. (We expand it in the cascade)
          2) Properties are always kept in order of appearance (whether that is as written in the stylesheet, or through some CSSOM modification).
          3) As an optimization, we filter out all longhand properties that are redundant by later “all” properties, but we cannot do the same filtering by properties set after the last “all”. This affects storage space only, not really performance.
          4) When doing get on a longhand (that is affected by “all”), we must see both whether there is a relevant “all” (with a fast path in the negative case by means of a flag) _and_ whether it is overridden by the actual longhand
          5) When doing get on a shorthand, we need to do the same operation for each constituent longhand somehow (I haven't tried to figure out the details yet)

          Is my understanding right? If so, this needs to be written down in a (class) comment somewhere, because it's not obvious at all. Someone needs to be able to come here in five years and read up on why we are doing all of these things. :-)

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Jinho Bang
          • Suyeon Ji
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • requirement is not satisfiedReview-Enforcement
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: chromium/src
            Gerrit-Branch: main
            Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
            Gerrit-Change-Number: 7637951
            Gerrit-PatchSet: 14
            Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
            Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
            Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
            Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
            Gerrit-CC: Menard, Alexis <alexis...@intel.com>
            Gerrit-Attention: Suyeon Ji <zees...@gmail.com>
            Gerrit-Attention: Jinho Bang <zi...@chromium.org>
            Gerrit-Comment-Date: Mon, 16 Mar 2026 09:35:19 +0000
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Suyeon Ji (Gerrit)

            unread,
            11:27 AM (10 hours ago) 11:27 AM
            to Steinar H Gunderson, chrom...@appspot.gserviceaccount.com, Jinho Bang, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Menard, Alexis, apavlo...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-re...@chromium.org
            Attention needed from Jinho Bang and Steinar H Gunderson

            Suyeon Ji added 1 comment

            File third_party/blink/renderer/core/css/css_property_value_set.cc
            Line 246, Patchset 6: for (unsigned i = all_index + 1; i < property_set.PropertyCount(); i++) {
            Steinar H Gunderson . resolved
            Suyeon Ji

            Thanks for your review. You're right.
            I've left comments at the top of CSSPropertyValueSet class.

            Please take another look. Thank you.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Jinho Bang
            • Steinar H Gunderson
            Submit Requirements:
              • requirement satisfiedCode-Coverage
              • requirement is not satisfiedCode-Owners
              • requirement is not satisfiedCode-Review
              • requirement is not satisfiedReview-Enforcement
              Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
              Gerrit-MessageType: comment
              Gerrit-Project: chromium/src
              Gerrit-Branch: main
              Gerrit-Change-Id: Id6a0ddad9026221cb1db50830687143f9d394bb1
              Gerrit-Change-Number: 7637951
              Gerrit-PatchSet: 16
              Gerrit-Owner: Suyeon Ji <zees...@gmail.com>
              Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
              Gerrit-Reviewer: Jinho Bang <zi...@chromium.org>
              Gerrit-Reviewer: Steinar H Gunderson <se...@chromium.org>
              Gerrit-Reviewer: Suyeon Ji <zees...@gmail.com>
              Gerrit-CC: Menard, Alexis <alexis...@intel.com>
              Gerrit-Attention: Jinho Bang <zi...@chromium.org>
              Gerrit-Attention: Steinar H Gunderson <se...@chromium.org>
              Gerrit-Comment-Date: Tue, 24 Mar 2026 15:27:02 +0000
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy
              Reply all
              Reply to author
              Forward
              0 new messages