Index: Source/core/dom/shadow/ContentDistribution.h |
diff --git a/Source/core/dom/shadow/ContentDistribution.h b/Source/core/dom/shadow/ContentDistribution.h |
index 2fd8fc10f22fe1e22a0c3992fd94aa1084e146a4..65a221d9ea896ee0217f95d600dcfc3aaf334690 100644 |
--- a/Source/core/dom/shadow/ContentDistribution.h |
+++ b/Source/core/dom/shadow/ContentDistribution.h |
@@ -40,6 +40,8 @@ namespace WebCore { |
class ContentDistribution { |
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); } |
@@ -49,6 +51,7 @@ public: |
void append(PassRefPtr<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); } |
size_t find(const Node*) const; |