Commit d5f9416a authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Revert "Use attached browser CreateParams in CreateBrowserForDrag"

This reverts commit 5a45cc91.

Reason for revert: crbug.com/1015534 suspects performance regression.  It is hard to interpret the results in that bug, so I will revert and rerun perf analysis.  I suspect this change made no difference, and if that is confirmed, I will reland.

Original change's description:
> Use attached browser CreateParams in CreateBrowserForDrag
>
> Use the attached browser CreateParams rather than
> BrowserList GetLastActive.
>
> It feels safer that the attached browser will always
> be the one that we want whereas BrowserList GetLastActive
> may not be so reliable.
>
> Bug: 1012169
> Change-Id: Ifbbc13aa797db7942f5ce1d52decdac264c5d927
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1862875
> Commit-Queue: Joel Hockey <joelhockey@chromium.org>
> Commit-Queue: Peter Kasting <pkasting@chromium.org>
> Auto-Submit: Joel Hockey <joelhockey@chromium.org>
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#706220}

TBR=pkasting@chromium.org,joelhockey@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1015534
Bug: 1012169
Change-Id: Ief9fa8770467e12c14a3b86b6c004a0b6d2b62cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1882202Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709793}
parent 44f15333
...@@ -1951,10 +1951,7 @@ Browser* TabDragController::CreateBrowserForDrag( ...@@ -1951,10 +1951,7 @@ Browser* TabDragController::CreateBrowserForDrag(
*drag_offset = point_in_screen - new_bounds.origin(); *drag_offset = point_in_screen - new_bounds.origin();
Browser::CreateParams create_params = Browser::CreateParams create_params =
BrowserView::GetBrowserViewForNativeWindow( BrowserList::GetInstance()->GetLastActive()->create_params();
GetAttachedBrowserWidget()->GetNativeWindow())
->browser()
->create_params();
create_params.user_gesture = true; create_params.user_gesture = true;
create_params.in_tab_dragging = true; create_params.in_tab_dragging = true;
create_params.initial_bounds = new_bounds; create_params.initial_bounds = new_bounds;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment