Index: Source/WebCore/css/CSSParser.cpp |
diff --git a/Source/WebCore/css/CSSParser.cpp b/Source/WebCore/css/CSSParser.cpp |
index 7289672a2d158c6f1d748b67a68ea5ed5c3a7876..733111e3e78ff98961ef8120653564149fc76ebf 100644 |
--- a/Source/WebCore/css/CSSParser.cpp |
+++ b/Source/WebCore/css/CSSParser.cpp |
@@ -1762,7 +1762,7 @@ static inline bool isForwardSlashOperator(CSSParserValue* value) |
return value->unit == CSSParserValue::Operator && value->iValue == '/'; |
} |
-bool CSSParser::validWidth(CSSParserValue* value) |
+bool CSSParser::validWidthOrHeight(CSSParserValue* value) |
{ |
int id = value->id; |
if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic || id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent) |
@@ -1770,15 +1770,6 @@ bool CSSParser::validWidth(CSSParserValue* value) |
return !id && validUnit(value, FLength | FPercent | FNonNeg); |
} |
-// FIXME: Combine this with validWidth when we support fit-content, et al, for heights. |
-bool CSSParser::validHeight(CSSParserValue* value) |
-{ |
- int id = value->id; |
- if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic) |
- return true; |
- return !id && validUnit(value, FLength | FPercent | FNonNeg); |
-} |
- |
inline PassRefPtr<CSSPrimitiveValue> CSSParser::parseValidPrimitive(int identifier, CSSParserValue* value) |
{ |
if (identifier) |
@@ -2209,32 +2200,32 @@ bool CSSParser::parseValue(CSSPropertyID propId, bool important) |
case CSSPropertyMaxWidth: |
case CSSPropertyWebkitMaxLogicalWidth: |
- validPrimitive = (id == CSSValueNone || validWidth(value)); |
+ validPrimitive = (id == CSSValueNone || validWidthOrHeight(value)); |
break; |
case CSSPropertyMinWidth: |
case CSSPropertyWebkitMinLogicalWidth: |
- validPrimitive = validWidth(value); |
+ validPrimitive = validWidthOrHeight(value); |
break; |
case CSSPropertyWidth: |
case CSSPropertyWebkitLogicalWidth: |
- validPrimitive = (id == CSSValueAuto || validWidth(value)); |
+ validPrimitive = (id == CSSValueAuto || validWidthOrHeight(value)); |
break; |
case CSSPropertyMaxHeight: |
case CSSPropertyWebkitMaxLogicalHeight: |
- validPrimitive = (id == CSSValueNone || validHeight(value)); |
+ validPrimitive = (id == CSSValueNone || validWidthOrHeight(value)); |
ojan
2013/04/11 03:21:46
You can merge this with the Width equivalent case.
cbiesinger
2013/04/12 01:17:52
Done.
|
break; |
case CSSPropertyMinHeight: |
case CSSPropertyWebkitMinLogicalHeight: |
- validPrimitive = validHeight(value); |
+ validPrimitive = validWidthOrHeight(value); |
break; |
case CSSPropertyHeight: |
case CSSPropertyWebkitLogicalHeight: |
- validPrimitive = (id == CSSValueAuto || validHeight(value)); |
+ validPrimitive = (id == CSSValueAuto || validWidthOrHeight(value)); |
break; |
case CSSPropertyFontSize: |