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

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

Issue 1318543010: Change first() and second() in CSSPairValue to return const references (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 5 years, 4 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/LengthPairStyleInterpolationTest.cpp ('k') | Source/core/css/CSSBasicShapes.cpp » ('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 2b49710edba5e18dab9c2ee4b4063445ef00779a..dc59d0403ba141204693080cde582e8de7accc57 100644
--- a/Source/core/css/BasicShapeFunctions.cpp
+++ b/Source/core/css/BasicShapeFunctions.cpp
@@ -140,7 +140,7 @@ static LengthSize convertToLengthSize(const StyleResolverState& state, CSSValueP
if (!value)
return LengthSize(Length(0, Fixed), Length(0, Fixed));
- return LengthSize(convertToLength(state, toCSSPrimitiveValue(value->first())), convertToLength(state, toCSSPrimitiveValue(value->second())));
+ return LengthSize(convertToLength(state, &toCSSPrimitiveValue(value->first())), convertToLength(state, &toCSSPrimitiveValue(value->second())));
}
static BasicShapeCenterCoordinate convertToCenterCoordinate(const StyleResolverState& state, CSSValue* value)
@@ -154,8 +154,8 @@ static BasicShapeCenterCoordinate convertToCenterCoordinate(const StyleResolverS
} else if (value->isPrimitiveValue() && toCSSPrimitiveValue(value)->isValueID()) {
keyword = toCSSPrimitiveValue(value)->getValueID();
} else if (value->isValuePair()) {
- keyword = toCSSPrimitiveValue(toCSSValuePair(value)->first())->getValueID();
- offset = convertToLength(state, toCSSPrimitiveValue(toCSSValuePair(value)->second()));
+ keyword = toCSSPrimitiveValue(toCSSValuePair(value)->first()).getValueID();
+ offset = convertToLength(state, &toCSSPrimitiveValue(toCSSValuePair(value)->second()));
} else {
offset = convertToLength(state, toCSSPrimitiveValue(value));
}
« no previous file with comments | « Source/core/animation/LengthPairStyleInterpolationTest.cpp ('k') | Source/core/css/CSSBasicShapes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698