[CSS Regions] min-max height will not trigger a relayout when set on a region with auto-height
https://bugs.webkit.org/show_bug.cgi?id=103738

Reviewed by David Hyatt.

Source/WebCore:

When the style of an auto-height region changes with different min/max-height, we have to make sure
that the 2-pass layout algorithm is run so that the region height is properly computed. When doing a 2-pass layout
for auto-height regions, we have to make sure that in the first pass, all auto-height regions start without a previously
computed overrideLogicalContentHeight, otherwise we may end-up with incorrect results, illustrated by tests
autoheight-two-pass-layout-complex-001.html and autoheight-two-pass-layout-complex-002.html.

If we do not have auto height regions, a single pass layout in enough to correctly flow content inside regions.
When we have auto height regions, the algorithm to lay out content should be:
1. If the flow thread content does not need lay out, we do a single pass layout.
If during the layout, an auto-height region needs layout or a normal (not auto height) region changes its box dimensions,
we need to perform a new 2-pass layout after this layout completes. If not, we bail out and skip step 2.
2. Do a full two pass layout and make sure that all auto height regions start the 2-pass layout without a previously computed
override logical content height.

Tests: fast/regions/autoheight-region-decrease-maxheight.html
       fast/regions/autoheight-region-decrease-minheight.html
       fast/regions/autoheight-region-decrease-width.html
       fast/regions/autoheight-region-increase-maxheight.html
       fast/regions/autoheight-region-increase-minheight.html
       fast/regions/autoheight-region-increase-width.html
       fast/regions/autoheight-region-new-maxheight-vrl.html
       fast/regions/autoheight-region-new-maxheight.html
       fast/regions/autoheight-region-new-minheight-vlr.html
       fast/regions/autoheight-region-new-minheight.html
       fast/regions/autoheight-region-remove-maxheight.html
       fast/regions/autoheight-region-remove-minheight.html
       fast/regions/autoheight-two-pass-layout-complex-001.html
       fast/regions/autoheight-two-pass-layout-complex-002.html
       fast/regions/region-height-auto-to-defined.html
       fast/regions/region-height-defined-to-auto.html

* rendering/FlowThreadController.cpp: Added a flag that is needed to mark whether we need a full 2-pass layout.
(WebCore::FlowThreadController::FlowThreadController):
* rendering/FlowThreadController.h:
(WebCore::FlowThreadController::needsTwoPassLayoutForAutoHeightRegions):
(WebCore::FlowThreadController::setNeedsTwoPassLayoutForAutoHeightRegions):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight): Use invalidateRegions because we need also to mark the flow thread as needing layout.
(WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout):
* rendering/RenderRegion.cpp:
(WebCore::RenderRegion::layout): Make sure we do a 2-pass layout if needed.
* rendering/RenderView.cpp:
(WebCore::RenderView::layoutContentInAutoLogicalHeightRegions): Added a new function that models the layout algorithm for the case when we have auto height regions
and flow threads.
(WebCore::RenderView::layout):
(WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions):
* rendering/RenderView.h:

LayoutTests:

Added tests for dynamically change the min/max-height for auto-height regions, including also vertical writing modes.
Added tests for dynamically changing the width of auto-height regions to make sure we are correctly computing their height.
Added two tests for complex auto-height regions layout which require a full two-pass layout after some regions from region
chain are laid out.

* fast/regions/autoheight-region-decrease-maxheight-expected.txt: Added.
* fast/regions/autoheight-region-decrease-maxheight.html: Added.
* fast/regions/autoheight-region-decrease-minheight-expected.txt: Added.
* fast/regions/autoheight-region-decrease-minheight.html: Added.
* fast/regions/autoheight-region-decrease-width-expected.txt: Added.
* fast/regions/autoheight-region-decrease-width.html: Added.
* fast/regions/autoheight-region-increase-maxheight-expected.txt: Added.
* fast/regions/autoheight-region-increase-maxheight.html: Added.
* fast/regions/autoheight-region-increase-minheight-expected.txt: Added.
* fast/regions/autoheight-region-increase-minheight.html: Added.
* fast/regions/autoheight-region-increase-width-expected.txt: Added.
* fast/regions/autoheight-region-increase-width.html: Added.
* fast/regions/autoheight-region-new-maxheight-expected.txt: Added.
* fast/regions/autoheight-region-new-maxheight-vrl-expected.txt: Added.
* fast/regions/autoheight-region-new-maxheight-vrl.html: Added.
* fast/regions/autoheight-region-new-maxheight.html: Added.
* fast/regions/autoheight-region-new-minheight-expected.txt: Added.
* fast/regions/autoheight-region-new-minheight-vlr-expected.txt: Added.
* fast/regions/autoheight-region-new-minheight-vlr.html: Added.
* fast/regions/autoheight-region-new-minheight.html: Added.
* fast/regions/autoheight-region-remove-maxheight-expected.txt: Added.
* fast/regions/autoheight-region-remove-maxheight.html: Added.
* fast/regions/autoheight-region-remove-minheight-expected.txt: Added.
* fast/regions/autoheight-region-remove-minheight.html: Added.
* fast/regions/autoheight-two-pass-layout-complex-001-expected.txt: Added.
* fast/regions/autoheight-two-pass-layout-complex-001.html: Added.
* fast/regions/autoheight-two-pass-layout-complex-002-expected.txt: Added.
* fast/regions/autoheight-two-pass-layout-complex-002.html: Added.
* fast/regions/region-height-auto-to-defined-expected.txt: Added.
* fast/regions/region-height-auto-to-defined.html: Added.
* fast/regions/region-height-defined-to-auto-expected.txt: Added.
* fast/regions/region-height-defined-to-auto.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Make an Isolate parameter mandatory in toV8()
https://bugs.webkit.org/show_bug.cgi?id=107520

Reviewed by Adam Barth.

Now it's safe to remove an optional Isolate parameter.

No tests. No change in behavior.

Source/WebCore:

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateHeader):
* bindings/scripts/test/V8/V8Float64Array.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestActiveDOMObject.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestEventTarget.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestException.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestInterface.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNamedConstructor.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestNode.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestObj.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
(WebCore::toV8):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
(WebCore::toV8):
* css/MediaQueryListListener.cpp:
(WebCore::MediaQueryListListener::queryChanged):
* testing/v8/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject):

Source/WebKit/chromium:

* src/InspectorFrontendClientImpl.cpp:
(WebKit::InspectorFrontendClientImpl::windowObjectCleared):
* src/WebArrayBuffer.cpp:
(WebKit::WebArrayBuffer::toV8Value):
* src/WebBlob.cpp:
(WebKit::WebBlob::toV8Value):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::createFileSystem):
(WebKit::WebFrameImpl::createSerializableFileSystem):
(WebKit::WebFrameImpl::createFileEntry):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140401 268f45cc-cd09-0410-ab3c-d52691b4dbfc