Index: ui/gfx/render_text.cc |
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc |
index 19bb69b8bf0681f9b48a3e0792202777363a5aaa..429bc5f83f5aefba4768c5b37e2346baf0d923cc 100644 |
--- a/ui/gfx/render_text.cc |
+++ b/ui/gfx/render_text.cc |
@@ -672,52 +672,24 @@ void RenderText::SetCompositionRange(const Range& composition_range) { |
void RenderText::SetColor(SkColor value) { |
colors_.SetValue(value); |
- |
-#if defined(OS_WIN) |
- // TODO(msw): Windows applies colors and decorations in the layout process. |
- cached_bounds_and_offset_valid_ = false; |
- ResetLayout(); |
-#endif |
} |
void RenderText::ApplyColor(SkColor value, const Range& range) { |
colors_.ApplyValue(value, range); |
- |
-#if defined(OS_WIN) |
ckocagil
2014/08/30 01:26:15
This one shouldn't be needed after http://crrev.co
msw
2014/09/02 18:02:21
Acknowledged.
|
- // TODO(msw): Windows applies colors and decorations in the layout process. |
- cached_bounds_and_offset_valid_ = false; |
- ResetLayout(); |
-#endif |
} |
void RenderText::SetStyle(TextStyle style, bool value) { |
styles_[style].SetValue(value); |
- // Only invalidate the layout on font changes; not for colors or decorations. |
- bool invalidate = (style == BOLD) || (style == ITALIC); |
-#if defined(OS_WIN) |
- // TODO(msw): Windows applies colors and decorations in the layout process. |
- invalidate = true; |
-#endif |
- if (invalidate) { |
- cached_bounds_and_offset_valid_ = false; |
- ResetLayout(); |
- } |
+ cached_bounds_and_offset_valid_ = false; |
+ ResetLayout(); |
} |
void RenderText::ApplyStyle(TextStyle style, bool value, const Range& range) { |
styles_[style].ApplyValue(value, range); |
- // Only invalidate the layout on font changes; not for colors or decorations. |
- bool invalidate = (style == BOLD) || (style == ITALIC); |
-#if defined(OS_WIN) |
ckocagil
2014/08/30 01:26:15
HarfBuzz always needs invalidation on style change
msw
2014/09/02 18:02:21
Acknowledged.
|
- // TODO(msw): Windows applies colors and decorations in the layout process. |
- invalidate = true; |
-#endif |
- if (invalidate) { |
- cached_bounds_and_offset_valid_ = false; |
- ResetLayout(); |
- } |
+ cached_bounds_and_offset_valid_ = false; |
+ ResetLayout(); |
} |
bool RenderText::GetStyle(TextStyle style) const { |