DescriptionMerge 118039 - Source/WebCore: Fix iframe printing.
https://bugs.webkit.org/show_bug.cgi?id=85118
Patch by Vitaly Buka <vitalybuka@chromium.org> on 2012-05-22
Reviewed by Darin Adler, Eric Seidel.
Patch fixed two issues by disabling special handling of subframes for printing.
1. Regression. Division by zero when forceLayoutForPagination called for subframes
and page sizes set to zero.
2. Old issue. RendererView adjusted layout of subframes for printing and set invalid
dimensions. Sometimes it caused missing iframe when printed.
Test: printing/iframe-print.html
* page/Frame.cpp:
(WebCore::Frame::setPrinting): Calls forceLayoutForPagination for root frames only.
(WebCore::Frame::resizePageRectsKeepingRatio): Added ASSERTs to catch division by zero.
* rendering/RenderView.cpp: Replaced printing() with shouldUsePrintingLayout() for most calls.
(WebCore::RenderView::computeLogicalHeight):
(WebCore::RenderView::computeLogicalWidth):
(WebCore::RenderView::layout):
(WebCore::RenderView::shouldUsePrintingLayout): Returns true only if printing enabled and it's a root frame.
(WebCore::RenderView::viewRect):
(WebCore::RenderView::viewHeight):
(WebCore::RenderView::viewWidth):
* rendering/RenderView.h:
TBR=commit-queue@webkit.org,vitalybuka@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=118243
Patch Set 1 #
Messages
Total messages: 2 (0 generated)
|