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

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

Issue 1164573002: CSSValue Immediates: Change CSSValue to an object instead of a pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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/CSSValue.cpp ('k') | Source/core/css/CSSValueList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSValueList.h
diff --git a/Source/core/css/CSSValueList.h b/Source/core/css/CSSValueList.h
index f3f8ae456b6990f8652593ea7329bab662dc562a..12d0e62c2d1e7d4c0006241f74645fc9f8422b33 100644
--- a/Source/core/css/CSSValueList.h
+++ b/Source/core/css/CSSValueList.h
@@ -28,10 +28,10 @@
namespace blink {
-class CORE_EXPORT CSSValueList : public CSSValue {
+class CORE_EXPORT CSSValueList : public CSSValueObject {
public:
- using iterator = WillBeHeapVector<RefPtrWillBeMember<CSSValue>, 4>::iterator;
- using const_iterator = WillBeHeapVector<RefPtrWillBeMember<CSSValue>, 4>::const_iterator;
+ using iterator = WillBeHeapVector<CSSValue, 4>::iterator;
+ using const_iterator = WillBeHeapVector<CSSValue, 4>::const_iterator;
static PassRefPtrWillBeRawPtr<CSSValueList> createCommaSeparated()
{
@@ -52,15 +52,15 @@ public:
const_iterator end() const { return m_values.end(); }
size_t length() const { return m_values.size(); }
- CSSValue* item(size_t index) { return m_values[index].get(); }
- const CSSValue* item(size_t index) const { return m_values[index].get(); }
- CSSValue* itemWithBoundsCheck(size_t index) { return index < m_values.size() ? m_values[index].get() : 0; }
- const CSSValue* itemWithBoundsCheck(size_t index) const { return index < m_values.size() ? m_values[index].get() : 0; }
-
- void append(PassRefPtrWillBeRawPtr<CSSValue> value) { m_values.append(value); }
- void prepend(PassRefPtrWillBeRawPtr<CSSValue> value) { m_values.prepend(value); }
- bool removeAll(CSSValue*);
- bool hasValue(CSSValue*) const;
+ CSSValue item(size_t index) { return m_values[index]; }
+ const CSSValue item(size_t index) const { return m_values[index]; }
+ NullableCSSValue itemWithBoundsCheck(size_t index) { return index < m_values.size() ? NullableCSSValue(m_values[index]) : nullptr; }
+ const NullableCSSValue itemWithBoundsCheck(size_t index) const { return index < m_values.size() ? NullableCSSValue(m_values[index]) : nullptr; }
+
+ void append(CSSValue value) { m_values.append(value); }
+ void prepend(CSSValue value) { m_values.prepend(value); }
+ bool removeAll(CSSValue);
+ bool hasValue(CSSValue) const;
PassRefPtrWillBeRawPtr<CSSValueList> copy();
String customCSSText() const;
@@ -76,7 +76,7 @@ protected:
private:
explicit CSSValueList(ValueListSeparator);
- WillBeHeapVector<RefPtrWillBeMember<CSSValue>, 4> m_values;
+ WillBeHeapVector<CSSValue, 4> m_values;
};
DEFINE_CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList());
« no previous file with comments | « Source/core/css/CSSValue.cpp ('k') | Source/core/css/CSSValueList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698