Changeset 69773 in webkit
- Timestamp:
- Oct 14, 2010 9:57:00 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r69753 r69773 1 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] Text breaking is slow: enable ICU as an opt-in 6 https://bugs.webkit.org/show_bug.cgi?id=40332 7 8 Added a config flag that enables ICU as an opt-in instead of the Qt specific code. 9 Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h 10 11 * JavaScriptCore.pri: 12 * wtf/unicode/qt4/UnicodeQt4.h: 13 (WTF::Unicode::toLower): 14 (WTF::Unicode::toUpper): 15 (WTF::Unicode::toTitleCase): 16 (WTF::Unicode::foldCase): 17 (WTF::Unicode::isPrintableChar): 18 (WTF::Unicode::isSeparatorSpace): 19 (WTF::Unicode::isPunct): 20 (WTF::Unicode::isLower): 21 (WTF::Unicode::mirroredChar): 22 (WTF::Unicode::combiningClass): 23 (WTF::Unicode::direction): 24 (WTF::Unicode::category): 25 1 26 2010-10-14 Anton Faern <anton@bladehawke.com> 2 27 -
trunk/JavaScriptCore/JavaScriptCore.pri
r68511 r69773 55 55 DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF 56 56 57 # CONFIG += text_breaking_with_icu 58 59 contains (CONFIG, text_breaking_with_icu) { 60 DEFINES += WTF_USE_QT_ICU_TEXT_BREAKING=1 61 } 62 57 63 wince* { 58 64 INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/ce-compat -
trunk/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
r68087 r69773 32 32 33 33 #include <stdint.h> 34 #if USE(QT_ICU_TEXT_BREAKING) 35 #include <unicode/ubrk.h> 36 #endif 34 37 35 38 QT_BEGIN_NAMESPACE … … 64 67 typedef uint16_t UChar; 65 68 #endif 69 70 #if !USE(QT_ICU_TEXT_BREAKING) 66 71 typedef uint32_t UChar32; 72 #endif 67 73 68 74 namespace WTF { … … 151 157 inline UChar32 toLower(UChar32 ch) 152 158 { 153 return QChar::toLower( ch);159 return QChar::toLower(uint32_t(ch)); 154 160 } 155 161 … … 207 213 } 208 214 209 inline UChar32 toUpper(UChar32 c h)210 { 211 return QChar::toUpper( ch);215 inline UChar32 toUpper(UChar32 c) 216 { 217 return QChar::toUpper(uint32_t(c)); 212 218 } 213 219 … … 267 273 inline int toTitleCase(UChar32 c) 268 274 { 269 return QChar::toTitleCase( c);275 return QChar::toTitleCase(uint32_t(c)); 270 276 } 271 277 272 278 inline UChar32 foldCase(UChar32 c) 273 279 { 274 return QChar::toCaseFolded( c);280 return QChar::toCaseFolded(uint32_t(c)); 275 281 } 276 282 … … 297 303 const uint test = U_MASK(QChar::Other_Control) | 298 304 U_MASK(QChar::Other_NotAssigned); 299 return !(U_MASK(QChar::category( c)) & test);305 return !(U_MASK(QChar::category(uint32_t(c))) & test); 300 306 } 301 307 302 308 inline bool isSeparatorSpace(UChar32 c) 303 309 { 304 return QChar::category( c) == QChar::Separator_Space;310 return QChar::category(uint32_t(c)) == QChar::Separator_Space; 305 311 } 306 312 … … 314 320 U_MASK(QChar::Punctuation_FinalQuote) | 315 321 U_MASK(QChar::Punctuation_Other); 316 return U_MASK(QChar::category( c)) & test;322 return U_MASK(QChar::category(uint32_t(c))) & test; 317 323 } 318 324 319 325 inline bool isLower(UChar32 c) 320 326 { 321 return QChar::category( c) == QChar::Letter_Lowercase;327 return QChar::category(uint32_t(c)) == QChar::Letter_Lowercase; 322 328 } 323 329 … … 330 336 inline UChar32 mirroredChar(UChar32 c) 331 337 { 332 return QChar::mirroredChar( c);338 return QChar::mirroredChar(uint32_t(c)); 333 339 } 334 340 335 341 inline uint8_t combiningClass(UChar32 c) 336 342 { 337 return QChar::combiningClass( c);343 return QChar::combiningClass(uint32_t(c)); 338 344 } 339 345 … … 357 363 inline Direction direction(UChar32 c) 358 364 { 359 return (Direction)QChar::direction( c);365 return (Direction)QChar::direction(uint32_t(c)); 360 366 } 361 367 362 368 inline CharCategory category(UChar32 c) 363 369 { 364 return (CharCategory) U_MASK(QChar::category( c));370 return (CharCategory) U_MASK(QChar::category(uint32_t(c))); 365 371 } 366 372 -
trunk/WebCore/ChangeLog
r69772 r69773 1 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] Text breaking is slow: enable ICU as an opt-in 6 https://bugs.webkit.org/show_bug.cgi?id=40332 7 8 Added a config flag that enables ICU as an opt-in instead of the Qt specific code. 9 10 No new tests, this should be covered by existing tests. 11 12 * WebCore.pro: 13 * platform/text/qt/TextBreakIteratorQt.cpp: 14 (WebCore::currentTextBreakLocaleID): 15 1 16 2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com> 2 17 -
trunk/WebCore/WebCore.pro
r69761 r69773 2677 2677 ../WebKit/qt/Api/qwebkitversion.cpp 2678 2678 2679 2680 2679 contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) { 2681 2680 HEADERS += platform/qt/QtMobileWebStyle.h … … 2712 2711 LIBS += -lole32 2713 2712 } 2713 2714 contains (CONFIG, text_breaking_with_icu) { 2715 SOURCES += platform/text/TextBreakIteratorICU.cpp 2716 LIBS += -licuuc 2717 } 2714 2718 2715 2719 contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) { -
trunk/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
r60851 r69773 34 34 namespace WebCore { 35 35 36 #if USE(QT_ICU_TEXT_BREAKING) 37 const char* currentTextBreakLocaleID() 38 { 39 return QLocale::system().name().toLatin1(); 40 } 41 #else 36 42 static unsigned char buffer[1024]; 37 43 … … 136 142 return true; 137 143 } 144 #endif 138 145 139 146 }
Note: See TracChangeset
for help on using the changeset viewer.