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

Unified Diff: chrome/browser/ui/cocoa/history_overlay_controller.mm

Issue 10913066: [Mac] Do not leave artifacts when using history navigation gestures. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: U can haz a test Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/history_overlay_controller.mm
diff --git a/chrome/browser/ui/cocoa/history_overlay_controller.mm b/chrome/browser/ui/cocoa/history_overlay_controller.mm
index 4cf44a07578f7784beb0bebcbfe1362e0351f8fb..35e972ac1009c110013077038bdb2cf89cc834a2 100644
--- a/chrome/browser/ui/cocoa/history_overlay_controller.mm
+++ b/chrome/browser/ui/cocoa/history_overlay_controller.mm
@@ -92,6 +92,11 @@ const CGFloat kGestureCompleteProgress = 0.3;
return self;
}
+- (void)dealloc {
+ [self.view removeFromSuperview];
+ [super dealloc];
+}
+
- (void)loadView {
const gfx::Image& image =
ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
@@ -164,7 +169,9 @@ const CGFloat kGestureCompleteProgress = 0.3;
}
- (void)animationDidStop:(CAAnimation*)theAnimation finished:(BOOL)finished {
- [self.view removeFromSuperview];
+ // Destroy the CAAnimation and its strong reference to its delegate (this
+ // class).
+ [self.view setAnimations:nil];
}
@end

Powered by Google App Engine
This is Rietveld 408576698