Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Issue 241983003: Stops animations when removing a window from its parent (Closed)

Created:
6 years, 8 months ago by varkha
Modified:
6 years, 8 months ago
CC:
chromium-reviews, sadrul, ben+aura_chromium.org, kalyank
Visibility:
Public.

Description

Stops animations when removing a window from its parent. This prevents overwriting target bounds when reparenting layers during animation. In snapped scenario we snap a window (with a call to WindowState::OnWMEvent in WorkspaceWindowResizer::CompleteDrag()) which starts animation and then immediately reparent it (back to workspace in DockedWindowResizer::MaybeReparentWindowOnDragCompletion). Stopping (completing) BOUNDS animation allows the child window to honor previously set target bounds and keep them when it gets reparented. BUG=364517, 366993 TEST=aura_unittests --gtest_filter=WindowTest.RootWindowSetWhenReparenting Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266115 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266451

Patch Set 1 : Uses GetTargetBounds() in place of bounds() when reparenting layers #

Total comments: 3

Patch Set 2 : Uses GetTargetBounds() in place of bounds() when reparenting layers (retargeting animations) #

Total comments: 2

Patch Set 3 : Uses GetTargetBounds() in place of bounds() when reparenting layers (retargeting animations) #

Patch Set 4 : Stops animations when removing a window from its parent #

Total comments: 2

Patch Set 5 : Stops animations when removing a window from its parent (comment) #

Total comments: 3

Patch Set 6 : Stops animations when removing a layer from its parent and fixes broken test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M ash/desktop_background/desktop_background_controller_unittest.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M ui/aura/window.cc View 1 2 3 4 5 1 chunk +0 lines, -4 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (0 generated)
varkha
pkotwicz@, what do you think about this approach? Do you think the old code was ...
6 years, 8 months ago (2014-04-18 04:07:29 UTC) #1
varkha
ping - let me know if you think this is a right approach.
6 years, 8 months ago (2014-04-22 15:39:56 UTC) #2
pkotwicz
Sorry for the delay. Your code sounds reasonable. However, I think I have gotten pushback ...
6 years, 8 months ago (2014-04-22 18:00:17 UTC) #3
varkha
Thanks, I have added a test as well. For now this CL includes the changes ...
6 years, 8 months ago (2014-04-22 18:45:50 UTC) #4
oshima
https://codereview.chromium.org/241983003/diff/30001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/30001/ui/aura/window.cc#newcode523 ui/aura/window.cc:523: offset += child->GetTargetBounds().OffsetFromOrigin(); Sorry if I'm misunderstanding something, but ...
6 years, 8 months ago (2014-04-22 20:47:11 UTC) #5
varkha
https://codereview.chromium.org/241983003/diff/30001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/30001/ui/aura/window.cc#newcode523 ui/aura/window.cc:523: offset += child->GetTargetBounds().OffsetFromOrigin(); On 2014/04/22 20:47:11, oshima wrote: > ...
6 years, 8 months ago (2014-04-22 20:59:04 UTC) #6
oshima
https://codereview.chromium.org/241983003/diff/30001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/30001/ui/aura/window.cc#newcode523 ui/aura/window.cc:523: offset += child->GetTargetBounds().OffsetFromOrigin(); On 2014/04/22 20:59:05, varkha wrote: > ...
6 years, 8 months ago (2014-04-22 22:57:11 UTC) #7
varkha
oshima@, can you please take another look (I will be sending this to sky@ as ...
6 years, 8 months ago (2014-04-23 00:42:53 UTC) #8
varkha
Hold on, still failing some tests.
6 years, 8 months ago (2014-04-23 00:46:08 UTC) #9
varkha
oshima@, can you please take a look again? I am effectively recalculating the animation target, ...
6 years, 8 months ago (2014-04-23 04:40:00 UTC) #10
oshima
https://codereview.chromium.org/241983003/diff/70001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/70001/ui/aura/window.cc#newcode510 ui/aura/window.cc:510: ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); I feels like animation should be canceled upon ...
6 years, 8 months ago (2014-04-23 16:34:43 UTC) #11
varkha
https://codereview.chromium.org/241983003/diff/70001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/70001/ui/aura/window.cc#newcode510 ui/aura/window.cc:510: ui::LayerAnimator::IMMEDIATELY_ANIMATE_TO_NEW_TARGET); On 2014/04/23 16:34:44, oshima wrote: > I feels ...
6 years, 8 months ago (2014-04-23 16:44:04 UTC) #12
oshima
On 2014/04/23 16:44:04, varkha wrote: > https://codereview.chromium.org/241983003/diff/70001/ui/aura/window.cc > File ui/aura/window.cc (right): > > https://codereview.chromium.org/241983003/diff/70001/ui/aura/window.cc#newcode510 > ...
6 years, 8 months ago (2014-04-24 00:38:24 UTC) #13
varkha
sky@, can you please look at this CL? I also have a feeling that having ...
6 years, 8 months ago (2014-04-24 00:59:40 UTC) #14
sky
It doesn't make sense to me that removing a view would make animating the bounds ...
6 years, 8 months ago (2014-04-24 03:19:47 UTC) #15
varkha
sky@, please take another look. This is indeed much simpler and accomplishes the same goal. ...
6 years, 8 months ago (2014-04-24 07:07:12 UTC) #16
sky
LGTM https://codereview.chromium.org/241983003/diff/110001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/110001/ui/aura/window.cc#newcode1018 ui/aura/window.cc:1018: if (child->layer() && child->layer()->GetAnimator()) Add a comment as ...
6 years, 8 months ago (2014-04-24 16:06:19 UTC) #17
varkha
https://codereview.chromium.org/241983003/diff/110001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/110001/ui/aura/window.cc#newcode1018 ui/aura/window.cc:1018: if (child->layer() && child->layer()->GetAnimator()) On 2014/04/24 16:06:19, sky wrote: ...
6 years, 8 months ago (2014-04-24 18:47:17 UTC) #18
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-24 18:47:24 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241983003/130001
6 years, 8 months ago (2014-04-24 21:51:24 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-24 22:59:00 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on linux_chromium_clang_dbg
6 years, 8 months ago (2014-04-24 22:59:01 UTC) #22
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-24 23:06:29 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241983003/130001
6 years, 8 months ago (2014-04-24 23:07:39 UTC) #24
commit-bot: I haz the power
Change committed as 266115
6 years, 8 months ago (2014-04-25 03:17:52 UTC) #25
Ben Goodger (Google)
https://codereview.chromium.org/241983003/diff/130001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/130001/ui/aura/window.cc#newcode1021 ui/aura/window.cc:1021: child->layer()->GetAnimator()->StopAnimating(); Is it possible to do this in the ...
6 years, 8 months ago (2014-04-25 03:28:00 UTC) #26
varkha
https://codereview.chromium.org/241983003/diff/130001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/130001/ui/aura/window.cc#newcode1021 ui/aura/window.cc:1021: child->layer()->GetAnimator()->StopAnimating(); On 2014/04/25 03:28:01, Ben Goodger (Google) wrote: > ...
6 years, 8 months ago (2014-04-25 04:41:45 UTC) #27
varkha
https://codereview.chromium.org/241983003/diff/130001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/241983003/diff/130001/ui/aura/window.cc#newcode1021 ui/aura/window.cc:1021: child->layer()->GetAnimator()->StopAnimating(); On 2014/04/25 03:28:01, Ben Goodger (Google) wrote: > ...
6 years, 8 months ago (2014-04-25 07:13:12 UTC) #28
Ben Goodger (Google)
lgtm!
6 years, 8 months ago (2014-04-25 15:52:50 UTC) #29
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-25 17:14:59 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241983003/190001
6 years, 8 months ago (2014-04-25 21:46:24 UTC) #31
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-25 23:11:14 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on win_chromium_rel
6 years, 8 months ago (2014-04-25 23:11:15 UTC) #33
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-25 23:12:09 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241983003/190001
6 years, 8 months ago (2014-04-25 23:14:40 UTC) #35
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-26 00:44:26 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.chromium on mac_chromium_rel
6 years, 8 months ago (2014-04-26 00:44:26 UTC) #37
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-26 01:33:49 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241983003/190001
6 years, 8 months ago (2014-04-26 02:00:02 UTC) #39
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 8 months ago (2014-04-26 08:45:52 UTC) #40
varkha
The CQ bit was checked by varkha@chromium.org
6 years, 8 months ago (2014-04-26 12:31:25 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/varkha@chromium.org/241983003/190001
6 years, 8 months ago (2014-04-26 12:31:44 UTC) #43
commit-bot: I haz the power
6 years, 8 months ago (2014-04-28 06:50:24 UTC) #44
Message was sent while issue was closed.
Change committed as 266451

Powered by Google App Engine
This is Rietveld 408576698