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

Issue 1510353002: PrintContext::pageProperty() shouldn't use 0 as page height. (Closed)

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

Description

PrintContext::pageProperty() shouldn't use 0 as page height. This function only seems to be used by window.internals, although WebFrame also provides a method that ends up there. It's only partially implemented, though. It recognizes "margin-left", but not "margin-right", for instance. Anyway, use a better page height than 0. Also no need to explicitly lay out the document here, since PrintContext::begin() does it for us. With this change, we no longer need to perform a page height sanity check in LayoutView::layout() before creating a ViewFragmentationContext. R=leviw@chromium.org Committed: https://crrev.com/b2d98f544795e9e7d0e9a8253073747097a1abfa Cr-Commit-Position: refs/heads/master@{#364333}

Patch Set 1 #

Total comments: 2

Patch Set 2 : code review #

Total comments: 2

Patch Set 3 : No need to call updateLayout() manually. PrintContext::begin() does it for us. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html View 1 1 chunk +17 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol-expected.txt View 1 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutView.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/page/PrintContext.cpp View 1 2 1 chunk +3 lines, -2 lines 0 comments Download

Messages

Total messages: 15 (6 generated)
mstensho (USE GERRIT)
Look! I found something for you today after all! :) Not sure if this change ...
5 years ago (2015-12-09 20:30:53 UTC) #1
rune
https://codereview.chromium.org/1510353002/diff/1/third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html File third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html (right): https://codereview.chromium.org/1510353002/diff/1/third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html#newcode12 third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html:12: if (window.testRunner) { You should check for window.internals. With ...
5 years ago (2015-12-09 23:56:39 UTC) #3
mstensho (USE GERRIT)
https://codereview.chromium.org/1510353002/diff/1/third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html File third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html (right): https://codereview.chromium.org/1510353002/diff/1/third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html#newcode12 third_party/WebKit/LayoutTests/printing/pageProperty-with-multicol.html:12: if (window.testRunner) { On 2015/12/09 23:56:38, rune wrote: > ...
5 years ago (2015-12-10 09:07:32 UTC) #4
rune
lgtm https://codereview.chromium.org/1510353002/diff/20001/third_party/WebKit/Source/core/page/PrintContext.cpp File third_party/WebKit/Source/core/page/PrintContext.cpp (left): https://codereview.chromium.org/1510353002/diff/20001/third_party/WebKit/Source/core/page/PrintContext.cpp#oldcode263 third_party/WebKit/Source/core/page/PrintContext.cpp:263: document->updateLayout(); printContext.begin() will update the style/layout. This call ...
5 years ago (2015-12-10 09:44:50 UTC) #5
mstensho (USE GERRIT)
https://codereview.chromium.org/1510353002/diff/20001/third_party/WebKit/Source/core/page/PrintContext.cpp File third_party/WebKit/Source/core/page/PrintContext.cpp (left): https://codereview.chromium.org/1510353002/diff/20001/third_party/WebKit/Source/core/page/PrintContext.cpp#oldcode263 third_party/WebKit/Source/core/page/PrintContext.cpp:263: document->updateLayout(); On 2015/12/10 09:44:50, rune wrote: > printContext.begin() will ...
5 years ago (2015-12-10 09:45:58 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1510353002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1510353002/40001
5 years ago (2015-12-10 09:47:34 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-10 11:52:10 UTC) #12
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/b2d98f544795e9e7d0e9a8253073747097a1abfa Cr-Commit-Position: refs/heads/master@{#364333}
5 years ago (2015-12-10 11:53:54 UTC) #14
leviw_travelin_and_unemployed
5 years ago (2015-12-10 19:38:07 UTC) #15
Message was sent while issue was closed.
On 2015/12/10 at 09:44:50, rune wrote:
> lgtm
> 
>
https://codereview.chromium.org/1510353002/diff/20001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/page/PrintContext.cpp (left):
> 
>
https://codereview.chromium.org/1510353002/diff/20001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/page/PrintContext.cpp:263:
document->updateLayout();
> printContext.begin() will update the style/layout. This call can be removed.

Thanks for the assist :D

Powered by Google App Engine
This is Rietveld 408576698