Title: [287250] trunk/Source/WebCore
- Revision
- 287250
- Author
- [email protected]
- Date
- 2021-12-19 17:12:30 -0800 (Sun, 19 Dec 2021)
Log Message
Use character names instead of hex codes in FontCascade.h
https://bugs.webkit.org/show_bug.cgi?id=234451
Reviewed by Dean Jackson.
Saying something like "c == zeroWidthNonJoiner" is much more clear than "c == 0x200c".
No new tests because there is no behavior change.
* platform/graphics/FontCascade.h:
(WebCore::FontCascade::treatAsSpace):
(WebCore::FontCascade::treatAsZeroWidthSpace):
(WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287249 => 287250)
--- trunk/Source/WebCore/ChangeLog 2021-12-20 00:03:00 UTC (rev 287249)
+++ trunk/Source/WebCore/ChangeLog 2021-12-20 01:12:30 UTC (rev 287250)
@@ -1,3 +1,19 @@
+2021-12-19 Myles C. Maxfield <[email protected]>
+
+ Use character names instead of hex codes in FontCascade.h
+ https://bugs.webkit.org/show_bug.cgi?id=234451
+
+ Reviewed by Dean Jackson.
+
+ Saying something like "c == zeroWidthNonJoiner" is much more clear than "c == 0x200c".
+
+ No new tests because there is no behavior change.
+
+ * platform/graphics/FontCascade.h:
+ (WebCore::FontCascade::treatAsSpace):
+ (WebCore::FontCascade::treatAsZeroWidthSpace):
+ (WebCore::FontCascade::treatAsZeroWidthSpaceInComplexScript):
+
2021-12-19 Jean-Yves Avenard <[email protected]>
Don't pack audio samples with discontinuity together
Modified: trunk/Source/WebCore/platform/graphics/FontCascade.h (287249 => 287250)
--- trunk/Source/WebCore/platform/graphics/FontCascade.h 2021-12-20 00:03:00 UTC (rev 287249)
+++ trunk/Source/WebCore/platform/graphics/FontCascade.h 2021-12-20 01:12:30 UTC (rev 287250)
@@ -259,9 +259,9 @@
static CodePath s_codePath;
FontSelector* fontSelector() const;
- static bool treatAsSpace(UChar32 c) { return c == ' ' || c == '\t' || c == '\n' || c == noBreakSpace; }
- static bool treatAsZeroWidthSpace(UChar32 c) { return treatAsZeroWidthSpaceInComplexScript(c) || c == 0x200c || c == 0x200d; }
- static bool treatAsZeroWidthSpaceInComplexScript(UChar32 c) { return c < 0x20 || (c >= 0x7F && c < 0xA0) || c == softHyphen || c == zeroWidthSpace || (c >= 0x200e && c <= 0x200f) || (c >= 0x202a && c <= 0x202e) || c == zeroWidthNoBreakSpace || c == objectReplacementCharacter; }
+ static bool treatAsSpace(UChar32 c) { return c == space || c == tabCharacter || c == newlineCharacter || c == noBreakSpace; }
+ static bool treatAsZeroWidthSpace(UChar32 c) { return treatAsZeroWidthSpaceInComplexScript(c) || c == zeroWidthNonJoiner || c == zeroWidthJoiner; }
+ static bool treatAsZeroWidthSpaceInComplexScript(UChar32 c) { return c < space || (c >= deleteCharacter && c < noBreakSpace) || c == softHyphen || c == zeroWidthSpace || (c >= leftToRightMark && c <= rightToLeftMark) || (c >= leftToRightEmbed && c <= rightToLeftOverride) || c == zeroWidthNoBreakSpace || c == objectReplacementCharacter; }
static bool canReceiveTextEmphasis(UChar32);
static inline UChar normalizeSpaces(UChar character)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes