Bug 1879579 - Clean up CompareTreePosition and related code. r=smaug

Make TreeOrderedArray support what the form controls stuff needs, and
use it instead of custom nsContentUtils stuff.

Differential Revision: https://phabricator.services.mozilla.com/D201261
This commit is contained in:
Emilio Cobos Álvarez
2024-02-12 20:01:36 +00:00
parent f549c33ac3
commit 1df8c0453d
23 changed files with 371 additions and 450 deletions

View File

@@ -520,7 +520,8 @@ class HTMLFormElement final : public nsGenericHTMLElement {
// This is needed to properly clean up the bi-directional references
// (both weak and strong) between the form and its HTMLImageElements.
nsTArray<HTMLImageElement*> mImageElements; // Holds WEAK references
// Holds WEAK references
TreeOrderedArray<HTMLImageElement*> mImageElements;
// A map from an ID or NAME attribute to the HTMLImageElement(s), this
// hash holds strong references either to the named HTMLImageElement, or