Fix: Avoid redundant draggable region updates. [chromium/src : main]

0 views
Skip to first unread message

AI Code Reviewer (Gerrit)

unread,
Dec 26, 2025, 4:08:08โ€ฏPMย (2 days ago)ย Dec 26
to Zoraiz Naeem, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org

AI Code Reviewer added 1 comment

File third_party/blink/renderer/core/exported/web_view_impl.cc
Line 4209, Patchset 1: std::vector<WebDraggableRegion> web_regions =
AI Code Reviewer . unresolved

Blink Style Guide: Prefer blink:: types over STL and base types. Please use WTF::Vector (or WebVector if matching the return type) instead of std::vector.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your ๐Ÿ™ feedback ๐Ÿ™ to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Open in Gerrit

Related details

Attention set is empty
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: Idc50a726951af4e9b06af36cec1f31a7003ea322
Gerrit-Change-Number: 7330565
Gerrit-PatchSet: 1
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-Comment-Date: Fri, 26 Dec 2025 21:08:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Dec 26, 2025, 4:09:31โ€ฏPMย (2 days ago)ย Dec 26
to Daniel Cheng, Achuith Bhandarkar, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org
Attention needed from Daniel Cheng

Zoraiz Naeem voted and added 1 comment

Votes added by Zoraiz Naeem

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Zoraiz Naeem . resolved

PTAL.

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
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: Idc50a726951af4e9b06af36cec1f31a7003ea322
Gerrit-Change-Number: 7330565
Gerrit-PatchSet: 3
Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Fri, 26 Dec 2025 21:09:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Zoraiz Naeem (Gerrit)

unread,
Dec 26, 2025, 4:20:19โ€ฏPMย (2 days ago)ย Dec 26
to Daniel Cheng, Achuith Bhandarkar, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org
Attention needed from Daniel Cheng

Zoraiz Naeem voted and added 1 comment

Votes added by Zoraiz Naeem

Commit-Queue+1

1 comment

File third_party/blink/renderer/core/exported/web_view_impl.cc
Line 4209, Patchset 1: std::vector<WebDraggableRegion> web_regions =
AI Code Reviewer . resolved

Blink Style Guide: Prefer blink:: types over STL and base types. Please use WTF::Vector (or WebVector if matching the return type) instead of std::vector.

To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **OK But Won't Fix**: reason | **Later**: b/<bug_id> | **Invalid:** reason


_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your ๐Ÿ™ feedback ๐Ÿ™ to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_

Zoraiz Naeem

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
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: Idc50a726951af4e9b06af36cec1f31a7003ea322
    Gerrit-Change-Number: 7330565
    Gerrit-PatchSet: 5
    Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
    Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Fri, 26 Dec 2025 21:20:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Daniel Cheng (Gerrit)

    unread,
    Dec 26, 2025, 5:10:28โ€ฏPMย (2 days ago)ย Dec 26
    to Zoraiz Naeem, Daniel Cheng, Khushal Sagar, Achuith Bhandarkar, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org
    Attention needed from Khushal Sagar and Zoraiz Naeem

    Daniel Cheng added 1 comment

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Daniel Cheng . unresolved

    It's not clear what problem this fixes or why the update was unexpected/redundant.

    Isn't it possible that the caller isn't supposed to be calling this function multiple times in a row if the state hasn't changed?

    Also, note that this area is not owned by anyone at Google anymoreโ€“and furthermore, changes have a high risk of randomly breaking things since a lot of the drag-and-drop paths are poorly understood. So at minimum, the CL description needs to be a lot clearer about what exactly is broken and what the fix is (so we can have some confidence that this isn't going to break something else that works fine today), and the CL itself needs to include some tests.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Khushal Sagar
    • Zoraiz Naeem
    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: Idc50a726951af4e9b06af36cec1f31a7003ea322
      Gerrit-Change-Number: 7330565
      Gerrit-PatchSet: 6
      Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-Attention: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Dec 2025 22:10:16 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Khushal Sagar (Gerrit)

      unread,
      Dec 26, 2025, 5:17:17โ€ฏPMย (2 days ago)ย Dec 26
      to Zoraiz Naeem, Daniel Cheng, Achuith Bhandarkar, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org
      Attention needed from Zoraiz Naeem

      Khushal Sagar voted and added 2 comments

      Votes added by Khushal Sagar

      Code-Review+1

      2 comments

      File third_party/blink/renderer/core/exported/web_view_impl.cc
      Line 4210, Patchset 6 (Latest): MainFrameImpl()->GetDocument().DraggableRegions();
      Khushal Sagar . unresolved

      nitty nit: `local_frame->GetDocument()`

      Took me a min to realize `local_frame` is the same as `MainFrameImpl()`. It reads odd because we update using `local_frame` below.

      Line 4211, Patchset 6 (Latest): if (web_regions.empty()) {
      Khushal Sagar . resolved

      Not for this patch since this pattern is with existing code, how does `HasDraggableRegions()` relate to this vector being empty? Is it possible for the bool to be true while the vector is empty? Seems like duplicate state.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Zoraiz Naeem
      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: Idc50a726951af4e9b06af36cec1f31a7003ea322
      Gerrit-Change-Number: 7330565
      Gerrit-PatchSet: 6
      Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-Attention: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Dec 2025 22:17:02 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Zoraiz Naeem (Gerrit)

      unread,
      Dec 26, 2025, 5:57:31โ€ฏPMย (2 days ago)ย Dec 26
      to Khushal Sagar, Daniel Cheng, Achuith Bhandarkar, AI Code Reviewer, Chromium LUCI CQ, chromium...@chromium.org, blink-...@chromium.org

      Zoraiz Naeem added 1 comment

      File third_party/blink/renderer/core/exported/web_view_impl.cc
      Line 4210, Patchset 6: MainFrameImpl()->GetDocument().DraggableRegions();
      Khushal Sagar . resolved

      nitty nit: `local_frame->GetDocument()`

      Took me a min to realize `local_frame` is the same as `MainFrameImpl()`. It reads odd because we update using `local_frame` below.

      Zoraiz Naeem

      Done

      Open in Gerrit

      Related details

      Attention set is empty
      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: Idc50a726951af4e9b06af36cec1f31a7003ea322
      Gerrit-Change-Number: 7330565
      Gerrit-PatchSet: 7
      Gerrit-Owner: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-Reviewer: Khushal Sagar <khusha...@chromium.org>
      Gerrit-Reviewer: Zoraiz Naeem <zorai...@chromium.org>
      Gerrit-CC: AI Code Reviewer <peep-gen...@system.gserviceaccount.com>
      Gerrit-CC: Achuith Bhandarkar <ach...@chromium.org>
      Gerrit-CC: Daniel Cheng <dch...@chromium.org>
      Gerrit-Comment-Date: Fri, 26 Dec 2025 22:57:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Khushal Sagar <khusha...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages