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

Unified Diff: Source/core/css/resolver/ViewportStyleResolver.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/resolver/TransformBuilder.cpp ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/ViewportStyleResolver.cpp
diff --git a/Source/core/css/resolver/ViewportStyleResolver.cpp b/Source/core/css/resolver/ViewportStyleResolver.cpp
index 28035aa9a8f429ae7b90ba7a366200905b288637..fbfbc91fce7d4061e79872559c9430e0c77702d4 100644
--- a/Source/core/css/resolver/ViewportStyleResolver.cpp
+++ b/Source/core/css/resolver/ViewportStyleResolver.cpp
@@ -137,11 +137,11 @@ float ViewportStyleResolver::viewportArgumentValue(CSSPropertyID id) const
if (id == CSSPropertyUserZoom)
defaultValue = 1;
- NullableCSSValue value = m_propertySet->getPropertyCSSValue(id);
+ const NullableCSSValue& value = m_propertySet->getPropertyCSSValue(id);
if (!value || !value->isPrimitiveValue())
return defaultValue;
- CSSPrimitiveValue primitiveValue = toCSSPrimitiveValue(*value);
+ const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
if (primitiveValue.isNumber() || primitiveValue.isPx())
return primitiveValue.getFloatValue();
@@ -187,11 +187,11 @@ Length ViewportStyleResolver::viewportLengthValue(CSSPropertyID id) const
|| id == CSSPropertyMaxWidth
|| id == CSSPropertyMinWidth);
- NullableCSSValue value = m_propertySet->getPropertyCSSValue(id);
+ const NullableCSSValue& value = m_propertySet->getPropertyCSSValue(id);
if (!value || !value->isPrimitiveValue())
return Length(); // auto
- CSSPrimitiveValue primitiveValue = toCSSPrimitiveValue(*value);
+ const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
if (primitiveValue.getValueID() == CSSValueInternalExtendToZoom)
return Length(ExtendToZoom);
« no previous file with comments | « Source/core/css/resolver/TransformBuilder.cpp ('k') | Source/core/editing/ApplyStyleCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698