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

Unified Diff: Source/core/dom/shadow/InsertionPoint.cpp

Issue 133213008: Either content elements or shadow elements should not be treated as insertion points if they are no… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 11 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 | « LayoutTests/fast/dom/shadow/get-distributed-nodes-orphan-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/shadow/InsertionPoint.cpp
diff --git a/Source/core/dom/shadow/InsertionPoint.cpp b/Source/core/dom/shadow/InsertionPoint.cpp
index a3ee335ebdc4d5e17a59d2b945c22f4f95a52bde..eadd316ca3b3d3ae86ef790b1d3f0353f2dcb310 100644
--- a/Source/core/dom/shadow/InsertionPoint.cpp
+++ b/Source/core/dom/shadow/InsertionPoint.cpp
@@ -143,11 +143,12 @@ bool InsertionPoint::canBeActive() const
bool InsertionPoint::isActive() const
{
+ if (!inDocument())
+ return false;
if (!canBeActive())
return false;
ShadowRoot* shadowRoot = containingShadowRoot();
- if (!shadowRoot)
- return false;
+ ASSERT(shadowRoot);
if (!hasTagName(shadowTag) || shadowRoot->descendantShadowElementCount() <= 1)
return true;
« no previous file with comments | « LayoutTests/fast/dom/shadow/get-distributed-nodes-orphan-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698