| Index: third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
|
| diff --git a/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl b/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
|
| index 2252e28842451bf31f44cf81ef6188fa67d81bde..b526edb2323ccbb9e1f0af85c1fd95658e96e685 100644
|
| --- a/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
|
| +++ b/third_party/WebKit/Source/build/scripts/templates/CSSOMTypes.cpp.tmpl
|
| @@ -13,19 +13,15 @@ namespace blink {
|
|
|
| bool CSSOMTypes::PropertyCanTake(CSSPropertyID id,
|
| const CSSStyleValue& styleValue) {
|
| - // Shortcut special case.
|
| - if (styleValue.GetType() == CSSStyleValue::kSimpleLengthType ||
|
| - styleValue.GetType() == CSSStyleValue::kCalcLengthType) {
|
| - // TODO(meade): Rewrite this once the new length types are spec'd.
|
| - // if (ToCSSLengthValue(styleValue).ContainsPercent() &&
|
| - // !CSSPropertyMetadata::PropertySupportsPercentage(id)) {
|
| - // return false;
|
| - // }
|
| - } else if (styleValue.GetType() == CSSStyleValue::kKeywordType) {
|
| - // Keywords are also handled differently.
|
| + if (styleValue.GetType() == CSSStyleValue::kKeywordType) {
|
| return CSSOMKeywords::ValidKeywordForProperty(
|
| id, ToCSSKeywordValue(styleValue));
|
| - } else if (styleValue.GetType() == CSSStyleValue::kUnknown) {
|
| + }
|
| + if (styleValue.ContainsPercent() &&
|
| + !CSSPropertyMetadata::PropertySupportsPercentage(id)) {
|
| + return false;
|
| + }
|
| + if (styleValue.GetType() == CSSStyleValue::kUnknownType) {
|
| // The check happens later in this case.
|
| return true;
|
| }
|
|
|