Title: [94525] trunk/Source/WebCore
- Revision
- 94525
- Author
- [email protected]
- Date
- 2011-09-05 05:08:12 -0700 (Mon, 05 Sep 2011)
Log Message
[Qt] Compiling using system ICU uses QTextBreakIterator in some cases.
https://bugs.webkit.org/show_bug.cgi?id=67391
Patch by Alexander Færøy <[email protected]> on 2011-09-05
Reviewed by Kenneth Rohde Christiansen.
* platform/text/TextBoundaries.cpp:
* platform/text/TextBreakIteratorICU.cpp:
* platform/text/qt/TextBoundariesQt.cpp:
* platform/text/qt/TextBreakIteratorQt.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (94524 => 94525)
--- trunk/Source/WebCore/ChangeLog 2011-09-05 10:53:32 UTC (rev 94524)
+++ trunk/Source/WebCore/ChangeLog 2011-09-05 12:08:12 UTC (rev 94525)
@@ -1,3 +1,15 @@
+2011-09-05 Alexander Færøy <[email protected]>
+
+ [Qt] Compiling using system ICU uses QTextBreakIterator in some cases.
+ https://bugs.webkit.org/show_bug.cgi?id=67391
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ * platform/text/TextBoundaries.cpp:
+ * platform/text/TextBreakIteratorICU.cpp:
+ * platform/text/qt/TextBoundariesQt.cpp:
+ * platform/text/qt/TextBreakIteratorQt.cpp:
+
2011-09-05 Kaustubh Atrawalkar <[email protected]>
Logic from HTMLElement::deprecatedCreateContextualFragment moved into
Modified: trunk/Source/WebCore/platform/text/TextBoundaries.cpp (94524 => 94525)
--- trunk/Source/WebCore/platform/text/TextBoundaries.cpp 2011-09-05 10:53:32 UTC (rev 94524)
+++ trunk/Source/WebCore/platform/text/TextBoundaries.cpp 2011-09-05 12:08:12 UTC (rev 94525)
@@ -60,7 +60,7 @@
return 0;
}
-#if !PLATFORM(BREWMP) && !PLATFORM(MAC) && !PLATFORM(QT)
+#if !PLATFORM(BREWMP) && !PLATFORM(MAC) && USE(ICU_UNICODE)
int findNextWordFromIndex(const UChar* chars, int len, int position, bool forward)
{
Modified: trunk/Source/WebCore/platform/text/TextBreakIteratorICU.cpp (94524 => 94525)
--- trunk/Source/WebCore/platform/text/TextBreakIteratorICU.cpp 2011-09-05 10:53:32 UTC (rev 94524)
+++ trunk/Source/WebCore/platform/text/TextBreakIteratorICU.cpp 2011-09-05 12:08:12 UTC (rev 94525)
@@ -29,6 +29,8 @@
namespace WebCore {
+#if USE(ICU_UNICODE)
+
static TextBreakIterator* setUpIterator(bool& createdIterator, TextBreakIterator*& iterator,
UBreakIteratorType type, const UChar* string, int length)
{
@@ -251,4 +253,6 @@
return setUpIteratorWithRules(createdCursorMovementIterator, staticCursorMovementIterator, kRules, string, length);
}
+#endif
+
}
Modified: trunk/Source/WebCore/platform/text/qt/TextBoundariesQt.cpp (94524 => 94525)
--- trunk/Source/WebCore/platform/text/qt/TextBoundariesQt.cpp 2011-09-05 10:53:32 UTC (rev 94524)
+++ trunk/Source/WebCore/platform/text/qt/TextBoundariesQt.cpp 2011-09-05 12:08:12 UTC (rev 94525)
@@ -33,13 +33,12 @@
#include <QString>
#include <QChar>
-#include <QDebug>
-#include <stdio.h>
-
#include <qtextboundaryfinder.h>
namespace WebCore {
+#if !USE(ICU_UNICODE)
+
int findNextWordFromIndex(UChar const* buffer, int len, int position, bool forward)
{
QString str(reinterpret_cast<QChar const*>(buffer), len);
@@ -73,5 +72,7 @@
*end = position == len ? len : iterator.toNextBoundary();
}
+#endif
+
}
Modified: trunk/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp (94524 => 94525)
--- trunk/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp 2011-09-05 10:53:32 UTC (rev 94524)
+++ trunk/Source/WebCore/platform/text/qt/TextBreakIteratorQt.cpp 2011-09-05 12:08:12 UTC (rev 94525)
@@ -36,6 +36,8 @@
namespace WebCore {
+#if !USE(ICU_UNICODE)
+
class TextBreakIterator : public QTextBoundaryFinder {
public:
TextBreakIterator(QTextBoundaryFinder::BoundaryType type, const QString& string)
@@ -150,4 +152,6 @@
return true;
}
+#endif
+
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes