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

Unified Diff: Source/core/css/StylePropertyShorthand.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/StylePropertyShorthand.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StylePropertyShorthand.cpp
diff --git a/Source/core/css/StylePropertyShorthand.cpp b/Source/core/css/StylePropertyShorthand.cpp
index 8d0de73e067d1f061be88c4db7e47e9ab22ea216..badf3be58d6c10e42e313fe22aca5199eb3c92f0 100644
--- a/Source/core/css/StylePropertyShorthand.cpp
+++ b/Source/core/css/StylePropertyShorthand.cpp
@@ -465,6 +465,17 @@ const StylePropertyShorthand& webkitMaskRepeatShorthand()
return webkitMaskRepeatLonghands;
}
+const StylePropertyShorthand& textDecorationShorthand()
+{
+ static const CSSPropertyID textDecorationProperties[] = {
+ CSSPropertyTextDecorationLine,
+ CSSPropertyTextDecorationStyle,
+ CSSPropertyTextDecorationColor
+ };
+ DEFINE_STATIC_LOCAL(StylePropertyShorthand, textDecorationLonghands, (CSSPropertyTextDecoration, textDecorationProperties, WTF_ARRAY_LENGTH(textDecorationProperties)));
+ return textDecorationLonghands;
+}
+
const StylePropertyShorthand& webkitTextEmphasisShorthand()
{
static const CSSPropertyID textEmphasisProperties[] = {
@@ -569,6 +580,8 @@ const StylePropertyShorthand& shorthandForProperty(CSSPropertyID propertyID)
return overflowShorthand();
case CSSPropertyPadding:
return paddingShorthand();
+ case CSSPropertyTextDecoration:
+ return textDecorationShorthand();
case CSSPropertyTransition:
return transitionShorthand();
case CSSPropertyWebkitAnimation:
@@ -905,6 +918,12 @@ const Vector<StylePropertyShorthand> matchingShorthandsForLonghand(CSSPropertyID
map.set(CSSPropertyWebkitMaskRepeatX, maskRepeat);
map.set(CSSPropertyWebkitMaskRepeatY, maskRepeat);
+ Vector<StylePropertyShorthand, 1> textDecoration;
+ textDecoration.uncheckedAppend(textDecorationShorthand());
+ map.set(CSSPropertyTextDecorationLine, textDecoration);
+ map.set(CSSPropertyTextDecorationStyle, textDecoration);
+ map.set(CSSPropertyTextDecorationColor, textDecoration);
+
Vector<StylePropertyShorthand, 1> textEmphasis;
textEmphasis.uncheckedAppend(webkitTextEmphasisShorthand());
map.set(CSSPropertyWebkitTextEmphasisStyle, textEmphasis);
« no previous file with comments | « Source/core/css/StylePropertyShorthand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698