Skip to content

Commit

Permalink
Revert "Use drag icon proxy for item drop animation in apps grid view"
Browse files Browse the repository at this point in the history
This reverts commit 87f6c92.

Reason for revert: Suspect for causing failures in tests
https://ci.chromium.org/ui/p/chromium/builders/ci/Linux%20Chromium%20OS%20ASan%20LSan%20Tests%20(1)/40448/test-results

Original change's description:
> Use drag icon proxy for item drop animation in apps grid view
>
> Make AppsGridView use AppDragIconProxy widget for the icon drop
> animation, and keep drag view hidden until the drag icon proxy animation
> ends. This simplifies the animation flow, as the same animation is used
> for dropping the drag icon into a folder vs. into the apps grid, but
> with different target bounds (previously reorder was performed using
> bounds animation, while folder drop was using special
> TopIconAnimationView).
> Also, this avoids hacks where the drag icon view's title had to be
> hidden during the drop animation, and makes AppsGridView drag code less
> reliant on hidden drag view's bounds matching the drag icon (avoiding a
> hack where drag icon bounds had to be manually adjusted for cardified
> state change before running the final bounds animation).
>
> BUG=1234002
>
> Change-Id: I67ceb5f35b60e6d8204e8cf54cd9ba03c1e00519
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3057396
> Reviewed-by: James Cook <jamescook@chromium.org>
> Commit-Queue: Toni Baržić <tbarzic@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#906465}

Bug: 1234002
Change-Id: I7e6c7ed8d35f42918386a5833d09bfe098d97b69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3059649
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#906688}
  • Loading branch information
mohamedamir authored and Chromium LUCI CQ committed Jul 29, 2021
1 parent 2cef593 commit eeb0aab
Show file tree
Hide file tree
Showing 7 changed files with 225 additions and 267 deletions.
10 changes: 6 additions & 4 deletions ash/app_list/views/app_list_folder_view.cc
Expand Up @@ -743,11 +743,9 @@ void AppListFolderView::DispatchDragEventForReparent(

void AppListFolderView::DispatchEndDragEventForReparent(
bool events_forwarded_to_drag_drop_host,
bool cancel_drag,
std::unique_ptr<AppDragIconProxy> drag_icon_proxy) {
bool cancel_drag) {
container_view_->apps_grid_view()->EndDragFromReparentItemInRootLevel(
events_forwarded_to_drag_drop_host, cancel_drag,
std::move(drag_icon_proxy));
events_forwarded_to_drag_drop_host, cancel_drag);
container_view_->ReparentDragEnded();

// The view was not hidden in order to keeping receiving mouse events. Hide it
Expand Down Expand Up @@ -795,6 +793,10 @@ bool AppListFolderView::IsOEMFolder() const {
return folder_item_->folder_type() == AppListFolderItem::FOLDER_TYPE_OEM;
}

void AppListFolderView::SetRootLevelDragViewVisible(bool visible) {
container_view_->apps_grid_view()->SetDragViewVisible(visible);
}

void AppListFolderView::HandleKeyboardReparent(AppListItemView* reparented_view,
ui::KeyboardCode key_code) {
container_view_->ReparentFolderItemTransit(folder_item_);
Expand Down
7 changes: 3 additions & 4 deletions ash/app_list/views/app_list_folder_view.h
Expand Up @@ -135,12 +135,11 @@ class ASH_EXPORT AppListFolderView : public views::View,
void DispatchDragEventForReparent(
AppsGridView::Pointer pointer,
const gfx::Point& drag_point_in_folder_grid) override;
void DispatchEndDragEventForReparent(
bool events_forwarded_to_drag_drop_host,
bool cancel_drag,
std::unique_ptr<AppDragIconProxy> drag_icon_proxy) override;
void DispatchEndDragEventForReparent(bool events_forwarded_to_drag_drop_host,
bool cancel_drag) override;
bool IsViewOutsideOfFolder(AppListItemView* view) override;
bool IsOEMFolder() const override;
void SetRootLevelDragViewVisible(bool visible) override;
void HandleKeyboardReparent(AppListItemView* reparented_view,
ui::KeyboardCode key_code) override;
void UpdateFolderBounds() override;
Expand Down

0 comments on commit eeb0aab

Please sign in to comment.