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


The following commit has been merged in the debian/unstable branch:
commit a18024a4fe8a36065aa361cd0bc33e2e5b6f8813
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Dec 21 02:25:35 2002 +0000

    	Fix for 3134133. Back out the render_text code I gave to rjw
    	to check in.  It wasn't filling in a value for hasBreak, so it
    	became random whether or not you'd break or not.
    
            Reviewed by rjw
    
            * khtml/rendering/render_text.cpp:
            (RenderText::trimmedMinMaxWidth):
            (RenderText::calcMinMaxWidth):
            * khtml/rendering/render_text.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3166 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 36ceb07..7d0ae26 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,16 @@
+2002-12-20  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3134133. Back out the render_text code I gave to rjw
+	to check in.  It wasn't filling in a value for hasBreak, so it
+	became random whether or not you'd break or not.
+	
+        Reviewed by rjw
+
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+        * khtml/rendering/render_text.h:
+
 2002-12-20  Darin Adler  <darin at apple.com>
 
         Reviewed by Trey.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 36ceb07..7d0ae26 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,16 @@
+2002-12-20  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3134133. Back out the render_text code I gave to rjw
+	to check in.  It wasn't filling in a value for hasBreak, so it
+	became random whether or not you'd break or not.
+	
+        Reviewed by rjw
+
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+        * khtml/rendering/render_text.h:
+
 2002-12-20  Darin Adler  <darin at apple.com>
 
         Reviewed by Trey.
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 883d538..0857425 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -837,6 +837,7 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
     endMinW = m_endMinWidth;
     
     hasBreakableChar = m_hasBreakableChar;
+    hasBreak = m_hasBreak;
     
     if (len == 0)
         return;
@@ -855,8 +856,38 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
     else if (minW > maxW)
         minW = maxW;
         
-    beginMaxW = m_beginMaxWidth;
-    endMaxW = m_endMaxWidth;
+    // Compute our max widths by scanning the string for newlines.
+    if (hasBreak) {
+        const Font *f = htmlFont( false );
+        bool firstLine = true;
+        beginMaxW = endMaxW = maxW;
+        for(int i = 0; i < len; i++)
+        {
+            int linelen = 0;
+            while( i+linelen < len && str->s[i+linelen] != '\n')
+                linelen++;
+                
+            if (linelen)
+            {
+#if !APPLE_CHANGES
+                endMaxW = f->width(str->s, str->l, i, linelen);
+#else
+                endMaxW = widthFromBuffer(f, i, linelen);
+#endif
+                if (firstLine) {
+                    firstLine = false;
+                    beginMaxW = endMaxW;
+                }
+                i += linelen;
+                if (i == len-1)
+                    endMaxW = 0;
+            }
+            else if (firstLine) {
+                beginMaxW = 0;
+                firstLine = false;
+            }
+        }
+    }
 }
 
 void RenderText::calcMinMaxWidth()
@@ -865,7 +896,7 @@ void RenderText::calcMinMaxWidth()
 
     // ### calc Min and Max width...
     m_minWidth = m_beginMinWidth = m_endMinWidth = 0;
-    m_maxWidth = m_beginMaxWidth = m_endMaxWidth = 0;
+    m_maxWidth = 0;
 
     if (isBR())
         return;
@@ -963,39 +994,6 @@ void RenderText::calcMinMaxWidth()
     if (style()->whiteSpace() == NOWRAP)
         m_minWidth = m_maxWidth;
 
-    // Compute our max widths by scanning the string for newlines.
-    m_beginMaxWidth = m_endMaxWidth = m_maxWidth;
-    if (m_hasBreak) {
-        const Font *f = htmlFont( false );
-        bool firstLine = true;
-        for(int i = 0; i < len; i++)
-        {
-            int linelen = 0;
-            while( i+linelen < len && str->s[i+linelen] != '\n')
-                linelen++;
-                
-            if (linelen)
-            {
-#if !APPLE_CHANGES
-                m_endMaxWidth = f->width(str->s, str->l, i, linelen);
-#else
-                m_endMaxWidth = widthFromBuffer(f, i, linelen);
-#endif
-                if (firstLine) {
-                    firstLine = false;
-                    m_beginMaxWidth = m_endMaxWidth;
-                }
-                i += linelen;
-                if (i == len-1)
-                    m_endMaxWidth = 0;
-            }
-            else if (firstLine) {
-                m_beginMaxWidth = 0;
-                firstLine = false;
-            }
-        }
-    }
-
     setMinMaxKnown();
     //kdDebug( 6040 ) << "Text::calcMinMaxWidth(): min = " << m_minWidth << " max = " << m_maxWidth << endl;
 }
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index 6c1fd18..0507a52 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -238,8 +238,6 @@ protected: // members
     short m_maxWidth;
     short m_beginMinWidth;
     short m_endMinWidth;
-    short m_beginMaxWidth;
-    short m_endMaxWidth;
     
     SelectionState m_selectionState : 3 ;
     bool m_hasBreakableChar : 1; // Whether or not we can be broken into multiple lines.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list