Title: [91314] trunk/Source/WebCore
Revision
91314
Author
m...@apple.com
Date
2011-07-19 15:49:32 -0700 (Tue, 19 Jul 2011)

Log Message

Nothing printed when specifying a very large maximum layout width
https://bugs.webkit.org/show_bug.cgi?id=64831

Reviewed by Beth Dakin.

I am not adding a test because the DumpRenderTree printing test machinery is based on PrintContext,
which does not exercise the code path on which this bug lies.

* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination): Fixed an integer overflow.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91313 => 91314)


--- trunk/Source/WebCore/ChangeLog	2011-07-19 22:48:55 UTC (rev 91313)
+++ trunk/Source/WebCore/ChangeLog	2011-07-19 22:49:32 UTC (rev 91314)
@@ -1,3 +1,16 @@
+2011-07-19  Dan Bernstein  <m...@apple.com>
+
+        Nothing printed when specifying a very large maximum layout width
+        https://bugs.webkit.org/show_bug.cgi?id=64831
+
+        Reviewed by Beth Dakin.
+
+        I am not adding a test because the DumpRenderTree printing test machinery is based on PrintContext,
+        which does not exercise the code path on which this bug lies.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::forceLayoutForPagination): Fixed an integer overflow.
+
 2011-07-19  Nate Chapin  <jap...@chromium.org>
 
         [V8] Wait until no v8 context is on the stack before

Modified: trunk/Source/WebCore/page/FrameView.cpp (91313 => 91314)


--- trunk/Source/WebCore/page/FrameView.cpp	2011-07-19 22:48:55 UTC (rev 91313)
+++ trunk/Source/WebCore/page/FrameView.cpp	2011-07-19 22:49:32 UTC (rev 91314)
@@ -2632,7 +2632,7 @@
         bool horizontalWritingMode = root->style()->isHorizontalWritingMode();
         int docLogicalWidth = horizontalWritingMode ? root->documentRect().width() : root->documentRect().height();
         if (docLogicalWidth > pageLogicalWidth) {
-            flooredPageLogicalWidth = std::min<int>(docLogicalWidth, pageLogicalWidth * maximumShrinkFactor);
+            flooredPageLogicalWidth = std::min<float>(docLogicalWidth, pageLogicalWidth * maximumShrinkFactor);
             if (pageLogicalHeight)
                 root->setPageLogicalHeight(flooredPageLogicalWidth / pageSize.width() * pageSize.height());
             root->setLogicalWidth(flooredPageLogicalWidth);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to