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

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

Issue 216803002: Implement all shorthand property. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed parseAnimationProperty 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 51c12ec281d94ec9f35dd6962c065bcaaffc99ef..cea6c07046071aa9957c9a26e403354762dcbede 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -2859,6 +2859,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();
esprehn 2014/05/02 22:24:11 What is this doing? This loop doesn't make sense t
tasak 2014/05/12 14:33:27 I would like to see if all longhands have initial
+ }
+ if (isInitial)
+ return cssValuePool().createExplicitInitialValue();
+ if (isInherit)
+ return cssValuePool().createInheritedValue();
+ return nullptr;
+ }
}
logUnimplementedPropertyID(propertyID);

Powered by Google App Engine
This is Rietveld 408576698