[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

rjw rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:54:27 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit bb73062602f8af75c499929a4745d234ea506df0
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Aug 27 22:57:14 2003 +0000

    	Fixed 3359408.  DON'T treat unicode whitespace as whitespace when collapsing spaces.
    
            Reviewed by David Hyatt.
    
            * khtml/rendering/bidi.cpp:
            * khtml/rendering/render_text.cpp:
            (RenderText::trimmedMinMaxWidth):
            (RenderText::calcMinMaxWidth):
            (RenderText::containsOnlyWhitespace):
            * khtml/xml/dom_stringimpl.cpp:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4905 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 83f806c..3d146da 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,27 @@
+2003-08-27  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3359408.  DON'T treat unicode whitespace as whitespace when collapsing spaces.
+
+        Reviewed by David Hyatt.
+
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+        (RenderText::containsOnlyWhitespace):
+        * khtml/xml/dom_stringimpl.cpp:
+
+2003-08-27  Richard Williamson   <rjw at apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+        (RenderText::containsOnlyWhitespace):
+        * khtml/xml/dom_stringimpl.cpp:
+
 2003-08-27  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3396962, hang on quote.com.  Fieldsets with display:inline should be treated
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 83f806c..3d146da 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,27 @@
+2003-08-27  Richard Williamson   <rjw at apple.com>
+
+	Fixed 3359408.  DON'T treat unicode whitespace as whitespace when collapsing spaces.
+
+        Reviewed by David Hyatt.
+
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+        (RenderText::containsOnlyWhitespace):
+        * khtml/xml/dom_stringimpl.cpp:
+
+2003-08-27  Richard Williamson   <rjw at apple.com>
+
+        Reviewed by NOBODY (OOPS!).
+
+        * khtml/rendering/bidi.cpp:
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+        (RenderText::containsOnlyWhitespace):
+        * khtml/xml/dom_stringimpl.cpp:
+
 2003-08-27  David Hyatt  <hyatt at apple.com>
 
 	Fix for 3396962, hang on quote.com.  Fieldsets with display:inline should be treated
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 3fff66e..d5de0fb 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -338,7 +338,7 @@ static void addRun(BidiRun* bidiRun)
     if (bidiRun->obj && bidiRun->obj->isText()) {
         RenderText* text = static_cast<RenderText*>(bidiRun->obj);
         for (int i = bidiRun->start; i < bidiRun->stop; i++)
-            if (text->text()[i].direction() == QChar::DirWS)
+            if (text->text()[i].unicode() == ' ')
                 numSpaces++;
     }
 }
@@ -705,7 +705,7 @@ void RenderBlock::computeHorizontalPositionsForLine(InlineFlowBox* lineBox, Bidi
                 // get the number of spaces in the run
                 int spaces = 0;
                 for ( int i = r->start; i < r->stop; i++ )
-                    if ( static_cast<RenderText *>(r->obj)->text()[i].direction() == QChar::DirWS )
+                    if ( static_cast<RenderText *>(r->obj)->text()[i].unicode() == ' ' )
                         spaces++;
 
                 KHTMLAssert(spaces <= numSpaces);
@@ -1599,7 +1599,7 @@ BidiIterator RenderBlock::findNextLineBreak(BidiIterator &start)
                 }
                     
                 bool previousCharacterIsSpace = currentCharacterIsSpace;
-                currentCharacterIsSpace = (str[pos].direction() == QChar::DirWS);
+                currentCharacterIsSpace = (str[pos].unicode() == ' ');
                     
                 if (isPre || !currentCharacterIsSpace)
                     isLineEmpty = false;
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 6aa2720..3a01979 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -910,7 +910,7 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
     hasBreakableChar = m_hasBreakableChar;
     hasBreak = m_hasBreak;
 
-    if (stripFrontSpaces && str->s[0].direction() == QChar::DirWS) {
+    if (stripFrontSpaces && str->s[0].unicode() == ' ') {
         const Font *f = htmlFont( false );
         QChar space[1]; space[0] = ' ';
         int spaceWidth = f->width(space, 1, 0);
@@ -996,7 +996,7 @@ void RenderText::calcMinMaxWidth()
         }
         
         bool previousCharacterIsSpace = isSpace;
-        isSpace = str->s[i].direction() == QChar::DirWS;
+        isSpace = str->s[i].unicode() == ' ';
         
         if ((isSpace || isNewline) && i == 0)
             m_hasBeginWS = true;
@@ -1076,7 +1076,7 @@ bool RenderText::containsOnlyWhitespace(unsigned int from, unsigned int len) con
 {
     unsigned int currPos;
     for (currPos = from; 
-         currPos < from+len && (str->s[currPos] == '\n' || str->s[currPos].direction() == QChar::DirWS); 
+         currPos < from+len && (str->s[currPos] == '\n' || str->s[currPos].unicode() == ' '); 
          currPos++);
     return currPos >= (from+len);
 }
diff --git a/WebCore/khtml/xml/dom_stringimpl.cpp b/WebCore/khtml/xml/dom_stringimpl.cpp
index 9773d90..1ef065e 100644
--- a/WebCore/khtml/xml/dom_stringimpl.cpp
+++ b/WebCore/khtml/xml/dom_stringimpl.cpp
@@ -139,10 +139,9 @@ bool DOMStringImpl::containsOnlyWhitespace() const
         if (c.unicode() <= 0x7F) {
             if (!isspace(c.unicode()))
                 return false;
-        } else {
-            if (c.direction() != QChar::DirWS)
-                return false;
-        }
+        } 
+        else
+            return false;
     }
     return true;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list