Editing: Report only deleted code points in getTargetRanges() [chromium/src : main]

0 views
Skip to first unread message

Navoda Munasinha (Gerrit)

unread,
Aug 4, 2026, 1:46:21 AM (6 days ago) Aug 4
to Kent Tamura, David Baron, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from David Baron and Kent Tamura

Navoda Munasinha added 1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Navoda Munasinha . resolved

Hi, whenever you get a chance, could you please review this CL for crbug.com/539754135?

It makes getTargetRanges() on deleteContentBackward report only the code points Backspace actually deletes, instead of the whole grapheme cluster behind the caret. Firefox and Safari already behave this way.

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Kent Tamura
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: I64cca87d84abb3e40fc618ebe6db38672f42784a
Gerrit-Change-Number: 8192494
Gerrit-PatchSet: 2
Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
Gerrit-Reviewer: David Baron <dba...@chromium.org>
Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: Kent Tamura <tk...@chromium.org>
Gerrit-Attention: David Baron <dba...@chromium.org>
Gerrit-Comment-Date: Tue, 04 Aug 2026 05:45:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kent Tamura (Gerrit)

unread,
Aug 4, 2026, 2:01:13 AM (6 days ago) Aug 4
to Navoda Munasinha, Kent Tamura, David Baron, chromium...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
Attention needed from David Baron and Navoda Munasinha

Kent Tamura added 7 comments

Patchset-level comments
Kent Tamura . unresolved

Please add a new flag to runtime_enabled_features.json5, and enable the new code only if the flag is enabled.

https://chromium.googlesource.com/chromium/src/+/main/docs/flag_guarding_guidelines.md

Commit Message
Line 10, Patchset 2 (Latest):cluster behind the caret, while Backspace deletes only a part of it.
Kent Tamura . unresolved

nit: Remove the tailing whitespace.

Line 14, Patchset 2 (Latest):Move the narrowing that TypingCommand already does into
editing_utilities as NarrowSelectionToBackwardDeletionUnit() and
Kent Tamura . unresolved

nit: Remove the tailing whitespaces.

File third_party/blink/renderer/core/editing/commands/editing_command_test.cc
Line 172, Patchset 2 (Latest): Editor& editor = GetDocument().GetFrame()->GetEditor();
Kent Tamura . unresolved

nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

Line 196, Patchset 2 (Latest): Editor& editor = GetDocument().GetFrame()->GetEditor();
Kent Tamura . unresolved

nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

Line 220, Patchset 2 (Latest): Editor& editor = GetDocument().GetFrame()->GetEditor();
Kent Tamura . unresolved

nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

Line 244, Patchset 2 (Latest): Editor& editor = GetDocument().GetFrame()->GetEditor();
Kent Tamura . unresolved

nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

Open in Gerrit

Related details

Attention is currently required from:
  • David Baron
  • Navoda Munasinha
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: I64cca87d84abb3e40fc618ebe6db38672f42784a
    Gerrit-Change-Number: 8192494
    Gerrit-PatchSet: 2
    Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
    Gerrit-Reviewer: David Baron <dba...@chromium.org>
    Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
    Gerrit-Attention: Navoda Munasinha <navoda.m...@codimite.com>
    Gerrit-Attention: David Baron <dba...@chromium.org>
    Gerrit-Comment-Date: Tue, 04 Aug 2026 06:01:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Navoda Munasinha (Gerrit)

    unread,
    Aug 4, 2026, 6:35:59 AM (6 days ago) Aug 4
    to android-bu...@system.gserviceaccount.com, Kent Tamura, David Baron, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
    Attention needed from David Baron and Kent Tamura

    Navoda Munasinha added 7 comments

    Patchset-level comments
    File-level comment, Patchset 2:
    Kent Tamura . resolved

    Please add a new flag to runtime_enabled_features.json5, and enable the new code only if the flag is enabled.

    https://chromium.googlesource.com/chromium/src/+/main/docs/flag_guarding_guidelines.md

    Navoda Munasinha

    Done. Added TargetRangesForBackwardDeletionUnit to runtime_enabled_features.json5 with status: "stable" and gated the new code on it, so it's enabled by default and acts as a kill switch.

    Commit Message
    Line 10, Patchset 2:cluster behind the caret, while Backspace deletes only a part of it.
    Kent Tamura . resolved

    nit: Remove the tailing whitespace.

    Navoda Munasinha

    Done.

    Line 14, Patchset 2:Move the narrowing that TypingCommand already does into
    editing_utilities as NarrowSelectionToBackwardDeletionUnit() and
    Kent Tamura . resolved

    nit: Remove the tailing whitespaces.

    Navoda Munasinha

    Done.

    File third_party/blink/renderer/core/editing/commands/editing_command_test.cc
    Line 172, Patchset 2: Editor& editor = GetDocument().GetFrame()->GetEditor();
    Kent Tamura . resolved

    nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

    Navoda Munasinha

    Done.

    Line 196, Patchset 2: Editor& editor = GetDocument().GetFrame()->GetEditor();
    Kent Tamura . resolved

    nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

    Navoda Munasinha

    Done.

    Line 220, Patchset 2: Editor& editor = GetDocument().GetFrame()->GetEditor();
    Kent Tamura . resolved

    nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

    Navoda Munasinha

    Done.

    Line 244, Patchset 2: Editor& editor = GetDocument().GetFrame()->GetEditor();
    Kent Tamura . resolved

    nit: `GetDocument().GetFrame()->` ➜ `GetFrame().`

    Navoda Munasinha

    Done.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • David Baron
    • Kent Tamura
    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: I64cca87d84abb3e40fc618ebe6db38672f42784a
      Gerrit-Change-Number: 8192494
      Gerrit-PatchSet: 5
      Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
      Gerrit-Reviewer: David Baron <dba...@chromium.org>
      Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
      Gerrit-Attention: Kent Tamura <tk...@chromium.org>
      Gerrit-Attention: David Baron <dba...@chromium.org>
      Gerrit-Comment-Date: Tue, 04 Aug 2026 10:35:20 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Kent Tamura <tk...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kent Tamura (Gerrit)

      unread,
      Aug 4, 2026, 8:40:53 PM (5 days ago) Aug 4
      to Navoda Munasinha, android-bu...@system.gserviceaccount.com, Kent Tamura, David Baron, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
      Attention needed from David Baron and Navoda Munasinha

      Kent Tamura added 1 comment

      File third_party/blink/renderer/core/editing/commands/typing_command.cc
      Line 922, Patchset 5 (Latest): const SelectionInDomTree& adjusted =
      Kent Tamura . unresolved

      Should we add a check for `RuntimeEnabledFeatures::TargetRangesForBackwardDeletionUnitEnabled()`?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • David Baron
      • Navoda Munasinha
      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: I64cca87d84abb3e40fc618ebe6db38672f42784a
        Gerrit-Change-Number: 8192494
        Gerrit-PatchSet: 5
        Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
        Gerrit-Reviewer: David Baron <dba...@chromium.org>
        Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
        Gerrit-Attention: Navoda Munasinha <navoda.m...@codimite.com>
        Gerrit-Attention: David Baron <dba...@chromium.org>
        Gerrit-Comment-Date: Wed, 05 Aug 2026 00:40:14 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Navoda Munasinha (Gerrit)

        unread,
        Aug 4, 2026, 11:05:55 PM (5 days ago) Aug 4
        to android-bu...@system.gserviceaccount.com, Kent Tamura, David Baron, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
        Attention needed from David Baron and Kent Tamura

        Navoda Munasinha added 1 comment

        File third_party/blink/renderer/core/editing/commands/typing_command.cc
        Line 922, Patchset 5 (Latest): const SelectionInDomTree& adjusted =
        Kent Tamura . resolved

        Should we add a check for `RuntimeEnabledFeatures::TargetRangesForBackwardDeletionUnitEnabled()`?

        Navoda Munasinha

        Not here. this call isn't new behavior. The same narrowing was already inline in this function (PreviousPositionOf(end, kBackwardDeletion)); the CL just moves it into the shared helper, so deletion is unchanged either way.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • David Baron
        • Kent Tamura
        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: I64cca87d84abb3e40fc618ebe6db38672f42784a
          Gerrit-Change-Number: 8192494
          Gerrit-PatchSet: 5
          Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
          Gerrit-Reviewer: David Baron <dba...@chromium.org>
          Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
          Gerrit-Attention: Kent Tamura <tk...@chromium.org>
          Gerrit-Attention: David Baron <dba...@chromium.org>
          Gerrit-Comment-Date: Wed, 05 Aug 2026 03:05:31 +0000
          Gerrit-HasComments: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kent Tamura (Gerrit)

          unread,
          Aug 5, 2026, 12:33:51 AM (5 days ago) Aug 5
          to Navoda Munasinha, Kent Tamura, android-bu...@system.gserviceaccount.com, David Baron, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
          Attention needed from David Baron and Navoda Munasinha

          Kent Tamura voted and added 1 comment

          Votes added by Kent Tamura

          Code-Review+1

          1 comment

          File third_party/blink/renderer/core/editing/commands/typing_command.cc
          Line 922, Patchset 5 (Latest): const SelectionInDomTree& adjusted =
          Kent Tamura . resolved

          Should we add a check for `RuntimeEnabledFeatures::TargetRangesForBackwardDeletionUnitEnabled()`?

          Navoda Munasinha

          Not here. this call isn't new behavior. The same narrowing was already inline in this function (PreviousPositionOf(end, kBackwardDeletion)); the CL just moves it into the shared helper, so deletion is unchanged either way.

          Kent Tamura

          Ack.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Baron
          • Navoda Munasinha
          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: I64cca87d84abb3e40fc618ebe6db38672f42784a
          Gerrit-Change-Number: 8192494
          Gerrit-PatchSet: 5
          Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
          Gerrit-Reviewer: David Baron <dba...@chromium.org>
          Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
          Gerrit-Attention: Navoda Munasinha <navoda.m...@codimite.com>
          Gerrit-Attention: David Baron <dba...@chromium.org>
          Gerrit-Comment-Date: Wed, 05 Aug 2026 04:33:31 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Navoda Munasinha <navoda.m...@codimite.com>
          Comment-In-Reply-To: Kent Tamura <tk...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          David Baron (Gerrit)

          unread,
          Aug 7, 2026, 10:15:16 PM (2 days ago) Aug 7
          to Navoda Munasinha, Kent Tamura, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, David Baron
          Attention needed from Joey Arhar and Navoda Munasinha

          David Baron added 1 comment

          Patchset-level comments
          File-level comment, Patchset 5 (Latest):
          David Baron . resolved

          sorry for not getting to this this week; transferring the request so hopefully it can happen early next week

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Joey Arhar
          • Navoda Munasinha
          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: I64cca87d84abb3e40fc618ebe6db38672f42784a
          Gerrit-Change-Number: 8192494
          Gerrit-PatchSet: 5
          Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
          Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
          Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
          Gerrit-Attention: Navoda Munasinha <navoda.m...@codimite.com>
          Gerrit-Attention: Joey Arhar <jar...@chromium.org>
          Gerrit-Comment-Date: Sat, 08 Aug 2026 02:15:02 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Navoda Munasinha (Gerrit)

          unread,
          6:57 PM (1 hour ago) 6:57 PM
          to Kent Tamura, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org
          Attention needed from Joey Arhar

          Navoda Munasinha added 1 comment

          Patchset-level comments
          Navoda Munasinha . resolved

          Thanks David, and no worries at all. enjoy your time off.

          Joey, whenever you have a chance, could you please take a look at patch set 5? Thank you!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Joey Arhar
          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: I64cca87d84abb3e40fc618ebe6db38672f42784a
          Gerrit-Change-Number: 8192494
          Gerrit-PatchSet: 5
          Gerrit-Owner: Navoda Munasinha <navoda.m...@codimite.com>
          Gerrit-Reviewer: Joey Arhar <jar...@chromium.org>
          Gerrit-Reviewer: Kent Tamura <tk...@chromium.org>
          Gerrit-Attention: Joey Arhar <jar...@chromium.org>
          Gerrit-Comment-Date: Sun, 09 Aug 2026 22:56:36 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages