summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-11-15 14:04:21 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-11-15 14:04:21 -0800
commitee7bd5a65f850002be39285071d02e89db600a2d (patch)
tree4e88302313ce680dfbd7d688699c191ea9900a68 /Source
parent5f30aed84f16758301c9fdca075d04bab3bb80c9 (diff)
parent469c7a77ed7557a04a0797ff8ca3e4335a1c1be0 (diff)
downloadexternal_webkit-ee7bd5a65f850002be39285071d02e89db600a2d.zip
external_webkit-ee7bd5a65f850002be39285071d02e89db600a2d.tar.gz
external_webkit-ee7bd5a65f850002be39285071d02e89db600a2d.tar.bz2
Merge "Mask display of zero-width characters"
Diffstat (limited to 'Source')
-rw-r--r--Source/WebCore/platform/graphics/android/FontAndroid.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/WebCore/platform/graphics/android/FontAndroid.cpp b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
index 852413f..e100955 100644
--- a/Source/WebCore/platform/graphics/android/FontAndroid.cpp
+++ b/Source/WebCore/platform/graphics/android/FontAndroid.cpp
@@ -52,6 +52,7 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnArrayPtr.h>
#include <wtf/PassOwnPtr.h>
+#include <wtf/unicode/CharacterNames.h>
#include <wtf/unicode/Unicode.h>
#endif
@@ -881,10 +882,14 @@ void TextRunWalker::normalizeSpacesAndMirrorChars(const UChar* source, bool rtl,
UChar32 character;
int nextPosition = position;
U16_NEXT(source, nextPosition, length, character);
+
if (Font::treatAsSpace(character))
- character = ' ';
+ character = space;
+ else if (Font::treatAsZeroWidthSpace(character))
+ character = zeroWidthSpace;
else if (rtl)
character = u_charMirror(character);
+
U16_APPEND(destination, position, length, character, error);
ASSERT(!error);
position = nextPosition;