Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[cr134][WIP] Fix TabDragController tab dragging calculation" #27909

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Mar 3, 2025

This reverts commit 4d6e57f.

Revert reason: This change was added for handling https://chromium-review.googlesource.com/c/chromium/src/+/6160815 but it's reverted by https://chromium-review.googlesource.com/c/chromium/src/+/6234751

By reverting this, we could avoid invalid non_client_view() access that causes brave/brave-browser#44362.
Also can get proper dragged tab under cursor that fixes brave/brave-browser#44282

fix brave/brave-browser#44362
fix brave/brave-browser#44282

Resolves

Submitter Checklist:

  • I confirm that no security/privacy review is needed and no other type of reviews are needed, or that I have requested them
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Squashed any review feedback or "fixup" commits before merge, so that history is a record of what happened in the repo, not your PR
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally:
    • npm run test -- brave_browser_tests, npm run test -- brave_unit_tests wiki
    • npm run presubmit wiki, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

See the linked issue.

@simonhong simonhong marked this pull request as ready for review March 3, 2025 06:08
@simonhong simonhong requested a review from a team as a code owner March 3, 2025 06:08
@simonhong simonhong merged commit 7d2d649 into master Mar 3, 2025
19 checks passed
@simonhong simonhong deleted the fix_tab_detaching_crash_vertical_tabs branch March 3, 2025 11:25
@github-actions github-actions bot added this to the 1.78.x - Nightly milestone Mar 3, 2025
brave-builds added a commit that referenced this pull request Mar 3, 2025
brave-builds added a commit that referenced this pull request Mar 3, 2025
@brave-builds
Copy link
Collaborator

Released in v1.78.11

@cdesouza-chromium
Copy link
Collaborator

This change has broken cr135 as a lot of the functions being overridden don't exist anymore. https://chromium-review.googlesource.com/c/chromium/src/+/6160815

@bsclifton
Copy link
Member

bsclifton commented Mar 3, 2025

@cdesouza-chromium was the original change (https://chromium-review.googlesource.com/c/chromium/src/+/6160815) relanded upstream after being reverted in https://chromium-review.googlesource.com/c/chromium/src/+/6234751? If 135 already had a reland (and doesn't have the issue), this PR and SHA can probably be reverted from the cr135 branch

@LaurenWags
Copy link
Member

LaurenWags commented Mar 3, 2025

Verified with

Brave | 1.78.11 Chromium: 134.0.6998.39 (Official Build) nightly (arm64)
-- | --
Revision | 8fd4caafca95b2f6ba91d1896df3a0c425cf8342
OS | macOS Version 15.4 (Build 24E5206s)

Case 1 - brave/brave-browser#44362

Screen.Recording.2025-03-03.at.4.20.44.PM.mov

Case 2 - brave/brave-browser#44282

Using 1.76.71 reproduced the mis-positioned mouse cursor:

Screen.Recording.2025-03-03.at.4.27.20.PM.mov

Using 1.78.11 saw that the mouse cursor is positioned properly (note, in certain cases you will encounter brave/brave-browser#44032):

Screen.Recording.2025-03-03.at.4.29.38.PM.mov

simonhong added a commit that referenced this pull request Mar 7, 2025
fix brave/brave-browser#44393

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909
simonhong added a commit that referenced this pull request Mar 10, 2025
fix brave/brave-browser#44393

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909
simonhong added a commit that referenced this pull request Mar 11, 2025
fix brave/brave-browser#44393

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909
simonhong added a commit that referenced this pull request Mar 11, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
simonhong added a commit that referenced this pull request Mar 11, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 11, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 12, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 12, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 12, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 13, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 14, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 17, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
mkarolin pushed a commit that referenced this pull request Mar 17, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
mkarolin pushed a commit that referenced this pull request Mar 18, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
cdesouza-chromium pushed a commit that referenced this pull request Mar 18, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
mkarolin pushed a commit that referenced this pull request Mar 19, 2025
fix brave/brave-browser#44393

This is f/u fix as #27909
is reverted in cr135.

We adjusted window offset while dragging in vertical tab mode
because TabDragController refers widget from TabDraggingContext but
that widget is vertical tab widget not browser window widget.
However, upstream refactored TabDragController so we need to adjust
based on latest code again.

Upstream changes - https://chromium-review.googlesource.com/c/chromium/src/+/6160815
Our previous offset adjust - #27909

Enabled tab detach browser test again(VerticalTabStripDragAndDropBrowserTest.DragTabToDetach)
to check mouse cursor is located over the dragged tab properly during
the dragging. But not sure it works well on CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants