| Index: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| index 2d4113e136e7c9ab5a5cdfb8ad5d75d4a3e4d083..1b8b7bfef1748291b272b08414b4104872c304d9 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| @@ -72,11 +72,8 @@
|
| return m_assignedNodes;
|
| }
|
|
|
| -const HeapVector<Member<Node>>& HTMLSlotElement::getDistributedNodes() {
|
| - DCHECK(!needsDistributionRecalc());
|
| - if (isInShadowTree())
|
| - return m_distributedNodes;
|
| -
|
| +void HTMLSlotElement::updateDistributedNodesManually() {
|
| + DCHECK(!supportsDistribution());
|
| // A slot is unlikely to be used outside of a shadow tree.
|
| // We do not need to optimize this case in most cases.
|
| // TODO(hayato): If this path causes a performance issue, we should move
|
| @@ -96,6 +93,12 @@
|
| child = NodeTraversal::nextSkippingChildren(*child, this);
|
| }
|
| }
|
| +}
|
| +
|
| +const HeapVector<Member<Node>>& HTMLSlotElement::getDistributedNodes() {
|
| + DCHECK(!needsDistributionRecalc());
|
| + if (!supportsDistribution())
|
| + updateDistributedNodesManually();
|
| return m_distributedNodes;
|
| }
|
|
|
|
|