Emilio Cobos Álvarez
1c58e2a928
Bug 1773070 - Unify Gecko and Servo EventState/ElementState bits. r=smaug
...
Add a dom/base/rust crate called just "dom" where we can share these.
Most of the changes are automatic:
s/mozilla::EventStates/mozilla::dom::ElementState/
s/EventStates/ElementState/
s/NS_EVENT_STATE_/ElementState::/
s/NS_DOCUMENT_STATE_/DocumentState::/
And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.
Differential Revision: https://phabricator.services.mozilla.com/D148537
2022-06-07 23:09:52 +00:00
Jan Varga
b93e399d5c
Bug 1757575 - Fix non-unified-build bustage in dom/html/HTMLFormElement.cpp; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D139947
2022-03-01 17:39:18 +00:00
Kagami Sascha Rosylight
95253f2665
Bug 1743439 - Part 5: Mark callers in dom/events and dom/html as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D133364
2021-12-09 19:56:09 +00:00
Alexandru Michis
b3616631ef
Backed out 6 changesets (bug 1743439) for causing bustages in AnimationEventDispatcher.h
...
CLOSED TREE
Backed out changeset 792c405d4afc (bug 1743439)
Backed out changeset 0376e73c7dce (bug 1743439)
Backed out changeset 23202094bc00 (bug 1743439)
Backed out changeset ba0fa3a8fa0e (bug 1743439)
Backed out changeset 7ad2746ec876 (bug 1743439)
Backed out changeset a919ef50cf33 (bug 1743439)
2021-12-09 19:36:12 +02:00
Kagami Sascha Rosylight
1da93efca6
Bug 1743439 - Part 5: Mark callers in dom/events and dom/html as MOZ_CAN_RUN_SCRIPT_BOUNDARY r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D133364
2021-12-09 17:16:50 +00:00
Edgar Chen
5fad53737d
Bug 1742714 - Get rid of nsIFormSubmitObserver; r=geckoview-reviewers,agi,smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D132091
2021-12-06 12:23:08 +00:00
Edgar Chen
230d1b0afe
Bug 1556367 - Part 2: Factor dispatching invalid event code into a common place; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D130274
2021-12-03 15:47:34 +00:00
Emilio Cobos Álvarez
1d054196f6
Bug 1740230 - Remove some prefs for pseudo-classes that we have shipped/unshipped successfully. r=dholbert
...
And remove code for :-moz-submit-invalid completely.
Differential Revision: https://phabricator.services.mozilla.com/D130737
2021-11-10 13:27:47 +00:00
Edgar Chen
635069f699
Bug 1556363 - Part 1: Check disabled state for submission in a common place; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D129048
2021-10-25 20:43:10 +00:00
Edgar Chen
4929cc1a94
Bug 1556351 - Part 5: Make nsGenericHTMLFormControlElement implement nsIFormControl; r=smaug
...
nsGenericHTMLFormElement doesn't implement nsIFormControl now as HTMLElement would
inherit it to be able to be added into HTMLFormElement and HTMLFieldSetElement and
support some common form feature.
So some places that call the nsIFormControl method on nsGenericHTMLFormElement
directly would need to queryInterface it to nsIFormControl first, this should be
fine as those places are not in a hot path.
Differential Revision: https://phabricator.services.mozilla.com/D124788
2021-10-04 20:51:27 +00:00
Edgar Chen
71042191bf
Bug 1729008 - Part 2: Make HTMLFormElement::IsLastActiveElement take nsGenericHTMLFormElement as argument; r=smaug
...
Depends on D124459
Differential Revision: https://phabricator.services.mozilla.com/D124462
2021-09-03 17:21:44 +00:00
Edgar Chen
2f052986f8
Bug 1729008 - Part 1: Make HTMLFormElement::IsDefaultSubmitElement take nsGenericHTMLFormElement as argument; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D124459
2021-09-03 17:21:44 +00:00
Edgar Chen
82070f5956
Bug 1728081 - Part 4: Make HTMLFormElement::GetDefaultSubmitElement return nsGenericHTMLFormElement; r=smaug
...
so that the callers don't need to queryInterface it back to nsIContent.
Differential Revision: https://phabricator.services.mozilla.com/D123952
2021-08-30 18:44:51 +00:00
Edgar Chen
c791a38187
Bug 1728081 - Part 3: Merge nsIForm into HTMLFormElement; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D123951
2021-08-30 18:44:51 +00:00
Edgar Chen
efa48fcbc4
Bug 1728081 - Part 2: Remove nsIForm::GetElementAt; r=smaug
...
as it is only used internally.
Depends on D123949
Differential Revision: https://phabricator.services.mozilla.com/D123950
2021-08-30 18:44:51 +00:00
Edgar Chen
6536c5442c
Bug 1728081 - Part 1: Remove nsIForm::GetElementCount; r=smaug
...
as it is only used internally.
Differential Revision: https://phabricator.services.mozilla.com/D123949
2021-08-30 18:44:50 +00:00
Andi-Bogdan Postelnicu
4bbf229571
Bug 1725145 - header files fixes in the hybrid build env. r=valentin
...
Differential Revision: https://phabricator.services.mozilla.com/D122343
2021-08-22 10:21:55 +00:00
Edgar Chen
685690e0c7
Bug 1726393 - Part 2: Rename nsIFormControl::GetFormElement to GetForm; r=smaug
...
Depends on D122995
Differential Revision: https://phabricator.services.mozilla.com/D122996
2021-08-19 09:20:24 +00:00
Edgar Chen
691e17dbb8
Bug 1720314 - Part 1: Remove HTMLFormElement::mSubmittingRequest; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D119776
2021-07-13 16:32:51 +00:00
Edgar Chen
2d359ed0fc
Bug 1719872 - Dialog submission triggered by form.submit() in click handler of submit button should not be deferred; r=smaug
...
Per https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#submit-dialog ,
dialog submission won't run https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#planned-navigation
and the steps are synchronous.
Differential Revision: https://phabricator.services.mozilla.com/D119667
2021-07-12 19:39:25 +00:00
Masayuki Nakano
b224f9cb5b
Bug 1676702 - part 2: Make TextControlState initialize TextEditor with PasswordMaskData r=m_kato
...
During a `TextControlState` alive, `PasswordMaskData` should be alive too.
Otherwise, we cannot keep unmasked range at reframing.
Depends on D118756
Differential Revision: https://phabricator.services.mozilla.com/D118757
2021-06-28 04:37:54 +00:00
Dimi Lee
605861eb92
Bug 1708455 - P10. Add signon.usernameOnlyForm.enabled preference r=sfoster,tgiles
...
Differential Revision: https://phabricator.services.mozilla.com/D116238
2021-06-11 11:56:05 +00:00
Dimi Lee
f6bacb0875
Bug 1708455 - P4. Add DOMFormHasPossibleUsernameField event to notify the password manager when a form has a text input or an email input. r=sfoster,tgiles,smaug
...
Right now, we limit the type of a username field in username-only forms to be either text or email.
This is different from what the password manager currently support in LoginHelper.isUsernameFieldType.
This is because text and email type are the most common cases for a username field, and we want to focus
on the cases that are more likely a username field.
This patch adds "DOMFormHasPossibleUsername" event to notify the password manager when a form has a possible
username field (text or email). The event works similar to the existing "DOMFormHasPassword" event.
Depends on D113797
Differential Revision: https://phabricator.services.mozilla.com/D113798
2021-06-11 11:56:03 +00:00
Emilio Cobos Álvarez
3daca083b1
Bug 1715134 - Make form control type an enum class. r=masayuki
...
Differential Revision: https://phabricator.services.mozilla.com/D117087
2021-06-08 09:43:59 +00:00
Kagami Sascha Rosylight
7c44e8d4f5
Bug 1708228 - Part 2: Remove redundant flush param from nsIRadioGroupContainer r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D113806
2021-04-30 11:25:23 +00:00
Kagami Sascha Rosylight
86f808f056
Bug 1708228 - Part 1: Remove redundant flushing from HTMLFormControlsCollection r=smaug
...
This was done in bug 324828 to workaround bug 22480 but shouldn't be needed anymore.
Differential Revision: https://phabricator.services.mozilla.com/D113805
2021-04-30 11:25:22 +00:00
Kagami Sascha Rosylight
1828771dc7
Bug 1707126 - Part 2: Use RadioGroupManager in HTMLFormElement r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D113578
2021-04-28 16:01:35 +00:00
Emilio Cobos Álvarez
b6fe451bdc
Bug 1700871 - Only allow focus move for links / form submission iff actually handling user input. r=smaug
...
The other navigation that allows focus moves (window.open) already goes
through the popup blocker, so that one is fine.
I think given how weird yet conservative other browsers are, this should
be a good trade-off to avoid false positives.
Differential Revision: https://phabricator.services.mozilla.com/D110196
2021-03-31 01:51:46 +00:00
Dimi Lee
d8a6e9ef56
Bug 1166995 - P2. Call onFormSubmit when a form or a password field is removed from the DOM tree r=sfoster,tgiles,smaug
...
This patch adds two events - `DOMFormRemoved` and `DOMInputPasswordRemoved`.
These events are notified when a form/password field is removed from
the DOM tree. When the LoginManagerChild receives the event, it calls
_onFormSubmit as the form is submitted.
This patch also adds a WeakFieldSet formlessModifiedPasswordFields to
record all the form-less password fields that users have interacted
with to track whether a formless password is removed
Depends on D106024
Differential Revision: https://phabricator.services.mozilla.com/D106025
2021-03-16 09:15:19 +00:00
Simon Giesecke
fba5f29d05
Bug 1693541 - Improve uses of nsBaseHashtable and descendants and avoid multiple subsequent lookups in dom/html. r=mattwoodrow
...
Differential Revision: https://phabricator.services.mozilla.com/D106112
2021-03-01 09:59:29 +00:00
Simon Giesecke
d4b20a96d1
Bug 1691913 - Add some convenience methods to LookupResult and EntryHandle. r=xpcom-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D105475
2021-03-01 09:59:29 +00:00
Simon Giesecke
95c38cc6b8
Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
...
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.
Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke
7c075f27d9
Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
...
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).
Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Emilio Cobos Álvarez
c1b452ece1
Bug 1693969 - Remove <form novalidate> handling from :-moz-ui-{valid,invalid} pseudo-classes. r=smaug
...
There's no way to know whether the submission will actually be
validated, because formnovalidate on submit buttons is a thing (and even
if all the submit controls had formnovalidate, you could still submit
the form and validate it via form.submit()), so it seems better to make
these pseudo-classes not depend on this.
Differential Revision: https://phabricator.services.mozilla.com/D105968
2021-02-23 11:26:17 +00:00
Simon Giesecke
9d60f9c227
Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Alexis Beingessner
b376547204
Bug 1686616 - make StringBundle use Components instead of Services. r=kmag
...
Differential Revision: https://phabricator.services.mozilla.com/D105531
2021-02-18 13:26:32 +00:00
Simon Giesecke
3c36abd9aa
Bug 1692880 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-16 15:53:33 +00:00
smolnar
03bc7728ba
Backed out 5 changesets (bug 1691894) for causing hazard failures in nsXULPrototypeCache. CLOSED TREE
...
Backed out changeset 22dc870ee609 (bug 1691894)
Backed out changeset 58c31e9d6ae3 (bug 1691894)
Backed out changeset 7483e84149d8 (bug 1691894)
Backed out changeset f977d6cfa973 (bug 1691894)
Backed out changeset db4503476f34 (bug 1691894)
2021-02-15 16:43:23 +02:00
Simon Giesecke
f04f372040
Bug 1691894 - Make Put accept DataType instead of wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika
...
Differential Revision: https://phabricator.services.mozilla.com/D104850
2021-02-15 10:04:46 +00:00
Simon Giesecke
525b2b7549
Bug 1688833 - Migrate LookupForAdd to WithEntryHandle in dom/html. r=mattwoodrow
...
Differential Revision: https://phabricator.services.mozilla.com/D104226
2021-02-09 18:19:43 +00:00
Edgar Chen
bc02cc778a
Bug 1691357 - Add UserCounter and deprecate warnning message for form submission via untrusted submit event; r=smaug,flod
...
Differential Revision: https://phabricator.services.mozilla.com/D104070
2021-02-09 00:35:23 +00:00
Edgar Chen
50e99ab25d
Bug 1690897 - Get rid of dom.formdata.event.enabled pref; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D104103
2021-02-05 13:51:33 +00:00
Stone Shih
826be39a6f
Bug 1370630 - Untrusted submit event shouldn't trigger form submission; r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D28070
2021-02-04 19:38:47 +00:00
Simon Giesecke
46908cfb51
Bug 1660470 - Add missing include directives/forward declarations. r=nika
...
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Sylvestre Ledru
68b806d604
Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
...
Also add some missing namespace qualifications
Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')
Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 17:04:01 +00:00
Butkovits Atila
a6e7dcc53f
Backed out changeset c0adbf7522dc (bug 1674637) for bustage on GMPParent.cpp. CLOSED TREE
2020-11-04 10:54:36 +02:00
Sylvestre Ledru
8f709b39e8
Bug 1674637 - Use nested namespaces in dom/ r=sg,andi
...
Also add some missing namespace qualifications
Done with:
./mach static-analysis check --checks="-*,modernize-concat-nested-namespaces" --fix dom/
./mach clang-format -p $(hg status dom/|grep ^M|awk '{print $2}')
Differential Revision: https://phabricator.services.mozilla.com/D95456
2020-11-04 08:29:00 +00:00
Simon Giesecke
ab6f0a7137
Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
...
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Frederik Braun
a251196a3b
Bug 1661423 - dont apply upgrade-insecure-requests to localhost form submissions r=ckerschb
...
Differential Revision: https://phabricator.services.mozilla.com/D88577
2020-08-31 10:11:37 +00:00
Sean Feng
bd1e7152f7
Bug 1657163 - Enable <dialog> in chrome UI for beta/release r=smaug
...
Differential Revision: https://phabricator.services.mozilla.com/D85933
2020-08-05 14:26:29 +00:00