mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Issue #252 - Move getElementsByName from HTMLDocument to Document
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1415176
This commit is contained in:
parent
8182d08b13
commit
b2d7504112
8 changed files with 34 additions and 42 deletions
|
|
@ -1810,33 +1810,6 @@ nsHTMLDocument::Writeln(JSContext* cx, const Sequence<nsString>& aText,
|
|||
WriteCommon(cx, aText, true, rv);
|
||||
}
|
||||
|
||||
bool
|
||||
nsHTMLDocument::MatchNameAttribute(Element* aElement, int32_t aNamespaceID,
|
||||
nsIAtom* aAtom, void* aData)
|
||||
{
|
||||
NS_PRECONDITION(aElement, "Must have element to work with!");
|
||||
nsString* elementName = static_cast<nsString*>(aData);
|
||||
return
|
||||
aElement->GetNameSpaceID() == kNameSpaceID_XHTML &&
|
||||
aElement->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
|
||||
*elementName, eCaseMatters);
|
||||
}
|
||||
|
||||
/* static */
|
||||
void*
|
||||
nsHTMLDocument::UseExistingNameString(nsINode* aRootNode, const nsString* aName)
|
||||
{
|
||||
return const_cast<nsString*>(aName);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsHTMLDocument::GetElementsByName(const nsAString& aElementName,
|
||||
nsIDOMNodeList** aReturn)
|
||||
{
|
||||
*aReturn = GetElementsByName(aElementName).take();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsHTMLDocument::AddedForm()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue