Original patch by Mihnea Ovidenie <mihnea@adobe.com>.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 17:22:25 +0000 (17:22 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Aug 2011 17:22:25 +0000 (17:22 +0000)
commit196b2df662bb7cea4ca94268b2f728c5aa3328e8
treee86492373d986c9317f0959ef37cbf9bb0b8ced8
parentfe68411a4e2374660bc219533c535556bf1407e8
Original patch by Mihnea Ovidenie <mihnea@adobe.com>.
Also contains some improvements done by Dave Hyatt <hyatt@apple.com>.

[CSSRegions]RenderFlowThread should display its content using RenderRegion
https://bugs.webkit.org/show_bug.cgi?id=65627

Source/WebCore:

RenderFlowThread collects RenderObjects from a flow. These objects are displayed by means
of RenderRegion objects that get the content from the same flow.

Patch by Alexandru Chiculita <achicu@adobe.com> on 2011-08-12
Reviewed by David Hyatt.

Tests: fast/regions/content-flowed-into-regions-dynamically-added.html
       fast/regions/content-flowed-into-regions-dynamically-removed.html
       fast/regions/content-flowed-into-regions-with-dyn-index.html
       fast/regions/content-flowed-into-regions-with-index-dom.html
       fast/regions/content-flowed-into-regions-with-index.html
       fast/regions/content-flowed-into-regions.html
       fast/regions/flow-content-basic-vertical-rl.html
       fast/regions/flow-content-basic-vertical.html

* dom/Node.cpp:
(WebCore::Node::diff):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::RenderFlowThread):
(WebCore::RenderFlowThread::createFlowThreadStyle):
(WebCore::RenderFlowThread::styleDidChange):
(WebCore::compareRenderRegions):
(WebCore::RenderFlowThread::addRegionToThread):
(WebCore::RenderFlowThread::removeRegionFromThread):
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::computeLogicalWidth):
(WebCore::RenderFlowThread::computeLogicalHeight):
(WebCore::RenderFlowThread::paintIntoRegion):
* rendering/RenderFlowThread.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::RenderRegion):
(WebCore::RenderRegion::~RenderRegion):
(WebCore::RenderRegion::paint):
(WebCore::RenderRegion::styleDidChange):
* rendering/RenderRegion.h:
(WebCore::RenderRegion::setRegionRect):
(WebCore::RenderRegion::regionRect):
* rendering/RenderTreeAsText.cpp:
(WebCore::writeLayers):
* rendering/RenderView.cpp:
(WebCore::RenderView::styleDidChange):
(WebCore::RenderView::renderFlowThreadWithName):
* rendering/RenderView.h:

LayoutTests:

Also updated the old tests that expected an 100% by 100% RenderFlowThread. Those tests
require at least a region attached, otherwise the RenderFlowThread would have been 0/0 in size,
and no output would be generated for them in the render tree.

The attached regions are now printed in the render tree, so some tests required updated results.

Patch by Alexandru Chiculita <achicu@adobe.com> on 2011-08-12
Reviewed by David Hyatt.

* fast/regions/content-flowed-into-regions-dynamically-added-expected.png: Added.
* fast/regions/content-flowed-into-regions-dynamically-added-expected.txt: Added.
* fast/regions/content-flowed-into-regions-dynamically-added.html: Added.
* fast/regions/content-flowed-into-regions-dynamically-removed-expected.png: Added.
* fast/regions/content-flowed-into-regions-dynamically-removed-expected.txt: Added.
* fast/regions/content-flowed-into-regions-dynamically-removed.html: Added.
* fast/regions/content-flowed-into-regions-expected.png: Added.
* fast/regions/content-flowed-into-regions-expected.txt: Added.
* fast/regions/content-flowed-into-regions-with-dyn-index-expected.png: Added.
* fast/regions/content-flowed-into-regions-with-dyn-index-expected.txt: Added.
* fast/regions/content-flowed-into-regions-with-dyn-index.html: Added.
* fast/regions/content-flowed-into-regions-with-index-dom-expected.png: Added.
* fast/regions/content-flowed-into-regions-with-index-dom-expected.txt: Added.
* fast/regions/content-flowed-into-regions-with-index-dom.html: Added.
* fast/regions/content-flowed-into-regions-with-index-expected.png: Added.
* fast/regions/content-flowed-into-regions-with-index-expected.txt: Added.
* fast/regions/content-flowed-into-regions-with-index.html: Added.
* fast/regions/content-flowed-into-regions.html: Added.
* fast/regions/flow-content-basic-vertical-rl.html: Copied from LayoutTests/fast/regions/flow-content-basic.html.
* fast/regions/flow-content-basic-vertical.html: Copied from LayoutTests/fast/regions/flow-content-basic.html.
* fast/regions/flow-content-basic.html:
* fast/regions/render-region-renderer-expected.txt:
* fast/regions/resources/region-style.css: Added.
(.greenBox):
(.blueBox):
(.orangeBox):
(.flowArticle):
(.regionArticle):
(.borderBox):
* fast/regions/webkit-flow-renderer-expected.txt:
* fast/regions/webkit-flow-renderer-layer-expected.txt:
* fast/regions/webkit-flow-renderer-layer.html:
* fast/regions/webkit-flow-renderer-nested-expected.txt:
* fast/regions/webkit-flow-renderer-nested.html:
* fast/regions/webkit-flow-renderer.html:
* platform/mac/fast/regions/flow-content-basic-expected.png: Added.
* platform/mac/fast/regions/flow-content-basic-expected.txt: Added.
* platform/mac/fast/regions/flow-content-basic-vertical-expected.png: Added.
* platform/mac/fast/regions/flow-content-basic-vertical-expected.txt: Added.
* platform/mac/fast/regions/flow-content-basic-vertical-rl-expected.png: Added.
* platform/mac/fast/regions/flow-content-basic-vertical-rl-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92969 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/regions/content-flowed-into-regions-dynamically-added-expected.png [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-dynamically-added-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-dynamically-added.html [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-dynamically-removed-expected.png [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-dynamically-removed-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-dynamically-removed.html [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-expected.png [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-dyn-index-expected.png [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-dyn-index-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-dyn-index.html [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-index-dom-expected.png [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-index-dom-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-index-dom.html [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-index-expected.png [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-index-expected.txt [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions-with-index.html [new file with mode: 0644]
LayoutTests/fast/regions/content-flowed-into-regions.html [new file with mode: 0644]
LayoutTests/fast/regions/flow-content-basic-vertical-rl.html [new file with mode: 0644]
LayoutTests/fast/regions/flow-content-basic-vertical.html [new file with mode: 0644]
LayoutTests/fast/regions/flow-content-basic.html
LayoutTests/fast/regions/render-region-renderer-expected.txt
LayoutTests/fast/regions/resources/region-style.css [new file with mode: 0644]
LayoutTests/fast/regions/webkit-flow-renderer-expected.txt
LayoutTests/fast/regions/webkit-flow-renderer-layer-expected.txt
LayoutTests/fast/regions/webkit-flow-renderer-layer.html
LayoutTests/fast/regions/webkit-flow-renderer-nested-expected.txt
LayoutTests/fast/regions/webkit-flow-renderer-nested.html
LayoutTests/fast/regions/webkit-flow-renderer.html
LayoutTests/platform/mac/fast/regions/flow-content-basic-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/flow-content-basic-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/flow-content-basic-vertical-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/flow-content-basic-vertical-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/flow-content-basic-vertical-rl-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/regions/flow-content-basic-vertical-rl-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/dom/Node.cpp
Source/WebCore/rendering/RenderFlowThread.cpp
Source/WebCore/rendering/RenderFlowThread.h
Source/WebCore/rendering/RenderObject.cpp
Source/WebCore/rendering/RenderRegion.cpp
Source/WebCore/rendering/RenderRegion.h
Source/WebCore/rendering/RenderTreeAsText.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h