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

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

Issue 25687002: Add support for the column-fill property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Put changes to problematic files (for the bots) back in. Created 7 years, 2 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-in.cpp ('k') | Source/core/css/CSSProperties.in » ('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 e538b8fee5c16840e906177a131196e57512344c..a8c356543f322d276381100893c5580434cd17e1 100644
--- a/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/Source/core/css/CSSPrimitiveValueMappings.h
@@ -176,6 +176,32 @@ template<> inline CSSPrimitiveValue::operator CSSReflectionDirection() const
return ReflectionBelow;
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnFill columnFill)
+ : CSSValue(PrimitiveClass)
+{
+ m_primitiveUnitType = CSS_VALUE_ID;
+ switch (columnFill) {
+ case ColumnFillAuto:
+ m_value.valueID = CSSValueAuto;
+ break;
+ case ColumnFillBalance:
+ m_value.valueID = CSSValueBalance;
+ break;
+ }
+}
+
+template<> inline CSSPrimitiveValue::operator ColumnFill() const
+{
+ if (m_primitiveUnitType == CSS_VALUE_ID) {
+ if (m_value.valueID == CSSValueBalance)
+ return ColumnFillBalance;
+ if (m_value.valueID == CSSValueAuto)
+ return ColumnFillAuto;
+ }
+ ASSERT_NOT_REACHED();
+ return ColumnFillBalance;
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(ColumnSpan columnSpan)
: CSSValue(PrimitiveClass)
{
« no previous file with comments | « Source/core/css/CSSParser-in.cpp ('k') | Source/core/css/CSSProperties.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698