| Differences between
and this patch
- a/LayoutTests/ChangeLog +10 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-03-25  Dimitri Glazkov  <dglazkov@chromium.org>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        REGRESSION(r77257): Only first page of a document is printed
6
        https://bugs.webkit.org/show_bug.cgi?id=56958
7
8
        * printing/page-count-layout-overflow-expected.txt: Added.
9
        * printing/page-count-layout-overflow.html: Added.
10
1
2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
11
2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
2
12
3
        Reviewed by Pavel Feldman.
13
        Reviewed by Pavel Feldman.
- a/LayoutTests/printing/page-count-layout-overflow-expected.txt +1 lines
Line 0 a/LayoutTests/printing/page-count-layout-overflow-expected.txt_sec1
1
When printing, layout overflow must be cleared after current document size is queried: PASS
- a/LayoutTests/printing/page-count-layout-overflow.html +32 lines
Line 0 a/LayoutTests/printing/page-count-layout-overflow.html_sec1
1
<html>
2
<head>
3
<style type="text/css">
4
5
p {
6
    font-size: xx-large;
7
    width: 1000px;
8
    height: 100px;
9
}
10
11
</style>
12
<script type="text/javascript">
13
14
function runTest()
15
{
16
    if (!window.layoutTestController)
17
        return;
18
19
    layoutTestController.dumpAsText();
20
    var lines = [ 'line<br>' ];
21
    for (var i = 0; i < 7; i++)
22
        lines = lines.concat(lines);
23
    document.body.innerHTML = '<p>' + lines.join('') + '</p>';
24
    document.body.textContent = 'When printing, layout overflow must be cleared after current document size is queried: ' +  (layoutTestController.numberOfPages() > 1 ? 'PASS' : 'FAIL');
25
}
26
27
</script>
28
<head>
29
<body onload="runTest()">
30
This test needs window.layoutTestController to run.
31
</body>
32
</html>
- a/Source/WebCore/ChangeLog +13 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-03-25  Dave Hyatt  <hyatt@apple.com>
2
3
        Reviewed by NOBODY (OOPS!).
4
5
        REGRESSION(r77257): Only first page of a document is printed
6
        https://bugs.webkit.org/show_bug.cgi?id=56958
7
8
        Test: printing/page-count-layout-overflow.html
9
10
        * page/FrameView.cpp:
11
        (WebCore::FrameView::forceLayoutForPagination): Moved clearing of overflow
12
            to the right place.
13
1
2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
14
2011-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
2
15
3
        Reviewed by Pavel Feldman.
16
        Reviewed by Pavel Feldman.
- a/Source/WebCore/page/FrameView.cpp -1 / +1 lines
Lines 2420-2426 void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximu a/Source/WebCore/page/FrameView.cpp_sec1
2420
            root->setLogicalWidth(flooredPageLogicalWidth);
2420
            root->setLogicalWidth(flooredPageLogicalWidth);
2421
            root->setNeedsLayoutAndPrefWidthsRecalc();
2421
            root->setNeedsLayoutAndPrefWidthsRecalc();
2422
            forceLayout();
2422
            forceLayout();
2423
            root->clearLayoutOverflow();
2424
            int docLogicalHeight = root->style()->isHorizontalWritingMode() ? root->docHeight() : root->docWidth();
2423
            int docLogicalHeight = root->style()->isHorizontalWritingMode() ? root->docHeight() : root->docWidth();
2425
            int docLogicalTop = root->style()->isHorizontalWritingMode() ? root->docTop() : root->docLeft();
2424
            int docLogicalTop = root->style()->isHorizontalWritingMode() ? root->docTop() : root->docLeft();
2426
            int docLogicalRight = root->style()->isHorizontalWritingMode() ? root->docRight() : root->docBottom();
2425
            int docLogicalRight = root->style()->isHorizontalWritingMode() ? root->docRight() : root->docBottom();
Lines 2430-2435 void FrameView::forceLayoutForPagination(const FloatSize& pageSize, float maximu a/Source/WebCore/page/FrameView.cpp_sec2
2430
            IntRect overflow(clippedLogicalLeft, docLogicalTop, flooredPageLogicalWidth, docLogicalHeight);
2429
            IntRect overflow(clippedLogicalLeft, docLogicalTop, flooredPageLogicalWidth, docLogicalHeight);
2431
            if (!root->style()->isHorizontalWritingMode())
2430
            if (!root->style()->isHorizontalWritingMode())
2432
                overflow = overflow.transposedRect();
2431
                overflow = overflow.transposedRect();
2432
            root->clearLayoutOverflow();
2433
            root->addLayoutOverflow(overflow); // This is how we clip in case we overflow again.
2433
            root->addLayoutOverflow(overflow); // This is how we clip in case we overflow again.
2434
        }
2434
        }
2435
    }
2435
    }

Return to Bug 56958