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

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

Issue 1303173007: Oilpan: Unship Oilpan from CSSValues Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSValue.cpp ('k') | Source/core/css/CSSValueList.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 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 12 matching lines...) Expand all
23 23
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/PassRefPtr.h" 26 #include "wtf/PassRefPtr.h"
27 #include "wtf/Vector.h" 27 #include "wtf/Vector.h"
28 28
29 namespace blink { 29 namespace blink {
30 30
31 class CORE_EXPORT CSSValueList : public CSSValue { 31 class CORE_EXPORT CSSValueList : public CSSValue {
32 public: 32 public:
33 using iterator = WillBeHeapVector<RefPtrWillBeMember<CSSValue>, 4>::iterator ; 33 using iterator = Vector<RefPtr<CSSValue>, 4>::iterator;
34 using const_iterator = WillBeHeapVector<RefPtrWillBeMember<CSSValue>, 4>::co nst_iterator; 34 using const_iterator = Vector<RefPtr<CSSValue>, 4>::const_iterator;
35 35
36 static PassRefPtrWillBeRawPtr<CSSValueList> createCommaSeparated() 36 static PassRefPtr<CSSValueList> createCommaSeparated()
37 { 37 {
38 return adoptRefWillBeNoop(new CSSValueList(CommaSeparator)); 38 return adoptRef(new CSSValueList(CommaSeparator));
39 } 39 }
40 static PassRefPtrWillBeRawPtr<CSSValueList> createSpaceSeparated() 40 static PassRefPtr<CSSValueList> createSpaceSeparated()
41 { 41 {
42 return adoptRefWillBeNoop(new CSSValueList(SpaceSeparator)); 42 return adoptRef(new CSSValueList(SpaceSeparator));
43 } 43 }
44 static PassRefPtrWillBeRawPtr<CSSValueList> createSlashSeparated() 44 static PassRefPtr<CSSValueList> createSlashSeparated()
45 { 45 {
46 return adoptRefWillBeNoop(new CSSValueList(SlashSeparator)); 46 return adoptRef(new CSSValueList(SlashSeparator));
47 } 47 }
48 48
49 iterator begin() { return m_values.begin(); } 49 iterator begin() { return m_values.begin(); }
50 iterator end() { return m_values.end(); } 50 iterator end() { return m_values.end(); }
51 const_iterator begin() const { return m_values.begin(); } 51 const_iterator begin() const { return m_values.begin(); }
52 const_iterator end() const { return m_values.end(); } 52 const_iterator end() const { return m_values.end(); }
53 53
54 size_t length() const { return m_values.size(); } 54 size_t length() const { return m_values.size(); }
55 CSSValue* item(size_t index) { return m_values[index].get(); } 55 CSSValue* item(size_t index) { return m_values[index].get(); }
56 const CSSValue* item(size_t index) const { return m_values[index].get(); } 56 const CSSValue* item(size_t index) const { return m_values[index].get(); }
57 CSSValue* itemWithBoundsCheck(size_t index) { return index < m_values.size() ? m_values[index].get() : 0; } 57 CSSValue* itemWithBoundsCheck(size_t index) { return index < m_values.size() ? m_values[index].get() : 0; }
58 const CSSValue* itemWithBoundsCheck(size_t index) const { return index < m_v alues.size() ? m_values[index].get() : 0; } 58 const CSSValue* itemWithBoundsCheck(size_t index) const { return index < m_v alues.size() ? m_values[index].get() : 0; }
59 59
60 void append(PassRefPtrWillBeRawPtr<CSSValue> value) { m_values.append(value) ; } 60 void append(PassRefPtr<CSSValue> value) { m_values.append(value); }
61 void prepend(PassRefPtrWillBeRawPtr<CSSValue> value) { m_values.prepend(valu e); } 61 void prepend(PassRefPtr<CSSValue> value) { m_values.prepend(value); }
62 bool removeAll(CSSValue*); 62 bool removeAll(CSSValue*);
63 bool hasValue(CSSValue*) const; 63 bool hasValue(CSSValue*) const;
64 PassRefPtrWillBeRawPtr<CSSValueList> copy(); 64 PassRefPtr<CSSValueList> copy();
65 65
66 String customCSSText() const; 66 String customCSSText() const;
67 bool equals(const CSSValueList&) const; 67 bool equals(const CSSValueList&) const;
68 68
69 bool hasFailedOrCanceledSubresources() const; 69 bool hasFailedOrCanceledSubresources() const;
70 70
71 DECLARE_TRACE_AFTER_DISPATCH();
72
73 protected: 71 protected:
74 CSSValueList(ClassType, ValueListSeparator); 72 CSSValueList(ClassType, ValueListSeparator);
75 73
76 private: 74 private:
77 explicit CSSValueList(ValueListSeparator); 75 explicit CSSValueList(ValueListSeparator);
78 76
79 WillBeHeapVector<RefPtrWillBeMember<CSSValue>, 4> m_values; 77 Vector<RefPtr<CSSValue>, 4> m_values;
80 }; 78 };
81 79
82 DEFINE_CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList()); 80 DEFINE_CSS_VALUE_TYPE_CASTS(CSSValueList, isValueList());
83 81
84 } // namespace blink 82 } // namespace blink
85 83
86 #endif // CSSValueList_h 84 #endif // CSSValueList_h
OLDNEW
« 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