Commit b3bb3037 authored by Emily Stark's avatar Emily Stark Committed by Commit Bot

Mac: Do not animate HTTP_SHOW_WARNING to DANGEROUS transition

This transition (which is currently only possible with an experiment enabled)
can look messy/confusing when animated, so do not animate it.

Bug: 807075
Change-Id: I1dae69b64e0e9f457b87abf7c4ff45ba1f595dad
Reviewed-on: https://chromium-review.googlesource.com/891587Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Emily Stark <estark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533319}
parent 4ff66377
...@@ -656,6 +656,7 @@ void LocationBarViewMac::AnimatePageInfoIfPossible(bool tab_changed) { ...@@ -656,6 +656,7 @@ void LocationBarViewMac::AnimatePageInfoIfPossible(bool tab_changed) {
using SecurityLevel = security_state::SecurityLevel; using SecurityLevel = security_state::SecurityLevel;
SecurityLevel new_security_level = GetToolbarModel()->GetSecurityLevel(false); SecurityLevel new_security_level = GetToolbarModel()->GetSecurityLevel(false);
bool is_new_security_level = security_level_ != new_security_level; bool is_new_security_level = security_level_ != new_security_level;
SecurityLevel old_security_level = security_level_;
security_level_ = new_security_level; security_level_ = new_security_level;
if (tab_changed) if (tab_changed)
...@@ -669,6 +670,14 @@ void LocationBarViewMac::AnimatePageInfoIfPossible(bool tab_changed) { ...@@ -669,6 +670,14 @@ void LocationBarViewMac::AnimatePageInfoIfPossible(bool tab_changed) {
return; return;
} }
// Do not animate HTTP_SHOW_WARNING to DANGEROUS transitions because they look
// messy/confusing.
if (old_security_level == security_state::HTTP_SHOW_WARNING &&
security_level_ == security_state::DANGEROUS) {
page_info_decoration_->ShowWithoutAnimation();
return;
}
if (is_width_available_for_security_verbose_) { if (is_width_available_for_security_verbose_) {
if (!is_new_security_level && page_info_decoration_->HasAnimatedOut()) if (!is_new_security_level && page_info_decoration_->HasAnimatedOut())
page_info_decoration_->AnimateIn(false); page_info_decoration_->AnimateIn(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment