Bug 396321. Make gfxTextRunWordCache strip bidi control characters when it creates a text run, ensuring that platform text engines never see such characters. r=pavlov,a=vlad
git-svn-id: svn://10.0.0.236/trunk@238096 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -8,7 +8,9 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = thebes
|
||||
|
||||
REQUIRES = cairo
|
||||
REQUIRES = cairo \
|
||||
unicharutil \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = gfxASurface.h \
|
||||
gfxAlphaRecovery.h \
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include "gfxRect.h"
|
||||
#include "nsExpirationTracker.h"
|
||||
#include "nsMathUtils.h"
|
||||
#include "nsBidiUtils.h"
|
||||
|
||||
class gfxContext;
|
||||
class gfxTextRun;
|
||||
@@ -1360,7 +1361,9 @@ public:
|
||||
static PRBool IsInvalidChar(PRUnichar ch) {
|
||||
if (ch >= 32) {
|
||||
return ch == 0x0085/*NEL*/ ||
|
||||
ch == 0x200B/*ZWSP*/ || ch == 0x2028/*LSEP*/ || ch == 0x2029/*PSEP*/;
|
||||
((ch & 0xFF00) == 0x2000 /* Unicode control character */ &&
|
||||
(ch == 0x200B/*ZWSP*/ || ch == 0x2028/*LSEP*/ || ch == 0x2029/*PSEP*/ ||
|
||||
IS_BIDI_CONTROL_CHAR(ch)));
|
||||
}
|
||||
// We could just blacklist all control characters, but it seems better
|
||||
// to only blacklist the ones we know cause problems for native font
|
||||
|
||||
@@ -51,7 +51,7 @@ REQUIRES = \
|
||||
thebes \
|
||||
cairo \
|
||||
pref \
|
||||
thebes \
|
||||
unicharutil \
|
||||
$(NULL)
|
||||
|
||||
# All platforms
|
||||
|
||||
Reference in New Issue
Block a user