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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 2423193002: [Mac] Fix Animation Issue With the Security State Decoration (Closed)
Patch Set: Change default value Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index 7e690e9a1e2321daf6a94a1d8cd3b928410c3030..ded3cb3ddadf93bce3220dfe5156918951888abe 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -122,7 +122,7 @@ LocationBarViewMac::LocationBarViewMac(AutocompleteTextField* field,
browser_(browser),
location_bar_visible_(true),
should_show_secure_verbose_(true),
- should_animate_security_verbose_(true),
+ should_animate_security_verbose_(false),
is_width_available_for_security_verbose_(false),
weak_ptr_factory_(this) {
ScopedVector<ContentSettingImageModel> models =
@@ -527,6 +527,9 @@ void LocationBarViewMac::Layout() {
}
}
+ if (!security_state_bubble_decoration_->IsVisible())
+ security_state_bubble_decoration_->ResetAnimation();
+
// These need to change anytime the layout changes.
// TODO(shess): Anytime the field editor might have changed, the
// cursor rects almost certainly should have changed. The tooltips
@@ -881,7 +884,7 @@ void LocationBarViewMac::UpdateSecurityState(bool tab_changed) {
// animate the decoration if animation is enabled and the state changed is
// not from a tab switch.
if (is_width_available_for_security_verbose_) {
- if (security_state_bubble_decoration_->HasAnimatedOut())
+ if (!tab_changed && security_state_bubble_decoration_->HasAnimatedOut())
security_state_bubble_decoration_->AnimateIn(false);
else if (!should_animate_security_verbose_ || tab_changed)
security_state_bubble_decoration_->ShowWithoutAnimation();
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/location_bar/security_state_bubble_decoration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698