Title: [123929] trunk/Source
- Revision
- 123929
- Author
- [email protected]
- Date
- 2012-07-27 15:46:12 -0700 (Fri, 27 Jul 2012)
Log Message
[WINCE] Use macros from ICU instead of defining the same functionality again
https://bugs.webkit.org/show_bug.cgi?id=92530
Patch by Patrick Gansterer <[email protected]> on 2012-07-27
Reviewed by Ryosuke Niwa.
Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
Source/WebCore:
* html/FTPDirectoryDocument.cpp:
(WebCore::processFileDateString):
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):
* platform/graphics/wince/FontWinCE.cpp:
(WebCore::generateComponents):
Source/WTF:
* wtf/unicode/wince/UnicodeWinCE.h:
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (123928 => 123929)
--- trunk/Source/WTF/ChangeLog 2012-07-27 22:41:12 UTC (rev 123928)
+++ trunk/Source/WTF/ChangeLog 2012-07-27 22:46:12 UTC (rev 123929)
@@ -1,3 +1,15 @@
+2012-07-27 Patrick Gansterer <[email protected]>
+
+ [WINCE] Use macros from ICU instead of defining the same functionality again
+ https://bugs.webkit.org/show_bug.cgi?id=92530
+
+ Reviewed by Ryosuke Niwa.
+
+ Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
+ U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
+
+ * wtf/unicode/wince/UnicodeWinCE.h:
+
2012-07-27 Caio Marcelo de Oliveira Filho <[email protected]>
[Qt] Fix build after r123917
Modified: trunk/Source/WTF/wtf/unicode/wince/UnicodeWinCE.h (123928 => 123929)
--- trunk/Source/WTF/wtf/unicode/wince/UnicodeWinCE.h 2012-07-27 22:41:12 UTC (rev 123928)
+++ trunk/Source/WTF/wtf/unicode/wince/UnicodeWinCE.h 2012-07-27 22:46:12 UTC (rev 123929)
@@ -129,8 +129,6 @@
bool isDigit(UChar);
bool isAlphanumeric(UChar);
inline bool isSeparatorSpace(UChar c) { return category(c) == Separator_Space; }
-inline bool isHighSurrogate(UChar c) { return (c & 0xfc00) == 0xd800; }
-inline bool isLowSurrogate(UChar c) { return (c & 0xfc00) == 0xdc00; }
UChar toLower(UChar);
UChar toUpper(UChar);
@@ -167,11 +165,6 @@
return 0;
}
-inline UChar32 surrogateToUcs4(UChar high, UChar low)
-{
- return (UChar32(high) << 10) + low - 0x35fdc00;
-}
-
} // namespace Unicode
} // namespace WTF
Modified: trunk/Source/WebCore/ChangeLog (123928 => 123929)
--- trunk/Source/WebCore/ChangeLog 2012-07-27 22:41:12 UTC (rev 123928)
+++ trunk/Source/WebCore/ChangeLog 2012-07-27 22:46:12 UTC (rev 123929)
@@ -1,3 +1,20 @@
+2012-07-27 Patrick Gansterer <[email protected]>
+
+ [WINCE] Use macros from ICU instead of defining the same functionality again
+ https://bugs.webkit.org/show_bug.cgi?id=92530
+
+ Reviewed by Ryosuke Niwa.
+
+ Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
+ U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
+
+ * html/FTPDirectoryDocument.cpp:
+ (WebCore::processFileDateString):
+ * loader/archive/mhtml/MHTMLArchive.cpp:
+ (WebCore::MHTMLArchive::generateMHTMLData):
+ * platform/graphics/wince/FontWinCE.cpp:
+ (WebCore::generateComponents):
+
2012-07-27 Christophe Dumez <[email protected]>
Build warning in CSSPrimitiveValueMappings.h when CSS_STICKY_POSITION is disabled
Modified: trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp (123928 => 123929)
--- trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp 2012-07-27 22:41:12 UTC (rev 123928)
+++ trunk/Source/WebCore/platform/graphics/wince/FontWinCE.cpp 2012-07-27 22:46:12 UTC (rev 123929)
@@ -138,9 +138,9 @@
}
for (int i = 1; i < run.length(); ++i) {
uint ch = run[i];
- if (isHighSurrogate(ch) && isLowSurrogate(run[i-1]))
- ch = surrogateToUcs4(ch, run[i-1]);
- if (isLowSurrogate(ch) || category(ch) == Mark_NonSpacing)
+ if (U16_IS_LEAD(ch) && U16_IS_TRAIL(run[i-1]))
+ ch = U16_GET_SUPPLEMENTARY(ch, run[i-1]);
+ if (U16_IS_TRAIL(ch) || category(ch) == Mark_NonSpacing)
continue;
if (Font::treatAsSpace(run[i])) {
int add = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes