diff options
author | FranklinDM <mrmineshafter17@gmail.com> | 2023-04-05 14:04:43 +0800 |
---|---|---|
committer | FranklinDM <mrmineshafter17@gmail.com> | 2023-04-07 22:08:20 +0800 |
commit | c2b9a9e0057964d9ec96933cc02a11c60b234698 (patch) | |
tree | c6761c7a0194dc134d479e9cc1c7cf03de8ca389 /layout | |
parent | 8e2788496d325b4b50b86d98125376b5dbdf7554 (diff) | |
download | uxp-c2b9a9e0057964d9ec96933cc02a11c60b234698.tar.gz |
Issue #252 - Move getElementsByName from HTMLDocument to Document
Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1415176
Diffstat (limited to 'layout')
-rw-r--r-- | layout/base/nsPresShell.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index 23876cc112..466a892dbe 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -2979,10 +2979,9 @@ PresShell::GoToAnchor(const nsAString& aAnchorName, bool aScroll, // Search for an anchor element with a matching "name" attribute if (!content && htmlDoc) { - nsCOMPtr<nsIDOMNodeList> list; // Find a matching list of named nodes - rv = htmlDoc->GetElementsByName(aAnchorName, getter_AddRefs(list)); - if (NS_SUCCEEDED(rv) && list) { + nsCOMPtr<nsIDOMNodeList> list = mDocument->GetElementsByName(aAnchorName); + if (list) { uint32_t i; // Loop through the named nodes looking for the first anchor for (i = 0; true; i++) { |