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

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

Issue 2892483004: Refactored out need to pass unresolved property id to ConsumePerspective (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | 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/CSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index a959114ac27454c303d921671c8b60b7e8be0a18..e29b3bc6b9d72f12275fb08782efe52e328bda78 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -761,13 +761,12 @@ static CSSValue* ConsumeNoneOrURI(CSSParserTokenRange& range,
static CSSValue* ConsumePerspective(CSSParserTokenRange& range,
const CSSParserContext* context,
- CSSPropertyID unresolved_property) {
+ bool use_legacy_parsing) {
if (range.Peek().Id() == CSSValueNone)
return ConsumeIdent(range);
CSSPrimitiveValue* parsed_value =
ConsumeLength(range, context->Mode(), kValueRangeAll);
- if (!parsed_value &&
- (unresolved_property == CSSPropertyAliasWebkitPerspective)) {
+ if (!parsed_value && use_legacy_parsing) {
double perspective;
if (!ConsumeNumberRaw(range, perspective))
return nullptr;
@@ -1765,7 +1764,9 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
return ConsumeLengthOrPercent(range_, kSVGAttributeMode, kValueRangeAll,
UnitlessQuirk::kForbid);
case CSSPropertyPerspective:
- return ConsumePerspective(range_, context_, unresolved_property);
+ return ConsumePerspective(
+ range_, context_,
+ unresolved_property == CSSPropertyAliasWebkitPerspective);
case CSSPropertyScrollSnapPointsX:
case CSSPropertyScrollSnapPointsY:
return ConsumeScrollSnapPoints(range_, context_->Mode());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698