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

Unified Diff: sky/engine/core/dom/shadow/ShadowRoot.cpp

Issue 759663003: Only allow one shadowRoot. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: ojan review. 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/shadow/ShadowRoot.h ('k') | sky/engine/core/dom/shadow/ShadowRoot.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/shadow/ShadowRoot.cpp
diff --git a/sky/engine/core/dom/shadow/ShadowRoot.cpp b/sky/engine/core/dom/shadow/ShadowRoot.cpp
index df5ee773e4e3179976299c6ddf6a5c3e26208249..5875a449cd52ef3605607ac074b286338a761ecb 100644
--- a/sky/engine/core/dom/shadow/ShadowRoot.cpp
+++ b/sky/engine/core/dom/shadow/ShadowRoot.cpp
@@ -41,8 +41,8 @@
namespace blink {
-struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope, public DoublyLinkedListNode<ShadowRoot> {
- void* pointers[3];
+struct SameSizeAsShadowRoot : public DocumentFragment, public TreeScope {
+ void* pointers[1];
unsigned countersAndFlags[1];
};
@@ -51,8 +51,6 @@ COMPILE_ASSERT(sizeof(ShadowRoot) == sizeof(SameSizeAsShadowRoot), shadowroot_sh
ShadowRoot::ShadowRoot(Document& document)
: DocumentFragment(0, CreateShadowRoot)
, TreeScope(*this, document)
- , m_prev(nullptr)
- , m_next(nullptr)
, m_numberOfStyles(0)
, m_registeredWithParentShadowRoot(false)
, m_descendantInsertionPointsIsValid(false)
@@ -61,10 +59,6 @@ ShadowRoot::ShadowRoot(Document& document)
ShadowRoot::~ShadowRoot()
{
-#if !ENABLE(OILPAN)
- ASSERT(!m_prev);
- ASSERT(!m_next);
-
if (m_shadowRootRareData && m_shadowRootRareData->styleSheets())
m_shadowRootRareData->styleSheets()->detachFromDocument();
@@ -85,15 +79,12 @@ ShadowRoot::~ShadowRoot()
// as well as Node. See a comment on TreeScope.h for the reason.
if (hasRareData())
clearRareData();
-#endif
}
-#if !ENABLE(OILPAN)
void ShadowRoot::dispose()
{
removeDetachedChildren();
}
-#endif
PassRefPtr<Node> ShadowRoot::cloneNode(bool, ExceptionState& exceptionState)
{
@@ -130,7 +121,7 @@ void ShadowRoot::insertedInto(ContainerNode* insertionPoint)
{
DocumentFragment::insertedInto(insertionPoint);
- if (!insertionPoint->inDocument() || !isOldest())
+ if (!insertionPoint->inDocument())
return;
// FIXME: When parsing <video controls>, insertedInto() is called many times without invoking removedFrom.
« no previous file with comments | « sky/engine/core/dom/shadow/ShadowRoot.h ('k') | sky/engine/core/dom/shadow/ShadowRoot.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698