From 5eebaf0b048990364b0f9f404abfb2d957e26ff1 Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Tue, 10 Mar 2015 10:23:14 -0400 Subject: [PATCH] Bug 1134561 - Use of the namespace when checking the tag name if HTMLPictureElement and HTMLSourceElement. r=jst --- dom/html/HTMLPictureElement.cpp | 2 +- dom/html/HTMLSourceElement.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/html/HTMLPictureElement.cpp b/dom/html/HTMLPictureElement.cpp index 236d4eaacd78..0d4d8e5d84de 100644 --- a/dom/html/HTMLPictureElement.cpp +++ b/dom/html/HTMLPictureElement.cpp @@ -44,7 +44,7 @@ void HTMLPictureElement::RemoveChildAt(uint32_t aIndex, bool aNotify) { // Find all img siblings after this to notify them of its demise - nsCOMPtr child = GetChildAt(aIndex); + nsCOMPtr child = GetChildAt(aIndex); nsCOMPtr nextSibling; if (child && child->IsHTMLElement(nsGkAtoms::source)) { nextSibling = child->GetNextSibling(); diff --git a/dom/html/HTMLSourceElement.cpp b/dom/html/HTMLSourceElement.cpp index d3e3c52c6d4f..17dfd14106b8 100644 --- a/dom/html/HTMLSourceElement.cpp +++ b/dom/html/HTMLSourceElement.cpp @@ -80,7 +80,7 @@ HTMLSourceElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName, { // If we are associated with a with a valid , notify it of // responsive parameter changes - nsINode *parent = nsINode::GetParentNode(); + Element *parent = nsINode::GetParentElement(); if (aNameSpaceID == kNameSpaceID_None && (aName == nsGkAtoms::srcset || aName == nsGkAtoms::sizes || @@ -89,7 +89,7 @@ HTMLSourceElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName, parent && parent->IsHTMLElement(nsGkAtoms::picture)) { nsString strVal = aValue ? aValue->GetStringValue() : EmptyString(); // Find all img siblings after this and notify them of the change - nsCOMPtr sibling = AsContent(); + nsCOMPtr sibling = AsContent(); while ( (sibling = sibling->GetNextSibling()) ) { if (sibling->IsHTMLElement(nsGkAtoms::img)) { HTMLImageElement *img = static_cast(sibling.get()); @@ -149,7 +149,7 @@ HTMLSourceElement::BindToTree(nsIDocument *aDocument, media->NotifyAddedSource(); } else if (aParent && aParent->IsHTMLElement(nsGkAtoms::picture)) { // Find any img siblings after this and notify them - nsCOMPtr sibling = AsContent(); + nsCOMPtr sibling = AsContent(); while ( (sibling = sibling->GetNextSibling()) ) { if (sibling->IsHTMLElement(nsGkAtoms::img)) { HTMLImageElement *img = static_cast(sibling.get());