[CSS Grid Layout] Add parsing for grid-auto-flow
authorjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Feb 2013 19:14:19 +0000 (19:14 +0000)
committerjchaffraix@webkit.org <jchaffraix@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Feb 2013 19:14:19 +0000 (19:14 +0000)
commitc7d83162cad50dd368b21a866d2e5303da447cdc
treea9bcce415330b36ec8e5c7748bcfb0c9a295ff6e
parentf5d14ed00210382dcd42e631220ec6429ff09eba
[CSS Grid Layout] Add parsing for grid-auto-flow
https://bugs.webkit.org/show_bug.cgi?id=108397

Reviewed by Ojan Vafai.

Source/WebCore:

Test: fast/css-grid-layout/grid-auto-flow-get-set.html

This change adds the parsing, application and conversion back through getComputedStyle
for the new property -webkit-grid-auto-flow, which accpets the following:

-webkit-grid-auto-flow: none | rows | columns

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
Added code to convert the RenderStyle information back into a CSS value.

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
Implemented parsing for -webkit-grid-auto-flow.

* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::operator GridAutoFlow):
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
Added the conversion operators, used for parsing and getComputedStyle.

* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
Added -webkit-grid-auto-flow to the list of the not inherited properties.

* css/CSSPropertyNames.in:
Added the new value and keywords.

* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder):
Added a handler for the new CSS property.

* rendering/style/RenderStyle.h:
Added the usual getter / setter / initial function.

* rendering/style/RenderStyleConstants.h:
Added a new enum GridAutoFlow to hold the parsed value.

* rendering/style/StyleGridData.cpp:
(WebCore::StyleGridData::StyleGridData):
* rendering/style/StyleGridData.h:
(WebCore::StyleGridData::operator==):
Updated after adding a new field for the GridAutoFlow value.

LayoutTests:

* fast/css-grid-layout/grid-auto-flow-get-set-expected.txt: Added.
* fast/css-grid-layout/grid-auto-flow-get-set.html: Added.
* fast/css-grid-layout/resources/grid.css:
(.gridAutoFlowNone):
(.gridAutoFlowColumn):
(.gridAutoFlowRow):
Added these new classes to our common style.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141787 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt [new file with mode: 0644]
LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set.html [new file with mode: 0755]
LayoutTests/fast/css-grid-layout/resources/grid.css
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/rendering/style/RenderStyle.h
Source/WebCore/rendering/style/RenderStyleConstants.h
Source/WebCore/rendering/style/StyleGridData.cpp
Source/WebCore/rendering/style/StyleGridData.h