Bug 1319255 part 2. Stop doing casts to HTMLContentElement* simply based on tag. r=wchen

This commit is contained in:
Boris Zbarsky
2016-11-22 22:41:51 -05:00
parent 2545e5355a
commit 8bef5cc522
7 changed files with 29 additions and 17 deletions

View File

@@ -66,7 +66,7 @@ HTMLContentElement::BindToTree(nsIDocument* aDocument,
if (containingShadow && !oldContainingShadow) {
nsINode* parentNode = nsINode::GetParentNode();
while (parentNode && parentNode != containingShadow) {
if (parentNode->IsHTMLElement(nsGkAtoms::content)) {
if (parentNode->IsHTMLContentElement()) {
// Content element in fallback content is not an insertion point.
return NS_OK;
}