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

Side by Side Diff: Source/core/css/Rect.h

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, 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 unified diff | Download patch
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 13 matching lines...) Expand all
24 #include "core/CoreExport.h" 24 #include "core/CoreExport.h"
25 #include "core/css/CSSValue.h" 25 #include "core/css/CSSValue.h"
26 #include "wtf/RefPtr.h" 26 #include "wtf/RefPtr.h"
27 #include "wtf/text/StringBuilder.h" 27 #include "wtf/text/StringBuilder.h"
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollectedFinalized<Re ctBase> { 31 class CORE_EXPORT RectBase : public RefCountedWillBeGarbageCollectedFinalized<Re ctBase> {
32 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase); 32 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(RectBase);
33 public: 33 public:
34 CSSPrimitiveValue top() const { return toCSSPrimitiveValue(*m_top); } 34 CSSPrimitiveValue top() const { return toCSSPrimitiveValue(m_top); }
35 CSSPrimitiveValue right() const { return toCSSPrimitiveValue(*m_right); } 35 CSSPrimitiveValue right() const { return toCSSPrimitiveValue(m_right); }
36 CSSPrimitiveValue bottom() const { return toCSSPrimitiveValue(*m_bottom); } 36 CSSPrimitiveValue bottom() const { return toCSSPrimitiveValue(m_bottom); }
37 CSSPrimitiveValue left() const { return toCSSPrimitiveValue(*m_left); } 37 CSSPrimitiveValue left() const { return toCSSPrimitiveValue(m_left); }
38 38
39 void setTop(CSSPrimitiveValue top) { m_top = top; } 39 void setTop(CSSPrimitiveValue top) { m_top = top; }
40 void setRight(CSSPrimitiveValue right) { m_right = right; } 40 void setRight(CSSPrimitiveValue right) { m_right = right; }
41 void setBottom(CSSPrimitiveValue bottom) { m_bottom = bottom; } 41 void setBottom(CSSPrimitiveValue bottom) { m_bottom = bottom; }
42 void setLeft(CSSPrimitiveValue left) { m_left = left; } 42 void setLeft(CSSPrimitiveValue left) { m_left = left; }
43 43
44 bool equals(const RectBase& other) const 44 bool equals(const RectBase& other) const
45 { 45 {
46 return m_top == other.m_top 46 return m_top == other.m_top
47 && m_right == other.m_right 47 && m_right == other.m_right
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 } 115 }
116 116
117 // NOTE: If adding fields to this class please make the RectBase trace 117 // NOTE: If adding fields to this class please make the RectBase trace
118 // method virtual and add a trace method in this subclass tracing the new 118 // method virtual and add a trace method in this subclass tracing the new
119 // fields. 119 // fields.
120 }; 120 };
121 121
122 } // namespace blink 122 } // namespace blink
123 123
124 #endif // Rect_h 124 #endif // Rect_h
OLDNEW
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698