Commit 66e1a3a6 authored by dglazkov@chromium.org's avatar dglazkov@chromium.org

2011-03-25 Dimitri Glazkov <dglazkov@chromium.org>

        Reviewed by Adele Peterson.

        REGRESSION(r77257): Only first page of a document is printed
        https://bugs.webkit.org/show_bug.cgi?id=56958

        * printing/page-count-layout-overflow-expected.txt: Added.
        * printing/page-count-layout-overflow.html: Added.
2011-03-25  Dave Hyatt  <hyatt@apple.com>

        Reviewed by Adele Peterson.

        REGRESSION(r77257): Only first page of a document is printed
        https://bugs.webkit.org/show_bug.cgi?id=56958

        Test: printing/page-count-layout-overflow.html

        * page/FrameView.cpp:
        (WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow
            to the right place.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81970 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fede50dd
2011-03-25 Dimitri Glazkov <dglazkov@chromium.org>
Reviewed by Adele Peterson.
REGRESSION(r77257): Only first page of a document is printed
https://bugs.webkit.org/show_bug.cgi?id=56958
* printing/page-count-layout-overflow-expected.txt: Added.
* printing/page-count-layout-overflow.html: Added.
2011-03-25 Maciej Stachowiak <mjs@apple.com>
Reviewed by Antti Koivisto.
......
When printing, layout overflow must be cleared after current document size is queried: PASS
<html>
<head>
<style type="text/css">
p {
font-size: xx-large;
width: 1000px;
height: 100px;
}
</style>
<script type="text/javascript">
function runTest()
{
if (!window.layoutTestController)
return;
layoutTestController.dumpAsText();
var lines = [ 'line<br>' ];
for (var i = 0; i < 7; i++)
lines = lines.concat(lines);
document.body.innerHTML = '<p>' + lines.join('') + '</p>';
document.body.textContent = 'When printing, layout overflow must be cleared after current document size is queried: ' + (layoutTestController.numberOfPages() > 1 ? 'PASS' : 'FAIL');
}
</script>
<head>
<body onload="runTest()">
This test needs window.layoutTestController to run.
</body>
</html>
2011-03-25 Dave Hyatt <hyatt@apple.com>
Reviewed by Adele Peterson.
REGRESSION(r77257): Only first page of a document is printed
https://bugs.webkit.org/show_bug.cgi?id=56958
Test: printing/page-count-layout-overflow.html
* page/FrameView.cpp:
(WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow
to the right place.
2011-03-25 Benjamin Poulain <benjamin.poulain@nokia.com>
Reviewed by Andreas Kling.
......@@ -2420,7 +2420,6 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximu
root->setLogicalWidth(flooredPageLogicalWidth);
root->setNeedsLayoutAndPrefWidthsRecalc();
forceLayout();
root->clearLayoutOverflow();
int docLogicalHeight = root->style()->isHorizontalWritingMode() ? root->docHeight() : root->docWidth();
int docLogicalTop = root->style()->isHorizontalWritingMode() ? root->docTop() : root->docLeft();
int docLogicalRight = root->style()->isHorizontalWritingMode() ? root->docRight() : root->docBottom();
......@@ -2430,6 +2429,7 @@ void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximu
IntRect overflow(clippedLogicalLeft, docLogicalTop, flooredPageLogicalWidth, docLogicalHeight);
if (!root->style()->isHorizontalWritingMode())
overflow = overflow.transposedRect();
root->clearLayoutOverflow();
root->addLayoutOverflow(overflow); // This is how we clip in case we overflow again.
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment