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

Unified Diff: Source/platform/fonts/Character.h

Issue 1119663002: Making Unicode character names consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code changes to correct Test Expectation Created 5 years, 7 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: Source/platform/fonts/Character.h
diff --git a/Source/platform/fonts/Character.h b/Source/platform/fonts/Character.h
index ca0666a6fcdf97ac4a7b1dd5499578b51858df96..a330101f9c565584863cf3574e929e136c690ff2 100644
--- a/Source/platform/fonts/Character.h
+++ b/Source/platform/fonts/Character.h
@@ -61,44 +61,44 @@ public:
static bool treatAsSpace(UChar c)
{
- return c == space
+ return c == characterSpace
|| c == characterTabulation
- || c == newlineCharacter
- || c == noBreakSpace;
+ || c == characterNewline
+ || c == characterNoBreakSpace;
}
static bool treatAsZeroWidthSpace(UChar c)
{
return treatAsZeroWidthSpaceInComplexScript(c)
- || c == zeroWidthNonJoiner
- || c == zeroWidthJoiner;
+ || c == characterZeroWidthNonJoiner
+ || c == characterZeroWidthJoiner;
}
static bool treatAsZeroWidthSpaceInComplexScript(UChar c)
{
return c < 0x20 // ASCII Control Characters
- || (c >= 0x7F && c < 0xA0) // ASCII Delete .. No-break space
- || c == softHyphen
- || c == zeroWidthSpace
- || (c >= leftToRightMark && c <= rightToLeftMark)
- || (c >= leftToRightEmbed && c <= rightToLeftOverride)
- || c == zeroWidthNoBreakSpace
- || c == objectReplacementCharacter;
+ || (c >= 0x7F && c < 0xA0) // ASCII Delete .. No-break characterSpace
+ || c == characterSoftHyphen
+ || c == characterZeroWidthSpace
+ || (c >= characterLeftToRightMark && c <= characterRightToLeftMark)
+ || (c >= characterLeftToRightEmbed && c <= characterRightToLeftOverride)
+ || c == characterZeroWidthNoBreakSpace
+ || c == characterObjectReplacement;
}
static bool canReceiveTextEmphasis(UChar32);
static inline UChar normalizeSpaces(UChar character)
{
if (treatAsSpace(character))
- return space;
+ return characterSpace;
if (treatAsZeroWidthSpace(character))
- return zeroWidthSpace;
+ return characterZeroWidthSpace;
return character;
}
static inline bool isNormalizedCanvasSpaceCharacter(UChar c)
{
- // According to specification all space characters should be replaced with 0x0020 space character.
+ // According to specification all characterSpace characters should be replaced with 0x0020 space character.
jsbell 2015/05/05 17:29:53 This comment change is incorrect.
h.joshi 2015/05/11 07:06:32 Done.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
// The space characters according to specification are : U+0020, U+0009, U+000A, U+000C, and U+000D.
// http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character

Powered by Google App Engine
This is Rietveld 408576698