[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
hyatt
hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:59:31 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 51546c1c1e47c5692d5ebe3c7ea046992b2ba006
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 2 23:28:33 2003 +0000
Remove the speed hit from using the UC break locators by not using them when
checking if the current character is and by also using a global text
break locator object.
Reviewed by rjw
* khtml/rendering/break_lines.cpp:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index c9c1b71..46ae7f0 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,13 @@
+2003-10-02 David Hyatt <hyatt at apple.com>
+
+ Remove the speed hit from using the UC break locators by not using them when
+ checking if the current character is and by also using a global text
+ break locator object.
+
+ Reviewed by rjw
+
+ * khtml/rendering/break_lines.cpp:
+
=== Safari-108 ===
2003-10-02 Maciej Stachowiak <mjs at apple.com>
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c9c1b71..46ae7f0 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-10-02 David Hyatt <hyatt at apple.com>
+
+ Remove the speed hit from using the UC break locators by not using them when
+ checking if the current character is and by also using a global text
+ break locator object.
+
+ Reviewed by rjw
+
+ * khtml/rendering/break_lines.cpp:
+
=== Safari-108 ===
2003-10-02 Maciej Stachowiak <mjs at apple.com>
diff --git a/WebCore/khtml/rendering/break_lines.cpp b/WebCore/khtml/rendering/break_lines.cpp
index e077691..2f06878 100644
--- a/WebCore/khtml/rendering/break_lines.cpp
+++ b/WebCore/khtml/rendering/break_lines.cpp
@@ -78,31 +78,30 @@ bool isBreakable( const QChar *s, int pos, int len)
}
return false;
#else
- OSStatus status, findStatus = 0;
- TextBreakLocatorRef breakLocator;
+ OSStatus status = 0, findStatus = 0;
+ static TextBreakLocatorRef breakLocator = 0;
UniCharArrayOffset end;
const QChar *c = s+pos;
unsigned short ch = c->unicode();
-
- if (ch == '\n'){
+
+ // Newlines are always breakable.
+ if (ch == '\n')
return true;
- }
// If current character, or the previous character aren't simple latin1 then
// use the UC line break locator. UCFindTextBreak will report false if we
// have a sequence of 0xa0 0x20 (nbsp, sp), so we explicity check for that
// case.
unsigned short lastCh = pos > 0 ? (s+pos-1)->unicode() : 0;
- if (ch > 0x7f || (lastCh > 0x7f && lastCh != 0xa0)){
- status = UCCreateTextBreakLocator (NULL, 0, kUCTextBreakLineMask, &breakLocator);
- if (status == 0){
+ if ((ch > 0x7f && ch != 0xa0) || (lastCh > 0x7f && lastCh != 0xa0)) {
+ if (!breakLocator)
+ status = UCCreateTextBreakLocator (NULL, 0, kUCTextBreakLineMask, &breakLocator);
+ if (status == 0)
findStatus = UCFindTextBreak (breakLocator, kUCTextBreakLineMask, NULL, (const UniChar *)s, len, pos, &end);
- UCDisposeTextBreakLocator(&breakLocator);
- }
+
// If carbon fails, fail back on simple white space detection.
- if (findStatus == 0){
+ if (findStatus == 0)
return ((int)end == pos) ? true : false;
- }
}
// What about hypenation?
return c->direction() == QChar::DirWS;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list