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

Unified Diff: third_party/WebKit/Source/platform/text/Character.h

Issue 1964773002: Render Unicode control characters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: w/Test changes Created 4 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
Index: third_party/WebKit/Source/platform/text/Character.h
diff --git a/third_party/WebKit/Source/platform/text/Character.h b/third_party/WebKit/Source/platform/text/Character.h
index 8d3c4159b15027e2aac471c75acc0de070c0f1dd..1bef1a6713bfa6b0ebe72430d5ece69e1dd9587b 100644
--- a/third_party/WebKit/Source/platform/text/Character.h
+++ b/third_party/WebKit/Source/platform/text/Character.h
@@ -96,10 +96,16 @@ public:
|| c == zeroWidthNonJoinerCharacter
|| c == zeroWidthJoinerCharacter;
}
- static bool treatAsZeroWidthSpaceInComplexScript(UChar32 c)
+ static bool legacyTreatAsZeroWidthSpaceInComplexScript(UChar32 c)
{
return c < 0x20 // ASCII Control Characters
|| (c >= 0x7F && c < 0xA0) // ASCII Delete .. No-break spaceCharacter
+ || treatAsZeroWidthSpaceInComplexScript(c);
+ }
+ static bool treatAsZeroWidthSpaceInComplexScript(UChar32 c)
+ {
+ return c == formFeedCharacter
+ || c == carriageReturnCharacter
|| c == softHyphenCharacter
|| c == zeroWidthSpaceCharacter
|| (c >= leftToRightMarkCharacter && c <= rightToLeftMarkCharacter)

Powered by Google App Engine
This is Rietveld 408576698