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

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

Issue 1238943004: CSSValue Immediates: Replace CSSValue usage with const references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_1
Patch Set: Rebase Created 5 years, 5 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 | « Source/core/css/StylePropertySet.cpp ('k') | Source/core/css/resolver/CSSToStyleMap.h » ('j') | 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 f4b04463235b9b7fac2cead8fdc56c6832f60cd0..4d2b62844314c6630ae1cd12d6106d6cb139cfb1 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -405,7 +405,7 @@ void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, CSSVal
return;
}
- CSSValue value = prpValue;
+ const CSSValue& value = prpValue;
ShorthandScope scope(this, propId);
const CSSPropertyID* longhands = shorthand.properties();
for (unsigned i = 0; i < shorthandLength; ++i)
@@ -3351,7 +3351,7 @@ NullableCSSValue CSSPropertyParser::parseGridPosition()
return values.release();
}
-static CSSValue gridMissingGridPositionValue(CSSValue value)
+static CSSValue gridMissingGridPositionValue(const CSSValue& value)
{
if (value.isPrimitiveValue() && toCSSPrimitiveValue(value).isCustomIdent())
return value;
@@ -3403,7 +3403,7 @@ bool CSSPropertyParser::parseGridTemplateRowsAndAreas(NullableCSSValue templateC
while (m_valueList->current()) {
// Handle leading <custom-ident>*.
- if (!parseGridLineNames(*m_valueList, *templateRows, trailingIdentWasAdded ? toCSSGridLineNamesValue(NullableCSSValue(templateRows->item(templateRows->length() - 1))) : nullptr))
+ if (!parseGridLineNames(*m_valueList, *templateRows, trailingIdentWasAdded ? NullableCSSValue(toCSSGridLineNamesValue(templateRows->item(templateRows->length() - 1))) : nullptr))
return false;
// Handle a template-area's row.
@@ -5490,7 +5490,7 @@ public:
bool allowWidth() const { return m_allowWidth; }
bool requireOutset() const { return m_requireOutset; }
- void commitImage(CSSValue image)
+ void commitImage(const CSSValue& image)
{
m_image = image;
m_canAdvance = true;
@@ -5555,7 +5555,7 @@ public:
m_allowImage = !m_image;
m_allowRepeat = !m_repeat;
}
- void commitRepeat(CSSValue repeat)
+ void commitRepeat(const CSSValue& repeat)
{
m_repeat = repeat;
m_canAdvance = true;
@@ -6842,7 +6842,7 @@ NullableCSSValue CSSPropertyParser::parseImageSet(CSSParserValueList* valueList)
if (arg->unit != CSSPrimitiveValue::CSS_URI)
return nullptr;
- CSSValue image = createCSSImageValueWithReferrer(arg->string, completeURL(arg->string));
+ const CSSValue& image = createCSSImageValueWithReferrer(arg->string, completeURL(arg->string));
imageSet->append(image);
arg = functionArgs->next();
« no previous file with comments | « Source/core/css/StylePropertySet.cpp ('k') | Source/core/css/resolver/CSSToStyleMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698