[CSS Regions] Auto-height regions will not calculate the height correctly when the...
authorachicu@adobe.com <achicu@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2012 20:05:47 +0000 (20:05 +0000)
committerachicu@adobe.com <achicu@adobe.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 28 Nov 2012 20:05:47 +0000 (20:05 +0000)
commiteb39b0ab5108f2824a593a5d346d4e3c9143b6f5
treed5cdf204a89b748e1259293d6d3dc911dad09b4f
parente07add893b3830416326af4bb1963741dbfe5fb1
[CSS Regions] Auto-height regions will not calculate the height correctly when the content changes dynamically
https://bugs.webkit.org/show_bug.cgi?id=102954

Reviewed by David Hyatt.

Source/WebCore:

Whenever the flow changes, we need to reset the region computed auto-heights.
However, when we reset the region heights to "auto" or "un-computed", we also need to make
sure that all the region breaks are counted again, so that we split regions correctly during the new layout.
I've reused the m_regionsInvalidated property to force the flow do a complete layout.

Test: fast/regions/autoheight-dynamic-update.html

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight):

LayoutTests:

Added test to check for auto-height region size update after an element is added to the flow.
In this case the first region will need to resize to accommodate the size of the added elements.

* fast/regions/autoheight-dynamic-update-expected.html: Added.
* fast/regions/autoheight-dynamic-update.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/regions/autoheight-dynamic-update-expected.html [new file with mode: 0644]
LayoutTests/fast/regions/autoheight-dynamic-update.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderFlowThread.cpp