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

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

Issue 1681273003: Add CSS parser support for break-after, break-before and break-inside. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase master Created 4 years, 10 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: third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
index be6100eb0edc84891b5c6c18710da6420228d8b2..16d881d5e87b8f1ece43187f6caca02be1d8aa53 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -1755,41 +1755,78 @@ template<> inline EOverflow CSSPrimitiveValue::convertTo() const
return OVISIBLE;
}
-template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPageBreak e)
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EBreak e)
: CSSValue(PrimitiveClass)
{
init(UnitType::ValueID);
switch (e) {
- case PBAUTO:
+ default:
+ ASSERT_NOT_REACHED();
+ case BreakAuto:
m_value.valueID = CSSValueAuto;
break;
- case PBALWAYS:
+ case BreakAlways:
m_value.valueID = CSSValueAlways;
break;
- case PBAVOID:
+ case BreakAvoid:
m_value.valueID = CSSValueAvoid;
break;
+ case BreakAvoidPage:
+ m_value.valueID = CSSValueAvoidPage;
+ break;
+ case BreakPage:
+ m_value.valueID = CSSValuePage;
+ break;
+ case BreakLeft:
+ m_value.valueID = CSSValueLeft;
+ break;
+ case BreakRight:
+ m_value.valueID = CSSValueRight;
+ break;
+ case BreakRecto:
+ m_value.valueID = CSSValueRecto;
+ break;
+ case BreakVerso:
+ m_value.valueID = CSSValueVerso;
+ break;
+ case BreakAvoidColumn:
+ m_value.valueID = CSSValueAvoidColumn;
+ break;
+ case BreakColumn:
+ m_value.valueID = CSSValueColumn;
+ break;
}
}
-template<> inline EPageBreak CSSPrimitiveValue::convertTo() const
+template<> inline EBreak CSSPrimitiveValue::convertTo() const
{
ASSERT(isValueID());
switch (m_value.valueID) {
+ default:
+ ASSERT_NOT_REACHED();
case CSSValueAuto:
- return PBAUTO;
+ return BreakAuto;
+ case CSSValueAvoid:
+ return BreakAvoid;
+ case CSSValueAlways:
+ return BreakAlways;
+ case CSSValueAvoidPage:
+ return BreakAvoidPage;
+ case CSSValuePage:
+ return BreakPage;
case CSSValueLeft:
+ return BreakLeft;
case CSSValueRight:
- case CSSValueAlways:
- return PBALWAYS; // CSS2.1: "Conforming user agents may map left/right to always."
- case CSSValueAvoid:
- return PBAVOID;
- default:
- break;
+ return BreakRight;
+ case CSSValueRecto:
+ return BreakRecto;
+ case CSSValueVerso:
+ return BreakVerso;
+ case CSSValueAvoidColumn:
+ return BreakAvoidColumn;
+ case CSSValueColumn:
+ return BreakColumn;
}
-
- ASSERT_NOT_REACHED();
- return PBAUTO;
}
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EPosition e)

Powered by Google App Engine
This is Rietveld 408576698