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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.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/resolver/StyleBuilderCustom.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
index 845a3f092c3c62ef4647eb9c56f39931f049ea20..29153c4e3b2aca1dc4eb31eb6f62d29b076f3975 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -657,8 +657,15 @@ void StyleBuilderFunctions::applyInheritCSSPropertyContent(StyleResolverState&)
void StyleBuilderFunctions::applyValueCSSPropertyContent(StyleResolverState& state, CSSValue* value)
{
- // list of string, uri, counter, attr, i
+ if (value->isPrimitiveValue()) {
+ CSSValueID cssValueID = toCSSPrimitiveValue(*value).getValueID();
+ if (cssValueID == CSSValueNormal || cssValueID == CSSValueNone) {
+ state.style()->clearContent();
+ return;
+ }
+ }
+ // list of string, uri, counter, attr, i
bool didSet = false;
for (auto& item : toCSSValueList(*value)) {
if (item->isImageGeneratorValue()) {

Powered by Google App Engine
This is Rietveld 408576698