Keith Cirkel
03f4244d59
Bug 2018902 - Part 2: Add CustomElementRegistry option to ShadowRoot init r=dom-core-reviewers,webidl,smaug,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D287096
2026-06-11 07:12:47 +00:00
Masayuki Nakano
6388e58841
Bug 2044523 - Make nsPIDOMWindow.h stop including nsPIDOMWindowInlines.h r=dom-core-reviewers,geckoview-reviewers,media-playback-reviewers,webrtc-reviewers,win-reviewers,layout-reviewers,manuel,aosmond,smaug,bwc,gstoll,dholbert,farre,m_kato
...
This patch does not make some header files stop including the inline
header because fixing them require more changes.
Note that `#include "nsComponentManagerUtils.h"` is fixing a bustage
caused by "use of undeclared identifier 'do_CreateInstance'" error.
Differential Revision: https://phabricator.services.mozilla.com/D304432
2026-06-09 03:49:55 +00:00
Serban Stanca
94f4c69168
Revert "Bug 2018902 - Part 2: Add CustomElementRegistry option to ShadowRoot init r=dom-core,webidl,smaug,edgar" for causing build bustages in nsGenericHTMLElement.h.
...
This reverts commit 5d94012a7d .
2026-05-21 11:00:30 +00:00
Keith Cirkel
5d94012a7d
Bug 2018902 - Part 2: Add CustomElementRegistry option to ShadowRoot init r=dom-core,webidl,smaug,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D287096
2026-05-21 10:24:12 +00:00
Olli Pettay
87fcda6a71
Bug 2039698 - Avoid allocating CustomElementCallbackReaction, r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D300981
2026-05-18 09:49:58 +00:00
Olli Pettay
6f932631eb
Bug 2039701 - Consider to cache an ElementQueue instance, r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D300980
2026-05-18 09:40:54 +00:00
Olli Pettay
b43a29ace9
Bug 2039696 - avoid calling nsNameSpaceManager::GetInstance()->GetNameSpaceURI in Element::SetAttrAndNotify when namespace is the default one, and avoid calling IsInObservedAttributeList second time, r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D300638
2026-05-15 03:02:04 +00:00
Sylvestre Ledru
741bbdea29
Bug 2036402 - Apply std::move in dom/base where values can be moved instead of copied r=dom-core,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D298095
2026-05-04 11:17:52 +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
Edgar Chen
b13c27585e
Bug 2027428 - Do not update form owner if custom element isn't in custom state; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D292945
2026-04-24 22:21:31 +00:00
Emilio Cobos Álvarez
8141eeb3e0
Bug 2023628 - Remove FakeString. r=smaug,dom-worker-reviewers,asuth,webidl
...
The reasoning for having it was faster / inline constructor / destructor
behavior, but bug 2025271 inlines the string destructor, so there isn't
a need for this anymore, and perf profiles agree.
There were some unsound checks like not checking for adopted strings
etc.
There's a subtle loss of functionality in which we can't depend on
another string so easily. However this only affects
non-StringBuffer-backed strings, and it was misused (some of the callers
used it with a temporary string which is clearly wrong). Also most
callers can be trivially tweaked to avoid the copy anyways.
Differential Revision: https://phabricator.services.mozilla.com/D288003
2026-04-13 16:51:46 +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
cddd51de64
Bug 2018900 - Implement customElementRegistry on Element DocumentOrShadowRoot r=dom-core,webidl,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D285678
2026-03-09 19:18:22 +00:00
Keith Cirkel
813234fc62
Bug 1937566 - Make CustomElementRegistry constructable r=dom-core,webidl,emilio,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D284629
2026-03-02 22:05:31 +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
Keith Cirkel
0137398cf8
Bug 2018908 - Add comments to various CustomElementRegistry functions r=dom-core,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D284626
2026-02-26 14:15:34 +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
dc1af4136a
Bug 1937566 - Make CustomElementRegistry constructable r=dom-core,webidl,emilio,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D284629
2026-02-25 14:52:07 +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
Keith Cirkel
3e75494429
Bug 2018908 - Add comments to various CustomElementRegistry functions r=dom-core,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D284626
2026-02-25 14:51:58 +00:00
serge-sans-paille
5bb9e0bbc5
Bug 1982662 - Use std::default_delete instead of mozilla::DefaultDelete r=necko-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,jesup,emilio,pehrsons
...
Differential Revision: https://phabricator.services.mozilla.com/D260855
2025-08-25 08:59:21 +00:00
Norisz Fay
61404617b8
Revert "Bug 1982662 - Use std::default_delete instead of mozilla::DefaultDelete r=necko-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,jesup,emilio,pehrsons" for causing bustage @ txUnknownHandler.cpp
...
This reverts commit c39705fbdc .
2025-08-22 16:16:32 +00:00
serge-sans-paille
c39705fbdc
Bug 1982662 - Use std::default_delete instead of mozilla::DefaultDelete r=necko-reviewers,webrtc-reviewers,dom-storage-reviewers,firefox-style-system-reviewers,jesup,emilio,pehrsons
...
Differential Revision: https://phabricator.services.mozilla.com/D260855
2025-08-22 14:16:49 +00:00
Emilio Cobos Álvarez
791917d8af
Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
...
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D256800
2025-08-05 11:47:34 +00:00
Edgar Chen
91d72ebccc
Bug 1980868 - Prevent duplicate atomization of the custom element name string; r=dom-core,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D259752
2025-08-04 18:36:14 +00:00
Edgar Chen
22747b43f7
Bug 1980884 - Fire customelementdefined event only when DevTool is debugging the current browsingContext; r=jdescottes
...
Differential Revision: https://phabricator.services.mozilla.com/D259773
2025-08-04 18:31:50 +00:00
Olli Pettay
0b460dc40d
Bug 1923880, ParentNode.moveBefore(), r=edgar,emilio
...
iframe tests neeeded tweak because the changes for about:blank haven't landed quite yet.
Render blocking and such aren't supported, so the .ini files are still there.
Selection test seemed to be very chromium specific.
Differential Revision: https://phabricator.services.mozilla.com/D255463
2025-07-21 16:33:44 +00:00
iulian moraru
d9d5a440a7
Revert "Bug 1923880, ParentNode.moveBefore(), r=edgar,emilio" for causing non-unified build bustages on nsGenericHTMLFrameElement.cpp.
...
This reverts commit feac8d52fc .
2025-07-21 10:49:53 +00:00
Olli Pettay
feac8d52fc
Bug 1923880, ParentNode.moveBefore(), r=edgar,emilio
...
iframe tests neeeded tweak because the changes for about:blank haven't landed quite yet.
Render blocking and such aren't supported, so the .ini files are still there.
Selection test seemed to be very chromium specific.
Differential Revision: https://phabricator.services.mozilla.com/D255463
2025-07-21 09:37:38 +00:00
Andrew McCreight
90a80982c4
Bug 1945910 - Use MOZ_DIAGNOSTIC_CRASH in RunCustomElementCreationCallback::Run(). r=avandolder
...
Differential Revision: https://phabricator.services.mozilla.com/D236766
2025-02-05 13:44:55 +00:00
Adam Vandolder
0512fcbb3d
Bug 1900888 - SetElementCreationCallback no longer crashes when the definition is not within the callback. r=dom-core,edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D213853
2025-01-14 17:15:11 +00:00
Peter Van der Beken
b36e156ae7
Bug 1912472 - Stop inlining interface object and prototype getter. r=farre
...
Differential Revision: https://phabricator.services.mozilla.com/D218953
2024-08-24 08:29:56 +00:00
Peter Van der Beken
49a4564661
Bug 1901042 - customElements.whenDefined gives useless error message ("invalid or illegal string"). r=dom-core,avandolder
...
Differential Revision: https://phabricator.services.mozilla.com/D212991
2024-06-12 12:15:51 +00:00
Mark Striemer
872f08529b
Bug 1899882 - Invoke elementCreationCallback if there are elements to upgrade r=smaug
...
Co-author/investigator: Tim Giles <[email protected] >
When using SetElementCreationCallback with ESM based custom elements we
are seeing a performance regression vs when we previously required
manually adding a <script type="module"> for the import to the page.
To work around this issue we can delay registering the callback until
the DOMContentLoaded event which improves performance, presumably due to
reduced thrashing from HTML parsing to JS parsing.
With that change however any components that were encountered before the
DOMContentLoaded event will not be loaded or upgraded until the next
time a component of that type is created.
This patch updates the SetElementCreationCallback function to
immediately invoke the callback if there are candidate elements of that
type to upgrade.
Differential Revision: https://phabricator.services.mozilla.com/D212190
2024-06-04 23:18:01 +00:00
Emilio Cobos Álvarez
3bbfb2e943
Bug 1817122 - Make AsyncEventDispatcher(Event) take ownership of the event. r=smaug,media-playback-reviewers,padenot
...
Differential Revision: https://phabricator.services.mozilla.com/D190059
2023-10-04 19:37:39 +00:00
Markus Stange
fd848139b8
Bug 1852866 - Make LifecycleCallbackArgs::mName a RefPtr<nsAtom>. r=emilio
...
Differential Revision: https://phabricator.services.mozilla.com/D188100
2023-09-13 18:15:02 +00:00
Peter Van der Beken
c10814e75a
Bug 1846277 - Remove nsGlobalWindow.h. r=dom-core,necko-reviewers,jesup,farre
...
Differential Revision: https://phabricator.services.mozilla.com/D184973
2023-08-02 20:41:48 +00:00
keithamus
dbe7b1bc17
Bug 1829335 - Add customElements.getName. r=smaug
...
This adds the new customElements.getName method which takes a constructor
and returns string if the definition has been registered, otherwise null.
Differential Revision: https://phabricator.services.mozilla.com/D181646
2023-06-27 09:38:01 +00:00
Adam Vandolder
27b8402ea2
Bug 1556358 - Part 1: Add formStateRestore CE lifecycle callback. r=edgar
...
Depends on D176127
Differential Revision: https://phabricator.services.mozilla.com/D174114
2023-06-13 15:51:46 +00:00
Adam Vandolder
66331f7102
Bug 1663878 - Only process form callbacks for form-associated custom elements. r=edgar
...
Differential Revision: https://phabricator.services.mozilla.com/D167827
2023-01-26 22:26:00 +00:00
Andrew McCreight
718465b79c
Bug 1811963 - CustomElementData::Traverse should use NoteXPCOMChild for mElementInternals. r=smaug
...
ElementInternals is an nsISupports class, so this should use NoteXPCOMChild.
Differential Revision: https://phabricator.services.mozilla.com/D167621
2023-01-24 14:51:33 +00:00
Andrew McCreight
188ac80e29
Bug 1805931, part 2 - Automated removal of uses of ROOT and UNROOT CC macros. r=smaug
...
As of the prior patch, these are no longer needed. I removed
these with a script, then ran clang-format on the files, then
manually reverted a few unrelated changed from the formatter.
Differential Revision: https://phabricator.services.mozilla.com/D164829
2022-12-15 19:45:01 +00:00
Peter Van der Beken
ec54676d42
Bug 1792444 - Switch some WebIDL APIs from 'any' to a union with 'undefined'. r=edgar,media-playback-reviewers,padenot
...
Differential Revision: https://phabricator.services.mozilla.com/D158195
2022-09-28 19:10:51 +00:00
Olli Pettay
048bd344c4
Bug 1777574, automate CC zone handling, r=mccr8
...
Differential Revision: https://phabricator.services.mozilla.com/D155084
2022-09-07 11:22:51 +00:00