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

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

Issue 17101024: Add support for CSS3 "text-decoration" shorthand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added missing code pointed out by Alexis Created 7 years, 6 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
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.h ('k') | Source/core/css/CSSParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 44b0c319e091e2411f67521121e63ecec47e40c8..71d75fc092da01c24680fff3ecf7161177cdf815 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -2128,6 +2128,7 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropert
case CSSPropertyTextAlign:
return cssValuePool().createValue(style->textAlign());
case CSSPropertyTextDecoration:
+ return getTextDecorationShorthandValue();
case CSSPropertyTextDecorationLine:
return renderTextDecorationFlagsToCSSValue(style->textDecoration());
case CSSPropertyTextDecorationStyle:
@@ -2990,4 +2991,13 @@ PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getBackgroundShorthandValu
return list.release();
}
+PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getTextDecorationShorthandValue() const
+{
+ static const CSSPropertyID properties[3] = { CSSPropertyTextDecorationLine, CSSPropertyTextDecorationStyle, CSSPropertyTextDecorationColor };
+
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShorthand(CSSPropertyTextDecoration, properties, WTF_ARRAY_LENGTH(properties))));
+ return list.release();
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.h ('k') | Source/core/css/CSSParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698