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

Unified Diff: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp

Issue 1489433002: Support the essential part of Shadow DOM v1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert Internals.* Created 5 years 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
Index: third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
diff --git a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
index 024e3647d811dc7f998bf3f6d685313811209c35..62fee7de6dbcf0885231ac833fddb6c015678c1f 100644
--- a/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
+++ b/third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp
@@ -71,6 +71,10 @@ inline void DistributionPool::populateChildren(const ContainerNode& parent)
{
clear();
for (Node* child = parent.firstChild(); child; child = child->nextSibling()) {
+ if (isHTMLSlotElement(child)) {
+ // TODO(hayato): Support re-distribution across v0 and v1 shadow trees
+ continue;
+ }
if (isActiveInsertionPoint(*child)) {
InsertionPoint* insertionPoint = toInsertionPoint(child);
for (size_t i = 0; i < insertionPoint->distributedNodesSize(); ++i)
@@ -328,7 +332,9 @@ void ElementShadow::distributeV0()
void ElementShadow::distributeV1()
{
- // TODO(hayato): Implement this
+ if (!m_slotAssignment)
+ m_slotAssignment = adoptPtr(new SlotAssignment());
+ m_slotAssignment->resolveAssignment(youngestShadowRoot());
}
void ElementShadow::didDistributeNode(const Node* node, InsertionPoint* insertionPoint)
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.h ('k') | third_party/WebKit/Source/core/dom/shadow/InsertionPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698