| Index: third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
|
| index 82e384900049f2ed5302ff2879a437543655413b..672f5f95c78d0c6a39a5515678f51a88fd4194d2 100644
|
| --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
|
| +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
|
| @@ -60,6 +60,7 @@ StringToUnitTable createStringToUnitTable()
|
| table.set(String("in"), CSSPrimitiveValue::UnitType::Inches);
|
| table.set(String("pt"), CSSPrimitiveValue::UnitType::Points);
|
| table.set(String("pc"), CSSPrimitiveValue::UnitType::Picas);
|
| + table.set(String(""), CSSPrimitiveValue::UnitType::UserUnits);
|
| table.set(String("deg"), CSSPrimitiveValue::UnitType::Degrees);
|
| table.set(String("rad"), CSSPrimitiveValue::UnitType::Radians);
|
| table.set(String("grad"), CSSPrimitiveValue::UnitType::Gradians);
|
| @@ -120,6 +121,7 @@ CSSPrimitiveValue::UnitCategory CSSPrimitiveValue::unitCategory(UnitType type)
|
| case UnitType::Inches:
|
| case UnitType::Points:
|
| case UnitType::Picas:
|
| + case UnitType::UserUnits:
|
| return CSSPrimitiveValue::ULength;
|
| case UnitType::Milliseconds:
|
| case UnitType::Seconds:
|
| @@ -328,6 +330,7 @@ void CSSPrimitiveValue::cleanup()
|
| case UnitType::Inches:
|
| case UnitType::Points:
|
| case UnitType::Picas:
|
| + case UnitType::UserUnits:
|
| case UnitType::Degrees:
|
| case UnitType::Radians:
|
| case UnitType::Gradians:
|
| @@ -459,6 +462,7 @@ double CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor(UnitType unitTyp
|
| switch (unitType) {
|
| // These are "canonical" units in their respective categories.
|
| case UnitType::Pixels:
|
| + case UnitType::UserUnits:
|
| case UnitType::Degrees:
|
| case UnitType::Milliseconds:
|
| case UnitType::Hertz:
|
| @@ -510,7 +514,6 @@ Length CSSPrimitiveValue::convertToLength(const CSSToLengthConversionData& conve
|
| return computeLength<Length>(conversionData);
|
| if (isPercentage())
|
| return Length(getDoubleValue(), Percent);
|
| - ASSERT(isCalculated());
|
| return Length(cssCalcValue()->toCalcValue(conversionData));
|
| }
|
|
|
| @@ -646,6 +649,7 @@ const char* CSSPrimitiveValue::unitTypeToString(UnitType type)
|
| switch (type) {
|
| case UnitType::Number:
|
| case UnitType::Integer:
|
| + case UnitType::UserUnits:
|
| return "";
|
| case UnitType::Percentage:
|
| return "%";
|
| @@ -744,6 +748,7 @@ String CSSPrimitiveValue::customCSSText() const
|
| case UnitType::Inches:
|
| case UnitType::Points:
|
| case UnitType::Picas:
|
| + case UnitType::UserUnits:
|
| case UnitType::Degrees:
|
| case UnitType::Radians:
|
| case UnitType::Gradians:
|
| @@ -799,6 +804,7 @@ bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const
|
| case UnitType::Inches:
|
| case UnitType::Points:
|
| case UnitType::Picas:
|
| + case UnitType::UserUnits:
|
| case UnitType::Degrees:
|
| case UnitType::Radians:
|
| case UnitType::Gradians:
|
|
|