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

Side by Side Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 20262002: [css3-text] Implement text-decoration property shorthand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated computed style layout test / operator|= readibility fix Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 return getPositionOffsetValue(style.get(), CSSPropertyRight, rendere r, m_node->document()->renderView()); 2172 return getPositionOffsetValue(style.get(), CSSPropertyRight, rendere r, m_node->document()->renderView());
2173 case CSSPropertyWebkitRubyPosition: 2173 case CSSPropertyWebkitRubyPosition:
2174 return cssValuePool().createValue(style->rubyPosition()); 2174 return cssValuePool().createValue(style->rubyPosition());
2175 case CSSPropertyTableLayout: 2175 case CSSPropertyTableLayout:
2176 return cssValuePool().createValue(style->tableLayout()); 2176 return cssValuePool().createValue(style->tableLayout());
2177 case CSSPropertyTextAlign: 2177 case CSSPropertyTextAlign:
2178 return cssValuePool().createValue(style->textAlign()); 2178 return cssValuePool().createValue(style->textAlign());
2179 case CSSPropertyTextAlignLast: 2179 case CSSPropertyTextAlignLast:
2180 return cssValuePool().createValue(style->textAlignLast()); 2180 return cssValuePool().createValue(style->textAlignLast());
2181 case CSSPropertyTextDecoration: 2181 case CSSPropertyTextDecoration:
2182 return getTextDecorationShorthandValue();
2182 case CSSPropertyTextDecorationLine: 2183 case CSSPropertyTextDecorationLine:
2183 return renderTextDecorationFlagsToCSSValue(style->textDecoration()); 2184 return renderTextDecorationFlagsToCSSValue(style->textDecoration());
2184 case CSSPropertyTextDecorationStyle: 2185 case CSSPropertyTextDecorationStyle:
2185 return renderTextDecorationStyleFlagsToCSSValue(style->textDecoratio nStyle()); 2186 return renderTextDecorationStyleFlagsToCSSValue(style->textDecoratio nStyle());
2186 case CSSPropertyTextDecorationColor: 2187 case CSSPropertyTextDecorationColor:
2187 return currentColorOrValidColor(style.get(), style->textDecorationCo lor()); 2188 return currentColorOrValidColor(style.get(), style->textDecorationCo lor());
2188 #if ENABLE(CSS3_TEXT) 2189 #if ENABLE(CSS3_TEXT)
2189 case CSSPropertyWebkitTextUnderlinePosition: 2190 case CSSPropertyWebkitTextUnderlinePosition:
2190 return cssValuePool().createValue(style->textUnderlinePosition()); 2191 return cssValuePool().createValue(style->textUnderlinePosition());
2191 #endif // CSS3_TEXT 2192 #endif // CSS3_TEXT
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
3076 CSSProperty BackgroundPosition }; 3077 CSSProperty BackgroundPosition };
3077 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin, 3078 static const CSSPropertyID propertiesAfterSlashSeperator[3] = { CSSPropertyB ackgroundSize, CSSPropertyBackgroundOrigin,
3078 CSSPropertyB ackgroundClip }; 3079 CSSPropertyB ackgroundClip };
3079 3080
3080 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated(); 3081 RefPtr<CSSValueList> list = CSSValueList::createSlashSeparated();
3081 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator)))); 3082 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesBeforeSlashSeperator, WTF_ARRAY_LENGTH(prope rtiesBeforeSlashSeperator))));
3082 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator)))); 3083 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyBackground, propertiesAfterSlashSeperator, WTF_ARRAY_LENGTH(proper tiesAfterSlashSeperator))));
3083 return list.release(); 3084 return list.release();
3084 } 3085 }
3085 3086
3087 PassRefPtr<CSSValueList> CSSComputedStyleDeclaration::getTextDecorationShorthand Value() const
3088 {
3089 static const CSSPropertyID properties[3] = { CSSPropertyTextDecorationLine, CSSPropertyTextDecorationStyle, CSSPropertyTextDecorationColor };
3090
3091 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
3092 list->append(getCSSPropertyValuesForShorthandProperties(StylePropertyShortha nd(CSSPropertyTextDecoration, properties, WTF_ARRAY_LENGTH(properties))));
Julien - ping for review 2013/07/29 18:53:12 CSSComputedStyleDeclaration::getCSSPropertyValuesF
abinader 2013/07/29 21:15:32 Nice catch, Julien! By using getCSSPropertyValuesF
3093 return list.release();
3094 }
3095
3086 } // namespace WebCore 3096 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698