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

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

Issue 1915343003: Add CSS hyphens property behind the test flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-use UseCounter value for -webkit-hyphens and include change to histograms.xml Created 4 years, 8 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 93fdf19c8cb2382f688a400dfb0df1f29e7e1c29..f8e3270eca71cb8954dd619c59eceaec26124aa5 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -1399,6 +1399,41 @@ template<> inline EFloat CSSPrimitiveValue::convertTo() const
return NoFloat;
}
+template<> inline CSSPrimitiveValue::CSSPrimitiveValue(EHyphens e)
+ : CSSValue(PrimitiveClass)
+{
+ init(UnitType::ValueID);
+ switch (e) {
+ case HyphensAuto:
+ m_value.valueID = CSSValueAuto;
+ break;
+ case HyphensManual:
+ m_value.valueID = CSSValueManual;
+ break;
+ case HyphensNone:
+ m_value.valueID = CSSValueNone;
+ break;
+ }
+}
+
+template<> inline EHyphens CSSPrimitiveValue::convertTo() const
+{
+ ASSERT(isValueID());
tkent 2016/04/26 07:08:50 Please use DCHECK for new code.
kojii 2016/04/26 07:38:03 Done, copy-pasted without checking, thanks.
+ switch (m_value.valueID) {
+ case CSSValueAuto:
+ return HyphensAuto;
+ case CSSValueManual:
+ return HyphensManual;
+ case CSSValueNone:
+ return HyphensNone;
+ default:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
tkent 2016/04/26 07:08:51 Please use NOTREACHED for new code.
kojii 2016/04/26 07:38:03 Done.
+ return HyphensManual;
+}
+
template<> inline CSSPrimitiveValue::CSSPrimitiveValue(LineBreak e)
: CSSValue(PrimitiveClass)
{

Powered by Google App Engine
This is Rietveld 408576698