| Index: third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
|
| index 911704e775f27b58193277f85033bcdcbf29a27a..13df3de98d63b0bbc47e24d4b7571f3f3957cd86 100644
|
| --- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
|
| +++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
|
| @@ -325,12 +325,6 @@ static bool allowInitialInShorthand(CSSPropertyID propertyID)
|
| }
|
| }
|
|
|
| -// TODO(timloh): This should go away eventually, see crbug.com/471917
|
| -static bool allowImplicitInitialInShorthand(CSSPropertyID propertyID)
|
| -{
|
| - return propertyID == CSSPropertyBackground || propertyID == CSSPropertyWebkitMask;
|
| -}
|
| -
|
| String StylePropertySerializer::commonShorthandChecks(const StylePropertyShorthand& shorthand) const
|
| {
|
| int longhandCount = shorthand.length();
|
| @@ -372,14 +366,10 @@ String StylePropertySerializer::commonShorthandChecks(const StylePropertyShortha
|
| }
|
|
|
| bool allowInitial = allowInitialInShorthand(shorthand.id());
|
| - bool allowImplicitInitial = allowInitial || allowImplicitInitialInShorthand(shorthand.id());
|
| for (int i = 0; i < longhandCount; i++) {
|
| const CSSValue& value = *longhands[i];
|
| - if (value.isImplicitInitialValue()) {
|
| - if (allowImplicitInitial)
|
| + if (value.isImplicit())
|
| continue;
|
| - return emptyString();
|
| - }
|
| if (!allowInitial && value.isInitialValue())
|
| return emptyString();
|
| if (value.isInheritedValue() || value.isUnsetValue() || value.isPendingSubstitutionValue())
|
| @@ -709,7 +699,7 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
|
|
|
| // FIXME: At some point we need to fix this code to avoid returning an invalid shorthand,
|
| // since some longhand combinations are not serializable into a single shorthand.
|
| - if (!value->isPrimitiveValue() || !yValue.isPrimitiveValue())
|
| + if (!value->isPrimitiveValue() || !yValue.isPrimitiveValue() || value->isImplicit() || yValue.isImplicit())
|
| continue;
|
|
|
| CSSValueID xId = toCSSPrimitiveValue(value)->getValueID();
|
| @@ -727,7 +717,7 @@ String StylePropertySerializer::getLayeredShorthandValue(const StylePropertyShor
|
| }
|
| }
|
|
|
| - if (!(value->isInitialValue() && toCSSInitialValue(value)->isImplicit())) {
|
| + if (!(value->isImplicit())) {
|
| if (property == CSSPropertyBackgroundSize || property == CSSPropertyWebkitMaskSize) {
|
| if (foundPositionYCSSProperty || foundPositionXCSSProperty)
|
| layerResult.append(" / ");
|
| @@ -789,8 +779,9 @@ String StylePropertySerializer::getCommonValue(const StylePropertyShorthand& sho
|
| String res;
|
| for (unsigned i = 0; i < shorthand.length(); ++i) {
|
| const CSSValue* value = m_propertySet.getPropertyCSSValue(shorthand.properties()[i]);
|
| - // FIXME: CSSInitialValue::cssText should generate the right value.
|
| String text = value->cssText();
|
| + if (value->isImplicit())
|
| + text = "initial";
|
| if (res.isNull())
|
| res = text;
|
| else if (res != text)
|
|
|