Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1057)

Unified Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1812763002: Pseudo and non pseudo elements should return correct computed content value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a1a9368486cb08d47accaafaea48789bb01dc2e8 100644
--- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
+++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -978,6 +978,9 @@ CSSValueID valueForQuoteType(const QuoteType quoteType)
static PassRefPtrWillBeRawPtr<CSSValue> valueForContentData(const ComputedStyle& style)
{
RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ if (style.hasPseudoElementStyle() && !style.contentData()) {
+ 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 +1001,8 @@ 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->isCSSValueID()) {
+ list->append(cssValuePool().createIdentifierValue(toCSSValueIDContentData(contentData)->cssValueID()));
} else {
ASSERT_NOT_REACHED();
}

Powered by Google App Engine
This is Rietveld 408576698