Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| index 82158100fcd84ad2a1b26eed060053aafc4056a3..585b04486a572ed067534ebbdaa042a82bb61c07 100644 |
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| @@ -975,9 +975,24 @@ CSSValueID valueForQuoteType(const QuoteType quoteType) |
| return CSSValueInvalid; |
| } |
| +CSSValueID valueForElementContent(const ElementContent elementContent) |
|
nainar
2016/03/21 00:12:08
Added the mapping here as QuoteType the other enum
|
| +{ |
| + switch (elementContent) { |
| + case ContentDataNone: |
| + return CSSValueNone; |
| + case ContentDataNormal: |
| + return CSSValueNormal; |
| + } |
| + ASSERT_NOT_REACHED(); |
| + return CSSValueInvalid; |
| +} |
| + |
| static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle& style) |
| { |
| RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
| + if (!style.contentData() && style.hasPseudoElementStyle()) { |
| + list->append(cssValuePool().createIdentifierValue(CSSValueNormal)); |
| + } |
| for (const ContentData* contentData = style.contentData(); contentData; contentData = contentData->next()) { |
| if (contentData->isCounter()) { |
| const CounterContent* counter = toCounterContentData(contentData)->counter(); |
| @@ -998,6 +1013,9 @@ static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle& |
| } else if (contentData->isQuote()) { |
| const QuoteType quoteType = toQuoteContentData(contentData)->quote(); |
| list->append(cssValuePool().createIdentifierValue(valueForQuoteType(quoteType))); |
| + } else if (contentData->isElementContent()) { |
| + ElementContent elementContent = toElementContentContentData(contentData)->elementContent(); |
| + list->append(cssValuePool().createIdentifierValue(valueForElementContent(elementContent))); |
| } else { |
| ASSERT_NOT_REACHED(); |
| } |