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

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

Issue 2790233002: [Mac] Fix jittery divider during omnibox's popup blocker animation. (Closed)
Patch Set: 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 5c401ab91199c18e622572ea1744d7e4dba08406..de4f957dfbfb65509fab082a6f9b535a6d1631ca 100644
--- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm
@@ -370,8 +370,8 @@ 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);
+ // Align to integral points so that drawing isn't blurry or jittery.
+ frame = NSIntegralRect(frame);
NSRect background_rect = NSInsetRect(frame, 0.0, kBorderPadding);
// This code is almost identical to code that appears in BubbleDecoration.
« 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