[CSS Shaders] Add IDL file and bindings for mix function
https://bugs.webkit.org/show_bug.cgi?id=93011

Reviewed by Dean Jackson.

Source/WebCore:

JavaScript bindings have been added for the Custom Filter mix()
function (WebKitCSSMixFunctionValue). As of now, this is only a
placeholder that extends CSSValueList without adding any new
property.

Test: css3/filters/custom/custom-filter-mix-bindings.html

* CMakeLists.txt: mix() IDL has been added to the Generator;
DerivedSources have been included.
* DerivedSources.cpp: Ditto.
* DerivedSources.make: Ditto.
* DerivedSources.pri: Ditto.
* GNUmakefile.list.am: Ditto.
* WebCore.gypi: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::toJS): return a JSC DOM wrapper for WebKitCSSMixFunctionValue.
* bindings/v8/custom/V8CSSValueCustom.cpp:
(WebCore::V8CSSValue::dispatchWrapCustom): Ditto, for V8.
* css/WebKitCSSMixFunctionValue.idl: Added.

LayoutTests:

Test for the Custom Filter mix() function JS bindings.

* css3/filters/custom/custom-filter-mix-bindings-expected.txt: Added.
* css3/filters/custom/custom-filter-mix-bindings.html: Added.
* css3/filters/script-tests/custom-filter-mix-bindings.js: Added.
(jsWrapperClass):
(shouldBeType):
* platform/chromium/css3/filters/custom/custom-filter-mix-bindings-expected.txt: Added.
* platform/efl/fast/js/global-constructors-expected.txt: Updated with the new WebKitCSSMixFunctionValueConstructor.
* platform/gtk/fast/js/global-constructors-expected.txt: Ditto.
* platform/mac/fast/js/global-constructors-expected.txt: Ditto.
* platform/qt-5.0/fast/js/global-constructors-expected.txt: Ditto.
* platform/qt/fast/js/global-constructors-expected.txt: Ditto.
* platform/win/fast/js/global-constructors-expected.txt: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135749 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Add Region info for RootLineBoxes and pack the pagination data
https://bugs.webkit.org/show_bug.cgi?id=101332

Patch by Andrei Bucur <abucur@adobe.com> on 2012-11-26
Reviewed by David Hyatt.

Source/WebCore:

Currently the pagination information for lines is spread between the RootInlineBox and InlineFlowBox classes, consuming memory even though
the boxes were not the result of an pagination layout. To overcome this, a new struct (LineFragmentationData) is created that wraps all the data,
including two new members, the containing Region for the line and a boolean that states if the line was laid out in a Region or not.
The flag is necessary because the sanitize function on LineFragmentationData resets the containing Region to 0 if the Region was removed from
chain (so a value of 0 for the containing Region means two things). The sanitize function should prevent access to an invalid address.
The containing Region is used to detect if a line changed the Region where it resides. This will be helpful especially when implementing region
styling for layout properties (e.g. the font-size property https://bugs.webkit.org/show_bug.cgi?id=95559 ).
A line can change the region when it is shifted inside the containing block or if the entire block moves. This means it's better to delegate
the task of updating the containing Region to the block.

Tests: fast/regions/line-containing-region-crash.html

* rendering/InlineFlowBox.cpp:
(SameSizeAsInlineFlowBox):
* rendering/InlineFlowBox.h:
(WebCore::InlineFlowBox::InlineFlowBox):
(InlineFlowBox):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::linkToEndLineIfNeeded):
(WebCore::RenderBlock::determineStartPosition):
* rendering/RootInlineBox.cpp:
(WebCore::RootInlineBox::RootInlineBox):
(WebCore::RootInlineBox::setContainingRegion):
(WebCore):
(WebCore::RootInlineBox::LineFragmentationData::sanitize): This is an O(1) function that checks if the containig Region is still valid pointer.
* rendering/RootInlineBox.h:
(WebCore):
(WebCore::RootInlineBox::paginationStrut):
(WebCore::RootInlineBox::setPaginationStrut):
(WebCore::RootInlineBox::isFirstAfterPageBreak):
(WebCore::RootInlineBox::setIsFirstAfterPageBreak):
(WebCore::RootInlineBox::paginatedLineWidth):
(WebCore::RootInlineBox::setPaginatedLineWidth):
(RootInlineBox):
(WebCore::RootInlineBox::containingRegion):
(WebCore::RootInlineBox::hasContainingRegion): Use this to determine if the line has a region or not.
(WebCore::RootInlineBox::ensureLineFragmentationData):
(LineFragmentationData):
(WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):

LayoutTests:

The test checks if there is a crash when doing a line layout if:
- the flow has no region
- the flow has a region but the lines have no containing region
- the flow has no region but the lines have a containing region

* fast/regions/line-containing-region-crash-expected.txt: Added.
* fast/regions/line-containing-region-crash.html: Added.

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