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

Unified Diff: Source/core/css/CSSGradientValue.h

Issue 1233363002: 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/CSSCursorImageValue.cpp ('k') | Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGradientValue.h
diff --git a/Source/core/css/CSSGradientValue.h b/Source/core/css/CSSGradientValue.h
index c3ee0f12edae071c59d9a7cccea91e81cc6a0d42..2969b4b46fab1a0174848bf2601790299b62f5af 100644
--- a/Source/core/css/CSSGradientValue.h
+++ b/Source/core/css/CSSGradientValue.h
@@ -85,10 +85,10 @@ class CSSGradientValue : public CSSImageGeneratorValue {
public:
PassRefPtr<Image> image(LayoutObject*, const IntSize&);
- void setFirstX(NullableCSSValue val) { m_firstX = val; }
- void setFirstY(NullableCSSValue val) { m_firstY = val; }
- void setSecondX(NullableCSSValue val) { m_secondX = val; }
- void setSecondY(NullableCSSValue val) { m_secondY = val; }
+ void setFirstX(NullableCSSValue val) { m_firstX = std::move(val); }
+ void setFirstY(NullableCSSValue val) { m_firstY = std::move(val); }
+ void setSecondX(NullableCSSValue val) { m_secondX = std::move(val); }
+ void setSecondY(NullableCSSValue val) { m_secondY = std::move(val); }
void addStop(const CSSGradientColorStop& stop) { m_stops.append(stop); }
@@ -214,11 +214,11 @@ public:
void setFirstRadius(CSSPrimitiveValue val) { m_firstRadius = val; }
void setSecondRadius(CSSPrimitiveValue val) { m_secondRadius = val; }
- void setShape(NullableCSSValue val) { m_shape = val; }
- void setSizingBehavior(NullableCSSValue val) { m_sizingBehavior = val; }
+ void setShape(NullableCSSValue val) { m_shape = std::move(val); }
+ void setSizingBehavior(NullableCSSValue val) { m_sizingBehavior = std::move(val); }
- void setEndHorizontalSize(NullableCSSValue val) { m_endHorizontalSize = val; }
- void setEndVerticalSize(NullableCSSValue val) { m_endVerticalSize = val; }
+ void setEndHorizontalSize(NullableCSSValue val) { m_endHorizontalSize = std::move(val); }
+ void setEndVerticalSize(NullableCSSValue val) { m_endVerticalSize = std::move(val); }
// Create the gradient for a given size.
PassRefPtr<Gradient> createGradient(const CSSToLengthConversionData&, const IntSize&, const LayoutObject&);
@@ -246,7 +246,7 @@ private:
// Resolve points/radii to front end values.
- float resolveRadius(CSSPrimitiveValue, const CSSToLengthConversionData&, float* widthOrHeight = 0);
+ float resolveRadius(const CSSPrimitiveValue&, const CSSToLengthConversionData&, float* widthOrHeight = 0);
// These may be null for non-deprecated gradients.
NullableCSSValue m_firstRadius;
« no previous file with comments | « Source/core/css/CSSCursorImageValue.cpp ('k') | Source/core/css/CSSGradientValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698