mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +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
|
|
@ -2599,6 +2599,11 @@ public:
|
|||
virtual void SetTitle(const nsAString& aTitle, mozilla::ErrorResult& rv) = 0;
|
||||
void GetDir(nsAString& aDirection) const;
|
||||
void SetDir(const nsAString& aDirection);
|
||||
already_AddRefed<nsContentList> GetElementsByName(const nsAString & aName)
|
||||
{
|
||||
return NS_GetFuncStringNodeList(this, MatchNameAttribute, nullptr,
|
||||
UseExistingNameString, aName);
|
||||
}
|
||||
nsPIDOMWindowOuter* GetDefaultView() const
|
||||
{
|
||||
return GetWindow();
|
||||
|
|
@ -2883,6 +2888,12 @@ protected:
|
|||
// the relevant refresh driver.
|
||||
void UpdateFrameRequestCallbackSchedulingState(nsIPresShell* aOldShell = nullptr);
|
||||
|
||||
// Helpers for GetElementsByName.
|
||||
static bool MatchNameAttribute(mozilla::dom::Element* aElement,
|
||||
int32_t aNamespaceID,
|
||||
nsIAtom* aAtom, void* aData);
|
||||
static void* UseExistingNameString(nsINode* aRootNode, const nsString* aName);
|
||||
|
||||
nsCString mReferrer;
|
||||
nsString mLastModified;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue