Commit Graph

416 Commits

Author SHA1 Message Date
Sylvestre Ledru
b0fe72dee5 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
7388749830 Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
4a97019e39 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Adam Vandolder
a1cf2d6b5d Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-28 15:47:11 +00:00
Natalia Csoregi
51f7d1bb14 Backed out changeset 8f8492410799 (bug 1685926) for causing bustage on SVGAnimatedPathSegList.cpp. CLOSED TREE 2023-09-28 10:40:31 +03:00
Adam Vandolder
aee8834b7a Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-28 06:35:44 +00:00
Olli Pettay
c8c800a6a6 Bug 1843477, remove main thread only CC macros, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D187146
2023-09-26 12:36:20 +00:00
Cosmin Sabou
1483b97d75 Backed out 6 changesets (bug 1843477) for causing hazards failures. CLOSED TREE
Backed out changeset 64b093aa12a9 (bug 1843477)
Backed out changeset bdcd84c938d1 (bug 1843477)
Backed out changeset 05c882dd0d9a (bug 1843477)
Backed out changeset 1de814e5820d (bug 1843477)
Backed out changeset 6a0e19a60a5d (bug 1843477)
Backed out changeset 48942aff586f (bug 1843477)
2023-09-26 05:32:28 +03:00
Olli Pettay
c1089623d8 Bug 1843477, remove main thread only CC macros, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D187146
2023-09-25 21:09:00 +00:00
Cristian Tuns
f84b646496 Backed out changeset 37ade77d181e (bug 1685926) for causing build bustages in PerformanceEventTiming.cpp CLOSED TREE 2023-09-25 12:40:22 -04:00
Adam Vandolder
305c6a88bf Bug 1685926 - Group disconnected radio buttons together. r=saschanaz,smaug
Differential Revision: https://phabricator.services.mozilla.com/D162349
2023-09-25 14:39:08 +00:00
Cosmin Sabou
af07ece97f Backed out 3 changesets (bug 1843477) for causing hazards failures on TelemetryFixture.cpp. CLOSED TREE
Backed out changeset 4dd5d8ac600c (bug 1843477)
Backed out changeset e7bc0b63286a (bug 1843477)
Backed out changeset 4f45f40beaf7 (bug 1843477)
2023-09-08 20:21:46 +03:00
Olli Pettay
26df9a59fc Bug 1843477, remove main thread only CC macros, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D187146
2023-09-08 14:51:48 +00:00
Ryan VanderMeulen
2c115d3540 Bug 1851593 - Add missing ACCESSIBILITY guard. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D187450
2023-09-05 13:51:27 +00:00
Olli Pettay
329f7edf3d Bug 1851039 - Investigate if it is possible to reuse the text node when setting element.textContent, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187231
2023-09-04 09:38:09 +00:00
Sandor Molnar
f23f38dfe8 Backed out changeset 3451691c483d (bug 1851039) for causing mochitest failures in accessible/tests/browser/e10s/browser_caching_description.js CLOSED TREE 2023-09-04 05:48:44 +03:00
Olli Pettay
9cb290b2ce Bug 1851039 - Investigate if it is possible to reuse the text node when setting element.textContent, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187231
2023-09-03 17:57:31 +00:00
Cristian Tuns
82d133d3e8 Backed out changeset e6370dc41077 (bug 1851039) for causing wpt failures in dynamic-mtext-like-001.html CLOSED TREE 2023-09-01 12:33:37 -04:00
Olli Pettay
2f527d65e0 Bug 1851039 - Investigate if it is possible to reuse the text node when setting element.textContent, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D187231
2023-09-01 14:08:32 +00:00
Sean Feng
5b22ce2910 Bug 1811129 - Implement the new dialog initial focus algorithm r=emilio
The main changes of the new algorithm are

* Make the dialog focusing steps look at sequentially focusable elements instead of any focusable element.
* Make the dialog element itself get focus if it has the autofocus attribute set.
* Make the dialog element itself get focus as a fallback instead of focus being "reset" to the body element.

Spec PR (merged): https://github.com/whatwg/html/pull/8199

Differential Revision: https://phabricator.services.mozilla.com/D181263
2023-08-02 13:35:47 +00:00
Norisz Fay
984233a612 Backed out changeset cbf5ea1b17d2 (bug 1811129) for causing failures on modal-dialog-backdrop-opacity.html CLOSED TREE 2023-07-06 20:28:17 +03:00
Sean Feng
c57066bb2b Bug 1811129 - Implement the new dialog initial focus algorithm r=emilio
The main changes of the new algorithm are

* Make the dialog focusing steps look at sequentially focusable elements instead of any focusable element.
* Make the dialog element itself get focus if it has the autofocus attribute set.
* Make the dialog element itself get focus as a fallback instead of focus being "reset" to the body element.

Spec PR (merged): https://github.com/whatwg/html/pull/8199

Differential Revision: https://phabricator.services.mozilla.com/D181263
2023-07-06 15:33:33 +00:00
Masayuki Nakano
d8b4f4d3a2 Bug 1829570 - part 1: Create a static method version of AsyncEventDispatcher::RunDOMEventWhenSafe r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D176486
2023-05-15 01:07:29 +00:00
Emilio Cobos Álvarez
d2e44bf44a Bug 1827516 - Cleanup some event target parent code. r=smaug
No behavior change here, but I was looking and this code can be simpler.

Differential Revision: https://phabricator.services.mozilla.com/D175714
2023-04-18 09:23:06 +00:00
Emilio Cobos Álvarez
c195031050 Bug 1825825 - Simplify NAC setup. r=smaug
Make all UA widgets also NAC.

Keep the UA widget flag but break at anonymous subtree boundaries, so
that only nodes inside the UA widget directly (and not NAC from those)
get the flag.

This is important because two callers depend on this difference:

 * The style system, since we still want to match content rules from
   stylesheets in the UA widget. We also match user rules, which is a
   bit sketchy, but that was the previous behavior, will file a
   follow-up for that.

 * The reflector code, since we want the scope for UA widgets to not
   include the NAC nodes inside that UA widget. nsINode::IsInUAWidget
   got it wrong.

After this patch, ChromeOnlyAccess is equivalent to
IsInNativeAnonymousSubtree, so we should probably unify the naming.
That's left for a follow-up patch because I don't have a strong
preference.

Differential Revision: https://phabricator.services.mozilla.com/D174310
2023-04-05 09:19:15 +00:00
Emilio Cobos Álvarez
3223c9f9ed Bug 1825825 - Simplify inspector node walking. r=smaug
This doesn't change behavior but it's simpler. I found it while
debugging a failure with the previous patches.

Depends on D174316

Differential Revision: https://phabricator.services.mozilla.com/D174365
2023-04-03 09:21:35 +00:00
Alexander Surkov
27099d19d9 Bug 1823757 - implement attr associated element, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173337
2023-03-30 16:15:52 +00:00
Cathie Chen
b3a9e14892 Bug 1823897 - Implement popover focusing steps, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173714
2023-03-28 16:01:25 +00:00
Emilio Cobos Álvarez
8dabbf6590 Bug 1823686 - Share URLExtraData between SVG attribute mapping and style attribute. r=smaug
I don't think there's ever a way these should differ.

Got some include hell from removing ReferrerInfo.h from Document.h but
hopefully should be straight-forward to review.

Depends on D173154

Differential Revision: https://phabricator.services.mozilla.com/D173155
2023-03-22 14:54:43 +00:00
Emilio Cobos Álvarez
6739a7c89e Bug 1823686 - Unify ReferrerInfo::CreateFor{InternalCSS,SVG}Resources, since they're the same. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D173154
2023-03-22 11:50:56 +00:00
Ziran Sun
caa78efc0f Bug 1820544 - Add popover attribute and part of basic popover functionality. r=emilio
Starts to add part of the basic functionality for popover. Including
[1] :open & :closed CSS pseudo class
[2] showPopover(), hidePopover() and togglePopover() interfaces. Much of the
functionality is still to-do.
[3] PopoverData interface

Differential Revision: https://phabricator.services.mozilla.com/D171719
2023-03-10 10:52:20 +00:00
Olli Pettay
f465a04662 Bug 1816312, try to avoid creating Range objects in some common cases when spellchecker is disabled for contentEditable, r=masayuki
This is not very optimimal, but tracking spellchecking state in DOM tree is tricky because of multiple contentEditables and possibility to set spellcheck true/false anywhere etc.
At least this helps with the testcase quite a bit.

Differential Revision: https://phabricator.services.mozilla.com/D169870
2023-02-16 11:48:13 +00:00
Robert Longson
702b1a87a5 Bug 1817075 - Use nsIFrame::HasAnyStateBits() whenever possible instead of GetStateBits() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D170006
2023-02-16 08:10:28 +00:00
Emilio Cobos Álvarez
765e4c3182 Bug 1807003 - Centralize animation data in slots. r=smaug,firefox-animation-reviewers,boris
This should both be faster and simpler. Also will allow us in the future
to animate more pseudos without having to add a gazillion properties.

I think we should try to clear more stuff (maybe the whole animation
data) on unbind, but that's a bit tangential.

Differential Revision: https://phabricator.services.mozilla.com/D169860
2023-02-15 14:12:33 +00:00
Olli Pettay
b16de0c643 Bug 1799354, replaceChildren should fire DOMNodeRemoved when needed (and not assert about 'Want to fire DOMNodeRemoved event, but it's not safe'), r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D161682
2022-11-16 20:29:53 +00:00
Sean Feng
3630c2abf3 Bug 1741936 - Implement focus delegate algorithm r=emilio
Spec: https://html.spec.whatwg.org/multipage/interaction.html#focus-delegate

Differential Revision: https://phabricator.services.mozilla.com/D153689
2022-10-14 01:20:08 +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
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
Emilio Cobos Álvarez
65f6cef829 Bug 1771791 - Use regular ComputeIndexOf in ComputeFlatTreeIndexOf if there's no Shadow DOM involved. r=mrobinson
Untested, but seems like it should address the regression.

Differential Revision: https://phabricator.services.mozilla.com/D147865
2022-06-02 09:24:16 +00:00
Martin Robinson
f06c23c39e Bug 1477524 - Update quotes and counters to work trough the flattened tree r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146693
2022-05-26 16:12:46 +00:00
Norisz Fay
3a4c6bb793 Backed out changeset ce66cc2cbb95 (bug 1477524) for causing build bustages on nsCounterManager.cpp CLOSED TREE 2022-05-26 15:24:40 +03:00
Martin Robinson
64b7e8262d Bug 1477524 - Update quotes and counters to work trough the flattened tree r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146693
2022-05-26 11:15:16 +00:00
Emilio Cobos Álvarez
e4291f8aba Bug 1761493 - Make Gecko internally consistent wrt what a link is. r=smaug
This is mostly edge-casey, but see bug 1757156 for an example where it's
causing some issues (granted, they could use `href="#"` or something
instead of an empty href).

It feels weird if a link looks like a link (because the CSS definition
of a link matches, which is "has an href") but then mostly doesn't
behave as a link.

We can't navigate anywhere if we don't have a valid URI but maybe JS
handles the relevant events as in bug 1757156.

Use the CSS definition (has href) since that's interoperable across
browsers. This should also make some stuff much faster (since checking
'is link' is now just a bit check instead of a virtual call).

(Awaiting try results, if no tests need adjustments then I need to write
some)

Differential Revision: https://phabricator.services.mozilla.com/D142107
2022-03-30 17:34:31 +00:00
Sylvestre Ledru
35a175aa33 Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D138441
2022-02-11 10:01:15 +00:00
Masayuki Nakano
0d2544e967 Bug 1753487 - Make nsIContent::GetEditingHost() not assume that itself is an element if there is no parent element r=peterv
If the instance is not an element and is a child of `Document` or something
non-element node, the method calls `this->AsElement()` in non-element instance.

It should check whether it's an element node or not when there is no editable
parent element.

Differential Revision: https://phabricator.services.mozilla.com/D138230
2022-02-10 12:48:14 +00:00
Masayuki Nakano
41d6e516dc Bug 1741148 - part 1: Rename nsINode::ComputeIndexOf to ComputeIndexOf_Deprecated r=smaug
It's hard to fix some callers.  Therefore, in this bug, we should fix only
simple cases.  Therefore, we should rename existing API first.

Differential Revision: https://phabricator.services.mozilla.com/D131334
2021-12-09 08:32:30 +00:00
Mike Hommey
b9b2736d16 Bug 1744877 - Remove --disable-xul. r=Gijs
Building with --disable-xul has been busted since _at least_ bug
1082579, for more than 7 years (I didn't try to track that down
further). It's time to recognize that the option serves no purpose.

Differential Revision: https://phabricator.services.mozilla.com/D133161
2021-12-08 21:37:11 +00:00
Masayuki Nakano
628f3ba93c Bug 1455514 - part 1: Add accessors and static helper methods to retrieve nsINode or its concrete classes from EventTarget r=smaug
Currently, checking whether an `EventTarget` is `nsINode` (or its concrete
classes) or not requires a QI, but it's expensive and used a lot while we
handle each event.  Therefore, it'd be nicer for creating a virtual method,
`EventTarget::IsNode()` and use it for the check.

If trying to convert `EventTarget` to a concrete class, it may require two
virtual method calls.  I'm not sure whether it's cheaper than a QI, but at
least, it won't depend on the UUID check order of `QueryInterface()` when
multiple interfaces are implemented.

Differential Revision: https://phabricator.services.mozilla.com/D129781
2021-11-02 13:03:43 +00:00
Masayuki Nakano
ffa5244e07 Bug 1732845 - Add nsINode::IsInDesignMode() to check whether the node is directly in design mode r=smaug
There are a lot of check of `Document`'s editable state **with** comments. This
means that it's unclear for developers that only `Document` node is editable in
design mode.

Additionally, there are some points which use composed document rather than
uncomposed document even though the raw API uses uncomposed document. Comparing
with the other browsers, checking uncomposed document is compatible behavior,
i.e., nodes in shadow trees are not editable unless `contenteditable`.

Therefore, `nsINode` should have a method to check whether it's in design mode
or not.

Note that it may be called with a node in UA widget.  Therefore, this patch
adds new checks if it's in UA widget subtree or native anonymous subtree,
checking whether it's in design mode with its host.

Differential Revision: https://phabricator.services.mozilla.com/D126764
2021-10-12 03:14:43 +00:00
Emilio Cobos Álvarez
dc13979214 Bug 1730022 - Improve debuggability of nsIContent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D125192
2021-09-10 16:39:15 +00:00