Move 'vertical-align' CSS property to the new StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=138764

Reviewed by Darin Adler.

Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
new StyleBuilder by using custom code.

No new tests, no behavior change.

* css/CSSPropertyNames.in:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
(WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
(WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderFunctions::applyValueVerticalAlign):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Attribute text in HTMLAnchorElement should behave as per specification.
https://bugs.webkit.org/show_bug.cgi?id=138557

Patch by Shivakumar JM <shiva.jm@samsung.com> on 2014-11-16
Reviewed by Darin Adler.

Source/WebCore:

attribute text in HTMLAnchorElement should not be readonly as per specification
http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute.
Also This matches the behavior of Chrome 38 and FireFox.

Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::text):
(WebCore::HTMLAnchorElement::setText):
* html/HTMLAnchorElement.h:
* html/HTMLAnchorElement.idl:

LayoutTests:

* fast/dom/HTMLAnchorElement/anchor-text-attribute-expected.txt: Added.
* fast/dom/HTMLAnchorElement/anchor-text-attribute.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
https://bugs.webkit.org/show_bug.cgi?id=138770

Reviewed by Darin Adler.

Source/WebCore:

When setting a very large value to a CSS property, it is represented internally as
infinity. r166114 already tried to deal with this by adding an std::isinf() check
in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
CSSValueInvalid value in such case. The issue is that doing leads to the
StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
handled and leads to assertions.

This patch updates the CSSParser to detect cases where the double value is
infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
that we mark the value as invalid and actually drop it. As a result,
CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
StyleBuilder.

Test: fast/css/style-builder-infinite-value.html
      fast/css/infinite-floating-value.html

* css/CSSParser.cpp:
(WebCore::parseSimpleLengthValue):
(WebCore::CSSParser::validUnit):
* css/CSSValuePool.cpp:
(WebCore::CSSValuePool::createValue):

LayoutTests:

Add a layout test setting very large values to 'border-width' and
'font-size' CSS properties.

* fast/css/style-builder-infinite-value-expected.txt: Added.
* fast/css/style-builder-infinite-value.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash when setting 'order' CSS property to a calculated value
https://bugs.webkit.org/show_bug.cgi?id=138780

Reviewed by Darin Adler.

Source/WebCore:

CSS Calculated values were not handled by the CSS parser for 'order'
CSS property. As a result, using calculated values wouldn't work in
release builds and would hit an assertion in debug builds.

This patch updates the CSS parser to directly convert the
CSS Calculated value into a simple integer CSSPrimitiveValue for
'order' property. We could have marked CSS Calculated values as
valid in the CSS Parser instead but this would have brought issues:
- The calculated value needs to be adjusted to INT_MIN + 2 if it is less
  than that. This would force us to calculate the expression anyway.
- The StyleBuilder would need updating to properly handle CSS Calculated
  values for 'order'.

Test: fast/css/order-calculated-value.html

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):

LayoutTests:

Add a layout test to validate that setting a calculated value to the
'order' CSS property does not crash and behaves as expected.

* fast/css/order-calculated-value-expected.txt: Added.
* fast/css/order-calculated-value.html: Added.


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