Chromium Code Reviews| Index: Source/core/dom/shadow/ContentDistribution.h |
| diff --git a/Source/core/dom/shadow/ContentDistribution.h b/Source/core/dom/shadow/ContentDistribution.h |
| index 65a221d9ea896ee0217f95d600dcfc3aaf334690..d79a9ac881a74636f1eed692419d08ea31d08421 100644 |
| --- a/Source/core/dom/shadow/ContentDistribution.h |
| +++ b/Source/core/dom/shadow/ContentDistribution.h |
| @@ -38,33 +38,36 @@ |
| namespace WebCore { |
| -class ContentDistribution { |
| +class ContentDistribution FINAL { |
| + ALLOW_ONLY_INLINE_ALLOCATION(); |
|
haraken
2014/05/12 12:21:38
This should be DISALLOW_ALLOCATION, since ContentD
sof
2014/05/12 12:37:49
Yes, got my DISALLOW_ALLOCATION() vs ALLOW_ONLY_IN
|
| public: |
| ContentDistribution() { m_nodes.reserveInitialCapacity(32); } |
| - PassRefPtr<Node> first() const { return m_nodes.first(); } |
| - PassRefPtr<Node> last() const { return m_nodes.last(); } |
| - PassRefPtr<Node> at(size_t index) const { return m_nodes.at(index); } |
| + PassRefPtrWillBeRawPtr<Node> first() const { return m_nodes.first(); } |
| + PassRefPtrWillBeRawPtr<Node> last() const { return m_nodes.last(); } |
| + PassRefPtrWillBeRawPtr<Node> at(size_t index) const { return m_nodes.at(index); } |
| size_t size() const { return m_nodes.size(); } |
| bool isEmpty() const { return m_nodes.isEmpty(); } |
| - void append(PassRefPtr<Node>); |
| + void append(PassRefPtrWillBeRawPtr<Node>); |
| void clear() { m_nodes.clear(); m_indices.clear(); } |
| void shrinkToFit() { m_nodes.shrinkToFit(); } |
| - bool contains(const Node* node) const { return m_indices.contains(node); } |
| + bool contains(const Node* node) const { return m_indices.contains(const_cast<Node*>(node)); } |
| size_t find(const Node*) const; |
| Node* nextTo(const Node*) const; |
| Node* previousTo(const Node*) const; |
| void swap(ContentDistribution& other); |
| - const Vector<RefPtr<Node> >& nodes() const { return m_nodes; } |
| + const WillBeHeapVector<RefPtrWillBeMember<Node> >& nodes() const { return m_nodes; } |
| + |
| + void traceAfterDispatch(Visitor*); |
|
haraken
2014/05/12 12:21:38
Then you can simply use trace().
|
| private: |
| - Vector<RefPtr<Node> > m_nodes; |
| - HashMap<const Node*, size_t> m_indices; |
| + WillBeHeapVector<RefPtrWillBeMember<Node> > m_nodes; |
| + WillBeHeapHashMap<RawPtrWillBeMember<Node>, size_t> m_indices; |
| }; |
| } |