Bug 1083814 - Fix nsContentUtils::HasDistributedChildren for children of <shadow> insertion point. r=smaug
authorWilliam Chen <wchen@mozilla.com>
Thu, 16 Oct 2014 14:26:38 -0700
changeset 211089 444b7b1ed52bbfec43c429a393771f284255da0e
parent 211088 2ae5cd9d4dcaa85e264262715229888e9d342965
child 211090 f10b55f5a819fab24b11c9c58a43ef951014a2db
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerssmaug
bugs1083814
milestone36.0a1
Bug 1083814 - Fix nsContentUtils::HasDistributedChildren for children of <shadow> insertion point. r=smaug
content/base/src/nsContentUtils.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -6818,17 +6818,17 @@ nsContentUtils::HasDistributedChildren(n
     // the shadow insertion point of the younger shadow root.
     return shadow->GetYoungerShadow();
   }
 
   HTMLShadowElement* shadowEl = HTMLShadowElement::FromContent(aContent);
   if (shadowEl && shadowEl->IsInsertionPoint()) {
     // Children of a shadow insertion points are distributed
     // to the insertion points in the older shadow root.
-    return shadow->GetOlderShadow();
+    return shadowEl->GetOlderShadowRoot();
   }
 
   HTMLContentElement* contentEl = HTMLContentElement::FromContent(aContent);
   if (contentEl && contentEl->IsInsertionPoint()) {
     // Children of a content insertion point are distributed to the
     // content insertion point if the content insertion point does
     // not match any nodes (fallback content).
     return contentEl->MatchedNodes().IsEmpty();