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

Unified Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_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/location_bar/autocomplete_text_field_cell.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
index 8ee242e323b85ba5d8459730c45a8a173a6fd557..ab6b9d80741f5374ba5f545a658126de7438de4f 100644
--- a/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
+++ b/chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.mm
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/mac/foundation_util.h"
#include "base/mac/mac_logging.h"
+#include "chrome/browser/search/search.h"
#import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h"
#import "chrome/browser/ui/cocoa/location_bar/button_decoration.h"
#import "chrome/browser/ui/cocoa/location_bar/location_bar_decoration.h"
@@ -21,6 +22,8 @@ namespace {
const CGFloat kBaselineAdjust = 3.0;
+const CGFloat kBaselineAdjustInstantExtended = 2.5;
+
// Matches the clipping radius of |GradientButtonCell|.
const CGFloat kCornerRadius = 3.0;
@@ -217,6 +220,8 @@ size_t CalculatePositionsInFrame(
@implementation AutocompleteTextFieldCell
- (CGFloat)baselineAdjust {
+ if (chrome::IsInstantExtendedAPIEnabled())
+ return kBaselineAdjustInstantExtended;
Scott Hess - ex-Googler 2013/05/22 19:56:37 No, this shouldn't be here. Your example images c
sail 2013/05/22 20:23:55 -baselineAdjust isn't used to adjust the baseline.
Scott Hess - ex-Googler 2013/05/22 21:02:36 That seems like a good idea, then.
return kBaselineAdjust;
}

Powered by Google App Engine
This is Rietveld 408576698