Commit Graph
93 Commits
Author SHA1 Message Date
Emilio Cobos Álvarez 1ffa4bb822 Bug 2041502 - Make PresShell forward notifications to DocAccessible. r=layout-reviewers,jwatt
The main difference is that removals get processed before other
observers, like PresShell does. This prevents the options list from
getting re-filled, see the stack in the bug.

While at it, simplify the aria attribute notifications, they don't need
to walk the whole chain, as only DocAccessible cares about it. Route
them through the accessible service like the AttrElement ones.

Differential Revision: https://phabricator.services.mozilla.com/D304716
2026-06-04 22:07:09 +00:00
agoloman 58b975f528 Revert "Bug 2041502 - Make PresShell forward notifications to DocAccessible. r=layout-reviewers,jwatt" for causing mac bustages @DocAccessibleWrap.h.
This reverts commit 691d8496c3.
2026-06-04 19:16:32 +00:00
Emilio Cobos Álvarez 691d8496c3 Bug 2041502 - Make PresShell forward notifications to DocAccessible. r=layout-reviewers,jwatt
The main difference is that removals get processed before other
observers, like PresShell does. This prevents the options list from
getting re-filled, see the stack in the bug.

While at it, simplify the aria attribute notifications, they don't need
to walk the whole chain, as only DocAccessible cares about it. Route
them through the accessible service like the AttrElement ones.

Differential Revision: https://phabricator.services.mozilla.com/D304716
2026-06-04 18:17:13 +00:00
Emilio Cobos Álvarez 1bd0da8bf7 Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-05-02 22:04:17 +00:00
iulian moraru 480fc572da Revert "Bug 2036439, Bug 2033243 - Deal with ownerGlobal -> documentGlobal rename in extensions. r=robwu,home-newtab-reviewers,mconley" for causing newtab failures.
This reverts commit 4f62279d01.

Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug"

This reverts commit 91a4ece356.

Revert "Bug 2033243 - BindToOwner -> BindToGlobal. r=dom-core,smaug"

This reverts commit 5a95a889e1.

Revert "Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug"

This reverts commit 7177a68e67.

Revert "Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop"

This reverts commit 5263254690.
2026-05-02 16:43:35 +00:00
Emilio Cobos Álvarez 7177a68e67 Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-05-02 15:33:23 +00:00
rperta d4cc71008d Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug" on developer request
This reverts commit e58e122135.

This reverts commit 84ca206f3e.

This reverts commit a7945292ed.

This reverts commit 367d83d299.
2026-05-02 06:20:30 +00:00
Emilio Cobos Álvarez a7945292ed Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-05-01 11:58:14 +00:00
agoloman c814da612d Revert "Bug 2033243 - Other miscellaneous ownerGlobal-related naming removal. r=dom-core,smaug" for causing multiple failures.
This reverts commit c7246654bc.

Revert "Bug 2033243 - BindToOwner -> BindToGlobal. r=dom-core,smaug"

This reverts commit 8873ddf33c.

Revert "Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug"

This reverts commit 8bf999e03c.

Revert "Bug 2033243 - Replace ownerGlobal with documentGlobal, and stop exposing ownerGlobal to JS. r=firefox-desktop-core-reviewers ,webidl,joschmidt,perftest-reviewers,sparky,smaug,mossop"

This reverts commit 7dea1af2e0.
2026-04-30 20:13:14 +00:00
Emilio Cobos Álvarez 8bf999e03c Bug 2033243 - Rename GetOwnerGlobal to GetRelevantGlobal. r=dom-core,media-playback-reviewers,credential-management-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,dimi,janv,dshin,aosmond,smaug
As per the HTML terminology (https://html.spec.whatwg.org/#relevant)

Automatic rename using sed + lints.

Differential Revision: https://phabricator.services.mozilla.com/D297184
2026-04-30 17:47:11 +00:00
Emilio Cobos Álvarez 1ddad57128 Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug
Make them concrete classes rather than interfaces, and make the
inheritance chain simpler.

Differential Revision: https://phabricator.services.mozilla.com/D296484
2026-04-28 07:38:27 +00:00
Silaghi ce61f876cc Revert "Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug" for causing wpt failures at BaseContentList
This reverts commit cde3e5607b.
2026-04-28 03:43:46 +00:00
Emilio Cobos Álvarez cde3e5607b Bug 2034055 - Clean up NodeList / HTMLCollection set-up. r=smaug
Make them concrete classes rather than interfaces, and make the
inheritance chain simpler.

Differential Revision: https://phabricator.services.mozilla.com/D296484
2026-04-28 00:24:11 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Keith Cirkel 3fa218286d Bug 2018907 - Extract LifecycleCallbackArgs from CustomElementRegistry r=dom-core,edgar
This change pulls out the LifecycleCallbackArgs into a separate .h,
allowing us to decouple Document.h from CustomElementRegistry.h and
only including in the cpp. This will prevent issues if Document.h needs
to depend on CustomElementRegistry.h which would create a dependency
cycle.

Differential Revision: https://phabricator.services.mozilla.com/D284627
2026-02-26 17:11:52 +00:00
Cristina Horotan fbd0964b46 Revert "Bug 1937566, Bug 2018899, Bug 2018907, Bug 2018908 - Make CustomElementRegistry constructable r=dom-core,webidl,emilio,edgar" for causing wpt failures on Document-createElement.html
This reverts commit dc1af4136a.

Revert "Bug 2018899 - Add dom.scoped-custom-element-registries.enabled pref r=dom-core,edgar"

This reverts commit fd5355f74e.

Revert "Bug 2018907 - Extract LifecycleCallbackArgs from CustomElementRegistry r=dom-core,edgar"

This reverts commit 41c64730eb.

Revert "Bug 2018908 - Add comments to various CustomElementRegistry functions r=dom-core,edgar"

This reverts commit 3e75494429.
2026-02-25 18:21:24 +00:00
Keith Cirkel 41c64730eb Bug 2018907 - Extract LifecycleCallbackArgs from CustomElementRegistry r=dom-core,edgar
This change pulls out the LifecycleCallbackArgs into a separate .h,
allowing us to decouple Document.h from CustomElementRegistry.h and
only including in the cpp. This will prevent issues if Document.h needs
to depend on CustomElementRegistry.h which would create a dependency
cycle.

Differential Revision: https://phabricator.services.mozilla.com/D284627
2026-02-25 14:52:01 +00:00
Olli Pettay 5d727c7fe9 Bug 2016882 - Assertion failure: !aIID.Equals((nsISupports::kIID)), at ElementInternals.cpp, r=dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D284518
2026-02-24 12:06:38 +00:00
Leo Tenenbaum b96f5add34 Bug 1973737 - Allow custom element to be passed as its own setValidity anchor. r=dom-core,keithamus,smaug
Differential Revision: https://phabricator.services.mozilla.com/D282006
2026-02-05 23:51:24 +00:00
Alice Boxhall a4ba7f0009 Bug 1981349 - Add referenceTarget support for label/for, label wrapped and output/for. r=credential-management-reviewers,webidl,dimi,Jamie,smaug
This makes significant changes to RelatedAccIterator, nsLabelsNodeList and nsContentList:

- RelatedAccIterator is now able to walk up shadow roots where appropriate.
- HTMLLabelsIterator now eagerly constructs a TreeOrderedArray of related elements, walking up shadow roots while the shadow root's reference target is either mAcc's content or a host of one of its ancestor shadow roots.
- nsLabelsNodeList now has an array of roots as well as mRootNode in the superclass nsContentList. This list is reset under certain conditions, adding each shadow root found by walking up from the labeled element until one is found which doesn't have either the labeled element or the host of one of its ancestor shadow roots as a reference target. The last element in this list is set as mRootNode in the superclass, and is either the containing document, or the subtree root of either the labeled element or the host element whose containing shadow root doesn't have it as a reference target. Each root has a mutation observer added to ensure that the list is marked dirty when necessary, and also that roots are removed from `mRoots` when they are destroyed.
- In order to enable nsLabelsNodeList to be a mutation observer for each root, nsContentList now inherits from nsStubMultiMutationObserver instead of nsStubMutationObserver.

This change also moves the ReferenceTargetChangeObserver-related methods from DocumentOrShadowRoot on to Element, and the related data structures on to nsExtendedDOMSlots.

It also introduces a distinction between GetControlForBindings, which returns an element in the same scope as the label element it's called on, and GetLabeledElementInternal, which returns the element which actually has the label element as its label.

Differential Revision: https://phabricator.services.mozilla.com/D261368
2026-01-15 13:40:05 +00:00
Alice Boxhall d5493de262 Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug
This change adds attr-associated element observers, which observe changes in the element associated with a single-element attribute.
For example, if an element has an attribute |attr| with a value |value|, and an AttrTargetObserver has been added for |attr| on that element, the observer would fire if an element with an ID matching |value| was added to the element's document or shadow root.

Attr-associated element observers are tracked in mAttrElementObserverMap in an element's nsExtendedDOMSlots.

An attr-associated element can change in multiple ways:
- The attribute value changes;
- An element matching the content attribute value is added or removed from the element's document or shadow root;
- The explicitly-set attr element is added or removed from the element's document or shadow root;
- The resolved reference target for the explicitly set attr-element or the element whose ID matches the string value of the attribute changes.

The resolved reference target can likewise change in multiple ways:
- The referenceTarget property of the element's shadow root is added, changed or removed;
- An element whose ID matches the element's shadow root's referenceTarget value is added or removed from the shadow root;
- The resolved reference target of the element whose ID matches the shadow root's referenceTarget value changes.

These changes are tracked via reference target change observers, which observe changes to an element's resolved reference target.
Reference target change observers are added on the host element's document or shadow root, and fired when one of the above circumstances occurs.

Differential Revision: https://phabricator.services.mozilla.com/D261367
2026-01-14 18:03:46 +00:00
Alice Boxhall 9c1a828c7f Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug
The existing `Element::GetAttrAssociatedElements()` and its internal lambda (which the subsequent change promotes into the `GetAttrAssociatedElementsInternal()` method, in order to use it as the internal "source of truth" method) already used arrays of `RefPtrs`, since the former interacts with scripting. In the subsequent change, since the `GetAttrAssociatedElementsInternal()` method which I adapted from the original lambda is used both by the bindings-exposed `GetAttrAssociatedElementsForBindings()` and in `AssociatedElementsIterator()`, I thought it was more straightforward to adapt `AssociatedElementsIterator` to use the array of `RefPtrs` rather than unpack the raw pointers each time, but I'm happy to modify it if this will be too slow or memory-intensive.

Differential Revision: https://phabricator.services.mozilla.com/D262170
2026-01-14 18:03:38 +00:00
Sandor Molnar 8faede9a1f Revert "Bug 1981349 - Add referenceTarget support for label/for, label wrapped and output/for. r=credential-management-reviewers,webidl,dimi,Jamie,smaug" for causing accessibility crashes (bug 2008970)
This reverts commit d46abe6d76.

Revert "Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug"

This reverts commit df11a4666d.

Revert "Bug 1981345 - Implement referenceTarget support for multiple element attributes. r=dom-core,Jamie,smaug"

This reverts commit 89cc779f5e.

Revert "Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug"

This reverts commit 33130e712d.

Revert "Bug 1981344 - Implement referenceTarget support for single-element attributes. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,emilio,keithamus,smaug,mtigley"

This reverts commit d6440c4cae.

Revert "Bug 1983766 - Split single element attribute getters into bindings/internals versions. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,smaug,keithamus,jwatt,mtigley"

This reverts commit 83b70e0645.

Revert "Bug 1989323 - Make `referenceTarget` IDL attributes on ShadowRoot, HTMLTemplateElement and ShadowRootInit nullable. r=dom-core,webidl,saschanaz,smaug"

This reverts commit 3a0b29121e.
2026-01-07 16:08:51 +00:00
Alice Boxhall d46abe6d76 Bug 1981349 - Add referenceTarget support for label/for, label wrapped and output/for. r=credential-management-reviewers,webidl,dimi,Jamie,smaug
This makes significant changes to RelatedAccIterator, nsLabelsNodeList and nsContentList:

- RelatedAccIterator now eagerly constructs a TreeOrderedArray of related elements, walking up shadow roots from mDependentContent while the shadow root's reference target is either mDependentContent or a host of one of its ancestor shadow roots.
- nsLabelsNodeList now has an array of roots as well as mRootNode in the superclass nsContentList. This list is reset under certain conditions, adding each shadow root found by walking up from the labeled element until one is found which doesn't have either the labeled element or the host of one of its ancestor shadow roots as a reference target. The last element in this list is set as mRootNode in the superclass, and is either the containing document, or the subtree root of either the labeled element or the host element whose containing shadow root doesn't have it as a reference target. Each root has a mutation observer added to ensure that the list is marked dirty when necessary, and also that roots are removed from `mRoots` when they are destroyed.
- In order to enable nsLabelsNodeList to be a mutation observer for each root, nsContentList now inherits from nsStubMultiMutationObserver instead of nsStubMutationObserver.

This change also moves the ReferenceTargetChangeObserver-related methods from DocumentOrShadowRoot on to Element, and the related data structures on to nsExtendedDOMSlots.

It also introduces a distinction between GetControlForBindings, which returns an element in the same scope as the label element it's called on, and GetLabeledElementInternal, which returns the element which actually has the label element as its label.

Differential Revision: https://phabricator.services.mozilla.com/D261368
2026-01-06 16:16:29 +00:00
Alice Boxhall df11a4666d Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug
This change adds attr-associated element observers, which observe changes in the element associated with a single-element attribute.
For example, if an element has an attribute |attr| with a value |value|, and an AttrTargetObserver has been added for |attr| on that element, the observer would fire if an element with an ID matching |value| was added to the element's document or shadow root.

Attr-associated element observers are tracked in mAttrElementObserverMap in an element's nsExtendedDOMSlots.

An attr-associated element can change in multiple ways:
- The attribute value changes;
- An element matching the content attribute value is added or removed from the element's document or shadow root;
- The explicitly-set attr element is added or removed from the element's document or shadow root;
- The resolved reference target for the explicitly set attr-element or the element whose ID matches the string value of the attribute changes.

The resolved reference target can likewise change in multiple ways:
- The referenceTarget property of the element's shadow root is added, changed or removed;
- An element whose ID matches the element's shadow root's referenceTarget value is added or removed from the shadow root;
- The resolved reference target of the element whose ID matches the shadow root's referenceTarget value changes.

These changes are tracked via reference target change observers, which observe changes to an element's resolved reference target.
Reference target change observers are added on the host element's document or shadow root, and fired when one of the above circumstances occurs.

Differential Revision: https://phabricator.services.mozilla.com/D261367
2026-01-06 16:16:26 +00:00
Alice Boxhall 33130e712d Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug
The existing `Element::GetAttrAssociatedElements()` and its internal lambda (which the subsequent change promotes into the `GetAttrAssociatedElementsInternal()` method, in order to use it as the internal "source of truth" method) already used arrays of `RefPtrs`, since the former interacts with scripting. In the subsequent change, since the `GetAttrAssociatedElementsInternal()` method which I adapted from the original lambda is used both by the bindings-exposed `GetAttrAssociatedElementsForBindings()` and in `AssociatedElementsIterator()`, I thought it was more straightforward to adapt `AssociatedElementsIterator` to use the array of `RefPtrs` rather than unpack the raw pointers each time, but I'm happy to modify it if this will be too slow or memory-intensive.

Differential Revision: https://phabricator.services.mozilla.com/D262170
2026-01-06 16:16:19 +00:00
iulian moraru e162366a25 Revert "Bug 1981349, Bug 1981346, Bug 1981345, Bug 1984685, Bug 1981344, Bug 1983766, Bug 1989323 - Add referenceTarget support for label/for, label wrapped and output/for. r=credential-management-reviewers,webidl,dimi,Jamie,smaug" for causing android build bustages.
This reverts commit 1b5cf4cdf8.

Revert "Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug"

This reverts commit 2394d9205a.

Revert "Bug 1981345 - Implement referenceTarget support for multiple element attributes. r=dom-core,Jamie,smaug"

This reverts commit 571a17ff82.

Revert "Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug"

This reverts commit 3b389fdd62.

Revert "Bug 1981344 - Implement referenceTarget support for single-element attributes. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,emilio,keithamus,smaug,mtigley"

This reverts commit 5cc2a12756.

Revert "Bug 1983766 - Split single element attribute getters into bindings/internals versions. r=dom-core,credential-management-reviewers,webidl,layout-reviewers,smaug,keithamus,jwatt,mtigley"

This reverts commit 68e2d26aa9.

Revert "Bug 1989323 - Make `referenceTarget` IDL attributes on ShadowRoot, HTMLTemplateElement and ShadowRootInit nullable. r=dom-core,webidl,saschanaz,smaug"

This reverts commit 1234b31599.
2025-12-24 15:16:52 +00:00
Alice Boxhall 1b5cf4cdf8 Bug 1981349 - Add referenceTarget support for label/for, label wrapped and output/for. r=credential-management-reviewers,webidl,dimi,Jamie,smaug
This makes significant changes to RelatedAccIterator, nsLabelsNodeList and nsContentList:

- RelatedAccIterator now eagerly constructs a TreeOrderedArray of related elements, walking up shadow roots from mDependentContent while the shadow root's reference target is either mDependentContent or a host of one of its ancestor shadow roots.
- nsLabelsNodeList now has an array of roots as well as mRootNode in the superclass nsContentList. This list is reset under certain conditions, adding each shadow root found by walking up from the labeled element until one is found which doesn't have either the labeled element or the host of one of its ancestor shadow roots as a reference target. The last element in this list is set as mRootNode in the superclass, and is either the containing document, or the subtree root of either the labeled element or the host element whose containing shadow root doesn't have it as a reference target. Each root has a mutation observer added to ensure that the list is marked dirty when necessary, and also that roots are removed from `mRoots` when they are destroyed.
- In order to enable nsLabelsNodeList to be a mutation observer for each root, nsContentList now inherits from nsStubMultiMutationObserver instead of nsStubMutationObserver.

This change also moves the ReferenceTargetChangeObserver-related methods from DocumentOrShadowRoot on to Element, and the related data structures on to nsExtendedDOMSlots.

It also introduces a distinction between GetControlForBindings, which returns an element in the same scope as the label element it's called on, and GetLabeledElementInternal, which returns the element which actually has the label element as its label.

Differential Revision: https://phabricator.services.mozilla.com/D261368
2025-12-24 13:41:57 +00:00
Alice Boxhall 2394d9205a Bug 1981346 - Add referenceTarget support for the form attribute. r=credential-management-reviewers,webidl,dimi,Jamie,smaug
This change adds attr-associated element observers, which observe changes in the element associated with a single-element attribute.
For example, if an element has an attribute |attr| with a value |value|, and an AttrTargetObserver has been added for |attr| on that element, the observer would fire if an element with an ID matching |value| was added to the element's document or shadow root.

Attr-associated element observers are tracked in mAttrElementObserverMap in an element's nsExtendedDOMSlots.

An attr-associated element can change in multiple ways:
- The attribute value changes;
- An element matching the content attribute value is added or removed from the element's document or shadow root;
- The explicitly-set attr element is added or removed from the element's document or shadow root;
- The resolved reference target for the explicitly set attr-element or the element whose ID matches the string value of the attribute changes.

The resolved reference target can likewise change in multiple ways:
- The referenceTarget property of the element's shadow root is added, changed or removed;
- An element whose ID matches the element's shadow root's referenceTarget value is added or removed from the shadow root;
- The resolved reference target of the element whose ID matches the shadow root's referenceTarget value changes.

These changes are tracked via reference target change observers, which observe changes to an element's resolved reference target.
Reference target change observers are added on the host element's document or shadow root, and fired when one of the above circumstances occurs.

Differential Revision: https://phabricator.services.mozilla.com/D261367
2025-12-24 13:41:54 +00:00
Alice Boxhall 3b389fdd62 Bug 1984685 - Refactor: consistently return Maybe<nsTArray<RefPtr<Element>>> when getting attr-associated elements, and key AttrRelProviders on nsAtom rather than nsString. r=dom-core,morgan,Jamie,smaug
The existing `Element::GetAttrAssociatedElements()` and its internal lambda (which the subsequent change promotes into the `GetAttrAssociatedElementsInternal()` method, in order to use it as the internal "source of truth" method) already used arrays of `RefPtrs`, since the former interacts with scripting. In the subsequent change, since the `GetAttrAssociatedElementsInternal()` method which I adapted from the original lambda is used both by the bindings-exposed `GetAttrAssociatedElementsForBindings()` and in `AssociatedElementsIterator()`, I thought it was more straightforward to adapt `AssociatedElementsIterator` to use the array of `RefPtrs` rather than unpack the raw pointers each time, but I'm happy to modify it if this will be too slow or memory-intensive.

Differential Revision: https://phabricator.services.mozilla.com/D262170
2025-12-24 13:41:48 +00:00
Masayuki Nakano f8236195a0 Bug 769207 - part 3: Make nsIMutationObserver use AttrModType r=smaug,dom-core,firefox-style-system-reviewers,layout-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D263054
2025-09-08 00:27:40 +00:00
Eitan Isaacson 22d305c374 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-11-29 03:26:35 +00:00
Eitan Isaacson fe237f4955 Bug 1769586 - P1: Implement ARIA element reflection in Element and ElementInternals. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D209767
2024-11-29 03:26:34 +00:00
Alexandru Marc c71ae69095 Backed out 4 changesets (bug 1769586) for causing wpt failures @ property-reflection.html. CLOSED TREE
Backed out changeset dc6aa76ec6c5 (bug 1769586)
Backed out changeset d9ff02e6c435 (bug 1769586)
Backed out changeset 446faf4cccab (bug 1769586)
Backed out changeset 49f68df69db0 (bug 1769586)
2024-11-21 10:50:49 +02:00
Eitan Isaacson 4191ad46a5 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Depends on D209767

Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-11-21 04:39:13 +00:00
Eitan Isaacson 55d2f22d2d Bug 1769586 - P1: Implement ARIA element reflection in Element and ElementInternals. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D209767
2024-11-21 04:39:13 +00:00
Alexandru Marc 634f6d5c47 Backed out 4 changesets (bug 1769586) for causing multiple failures.
Backed out changeset 1125ec697fdd (bug 1769586)
Backed out changeset ced88b84eef3 (bug 1769586)
Backed out changeset 486c9854c11d (bug 1769586)
Backed out changeset f543f54d90a0 (bug 1769586)
2024-11-19 19:10:30 +02:00
Eitan Isaacson 98723b9747 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Depends on D209767

Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-11-19 15:02:18 +00:00
Eitan Isaacson b0e7a75471 Bug 1769586 - P1: Implement ARIA element reflection in Element and ElementInternals. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D209767
2024-11-19 15:02:17 +00:00
Ryan VanderMeulen 5b997974cd Backed out 3 changesets (bug 1769586) for causing Bug 1920082.
Backed out changeset d684010261d6 (bug 1769586)
Backed out changeset b3264bc533e2 (bug 1769586)
Backed out changeset 049fd286ce0f (bug 1769586)
2024-10-17 16:44:16 -04:00
Eitan Isaacson 8140cbd684 Bug 1769586 - P2: Implement a11y support of ARIA element reflection. r=Jamie
Depends on D209767

Differential Revision: https://phabricator.services.mozilla.com/D209768
2024-09-15 22:39:53 +00:00
Eitan Isaacson 4d23ba52ea Bug 1769586 - P1: Implement ARIA element reflection in Element and ElementInternals. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D209767
2024-09-15 22:39:52 +00:00
Eitan Isaacson 9ea0ddea86 Bug 1895551 - Remove aria attribute from ElementInternals when set to null. r=Jamie,dom-core,edgar
Differential Revision: https://phabricator.services.mozilla.com/D209721
2024-05-24 22:37:12 +00:00
Eitan Isaacson 55275793f7 Bug 1883996 - P2: Add ariaActiveDescendantElement to ARIAMixin and implement. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D203850
2024-03-12 20:32:16 +00:00
keithamus 2c3b3f4d43 Bug 1861466 - Add CustomStateSet and :state() pseudo. r=emilio,smaug
Differential Revision: https://phabricator.services.mozilla.com/D191988
2023-11-08 13:38:02 +00:00
Otto Länd 126c82f7ba Bug 1850238, 1850293: apply code formatting via Lando
# ignore-this-changeset
2023-08-30 09:26:04 +00:00
Emilio Cobos Álvarez 72f00fc947 Bug 1850293 - Make validity states non-intrinsic. r=smaug
Add a RAII helper to notify of multiple state changes together for
these.

The UpdateState CustomElementInternals calls that are getting removed
are unnecessary (the state should be up-to-date by then, there's nothing
changing there particularly).

Same for the call in nsGenericHTMLFormElement::UnbindFromTree. ClearForm
already does an state update.

Differential Revision: https://phabricator.services.mozilla.com/D187033
2023-08-30 09:18:32 +00:00
Emilio Cobos Álvarez 3e9e56e2c8 Bug 1850293 - Make editable states not intrinsic. r=smaug,masayuki
This one is tricky because form controls, though I think I got it right...

This fixes a pre-existing bug where we're not following the spec for readonly
inside content-editable.

I filed this as bug 1850390 but other browsers match the spec so add a test and
fix it while at it. This allows cheaper checks for readonlyness in a couple
places.

Differential Revision: https://phabricator.services.mozilla.com/D186896
2023-08-30 09:18:31 +00:00
avandolder f102e83b63 Bug 1556358 - Part 2: Save and restore custom element form data. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D174115
2023-06-28 04:31:22 +00:00
Emilio Cobos Álvarez 529c9ee321 Bug 1839922 - Remove usage of {Has,Get}Attr(kNameSpaceID_None, ..). r=edgar
We have more readable and faster versions (that just omit the namespace
arg).

Mostly done via sed, with a couple helpers to use the faster lookups
where possible.

Differential Revision: https://phabricator.services.mozilla.com/D181795
2023-06-23 10:01:32 +00:00