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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.cpp

Issue 1226123008: CSSValue Immediates: Replace CSSPrimitiveValue usage with const references (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@cssvalue_patch_4_attempt_2
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/CSSComputedStyleDeclaration.h ('k') | Source/core/css/CSSCrossfadeValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 81b316d8cb5f1ec0b206e6b560085ee5370cd711..f5f69b6fddaca1a0e0613b3973b5344bb92131da 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -573,7 +573,7 @@ NullableCSSValue CSSComputedStyleDeclaration::getPropertyCSSValue(CSSPropertyID
NullableCSSValue value = ComputedStyleCSSValueMapping::get(propertyID, *style, layoutObject, styledNode, m_allowVisitedStyle);
if (value)
- return *value;
+ return value;
logUnimplementedPropertyID(propertyID);
return nullptr;
@@ -603,14 +603,14 @@ String CSSComputedStyleDeclaration::item(unsigned i) const
return getPropertyNameString(computableProperties()[i]);
}
-bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, const CSSValue propertyValue) const
+bool CSSComputedStyleDeclaration::cssPropertyMatches(CSSPropertyID propertyID, const CSSValue& propertyValue) const
{
if (propertyID == CSSPropertyFontSize && propertyValue.isPrimitiveValue() && m_node) {
m_node->document().updateLayoutIgnorePendingStylesheets();
const ComputedStyle* style = m_node->ensureComputedStyle(m_pseudoElementSpecifier);
if (style && style->fontDescription().keywordSize()) {
CSSValueID sizeValue = cssIdentifierForFontSizeKeyword(style->fontDescription().keywordSize());
- const CSSPrimitiveValue primitiveValue = toCSSPrimitiveValue(propertyValue);
+ const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(propertyValue);
if (primitiveValue.isValueID() && primitiveValue.getValueID() == sizeValue)
return true;
}
« no previous file with comments | « Source/core/css/CSSComputedStyleDeclaration.h ('k') | Source/core/css/CSSCrossfadeValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698