Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Issue 1603613002: Refuse to paginate if page height is 0. (Closed)

Created:
4 years, 11 months ago by mstensho (USE GERRIT)
Modified:
4 years, 10 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, mstensho (USE GERRIT), pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refuse 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
A third_party/WebKit/LayoutTests/printing/resources/viewport-sized-multicol.html View 1 chunk +2 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/printing/viewport-size-dependant-iframe-with-multicol-crash.html View 1 chunk +3 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/printing/viewport-size-dependant-iframe-with-multicol-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (2 generated)
mstensho (USE GERRIT)
4 years, 11 months ago (2016-01-18 18:01:32 UTC) #1
mstensho (USE GERRIT)
I know I'm a wimp for adding this check, but I realized there was no ...
4 years, 10 months ago (2016-01-29 08:10:06 UTC) #2
leviw_travelin_and_unemployed
lgtm
4 years, 10 months ago (2016-01-29 22:00:46 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1603613002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1603613002/1
4 years, 10 months ago (2016-01-29 22:03:49 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 10 months ago (2016-01-29 23:14:19 UTC) #6
commit-bot: I haz the power
4 years, 10 months ago (2016-01-29 23:15:14 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/57d2e8b50df8fdef54079ef97960491a4868d0cc
Cr-Commit-Position: refs/heads/master@{#372454}

Powered by Google App Engine
This is Rietveld 408576698