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

Unified Diff: third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp

Issue 2827963003: Added null safety for CSSParserContext in CSSPropertyLengthUtils. (Closed)
Patch Set: addressed review 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/properties/CSSPropertyLengthUtils.h ('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/properties/CSSPropertyLengthUtils.cpp
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
index 9d0c3f01702b95f22e354a2c209e7cc6c5de23f5..88248843848ed640891433f4cf272a38f138f2fb 100644
--- a/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
@@ -12,23 +12,23 @@ namespace blink {
namespace {
-bool ValidWidthOrHeightKeyword(CSSValueID id, const CSSParserContext* context) {
+bool ValidWidthOrHeightKeyword(CSSValueID id, const CSSParserContext& context) {
if (id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent ||
id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent ||
id == CSSValueMinContent || id == CSSValueMaxContent ||
id == CSSValueFitContent) {
switch (id) {
case CSSValueWebkitMinContent:
- context->Count(UseCounter::kCSSValuePrefixedMinContent);
+ context.Count(UseCounter::kCSSValuePrefixedMinContent);
break;
case CSSValueWebkitMaxContent:
- context->Count(UseCounter::kCSSValuePrefixedMaxContent);
+ context.Count(UseCounter::kCSSValuePrefixedMaxContent);
break;
case CSSValueWebkitFillAvailable:
- context->Count(UseCounter::kCSSValuePrefixedFillAvailable);
+ context.Count(UseCounter::kCSSValuePrefixedFillAvailable);
break;
case CSSValueWebkitFitContent:
- context->Count(UseCounter::kCSSValuePrefixedFitContent);
+ context.Count(UseCounter::kCSSValuePrefixedFitContent);
break;
default:
break;
@@ -42,24 +42,24 @@ bool ValidWidthOrHeightKeyword(CSSValueID id, const CSSParserContext* context) {
CSSValue* CSSPropertyLengthUtils::ConsumeMaxWidthOrHeight(
CSSParserTokenRange& range,
- const CSSParserContext* context,
+ const CSSParserContext& context,
CSSPropertyParserHelpers::UnitlessQuirk unitless) {
if (range.Peek().Id() == CSSValueNone ||
ValidWidthOrHeightKeyword(range.Peek().Id(), context))
return CSSPropertyParserHelpers::ConsumeIdent(range);
return CSSPropertyParserHelpers::ConsumeLengthOrPercent(
- range, context->Mode(), kValueRangeNonNegative, unitless);
+ range, context.Mode(), kValueRangeNonNegative, unitless);
}
CSSValue* CSSPropertyLengthUtils::ConsumeWidthOrHeight(
CSSParserTokenRange& range,
- const CSSParserContext* context,
+ const CSSParserContext& context,
CSSPropertyParserHelpers::UnitlessQuirk unitless) {
if (range.Peek().Id() == CSSValueAuto ||
ValidWidthOrHeightKeyword(range.Peek().Id(), context))
return CSSPropertyParserHelpers::ConsumeIdent(range);
return CSSPropertyParserHelpers::ConsumeLengthOrPercent(
- range, context->Mode(), kValueRangeNonNegative, unitless);
+ range, context.Mode(), kValueRangeNonNegative, unitless);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698