Bug 945572 part 1. Make NS_NewHTMLElement take an Element** outparam instead of an nsIContent** one. r=smaug

This commit is contained in:
Boris Zbarsky
2013-12-03 09:40:10 -05:00
parent 464fbf6f1c
commit 7777663d29
10 changed files with 38 additions and 37 deletions

View File

@@ -9,6 +9,7 @@
#include "nsCOMPtr.h"
#include "nsIDocument.h"
#include "nsINodeInfo.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLButtonElement.h"
#include "mozilla/dom/HTMLInputElement.h"
#include "nsNodeInfoManager.h"
@@ -75,14 +76,9 @@ nsresult
nsFileControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
{
nsCOMPtr<nsIDocument> doc = mContent->GetDocument();
nsCOMPtr<nsINodeInfo> nodeInfo;
// Create and setup the file picking button.
nodeInfo = doc->NodeInfoManager()->GetNodeInfo(nsGkAtoms::button, nullptr,
kNameSpaceID_XHTML,
nsIDOMNode::ELEMENT_NODE);
NS_NewHTMLElement(getter_AddRefs(mBrowse), nodeInfo.forget(),
dom::NOT_FROM_PARSER);
mBrowse = doc->CreateHTMLElement(nsGkAtoms::button);
// NOTE: SetIsNativeAnonymousRoot() has to be called before setting any
// attribute.
mBrowse->SetIsNativeAnonymousRoot();
@@ -122,6 +118,7 @@ nsFileControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
}
// Create and setup the text showing the selected files.
nsCOMPtr<nsINodeInfo> nodeInfo;
nodeInfo = doc->NodeInfoManager()->GetNodeInfo(nsGkAtoms::label, nullptr,
kNameSpaceID_XUL,
nsIDOMNode::ELEMENT_NODE);