[DO NOT SUBMIT] ::nth-word() prototype [chromium/src : main]

1 view
Skip to first unread message

Kevin Babbitt (Gerrit)

unread,
Jul 23, 2026, 12:35:34 PM (5 days ago) Jul 23
to Alison Maher, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, apavlo...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, devtools-re...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, zol...@webkit.org
Attention needed from Alison Maher

Kevin Babbitt added 3 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Kevin Babbitt . resolved

Hi almaher@ - not looking for a full review on this; it's an AI coded prototype and needs a bit more iteration. But I wanted to get a high-level check on the approach for fragmenting by word in element.cc - could you please take a look at that and let me know if you see any issues with the general direction?

File third_party/blink/renderer/core/dom/element.cc
Line 7200, Patchset 1 (Latest):// ::nth-word() uses two distinct pseudo_argument encodings:
Kevin Babbitt . unresolved

This encoding seems a little clunky to me. The reason for it is to reuse the existing mechanism for named view transitions to store multiple ::nth-word() pseudos per element, but I'm not particularly fond of the number -> string -> number round-tripping and might need to iterate on this more.

Line 11144, Patchset 1 (Latest): // First-rule-wins tiebreaker: if a later An+B rule also matches a
// given word, we skip it. Cascade ordering across multiple
// ::nth-word() rules targeting the same word is a separate open
// question.
for (const auto& key_pair : nth_word_data.Styles()) {
Kevin Babbitt . unresolved

First rule wins is probably wrong; multiple applicable ::nth-word() pseudos applying to the same word should cascade as normal with last-one-wins semantics.

Open in Gerrit

Related details

Attention is currently required from:
  • Alison Maher
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: Iaab9e957d6c39205d1f93b8c175247f47fbf38d3
Gerrit-Change-Number: 8140439
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-Reviewer: Alison Maher <alm...@microsoft.com>
Gerrit-Reviewer: Kevin Babbitt <kbab...@microsoft.com>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-Attention: Alison Maher <alm...@microsoft.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 16:35:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages