Commit Graph
373 Commits
Author SHA1 Message Date
Daniel Holbert 648f3a95c5 Bug 2044510: Pass already_AddRefed types by-value instead of by rvalue reference, in dom/html. r=dom-core-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D304360
2026-06-05 21:06:40 +00:00
Leo Tenenbaum 6a27bbbbf6 Bug 2042943 - Add mSubmitter member to FSURLEncoded. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D303026
2026-06-01 13:25:28 +00:00
Daniel Holbert 10725540f6 Bug 2037754: Use 'MakeAndAddRef' instead of 'new' when allocating runnable for nsContentUtils::AddScriptRunner. r=dom-core,smaug
MakeAndAddRef ensures that the freshly-allocated object immediately gets a
refcount of 1 (before it's even passed to AddScriptRunner).  This avoids
several potential footguns that otherwise exist with a zero-refcount
freshly-allocated object.

It also makes the ownership-transfer semantics more clear
(via the already_AddRefed type that it produces) - AddScriptRunner is taking
ownership of the object, rather than using it temporarily while the caller
maintains ownership.

Differential Revision: https://phabricator.services.mozilla.com/D299039
2026-05-07 06:35:57 +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
Simon Farre 37d5f6182a Bug 2024650 - MaybeSubmit calls script that may free doc r=smaug
Take strong reference to doc

Differential Revision: https://phabricator.services.mozilla.com/D288867
2026-04-01 11:14:28 +00:00
Emilio Cobos Álvarez 5016086e1a Bug 2025089 - Remove some includes from nsINode.h and Element.h. r=dom-core,dom-storage-reviewers,firefox-svg-reviewers,janv,smaug
Differential Revision: https://phabricator.services.mozilla.com/D289049
2026-03-22 23:45:55 +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
serge-sans-paille b093ca6e20 Bug 2020581 - Replace copy assignment by move assignment in dom/ r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,dom-core,asuth,padenot,smaug,bwc
Commit automatically generated through clang-tidy's
performance-use-std-move new pass.

- Maybe type has a dedicated move operator
- And TimingParams also have a dedicated move operator because of Maybe
  members
- OwningAnimationTarget benefits from being moved
- nsCOMPtr benefits from being moved
- std::vector benefits from being moved
- std::string benefits from being moved
- SMILTimeValueSpecParams benefits from being moved

Differential Revision: https://phabricator.services.mozilla.com/D285674
2026-03-05 00:58:38 +00:00
Andreea Silaghi df905fef77 Revert "Bug 2020587 - Replace copy assignment by move assignment in xpcom/ r=xpcom-reviewers,jstutte" for causing failures at TestFileSystemHelpers This reverts commit d3c7b9c4d1.
This reverts commit 38c02da27e.
2026-03-04 08:20:03 +00:00
serge-sans-paille 38c02da27e Bug 2020581 - Replace copy assignment by move assignment in dom/ r=media-playback-reviewers,webrtc-reviewers,dom-worker-reviewers,dom-core,asuth,padenot,smaug,bwc
Commit automatically generated through clang-tidy's
performance-use-std-move new pass.

- Maybe type has a dedicated move operator
- And TimingParams also have a dedicated move operator because of Maybe
  members
- OwningAnimationTarget benefits from being moved
- nsCOMPtr benefits from being moved
- std::vector benefits from being moved
- std::string benefits from being moved
- SMILTimeValueSpecParams benefits from being moved

Differential Revision: https://phabricator.services.mozilla.com/D285674
2026-03-04 07:00:30 +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
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 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
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 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
Emilio Cobos Álvarez 01f73409de Bug 2006613 - Fix some ASAN issues.
Gotta love C++. See bug 2007450 for the underlying issue.

ClearForm(false) is harmless so no need to reverse.
2025-12-22 22:34:33 +00:00
Emilio Cobos Álvarez 2a3733e687 Bug 2006613 - Optimize front-removal of various tree-ordered-arrays. r=smaug
The previous approach wasn't quite sound, because it makes the frame
constructor receive the WillBeRemoved after the flat tree has already
changed.

Instead, what do you think about something like this? This creates a
very simple wrapper over an array, but special-cases removals from the
front, and uses it for TreeOrderedArray and also AssignedNodes...

It could be polished (in particular there are a few places where an
Span::IndexOf operator could be beneficial and so).

Differential Revision: https://phabricator.services.mozilla.com/D277301
2025-12-22 21:03:58 +00:00
Norisz Fay ac500ea570 Revert "Bug 2006613 - Optimize front-removal of various tree-ordered-arrays. r=smaug" for causing multiple failures and bustages
This reverts commit 4d02f992d0.
2025-12-22 19:45:18 +00:00
Emilio Cobos Álvarez 4d02f992d0 Bug 2006613 - Optimize front-removal of various tree-ordered-arrays. r=smaug
The previous approach wasn't quite sound, because it makes the frame
constructor receive the WillBeRemoved after the flat tree has already
changed.

Instead, what do you think about something like this? This creates a
very simple wrapper over an array, but special-cases removals from the
front, and uses it for TreeOrderedArray and also AssignedNodes...

It could be polished (in particular there are a few places where an
Span::IndexOf operator could be beneficial and so).

Differential Revision: https://phabricator.services.mozilla.com/D277301
2025-12-22 18:35:29 +00:00
Henri SivonenandVincent Hilla 39a8a4171b Bug 543435 - Make initial about:blank not get overwritten by an async about:blank load. r=sessionstore-reviewers,sfoster,timhuang,credential-management-reviewers,issammani,webidl,extension-reviewers,tabbrowser-reviewers,migration-reviewers,home-newtab-reviewers,hsivonen,cookie-reviewers,fxview-reviewers,firefox-desktop-core-reviewers ,dao,valentin,mossop,smaug,geckoview-reviewers,Jamie,mtigley,thecount,media-playback-reviewers,padenot,dom-worker-reviewers,jesup,jdescottes,asuth,robwu,karlt,profiler-reviewers,kpatenio,devtools-reviewers,tcampbell,nchevobbe
Co-authored-by: Vincent Hilla <[email protected]>
Signed-off-by: Vincent Hilla <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D155376
2025-11-24 05:34:22 +00:00
Tom Schuster 4a14c381aa Bug 1999878 - Remove the security.shadowed_form_element_property_access metric. r=dom-core,smaug
Sadly the numbers don't like we will be able to get rid of clobbering
for forms.

Differential Revision: https://phabricator.services.mozilla.com/D272494
2025-11-15 12:48:26 +00:00
Andreas Farre 12c885354d Bug 1998735 - Pass user navigation involvment from form submission. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D271621
2025-11-10 14:54:09 +00:00
Tom Schuster a3466dc548 Bug 1979875 - Collect telemetry for all clobbered properties. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D259041
2025-08-06 10:11:13 +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
Tom Schuster b0265929b9 Bug 1979041 - Collect telemetry on which clobbered HTMLFormElement properties are accessed. r=dom-core,smaug
Differential Revision: https://phabricator.services.mozilla.com/D258679
2025-07-28 11:44:26 +00:00
Adam Vandolder dd3423c6e9 Bug 1941458 - Remove nsIRadioVisitor and use lambdas in its place. r=edgar,dom-core
Differential Revision: https://phabricator.services.mozilla.com/D234123
2025-07-25 05:47:24 +00:00
Fatih Kilic eed44c4862 Bug 1968607 - Part 1: Replace CSP with PolicyContainer. r=tschuster,webidl,smaug
We are making changes to many files. Very huge chunk of the changes are just renaming CSP -> PolicyContainer. Part 1 and part 2 are solely separated as frontend and backend. The unfortunate thing is, I mistakenly placed IDL changes in part 1, and many of those IDL changes affect frontend code too. I'm sorry for this inconvinience and hard to review patch(es).

(FWIW before this rewrite we had another patch stack. It is 25 patches and I believe isn't as comprehensive as this one. It also didn't replace CSP's inheritance but was copied alongside with CSP, but we decided to change our method and make policy conttainer contain CSP and copy it around after some discussion and reviews)

Differential Revision: https://phabricator.services.mozilla.com/D249248
2025-07-11 05:39:17 +00:00
Andreas Farre e10114d313 Bug 1962710 - Part 3: Fire NavigateEvent for regular navigations. r=smaug,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D249242
2025-05-19 09:03:54 +00:00
Jan-Niklas Jaeschke b3debf824d Bug 1963845 - Use Span for EnumTable. r=emilio,smaug
This patch makes the usage of `EnumTable`s safer
by using `Span`s instead of relying on an empty
element at the end.
Also the name has been changed from `EnumTable`
to `EnumTableEntry` to be more precise.

Differential Revision: https://phabricator.services.mozilla.com/D247453
2025-05-06 08:28:23 +00:00
pstanciu 7d79502fbe Revert "Bug 1963845 - Use Span for EnumTable. r=emilio,smaug" for Build Bustages on HTMLSharedListElement.cpp
This reverts commit eebbccf7b9.
2025-05-05 13:48:07 +00:00
Jan-Niklas Jaeschke eebbccf7b9 Bug 1963845 - Use Span for EnumTable. r=emilio,smaug
This patch makes the usage of `EnumTable`s safer
by using `Span`s instead of relying on an empty
element at the end.
Also the name has been changed from `EnumTable`
to `EnumTableEntry` to be more precise.

Differential Revision: https://phabricator.services.mozilla.com/D247453
2025-05-05 12:49:25 +00:00
Florian Quèze 9885783942 Bug 1956726 - remove leftover Telemetry.h includes in .cpp files, r=chutten,geckoview-reviewers,cookie-reviewers,win-reviewers,dom-storage-reviewers,gstoll,valentin,m_kato,janv.
Differential Revision: https://phabricator.services.mozilla.com/D244351
2025-04-08 13:03:02 +00:00
Florian Quèze 0bd3b586da Bug 1956726 - Migrate histograms to use Glean APIs for SECURITY_UI, r=chutten.
Differential Revision: https://phabricator.services.mozilla.com/D244199
2025-04-03 21:03:54 +00:00
Emilio Cobos Álvarez 46df8608de Bug 1956120 - Make HTMLFormElement::AddElementToTableInternal faster. r=smaug
The regression here was changed because of PositionIsBefore changing its
answer, but this is the same "mid-unbind position comparations get
weird".

Tweak the code a bit to reuse the comparator to share the cache, and
deal with `found` in one go.

Differential Revision: https://phabricator.services.mozilla.com/D242968
2025-03-26 11:20:55 +00:00
Emilio Cobos Álvarez df3801a5f9 Bug 1954552 - Support passing a NodeIndexCache to CompareTreePosition. r=smaug
And use it in a couple places where it makes sense.

Differential Revision: https://phabricator.services.mozilla.com/D241964
2025-03-19 20:54:08 +00:00
Gregory Pappas 64539250c4 Bug 1953138 - Migrate insecure form strings from .properties to fluent r=emilio,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D241021
2025-03-14 07:25:10 +00:00
Edgar Chen 361df2573e Bug 1949439 - Part 2: Dispatch the DOMFormBeforeSubmit event only when the click would trigger a submit action; r=smaug
The `DOMFormBeforeSubmit` is used to notify the Form Autofill and Password Manager
about the form submission to capture the form or login data. However, dispatching
the event in `HTMLFormElement::OnSubmitClickBegin` and applying it to certain input
types only isn't quite right, especially the input type can be changed dynamically
during a click event listener. Therefore, we defer it to when the click would trigger
submit event, which can also cover the input type change case.

Differential Revision: https://phabricator.services.mozilla.com/D239434
2025-02-25 11:23:37 +00:00
Edgar Chen 4ac8a8da39 Bug 1949439 - Part 1: Stop dispatching unused DOMFormSubmit chrome-only event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D239150
2025-02-25 11:23:37 +00:00
Emilio Cobos Álvarez a44b49af0b Bug 1910698 - Add a struct to represent JS caller location and more general warning source location. r=smaug,necko-reviewers,anti-tracking-reviewers,dom-storage-reviewers,pbz,kershaw,janv
Use it liberally across the tree. This could be cleaned up even more in the future.

Differential Revision: https://phabricator.services.mozilla.com/D218114
2024-08-01 17:12:48 +00:00
Emilio Cobos Álvarez d25d53b6fc Bug 1909311 - Remove nsIFormControlFrame and nsITextControlFrame. r=masayuki,layout-reviewers,dholbert
It's a rather useless interface:

 * nsITextControlFrame is only implemented by nsTextControlFrame, so we
   can just use that.
 * nsIFormControlFrame had very few actual functionality, mostly
   scattered around:
    * SetFormProperty(select) was only useful for nsTextControlFrame.
    * SetFormProperty(value) was only called on file controls.
    * SetFocus() did mostly nothing, or things that can be done in
      ElementStateChanged instead.

There are some do_QueryFrame calls that I replaced for better checks in
font inflation and nsIFrame, but I'll adjust to preserve behavior if you
insist (it just such a somewhat-random check).

Differential Revision: https://phabricator.services.mozilla.com/D217322
2024-07-23 16:16:18 +00:00
Ryan Safaeian ccd363c347 Bug 1900009 - Dispatch DOMPossibleUsernameInputAdded event for valid text and email inputs. r=dimi,edgar
Differential Revision: https://phabricator.services.mozilla.com/D214821
2024-07-12 17:38:48 +00:00