[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
noam.rosenthal at nokia.com
noam.rosenthal at nokia.com
Wed Dec 22 14:38:06 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 14423b43d334fd73bdc89526051ae111bd364423
Author: noam.rosenthal at nokia.com <noam.rosenthal at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 14 16:57:00 2010 +0000
2010-10-14 No'am Rosenthal <noam.rosenthal at nokia.com>
Reviewed by Andreas Kling.
[Qt] Text breaking is slow: enable ICU as an opt-in
https://bugs.webkit.org/show_bug.cgi?id=40332
Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
* JavaScriptCore.pri:
* wtf/unicode/qt4/UnicodeQt4.h:
(WTF::Unicode::toLower):
(WTF::Unicode::toUpper):
(WTF::Unicode::toTitleCase):
(WTF::Unicode::foldCase):
(WTF::Unicode::isPrintableChar):
(WTF::Unicode::isSeparatorSpace):
(WTF::Unicode::isPunct):
(WTF::Unicode::isLower):
(WTF::Unicode::mirroredChar):
(WTF::Unicode::combiningClass):
(WTF::Unicode::direction):
(WTF::Unicode::category):
2010-10-14 No'am Rosenthal <noam.rosenthal at nokia.com>
Reviewed by Andreas Kling.
[Qt] Text breaking is slow: enable ICU as an opt-in
https://bugs.webkit.org/show_bug.cgi?id=40332
Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
No new tests, this should be covered by existing tests.
* WebCore.pro:
* platform/text/qt/TextBreakIteratorQt.cpp:
(WebCore::currentTextBreakLocaleID):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69773 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 7a837cf..0162e3e 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,28 @@
+2010-10-14 No'am Rosenthal <noam.rosenthal at nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Text breaking is slow: enable ICU as an opt-in
+ https://bugs.webkit.org/show_bug.cgi?id=40332
+
+ Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
+ Because of the inclusion of ICU headers, some explicit casting was necessary in UnicodeQt4.h
+
+ * JavaScriptCore.pri:
+ * wtf/unicode/qt4/UnicodeQt4.h:
+ (WTF::Unicode::toLower):
+ (WTF::Unicode::toUpper):
+ (WTF::Unicode::toTitleCase):
+ (WTF::Unicode::foldCase):
+ (WTF::Unicode::isPrintableChar):
+ (WTF::Unicode::isSeparatorSpace):
+ (WTF::Unicode::isPunct):
+ (WTF::Unicode::isLower):
+ (WTF::Unicode::mirroredChar):
+ (WTF::Unicode::combiningClass):
+ (WTF::Unicode::direction):
+ (WTF::Unicode::category):
+
2010-10-14 Anton Faern <anton at bladehawke.com>
Reviewed by Csaba Osztrogonác.
diff --git a/JavaScriptCore/JavaScriptCore.pri b/JavaScriptCore/JavaScriptCore.pri
index 57b1ce8..847576d 100644
--- a/JavaScriptCore/JavaScriptCore.pri
+++ b/JavaScriptCore/JavaScriptCore.pri
@@ -54,6 +54,12 @@ win32-*: DEFINES += _HAS_TR1=0
DEFINES += BUILDING_QT__ BUILDING_JavaScriptCore BUILDING_WTF
+# CONFIG += text_breaking_with_icu
+
+contains (CONFIG, text_breaking_with_icu) {
+ DEFINES += WTF_USE_QT_ICU_TEXT_BREAKING=1
+}
+
wince* {
INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/ce-compat
INCLUDEPATH += $$PWD/../JavaScriptCore/os-win32
diff --git a/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h b/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
index 547ed32..eaa7a07 100644
--- a/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
+++ b/JavaScriptCore/wtf/unicode/qt4/UnicodeQt4.h
@@ -31,6 +31,9 @@
#include <config.h>
#include <stdint.h>
+#if USE(QT_ICU_TEXT_BREAKING)
+#include <unicode/ubrk.h>
+#endif
QT_BEGIN_NAMESPACE
namespace QUnicodeTables {
@@ -63,7 +66,10 @@ typedef wchar_t UChar;
#else
typedef uint16_t UChar;
#endif
+
+#if !USE(QT_ICU_TEXT_BREAKING)
typedef uint32_t UChar32;
+#endif
namespace WTF {
namespace Unicode {
@@ -150,7 +156,7 @@ enum CharCategory {
inline UChar32 toLower(UChar32 ch)
{
- return QChar::toLower(ch);
+ return QChar::toLower(uint32_t(ch));
}
inline int toLower(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)
@@ -206,9 +212,9 @@ inline int toLower(UChar* result, int resultLength, const UChar* src, int srcLen
return rindex + needed;
}
-inline UChar32 toUpper(UChar32 ch)
+inline UChar32 toUpper(UChar32 c)
{
- return QChar::toUpper(ch);
+ return QChar::toUpper(uint32_t(c));
}
inline int toUpper(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)
@@ -266,12 +272,12 @@ inline int toUpper(UChar* result, int resultLength, const UChar* src, int srcLen
inline int toTitleCase(UChar32 c)
{
- return QChar::toTitleCase(c);
+ return QChar::toTitleCase(uint32_t(c));
}
inline UChar32 foldCase(UChar32 c)
{
- return QChar::toCaseFolded(c);
+ return QChar::toCaseFolded(uint32_t(c));
}
inline int foldCase(UChar* result, int resultLength, const UChar* src, int srcLength, bool* error)
@@ -296,12 +302,12 @@ inline bool isPrintableChar(UChar32 c)
{
const uint test = U_MASK(QChar::Other_Control) |
U_MASK(QChar::Other_NotAssigned);
- return !(U_MASK(QChar::category(c)) & test);
+ return !(U_MASK(QChar::category(uint32_t(c))) & test);
}
inline bool isSeparatorSpace(UChar32 c)
{
- return QChar::category(c) == QChar::Separator_Space;
+ return QChar::category(uint32_t(c)) == QChar::Separator_Space;
}
inline bool isPunct(UChar32 c)
@@ -313,12 +319,12 @@ inline bool isPunct(UChar32 c)
U_MASK(QChar::Punctuation_InitialQuote) |
U_MASK(QChar::Punctuation_FinalQuote) |
U_MASK(QChar::Punctuation_Other);
- return U_MASK(QChar::category(c)) & test;
+ return U_MASK(QChar::category(uint32_t(c))) & test;
}
inline bool isLower(UChar32 c)
{
- return QChar::category(c) == QChar::Letter_Lowercase;
+ return QChar::category(uint32_t(c)) == QChar::Letter_Lowercase;
}
inline bool hasLineBreakingPropertyComplexContext(UChar32)
@@ -329,12 +335,12 @@ inline bool hasLineBreakingPropertyComplexContext(UChar32)
inline UChar32 mirroredChar(UChar32 c)
{
- return QChar::mirroredChar(c);
+ return QChar::mirroredChar(uint32_t(c));
}
inline uint8_t combiningClass(UChar32 c)
{
- return QChar::combiningClass(c);
+ return QChar::combiningClass(uint32_t(c));
}
inline DecompositionType decompositionType(UChar32 c)
@@ -356,12 +362,12 @@ inline int umemcasecmp(const UChar* a, const UChar* b, int len)
inline Direction direction(UChar32 c)
{
- return (Direction)QChar::direction(c);
+ return (Direction)QChar::direction(uint32_t(c));
}
inline CharCategory category(UChar32 c)
{
- return (CharCategory) U_MASK(QChar::category(c));
+ return (CharCategory) U_MASK(QChar::category(uint32_t(c)));
}
} }
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f923bd9..b123753 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,5 +1,20 @@
2010-10-14 No'am Rosenthal <noam.rosenthal at nokia.com>
+ Reviewed by Andreas Kling.
+
+ [Qt] Text breaking is slow: enable ICU as an opt-in
+ https://bugs.webkit.org/show_bug.cgi?id=40332
+
+ Added a config flag that enables ICU as an opt-in instead of the Qt specific code.
+
+ No new tests, this should be covered by existing tests.
+
+ * WebCore.pro:
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+ (WebCore::currentTextBreakLocaleID):
+
+2010-10-14 No'am Rosenthal <noam.rosenthal at nokia.com>
+
Reviewed by Kenneth Rohde Christiansen.
[Texmap] [Qt] Texture mapper initial implementation
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 4d54920..a0065ec 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -2676,7 +2676,6 @@ SOURCES += \
../WebKit/qt/Api/qwebinspector.cpp \
../WebKit/qt/Api/qwebkitversion.cpp
-
contains(DEFINES, WTF_USE_QT_MOBILE_THEME=1) {
HEADERS += platform/qt/QtMobileWebStyle.h
SOURCES += platform/qt/QtMobileWebStyle.cpp
@@ -2712,6 +2711,11 @@ maemo5 {
LIBS += -lole32
}
+contains (CONFIG, text_breaking_with_icu) {
+ SOURCES += platform/text/TextBreakIteratorICU.cpp
+ LIBS += -licuuc
+}
+
contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) {
SOURCES += plugins/npapi.cpp
diff --git a/WebCore/platform/text/qt/TextBreakIteratorQt.cpp b/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
index dda443f..b9f5a9e 100644
--- a/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
+++ b/WebCore/platform/text/qt/TextBreakIteratorQt.cpp
@@ -33,6 +33,12 @@
namespace WebCore {
+#if USE(QT_ICU_TEXT_BREAKING)
+const char* currentTextBreakLocaleID()
+{
+ return QLocale::system().name().toLatin1();
+}
+#else
static unsigned char buffer[1024];
class TextBreakIterator : public QTextBoundaryFinder {
@@ -135,5 +141,6 @@ namespace WebCore {
{
return true;
}
+#endif
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list