<rdar://problem/10262225> Allow RenderView to have columns
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 21:14:55 +0000 (21:14 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 8 Nov 2011 21:14:55 +0000 (21:14 +0000)
commit4f91747a6c6a5ac1fb6f0e1588944ff8e57ebb6b
tree69e9bf3fef6301b148161505e8513b153c5e1c11
parentc3fa9c7634962957d435c87303e082fd9ffad110
<rdar://problem/10262225> Allow RenderView to have columns
https://bugs.webkit.org/show_bug.cgi?id=71840

Source/WebCore:

Reviewed by Simon Fraser.

Tests: fast/multicol/pagination-h-horizontal-bt.html
       fast/multicol/pagination-h-horizontal-tb.html
       fast/multicol/pagination-h-vertical-lr.html
       fast/multicol/pagination-h-vertical-rl.html
       fast/multicol/pagination-v-horizontal-bt.html
       fast/multicol/pagination-v-horizontal-tb.html
       fast/multicol/pagination-v-vertical-lr.html
       fast/multicol/pagination-v-vertical-rl.html

* WebCore.exp.in: Export Page::setPagination() for WebCoreTestSupport.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::styleForDocument): Set the column axis and the column gap in the
document style if the view is paginated.
* page/Page.cpp:
(WebCore::Page::setPagination): Added this setter.
* page/Page.h:
(WebCore::Page::Pagination::Pagination):
(WebCore::Page::pagination): Added this getter.
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::requiresColumns): Added and moved some logic to here from...
(WebCore::RenderBlock::setDesiredColumnCountAndWidth): ...here.
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers): Changed to use the new RenderView::backgroundRect()
instead of unscaledDocumentRect().
* rendering/RenderView.cpp:
(WebCore::RenderView::requiresColumns): Added this override that always returns true if the view
is paginated.
(WebCore::RenderView::backgroundRect): Added. In the paginated case, returns a rectangle stretching
across all columns.
* rendering/RenderView.h:
* testing/Internals.cpp:
(WebCore::Internals::reset): Also reset pagination.
(WebCore::Internals::setPagination): Added this setter for testing.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit2:

* win/WebKit2.def: Export Page::setPagination() for WebCoreTestSupport.

LayoutTests:

Reviewed by Simon Fraser.

* fast/multicol/pagination-h-horizontal-bt.html: Added.
* fast/multicol/pagination-h-horizontal-tb.html: Added.
* fast/multicol/pagination-h-vertical-lr.html: Added.
* fast/multicol/pagination-h-vertical-rl.html: Added.
* fast/multicol/pagination-v-horizontal-bt.html: Added.
* fast/multicol/pagination-v-horizontal-tb.html: Added.
* fast/multicol/pagination-v-vertical-lr.html: Added.
* fast/multicol/pagination-v-vertical-rl.html: Added.
* platform/mac/fast/multicol/pagination-h-horizontal-bt-expected.png: Added.
* platform/mac/fast/multicol/pagination-h-horizontal-bt-expected.txt: Added.
* platform/mac/fast/multicol/pagination-h-horizontal-tb-expected.png: Added.
* platform/mac/fast/multicol/pagination-h-horizontal-tb-expected.txt: Added.
* platform/mac/fast/multicol/pagination-h-vertical-lr-expected.png: Added.
* platform/mac/fast/multicol/pagination-h-vertical-lr-expected.txt: Added.
* platform/mac/fast/multicol/pagination-h-vertical-rl-expected.png: Added.
* platform/mac/fast/multicol/pagination-h-vertical-rl-expected.txt: Added.
* platform/mac/fast/multicol/pagination-v-horizontal-bt-expected.png: Added.
* platform/mac/fast/multicol/pagination-v-horizontal-bt-expected.txt: Added.
* platform/mac/fast/multicol/pagination-v-horizontal-tb-expected.png: Added.
* platform/mac/fast/multicol/pagination-v-horizontal-tb-expected.txt: Added.
* platform/mac/fast/multicol/pagination-v-vertical-lr-expected.png: Added.
* platform/mac/fast/multicol/pagination-v-vertical-lr-expected.txt: Added.
* platform/mac/fast/multicol/pagination-v-vertical-rl-expected.png: Added.
* platform/mac/fast/multicol/pagination-v-vertical-rl-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@99613 268f45cc-cd09-0410-ab3c-d52691b4dbfc
40 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/multicol/pagination-h-horizontal-bt.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-h-horizontal-tb.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-h-vertical-lr.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-h-vertical-rl.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-v-horizontal-bt.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-v-horizontal-tb.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-v-vertical-lr.html [new file with mode: 0644]
LayoutTests/fast/multicol/pagination-v-vertical-rl.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-horizontal-bt-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-horizontal-bt-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-horizontal-tb-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-horizontal-tb-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-vertical-lr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-vertical-lr-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-vertical-rl-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-h-vertical-rl-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-horizontal-bt-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-horizontal-bt-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-horizontal-tb-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-horizontal-tb-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-vertical-lr-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-vertical-lr-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-vertical-rl-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/multicol/pagination-v-vertical-rl-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/css/CSSStyleSelector.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/page/Page.h
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlock.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def