Fix for 3625611, images offset on first visit to page. The method for determining...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jul 2004 00:05:42 +0000 (00:05 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Jul 2004 00:05:42 +0000 (00:05 +0000)
flawed and would incorrectly miss dirty lines that occurred after the first clean line.

        Reviewed by john

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::determineEndPosition):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@7034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/bidi.cpp

index 585978f698ba8bd1b44b4330f1558af888db33b7..866c188e2913f82a8e06b75ff76ccdcf0ce7f9d4 100644 (file)
@@ -1,3 +1,13 @@
+2004-07-15  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3625611, images offset on first visit to page.  The method for determining the last clean line was
+       flawed and would incorrectly miss dirty lines that occurred after the first clean line.
+       
+        Reviewed by john
+
+        * khtml/rendering/bidi.cpp:
+        (khtml::RenderBlock::determineEndPosition):
+
 2004-07-15  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by John
index 576ba79af6898553ecb6908835c7b5b37e1c9dac..c84d5f454c50177124a537bbab2b41a6e39d0146 100644 (file)
@@ -1650,12 +1650,15 @@ RootInlineBox* RenderBlock::determineEndPosition(RootInlineBox* startLine, BidiI
                                                  int& yPos)
 {
     RootInlineBox* last = 0;
-    if (m_linesAppended)
+    if (m_linesAppended || !startLine)
         last = 0;
     else {
-        for (RootInlineBox* curr = startLine; curr; curr = curr->nextRootBox())
-            if (curr->isDirty() && curr->nextRootBox() && !curr->nextRootBox()->isDirty())
-                last = curr->nextRootBox();
+        for (RootInlineBox* curr = startLine->nextRootBox(); curr; curr = curr->nextRootBox()) {
+            if (curr->isDirty())
+                last = 0;
+            else if (!last)
+                last = curr;
+        }
     }
     
     if (!last)