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

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 13:24:36 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 8fcea1828b702970cbe363233972395dc331d67a
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 14 16:49:55 2010 +0000

    2010-09-14  Kwang Yul Seo  <skyul at company100.net>
    
            Reviewed by Darin Adler.
    
            Share UnicodeMacrosFromICU.h
            https://bugs.webkit.org/show_bug.cgi?id=45710
    
            glib, qt4 and wince use the same macros from ICU.
            Remove the code duplication and use the same header file.
    
            * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
            * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
            * wtf/unicode/qt4/UnicodeQt4.h:
            * wtf/unicode/wince/UnicodeWince.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67475 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index c1958db..f831c61 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-14  Kwang Yul Seo  <skyul at company100.net>
+
+        Reviewed by Darin Adler.
+
+        Share UnicodeMacrosFromICU.h
+        https://bugs.webkit.org/show_bug.cgi?id=45710
+
+        glib, qt4 and wince use the same macros from ICU.
+        Remove the code duplication and use the same header file.
+
+        * wtf/unicode/UnicodeMacrosFromICU.h: Copied from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h.
+        * wtf/unicode/glib/UnicodeMacrosFromICU.h: Removed.
+        * wtf/unicode/qt4/UnicodeQt4.h:
+        * wtf/unicode/wince/UnicodeWince.h:
+
 2010-09-13  Darin Adler  <darin at apple.com>
 
         Reviewed by Adam Barth.
diff --git a/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h b/JavaScriptCore/wtf/unicode/UnicodeMacrosFromICU.h
similarity index 100%
rename from JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h
rename to JavaScriptCore/wtf/unicode/UnicodeMacrosFromICU.h
diff --git a/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h b/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
index badab66..c9e2e1c 100644
--- a/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
+++ b/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
@@ -23,6 +23,8 @@
 #ifndef WTF_UNICODE_QT4_H
 #define WTF_UNICODE_QT4_H
 
+#include "UnicodeMacrosFromICU.h"
+
 #include <QChar>
 #include <QString>
 
@@ -63,49 +65,6 @@ typedef uint16_t UChar;
 #endif
 typedef uint32_t UChar32;
 
-// some defines from ICU
-// FIXME: This should use UnicodeMacrosFromICU.h instead!
-
-#define U_IS_BMP(c) ((UChar32)(c)<=0xffff)
-#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800)
-#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00)
-#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000)
-#define U16_GET_SUPPLEMENTARY(lead, trail) \
-    (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET)
-
-#define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0)
-#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00)
-#define U16_LENGTH(c) ((uint32_t)(c) <= 0xffff ? 1 : 2)
-
-#define U_IS_SURROGATE(c) (((c)&0xfffff800)==0xd800)
-#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
-#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
-#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
-
-#define U16_NEXT(s, i, length, c) { \
-    (c)=(s)[(i)++]; \
-    if(U16_IS_LEAD(c)) { \
-        uint16_t __c2; \
-        if((i)<(length) && U16_IS_TRAIL(__c2=(s)[(i)])) { \
-            ++(i); \
-            (c)=U16_GET_SUPPLEMENTARY((c), __c2); \
-        } \
-    } \
-}
-
-#define U16_PREV(s, start, i, c) { \
-    (c)=(s)[--(i)]; \
-    if(U16_IS_TRAIL(c)) { \
-        uint16_t __c2; \
-        if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
-            --(i); \
-            (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
-        } \
-    } \
-}
-
-#define U_MASK(x) ((uint32_t)1<<(x))
-
 namespace WTF {
 namespace Unicode {
 
diff --git a/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h b/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h
index 3866568..c68fc93 100644
--- a/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h
+++ b/JavaScriptCore/wtf/unicode/wince/UnicodeWince.h
@@ -24,52 +24,12 @@
 #ifndef UNICODE_WINCE_H
 #define UNICODE_WINCE_H
 
+#include "UnicodeMacrosFromICU.h"
+
 #include "ce_unicode.h"
 
 #define TO_MASK(x) (1 << (x))
 
-// some defines from ICU needed one or two places
-// FIXME: This should use UnicodeMacrosFromICU.h instead!
-
-#define U_IS_BMP(c) ((UChar32)(c)<=0xffff)
-#define U16_IS_LEAD(c) (((c) & 0xfffffc00) == 0xd800)
-#define U16_IS_TRAIL(c) (((c) & 0xfffffc00) == 0xdc00)
-#define U16_SURROGATE_OFFSET ((0xd800 << 10UL) + 0xdc00 - 0x10000)
-#define U16_GET_SUPPLEMENTARY(lead, trail) \
-    (((UChar32)(lead) << 10UL) + (UChar32)(trail) - U16_SURROGATE_OFFSET)
-
-#define U16_LEAD(supplementary) (UChar)(((supplementary) >> 10) + 0xd7c0)
-#define U16_TRAIL(supplementary) (UChar)(((supplementary) & 0x3ff) | 0xdc00)
-#define U16_LENGTH(c) ((uint32_t)(c) <= 0xffff ? 1 : 2)
-
-#define U_IS_SURROGATE(c) (((c) & 0xfffff800) == 0xd800)
-#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
-#define U16_IS_SURROGATE_LEAD(c) (((c) & 0x400) == 0)
-
-#define U16_NEXT(s, i, length, c) { \
-    (c)=(s)[(i)++]; \
-    if (U16_IS_LEAD(c)) { \
-        uint16_t __c2; \
-        if ((i) < (length) && U16_IS_TRAIL(__c2 = (s)[(i)])) { \
-            ++(i); \
-            (c) = U16_GET_SUPPLEMENTARY((c), __c2); \
-        } \
-    } \
-}
-
-#define U16_PREV(s, start, i, c) { \
-    (c)=(s)[--(i)]; \
-    if (U16_IS_TRAIL(c)) { \
-        uint16_t __c2; \
-        if ((i) > (start) && U16_IS_LEAD(__c2 = (s)[(i) - 1])) { \
-            --(i); \
-            (c) = U16_GET_SUPPLEMENTARY(__c2, (c)); \
-        } \
-    } \
-}
-
-#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c)
-
 namespace WTF {
 
     namespace Unicode {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list