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

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

Issue 2026063002: [Material][Mac]Fixed the popup blocker animation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
index b6c6b4f043baa5d22e23db926246346e73590a0e..a13c99a5e74abb79e7adcbbd3cf210b4db7952e0 100644
--- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
@@ -391,6 +391,12 @@ void ContentSettingDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
ImageDecoration::DrawInFrame(icon_rect, control_view);
}
+ NSRect remainder = frame;
+ remainder.origin.x = NSMaxX(icon_rect) + kTextMarginPadding;
+ remainder.size.width =
+ NSMaxX(background_rect) - NSMinX(remainder) - kLeftDividerPadding;
+ DrawAttributedString(animated_text_, remainder);
+
if (ui::MaterialDesignController::IsModeMaterial()) {
NSBezierPath* line = [NSBezierPath bezierPath];
[line setLineWidth:1];
@@ -403,11 +409,6 @@ void ContentSettingDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
[GetDividerColor(owner_->IsLocationBarDark()) set];
[line stroke];
}
-
- NSRect remainder = frame;
- remainder.origin.x = NSMaxX(icon_rect) + kTextMarginPadding;
- remainder.size.width = NSMaxX(background_rect) - NSMinX(remainder);
- DrawAttributedString(animated_text_, remainder);
} else {
// No animation, draw the image as normal.
ImageDecoration::DrawInFrame(frame, control_view);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698