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

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

Issue 801643009: Remove <video controls> hack. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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
« no previous file with comments | « sky/engine/core/dom/shadow/ShadowRoot.h ('k') | no next file » | 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 80d5b8229f8db809fc01c3ff20dc5fb3be80bc3e..9120dc6ffc36a218b93a36ea569752a114c9fa1d 100644
--- a/sky/engine/core/dom/shadow/ShadowRoot.cpp
+++ b/sky/engine/core/dom/shadow/ShadowRoot.cpp
@@ -49,7 +49,6 @@ COMPILE_ASSERT(sizeof(ShadowRoot) == sizeof(SameSizeAsShadowRoot), shadowroot_sh
ShadowRoot::ShadowRoot(Document& document)
: DocumentFragment(0, CreateShadowRoot)
, TreeScope(*this, document)
- , m_registeredWithParentShadowRoot(false)
, m_descendantInsertionPointsIsValid(false)
{
}
@@ -115,31 +114,17 @@ void ShadowRoot::insertedInto(ContainerNode* insertionPoint)
{
DocumentFragment::insertedInto(insertionPoint);
- if (!insertionPoint->inDocument())
- return;
-
- // FIXME: When parsing <video controls>, insertedInto() is called many times without invoking removedFrom.
- // For now, we check m_registeredWithParentShadowroot. We would like to ASSERT(!m_registeredShadowRoot) here.
- // https://bugs.webkit.org/show_bug.cig?id=101316
- if (m_registeredWithParentShadowRoot)
- return;
-
- if (ShadowRoot* root = host()->containingShadowRoot()) {
+ if (ShadowRoot* root = host()->containingShadowRoot())
root->addChildShadowRoot();
- m_registeredWithParentShadowRoot = true;
- }
}
void ShadowRoot::removedFrom(ContainerNode* insertionPoint)
{
- if (insertionPoint->inDocument() && m_registeredWithParentShadowRoot) {
- ShadowRoot* root = host()->containingShadowRoot();
- if (!root)
- root = insertionPoint->containingShadowRoot();
- if (root)
- root->removeChildShadowRoot();
- m_registeredWithParentShadowRoot = false;
- }
+ ShadowRoot* root = host()->containingShadowRoot();
+ if (!root)
+ root = insertionPoint->containingShadowRoot();
+ if (root)
+ root->removeChildShadowRoot();
DocumentFragment::removedFrom(insertionPoint);
}
« no previous file with comments | « sky/engine/core/dom/shadow/ShadowRoot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698