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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.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 | « no previous file | third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitMaxLogicalWidthOrHeight.cpp » ('j') | 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 40c5a1467f40f808266e8f5d9e4df04b2814c4ac..96c9b385c10e8f334d818cf2d70ac46cba9b6e80 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -1784,6 +1784,7 @@ static void CountKeywordOnlyPropertyUsage(CSSPropertyID property,
const CSSValue* CSSPropertyParser::ParseSingleValue(
CSSPropertyID unresolved_property,
CSSPropertyID current_shorthand) {
+ DCHECK(context_);
CSSPropertyID property = resolveCSSPropertyID(unresolved_property);
if (CSSParserFastPaths::IsKeywordPropertyID(property)) {
if (!CSSParserFastPaths::IsValidKeywordPropertyAndValue(
@@ -1801,7 +1802,6 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
const CSSPropertyDescriptor& css_property_desc =
CSSPropertyDescriptor::Get(property);
if (css_property_desc.parseSingleValue) {
- DCHECK(context_);
return css_property_desc.parseSingleValue(range_, *context_,
unresolved_property);
}
@@ -1814,13 +1814,13 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
case CSSPropertyMaxWidth:
case CSSPropertyMaxHeight:
return CSSPropertyLengthUtils::ConsumeMaxWidthOrHeight(
- range_, context_, UnitlessQuirk::kAllow);
+ range_, *context_, UnitlessQuirk::kAllow);
case CSSPropertyMinWidth:
case CSSPropertyMinHeight:
case CSSPropertyWidth:
case CSSPropertyHeight:
return CSSPropertyLengthUtils::ConsumeWidthOrHeight(
- range_, context_, UnitlessQuirk::kAllow);
+ range_, *context_, UnitlessQuirk::kAllow);
case CSSPropertyInlineSize:
case CSSPropertyBlockSize:
case CSSPropertyMinInlineSize:
@@ -1829,7 +1829,7 @@ const CSSValue* CSSPropertyParser::ParseSingleValue(
case CSSPropertyWebkitMinLogicalHeight:
case CSSPropertyWebkitLogicalWidth:
case CSSPropertyWebkitLogicalHeight:
- return CSSPropertyLengthUtils::ConsumeWidthOrHeight(range_, context_);
+ return CSSPropertyLengthUtils::ConsumeWidthOrHeight(range_, *context_);
case CSSPropertyScrollSnapDestination:
case CSSPropertyObjectPosition:
case CSSPropertyPerspectiveOrigin:
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/properties/CSSPropertyAPIWebkitMaxLogicalWidthOrHeight.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698