Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans...
authorrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2005 00:47:48 +0000 (00:47 +0000)
committerrjw <rjw@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Mar 2005 00:47:48 +0000 (00:47 +0000)
The problem was due to incorrect "object truncation" in  RenderFlow::paintLines.
We attempt to push objects down if they don't fit on a page at
paint time.  If the attempt to push object down failed we just
didn't paint at all.

        Reviewed by Hyatt.

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLines):

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

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

index 3e9441121f64852493274fc3adaa2fbd8be151f6..458d65f1c198b7fa322428525ceafdea60ba4cfd 100644 (file)
@@ -1,3 +1,17 @@
+2005-03-01  Richard Williamson   <rjw@apple.com>
+
+       Fixed <rdar://problem/3990258> REGRESSION (125.12-181): top of picture that spans two pages is cut off on print from Safari
+
+       The problem was due to incorrect "object truncation" in  RenderFlow::paintLines.  
+       We attempt to push objects down if they don't fit on a page at
+       paint time.  If the attempt to push object down failed we just
+       didn't paint at all.
+
+        Reviewed by Hyatt.
+
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::paintLines):
+
 2005-03-01  Chris Blumenberg  <cblu@apple.com>
 
        Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
 2005-03-01  Chris Blumenberg  <cblu@apple.com>
 
        Fixed: <rdar://problem/4030669> smart delete does not delete spaces from pasted content
index a6dce59434afc4a9e9e2b21b42860cc61bcda664..bdff777623670f936cdf1ea077e43f33d90f5cc1 100644 (file)
@@ -382,8 +382,9 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
                 if (_ty + curr->root()->bottomOverflow() > c->printRect().y() + c->printRect().height()) {
                     if (_ty + curr->root()->topOverflow() < c->truncatedAt())
                         c->setBestTruncatedAt(_ty + curr->root()->topOverflow(), this);
                 if (_ty + curr->root()->bottomOverflow() > c->printRect().y() + c->printRect().height()) {
                     if (_ty + curr->root()->topOverflow() < c->truncatedAt())
                         c->setBestTruncatedAt(_ty + curr->root()->topOverflow(), this);
-                    // Let's stop here.
-                    break;
+                    // If we were able to truncate, don't paint.
+                    if (_ty + curr->root()->topOverflow() >= c->truncatedAt())
+                        break;
                 }
             }
         }
                 }
             }
         }