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

Unified Diff: sky/engine/core/html/HTMLStyleElement.cpp

Issue 758623002: Remove didNotifySubtreeInsertionsToDocument. (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/html/HTMLStyleElement.h ('k') | sky/engine/core/html/HTMLTitleElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLStyleElement.cpp
diff --git a/sky/engine/core/html/HTMLStyleElement.cpp b/sky/engine/core/html/HTMLStyleElement.cpp
index d849cc9e2d35c82db72467b0f17387e188607bca..9d5f56975f5024fff6c05ac43d46a0d854dcd26c 100644
--- a/sky/engine/core/html/HTMLStyleElement.cpp
+++ b/sky/engine/core/html/HTMLStyleElement.cpp
@@ -67,14 +67,17 @@ void HTMLStyleElement::finishParsingChildren()
HTMLElement::finishParsingChildren();
}
-Node::InsertionNotificationRequest HTMLStyleElement::insertedInto(ContainerNode* insertionPoint)
+void HTMLStyleElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLElement::insertedInto(insertionPoint);
- if (insertionPoint->inDocument() && isInShadowTree()) {
- if (ShadowRoot* scope = containingShadowRoot())
- scope->registerScopedHTMLStyleChild();
- }
- return InsertionShouldCallDidNotifySubtreeInsertions;
+
+ if (!inDocument())
+ return;
+
+ StyleElement::processStyleSheet(document(), this);
+
+ if (ShadowRoot* scope = containingShadowRoot())
+ scope->registerScopedHTMLStyleChild();
}
void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
@@ -95,11 +98,6 @@ void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
StyleElement::removedFromDocument(document(), this, scopingNode, containingScope ? *containingScope : insertionPoint->treeScope());
}
-void HTMLStyleElement::didNotifySubtreeInsertionsToDocument()
-{
- StyleElement::processStyleSheet(document(), this);
-}
-
void HTMLStyleElement::childrenChanged(const ChildrenChange& change)
{
HTMLElement::childrenChanged(change);
« no previous file with comments | « sky/engine/core/html/HTMLStyleElement.h ('k') | sky/engine/core/html/HTMLTitleElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698