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

Unified Diff: Source/core/css/CSSPrimitiveValueMappings.h

Issue 14907011: Support 'paint-order' from SVG2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix review issues and add paint-order for text too Created 7 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
Index: Source/core/css/CSSPrimitiveValueMappings.h
diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h
index 2b335bbf9f75b16ba3e8c9de0325c5f40a924cfe..5625fdacbb8e66a49a1e6d3c36e676b9f96c1e73 100644
--- a/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/Source/core/css/CSSPrimitiveValueMappings.h
@@ -4472,6 +4472,42 @@ template<> inline CSSPrimitiveValue::operator EVectorEffect() const
return VE_NONE;
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPaintOrderType e)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_IDENT;
+ switch (e) {
+ case PT_FILL:
+ m_value.ident = CSSValueFill;
+ break;
+ case PT_STROKE:
+ m_value.ident = CSSValueStroke;
+ break;
+ case PT_MARKERS:
+ m_value.ident = CSSValueMarkers;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ m_value.ident = CSSValueFill;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator EPaintOrderType() const
+{
+ switch (m_value.ident) {
+ case CSSValueFill:
+ return PT_FILL;
+ case CSSValueStroke:
+ return PT_STROKE;
+ case CSSValueMarkers:
+ return PT_MARKERS;
+ }
+
+ ASSERT_NOT_REACHED();
+ return PT_NONE;
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e)
: CSSValue(PrimitiveClass)
{

Powered by Google App Engine
This is Rietveld 408576698