[StylusHandwriting] Add plumbing for handwriting tolerance. [chromium/src : main]

0 views
Skip to first unread message

Rahul Arakeri (Gerrit)

unread,
Oct 14, 2025, 2:44:33 PM (yesterday) Oct 14
to Robert Flack, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, James Su, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, dtapuska+...@chromium.org, dtapuska+ch...@chromium.org, ipc-securi...@chromium.org, jbauma...@chromium.org, jmedle...@chromium.org, keithle...@chromium.org, kinuko...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
Attention needed from Robert Flack

Rahul Arakeri added 1 comment

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Rahul Arakeri . resolved

PTAL at this CL.

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Flack
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: If331e1ab1b7a1d93f277221d8270a0b84a276d4e
Gerrit-Change-Number: 7029886
Gerrit-PatchSet: 6
Gerrit-Owner: Rahul Arakeri <ara...@microsoft.com>
Gerrit-Reviewer: Rahul Arakeri <ara...@microsoft.com>
Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
Gerrit-CC: James Su <su...@chromium.org>
Gerrit-Attention: Robert Flack <fla...@chromium.org>
Gerrit-Comment-Date: Tue, 14 Oct 2025 18:44:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Robert Flack (Gerrit)

unread,
11:28 AM (10 hours ago) 11:28 AM
to Rahul Arakeri, Jonathan Ross, Olga Gerchikov, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, James Su, alexmo...@chromium.org, blink-re...@chromium.org, blink-...@chromium.org, creis...@chromium.org, dtapuska+...@chromium.org, dtapuska+ch...@chromium.org, ipc-securi...@chromium.org, jbauma...@chromium.org, jmedle...@chromium.org, keithle...@chromium.org, kinuko...@chromium.org, navigation...@chromium.org, nona+...@chromium.org, shuche...@chromium.org, tranbaod...@chromium.org, yhanad...@chromium.org
Attention needed from Jonathan Ross and Rahul Arakeri

Robert Flack added 5 comments

File content/browser/renderer_host/input/stylus_handwriting_controller_win.cc
Line 142, Patchset 6 (Latest): handwriting_->GetHandwritingDistanceThreshold(&screen_size);
Robert Flack . unresolved

Where is this method documented? Could you add references for the internal interfaces used from https://source.chromium.org/chromium/chromium/src/+/main:content/browser/renderer_host/input/stylus_handwriting_controller_win.h;l=113 so that readers can find the relevant interfaces?

If the tolerance is based on the screen size, it seems like we should plumb the values through per screen.

Can the value be changed in the settings? If so, are there apis to detect this change?

File third_party/blink/public/mojom/input/input_handler.mojom
Line 69, Patchset 6 (Latest): int32 handwriting_radius;
Robert Flack . unresolved

This seems wasteful to pass the same number with every event. If I read the initialization code correctly, the handwriting radius rarely changes, and seems more like an OS setting to be plumbed through to the renderer.

File third_party/blink/renderer/core/input/pointer_event_manager.cc
Line 422, Patchset 6 (Latest): pointer_event.handwriting_radius > 0) {
Robert Flack . unresolved

Is it not possible for the system determined handwriting_radius to be 0? Why?

File third_party/blink/renderer/platform/widget/input/input_handler_proxy.cc
Line 1354, Patchset 6 (Latest): // greater. This ensures that touch action calculation stays conservative. For
Robert Flack . unresolved

I'm not sure I follow, why shouldn't we use the specified value instead of kStylusWritingHitTestRadius?

Line 1993, Patchset 6 (Latest): if (!handwriting_radius_.has_value() && mouse_event.handwriting_radius > 0) {
Robert Flack . unresolved

Your call to the windows api suggests that the radius varies by screen, however here it seems like you will use the value from whichever screen is interacted with first. This seems like a clear bug.

Open in Gerrit

Related details

Attention is currently required from:
  • Jonathan Ross
  • Rahul Arakeri
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: If331e1ab1b7a1d93f277221d8270a0b84a276d4e
    Gerrit-Change-Number: 7029886
    Gerrit-PatchSet: 6
    Gerrit-Owner: Rahul Arakeri <ara...@microsoft.com>
    Gerrit-Reviewer: Jonathan Ross <jon...@chromium.org>
    Gerrit-Reviewer: Rahul Arakeri <ara...@microsoft.com>
    Gerrit-Reviewer: Robert Flack <fla...@chromium.org>
    Gerrit-CC: James Su <su...@chromium.org>
    Gerrit-CC: Olga Gerchikov <gerc...@microsoft.com>
    Gerrit-Attention: Jonathan Ross <jon...@chromium.org>
    Gerrit-Attention: Rahul Arakeri <ara...@microsoft.com>
    Gerrit-Comment-Date: Wed, 15 Oct 2025 15:27:59 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages