4115ede736
https://bugs.webkit.org/show_bug.cgi?id=108382 Reviewed by David Hyatt. Source/WebCore: r128517 clean up our containing block finding logic, but broke percentage heights in quirks mode during printing since the RenderView would have 0 height. Turns out we already had a long-standing bug where we'd incorrectly treat collapse percentage heights on the body when printing as well. Fix both bugs by changing the way we grab the logical height on the RenderView. RenderView::computeLogicalHeight returns 0 when printing. For the purposes of stretching and percentage heights, we instead need to return the pageLogicalHeight. Tests: printing/quirks-percentage-height-body.html printing/quirks-percentage-height.html printing/standards-percentage-heights.html * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalHeight): This FIXME is outdated and already fixed. Also, call viewLogicalHeightForPercentages which does the same logic except also correctly handles column RenderViews. (WebCore::RenderBox::viewLogicalHeightForPercentages): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBox.h: * rendering/RenderBox.cpp: (WebCore::RenderBox::computeLogicalHeight): (WebCore::RenderBox::viewLogicalHeightForPercentages): (WebCore): (WebCore::RenderBox::computePercentageLogicalHeight): * rendering/RenderBox.h: (RenderBox): LayoutTests: * platform/chromium/fast/multicol/shrink-to-column-height-for-pagination-expected.txt: We're just clipping more content that you can't scroll to anyways. This looks like an improvement to me. * printing/css2.1/page-break-inside-000-expected.txt: We pass this test now! * printing/quirks-percentage-height-body-expected.html: Added. * printing/quirks-percentage-height-body.html: Added. * printing/quirks-percentage-height-expected.html: Added. * printing/quirks-percentage-height.html: Added. * printing/standards-percentage-heights-expected.html: Added. * printing/standards-percentage-heights.html: Added. Canonical link: https://commits.webkit.org/126729@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141459 268f45cc-cd09-0410-ab3c-d52691b4dbfc |
||
---|---|---|
.. | ||
README.txt | ||
page-break-after-000-expected.txt | ||
page-break-after-000.html | ||
page-break-after-001-expected.txt | ||
page-break-after-001.html | ||
page-break-after-002-expected.txt | ||
page-break-after-002.html | ||
page-break-after-003-expected.txt | ||
page-break-after-003.html | ||
page-break-after-004-expected.txt | ||
page-break-after-004.html | ||
page-break-before-000-expected.txt | ||
page-break-before-000.html | ||
page-break-before-001-expected.txt | ||
page-break-before-001.html | ||
page-break-before-002-expected.txt | ||
page-break-before-002.html | ||
page-break-inside-000-expected.txt | ||
page-break-inside-000.html |
README.txt
This is the modified version of W3C's CSS2.1 test suite. http://www.w3.org/Style/CSS/Test/CSS2.1/20100127/html4/chapter-13.htm We maintain the hand-modified version because adding unmodified printing related tests into LayoutTests/css2.1 directory doesn't make sense at all. We need the following modifications to add W3C's test into this directory: - Eliminate tabs. - Add dumpAsText() call. - Add test() function and implement it using testRunner functions. - Call test() function using runPrintintTest(test) from body's onload. - Add id attributes for elements in question. FIXME: page-margin-* aren't added yet. We may need testRunner APIs to test margins.