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

Issue 107343008: mac: Fix a history swiper bug where the shield wouldn't disappear. (Closed)

Created:
6 years, 12 months ago by erikchen
Modified:
6 years, 11 months ago
Reviewers:
Robert Sesek, cmp, Nico
CC:
chromium-reviews, sail
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

mac: Fix a history swiper bug where the shield wouldn't disappear. There were 3 separate problems. 1. Retain bug :( 2. historyOverlay was removing the view from the superview during dealloc, which is atypical. If the view didn't exist, historyOverlay was actually creating the view, and sending a callback to the delegate. 3. We were not specifying an NSAnimationContext grouping/duration, which non-deterministically would use a 0-duration animation, which actually prevented the animation and callback from triggering. As a result, the shield would never disappear. On a side note: unit_tests did not work when run with --gtest-filter=HistoryOverlay* because we did not specify an NSAnimationContext with a non-zero duration. 0-duration animation contexts cause animations to not fire, which meant that the delegate callback never went through. BUG=330312 TEST=manual Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=242911

Patch Set 1 #

Total comments: 4

Patch Set 2 : fix unit tests #

Patch Set 3 : combine unit tests #

Patch Set 4 : Add a missing animation context to history overlay dismissal. #

Patch Set 5 : Rebase against top of tree. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -22 lines) Patch
M chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/history_overlay_controller.mm View 1 2 3 3 chunks +6 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm View 1 2 3 chunks +6 lines, -14 lines 0 comments Download

Messages

Total messages: 28 (0 generated)
erikchen
Please take a look. I haven't confirmed that this fixes the problem, but it seems ...
6 years, 12 months ago (2013-12-27 23:29:13 UTC) #1
Nico
https://codereview.chromium.org/107343008/diff/1/chrome/browser/ui/cocoa/history_overlay_controller.mm File chrome/browser/ui/cocoa/history_overlay_controller.mm (left): https://codereview.chromium.org/107343008/diff/1/chrome/browser/ui/cocoa/history_overlay_controller.mm#oldcode97 chrome/browser/ui/cocoa/history_overlay_controller.mm:97: } This was added in https://chromiumcodereview.appspot.com/10913066 / https://chromiumcodereview.appspot.com/16632009 . ...
6 years, 12 months ago (2013-12-27 23:56:13 UTC) #2
Nico
https://codereview.chromium.org/107343008/diff/1/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm File chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm (left): https://codereview.chromium.org/107343008/diff/1/chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm#oldcode249 chrome/browser/renderer_host/chrome_render_widget_host_view_mac_history_swiper.mm:249: historyOverlay_ = [historyOverlay retain]; I guess this path isn't ...
6 years, 12 months ago (2013-12-28 00:08:30 UTC) #3
erikchen
PTAL question: When I run the unit tests locally, with my changes reverted, 'DismissClearsAnimations' hangs. ...
6 years, 11 months ago (2013-12-30 19:20:33 UTC) #4
Robert Sesek
On 2013/12/30 19:20:33, erikchen1 wrote: > PTAL > > question: When I run the unit ...
6 years, 11 months ago (2013-12-30 19:23:27 UTC) #5
erikchen
On 2013/12/30 19:23:27, rsesek wrote: > On 2013/12/30 19:20:33, erikchen1 wrote: > > PTAL > ...
6 years, 11 months ago (2013-12-30 20:11:49 UTC) #6
Robert Sesek
On 2013/12/30 20:11:49, erikchen1 wrote: > On 2013/12/30 19:23:27, rsesek wrote: > > On 2013/12/30 ...
6 years, 11 months ago (2013-12-30 21:05:46 UTC) #7
erikchen
On 2013/12/30 21:05:46, rsesek wrote: > On 2013/12/30 20:11:49, erikchen1 wrote: > > On 2013/12/30 ...
6 years, 11 months ago (2013-12-30 21:40:21 UTC) #8
Robert Sesek
On 2013/12/30 21:40:21, erikchen1 wrote: > On 2013/12/30 21:05:46, rsesek wrote: > > On 2013/12/30 ...
6 years, 11 months ago (2013-12-30 21:51:32 UTC) #9
erikchen
On 2013/12/30 21:51:32, rsesek wrote: > On 2013/12/30 21:40:21, erikchen1 wrote: > > On 2013/12/30 ...
6 years, 11 months ago (2013-12-30 22:22:41 UTC) #10
Robert Sesek
On 2013/12/30 22:22:41, erikchen1 wrote: > On 2013/12/30 21:51:32, rsesek wrote: > > On 2013/12/30 ...
6 years, 11 months ago (2013-12-30 22:43:56 UTC) #11
erikchen
Found the problem - we were missing an animation context, so we were in fact ...
6 years, 11 months ago (2013-12-31 00:36:07 UTC) #12
erikchen
On 2013/12/31 00:36:07, erikchen1 wrote: > Found the problem - we were missing an animation ...
6 years, 11 months ago (2014-01-02 17:35:13 UTC) #13
Robert Sesek
LGTM
6 years, 11 months ago (2014-01-02 18:30:36 UTC) #14
Nico
On Thu, Jan 2, 2014 at 9:35 AM, <erikchen@chromium.org> wrote: > On 2013/12/31 00:36:07, erikchen1 ...
6 years, 11 months ago (2014-01-02 18:39:12 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/107343008/210001
6 years, 11 months ago (2014-01-02 19:29:57 UTC) #16
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=43078
6 years, 11 months ago (2014-01-02 19:45:48 UTC) #17
Nico
chrome/browser/renderer_host lgtm sorry, thought this was fully in c/b/ui/cocoa :-/
6 years, 11 months ago (2014-01-02 20:02:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/107343008/210001
6 years, 11 months ago (2014-01-02 20:03:17 UTC) #19
commit-bot: I haz the power
Retried try job too often on win for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number=137569
6 years, 11 months ago (2014-01-02 22:14:02 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/107343008/210001
6 years, 11 months ago (2014-01-02 22:25:52 UTC) #21
commit-bot: I haz the power
Retried try job too often on win for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number=137604
6 years, 11 months ago (2014-01-03 00:04:00 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/107343008/600001
6 years, 11 months ago (2014-01-03 00:15:28 UTC) #23
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) chromedriver2_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=209351
6 years, 11 months ago (2014-01-03 00:46:58 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/107343008/600001
6 years, 11 months ago (2014-01-03 16:51:08 UTC) #25
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) chromedriver2_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=209616
6 years, 11 months ago (2014-01-03 17:36:50 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/107343008/600001
6 years, 11 months ago (2014-01-03 18:46:07 UTC) #27
commit-bot: I haz the power
6 years, 11 months ago (2014-01-03 19:43:36 UTC) #28
Message was sent while issue was closed.
Change committed as 242911

Powered by Google App Engine
This is Rietveld 408576698