Add blink::String::CodePointAt() [chromium/src : main]

1 view
Skip to first unread message

Kent Tamura (Gerrit)

unread,
May 19, 2026, 3:00:55 AMMay 19
to Kent Tamura, Fredrik Söderquist, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Fredrik Söderquist

Kent Tamura voted and added 1 comment

Votes added by Kent Tamura

Auto-Submit+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Kent Tamura . resolved

fs@, would you review this please?

Open in Gerrit

Related details

Attention is currently required from:
  • Fredrik Söderquist
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: I9b4912d2b89309f9f30be111c2a43a8dcfd5b4a6
Gerrit-Change-Number: 7859011
Gerrit-PatchSet: 4
Gerrit-Owner: Kent Tamura <tk...@chromium.org>
Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Fredrik Söderquist <f...@opera.com>
Gerrit-Comment-Date: Tue, 19 May 2026 07:00:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Fredrik Söderquist (Gerrit)

unread,
May 19, 2026, 4:27:08 AMMay 19
to Kent Tamura, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org
Attention needed from Kent Tamura

Fredrik Söderquist voted and added 3 comments

Votes added by Fredrik Söderquist

Code-Review+1

3 comments

Patchset-level comments
Fredrik Söderquist . resolved

LGTM w/ nits

File third_party/blink/renderer/platform/wtf/text/wtf_string.h
Line 241, Patchset 4 (Latest): // string. If the offset points an unpaired surrogate or `i` is out of bounds,
Fredrik Söderquist . unresolved
```suggestion
// string. If the offset points to an unpaired surrogate or `i` is out of bounds,
```
Line 234, Patchset 4 (Latest): // the surrogate code unit as is. If you'd like to check such surroagtes,
Fredrik Söderquist . unresolved
```suggestion
// the surrogate code unit as is. If you'd like to check such surrogates,
```
Open in Gerrit

Related details

Attention is currently required from:
  • Kent Tamura
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: I9b4912d2b89309f9f30be111c2a43a8dcfd5b4a6
    Gerrit-Change-Number: 7859011
    Gerrit-PatchSet: 4
    Gerrit-Owner: Kent Tamura <tk...@chromium.org>
    Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    Gerrit-Attention: Kent Tamura <tk...@chromium.org>
    Gerrit-Comment-Date: Tue, 19 May 2026 08:26:55 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kent Tamura (Gerrit)

    unread,
    May 19, 2026, 7:10:18 PMMay 19
    to Kent Tamura, Fredrik Söderquist, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

    Kent Tamura voted and added 2 comments

    Votes added by Kent Tamura

    Auto-Submit+1
    Commit-Queue+2

    2 comments

    File third_party/blink/renderer/platform/wtf/text/wtf_string.h
    Line 241, Patchset 4: // string. If the offset points an unpaired surrogate or `i` is out of bounds,
    Fredrik Söderquist . resolved
    ```suggestion
    // string. If the offset points to an unpaired surrogate or `i` is out of bounds,
    ```
    Kent Tamura

    Done

    Line 234, Patchset 4: // the surrogate code unit as is. If you'd like to check such surroagtes,
    Fredrik Söderquist . resolved
    ```suggestion
    // the surrogate code unit as is. If you'd like to check such surrogates,
    ```
    Kent Tamura

    Done

    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: I9b4912d2b89309f9f30be111c2a43a8dcfd5b4a6
      Gerrit-Change-Number: 7859011
      Gerrit-PatchSet: 4
      Gerrit-Owner: Kent Tamura <tk...@chromium.org>
      Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      Gerrit-Comment-Date: Tue, 19 May 2026 23:09:52 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Fredrik Söderquist <f...@opera.com>
      satisfied_requirement
      open
      diffy

      Kent Tamura (Gerrit)

      unread,
      May 19, 2026, 9:23:24 PMMay 19
      to Kent Tamura, Fredrik Söderquist, Chromium LUCI CQ, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

      Kent Tamura voted Commit-Queue+2

      Commit-Queue+2
      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: I9b4912d2b89309f9f30be111c2a43a8dcfd5b4a6
      Gerrit-Change-Number: 7859011
      Gerrit-PatchSet: 5
      Gerrit-Owner: Kent Tamura <tk...@chromium.org>
      Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      Gerrit-Comment-Date: Wed, 20 May 2026 01:22:57 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      May 19, 2026, 9:27:18 PMMay 19
      to Kent Tamura, Fredrik Söderquist, chromium...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, kinuko...@chromium.org

      Chromium LUCI CQ submitted the change with unreviewed changes

      Unreviewed changes

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

      ```
      The name of the file: third_party/blink/renderer/platform/wtf/text/wtf_string.h
      Insertions: 9, Deletions: 4.

      The diff is too large to show. Please review the diff.
      ```

      Change information

      Commit message:
      Add blink::String::CodePointAt()

      For consistency with blink::StringView::CodePointAt(), this CL adds
      blink::String::CodePointAt().

      Key differences from CodePointAtOrZero():
      - It CHECKs that the index is in bounds and the string is not null.
      - It returns unpaired surrogate code units as-is instead of returning 0.

      These differences allow for a more streamlined implementation by
      omitting redundant checks when the caller has already verified the
      index.

      This CL also updates several call sites in frame_selection.cc,
      mathml_operator_dictionary.cc, and unicode_utilities.cc where these
      conditions are met.
      Bug: 473854537
      Change-Id: I9b4912d2b89309f9f30be111c2a43a8dcfd5b4a6
      Auto-Submit: Kent Tamura <tk...@chromium.org>
      Commit-Queue: Kent Tamura <tk...@chromium.org>
      Reviewed-by: Fredrik Söderquist <f...@opera.com>
      Cr-Commit-Position: refs/heads/main@{#1633254}
      Files:
      • M third_party/blink/renderer/core/editing/frame_selection.cc
      • M third_party/blink/renderer/platform/text/mathml_operator_dictionary.cc
      • M third_party/blink/renderer/platform/text/unicode_utilities.cc
      • M third_party/blink/renderer/platform/wtf/text/wtf_string.cc
      • M third_party/blink/renderer/platform/wtf/text/wtf_string.h
      • M third_party/blink/renderer/platform/wtf/text/wtf_string_test.cc
      Change size: M
      Delta: 6 files changed, 70 insertions(+), 9 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Fredrik Söderquist
      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: I9b4912d2b89309f9f30be111c2a43a8dcfd5b4a6
      Gerrit-Change-Number: 7859011
      Gerrit-PatchSet: 6
      Gerrit-Owner: Kent Tamura <tk...@chromium.org>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Fredrik Söderquist <f...@opera.com>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages