Issue #252 - Move getElementsByName from HTMLDocument to Document

Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1415176
This commit is contained in:
FranklinDM 2023-04-05 14:04:43 +08:00 • committed by roytam1
commit b2d7504112
8 changed files with 34 additions and 42 deletions

View file

@ -185,11 +185,6 @@ public:
return nsHTMLDocument::GetForms();
}
nsIHTMLCollection* Scripts();
already_AddRefed<nsContentList> GetElementsByName(const nsAString & aName)
{
return NS_GetFuncStringNodeList(this, MatchNameAttribute, nullptr,
UseExistingNameString, aName);
}
already_AddRefed<nsIDocument> Open(JSContext* cx,
const nsAString& aType,
const nsAString& aReplace,
@ -260,10 +255,6 @@ protected:
nsIAtom* aAtom, void* aData);
static bool MatchAnchors(mozilla::dom::Element* aElement, int32_t aNamespaceID,
nsIAtom* aAtom, void* aData);
static bool MatchNameAttribute(mozilla::dom::Element* aElement,
int32_t aNamespaceID,
nsIAtom* aAtom, void* aData);
static void* UseExistingNameString(nsINode* aRootNode, const nsString* aName);
static void DocumentWriteTerminationFunc(nsISupports *aRef);