[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:58:18 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d3fbba7a034ecf3554696af7070bdf169a6b1db4
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Sep 29 20:27:42 2003 +0000

    	Make sure that timeouts updateRendering after they execute the scheduled timer
    	action.
    
    	Also fixing 3429455, maxwidth of pres miscomputed when two blank lines occur at
    	the end of a pre text run.
    
            Reviewed by darin, mjs (setTimeout fix), darin (pre fix)
    
            * khtml/ecma/kjs_window.cpp:
            (ScheduledAction::execute):
            * khtml/rendering/render_text.cpp:
            (RenderText::trimmedMinMaxWidth):
            (RenderText::calcMinMaxWidth):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5075 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index eb42954..7b7ed84 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,19 @@
+2003-09-29  David Hyatt  <hyatt at apple.com>
+
+	Make sure that timeouts updateRendering after they execute the scheduled timer
+	action.  
+
+	Also fixing 3429455, maxwidth of pres miscomputed when two blank lines occur at
+	the end of a pre text run.
+	
+        Reviewed by darin, mjs (setTimeout fix), darin (pre fix)
+
+        * khtml/ecma/kjs_window.cpp:
+        (ScheduledAction::execute):
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+
 2003-09-29  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index eb42954..7b7ed84 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,19 @@
+2003-09-29  David Hyatt  <hyatt at apple.com>
+
+	Make sure that timeouts updateRendering after they execute the scheduled timer
+	action.  
+
+	Also fixing 3429455, maxwidth of pres miscomputed when two blank lines occur at
+	the end of a pre text run.
+	
+        Reviewed by darin, mjs (setTimeout fix), darin (pre fix)
+
+        * khtml/ecma/kjs_window.cpp:
+        (ScheduledAction::execute):
+        * khtml/rendering/render_text.cpp:
+        (RenderText::trimmedMinMaxWidth):
+        (RenderText::calcMinMaxWidth):
+
 2003-09-29  Darin Adler  <darin at apple.com>
 
         Reviewed by John.
diff --git a/WebCore/khtml/ecma/kjs_window.cpp b/WebCore/khtml/ecma/kjs_window.cpp
index 914a71c..55c2eb3 100644
--- a/WebCore/khtml/ecma/kjs_window.cpp
+++ b/WebCore/khtml/ecma/kjs_window.cpp
@@ -1578,6 +1578,10 @@ void ScheduledAction::execute(Window *window)
 #endif
 	  exec->clearException();
 	}
+
+	// Update our document's rendering following the execution of the timeout callback.
+	DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(window->m_part->document().handle());
+	doc->updateRendering();
       }
     }
   }
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index f479223..c8e468d 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -965,10 +965,10 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
         const Font *f = htmlFont( false );
         bool firstLine = true;
         beginMaxW = endMaxW = maxW;
-        for(int i = 0; i < len; i++)
+        for (int i = 0; i < len; i++)
         {
             int linelen = 0;
-            while( i+linelen < len && str->s[i+linelen] != '\n')
+            while (i+linelen < len && str->s[i+linelen] != '\n')
                 linelen++;
                 
             if (linelen)
@@ -983,13 +983,16 @@ void RenderText::trimmedMinMaxWidth(short& beginMinW, bool& beginWS,
                     beginMaxW = endMaxW;
                 }
                 i += linelen;
-                if (i == len-1)
-                    endMaxW = 0;
             }
             else if (firstLine) {
                 beginMaxW = 0;
                 firstLine = false;
             }
+	    
+	    if (i == len-1)
+	        // A <pre> run that ends with a newline, as in, e.g.,
+	        // <pre>Some text\n\n<span>More text</pre>
+	        endMaxW = 0;
         }
     }
 }
@@ -1086,7 +1089,7 @@ void RenderText::calcMinMaxWidth()
             if(currMinWidth > m_minWidth) m_minWidth = currMinWidth;
             currMinWidth = 0;
                 
-            if (str->s[i] == '\n')
+            if (str->s[i] == '\n' && isPre)
             {
                 if(currMaxWidth > m_maxWidth) m_maxWidth = currMaxWidth;
                 currMaxWidth = 0;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list