Index: ui/gfx/render_text.cc |
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
index 91f9f42bd89ad69dad47646e52c08516e9cad394..14bdcfa93cbe5194debc6e005416df6a77de0bf2 100644 |
--- a/ui/gfx/render_text.cc |
+++ b/ui/gfx/render_text.cc |
@@ -360,15 +360,15 @@ void RenderText::SetFontSize(int size) { |
SetFontList(font_list_.DeriveFontListWithSize(size)); |
} |
+const Font& RenderText::GetPrimaryFont() const { |
+ return font_list_.GetPrimaryFont(); |
+} |
+ |
void RenderText::SetCursorEnabled(bool cursor_enabled) { |
cursor_enabled_ = cursor_enabled; |
cached_bounds_and_offset_valid_ = false; |
} |
-const Font& RenderText::GetFont() const { |
- return font_list_.GetFonts()[0]; |
-} |
- |
void RenderText::ToggleInsertMode() { |
insert_mode_ = !insert_mode_; |
cached_bounds_and_offset_valid_ = false; |
@@ -873,7 +873,8 @@ void RenderText::ApplyFadeEffects(internal::SkiaTextRenderer* renderer) { |
if (text_width <= display_width) |
return; |
- int gradient_width = CalculateFadeGradientWidth(GetFont(), display_width); |
+ int gradient_width = CalculateFadeGradientWidth(GetPrimaryFont(), |
+ display_width); |
if (gradient_width == 0) |
return; |