Changeset 88016 in webkit


Ignore:
Timestamp:
Jun 3, 2011 7:47:04 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-06-03 Siddharth Mathur <siddharth.mathur@nokia.com>

Reviewed by Benjamin Poulain.

[Qt] Build flag for experimental ICU library support
https://bugs.webkit.org/show_bug.cgi?id=60786

Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
ICU powered Unicode support.

  • JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
  • wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE).

2011-06-03 Siddharth Mathur <siddharth.mathur@nokia.com>

Reviewed by Benjamin Poulain.

[Qt] Build flag for experimental ICU library support
https://bugs.webkit.org/show_bug.cgi?id=60786

Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
ICU powered Unicode support.

No new tests as no new features added.

  • WebCore.pri: Removed text_breaking_with_icu CONFIG flag.
  • WebCore.pro: Added TextCodecICU.cpp and qt/TextBreakIteratorInternalICUQt.cpp.
  • editing/qt/SmartReplaceQt.cpp:
  • features.pri: Support for use_system_icu CONFIG flag.
  • platform/text/TextCodecICU.cpp: Guard with USE(ICU_UNICODE).
  • platform/text/qt/TextBreakIteratorInternalICUQt.cpp: Added. (WebCore::Q_GLOBAL_STATIC_WITH_INITIALIZER): (WebCore::currentSearchLocaleID): (WebCore::currentTextBreakLocaleID):
  • platform/text/qt/TextBreakIteratorQt.cpp: Moved out currentTextBreakLocaleID(). (WebCore::isTextBreak):
  • platform/text/qt/TextCodecQt.cpp: Guard with USE(QT4_UNICODE). (WebCore::TextCodecQt::registerEncodingNames): (WebCore::TextCodecQt::registerCodecs):
Location:
trunk/Source
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r88006 r88016  
     12011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
     2
     3        Reviewed by Benjamin Poulain.
     4
     5        [Qt] Build flag for experimental ICU library support
     6        https://bugs.webkit.org/show_bug.cgi?id=60786
     7
     8        Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
     9        ICU powered Unicode support.
     10
     11        * JavaScriptCore.pri: Support for use_system_icu CONFIG flag.
     12        * wtf/unicode/qt4/UnicodeQt4.h: Guard an include file with USE(ICU_UNICODE).
     13
    1142011-06-03  Alexis Menard  <alexis.menard@openbossa.org>
    215
  • trunk/Source/JavaScriptCore/JavaScriptCore.pri

    r84364 r88016  
    5858DEFINES += BUILDING_JavaScriptCore BUILDING_WTF
    5959
    60 # CONFIG += text_breaking_with_icu
    61 
    62 contains (CONFIG, text_breaking_with_icu) {
    63     DEFINES += WTF_USE_QT_ICU_TEXT_BREAKING=1
     60contains(CONFIG, use_system_icu) {
     61    DEFINES += WTF_USE_ICU_UNICODE=1
     62    DEFINES -= WTF_USE_QT4_UNICODE
     63    LIBS += -licuuc -licui18n
     64} else {
     65    DEFINES += WTF_USE_QT4_UNICODE=1
     66    DEFINES -= WTF_USE_ICU_UNICODE
    6467}
    6568
  • trunk/Source/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h

    r69773 r88016  
    3232
    3333#include <stdint.h>
    34 #if USE(QT_ICU_TEXT_BREAKING)
     34#if USE(ICU_UNICODE)
    3535#include <unicode/ubrk.h>
    3636#endif
     
    6868#endif
    6969
    70 #if !USE(QT_ICU_TEXT_BREAKING)
     70#if !USE(ICU_UNICODE)
    7171typedef uint32_t UChar32;
    7272#endif
  • trunk/Source/WebCore/ChangeLog

    r88011 r88016  
     12011-06-03  Siddharth Mathur  <siddharth.mathur@nokia.com>
     2
     3        Reviewed by Benjamin Poulain.
     4
     5        [Qt] Build flag for experimental ICU library support
     6        https://bugs.webkit.org/show_bug.cgi?id=60786
     7
     8        Adds a build-time flag (CONFIG+=use_system_icu) that enables experimental
     9        ICU powered Unicode support.
     10
     11        No new tests as no new features added.
     12
     13        * WebCore.pri: Removed text_breaking_with_icu CONFIG flag.
     14        * WebCore.pro: Added TextCodecICU.cpp and qt/TextBreakIteratorInternalICUQt.cpp.
     15        * editing/qt/SmartReplaceQt.cpp:
     16        * features.pri: Support for use_system_icu CONFIG flag.
     17        * platform/text/TextCodecICU.cpp: Guard with USE(ICU_UNICODE).
     18        * platform/text/qt/TextBreakIteratorInternalICUQt.cpp: Added.
     19        (WebCore::Q_GLOBAL_STATIC_WITH_INITIALIZER):
     20        (WebCore::currentSearchLocaleID):
     21        (WebCore::currentTextBreakLocaleID):
     22        * platform/text/qt/TextBreakIteratorQt.cpp: Moved out currentTextBreakLocaleID().
     23        (WebCore::isTextBreak):
     24        * platform/text/qt/TextCodecQt.cpp: Guard with USE(QT4_UNICODE).
     25        (WebCore::TextCodecQt::registerEncodingNames):
     26        (WebCore::TextCodecQt::registerCodecs):
     27
    1282011-06-03  Yael Aharon  <yael.aharon@nokia.com>
    229
  • trunk/Source/WebCore/WebCore.pri

    r87905 r88016  
    296296}
    297297
    298 contains (CONFIG, text_breaking_with_icu) {
    299     LIBS += -licuuc
    300 }
    301 
    302298!CONFIG(QTDIR_build) {
    303299    win32-*|wince* {
  • trunk/Source/WebCore/WebCore.pro

    r87961 r88016  
    10641064    platform/text/TextCodecUTF16.cpp \
    10651065    platform/text/TextCodecUTF8.cpp \
     1066    platform/text/TextCodecICU.cpp \
    10661067    platform/text/TextEncoding.cpp \
    10671068    platform/text/TextEncodingDetectorNone.cpp \
     
    25552556    platform/text/qt/TextBoundariesQt.cpp \
    25562557    platform/text/qt/TextBreakIteratorQt.cpp \
     2558    platform/text/qt/TextBreakIteratorInternalICUQt.cpp \
    25572559    platform/text/qt/TextCodecQt.cpp \
    25582560    platform/qt/WheelEventQt.cpp \
     
    25862588}
    25872589
    2588 contains (CONFIG, text_breaking_with_icu) {
     2590contains (CONFIG, use_system_icu) {
    25892591    SOURCES += platform/text/TextBreakIteratorICU.cpp
    25902592}
  • trunk/Source/WebCore/editing/qt/SmartReplaceQt.cpp

    r83029 r88016  
    2929
    3030#include "config.h"
     31#if USE(QT4_UNICODE)
    3132#include "SmartReplace.h"
     33#include <QChar>
    3234
    3335namespace WebCore {
     
    6567
    6668}
     69#endif
  • trunk/Source/WebCore/features.pri

    r87312 r88016  
    2727        SQLITE3SRCDIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/sqlite/
    2828    }
     29}
     30
     31contains(CONFIG, use_system_icu) {
     32    DEFINES += WTF_USE_ICU_UNICODE=1
     33    DEFINES -= WTF_USE_QT4_UNICODE
     34    LIBS += -licuuc -licui18n
     35} else {
     36    DEFINES += WTF_USE_QT4_UNICODE=1
     37    DEFINES -= WTF_USE_ICU_UNICODE
    2938}
    3039
  • trunk/Source/WebCore/platform/text/TextCodecICU.cpp

    r84473 r88016  
    2626
    2727#include "config.h"
     28#if USE(ICU_UNICODE)
    2829#include "TextCodecICU.h"
    2930
     
    472473
    473474} // namespace WebCore
     475#endif
     476
  • trunk/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp

    r81302 r88016  
    3737namespace WebCore {
    3838
    39 #if USE(QT_ICU_TEXT_BREAKING)
    40 const char* currentTextBreakLocaleID()
    41 {
    42     return QLocale::system().name().toLatin1();
    43 }
    44 #else
    4539    class TextBreakIterator : public QTextBoundaryFinder {
    4640    public:
     
    156150        return true;
    157151    }
    158 #endif
    159152
    160153}
  • trunk/Source/WebCore/platform/text/qt/TextCodecQt.cpp

    r86531 r88016  
    2626
    2727#include "config.h"
     28#if USE(QT4_UNICODE)
    2829#include "TextCodecQt.h"
    2930#include "PlatformString.h"
     
    4748{
    4849    QList<int> mibs = QTextCodec::availableMibs();
    49 //     qDebug() << ">>>>>>>>> registerEncodingNames";
    5050
    5151    for (int i = 0; i < mibs.size(); ++i) {
     
    5353        const char *name = getAtomicName(c->name());
    5454        registrar(name, name);
    55 //         qDebug() << "    " << name << name;
    5655        QList<QByteArray> aliases = c->aliases();
    5756        for (int i = 0; i < aliases.size(); ++i) {
    5857            const char *a = getAtomicName(aliases.at(i));
    59 //             qDebug() << "     (a) " << a << name;
    6058            registrar(a, name);
    6159        }
     
    7169{
    7270    QList<int> mibs = QTextCodec::availableMibs();
    73 //     qDebug() << ">>>>>>>>> registerCodecs";
    7471
    7572    for (int i = 0; i < mibs.size(); ++i) {
    7673        QTextCodec *c = QTextCodec::codecForMib(mibs.at(i));
    7774        const char *name = getAtomicName(c->name());
    78 //         qDebug() << "    " << name;
    7975        registrar(name, newTextCodecQt, 0);
    8076    }
     
    165161
    166162} // namespace WebCore
     163#endif
Note: See TracChangeset for help on using the changeset viewer.