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

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

Issue 2784103002: [Mac] Fix popup blocker animation's blurry end state. (Closed)
Patch Set: Fix nit. Created 3 years, 9 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 20ff012d4437c8918d9bb2a446e945b9a8e6b040..5c401ab91199c18e622572ea1744d7e4dba08406 100644
--- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
@@ -370,6 +370,9 @@ CGFloat ContentSettingDecoration::GetWidthForSpace(CGFloat width) {
void ContentSettingDecoration::DrawInFrame(NSRect frame, NSView* control_view) {
const BOOL is_rtl = cocoa_l10n_util::ShouldDoExperimentalRTLLayout();
if ([animation_ animationState] != kNoAnimation) {
+ // Align to integral points so that drawing isn't blurry.
+ frame.origin.x = std::floor(frame.origin.x);
+
NSRect background_rect = NSInsetRect(frame, 0.0, kBorderPadding);
// This code is almost identical to code that appears in BubbleDecoration.
// Unfortunately ContentSettingDecoration does not descend from
« 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