Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/WebKit/Source/core/html/HTMLSlotElement.cpp

Issue 1671823002: Restrict the types of nodes that could be assigned to a slot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ecda59fd63da0330250352820bc4b5ac0d3c2de..e6e061fd43441c0744f6756e3e144a599401666e 100644
--- a/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSlotElement.cpp
@@ -68,6 +68,8 @@ const WillBeHeapVector<RefPtrWillBeMember<Node>>& HTMLSlotElement::getDistribute
// update the distribution code so it considers a document tree too.
clearDistribution();
for (Node& child : NodeTraversal::childrenOf(*this)) {
+ if (!child.isSlotAssignable())
+ continue;
if (isHTMLSlotElement(child))
m_distributedNodes.appendVector(toHTMLSlotElement(child).getDistributedNodes());
else
@@ -204,6 +206,8 @@ void HTMLSlotElement::updateDistributedNodesWithFallback()
if (!m_distributedNodes.isEmpty())
return;
for (auto& child : NodeTraversal::childrenOf(*this)) {
+ if (!child.isSlotAssignable())
+ continue;
// Insertion points are not supported as slots fallback
if (isActiveInsertionPoint(child))
continue;
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/SlotAssignment.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698