[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

paroga at webkit.org paroga at webkit.org
Wed Dec 22 14:45:08 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 460f84ff96add6dcc4aebd90ada17e47b1434316
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Oct 19 09:05:49 2010 +0000

    2010-10-19  Patrick Gansterer  <paroga at webkit.org>
    
            Reviewed by Andreas Kling.
    
            Fix style of UnicodeWinCE
            https://bugs.webkit.org/show_bug.cgi?id=47818
    
            * wtf/unicode/wince/UnicodeWinCE.cpp:
            (WTF::Unicode::toLower):
            (WTF::Unicode::toUpper):
            * wtf/unicode/wince/UnicodeWinCE.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70041 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 5e14485..0aa9680 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-19  Patrick Gansterer  <paroga at webkit.org>
+
+        Reviewed by Andreas Kling.
+
+        Fix style of UnicodeWinCE
+        https://bugs.webkit.org/show_bug.cgi?id=47818
+
+        * wtf/unicode/wince/UnicodeWinCE.cpp:
+        (WTF::Unicode::toLower):
+        (WTF::Unicode::toUpper):
+        * wtf/unicode/wince/UnicodeWinCE.h:
+
 2010-10-18  Xan Lopez  <xlopez at igalia.com>
 
         Reviewed by Martin Robinson.
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp
index b52b05c..ddc9e4e 100644
--- a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp
+++ b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.cpp
@@ -99,7 +99,7 @@ int toLower(wchar_t* result, int resultLength, const wchar_t* source, int source
 
     if (sourceIterator < sourceEnd)
         remainingCharacters += sourceEnd - sourceIterator;
-    *isError = (remainingCharacters != 0);
+    *isError = !!remainingCharacters;
     if (resultIterator < resultEnd)
         *resultIterator = 0;
 
@@ -123,7 +123,7 @@ int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int source
 
     if (sourceIterator < sourceEnd)
         remainingCharacters += sourceEnd - sourceIterator;
-    *isError = (remainingCharacters != 0);
+    *isError = !!remainingCharacters;
     if (resultIterator < resultEnd)
         *resultIterator = 0;
 
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h
index 8cc9580..8577495 100644
--- a/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h
+++ b/JavaScriptCore/wtf/unicode/wince/UnicodeWinCE.h
@@ -31,149 +31,147 @@
 #define TO_MASK(x) (1 << (x))
 
 namespace WTF {
-
-    namespace Unicode {
-
-        enum Direction {
-            LeftToRight = UnicodeCE::U_LEFT_TO_RIGHT,
-            RightToLeft = UnicodeCE::U_RIGHT_TO_LEFT,
-            EuropeanNumber = UnicodeCE::U_EUROPEAN_NUMBER,
-            EuropeanNumberSeparator = UnicodeCE::U_EUROPEAN_NUMBER_SEPARATOR,
-            EuropeanNumberTerminator = UnicodeCE::U_EUROPEAN_NUMBER_TERMINATOR,
-            ArabicNumber = UnicodeCE::U_ARABIC_NUMBER,
-            CommonNumberSeparator = UnicodeCE::U_COMMON_NUMBER_SEPARATOR,
-            BlockSeparator = UnicodeCE::U_BLOCK_SEPARATOR,
-            SegmentSeparator = UnicodeCE::U_SEGMENT_SEPARATOR,
-            WhiteSpaceNeutral = UnicodeCE::U_WHITE_SPACE_NEUTRAL,
-            OtherNeutral = UnicodeCE::U_OTHER_NEUTRAL,
-            LeftToRightEmbedding = UnicodeCE::U_LEFT_TO_RIGHT_EMBEDDING,
-            LeftToRightOverride = UnicodeCE::U_LEFT_TO_RIGHT_OVERRIDE,
-            RightToLeftArabic = UnicodeCE::U_RIGHT_TO_LEFT_ARABIC,
-            RightToLeftEmbedding = UnicodeCE::U_RIGHT_TO_LEFT_EMBEDDING,
-            RightToLeftOverride = UnicodeCE::U_RIGHT_TO_LEFT_OVERRIDE,
-            PopDirectionalFormat = UnicodeCE::U_POP_DIRECTIONAL_FORMAT,
-            NonSpacingMark = UnicodeCE::U_DIR_NON_SPACING_MARK,
-            BoundaryNeutral = UnicodeCE::U_BOUNDARY_NEUTRAL
-        };
-
-        enum DecompositionType {
-          DecompositionNone = UnicodeCE::U_DT_NONE,
-          DecompositionCanonical = UnicodeCE::U_DT_CANONICAL,
-          DecompositionCompat = UnicodeCE::U_DT_COMPAT,
-          DecompositionCircle = UnicodeCE::U_DT_CIRCLE,
-          DecompositionFinal = UnicodeCE::U_DT_FINAL,
-          DecompositionFont = UnicodeCE::U_DT_FONT,
-          DecompositionFraction = UnicodeCE::U_DT_FRACTION,
-          DecompositionInitial = UnicodeCE::U_DT_INITIAL,
-          DecompositionIsolated = UnicodeCE::U_DT_ISOLATED,
-          DecompositionMedial = UnicodeCE::U_DT_MEDIAL,
-          DecompositionNarrow = UnicodeCE::U_DT_NARROW,
-          DecompositionNoBreak = UnicodeCE::U_DT_NOBREAK,
-          DecompositionSmall = UnicodeCE::U_DT_SMALL,
-          DecompositionSquare = UnicodeCE::U_DT_SQUARE,
-          DecompositionSub = UnicodeCE::U_DT_SUB,
-          DecompositionSuper = UnicodeCE::U_DT_SUPER,
-          DecompositionVertical = UnicodeCE::U_DT_VERTICAL,
-          DecompositionWide = UnicodeCE::U_DT_WIDE,
-        };
-
-        enum CharCategory {
-          NoCategory =  0,
-          Other_NotAssigned = TO_MASK(UnicodeCE::U_GENERAL_OTHER_TYPES),
-          Letter_Uppercase = TO_MASK(UnicodeCE::U_UPPERCASE_LETTER),
-          Letter_Lowercase = TO_MASK(UnicodeCE::U_LOWERCASE_LETTER),
-          Letter_Titlecase = TO_MASK(UnicodeCE::U_TITLECASE_LETTER),
-          Letter_Modifier = TO_MASK(UnicodeCE::U_MODIFIER_LETTER),
-          Letter_Other = TO_MASK(UnicodeCE::U_OTHER_LETTER),
-
-          Mark_NonSpacing = TO_MASK(UnicodeCE::U_NON_SPACING_MARK),
-          Mark_Enclosing = TO_MASK(UnicodeCE::U_ENCLOSING_MARK),
-          Mark_SpacingCombining = TO_MASK(UnicodeCE::U_COMBINING_SPACING_MARK),
-
-          Number_DecimalDigit = TO_MASK(UnicodeCE::U_DECIMAL_DIGIT_NUMBER),
-          Number_Letter = TO_MASK(UnicodeCE::U_LETTER_NUMBER),
-          Number_Other = TO_MASK(UnicodeCE::U_OTHER_NUMBER),
-
-          Separator_Space = TO_MASK(UnicodeCE::U_SPACE_SEPARATOR),
-          Separator_Line = TO_MASK(UnicodeCE::U_LINE_SEPARATOR),
-          Separator_Paragraph = TO_MASK(UnicodeCE::U_PARAGRAPH_SEPARATOR),
-
-          Other_Control = TO_MASK(UnicodeCE::U_CONTROL_CHAR),
-          Other_Format = TO_MASK(UnicodeCE::U_FORMAT_CHAR),
-          Other_PrivateUse = TO_MASK(UnicodeCE::U_PRIVATE_USE_CHAR),
-          Other_Surrogate = TO_MASK(UnicodeCE::U_SURROGATE),
-
-          Punctuation_Dash = TO_MASK(UnicodeCE::U_DASH_PUNCTUATION),
-          Punctuation_Open = TO_MASK(UnicodeCE::U_START_PUNCTUATION),
-          Punctuation_Close = TO_MASK(UnicodeCE::U_END_PUNCTUATION),
-          Punctuation_Connector = TO_MASK(UnicodeCE::U_CONNECTOR_PUNCTUATION),
-          Punctuation_Other = TO_MASK(UnicodeCE::U_OTHER_PUNCTUATION),
-
-          Symbol_Math = TO_MASK(UnicodeCE::U_MATH_SYMBOL),
-          Symbol_Currency = TO_MASK(UnicodeCE::U_CURRENCY_SYMBOL),
-          Symbol_Modifier = TO_MASK(UnicodeCE::U_MODIFIER_SYMBOL),
-          Symbol_Other = TO_MASK(UnicodeCE::U_OTHER_SYMBOL),
-
-          Punctuation_InitialQuote = TO_MASK(UnicodeCE::U_INITIAL_PUNCTUATION),
-          Punctuation_FinalQuote = TO_MASK(UnicodeCE::U_FINAL_PUNCTUATION)
-        };
-
-        CharCategory category(unsigned int);
-
-        bool isSpace(wchar_t);
-        bool isLetter(wchar_t);
-        bool isPrintableChar(wchar_t);
-        bool isUpper(wchar_t);
-        bool isLower(wchar_t);
-        bool isPunct(wchar_t);
-        bool isDigit(wchar_t);
-        bool isAlphanumeric(wchar_t);
-        inline bool isSeparatorSpace(wchar_t c) { return category(c) == Separator_Space; }
-        inline bool isHighSurrogate(wchar_t c) { return (c & 0xfc00) == 0xd800; }
-        inline bool isLowSurrogate(wchar_t c) { return (c & 0xfc00) == 0xdc00; }
-
-        wchar_t toLower(wchar_t);
-        wchar_t toUpper(wchar_t);
-        wchar_t foldCase(wchar_t);
-        wchar_t toTitleCase(wchar_t);
-        int toLower(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
-        int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
-        int foldCase(UChar* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
-
-        int digitValue(wchar_t);
-
-        wchar_t mirroredChar(UChar32);
-        unsigned char combiningClass(UChar32);
-        DecompositionType decompositionType(UChar32);
-        Direction direction(UChar32);
-        inline bool isArabicChar(UChar32 c)
-        {
-            return c >= 0x0600 && c <= 0x06FF;
-        }
-
-        inline bool hasLineBreakingPropertyComplexContext(UChar32)
-        {
-            return false; // FIXME: implement!
-        }
-
-        inline int umemcasecmp(const wchar_t* a, const wchar_t* b, int len)
-        {
-            for (int i = 0; i < len; ++i) {
-                wchar_t c1 = foldCase(a[i]);
-                wchar_t c2 = foldCase(b[i]);
-                if (c1 != c2)
-                    return c1 - c2;
-            }
-            return 0;
-        }
-
-        inline UChar32 surrogateToUcs4(wchar_t high, wchar_t low)
-        {
-            return (UChar32(high) << 10) + low - 0x35fdc00;
-        }
-
-    }   // namespace Unicode
-
-}   // namespace WTF
+namespace Unicode {
+
+enum Direction {
+    LeftToRight = UnicodeCE::U_LEFT_TO_RIGHT,
+    RightToLeft = UnicodeCE::U_RIGHT_TO_LEFT,
+    EuropeanNumber = UnicodeCE::U_EUROPEAN_NUMBER,
+    EuropeanNumberSeparator = UnicodeCE::U_EUROPEAN_NUMBER_SEPARATOR,
+    EuropeanNumberTerminator = UnicodeCE::U_EUROPEAN_NUMBER_TERMINATOR,
+    ArabicNumber = UnicodeCE::U_ARABIC_NUMBER,
+    CommonNumberSeparator = UnicodeCE::U_COMMON_NUMBER_SEPARATOR,
+    BlockSeparator = UnicodeCE::U_BLOCK_SEPARATOR,
+    SegmentSeparator = UnicodeCE::U_SEGMENT_SEPARATOR,
+    WhiteSpaceNeutral = UnicodeCE::U_WHITE_SPACE_NEUTRAL,
+    OtherNeutral = UnicodeCE::U_OTHER_NEUTRAL,
+    LeftToRightEmbedding = UnicodeCE::U_LEFT_TO_RIGHT_EMBEDDING,
+    LeftToRightOverride = UnicodeCE::U_LEFT_TO_RIGHT_OVERRIDE,
+    RightToLeftArabic = UnicodeCE::U_RIGHT_TO_LEFT_ARABIC,
+    RightToLeftEmbedding = UnicodeCE::U_RIGHT_TO_LEFT_EMBEDDING,
+    RightToLeftOverride = UnicodeCE::U_RIGHT_TO_LEFT_OVERRIDE,
+    PopDirectionalFormat = UnicodeCE::U_POP_DIRECTIONAL_FORMAT,
+    NonSpacingMark = UnicodeCE::U_DIR_NON_SPACING_MARK,
+    BoundaryNeutral = UnicodeCE::U_BOUNDARY_NEUTRAL
+};
+
+enum DecompositionType {
+    DecompositionNone = UnicodeCE::U_DT_NONE,
+    DecompositionCanonical = UnicodeCE::U_DT_CANONICAL,
+    DecompositionCompat = UnicodeCE::U_DT_COMPAT,
+    DecompositionCircle = UnicodeCE::U_DT_CIRCLE,
+    DecompositionFinal = UnicodeCE::U_DT_FINAL,
+    DecompositionFont = UnicodeCE::U_DT_FONT,
+    DecompositionFraction = UnicodeCE::U_DT_FRACTION,
+    DecompositionInitial = UnicodeCE::U_DT_INITIAL,
+    DecompositionIsolated = UnicodeCE::U_DT_ISOLATED,
+    DecompositionMedial = UnicodeCE::U_DT_MEDIAL,
+    DecompositionNarrow = UnicodeCE::U_DT_NARROW,
+    DecompositionNoBreak = UnicodeCE::U_DT_NOBREAK,
+    DecompositionSmall = UnicodeCE::U_DT_SMALL,
+    DecompositionSquare = UnicodeCE::U_DT_SQUARE,
+    DecompositionSub = UnicodeCE::U_DT_SUB,
+    DecompositionSuper = UnicodeCE::U_DT_SUPER,
+    DecompositionVertical = UnicodeCE::U_DT_VERTICAL,
+    DecompositionWide = UnicodeCE::U_DT_WIDE
+};
+
+enum CharCategory {
+    NoCategory =  0,
+    Other_NotAssigned = TO_MASK(UnicodeCE::U_GENERAL_OTHER_TYPES),
+    Letter_Uppercase = TO_MASK(UnicodeCE::U_UPPERCASE_LETTER),
+    Letter_Lowercase = TO_MASK(UnicodeCE::U_LOWERCASE_LETTER),
+    Letter_Titlecase = TO_MASK(UnicodeCE::U_TITLECASE_LETTER),
+    Letter_Modifier = TO_MASK(UnicodeCE::U_MODIFIER_LETTER),
+    Letter_Other = TO_MASK(UnicodeCE::U_OTHER_LETTER),
+
+    Mark_NonSpacing = TO_MASK(UnicodeCE::U_NON_SPACING_MARK),
+    Mark_Enclosing = TO_MASK(UnicodeCE::U_ENCLOSING_MARK),
+    Mark_SpacingCombining = TO_MASK(UnicodeCE::U_COMBINING_SPACING_MARK),
+
+    Number_DecimalDigit = TO_MASK(UnicodeCE::U_DECIMAL_DIGIT_NUMBER),
+    Number_Letter = TO_MASK(UnicodeCE::U_LETTER_NUMBER),
+    Number_Other = TO_MASK(UnicodeCE::U_OTHER_NUMBER),
+
+    Separator_Space = TO_MASK(UnicodeCE::U_SPACE_SEPARATOR),
+    Separator_Line = TO_MASK(UnicodeCE::U_LINE_SEPARATOR),
+    Separator_Paragraph = TO_MASK(UnicodeCE::U_PARAGRAPH_SEPARATOR),
+
+    Other_Control = TO_MASK(UnicodeCE::U_CONTROL_CHAR),
+    Other_Format = TO_MASK(UnicodeCE::U_FORMAT_CHAR),
+    Other_PrivateUse = TO_MASK(UnicodeCE::U_PRIVATE_USE_CHAR),
+    Other_Surrogate = TO_MASK(UnicodeCE::U_SURROGATE),
+
+    Punctuation_Dash = TO_MASK(UnicodeCE::U_DASH_PUNCTUATION),
+    Punctuation_Open = TO_MASK(UnicodeCE::U_START_PUNCTUATION),
+    Punctuation_Close = TO_MASK(UnicodeCE::U_END_PUNCTUATION),
+    Punctuation_Connector = TO_MASK(UnicodeCE::U_CONNECTOR_PUNCTUATION),
+    Punctuation_Other = TO_MASK(UnicodeCE::U_OTHER_PUNCTUATION),
+
+    Symbol_Math = TO_MASK(UnicodeCE::U_MATH_SYMBOL),
+    Symbol_Currency = TO_MASK(UnicodeCE::U_CURRENCY_SYMBOL),
+    Symbol_Modifier = TO_MASK(UnicodeCE::U_MODIFIER_SYMBOL),
+    Symbol_Other = TO_MASK(UnicodeCE::U_OTHER_SYMBOL),
+
+    Punctuation_InitialQuote = TO_MASK(UnicodeCE::U_INITIAL_PUNCTUATION),
+    Punctuation_FinalQuote = TO_MASK(UnicodeCE::U_FINAL_PUNCTUATION)
+};
+
+CharCategory category(unsigned int);
+
+bool isSpace(wchar_t);
+bool isLetter(wchar_t);
+bool isPrintableChar(wchar_t);
+bool isUpper(wchar_t);
+bool isLower(wchar_t);
+bool isPunct(wchar_t);
+bool isDigit(wchar_t);
+bool isAlphanumeric(wchar_t);
+inline bool isSeparatorSpace(wchar_t c) { return category(c) == Separator_Space; }
+inline bool isHighSurrogate(wchar_t c) { return (c & 0xfc00) == 0xd800; }
+inline bool isLowSurrogate(wchar_t c) { return (c & 0xfc00) == 0xdc00; }
+
+wchar_t toLower(wchar_t);
+wchar_t toUpper(wchar_t);
+wchar_t foldCase(wchar_t);
+wchar_t toTitleCase(wchar_t);
+int toLower(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
+int toUpper(wchar_t* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
+int foldCase(UChar* result, int resultLength, const wchar_t* source, int sourceLength, bool* isError);
+
+int digitValue(wchar_t);
+
+wchar_t mirroredChar(UChar32);
+unsigned char combiningClass(UChar32);
+DecompositionType decompositionType(UChar32);
+Direction direction(UChar32);
+inline bool isArabicChar(UChar32 c)
+{
+    return c >= 0x0600 && c <= 0x06FF;
+}
+
+inline bool hasLineBreakingPropertyComplexContext(UChar32)
+{
+    return false; // FIXME: implement!
+}
+
+inline int umemcasecmp(const wchar_t* a, const wchar_t* b, int len)
+{
+    for (int i = 0; i < len; ++i) {
+        wchar_t c1 = foldCase(a[i]);
+        wchar_t c2 = foldCase(b[i]);
+        if (c1 != c2)
+            return c1 - c2;
+    }
+    return 0;
+}
+
+inline UChar32 surrogateToUcs4(wchar_t high, wchar_t low)
+{
+    return (UChar32(high) << 10) + low - 0x35fdc00;
+}
+
+} // namespace Unicode
+} // namespace WTF
 
 #endif // WTF_UnicodeWinCE_h

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list