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

Unified Diff: sky/engine/core/dom/Element.cpp

Issue 765523002: Specialize InsertionPoint attach/detach. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/shadow/InsertionPoint.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/Element.cpp
diff --git a/sky/engine/core/dom/Element.cpp b/sky/engine/core/dom/Element.cpp
index 7cb85c47be175f80c235353cded265ef4be8b1f0..8cee479481d6c5f667063c05603ef1021e9fc059 100644
--- a/sky/engine/core/dom/Element.cpp
+++ b/sky/engine/core/dom/Element.cpp
@@ -801,6 +801,9 @@ void Element::attach(const AttachContext& context)
{
ASSERT(document().inStyleRecalc());
+ if (isInsertionPoint())
+ toInsertionPoint(this)->attachDistribution(context);
+
// We've already been through detach when doing an attach, but we might
// need to clear any state that's been added since then.
if (hasRareData() && styleChangeType() == NeedsReattachStyleChange) {
@@ -826,6 +829,9 @@ void Element::attach(const AttachContext& context)
void Element::detach(const AttachContext& context)
{
+ if (isInsertionPoint())
+ toInsertionPoint(this)->detachDistribution(context);
+
if (hasRareData()) {
ElementRareData* data = elementRareData();
« no previous file with comments | « sky/engine/core/dom/Element.h ('k') | sky/engine/core/dom/shadow/InsertionPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698