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.
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.
Given a structure like:
```
<button popovertarget=foo>Activate
<div popover id=foo>Clicking me shouldn't close me</div>
</button>
```
With the popover open, clicking the popover will propagate a click
upward to the button, which will close the button. This change ensures
that the original target is checked, and if it is a
ShadowIncludingDescendantOf the button then the popover behaviour is not
invoked.
Differential Revision: https://phabricator.services.mozilla.com/D259955
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
This now uses an EnumTable rather than custom code, which simplifies the
logic while also enabling case insensitivity for the enumerated values.
Differential Revision: https://phabricator.services.mozilla.com/D256015
This refactoring aligns the button activation behaviour to the exact
steps specified in HTML, which has some small changes from the prior
implementation:
- button activation returns early after submitting, or resetting, not
triggering popovers or command/commandfor.
- buttons with form owners and a type attribute in the Auto state must
return early, not triggering popovers or command/commandfor.
This also has some other non-observable changes to the code:
- collapses the HandleCommandForAction method directly into
ActivationBehavior.
- adds code comments for each of the spec steps
Differential Revision: https://phabricator.services.mozilla.com/D254715
This reverts commit d33dcda2c6.
Revert "Bug 1950338 - Part 8: Rename invoketarget->commandfor, invokeaction->command r=webidl,devtools-reviewers,nchevobbe,smaug"
This reverts commit 0fe8930d32.
Revert "Bug 1950338 - Part 7: Move command&commandfor logic to HTMLButtonElement r=smaug"
This reverts commit 5a9255cd0b.
Revert "Bug 1950338 - Part 6: Rename invoker functions to command functions r=dom-core,masayuki"
This reverts commit 76f840a55a.
Revert "Bug 1950338 - Part 5: Remove InvokeEvent, migrate .invoker to CommandEvent .source r=webidl,devtools-reviewers,nchevobbe,emilio,smaug"
This reverts commit f7d2727969.
Revert "Bug 1950338 - Part 4: Move invokeTargetElement, invokeAction to HTMLButtonElement IDL r=webidl,smaug"
This reverts commit a7a025a843.
Revert "Bug 1950338 - Part 3: Expose CommandEvent in commandfor pref; move from chrome-webidl to webidl r=webidl,emilio"
This reverts commit eb133a45e6.
Revert "Bug 1950338 - Part 2: Move invokers meta ini to correct directory r=dom-core,sefeng"
This reverts commit face866adb.
Revert "Bug 1950338 - Part 1: Rename `dom.element.invokers` flag to `dom.element.commandfor` r=webidl,devtools-reviewers,nchevobbe,smaug"
This reverts commit 532bb887b5.
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
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
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
This doesn't change behavior on its own, but it's likely we want to make
the tab focusability more complicated in bug 1895184, and this will make
changes to this area less painful.
Differential Revision: https://phabricator.services.mozilla.com/D209525
Much like BindToTree.
This will be useful because I need to pass more information through
UnbindFromTree() to speed up dir=auto for bug 1874040.
Differential Revision: https://phabricator.services.mozilla.com/D202215
This adds support for the experimental `invoketarget` and `invokeaction`
attributes, as specified in the open-ui "Invokers" explainer.
(https://open-ui.org/components/invokers.explainer/)
The `invoketarget` attribute maps to the IDL `invokeTargetElement`,
similar to `popoverTargetElement`, and the `invokeaction` is a freeform
string.
The Button behaviour checks for `invokeTargetElement` in its activation
behaviour, and dispatches an `InvokeEvent` if there is one.
This also adds some basic scaffolding for `handleInvokeInternal` which
will allow elements to provide their own invocation action algorithms.
Differential Revision: https://phabricator.services.mozilla.com/D190449
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