summaryrefslogtreecommitdiffstats
path: root/ui/gfx/platform_font_pango.cc
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-01 04:42:17 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-01 04:42:17 +0000
commitccfa43f042db868f6584f9cceef94ca7c4ddf239 (patch)
treef3f3980981147928cae30754448f88d45527d2d0 /ui/gfx/platform_font_pango.cc
parent8c49a50da6675ed9329b01a1e960c78e42d4ba82 (diff)
downloadchromium_src-ccfa43f042db868f6584f9cceef94ca7c4ddf239.zip
chromium_src-ccfa43f042db868f6584f9cceef94ca7c4ddf239.tar.gz
chromium_src-ccfa43f042db868f6584f9cceef94ca7c4ddf239.tar.bz2
Replace StyleRange with BreakList; update RenderText, etc.
This is a functional rewrite with no observable behavior/appearance changes. (it helps by merging adjacent equivalent styles, reducing artificial run breaks) (it helps disambiguate font/adornment styles for application in layout/drawing) Remove gfx::StyleRange and its use within gfx::RenderText[Win|Linux|Mac]. Add new BreakList class for managing [ranged] colors and styles; add/update tests. Add gfx::TextStyle enum for bold, italic, underline, strike, and diagonal strike. Split ApplyStyleRange into [Set|Apply]Color and [Set|Apply]Style. Split ApplyDefaultStyle and |default_style_| into the first colors_ and styles_. Split up SkiaTextRenderer::DrawDecorations for Underline/Strike/DiagonalStrike. Update ApplyCompositionAndSelectionStyles, add UndoCompositionAndSelectionStyles. Add temporary StyleIterator convenience class for RenderText subclass style iteration. Update RenderText[Win|Linux|Mac], Textfield classes, and other users. Simplify OmniboxResultView (nix bold font, and ClassificationData). Rename gfx::Font::FontStyle::UNDERLINE (was UNDERLINED); TODO(followup): Only break runs for bold/italic, color/adorn while drawing. TODO(followup): Support more custom/ranged colors; merge TextStyle/FontStyle? BUG=90426,164047,131660 TEST=No observable appearance/performance/behavior changes. R=asvitkine@chromium.org,pkasting@chromium.org,sky@chromium.org Review URL: https://chromiumcodereview.appspot.com/11535014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180067 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/platform_font_pango.cc')
-rw-r--r--ui/gfx/platform_font_pango.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/gfx/platform_font_pango.cc b/ui/gfx/platform_font_pango.cc
index 6bb580b..3d2b986 100644
--- a/ui/gfx/platform_font_pango.cc
+++ b/ui/gfx/platform_font_pango.cc
@@ -240,8 +240,8 @@ NativeFont PlatformFontPango::GetNativeFont() const {
case gfx::Font::ITALIC:
pango_font_description_set_style(pfd, PANGO_STYLE_ITALIC);
break;
- case gfx::Font::UNDERLINED:
- // TODO(deanm): How to do underlined? Where do we use it? Probably have
+ case gfx::Font::UNDERLINE:
+ // TODO(deanm): How to do underline? Where do we use it? Probably have
// to paint it ourselves, see pango_font_metrics_get_underline_position.
break;
}