https://bugs.webkit.org/show_bug.cgi?id=51328
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Jan 2011 18:55:03 +0000 (18:55 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Jan 2011 18:55:03 +0000 (18:55 +0000)
commit91797dc3ab8c54187b54a4e1a53889637266bdd0
tree26afb2f83f77d295d4eceebf416c25facf0fdadf
parent7f789ff8ba260c20f276047fca9d58bd668e6d72
https://bugs.webkit.org/show_bug.cgi?id=51328

Reviewed by Simon Fraser.

WebCore:

Printing on a page with body { height: 100% } clips out the overflow contents.  This happened
because the computePageRects function was never correct.  It was using the layer's width and height
for the document's width and height, and the layer no longer includes overflow in its width and
height.  It was also incorrectly assuming the first page would begin at (0,0), and this is an invalid
assumption in RTL or vertical text environments.

Added printing/page-count-percentage-height.html

* page/PrintContext.cpp:
(WebCore::PrintContext::computePageRects):
(WebCore::PrintContext::computePageRectsWithPageSizeInternal):

LayoutTests:

Add layout test for printing clipping bug.

* printing/page-count-percentage-height-expected.txt: Added.
* printing/page-count-percentage-height.html: Added.
* printing/script-tests/page-count-percentage-height.js: Added.
(test):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@74908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/printing/page-count-percentage-height-expected.txt [new file with mode: 0644]
LayoutTests/printing/page-count-percentage-height.html [new file with mode: 0644]
LayoutTests/printing/script-tests/page-count-percentage-height.js [new file with mode: 0644]
WebCore/ChangeLog
WebCore/page/PrintContext.cpp