Changeset 51174 in webkit for trunk/JavaScriptCore
- Timestamp:
- Nov 18, 2009, 10:03:01 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r51168 r51174 1 2009-11-18 Laszlo Gombos <[email protected]> 2 3 Reviewed by Kenneth Rohde Christiansen. 4 5 [Qt] Remove support for Qt v4.3 or older versions 6 https://bugs.webkit.org/show_bug.cgi?id=29469 7 8 * JavaScriptCore.pro: 9 * jsc.pro: 10 * wtf/unicode/qt4/UnicodeQt4.h: 11 1 12 2009-11-18 Kent Tamura <[email protected]> 2 13 -
trunk/JavaScriptCore/JavaScriptCore.pro
r51166 r51174 59 59 QMAKE_EXTRA_TARGETS += generated_files 60 60 61 lessThan(QT_MINOR_VERSION, 4) {62 DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE=""63 }64 65 61 *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 66 62 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 -
trunk/JavaScriptCore/jsc.pro
r50807 r51174 24 24 include($$PWD/JavaScriptCore.pri) 25 25 26 lessThan(QT_MINOR_VERSION, 4) {27 DEFINES += QT_BEGIN_NAMESPACE="" QT_END_NAMESPACE=""28 }29 30 26 *-g++*:QMAKE_CXXFLAGS_RELEASE -= -O2 31 27 *-g++*:QMAKE_CXXFLAGS_RELEASE += -O3 -
trunk/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
r48463 r51174 31 31 #include <stdint.h> 32 32 33 #if QT_VERSION >= 0x04030034 33 QT_BEGIN_NAMESPACE 35 34 namespace QUnicodeTables { … … 56 55 } 57 56 QT_END_NAMESPACE 58 #endif59 57 60 58 // ugly hack to make UChar compatible with JSChar in API/JSStringRef.h … … 187 185 188 186 189 #if QT_VERSION >= 0x040300190 191 187 // FIXME: handle surrogates correctly in all methods 192 188 … … 407 403 } 408 404 409 #else410 411 inline UChar32 toLower(UChar32 ch)412 {413 if (ch > 0xffff)414 return ch;415 return QChar((unsigned short)ch).toLower().unicode();416 }417 418 inline int toLower(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)419 {420 *error = false;421 if (resultLength < srcLength) {422 *error = true;423 return srcLength;424 }425 for (int i = 0; i < srcLength; ++i)426 result[i] = QChar(src[i]).toLower().unicode();427 return srcLength;428 }429 430 inline UChar32 toUpper(UChar32 ch)431 {432 if (ch > 0xffff)433 return ch;434 return QChar((unsigned short)ch).toUpper().unicode();435 }436 437 inline int toUpper(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)438 {439 *error = false;440 if (resultLength < srcLength) {441 *error = true;442 return srcLength;443 }444 for (int i = 0; i < srcLength; ++i)445 result[i] = QChar(src[i]).toUpper().unicode();446 return srcLength;447 }448 449 inline int toTitleCase(UChar32 c)450 {451 if (c > 0xffff)452 return c;453 return QChar((unsigned short)c).toUpper().unicode();454 }455 456 inline UChar32 foldCase(UChar32 c)457 {458 if (c > 0xffff)459 return c;460 return QChar((unsigned short)c).toLower().unicode();461 }462 463 inline int foldCase(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)464 {465 return toLower(result, resultLength, src, srcLength, error);466 }467 468 inline bool isPrintableChar(UChar32 c)469 {470 return (c & 0xffff0000) == 0 && QChar((unsigned short)c).isPrint();471 }472 473 inline bool isArabicChar(UChar32 c)474 {475 return c >= 0x0600 && c <= 0x06FF;476 }477 478 inline bool isSeparatorSpace(UChar32 c)479 {480 return (c & 0xffff0000) == 0 && QChar((unsigned short)c).category() == QChar::Separator_Space;481 }482 483 inline bool isPunct(UChar32 c)484 {485 return (c & 0xffff0000) == 0 && QChar((unsigned short)c).isPunct();486 }487 488 inline bool isLower(UChar32 c)489 {490 return (c & 0xffff0000) == 0 && QChar((unsigned short)c).category() == QChar::Letter_Lowercase;491 }492 493 inline UChar32 mirroredChar(UChar32 c)494 {495 if (c > 0xffff)496 return c;497 return QChar(c).mirroredChar().unicode();498 }499 500 inline uint8_t combiningClass(UChar32 c)501 {502 if (c > 0xffff)503 return 0;504 return QChar((unsigned short)c).combiningClass();505 }506 507 inline DecompositionType decompositionType(UChar32 c)508 {509 if (c > 0xffff)510 return DecompositionNone;511 return (DecompositionType)QChar(c).decompositionTag();512 }513 514 inline int umemcasecmp(const UChar* a, const UChar* b, int len)515 {516 for (int i = 0; i < len; ++i) {517 QChar c1 = QChar(a[i]).toLower();518 QChar c2 = QChar(b[i]).toLower();519 if (c1 != c2)520 return c1.unicode() - c2.unicode();521 }522 return 0;523 }524 525 inline Direction direction(UChar32 c)526 {527 if (c > 0xffff)528 return LeftToRight;529 return (Direction)QChar(c).direction();530 }531 532 inline CharCategory category(UChar32 c)533 {534 if (c > 0xffff)535 return NoCategory;536 return (CharCategory) U_MASK(QChar(c).category());537 }538 539 #endif540 541 405 } } 542 406
Note:
See TracChangeset
for help on using the changeset viewer.