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

Unified Diff: Source/core/css/CSSPrimitiveValue.cpp

Issue 1316153003: Removed m_isQuirkValue and used CSSPrimitiveValue::QuirkyEms instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small fix in unitTypeToString() Created 5 years, 3 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: Source/core/css/CSSPrimitiveValue.cpp
diff --git a/Source/core/css/CSSPrimitiveValue.cpp b/Source/core/css/CSSPrimitiveValue.cpp
index 2a6bdb93b1b00d9d5c05b6d530caf8313bb2217e..7e82784ca04993570c16981d5d16ec8d911abd19 100644
--- a/Source/core/css/CSSPrimitiveValue.cpp
+++ b/Source/core/css/CSSPrimitiveValue.cpp
@@ -490,6 +490,7 @@ double CSSPrimitiveValue::computeLengthDouble(const CSSToLengthConversionData& c
switch (type()) {
case UnitType::Ems:
+ case UnitType::QuirkyEms:
factor = conversionData.emFontSize();
break;
case UnitType::Exs:
@@ -678,6 +679,7 @@ bool CSSPrimitiveValue::unitTypeToLengthUnitType(UnitType unitType, LengthUnitTy
lengthType = UnitTypePixels;
return true;
case CSSPrimitiveValue::UnitType::Ems:
+ case CSSPrimitiveValue::UnitType::QuirkyEms:
lengthType = UnitTypeFontSize;
return true;
case CSSPrimitiveValue::UnitType::Exs:
@@ -787,6 +789,7 @@ const char* CSSPrimitiveValue::unitTypeToString(UnitType type)
case UnitType::Percentage:
return "%";
case UnitType::Ems:
+ case UnitType::QuirkyEms:
return "em";
case UnitType::Exs:
return "ex";
@@ -849,7 +852,6 @@ const char* CSSPrimitiveValue::unitTypeToString(UnitType type)
case UnitType::Shape:
case UnitType::CalcPercentageWithNumber:
case UnitType::CalcPercentageWithLength:
- case UnitType::QuirkyEms:
break;
};
ASSERT_NOT_REACHED();
@@ -874,6 +876,7 @@ String CSSPrimitiveValue::customCSSText() const
case UnitType::Number:
case UnitType::Percentage:
case UnitType::Ems:
+ case UnitType::QuirkyEms:
case UnitType::Exs:
case UnitType::Rems:
case UnitType::Chs:
@@ -929,7 +932,6 @@ String CSSPrimitiveValue::customCSSText() const
break;
case UnitType::CalcPercentageWithNumber:
case UnitType::CalcPercentageWithLength:
- case UnitType::QuirkyEms:
ASSERT_NOT_REACHED();
break;
}
@@ -951,6 +953,7 @@ bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const
case UnitType::Number:
case UnitType::Percentage:
case UnitType::Ems:
+ case UnitType::QuirkyEms:
Timothy Loh 2015/09/02 01:59:03 should still be unreachable
sashab 2015/09/02 03:54:49 Done.
case UnitType::Exs:
case UnitType::Rems:
case UnitType::Pixels:
@@ -994,7 +997,6 @@ bool CSSPrimitiveValue::equals(const CSSPrimitiveValue& other) const
case UnitType::Chs:
case UnitType::CalcPercentageWithNumber:
case UnitType::CalcPercentageWithLength:
- case UnitType::QuirkyEms:
return false;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698