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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 216803002: Implement all shorthand property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated css-properties-as-js-properties-expected.txt Created 6 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: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 67e2a34c66c8ec3505ceb574d0129edd91fb2c0c..543148afe1b162a5ca872061a6e320cb23f07ff5 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -2853,6 +2853,23 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValu
case CSSPropertyPaintOrder:
case CSSPropertyWritingMode:
return getSVGPropertyCSSValue(propertyID, DoNotUpdateLayout);
+
+ case CSSPropertyAll:
+ {
+ // FIXME: need to support "unset".
+ bool isInitial = true;
+ bool isInherit = true;
+ for (unsigned i = 0; i < allShorthand().length() && (isInitial || isInherit); ++i) {
+ RefPtrWillBeRawPtr<CSSValue> value = getPropertyCSSValue(allShorthand().properties()[i], DoNotUpdateLayout);
+ isInitial = isInitial && value->isInitialValue();
+ isInherit = isInherit && value->isInheritedValue();
+ }
+ if (isInitial)
+ return cssValuePool().createExplicitInitialValue();
+ if (isInherit)
+ return cssValuePool().createInheritedValue();
+ return nullptr;
+ }
}
logUnimplementedPropertyID(propertyID);

Powered by Google App Engine
This is Rietveld 408576698