Index: chrome/browser/autocomplete/autocomplete_edit_view_win.cc |
=================================================================== |
--- chrome/browser/autocomplete/autocomplete_edit_view_win.cc (revision 55911) |
+++ chrome/browser/autocomplete/autocomplete_edit_view_win.cc (working copy) |
@@ -429,7 +429,7 @@ |
Create(hwnd, 0, 0, 0, l10n_util::GetExtendedStyles()); |
SetReadOnly(popup_window_mode_); |
- SetFont(font_.hfont()); |
+ SetFont(font_.GetNativeFont()); |
// NOTE: Do not use SetWordBreakProcEx() here, that is no longer supported as |
// of Rich Edit 2.0 onward. |
@@ -438,7 +438,7 @@ |
// Get the metrics for the font. |
HDC dc = ::GetDC(NULL); |
- SelectObject(dc, font_.hfont()); |
+ SelectObject(dc, font_.GetNativeFont()); |
TEXTMETRIC tm = {0}; |
GetTextMetrics(dc, &tm); |
const float kXHeightRatio = 0.7f; // The ratio of a font's x-height to its |
@@ -446,12 +446,12 @@ |
// provide a true value for a font's |
// x-height in its text metrics, so we |
// approximate. |
- font_x_height_ = static_cast<int>((static_cast<float>(font_.baseline() - |
+ font_x_height_ = static_cast<int>((static_cast<float>(font_.GetBaseline() - |
tm.tmInternalLeading) * kXHeightRatio) + 0.5); |
// The distance from the top of the field to the desired baseline of the |
// rendered text. |
const int kTextBaseline = popup_window_mode_ ? 15 : 18; |
- font_y_adjustment_ = kTextBaseline - font_.baseline(); |
+ font_y_adjustment_ = kTextBaseline - font_.GetBaseline(); |
// Get the number of twips per pixel, which we need below to offset our text |
// by the desired number of pixels. |
@@ -2149,10 +2149,10 @@ |
const int kAdditionalSpaceOutsideFont = |
static_cast<int>(ceil(kStrokeWidthPixels * 1.5f)); |
const CRect scheme_rect(PosFromChar(insecure_scheme_component_.begin).x, |
- font_top + font_.baseline() - font_x_height_ - |
+ font_top + font_.GetBaseline() - font_x_height_ - |
kAdditionalSpaceOutsideFont, |
PosFromChar(insecure_scheme_component_.end()).x, |
- font_top + font_.baseline() + |
+ font_top + font_.GetBaseline() + |
kAdditionalSpaceOutsideFont); |
// Clip to the portion we care about and translate to canvas coordinates |
@@ -2233,7 +2233,7 @@ |
const CRect highlight_rect(highlight_x, |
highlight_y, |
highlight_x + 1, |
- highlight_y + font_.height()); |
+ highlight_y + font_.GetHeight()); |
// Clip the highlight to the region being painted. |
CRect clip_rect; |
@@ -2430,7 +2430,7 @@ |
if ((position != -1) && (position <= GetTextLength())) { |
const POINT min_loc(PosFromChar(position)); |
const RECT highlight_bounds = {min_loc.x - 1, font_y_adjustment_, |
- min_loc.x + 2, font_.height() + font_y_adjustment_}; |
+ min_loc.x + 2, font_.GetHeight() + font_y_adjustment_}; |
InvalidateRect(&highlight_bounds, false); |
} |
} |