summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDean Jackson <dino@apple.com>2014-09-12 20:46:05 +0000
committerKonstantin Tokarev <annulen@yandex.ru>2016-09-27 11:20:54 +0000
commitdd3b76df6531a6305f35e847192ce2b3638683d7 (patch)
tree8a6122167ceb9ce0197bad7d5a2a2d52b52bab66
parent6ca6514fa0caae5bf1df1aae126c51efb618d757 (diff)
downloadqtwebkit-dd3b76df6531a6305f35e847192ce2b3638683d7.tar.gz
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: http://svn.webkit.org/repository/webkit/trunk@173572 268f45cc-cd09-0410-ab3c-d52691b4dbfc Change-Id: If273fd32d5165e8fa504cdfd5b591a17d61f4bbc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--Source/WebCore/css/CSSComputedStyleDeclaration.cpp48
-rw-r--r--Source/WebCore/css/CSSParser.cpp64
-rw-r--r--Source/WebCore/css/CSSPrimitiveValueMappings.h10
-rw-r--r--Source/WebCore/css/CSSProperty.cpp24
-rw-r--r--Source/WebCore/css/CSSPropertyNames.in36
-rw-r--r--Source/WebCore/css/CSSValueKeywords.in2
-rw-r--r--Source/WebCore/css/DeprecatedStyleBuilder.cpp20
-rw-r--r--Source/WebCore/css/StylePropertySet.cpp22
-rw-r--r--Source/WebCore/css/StylePropertyShorthand.cpp24
-rw-r--r--Source/WebCore/css/StylePropertyShorthand.h4
-rw-r--r--Source/WebCore/css/StyleResolver.cpp26
-rw-r--r--Source/WebCore/page/animation/CSSPropertyAnimation.cpp3
-rw-r--r--Source/WebCore/rendering/RenderObject.cpp2
-rw-r--r--Source/WebCore/rendering/style/RenderStyleConstants.h2
14 files changed, 156 insertions, 131 deletions
diff --git a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
index 621cdf038..f4c25e435 100644
--- a/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
@@ -276,15 +276,15 @@ static const CSSPropertyID computedProperties[] = {
#if ENABLE(CSS_FILTERS)
CSSPropertyWebkitFilter,
#endif
- CSSPropertyWebkitAlignContent,
- CSSPropertyWebkitAlignItems,
- CSSPropertyWebkitAlignSelf,
- CSSPropertyWebkitFlexBasis,
- CSSPropertyWebkitFlexGrow,
- CSSPropertyWebkitFlexShrink,
- CSSPropertyWebkitFlexDirection,
- CSSPropertyWebkitFlexWrap,
- CSSPropertyWebkitJustifyContent,
+ CSSPropertyAlignContent,
+ CSSPropertyAlignItems,
+ CSSPropertyAlignSelf,
+ CSSPropertyFlexBasis,
+ CSSPropertyFlexGrow,
+ CSSPropertyFlexShrink,
+ CSSPropertyFlexDirection,
+ CSSPropertyFlexWrap,
+ CSSPropertyJustifyContent,
CSSPropertyWebkitFontKerning,
CSSPropertyWebkitFontSmoothing,
CSSPropertyWebkitFontVariantLigatures,
@@ -330,7 +330,7 @@ static const CSSPropertyID computedProperties[] = {
CSSPropertyWebkitMaskRepeat,
CSSPropertyWebkitMaskSize,
CSSPropertyWebkitNbspMode,
- CSSPropertyWebkitOrder,
+ CSSPropertyOrder,
#if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
CSSPropertyWebkitOverflowScrolling,
#endif
@@ -1958,11 +1958,11 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
return cssValuePool().createValue(style->display());
case CSSPropertyEmptyCells:
return cssValuePool().createValue(style->emptyCells());
- case CSSPropertyWebkitAlignContent:
+ case CSSPropertyAlignContent:
return cssValuePool().createValue(style->alignContent());
- case CSSPropertyWebkitAlignItems:
+ case CSSPropertyAlignItems:
return cssValuePool().createValue(style->alignItems());
- case CSSPropertyWebkitAlignSelf:
+ case CSSPropertyAlignSelf:
if (style->alignSelf() == AlignAuto) {
Node* parent = styledNode->parentNode();
if (parent && parent->computedStyle())
@@ -1970,23 +1970,23 @@ PassRefPtr<CSSValue> ComputedStyleExtractor::propertyValue(CSSPropertyID propert
return cssValuePool().createValue(AlignStretch);
}
return cssValuePool().createValue(style->alignSelf());
- case CSSPropertyWebkitFlex:
- return getCSSPropertyValuesForShorthandProperties(webkitFlexShorthand());
- case CSSPropertyWebkitFlexBasis:
+ case CSSPropertyFlex:
+ return getCSSPropertyValuesForShorthandProperties(flexShorthand());
+ case CSSPropertyFlexBasis:
return cssValuePool().createValue(style->flexBasis());
- case CSSPropertyWebkitFlexDirection:
+ case CSSPropertyFlexDirection:
return cssValuePool().createValue(style->flexDirection());
- case CSSPropertyWebkitFlexFlow:
- return getCSSPropertyValuesForShorthandProperties(webkitFlexFlowShorthand());
- case CSSPropertyWebkitFlexGrow:
+ case CSSPropertyFlexFlow:
+ return getCSSPropertyValuesForShorthandProperties(flexFlowShorthand());
+ case CSSPropertyFlexGrow:
return cssValuePool().createValue(style->flexGrow());
- case CSSPropertyWebkitFlexShrink:
+ case CSSPropertyFlexShrink:
return cssValuePool().createValue(style->flexShrink());
- case CSSPropertyWebkitFlexWrap:
+ case CSSPropertyFlexWrap:
return cssValuePool().createValue(style->flexWrap());
- case CSSPropertyWebkitJustifyContent:
+ case CSSPropertyJustifyContent:
return cssValuePool().createValue(style->justifyContent());
- case CSSPropertyWebkitOrder:
+ case CSSPropertyOrder:
return cssValuePool().createValue(style->order(), CSSPrimitiveValue::CSS_NUMBER);
case CSSPropertyFloat:
if (style->display() != NONE && style->hasOutOfFlowPosition())
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp
index 99ee8043a..eabbd5024 100644
--- a/Source/WebCore/css/CSSParser.cpp
+++ b/Source/WebCore/css/CSSParser.cpp
@@ -703,7 +703,7 @@ static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int
// inline | block | list-item | run-in | inline-block | table |
// inline-table | table-row-group | table-header-group | table-footer-group | table-row |
// table-column-group | table-column | table-cell | table-caption | -webkit-box | -webkit-inline-box | none | inherit
- // -webkit-flex | -webkit-inline-flex | -webkit-grid | -webkit-inline-grid
+ // flex | -webkit-flex | inline-flex | -webkit-inline-flex | -webkit-grid | -webkit-inline-grid
if ((valueID >= CSSValueInline && valueID <= CSSValueWebkitInlineFlex) || valueID == CSSValueNone)
return true;
if (parserContext.isCSSGridLayoutEnabled && (valueID == CSSValueWebkitGrid || valueID == CSSValueWebkitInlineGrid))
@@ -872,27 +872,27 @@ static inline bool isValidKeywordPropertyAndValue(CSSPropertyID propertyId, int
if (valueID == CSSValueSrgb || valueID == CSSValueDefault)
return true;
break;
- case CSSPropertyWebkitAlignContent:
+ case CSSPropertyAlignContent:
if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround || valueID == CSSValueStretch)
return true;
break;
- case CSSPropertyWebkitAlignItems:
+ case CSSPropertyAlignItems:
if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch)
return true;
break;
- case CSSPropertyWebkitAlignSelf:
+ case CSSPropertyAlignSelf:
if (valueID == CSSValueAuto || valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueBaseline || valueID == CSSValueStretch)
return true;
break;
- case CSSPropertyWebkitFlexDirection:
+ case CSSPropertyFlexDirection:
if (valueID == CSSValueRow || valueID == CSSValueRowReverse || valueID == CSSValueColumn || valueID == CSSValueColumnReverse)
return true;
break;
- case CSSPropertyWebkitFlexWrap:
+ case CSSPropertyFlexWrap:
if (valueID == CSSValueNowrap || valueID == CSSValueWrap || valueID == CSSValueWrapReverse)
return true;
break;
- case CSSPropertyWebkitJustifyContent:
+ case CSSPropertyJustifyContent:
if (valueID == CSSValueFlexStart || valueID == CSSValueFlexEnd || valueID == CSSValueCenter || valueID == CSSValueSpaceBetween || valueID == CSSValueSpaceAround)
return true;
break;
@@ -1119,12 +1119,12 @@ static inline bool isKeywordPropertyID(CSSPropertyID propertyId)
case CSSPropertyWebkitColumnBreakBefore:
case CSSPropertyWebkitColumnBreakInside:
case CSSPropertyWebkitColumnRuleStyle:
- case CSSPropertyWebkitAlignContent:
- case CSSPropertyWebkitAlignItems:
- case CSSPropertyWebkitAlignSelf:
- case CSSPropertyWebkitFlexDirection:
- case CSSPropertyWebkitFlexWrap:
- case CSSPropertyWebkitJustifyContent:
+ case CSSPropertyAlignContent:
+ case CSSPropertyAlignItems:
+ case CSSPropertyAlignSelf:
+ case CSSPropertyFlexDirection:
+ case CSSPropertyFlexWrap:
+ case CSSPropertyJustifyContent:
case CSSPropertyWebkitFontKerning:
case CSSPropertyWebkitFontSmoothing:
case CSSPropertyWebkitHyphens:
@@ -2509,28 +2509,28 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
validPrimitive = true;
break;
#endif
- case CSSPropertyWebkitFlex: {
+ case CSSPropertyFlex: {
ShorthandScope scope(this, propId);
if (id == CSSValueNone) {
- addProperty(CSSPropertyWebkitFlexGrow, cssValuePool().createValue(0, CSSPrimitiveValue::CSS_NUMBER), important);
- addProperty(CSSPropertyWebkitFlexShrink, cssValuePool().createValue(0, CSSPrimitiveValue::CSS_NUMBER), important);
- addProperty(CSSPropertyWebkitFlexBasis, cssValuePool().createIdentifierValue(CSSValueAuto), important);
+ addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(0, CSSPrimitiveValue::CSS_NUMBER), important);
+ addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(0, CSSPrimitiveValue::CSS_NUMBER), important);
+ addProperty(CSSPropertyFlexBasis, cssValuePool().createIdentifierValue(CSSValueAuto), important);
return true;
}
return parseFlex(m_valueList.get(), important);
}
- case CSSPropertyWebkitFlexBasis:
+ case CSSPropertyFlexBasis:
// FIXME: Support intrinsic dimensions too.
if (id == CSSValueAuto)
validPrimitive = true;
else
validPrimitive = (!id && validUnit(value, FLength | FPercent | FNonNeg));
break;
- case CSSPropertyWebkitFlexGrow:
- case CSSPropertyWebkitFlexShrink:
+ case CSSPropertyFlexGrow:
+ case CSSPropertyFlexShrink:
validPrimitive = validUnit(value, FNumber | FNonNeg);
break;
- case CSSPropertyWebkitOrder:
+ case CSSPropertyOrder:
if (validUnit(value, FInteger, CSSStrictMode)) {
// We restrict the smallest value to int min + 2 because we use int min and int min + 1 as special values in a hash set.
parsedValue = cssValuePool().createValue(max(static_cast<double>(std::numeric_limits<int>::min() + 2), value->fValue),
@@ -2883,8 +2883,8 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyPadding:
// <padding-width>{1,4} | inherit
return parse4Values(propId, paddingShorthand().properties(), important);
- case CSSPropertyWebkitFlexFlow:
- return parseShorthand(propId, webkitFlexFlowShorthand(), important);
+ case CSSPropertyFlexFlow:
+ return parseShorthand(propId, flexFlowShorthand(), important);
case CSSPropertyFont:
// [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]?
// 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit
@@ -3056,12 +3056,12 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important)
case CSSPropertyWebkitColumnBreakBefore:
case CSSPropertyWebkitColumnBreakInside:
case CSSPropertyWebkitColumnRuleStyle:
- case CSSPropertyWebkitAlignContent:
- case CSSPropertyWebkitAlignItems:
- case CSSPropertyWebkitAlignSelf:
- case CSSPropertyWebkitFlexDirection:
- case CSSPropertyWebkitFlexWrap:
- case CSSPropertyWebkitJustifyContent:
+ case CSSPropertyAlignContent:
+ case CSSPropertyAlignItems:
+ case CSSPropertyAlignSelf:
+ case CSSPropertyFlexDirection:
+ case CSSPropertyFlexWrap:
+ case CSSPropertyJustifyContent:
case CSSPropertyWebkitFontKerning:
case CSSPropertyWebkitFontSmoothing:
case CSSPropertyWebkitHyphens:
@@ -6607,9 +6607,9 @@ bool CSSParser::parseFlex(CSSParserValueList* args, bool important)
if (!flexBasis)
flexBasis = cssValuePool().createValue(0, CSSPrimitiveValue::CSS_PX);
- addProperty(CSSPropertyWebkitFlexGrow, cssValuePool().createValue(clampToFloat(flexGrow), CSSPrimitiveValue::CSS_NUMBER), important);
- addProperty(CSSPropertyWebkitFlexShrink, cssValuePool().createValue(clampToFloat(flexShrink), CSSPrimitiveValue::CSS_NUMBER), important);
- addProperty(CSSPropertyWebkitFlexBasis, flexBasis, important);
+ addProperty(CSSPropertyFlexGrow, cssValuePool().createValue(clampToFloat(flexGrow), CSSPrimitiveValue::CSS_NUMBER), important);
+ addProperty(CSSPropertyFlexShrink, cssValuePool().createValue(clampToFloat(flexShrink), CSSPrimitiveValue::CSS_NUMBER), important);
+ addProperty(CSSPropertyFlexBasis, flexBasis, important);
return true;
}
diff --git a/Source/WebCore/css/CSSPrimitiveValueMappings.h b/Source/WebCore/css/CSSPrimitiveValueMappings.h
index b331504d7..c6273d7e7 100644
--- a/Source/WebCore/css/CSSPrimitiveValueMappings.h
+++ b/Source/WebCore/css/CSSPrimitiveValueMappings.h
@@ -1289,10 +1289,12 @@ template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EDisplay e)
m_value.valueID = CSSValueWebkitInlineBox;
break;
case FLEX:
- m_value.valueID = CSSValueWebkitFlex;
+ case WEBKIT_FLEX:
+ m_value.valueID = CSSValueFlex;
break;
case INLINE_FLEX:
- m_value.valueID = CSSValueWebkitInlineFlex;
+ case WEBKIT_INLINE_FLEX:
+ m_value.valueID = CSSValueInlineFlex;
break;
case GRID:
m_value.valueID = CSSValueWebkitGrid;
@@ -1313,6 +1315,10 @@ template<> inline CSSPrimitiveValue::operator EDisplay() const
EDisplay display = static_cast<EDisplay>(m_value.valueID - CSSValueInline);
ASSERT(display >= INLINE && display <= NONE);
+ if (display == WEBKIT_FLEX)
+ return FLEX;
+ if (display == WEBKIT_INLINE_FLEX)
+ return INLINE_FLEX;
return display;
}
diff --git a/Source/WebCore/css/CSSProperty.cpp b/Source/WebCore/css/CSSProperty.cpp
index 13a4d7e7f..63a4edfb7 100644
--- a/Source/WebCore/css/CSSProperty.cpp
+++ b/Source/WebCore/css/CSSProperty.cpp
@@ -573,18 +573,18 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
#if ENABLE(CSS_COMPOSITING)
case CSSPropertyWebkitBlendMode:
#endif
- case CSSPropertyWebkitAlignContent:
- case CSSPropertyWebkitAlignItems:
- case CSSPropertyWebkitAlignSelf:
- case CSSPropertyWebkitFlex:
- case CSSPropertyWebkitFlexBasis:
- case CSSPropertyWebkitFlexDirection:
- case CSSPropertyWebkitFlexFlow:
- case CSSPropertyWebkitFlexGrow:
- case CSSPropertyWebkitFlexShrink:
- case CSSPropertyWebkitFlexWrap:
- case CSSPropertyWebkitJustifyContent:
- case CSSPropertyWebkitOrder:
+ case CSSPropertyAlignContent:
+ case CSSPropertyAlignItems:
+ case CSSPropertyAlignSelf:
+ case CSSPropertyFlex:
+ case CSSPropertyFlexBasis:
+ case CSSPropertyFlexDirection:
+ case CSSPropertyFlexFlow:
+ case CSSPropertyFlexGrow:
+ case CSSPropertyFlexShrink:
+ case CSSPropertyFlexWrap:
+ case CSSPropertyJustifyContent:
+ case CSSPropertyOrder:
case CSSPropertyWebkitFontSizeDelta:
case CSSPropertyWebkitGridAutoColumns:
case CSSPropertyWebkitGridAutoFlow:
diff --git a/Source/WebCore/css/CSSPropertyNames.in b/Source/WebCore/css/CSSPropertyNames.in
index 358ee2cbb..bc6f7066b 100644
--- a/Source/WebCore/css/CSSPropertyNames.in
+++ b/Source/WebCore/css/CSSPropertyNames.in
@@ -287,17 +287,28 @@ z-index
#if defined(ENABLE_CSS_FILTERS) && ENABLE_CSS_FILTERS
-webkit-filter
#endif
--webkit-align-content
--webkit-align-items
--webkit-align-self
--webkit-flex
--webkit-flex-basis
--webkit-flex-direction
--webkit-flex-flow
--webkit-flex-grow
--webkit-flex-shrink
--webkit-flex-wrap
--webkit-justify-content
+align-content
+-webkit-align-content = align-content
+align-items
+-webkit-align-items = align-items
+align-self
+-webkit-align-self = align-self
+flex
+-webkit-flex = flex
+flex-basis
+-webkit-flex-basis = flex-basis
+flex-direction
+-webkit-flex-direction = flex-direction
+flex-flow
+-webkit-flex-flow = flex-flow
+flex-grow
+-webkit-flex-grow = flex-grow
+flex-shrink
+-webkit-flex-shrink = flex-shrink
+flex-wrap
+-webkit-flex-wrap = flex-wrap
+justify-content
+-webkit-justify-content = justify-content
-webkit-font-size-delta
-webkit-grid-auto-columns
-webkit-grid-auto-rows
@@ -363,7 +374,8 @@ z-index
-webkit-min-logical-width
-webkit-min-logical-height
-webkit-nbsp-mode
--webkit-order
+order
+-webkit-order = order
-webkit-padding-after
-webkit-padding-before
-webkit-padding-end
diff --git a/Source/WebCore/css/CSSValueKeywords.in b/Source/WebCore/css/CSSValueKeywords.in
index 679e736bf..dc7b34c26 100644
--- a/Source/WebCore/css/CSSValueKeywords.in
+++ b/Source/WebCore/css/CSSValueKeywords.in
@@ -341,7 +341,9 @@ table-cell
table-caption
-webkit-box
-webkit-inline-box
+flex
-webkit-flex
+inline-flex
-webkit-inline-flex
-webkit-grid
-webkit-inline-grid
diff --git a/Source/WebCore/css/DeprecatedStyleBuilder.cpp b/Source/WebCore/css/DeprecatedStyleBuilder.cpp
index 1d52de322..66c5036d1 100644
--- a/Source/WebCore/css/DeprecatedStyleBuilder.cpp
+++ b/Source/WebCore/css/DeprecatedStyleBuilder.cpp
@@ -2269,17 +2269,17 @@ DeprecatedStyleBuilder::DeprecatedStyleBuilder()
#if ENABLE(CURSOR_VISIBILITY)
setPropertyHandler(CSSPropertyWebkitCursorVisibility, ApplyPropertyDefault<CursorVisibility, &RenderStyle::cursorVisibility, CursorVisibility, &RenderStyle::setCursorVisibility, CursorVisibility, &RenderStyle::initialCursorVisibility>::createHandler());
#endif
- setPropertyHandler(CSSPropertyWebkitAlignContent, ApplyPropertyDefault<EAlignContent, &RenderStyle::alignContent, EAlignContent, &RenderStyle::setAlignContent, EAlignContent, &RenderStyle::initialAlignContent>::createHandler());
- setPropertyHandler(CSSPropertyWebkitAlignItems, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignItems, EAlignItems, &RenderStyle::setAlignItems, EAlignItems, &RenderStyle::initialAlignItems>::createHandler());
- setPropertyHandler(CSSPropertyWebkitAlignSelf, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignSelf, EAlignItems, &RenderStyle::setAlignSelf, EAlignItems, &RenderStyle::initialAlignSelf>::createHandler());
- setPropertyHandler(CSSPropertyWebkitFlexBasis, ApplyPropertyLength<&RenderStyle::flexBasis, &RenderStyle::setFlexBasis, &RenderStyle::initialFlexBasis, AutoEnabled>::createHandler());
- setPropertyHandler(CSSPropertyWebkitFlexDirection, ApplyPropertyDefault<EFlexDirection, &RenderStyle::flexDirection, EFlexDirection, &RenderStyle::setFlexDirection, EFlexDirection, &RenderStyle::initialFlexDirection>::createHandler());
- setPropertyHandler(CSSPropertyWebkitFlexGrow, ApplyPropertyDefault<float, &RenderStyle::flexGrow, float, &RenderStyle::setFlexGrow, float, &RenderStyle::initialFlexGrow>::createHandler());
- setPropertyHandler(CSSPropertyWebkitFlexShrink, ApplyPropertyDefault<float, &RenderStyle::flexShrink, float, &RenderStyle::setFlexShrink, float, &RenderStyle::initialFlexShrink>::createHandler());
- setPropertyHandler(CSSPropertyWebkitFlexWrap, ApplyPropertyDefault<EFlexWrap, &RenderStyle::flexWrap, EFlexWrap, &RenderStyle::setFlexWrap, EFlexWrap, &RenderStyle::initialFlexWrap>::createHandler());
+ setPropertyHandler(CSSPropertyAlignContent, ApplyPropertyDefault<EAlignContent, &RenderStyle::alignContent, EAlignContent, &RenderStyle::setAlignContent, EAlignContent, &RenderStyle::initialAlignContent>::createHandler());
+ setPropertyHandler(CSSPropertyAlignItems, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignItems, EAlignItems, &RenderStyle::setAlignItems, EAlignItems, &RenderStyle::initialAlignItems>::createHandler());
+ setPropertyHandler(CSSPropertyAlignSelf, ApplyPropertyDefault<EAlignItems, &RenderStyle::alignSelf, EAlignItems, &RenderStyle::setAlignSelf, EAlignItems, &RenderStyle::initialAlignSelf>::createHandler());
+ setPropertyHandler(CSSPropertyFlexBasis, ApplyPropertyLength<&RenderStyle::flexBasis, &RenderStyle::setFlexBasis, &RenderStyle::initialFlexBasis, AutoEnabled>::createHandler());
+ setPropertyHandler(CSSPropertyFlexDirection, ApplyPropertyDefault<EFlexDirection, &RenderStyle::flexDirection, EFlexDirection, &RenderStyle::setFlexDirection, EFlexDirection, &RenderStyle::initialFlexDirection>::createHandler());
+ setPropertyHandler(CSSPropertyFlexGrow, ApplyPropertyDefault<float, &RenderStyle::flexGrow, float, &RenderStyle::setFlexGrow, float, &RenderStyle::initialFlexGrow>::createHandler());
+ setPropertyHandler(CSSPropertyFlexShrink, ApplyPropertyDefault<float, &RenderStyle::flexShrink, float, &RenderStyle::setFlexShrink, float, &RenderStyle::initialFlexShrink>::createHandler());
+ setPropertyHandler(CSSPropertyFlexWrap, ApplyPropertyDefault<EFlexWrap, &RenderStyle::flexWrap, EFlexWrap, &RenderStyle::setFlexWrap, EFlexWrap, &RenderStyle::initialFlexWrap>::createHandler());
setPropertyHandler(CSSPropertyWebkitGridAutoFlow, ApplyPropertyDefault<GridAutoFlow, &RenderStyle::gridAutoFlow, GridAutoFlow, &RenderStyle::setGridAutoFlow, GridAutoFlow, &RenderStyle::initialGridAutoFlow>::createHandler());
- setPropertyHandler(CSSPropertyWebkitJustifyContent, ApplyPropertyDefault<EJustifyContent, &RenderStyle::justifyContent, EJustifyContent, &RenderStyle::setJustifyContent, EJustifyContent, &RenderStyle::initialJustifyContent>::createHandler());
- setPropertyHandler(CSSPropertyWebkitOrder, ApplyPropertyDefault<int, &RenderStyle::order, int, &RenderStyle::setOrder, int, &RenderStyle::initialOrder>::createHandler());
+ setPropertyHandler(CSSPropertyJustifyContent, ApplyPropertyDefault<EJustifyContent, &RenderStyle::justifyContent, EJustifyContent, &RenderStyle::setJustifyContent, EJustifyContent, &RenderStyle::initialJustifyContent>::createHandler());
+ setPropertyHandler(CSSPropertyOrder, ApplyPropertyDefault<int, &RenderStyle::order, int, &RenderStyle::setOrder, int, &RenderStyle::initialOrder>::createHandler());
#if ENABLE(CSS_REGIONS)
setPropertyHandler(CSSPropertyWebkitFlowFrom, ApplyPropertyString<MapNoneToNull, &RenderStyle::regionThread, &RenderStyle::setRegionThread, &RenderStyle::initialRegionThread>::createHandler());
setPropertyHandler(CSSPropertyWebkitFlowInto, ApplyPropertyString<MapNoneToNull, &RenderStyle::flowThread, &RenderStyle::setFlowThread, &RenderStyle::initialFlowThread>::createHandler());
diff --git a/Source/WebCore/css/StylePropertySet.cpp b/Source/WebCore/css/StylePropertySet.cpp
index 75785bc04..a7e3555f8 100644
--- a/Source/WebCore/css/StylePropertySet.cpp
+++ b/Source/WebCore/css/StylePropertySet.cpp
@@ -160,10 +160,10 @@ String StylePropertySet::getPropertyValue(CSSPropertyID propertyID) const
return getShorthandValue(webkitColumnRuleShorthand());
case CSSPropertyWebkitColumns:
return getShorthandValue(webkitColumnsShorthand());
- case CSSPropertyWebkitFlex:
- return getShorthandValue(webkitFlexShorthand());
- case CSSPropertyWebkitFlexFlow:
- return getShorthandValue(webkitFlexFlowShorthand());
+ case CSSPropertyFlex:
+ return getShorthandValue(flexShorthand());
+ case CSSPropertyFlexFlow:
+ return getShorthandValue(flexFlowShorthand());
case CSSPropertyWebkitGridColumn:
return getShorthandValue(webkitGridColumnShorthand());
case CSSPropertyWebkitGridRow:
@@ -886,14 +886,14 @@ String StylePropertySet::asText() const
case CSSPropertyWebkitAnimationFillMode:
shorthandPropertyID = CSSPropertyWebkitAnimation;
break;
- case CSSPropertyWebkitFlexDirection:
- case CSSPropertyWebkitFlexWrap:
- shorthandPropertyID = CSSPropertyWebkitFlexFlow;
+ case CSSPropertyFlexDirection:
+ case CSSPropertyFlexWrap:
+ shorthandPropertyID = CSSPropertyFlexFlow;
break;
- case CSSPropertyWebkitFlexBasis:
- case CSSPropertyWebkitFlexGrow:
- case CSSPropertyWebkitFlexShrink:
- shorthandPropertyID = CSSPropertyWebkitFlex;
+ case CSSPropertyFlexBasis:
+ case CSSPropertyFlexGrow:
+ case CSSPropertyFlexShrink:
+ shorthandPropertyID = CSSPropertyFlex;
break;
case CSSPropertyWebkitMaskPositionX:
case CSSPropertyWebkitMaskPositionY:
diff --git a/Source/WebCore/css/StylePropertyShorthand.cpp b/Source/WebCore/css/StylePropertyShorthand.cpp
index ca4e8b2fa..be3001bf7 100644
--- a/Source/WebCore/css/StylePropertyShorthand.cpp
+++ b/Source/WebCore/css/StylePropertyShorthand.cpp
@@ -344,18 +344,18 @@ const StylePropertyShorthand& webkitColumnRuleShorthand()
return webkitColumnRuleLonghands;
}
-const StylePropertyShorthand& webkitFlexFlowShorthand()
+const StylePropertyShorthand& flexFlowShorthand()
{
- static const CSSPropertyID flexFlowProperties[] = { CSSPropertyWebkitFlexDirection, CSSPropertyWebkitFlexWrap };
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexFlowLonghands, (flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties)));
- return webkitFlexFlowLonghands;
+ static const CSSPropertyID flexFlowProperties[] = { CSSPropertyFlexDirection, CSSPropertyFlexWrap };
+ DEFINE_STATIC_LOCAL(StylePropertyShorthand, flexFlowLonghands, (flexFlowProperties, WTF_ARRAY_LENGTH(flexFlowProperties)));
+ return flexFlowLonghands;
}
-const StylePropertyShorthand& webkitFlexShorthand()
+const StylePropertyShorthand& flexShorthand()
{
- static const CSSPropertyID flexProperties[] = { CSSPropertyWebkitFlexGrow, CSSPropertyWebkitFlexShrink, CSSPropertyWebkitFlexBasis };
- DEFINE_STATIC_LOCAL(StylePropertyShorthand, webkitFlexLonghands, (flexProperties, WTF_ARRAY_LENGTH(flexProperties)));
- return webkitFlexLonghands;
+ static const CSSPropertyID flexProperties[] = { CSSPropertyFlexGrow, CSSPropertyFlexShrink, CSSPropertyFlexBasis };
+ DEFINE_STATIC_LOCAL(StylePropertyShorthand, flexLonghands, (flexProperties, WTF_ARRAY_LENGTH(flexProperties)));
+ return flexLonghands;
}
const StylePropertyShorthand& webkitMarginCollapseShorthand()
@@ -532,10 +532,10 @@ const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID)
return webkitColumnsShorthand();
case CSSPropertyWebkitColumnRule:
return webkitColumnRuleShorthand();
- case CSSPropertyWebkitFlex:
- return webkitFlexShorthand();
- case CSSPropertyWebkitFlexFlow:
- return webkitFlexFlowShorthand();
+ case CSSPropertyFlex:
+ return flexShorthand();
+ case CSSPropertyFlexFlow:
+ return flexFlowShorthand();
case CSSPropertyWebkitGridColumn:
return webkitGridColumnShorthand();
case CSSPropertyWebkitGridRow:
diff --git a/Source/WebCore/css/StylePropertyShorthand.h b/Source/WebCore/css/StylePropertyShorthand.h
index 2ae93563a..bcf0f03ec 100644
--- a/Source/WebCore/css/StylePropertyShorthand.h
+++ b/Source/WebCore/css/StylePropertyShorthand.h
@@ -75,6 +75,8 @@ const StylePropertyShorthand& borderStyleShorthand();
const StylePropertyShorthand& borderTopShorthand();
const StylePropertyShorthand& borderWidthShorthand();
const StylePropertyShorthand& listStyleShorthand();
+const StylePropertyShorthand& flexFlowShorthand();
+const StylePropertyShorthand& flexShorthand();
const StylePropertyShorthand& fontShorthand();
const StylePropertyShorthand& marginShorthand();
const StylePropertyShorthand& outlineShorthand();
@@ -89,8 +91,6 @@ const StylePropertyShorthand& webkitBorderEndShorthand();
const StylePropertyShorthand& webkitBorderStartShorthand();
const StylePropertyShorthand& webkitColumnsShorthand();
const StylePropertyShorthand& webkitColumnRuleShorthand();
-const StylePropertyShorthand& webkitFlexFlowShorthand();
-const StylePropertyShorthand& webkitFlexShorthand();
const StylePropertyShorthand& webkitGridColumnShorthand();
const StylePropertyShorthand& webkitGridRowShorthand();
const StylePropertyShorthand& webkitMarginCollapseShorthand();
diff --git a/Source/WebCore/css/StyleResolver.cpp b/Source/WebCore/css/StyleResolver.cpp
index 2a09d30ba..b3f0cd5b1 100644
--- a/Source/WebCore/css/StyleResolver.cpp
+++ b/Source/WebCore/css/StyleResolver.cpp
@@ -1260,6 +1260,7 @@ static EDisplay equivalentBlockDisplay(EDisplay display, bool isFloating, bool s
case TABLE:
case BOX:
case FLEX:
+ case WEBKIT_FLEX:
case GRID:
return display;
@@ -1273,6 +1274,7 @@ static EDisplay equivalentBlockDisplay(EDisplay display, bool isFloating, bool s
case INLINE_BOX:
return BOX;
case INLINE_FLEX:
+ case WEBKIT_INLINE_FLEX:
return FLEX;
case INLINE_GRID:
return GRID;
@@ -2439,8 +2441,8 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
case CSSPropertyWebkitBorderRadius:
case CSSPropertyWebkitColumns:
case CSSPropertyWebkitColumnRule:
- case CSSPropertyWebkitFlex:
- case CSSPropertyWebkitFlexFlow:
+ case CSSPropertyFlex:
+ case CSSPropertyFlexFlow:
case CSSPropertyWebkitGridColumn:
case CSSPropertyWebkitGridRow:
case CSSPropertyWebkitMarginCollapse:
@@ -3012,16 +3014,16 @@ void StyleResolver::applyProperty(CSSPropertyID id, CSSValue* value)
#if ENABLE(CURSOR_VISIBILITY)
case CSSPropertyWebkitCursorVisibility:
#endif
- case CSSPropertyWebkitAlignContent:
- case CSSPropertyWebkitAlignItems:
- case CSSPropertyWebkitAlignSelf:
- case CSSPropertyWebkitFlexBasis:
- case CSSPropertyWebkitFlexDirection:
- case CSSPropertyWebkitFlexGrow:
- case CSSPropertyWebkitFlexShrink:
- case CSSPropertyWebkitFlexWrap:
- case CSSPropertyWebkitJustifyContent:
- case CSSPropertyWebkitOrder:
+ case CSSPropertyAlignContent:
+ case CSSPropertyAlignItems:
+ case CSSPropertyAlignSelf:
+ case CSSPropertyFlexBasis:
+ case CSSPropertyFlexDirection:
+ case CSSPropertyFlexGrow:
+ case CSSPropertyFlexShrink:
+ case CSSPropertyFlexWrap:
+ case CSSPropertyJustifyContent:
+ case CSSPropertyOrder:
#if ENABLE(CSS_REGIONS)
case CSSPropertyWebkitFlowFrom:
case CSSPropertyWebkitFlowInto:
diff --git a/Source/WebCore/page/animation/CSSPropertyAnimation.cpp b/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
index a3d8ef8c8..197490195 100644
--- a/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
+++ b/Source/WebCore/page/animation/CSSPropertyAnimation.cpp
@@ -927,7 +927,8 @@ private:
class PropertyWrapperFlex : public AnimationPropertyWrapperBase {
public:
- PropertyWrapperFlex() : AnimationPropertyWrapperBase(CSSPropertyWebkitFlex)
+ PropertyWrapperFlex()
+ : AnimationPropertyWrapperBase(CSSPropertyFlex)
{
}
diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp
index b93764828..655b79122 100644
--- a/Source/WebCore/rendering/RenderObject.cpp
+++ b/Source/WebCore/rendering/RenderObject.cpp
@@ -230,6 +230,8 @@ RenderObject* RenderObject::createObject(Element* element, RenderStyle* style)
return new (arena) RenderDeprecatedFlexibleBox(element);
case FLEX:
case INLINE_FLEX:
+ case WEBKIT_FLEX:
+ case WEBKIT_INLINE_FLEX:
return new (arena) RenderFlexibleBox(element);
case GRID:
case INLINE_GRID:
diff --git a/Source/WebCore/rendering/style/RenderStyleConstants.h b/Source/WebCore/rendering/style/RenderStyleConstants.h
index 830612e57..ef61f68c4 100644
--- a/Source/WebCore/rendering/style/RenderStyleConstants.h
+++ b/Source/WebCore/rendering/style/RenderStyleConstants.h
@@ -443,7 +443,7 @@ enum EDisplay {
TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, TABLE_ROW,
TABLE_COLUMN_GROUP, TABLE_COLUMN, TABLE_CELL,
TABLE_CAPTION, BOX, INLINE_BOX,
- FLEX, INLINE_FLEX,
+ FLEX, WEBKIT_FLEX, INLINE_FLEX, WEBKIT_INLINE_FLEX,
GRID, INLINE_GRID,
NONE
};