[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 08:09:13 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit a7ea61a17b4b381751e9f900b8bf444eadeb90a6
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Nov 4 21:52:08 2003 +0000
Fix for 3472167, for shrink-to-fit style printing, grow the width of the initial containing block
to be as large as the rightmost position after doing a layout to the page width.
Reviewed by john
* kwq/KWQKHTMLPart.mm:
(KWQKHTMLPart::forceLayoutForPageWidth):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7e00e2e..747055c 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,13 @@
+2003-11-03 David Hyatt <hyatt at apple.com>
+
+ Fix for 3472167, for shrink-to-fit style printing, grow the width of the initial containing block
+ to be as large as the rightmost position after doing a layout to the page width.
+
+ Reviewed by john
+
+ * kwq/KWQKHTMLPart.mm:
+ (KWQKHTMLPart::forceLayoutForPageWidth):
+
2003-11-04 Chris Blumenberg <cblu at apple.com>
Fixed:
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index b3d9c91..0ad80d6 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -1351,9 +1351,20 @@ void KWQKHTMLPart::forceLayoutForPageWidth(float pageWidth)
RenderCanvas *root = static_cast<RenderCanvas *>(xmlDocImpl()->renderer());
if (root) {
// This magic is basically copied from khtmlview::print
- root->setWidth((int)ceil(pageWidth));
+ int pageW = (int)ceil(pageWidth);
+ root->setWidth(pageW);
root->setNeedsLayoutAndMinMaxRecalc();
forceLayout();
+
+ // See if we spilled outside our page width. If we did, then we'll do one more layout in an
+ // attempt to fit. FIXME: We are assuming a shrink-to-fit printing implementation. A cropping
+ // implementation should not do this!
+ int rightmostPos = root->rightmostPosition();
+ if (rightmostPos > pageWidth) {
+ root->setWidth(rightmostPos);
+ root->setNeedsLayoutAndMinMaxRecalc();
+ forceLayout();
+ }
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list