Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
index 53eae84f694221d69e58fba1b700446bd189bb7f..b16ebafb082b39645b4eefd28e1e608ee384f953 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp |
@@ -940,9 +940,12 @@ static CSSPrimitiveValue* ConsumeAngleOrPercent(CSSParserTokenRange& range, |
CSSParserMode, |
ValueRange value_range, |
UnitlessQuirk) { |
- return range.Peek().GetType() == kPercentageToken |
- ? ConsumePercent(range, value_range) |
- : ConsumeAngle(range); |
+ if (auto* css_percent = ConsumePercent(range, value_range)) |
+ return css_percent; |
+ if (auto* css_angle = ConsumeAngle(range)) |
+ return css_angle; |
+ |
+ return nullptr; |
} |
using PositionFunctor = CSSPrimitiveValue* (*)(CSSParserTokenRange&, |