DescriptionRefuse to paginate if page height is 0.
When printing a document with an IFRAME, we first call
Document::setPrinting(true) on the root document and lay it out, then call
setPrinting(true) on the IFRAME document and lay it out. When we're done
printing, we first call setPrinting(false) on the root document and lay it out.
If this layout pass causes the IFRAME to be resized, we'll lay out the document
inside the IFRAME as well. When reaching LayoutView::layout() for the IFRAME
now, shouldUsePrintingLayout() will return true [1], and we'll establish a
ViewFragmentationContext for the child frame. This is harmful, since page
logical height is 0, and we'd end up dividing by zero when attempting to figure
out how much space we have left on a page for a given offset inside a multicol
container.
[1] shouldUsePrintingLayout() normally returns true for root frames only, with
one exception: if the child document is printing(), while the parent isn't. The
intention with this exception is to be able to print only an IFRAME
(iframeElement.contentWindow.print()), but in this case it had a nasty
side-effect.
BUG=578726
R=leviw@chromium.org
Committed: https://crrev.com/57d2e8b50df8fdef54079ef97960491a4868d0cc
Cr-Commit-Position: refs/heads/master@{#372454}
Patch Set 1 #
Messages
Total messages: 8 (2 generated)
|