Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Unified Diff: ui/gfx/render_text_win.cc

Issue 10698078: Merge 145046 - Ignore Unicode BiDi control characters in missing glyphs check in RenderTextWin. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_win.cc
===================================================================
--- ui/gfx/render_text_win.cc (revision 145296)
+++ ui/gfx/render_text_win.cc (working copy)
@@ -225,6 +225,17 @@
*font = font->DeriveFont(font_size - current_size, font_style);
}
+// Returns true if |c| is a Unicode BiDi control character.
+bool IsUnicodeBidiControlCharacter(char16 c) {
+ return c == base::i18n::kRightToLeftMark ||
+ c == base::i18n::kLeftToRightMark ||
+ c == base::i18n::kLeftToRightEmbeddingMark ||
+ c == base::i18n::kRightToLeftEmbeddingMark ||
+ c == base::i18n::kPopDirectionalFormatting ||
+ c == base::i18n::kLeftToRightOverride ||
+ c == base::i18n::kRightToLeftOverride;
+}
+
} // namespace
namespace internal {
@@ -883,7 +894,8 @@
// See: http://crbug.com/125629
if (run->glyphs[glyph_index] == properties.wgBlank &&
run->visible_attributes[glyph_index].fZeroWidth &&
- !IsWhitespace(run_text[char_index])) {
+ !IsWhitespace(run_text[char_index]) &&
+ !IsUnicodeBidiControlCharacter(run_text[char_index])) {
return true;
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698