| 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 1b8b7bfef1748291b272b08414b4104872c304d9..21250c6778eb177957f7c271565fd89c43ac5f69 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
|
| @@ -97,6 +97,8 @@ void HTMLSlotElement::updateDistributedNodesManually() {
|
|
|
| const HeapVector<Member<Node>>& HTMLSlotElement::getDistributedNodes() {
|
| DCHECK(!needsDistributionRecalc());
|
| + // m_distributedNodes of slots in non-shadow trees are not updated in recalc
|
| + // distribution flow.
|
| if (!supportsDistribution())
|
| updateDistributedNodesManually();
|
| return m_distributedNodes;
|
| @@ -178,7 +180,7 @@ AtomicString HTMLSlotElement::name() const {
|
| }
|
|
|
| void HTMLSlotElement::attachLayoutTree(const AttachContext& context) {
|
| - for (auto& node : m_distributedNodes) {
|
| + for (auto& node : getDistributedNodes()) {
|
| if (node->needsAttach())
|
| node->attachLayoutTree(context);
|
| }
|
| @@ -317,6 +319,8 @@ void HTMLSlotElement::enqueueSlotChangeEvent() {
|
| }
|
|
|
| ShadowRoot* root = containingShadowRoot();
|
| + // TODO(hayato): Relax this check if slots in non-shadow trees are well
|
| + // supported.
|
| DCHECK(root);
|
| DCHECK(root->isV1());
|
| root->owner()->setNeedsDistributionRecalc();
|
|
|