Index: Source/core/css/parser/CSSPropertyParser.cpp |
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp |
index 165e2fae20692bdad55995ee43b2dfad5aa252c7..4c07dc937ff62549dbaa65a3c2c50ef080f2b713 100644 |
--- a/Source/core/css/parser/CSSPropertyParser.cpp |
+++ b/Source/core/css/parser/CSSPropertyParser.cpp |
@@ -4684,6 +4684,10 @@ bool CSSPropertyParser::parseLineHeight(bool important) |
validPrimitive = true; |
else |
validPrimitive = (!id && validUnit(value, FNumber | FLength | FPercent | FNonNeg)); |
+ // The line-height property can accept both percents and numbers but additive opertaions are |
+ // not permitted on them in calc() expressions. |
+ if (m_parsedCalculation && m_parsedCalculation->category() == CalcPercentNumber) |
+ validPrimitive = false; |
alancutter (OOO until 2018)
2014/12/31 03:38:08
You should release() m_parsedCalulation here if it
|
if (validPrimitive && (!m_valueList->next() || inShorthand())) |
addProperty(CSSPropertyLineHeight, parseValidPrimitive(id, value), important); |
return validPrimitive; |