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

Unified Diff: Source/core/css/BasicShapeFunctions.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/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSBasicShapes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/BasicShapeFunctions.cpp
diff --git a/Source/core/css/BasicShapeFunctions.cpp b/Source/core/css/BasicShapeFunctions.cpp
index 5eb0551bca491aae11e08e580c8b8fe7ec4a278a..1c6f3be915397f79c267b8cccfa62b137fb87445 100644
--- a/Source/core/css/BasicShapeFunctions.cpp
+++ b/Source/core/css/BasicShapeFunctions.cpp
@@ -133,7 +133,7 @@ static Length convertToLength(const StyleResolverState& state, NullableCSSValue
{
if (!value)
return Length(0, Fixed);
- return toCSSPrimitiveValue(*value).convertToLength(state.cssToLengthConversionData());
+ return toCSSPrimitiveValue(value).convertToLength(state.cssToLengthConversionData());
}
static LengthSize convertToLengthSize(const StyleResolverState& state, NullableCSSValue value)
@@ -141,7 +141,7 @@ static LengthSize convertToLengthSize(const StyleResolverState& state, NullableC
if (!value)
return LengthSize(Length(0, Fixed), Length(0, Fixed));
- Pair* pair = toCSSPrimitiveValue(*value).getPairValue();
+ Pair* pair = toCSSPrimitiveValue(value).getPairValue();
return LengthSize(convertToLength(state, pair->first()), convertToLength(state, pair->second()));
}
@@ -153,10 +153,10 @@ static BasicShapeCenterCoordinate convertToCenterCoordinate(const StyleResolverS
CSSValueID keyword = CSSValueTop;
if (!value) {
keyword = CSSValueCenter;
- } else if (toCSSPrimitiveValue(*value).isValueID()) {
- keyword = toCSSPrimitiveValue(*value).getValueID();
- } else if (Pair* pair = toCSSPrimitiveValue(*value).getPairValue()) {
- keyword = toCSSPrimitiveValue(*pair->first()).getValueID();
+ } else if (toCSSPrimitiveValue(value).isValueID()) {
+ keyword = toCSSPrimitiveValue(value).getValueID();
+ } else if (Pair* pair = toCSSPrimitiveValue(value).getPairValue()) {
+ keyword = pair->first().getValueID();
offset = convertToLength(state, pair->second());
} else {
offset = convertToLength(state, value);
@@ -189,8 +189,8 @@ static BasicShapeRadius cssValueToBasicShapeRadius(const StyleResolverState& sta
if (!radius)
return BasicShapeRadius(BasicShapeRadius::ClosestSide);
- if (toCSSPrimitiveValue(*radius).isValueID()) {
- switch (toCSSPrimitiveValue(*radius).getValueID()) {
+ if (toCSSPrimitiveValue(radius).isValueID()) {
+ switch (toCSSPrimitiveValue(radius).getValueID()) {
case CSSValueClosestSide:
return BasicShapeRadius(BasicShapeRadius::ClosestSide);
case CSSValueFarthestSide:
« no previous file with comments | « Source/core/animation/css/CSSAnimations.cpp ('k') | Source/core/css/CSSBasicShapes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698