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

Unified Diff: Source/core/dom/Node.cpp

Issue 315173002: Revert of Remove scoped styles. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | « Source/core/dom/Node.h ('k') | Source/core/dom/StyleSheetScopingNodeList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Node.cpp
diff --git a/Source/core/dom/Node.cpp b/Source/core/dom/Node.cpp
index 50b797c9e4646a4e96eaca59b809395701149861..00d15ffe33f87e86972771db485079ebb87c8f66 100644
--- a/Source/core/dom/Node.cpp
+++ b/Source/core/dom/Node.cpp
@@ -2464,6 +2464,28 @@
return StaticNodeList::adopt(filteredInsertionPoints);
}
+void Node::registerScopedHTMLStyleChild()
+{
+ setHasScopedHTMLStyleChild(true);
+}
+
+void Node::unregisterScopedHTMLStyleChild()
+{
+ ASSERT(hasScopedHTMLStyleChild());
+ setHasScopedHTMLStyleChild(numberOfScopedHTMLStyleChildren());
+}
+
+size_t Node::numberOfScopedHTMLStyleChildren() const
+{
+ size_t count = 0;
+ for (HTMLStyleElement* style = Traversal<HTMLStyleElement>::firstChild(*this); style; style = Traversal<HTMLStyleElement>::nextSibling(*style)) {
+ if (style->isRegisteredAsScoped())
+ ++count;
+ }
+
+ return count;
+}
+
void Node::setFocus(bool flag)
{
document().userActionElements().setFocused(this, flag);
« no previous file with comments | « Source/core/dom/Node.h ('k') | Source/core/dom/StyleSheetScopingNodeList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698