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

Unified Diff: Source/core/css/Rect.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/Pair.h ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/Rect.h
diff --git a/Source/core/css/Rect.h b/Source/core/css/Rect.h
index 2ce8b26ae89ae020a4f15c9520625d282f4eb332..0bae3ab185a74e04b2caa3f7645df07fd0a908ec 100644
--- a/Source/core/css/Rect.h
+++ b/Source/core/css/Rect.h
@@ -31,15 +31,15 @@ namespace blink {
class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollectedFinalized<RectBase> {
DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase);
public:
- CSSPrimitiveValue top() const { return toCSSPrimitiveValue(*m_top); }
- CSSPrimitiveValue right() const { return toCSSPrimitiveValue(*m_right); }
- CSSPrimitiveValue bottom() const { return toCSSPrimitiveValue(*m_bottom); }
- CSSPrimitiveValue left() const { return toCSSPrimitiveValue(*m_left); }
-
- void setTop(CSSPrimitiveValue top) { m_top = top; }
- void setRight(CSSPrimitiveValue right) { m_right = right; }
- void setBottom(CSSPrimitiveValue bottom) { m_bottom = bottom; }
- void setLeft(CSSPrimitiveValue left) { m_left = left; }
+ const CSSPrimitiveValue& top() const { return toCSSPrimitiveValue(*m_top); }
+ const CSSPrimitiveValue& right() const { return toCSSPrimitiveValue(*m_right); }
+ const CSSPrimitiveValue& bottom() const { return toCSSPrimitiveValue(*m_bottom); }
+ const CSSPrimitiveValue& left() const { return toCSSPrimitiveValue(*m_left); }
+
+ void setTop(const CSSPrimitiveValue& top) { m_top = top; }
+ void setRight(const CSSPrimitiveValue& right) { m_right = right; }
+ void setBottom(const CSSPrimitiveValue& bottom) { m_bottom = bottom; }
+ void setLeft(const CSSPrimitiveValue& left) { m_left = left; }
bool equals(const RectBase& other) const
{
« no previous file with comments | « Source/core/css/Pair.h ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698