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

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

Issue 22482004: Add support for the object-fit CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase for landing 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSProperty.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSPrimitiveValueMappings.h
diff --git a/Source/core/css/CSSPrimitiveValueMappings.h b/Source/core/css/CSSPrimitiveValueMappings.h
index 00b1d40f5d0f75fd57dd1a590f85ea358568041f..d4dea3e587b0c5abaa16a65170da63f556e38367 100644
--- a/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/Source/core/css/CSSPrimitiveValueMappings.h
@@ -4685,6 +4685,45 @@ template<> inline CSSPrimitiveValue::operator EVectorEffect() const
return VE_NONE;
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPaintOrderType e)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_VALUE_ID;
+ switch (e) {
+ case PT_FILL:
+ m_value.valueID = CSSValueFill;
+ break;
+ case PT_STROKE:
+ m_value.valueID = CSSValueStroke;
+ break;
+ case PT_MARKERS:
+ m_value.valueID = CSSValueMarkers;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ m_value.valueID = CSSValueFill;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator EPaintOrderType() const
+{
+ ASSERT(isValueID());
+ switch (m_value.valueID) {
+ case CSSValueFill:
+ return PT_FILL;
+ case CSSValueStroke:
+ return PT_STROKE;
+ case CSSValueMarkers:
+ return PT_MARKERS;
+ default:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
+ return PT_NONE;
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EMaskType e)
: CSSValue(PrimitiveClass)
{
« no previous file with comments | « Source/core/css/CSSParser.h ('k') | Source/core/css/CSSProperty.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698