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

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

Issue 887243004: Remove redundant current value checks (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unrelated change Created 5 years, 10 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: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index 539ad6ed8b536633969c16a67cce948d565f22a6..c85cca3ffc3e5827032ba15e770ef56ec492e699 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -2081,8 +2081,7 @@ bool CSSPropertyParser::parsePage(CSSPropertyID propId, bool important)
return false;
CSSParserValue* value = m_valueList->current();
- if (!value)
- return false;
+ ASSERT(value);
if (value->id == CSSValueAuto) {
addProperty(propId, cssValuePool().createIdentifierValue(value->id), important);
@@ -2103,8 +2102,7 @@ bool CSSPropertyParser::parseSize(CSSPropertyID propId, bool important)
return false;
CSSParserValue* value = m_valueList->current();
- if (!value)
- return false;
+ ASSERT(value);
RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
@@ -4120,8 +4118,7 @@ bool CSSPropertyParser::parseLegacyPosition(CSSPropertyID propId, bool important
// [ legacy && [ left | right | center ]
CSSParserValue* value = m_valueList->current();
- if (!value)
- return false;
+ ASSERT(value);
if (value->id == CSSValueLegacy) {
value = m_valueList->next();
@@ -4197,8 +4194,7 @@ bool CSSPropertyParser::parseItemPositionOverflowPosition(CSSPropertyID propId,
// <overflow-position> = true | safe
CSSParserValue* value = m_valueList->current();
- if (!value)
- return false;
+ ASSERT(value);
if (value->id == CSSValueAuto || value->id == CSSValueStretch || isBaselinePositionKeyword(value->id)) {
if (m_valueList->next())
@@ -7983,8 +7979,7 @@ bool CSSPropertyParser::isSystemColor(int id)
bool CSSPropertyParser::parseSVGValue(CSSPropertyID propId, bool important)
{
CSSParserValue* value = m_valueList->current();
- if (!value)
- return false;
+ ASSERT(value);
CSSValueID id = value->id;
@@ -8273,8 +8268,7 @@ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::parsePaintOrder() const
return nullptr;
CSSParserValue* value = m_valueList->current();
- if (!value)
- return nullptr;
+ ASSERT(value);
RefPtrWillBeRawPtr<CSSValueList> parsedValues = CSSValueList::createSpaceSeparated();
« 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