[css-lists] Support for parsing counter-reset: reversed(counter-name) [chromium/src : main]

0 views
Skip to first unread message

Minseong Kim (Gerrit)

unread,
Nov 16, 2025, 10:46:51 PMNov 16
to Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Rune Lillesveen

Minseong Kim added 1 comment

Patchset-level comments
File-level comment, Patchset 10:
Minseong Kim . resolved

Would you review this CL, please?

Open in Gerrit

Related details

Attention is currently required from:
  • 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
Gerrit-Change-Number: 7150339
Gerrit-PatchSet: 13
Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
Gerrit-Comment-Date: Mon, 17 Nov 2025 03:46:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Rune Lillesveen (Gerrit)

unread,
Nov 17, 2025, 9:26:02 AMNov 17
to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
Attention needed from Minseong Kim

Rune Lillesveen added 5 comments

File third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
Line 5746, Patchset 13 (Latest): bool contains_reversed_function) {
Rune Lillesveen . unresolved

Seems this is just RuntimeEnabledFeatures::CSSCounterResetReversedEnabled(). Why do we need to pass that in?

File third_party/blink/renderer/core/style/counter_directives.h
Line 55, Patchset 13 (Latest): void SetIsResetReversed() { is_reset_reversed_ = true; }
Rune Lillesveen . unresolved

I think it would be better to always set the is_reset_reversed_ flag along with the reset_value_. So instead, have a SetResetReversedValue() which sets both the reset_value_ and the revesed flag.

Line 53, Patchset 13 (Latest): bool HasResetValue() const { return !!reset_value_; }
Rune Lillesveen . unresolved

reset_value_.has_value()

Line 50, Patchset 13 (Latest): bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
Rune Lillesveen . unresolved

I think `reset_value_.has_value()` is clearer.

Line 50, Patchset 13 (Latest): bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
Rune Lillesveen . unresolved

Won't is_reset_reversed_ only be true if `reset_value_.has_value()` is true?

If so, we don't need to add this check.

Open in Gerrit

Related details

Attention is currently required from:
  • Minseong Kim
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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
    Gerrit-Change-Number: 7150339
    Gerrit-PatchSet: 13
    Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
    Gerrit-Comment-Date: Mon, 17 Nov 2025 14:25:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Minseong Kim (Gerrit)

    unread,
    Nov 17, 2025, 8:14:53 PMNov 17
    to Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Rune Lillesveen

    Minseong Kim added 6 comments

    Patchset-level comments
    File-level comment, Patchset 14 (Latest):
    Minseong Kim . resolved

    Thanks for your review! Would you take a look once again, please?

    File third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
    Line 5746, Patchset 13: bool contains_reversed_function) {
    Rune Lillesveen . resolved

    Seems this is just RuntimeEnabledFeatures::CSSCounterResetReversedEnabled(). Why do we need to pass that in?

    Minseong Kim

    This is because `counter-increment` and `counter-set` also use `ConsumeCounter()`. They should parse only `[ <counter-name> <integer>? ]+ | none` except `<reversed-counter-name> <integer>?`

    File third_party/blink/renderer/core/style/counter_directives.h
    Line 55, Patchset 13: void SetIsResetReversed() { is_reset_reversed_ = true; }
    Rune Lillesveen . resolved

    I think it would be better to always set the is_reset_reversed_ flag along with the reset_value_. So instead, have a SetResetReversedValue() which sets both the reset_value_ and the revesed flag.

    Minseong Kim

    As I mentioned [above](https://chromium-review.googlesource.com/c/chromium/src/+/7150339/comment/079495f8_00dcfbd9/), `is_reset_reversed_` can be set without `reset_value_`.

    Line 53, Patchset 13: bool HasResetValue() const { return !!reset_value_; }
    Rune Lillesveen . resolved

    reset_value_.has_value()

    Minseong Kim

    Done

    Line 50, Patchset 13: bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
    Rune Lillesveen . unresolved

    Won't is_reset_reversed_ only be true if `reset_value_.has_value()` is true?

    If so, we don't need to add this check.

    Minseong Kim

    No, it won't. If we specify `reversed(counter-name)` without a <integer> value in CSS, then only `is_reset_reversed_` is true and `reset_value_.has_value()` is false.

    This is because the [spec](https://drafts.csswg.org/css-lists-3/#counter-reset) says,


    > `<counter-name> <integer>?` instantiates a counter of the given <counter-name> with a starting value of the given <integer>, defaulting to 0.
    > `<reversed-counter-name> <integer>?` instantiates a reversed counter of the given <counter-name> with a starting value of the given <integer>, **or no starting value if not given.**


    So, I implemented the code in `style_builder_functions.tmpl`,

    ```
    // ...
    if (auto* reversed_function = DynamicTo<CSSFunctionValue>(*item)) {
    AtomicString identifier(
    To<CSSCustomIdentValue>(reversed_function->First()).Value());
    CounterDirectives& directives =
    map.insert(identifier, CounterDirectives()).stored_value->value;
    directives.SetIsResetReversed();
    continue;
    }
    // ...

    ```


    Do I understand correctly? WDYT?

    Line 50, Patchset 13: bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
    Rune Lillesveen . resolved

    I think `reset_value_.has_value()` is clearer.

    Minseong Kim

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Rune Lillesveen
    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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
    Gerrit-Change-Number: 7150339
    Gerrit-PatchSet: 14
    Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
    Gerrit-Comment-Date: Tue, 18 Nov 2025 01:14:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rune Lillesveen (Gerrit)

    unread,
    Nov 18, 2025, 9:03:07 AMNov 18
    to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Minseong Kim

    Rune Lillesveen added 3 comments

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 47, Patchset 14 (Latest): (a.value.ResetValue() != b.value.ResetValue() ||
    Rune Lillesveen . unresolved

    Won't this crash if reset_value_ is nullopt?

    Maybe it would be better for ResetValue() to return an optional and handle via checking for nullopt instead?

    File third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
    Line 5746, Patchset 13: bool contains_reversed_function) {
    Rune Lillesveen . unresolved

    Seems this is just RuntimeEnabledFeatures::CSSCounterResetReversedEnabled(). Why do we need to pass that in?

    Minseong Kim

    This is because `counter-increment` and `counter-set` also use `ConsumeCounter()`. They should parse only `[ <counter-name> <integer>? ]+ | none` except `<reversed-counter-name> <integer>?`

    Rune Lillesveen

    I think `accept_reversed_function` is a better name.

    File third_party/blink/renderer/core/style/counter_directives.h
    Line 50, Patchset 13: bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
    Rune Lillesveen . unresolved

    Won't is_reset_reversed_ only be true if `reset_value_.has_value()` is true?

    If so, we don't need to add this check.

    Minseong Kim

    No, it won't. If we specify `reversed(counter-name)` without a <integer> value in CSS, then only `is_reset_reversed_` is true and `reset_value_.has_value()` is false.

    This is because the [spec](https://drafts.csswg.org/css-lists-3/#counter-reset) says,


    > `<counter-name> <integer>?` instantiates a counter of the given <counter-name> with a starting value of the given <integer>, defaulting to 0.
    > `<reversed-counter-name> <integer>?` instantiates a reversed counter of the given <counter-name> with a starting value of the given <integer>, **or no starting value if not given.**


    So, I implemented the code in `style_builder_functions.tmpl`,

    ```
    // ...
    if (auto* reversed_function = DynamicTo<CSSFunctionValue>(*item)) {
    AtomicString identifier(
    To<CSSCustomIdentValue>(reversed_function->First()).Value());
    CounterDirectives& directives =
    map.insert(identifier, CounterDirectives()).stored_value->value;
    directives.SetIsResetReversed();
    continue;
    }
    // ...

    ```


    Do I understand correctly? WDYT?

    Rune Lillesveen

    I think this calls for some documentation in CounterDirectives.

    Is the implicit 0 for non-resets stored as an actual value, or is that also a nullopt?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Minseong Kim
    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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
    Gerrit-Change-Number: 7150339
    Gerrit-PatchSet: 14
    Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
    Gerrit-Comment-Date: Tue, 18 Nov 2025 14:02:54 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
    Comment-In-Reply-To: Minseong Kim <jja0...@gmail.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Minseong Kim (Gerrit)

    unread,
    Nov 19, 2025, 12:23:33 AMNov 19
    to Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Rune Lillesveen

    Minseong Kim added 3 comments

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 47, Patchset 14: (a.value.ResetValue() != b.value.ResetValue() ||
    Rune Lillesveen . resolved

    Won't this crash if reset_value_ is nullopt?

    Maybe it would be better for ResetValue() to return an optional and handle via checking for nullopt instead?

    Minseong Kim

    Ah, you're right. Thank you. I changed it to return an optional.

    File third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
    Line 5746, Patchset 13: bool contains_reversed_function) {
    Rune Lillesveen . resolved

    Seems this is just RuntimeEnabledFeatures::CSSCounterResetReversedEnabled(). Why do we need to pass that in?

    Minseong Kim

    This is because `counter-increment` and `counter-set` also use `ConsumeCounter()`. They should parse only `[ <counter-name> <integer>? ]+ | none` except `<reversed-counter-name> <integer>?`

    Rune Lillesveen

    I think `accept_reversed_function` is a better name.

    Minseong Kim

    Done. Thanks for the suggestion!

    File third_party/blink/renderer/core/style/counter_directives.h
    Line 50, Patchset 13: bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
    Rune Lillesveen . unresolved

    Won't is_reset_reversed_ only be true if `reset_value_.has_value()` is true?

    If so, we don't need to add this check.

    Minseong Kim

    No, it won't. If we specify `reversed(counter-name)` without a <integer> value in CSS, then only `is_reset_reversed_` is true and `reset_value_.has_value()` is false.

    This is because the [spec](https://drafts.csswg.org/css-lists-3/#counter-reset) says,


    > `<counter-name> <integer>?` instantiates a counter of the given <counter-name> with a starting value of the given <integer>, defaulting to 0.
    > `<reversed-counter-name> <integer>?` instantiates a reversed counter of the given <counter-name> with a starting value of the given <integer>, **or no starting value if not given.**


    So, I implemented the code in `style_builder_functions.tmpl`,

    ```
    // ...
    if (auto* reversed_function = DynamicTo<CSSFunctionValue>(*item)) {
    AtomicString identifier(
    To<CSSCustomIdentValue>(reversed_function->First()).Value());
    CounterDirectives& directives =
    map.insert(identifier, CounterDirectives()).stored_value->value;
    directives.SetIsResetReversed();
    continue;
    }
    // ...

    ```


    Do I understand correctly? WDYT?

    Rune Lillesveen

    I think this calls for some documentation in CounterDirectives.

    Is the implicit 0 for non-resets stored as an actual value, or is that also a nullopt?

    Minseong Kim

    Okay. I added some documentation in CounterDirectives.

    Is the implicit 0 for non-resets stored as an actual value, or is that also a nullopt?

    The implicit 0 for non‑resets is stored as an *actual value* because it has a default value. The spec says,

    If the <integer> is omitted, it defaults to 1 (for counter-increment) or 0 (for counter-set).
    If there is not currently a counter of the given name on the element, the element instantiates a new counter of the given name with a starting value of 0 setting or incrementing its value.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Rune Lillesveen
    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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
    Gerrit-Change-Number: 7150339
    Gerrit-PatchSet: 15
    Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
    Gerrit-Comment-Date: Wed, 19 Nov 2025 05:23:07 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Rune Lillesveen (Gerrit)

    unread,
    Nov 19, 2025, 5:11:09 AMNov 19
    to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Minseong Kim

    Rune Lillesveen added 4 comments

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 31, Patchset 16 (Latest): return std::ranges::equal(*a_map, *b_map, [](const auto& a, const auto& b) {
    Rune Lillesveen . unresolved

    This is not correct. You have no guarantee about the iteration order for a HashMap, so this might fail even if the HashMaps are equal.

    We need to iterate over one of them and do a lookup with a comparison against the other.

    Line 47, Patchset 14: (a.value.ResetValue() != b.value.ResetValue() ||
    Rune Lillesveen . unresolved

    Won't this crash if reset_value_ is nullopt?

    Maybe it would be better for ResetValue() to return an optional and handle via checking for nullopt instead?

    Minseong Kim

    Ah, you're right. Thank you. I changed it to return an optional.

    Rune Lillesveen

    Could you add a couple of `test_no_interpolation()` tests, where at least one of the values has a nullopt for the reset value to cover that case?

    File third_party/blink/renderer/core/style/counter_directives.h
    Line 41, Patchset 16 (Latest):class CounterDirectives {
    Rune Lillesveen . unresolved

    I was a bit confused by the comparisons in css_property_equality.cc not simply using an operator== before I realized this stores all of counter-set, counter-increment, counter-reset in the same object.

    Add a couple of lines of documentation for the class saying that.

    IsIncrement()/IsSet() should probably be named HasIncrement()/HasSet() to lessen that confusion.

    Line 50, Patchset 13: bool IsReset() const { return !!reset_value_ || is_reset_reversed_; }
    Rune Lillesveen . resolved
    Rune Lillesveen

    Acknowledged

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Minseong Kim
    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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
    Gerrit-Change-Number: 7150339
    Gerrit-PatchSet: 16
    Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
    Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
    Gerrit-Comment-Date: Wed, 19 Nov 2025 10:10:56 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Minseong Kim (Gerrit)

    unread,
    Nov 21, 2025, 3:15:56 AMNov 21
    to Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
    Attention needed from Rune Lillesveen

    Minseong Kim added 3 comments

    File third_party/blink/renderer/core/css/css_property_equality.cc
    Line 31, Patchset 16: return std::ranges::equal(*a_map, *b_map, [](const auto& a, const auto& b) {
    Rune Lillesveen . resolved

    This is not correct. You have no guarantee about the iteration order for a HashMap, so this might fail even if the HashMaps are equal.

    We need to iterate over one of them and do a lookup with a comparison against the other.

    Minseong Kim

    Oh, yes. You're right. I fixed it in this CL.

    Line 47, Patchset 14: (a.value.ResetValue() != b.value.ResetValue() ||
    Rune Lillesveen . resolved

    Won't this crash if reset_value_ is nullopt?

    Maybe it would be better for ResetValue() to return an optional and handle via checking for nullopt instead?

    Minseong Kim

    Ah, you're right. Thank you. I changed it to return an optional.

    Rune Lillesveen

    Could you add a couple of `test_no_interpolation()` tests, where at least one of the values has a nullopt for the reset value to cover that case?

    Minseong Kim

    Done

    File third_party/blink/renderer/core/style/counter_directives.h
    Line 41, Patchset 16:class CounterDirectives {
    Rune Lillesveen . resolved

    I was a bit confused by the comparisons in css_property_equality.cc not simply using an operator== before I realized this stores all of counter-set, counter-increment, counter-reset in the same object.

    Add a couple of lines of documentation for the class saying that.

    IsIncrement()/IsSet() should probably be named HasIncrement()/HasSet() to lessen that confusion.

    Minseong Kim

    Okay. I added the documentation and renamed those functions.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
      Gerrit-Change-Number: 7150339
      Gerrit-PatchSet: 20
      Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
      Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
      Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
      Gerrit-Comment-Date: Fri, 21 Nov 2025 08:15:50 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Rune Lillesveen (Gerrit)

      unread,
      Nov 21, 2025, 7:48:56 AMNov 21
      to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Minseong Kim

      Rune Lillesveen voted and added 1 comment

      Votes added by Rune Lillesveen

      Code-Review+1

      1 comment

      Patchset-level comments
      File-level comment, Patchset 20 (Latest):
      Rune Lillesveen . resolved

      lgtm

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Minseong Kim
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
      Gerrit-Change-Number: 7150339
      Gerrit-PatchSet: 20
      Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
      Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
      Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
      Gerrit-Comment-Date: Fri, 21 Nov 2025 12:48:40 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Minseong Kim (Gerrit)

      unread,
      Nov 23, 2025, 6:54:10 PMNov 23
      to Daniil Sakhapov, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Daniil Sakhapov

      Minseong Kim added 1 comment

      Patchset-level comments
      Minseong Kim . resolved

      Hi, @sakh...@chromium.org. Would you review this CL, please?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Daniil Sakhapov
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
      Gerrit-Change-Number: 7150339
      Gerrit-PatchSet: 20
      Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
      Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
      Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
      Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
      Gerrit-CC: Menard, Alexis <alexis...@intel.com>
      Gerrit-Attention: Daniil Sakhapov <sakh...@chromium.org>
      Gerrit-Comment-Date: Sun, 23 Nov 2025 23:53:28 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniil Sakhapov (Gerrit)

      unread,
      Nov 25, 2025, 9:07:50 AMNov 25
      to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
      Attention needed from Minseong Kim

      Daniil Sakhapov added 1 comment

      Patchset-level comments
      Minseong Kim . unresolved

      Hi, @sakh...@chromium.org. Would you review this CL, please?

      Daniil Sakhapov

      I was playing with this idea in https://chromium-review.googlesource.com/c/chromium/src/+/6708788, and there I ended up having a separate class value to store counter data (CSSCounterDataValue), comparing with this CL that idea looks a bit more clean in terms of parsing and changing existing code, could you, please, have a look and tell me what you think, Minseong?
      @fut...@chromium.org, wdyt?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Minseong Kim
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 20
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
        Gerrit-Comment-Date: Tue, 25 Nov 2025 14:07:32 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Minseong Kim <jja0...@gmail.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Minseong Kim (Gerrit)

        unread,
        Nov 25, 2025, 6:46:09 PMNov 25
        to Daniil Sakhapov, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Daniil Sakhapov

        Minseong Kim added 1 comment

        Patchset-level comments
        Minseong Kim . unresolved

        Hi, @sakh...@chromium.org. Would you review this CL, please?

        Daniil Sakhapov

        I was playing with this idea in https://chromium-review.googlesource.com/c/chromium/src/+/6708788, and there I ended up having a separate class value to store counter data (CSSCounterDataValue), comparing with this CL that idea looks a bit more clean in terms of parsing and changing existing code, could you, please, have a look and tell me what you think, Minseong?
        @fut...@chromium.org, wdyt?

        Minseong Kim

        Thank you for pointing me to your previous work on this. I've reviewed that CL, and I agree that using a separate `CSSCounterDataValue` class seems like a cleaner solution :)


        Would you be okay with me updating this CL to incorporate that design?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniil Sakhapov
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 20
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Comment-Date: Tue, 25 Nov 2025 23:45:37 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Daniil Sakhapov <sakh...@chromium.org>
        Comment-In-Reply-To: Minseong Kim <jja0...@gmail.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniil Sakhapov (Gerrit)

        unread,
        Nov 26, 2025, 3:02:13 AM (14 days ago) Nov 26
        to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Minseong Kim and Rune Lillesveen

        Daniil Sakhapov added 1 comment

        Patchset-level comments
        Minseong Kim . unresolved

        Hi, @sakh...@chromium.org. Would you review this CL, please?

        Daniil Sakhapov

        I was playing with this idea in https://chromium-review.googlesource.com/c/chromium/src/+/6708788, and there I ended up having a separate class value to store counter data (CSSCounterDataValue), comparing with this CL that idea looks a bit more clean in terms of parsing and changing existing code, could you, please, have a look and tell me what you think, Minseong?
        @fut...@chromium.org, wdyt?

        Minseong Kim

        Thank you for pointing me to your previous work on this. I've reviewed that CL, and I agree that using a separate `CSSCounterDataValue` class seems like a cleaner solution :)


        Would you be okay with me updating this CL to incorporate that design?

        Daniil Sakhapov

        Sure, go ahead, please.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Minseong Kim
        • Rune Lillesveen
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 20
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
        Gerrit-Comment-Date: Wed, 26 Nov 2025 08:01:53 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Minseong Kim (Gerrit)

        unread,
        Nov 28, 2025, 4:07:58 AM (12 days ago) Nov 28
        to Daniil Sakhapov, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Daniil Sakhapov and Rune Lillesveen

        Minseong Kim added 1 comment

        Patchset-level comments
        File-level comment, Patchset 23 (Latest):
        Minseong Kim . resolved

        I updated this CL by creating `CSSCounterDataValue`. Would you, please, review this CL?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniil Sakhapov
        • Rune Lillesveen
        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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 23
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Comment-Date: Fri, 28 Nov 2025 09:07:25 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniil Sakhapov (Gerrit)

        unread,
        Nov 28, 2025, 5:35:34 AM (12 days ago) Nov 28
        to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Minseong Kim and Rune Lillesveen

        Daniil Sakhapov voted and added 2 comments

        Votes added by Daniil Sakhapov

        Code-Review+1

        2 comments

        Patchset-level comments
        File-level comment, Patchset 20:
        Minseong Kim . resolved

        Hi, @sakh...@chromium.org. Would you review this CL, please?

        Daniil Sakhapov

        I was playing with this idea in https://chromium-review.googlesource.com/c/chromium/src/+/6708788, and there I ended up having a separate class value to store counter data (CSSCounterDataValue), comparing with this CL that idea looks a bit more clean in terms of parsing and changing existing code, could you, please, have a look and tell me what you think, Minseong?
        @fut...@chromium.org, wdyt?

        Minseong Kim

        Thank you for pointing me to your previous work on this. I've reviewed that CL, and I agree that using a separate `CSSCounterDataValue` class seems like a cleaner solution :)


        Would you be okay with me updating this CL to incorporate that design?

        Daniil Sakhapov

        Sure, go ahead, please.

        Daniil Sakhapov

        Done

        File third_party/blink/renderer/core/style/counter_directives.cc
        Line 28, Patchset 23 (Latest):bool operator==(const CounterDirectives& a, const CounterDirectives& b) {
        return a.reset_value_ == b.reset_value_ &&
        a.is_reset_reversed_ == b.is_reset_reversed_ &&
        a.increment_value_ == b.increment_value_ &&
        a.set_value_ == b.set_value_;
        }
        Daniil Sakhapov . unresolved

        super optional nit: if I'm not mistaken, we can just say `bool operator==(const CounterDirectives&) const = default;` and remove the C++ file at all?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Minseong Kim
        • Rune Lillesveen
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 23
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
        Gerrit-Comment-Date: Fri, 28 Nov 2025 10:35:16 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rune Lillesveen (Gerrit)

        unread,
        Nov 28, 2025, 9:40:39 AM (12 days ago) Nov 28
        to Minseong Kim, Daniil Sakhapov, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Minseong Kim

        Rune Lillesveen added 4 comments

        File third_party/blink/renderer/core/css/css_counter_data_value.h
        Line 16, Patchset 23 (Latest):class CSSCounterDataValue final : public CSSValue {
        Rune Lillesveen . unresolved

        The naming here is really confusing, and there's no documentation that explains it. What is a CSSCounterDataValue vs a CSSCounterValue? (rhetorical question, but I had to check)

        "Data" doesn't say anything. Everything is "data".

        IIUC, CSSCounterValue is the value of a counter() in generated content?

        Maybe CSSCounterValue should be CSSCounterFunctionValue or CSSCounterContentValue (probably the latter)?

        Then, a more natural name for this would be CSSCounterValue?

        But still, a couple of lines of documentation of what this represent is good.

        File third_party/blink/renderer/core/css/properties/css_parsing_utils.h
        Line 523, Patchset 23 (Latest):CSSValue* ConsumeCounter(CSSParserTokenStream&,
        Rune Lillesveen . unresolved

        This name sounds like it's consuming a single counter, while it consumes a list.

        ConsumeCounters() or ConsumeCounterList()?

        Line 518, Patchset 23 (Latest):cssvalue::CSSCounterDataValue* ConsumeCounterDataValue(
        Rune Lillesveen . unresolved

        ConsumeCounter()?

        File third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
        Line 5723, Patchset 23 (Latest): bool is_reversed) {
        Rune Lillesveen . unresolved

        I think it would be more readable if you passed on the accept parameter and did the Peek for reversed here instead.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Minseong Kim
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 23
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
        Gerrit-Comment-Date: Fri, 28 Nov 2025 14:40:19 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Minseong Kim (Gerrit)

        unread,
        Nov 30, 2025, 5:24:34 PM (9 days ago) Nov 30
        to Daniil Sakhapov, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Daniil Sakhapov and Rune Lillesveen

        Minseong Kim added 6 comments

        Patchset-level comments
        File-level comment, Patchset 27 (Latest):
        Minseong Kim . resolved

        Thanks for the reviews!

        File third_party/blink/renderer/core/css/css_counter_data_value.h
        Line 16, Patchset 23:class CSSCounterDataValue final : public CSSValue {
        Rune Lillesveen . resolved

        The naming here is really confusing, and there's no documentation that explains it. What is a CSSCounterDataValue vs a CSSCounterValue? (rhetorical question, but I had to check)

        "Data" doesn't say anything. Everything is "data".

        IIUC, CSSCounterValue is the value of a counter() in generated content?

        Maybe CSSCounterValue should be CSSCounterFunctionValue or CSSCounterContentValue (probably the latter)?

        Then, a more natural name for this would be CSSCounterValue?

        But still, a couple of lines of documentation of what this represent is good.

        Minseong Kim

        Yes, I agree that it's confusing. Thanks for pointing it.

        I think renaming `CSSCounterValue` to `CSSCounterContentValue` is good because it's used for `ContentData`. So, I renamed it in [an another CL](https://chromium-review.googlesource.com/c/chromium/src/+/7210112).

        And, I also renamed `CSSCounterDataValue` to `CSSCounterValue` and added some documentations in this CL.

        File third_party/blink/renderer/core/css/properties/css_parsing_utils.h
        Line 523, Patchset 23:CSSValue* ConsumeCounter(CSSParserTokenStream&,
        Rune Lillesveen . resolved

        This name sounds like it's consuming a single counter, while it consumes a list.

        ConsumeCounters() or ConsumeCounterList()?

        Minseong Kim

        Done

        Line 518, Patchset 23:cssvalue::CSSCounterDataValue* ConsumeCounterDataValue(
        Rune Lillesveen . resolved

        ConsumeCounter()?

        Minseong Kim

        Done

        File third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
        Line 5723, Patchset 23: bool is_reversed) {
        Rune Lillesveen . resolved

        I think it would be more readable if you passed on the accept parameter and did the Peek for reversed here instead.

        Minseong Kim

        Done

        File third_party/blink/renderer/core/style/counter_directives.cc
        Line 28, Patchset 23:bool operator==(const CounterDirectives& a, const CounterDirectives& b) {

        return a.reset_value_ == b.reset_value_ &&
        a.is_reset_reversed_ == b.is_reset_reversed_ &&
        a.increment_value_ == b.increment_value_ &&
        a.set_value_ == b.set_value_;
        }
        Daniil Sakhapov . resolved

        super optional nit: if I'm not mistaken, we can just say `bool operator==(const CounterDirectives&) const = default;` and remove the C++ file at all?

        Minseong Kim

        Yeah, we can use `default` on this. I'll change this by creating an another CL. Thanks!

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniil Sakhapov
        • 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 27
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Attention: Rune Lillesveen <fut...@chromium.org>
        Gerrit-Comment-Date: Sun, 30 Nov 2025 22:23:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Daniil Sakhapov <sakh...@chromium.org>
        Comment-In-Reply-To: Rune Lillesveen <fut...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rune Lillesveen (Gerrit)

        unread,
        Dec 1, 2025, 3:09:29 AM (9 days ago) Dec 1
        to Minseong Kim, Rune Lillesveen, Daniil Sakhapov, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Daniil Sakhapov and Minseong Kim

        Rune Lillesveen voted and added 1 comment

        Votes added by Rune Lillesveen

        Code-Review+1

        1 comment

        Patchset-level comments
        Rune Lillesveen . resolved

        lgtm

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniil Sakhapov
        • Minseong Kim
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
        Gerrit-Change-Number: 7150339
        Gerrit-PatchSet: 27
        Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
        Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
        Gerrit-CC: Menard, Alexis <alexis...@intel.com>
        Gerrit-Attention: Daniil Sakhapov <sakh...@chromium.org>
        Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
        Gerrit-Comment-Date: Mon, 01 Dec 2025 08:09:04 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Daniil Sakhapov (Gerrit)

        unread,
        Dec 1, 2025, 4:27:12 AM (9 days ago) Dec 1
        to Minseong Kim, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org
        Attention needed from Minseong Kim

        Daniil Sakhapov voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Minseong Kim
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
          Gerrit-Change-Number: 7150339
          Gerrit-PatchSet: 27
          Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
          Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-Attention: Minseong Kim <jja0...@gmail.com>
          Gerrit-Comment-Date: Mon, 01 Dec 2025 09:26:51 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Minseong Kim (Gerrit)

          unread,
          Dec 1, 2025, 5:07:01 AM (9 days ago) Dec 1
          to Daniil Sakhapov, Rune Lillesveen, AyeAye, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

          Minseong Kim voted and added 1 comment

          Votes added by Minseong Kim

          Commit-Queue+2

          1 comment

          Patchset-level comments
          Minseong Kim . resolved

          Thank you all for the reviews.

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
          Gerrit-Change-Number: 7150339
          Gerrit-PatchSet: 27
          Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
          Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-Comment-Date: Mon, 01 Dec 2025 10:06:54 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          Dec 1, 2025, 5:47:56 AM (9 days ago) Dec 1
          to Minseong Kim, Daniil Sakhapov, Rune Lillesveen, AyeAye, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          [css-lists] Support for parsing counter-reset: reversed(counter-name)

          This CL introduces support for the `reversed()` function within the
          `counter-reset` CSS property. This allows authors to specify that a
          counter should be reset in a reversed order.

          This CL includes:
          - Adding `reversed` as a recognized CSS value keyword.
          - Adding `CSSCounterValue` class for parsing.
          - Modifying `CounterDirectives` to store a `is_reset_reversed_` flag.
          - Updating CSS parsing utilities to correctly parse new syntax.
          - Updating relevant WPTs to reflect the new parsing behaviour.

          This CL also fixes `CounterRulesEqual` by iterating over one of
          `CounterDirectiveMap` and do a lookup with a comparison against the
          other.

          The new behavior is behind a runtime flag, CSSCounterResetReversed.
          Bug: 40760770
          Change-Id: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
          Reviewed-by: Rune Lillesveen <fut...@chromium.org>
          Reviewed-by: Daniil Sakhapov <sakh...@chromium.org>
          Commit-Queue: Minseong Kim <jja0...@gmail.com>
          Cr-Commit-Position: refs/heads/main@{#1551991}
          Files:
          • M third_party/blink/renderer/build/scripts/core/css/properties/templates/css_properties.cc.tmpl
          • M third_party/blink/renderer/build/scripts/core/css/properties/templates/style_builder_functions.tmpl
          • M third_party/blink/renderer/core/css/build.gni
          • M third_party/blink/renderer/core/css/counters_attachment_context.cc
          • A third_party/blink/renderer/core/css/css_counter_value.cc
          • A third_party/blink/renderer/core/css/css_counter_value.h
          • M third_party/blink/renderer/core/css/css_property_equality.cc
          • M third_party/blink/renderer/core/css/css_value.cc
          • M third_party/blink/renderer/core/css/css_value.h
          • M third_party/blink/renderer/core/css/css_value_keywords.json5
          • M third_party/blink/renderer/core/css/properties/computed_style_utils.cc
          • M third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
          • M third_party/blink/renderer/core/css/properties/css_parsing_utils.h
          • M third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
          • M third_party/blink/renderer/core/html/list_item_ordinal.cc
          • M third_party/blink/renderer/core/style/counter_directives.cc
          • M third_party/blink/renderer/core/style/counter_directives.h
          • M third_party/blink/renderer/platform/runtime_enabled_features.json5
          • M third_party/blink/web_tests/external/wpt/css/css-lists/css-lists-no-interpolation.html
          • D third_party/blink/web_tests/external/wpt/css/css-lists/parsing/counter-reset-valid-expected.txt
          • M third_party/blink/web_tests/external/wpt/html/rendering/non-replaced-elements/lists/lists-styles-expected.txt
          • M third_party/blink/web_tests/external/wpt/html/rendering/non-replaced-elements/lists/lists-styles-quirks-expected.txt
          Change size: L
          Delta: 22 files changed, 383 insertions(+), 89 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Daniil Sakhapov, +1 by Rune Lillesveen
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
          Gerrit-Change-Number: 7150339
          Gerrit-PatchSet: 28
          Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
          Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
          open
          diffy
          satisfied_requirement

          Blink W3C Test Autoroller (Gerrit)

          unread,
          Dec 1, 2025, 6:44:58 AM (9 days ago) Dec 1
          to Chromium LUCI CQ, Minseong Kim, Daniil Sakhapov, Rune Lillesveen, AyeAye, Menard, Alexis, chromium...@chromium.org, blink-rev...@chromium.org, kinuko...@chromium.org, jmedle...@chromium.org, blink-revie...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org

          Message from Blink W3C Test Autoroller

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

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I5bf294c70ea7db67580bd4db2caf54c509a96c5d
          Gerrit-Change-Number: 7150339
          Gerrit-PatchSet: 28
          Gerrit-Owner: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Daniil Sakhapov <sakh...@chromium.org>
          Gerrit-Reviewer: Minseong Kim <jja0...@gmail.com>
          Gerrit-Reviewer: Rune Lillesveen <fut...@chromium.org>
          Gerrit-CC: Blink W3C Test Autoroller <blink-w3c-te...@chromium.org>
          Gerrit-CC: Menard, Alexis <alexis...@intel.com>
          Gerrit-Comment-Date: Mon, 01 Dec 2025 11:44:52 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: No
          satisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages