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

Unified Diff: Source/core/css/resolver/StyleBuilderConverter.h

Issue 424683004: Use StyleBuilderConverter for text-decoration(-line). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Place the new function in order + refactor Created 6 years, 5 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/CSSProperties.in ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderConverter.h
diff --git a/Source/core/css/resolver/StyleBuilderConverter.h b/Source/core/css/resolver/StyleBuilderConverter.h
index d011ddcb029f22bbea6c67db6e2666a6d8e86339..3734e5c0e86f1164a557dde83fadc9044beafdf5 100644
--- a/Source/core/css/resolver/StyleBuilderConverter.h
+++ b/Source/core/css/resolver/StyleBuilderConverter.h
@@ -46,6 +46,7 @@ public:
static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue*);
static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLink = false);
template <typename T> static T convertComputedLength(StyleResolverState&, CSSValue*);
+ template <typename T> static T convertFlags(StyleResolverState&, CSSValue*);
static EGlyphOrientation convertGlyphOrientation(StyleResolverState&, CSSValue*);
static GridPosition convertGridPosition(StyleResolverState&, CSSValue*);
static GridTrackSize convertGridTrackSize(StyleResolverState&, CSSValue*);
@@ -79,6 +80,15 @@ T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal
}
template <typename T>
+T StyleBuilderConverter::convertFlags(StyleResolverState& state, CSSValue* value)
+{
+ T flags = static_cast<T>(0);
+ for (CSSValueListIterator i(value); i.hasMore(); i.advance())
+ flags |= *toCSSPrimitiveValue(i.value());
+ return flags;
+}
+
+template <typename T>
T StyleBuilderConverter::convertLineWidth(StyleResolverState& state, CSSValue* value)
{
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698