Index: ui/gfx/render_text_win.cc |
=================================================================== |
--- ui/gfx/render_text_win.cc (revision 109436) |
+++ ui/gfx/render_text_win.cc (working copy) |
@@ -316,9 +316,11 @@ |
void RenderTextWin::UpdateLayout() { |
// TODO(msw): Skip complex processing if ScriptIsComplex returns false. |
ItemizeLogicalText(); |
- HDC hdc = CreateCompatibleDC(NULL); |
- LayoutVisualText(hdc); |
- DeleteDC(hdc); |
+ if (!runs_.empty()) { |
+ HDC hdc = CreateCompatibleDC(NULL); |
sky
2011/11/10 21:49:04
nit: use ScopedCreateDC.
Alexei Svitkine (slow)
2011/11/10 22:10:35
Done.
|
+ LayoutVisualText(hdc); |
+ DeleteDC(hdc); |
+ } |
} |
size_t RenderTextWin::IndexOfAdjacentGrapheme(size_t index, bool next) { |