[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:17:25 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 8f03ce2d53a67322a2f491811172cbb5e8282008
Author: rjw <rjw at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Dec 25 20:09:07 2002 +0000

            Fix for 3134543 (and widely reported dupes).  Don't use render_text
            widths cache except for whitespace == PRE.  The problem was that additional
            spaces in the RenderText's string were being inappropiately measured.
            An alternate, more complex and risky, fix would account for the whitespace
            properties during scanning of the RenderText width buffer.  Considering
            the scenario for which this optimization was added (3133261), this
            simpler fix is adequate.
    
            Reviewed by Darin and Don.
    
            * khtml/rendering/render_text.cpp:
            (RenderText::computeWidths):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3186 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index f125f9c..741e25d 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,18 @@
+2002-12-24  Richard Williamson   <rjw at apple.com>
+
+        Fix for 3134543 (and widely reported dupes).  Don't use render_text
+        widths cache except for whitespace == PRE.  The problem was that additional
+        spaces in the RenderText's string were being inappropiately measured.
+        An alternate, more complex and risky, fix would account for the whitespace
+        properties during scanning of the RenderText width buffer.  Considering 
+        the scenario for which this optimization was added (3133261), this
+        simpler fix is adequate.
+        
+        Reviewed by Darin and Don.
+
+        * khtml/rendering/render_text.cpp:
+        (RenderText::computeWidths):
+
 2002-12-24  Darin Adler  <darin at apple.com>
 
         Reviewed by Don.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f125f9c..741e25d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,18 @@
+2002-12-24  Richard Williamson   <rjw at apple.com>
+
+        Fix for 3134543 (and widely reported dupes).  Don't use render_text
+        widths cache except for whitespace == PRE.  The problem was that additional
+        spaces in the RenderText's string were being inappropiately measured.
+        An alternate, more complex and risky, fix would account for the whitespace
+        properties during scanning of the RenderText width buffer.  Considering 
+        the scenario for which this optimization was added (3133261), this
+        simpler fix is adequate.
+        
+        Reviewed by Darin and Don.
+
+        * khtml/rendering/render_text.cpp:
+        (RenderText::computeWidths):
+
 2002-12-24  Darin Adler  <darin at apple.com>
 
         Reviewed by Don.
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 0857425..853d155 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -794,13 +794,16 @@ void RenderText::computeWidths()
             m_widths = 0;
         }
 
-        if (str->l > MIN_STRING_LENGTH_FOR_WIDTH_CACHE){
+        // Only cache widths array if style()->whiteSpace() == PRE.  This prevents
+        // inappropriate mismeasurement of extra whitespace embedded in the string.
+        if (str->l >= MIN_STRING_LENGTH_FOR_WIDTH_CACHE && style()->whiteSpace() == PRE){
             m_widths = (float *)malloc(str->l * sizeof(float));
             f->floatCharacterWidths( str->s, str->l, 0, str->l, 0, m_widths);
         }
     }
 }
 
+
 inline int RenderText::widthFromBuffer(const Font *f, int start, int len) const
 {
     float width = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list