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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp

Issue 2814453002: Add CSS conic-gradient calc() support (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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&,
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698