Index: Source/core/dom/shadow/ContentDistribution.cpp |
diff --git a/Source/core/dom/shadow/ContentDistribution.cpp b/Source/core/dom/shadow/ContentDistribution.cpp |
index a53ff57b81b0ce149d5c118210d4e70968ef7032..ef008521cb95c485463442804108fec8a02c45ba 100644 |
--- a/Source/core/dom/shadow/ContentDistribution.cpp |
+++ b/Source/core/dom/shadow/ContentDistribution.cpp |
@@ -37,7 +37,7 @@ void ContentDistribution::swap(ContentDistribution& other) |
m_indices.swap(other.m_indices); |
} |
-void ContentDistribution::append(PassRefPtr<Node> node) |
+void ContentDistribution::append(PassRefPtrWillBeRawPtr<Node> node) |
{ |
ASSERT(node); |
ASSERT(!isActiveInsertionPoint(*node)); |
@@ -48,7 +48,7 @@ void ContentDistribution::append(PassRefPtr<Node> node) |
size_t ContentDistribution::find(const Node* node) const |
{ |
- HashMap<const Node*, size_t>::const_iterator it = m_indices.find(node); |
+ WillBeHeapHashMap<RawPtrWillBeMember<Node>, size_t>::const_iterator it = m_indices.find(const_cast<Node*>(node)); |
if (it == m_indices.end()) |
return kNotFound; |
@@ -57,7 +57,7 @@ size_t ContentDistribution::find(const Node* node) const |
Node* ContentDistribution::nextTo(const Node* node) const |
{ |
- size_t index = find(node); |
+ size_t index = find(const_cast<Node*>(node)); |
if (index == kNotFound || index + 1 == size()) |
return 0; |
return at(index + 1).get(); |
@@ -65,10 +65,16 @@ Node* ContentDistribution::nextTo(const Node* node) const |
Node* ContentDistribution::previousTo(const Node* node) const |
{ |
- size_t index = find(node); |
+ size_t index = find(const_cast<Node*>(node)); |
if (index == kNotFound || !index) |
return 0; |
return at(index - 1).get(); |
} |
+void ContentDistribution::traceAfterDispatch(Visitor* visitor) |
+{ |
+ visitor->trace(m_nodes); |
+ visitor->trace(m_indices); |
+} |
+ |
} // namespace WebCore |