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

Unified Diff: chrome/browser/ui/cocoa/styled_text_field_cell.mm

Issue 15553008: Instant Extended: Reduce clipping in omnibox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/ui/cocoa/styled_text_field_cell.mm
diff --git a/chrome/browser/ui/cocoa/styled_text_field_cell.mm b/chrome/browser/ui/cocoa/styled_text_field_cell.mm
index 4cf3f707e81e61e3b938433e59896fab0b19da8c..c894ad5c132a74ca3f0d551bb38f8af5b023a72a 100644
--- a/chrome/browser/ui/cocoa/styled_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/styled_text_field_cell.mm
@@ -35,13 +35,13 @@
// Returns the same value as textCursorFrameForFrame, but does not call it
// directly to avoid potential infinite loops.
- (NSRect)textFrameForFrame:(NSRect)cellFrame {
- return NSInsetRect(cellFrame, 0, [self baselineAdjust]);
+ return NSIntegralRect(NSInsetRect(cellFrame, 0, [self baselineAdjust]));
Scott Hess - ex-Googler 2013/05/22 19:56:37 Does this imply that cellFrame has fractional bits
sail 2013/05/22 20:23:55 Yes, this will be fractional since it's being inse
Scott Hess - ex-Googler 2013/05/22 21:02:36 The NSIntegralRect() means that this will be pushe
}
// Returns the same value as textFrameForFrame, but does not call it directly to
// avoid potential infinite loops.
- (NSRect)textCursorFrameForFrame:(NSRect)cellFrame {
- return NSInsetRect(cellFrame, 0, [self baselineAdjust]);
+ return NSIntegralRect(NSInsetRect(cellFrame, 0, [self baselineAdjust]));
}
// Override to show the I-beam cursor only in the area given by

Powered by Google App Engine
This is Rietveld 408576698