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.
[email protected],[email protected],[email protected]

Review URL: https://chromiumcodereview.appspot.com/11535014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180067 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ui/gfx/text_constants.h b/ui/gfx/text_constants.h
index 3c644ab..4ac788e 100644
--- a/ui/gfx/text_constants.h
+++ b/ui/gfx/text_constants.h
@@ -40,6 +40,17 @@
   DIRECTIONALITY_FORCE_RTL,
 };
 
+// Text styles and adornments.
+// TODO(msw): Merge with gfx::Font::FontStyle.
+enum TextStyle {
+  BOLD = 0,
+  ITALIC,
+  STRIKE,
+  DIAGONAL_STRIKE,
+  UNDERLINE,
+  NUM_TEXT_STYLES,
+};
+
 }  // namespace gfx
 
 #endif  // UI_GFX_TEXT_CONSTANTS_H_