Chromium Code Reviews| Index: Source/core/css/StylePropertyShorthandCustom.cpp |
| diff --git a/Source/core/css/StylePropertyShorthandCustom.cpp b/Source/core/css/StylePropertyShorthandCustom.cpp |
| index cbc55769c0d773641ae4f9ca8546f6794093fb13..0b5184f334c0eb2229cc582df5f5d70ca80bc503 100644 |
| --- a/Source/core/css/StylePropertyShorthandCustom.cpp |
| +++ b/Source/core/css/StylePropertyShorthandCustom.cpp |
| @@ -113,6 +113,22 @@ bool isExpandedShorthand(CSSPropertyID id) |
| return shorthandForProperty(id).length(); |
| } |
| +bool isExpandedShorthandForAll(CSSPropertyID propertyId) |
| +{ |
| + // FIXME: isExpandedShorthand says "font" is not an expanded shorthand, |
| + // but font is expanded to font-family, font-size, and so on. |
| + // StylePropertySerializer::asText should not generate css text like |
| + // "font: initial; font-family: initial;...". To avoid this, we need to |
|
dglazkov
2014/06/17 15:13:14
This seems like a bug in our code? I remember some
tasak
2014/06/18 05:16:31
Yes. Next I will create StylePropertySerializer pa
|
| + // treat "font" as an expanded shorthand. |
| + // And while applying "all" property, we cannot apply "font" property |
| + // directly. This causes ASSERT crash, because StyleBuilder assume that |
| + // all given properties are not expanded shorthands. |
| + // "marker" has the same issue. |
| + if (propertyId == CSSPropertyMarker || propertyId == CSSPropertyFont) |
| + return true; |
| + return shorthandForProperty(propertyId).length(); |
| +} |
| + |
| unsigned indexOfShorthandForLonghand(CSSPropertyID shorthandID, const Vector<StylePropertyShorthand, 4>& shorthands) |
| { |
| for (unsigned i = 0; i < shorthands.size(); ++i) { |