Unprefix the flexbox CSS properties
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Sep 2014 20:46:05 +0000 (20:46 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Sep 2014 20:46:05 +0000 (20:46 +0000)
commit94444027827dbf395e06888cf0bb248230ba6430
tree0bde603f48c52252356cce3e4168fa3a15db5fbc
parent371a7416307f8c90e4560dd8eda1f7ae76c31c22
Unprefix the flexbox CSS properties
https://bugs.webkit.org/show_bug.cgi?id=98420

Reviewed by Benjamin Poulain.

Source/WebCore:

Remove the need for a "-webkit-" prefix on flexbox
and related properties. This includes:
- align-content
- align-items
- align-self
- flex-basis
- flex-direction
- flex-wrap
- flex-grow
- flex-shrink
- flex
- flex-flow
- justify
- order

... as well as the display keyword values "flex" and
"inline-flex".

* css/CSSComputedStyleDeclaration.cpp:  Change names.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp: Ditto.
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFlex):
* css/CSSPrimitiveValueMappings.h: Since we need to still handle the old
keywords for display, this has added two new keywords.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EDisplay): If the older keywords were used in
content, map them to the new value names.
* css/CSSPropertyNames.in: Add aliases for the prefixed properties.
* css/CSSValueKeywords.in: Add "flex" and "inline-flex".
* css/DeprecatedStyleBuilder.cpp: Change names.
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* css/StyleProperties.cpp: Change names.
(WebCore::StyleProperties::getPropertyValue):
(WebCore::StyleProperties::asText):
* css/StylePropertyShorthand.cpp: Rename shorthand methods to remove the prefix.
(WebCore::flexFlowShorthand):
(WebCore::flexShorthand):
(WebCore::shorthandForProperty):
(WebCore::matchingShorthandsForLonghand):
(WebCore::webkitFlexFlowShorthand): Deleted.
(WebCore::webkitFlexShorthand): Deleted.
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::equivalentBlockDisplay):
(WebCore::StyleResolver::applyProperty):
* page/animation/CSSPropertyAnimation.cpp: Change names.
(WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor): Handle the two new display values (the same way as
the old values).
* rendering/style/RenderStyleConstants.h: Add constants for the new display values.

LayoutTests:

Now that we return "flex" instead of "-webkit-flex" (and similar
changes) update the tests that rely on this. Other than that,
we're still testing the prefixed content. A followup patch
will add tests for non-prefixed content.

* css3/flexbox/display-flexbox-set-get-expected.txt:
* css3/flexbox/display-flexbox-set-get.html:
* css3/flexbox/flexitem.html:
* fast/css-grid-layout/grid-item-display.html:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:
* fast/css/inherit-initial-shorthand-values-expected.txt:
* fast/css/inherit-initial-shorthand-values.html:
* svg/css/getComputedStyle-basic-expected.txt:
* transitions/flex-transitions-expected.txt:
* transitions/flex-transitions.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/flexbox/display-flexbox-set-get-expected.txt
LayoutTests/css3/flexbox/display-flexbox-set-get.html
LayoutTests/css3/flexbox/flexitem.html
LayoutTests/fast/css-grid-layout/grid-item-display.html
LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
LayoutTests/fast/css/getComputedStyle/resources/property-names.js
LayoutTests/fast/css/inherit-initial-shorthand-values-expected.txt
LayoutTests/fast/css/inherit-initial-shorthand-values.html
LayoutTests/svg/css/getComputedStyle-basic-expected.txt
LayoutTests/transitions/flex-transitions-expected.txt
LayoutTests/transitions/flex-transitions.html
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSValueKeywords.in
Source/WebCore/css/DeprecatedStyleBuilder.cpp
Source/WebCore/css/StyleProperties.cpp
Source/WebCore/css/StylePropertyShorthand.cpp
Source/WebCore/css/StylePropertyShorthand.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/page/animation/CSSPropertyAnimation.cpp
Source/WebCore/rendering/RenderElement.cpp
Source/WebCore/rendering/style/RenderStyleConstants.h