Commit Graph

1005 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
c5c8aee75c Bug 1827856 - Remove nativeAnonymousChildList observers. r=smaug,credential-management-reviewers,devtools-reviewers,sgalich,nchevobbe
You let me know if this seems appealing to you :)

Differential Revision: https://phabricator.services.mozilla.com/D175382
2023-04-18 14:58:34 +00:00
Cathie Chen
6d716489ba Bug 1827244 - Popover: implement topmost popover ancestor, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D175059
2023-04-18 13:48:38 +00:00
Alexander Surkov
3ce742bba0 Bug 1826793 - implement popover invoker, r=emilio
See https://html.spec.whatwg.org/multipage/popover.html#popover-invoker

Differential Revision: https://phabricator.services.mozilla.com/D175265
2023-04-17 14:17:06 +00:00
Alexander Surkov
50bc93b884 Bug 1823757 - use parsed atoms for popovertarget attribute, r=emilio
Use parsed atoms to store popovertarget attributes as more effective mechanism to search for ID match in attr associated elements implementation. Followup from D173337.

Differential Revision: https://phabricator.services.mozilla.com/D174786
2023-04-11 18:35:51 +00:00
Natalia Csoregi
64f264b62e Backed out changeset 96da9dcee2b0 (bug 1823757) for causing failures on popover-invoking-attribute.html. CLOSED TREE 2023-04-11 09:43:08 +03:00
Alexander Surkov
be39f08c40 Bug 1823757 - use parsed atoms for popovertarget attribute, r=emilio
Use parsed atoms to store popovertarget attributes as more effective mechanism to search for ID match in attr associated elements implementation. Followup from D173337.

Differential Revision: https://phabricator.services.mozilla.com/D174786
2023-04-11 00:53:28 +00:00
Cosmin Sabou
67393d958e Backed out changeset 93a5b0a259ae (bug 1823757) for causing Atom related wpt failures. 2023-04-07 00:39:17 +03:00
Alexander Surkov
a9708c7096 Bug 1823757 - use parsed atoms for popovertarget attribute, r=emilio
Use parsed atoms to store popovertarget attributes as more effective mechanism to search for ID match in attr associated elements implementation. Followup from D173337.

Differential Revision: https://phabricator.services.mozilla.com/D174786
2023-04-06 18:48:03 +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
Alexander Surkov
409e66eacc Bug 1823757 implement PopoverInvokerElement::popoverTargetElement, r=emilio
See https://html.spec.whatwg.org/multipage/popover.html#dom-popovertargetelement

Differential Revision: https://phabricator.services.mozilla.com/D174259
2023-04-03 13:21:36 +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
Emilio Cobos Álvarez
f69a397491 Bug 1449669 - Remove IsNodeOfType. r=longsonr
Depends on D172893

Differential Revision: https://phabricator.services.mozilla.com/D172894
2023-03-17 19:22:14 +00:00
Alexander Surkov
d00e971fa8 Bug 1821732 - implement "hide all popovers unitl" algorithm, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172701
2023-03-16 16:52:30 +00:00
Alexander Surkov
802a7fe55e Bug 1821732 - implement auto popover list, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172296
2023-03-13 20:18:46 +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
Brad Werth
68434f47f6 Bug 1815140 Part 1: Make Grid dom object an idempotent property of its frame. r=emilio
This ensures that repeated calls to Element::GetGridFragments will return
an array of idempotent Grid objects for each fragment. This is
accomplished by making the Grid object hold a WeakFrame back to its
originating frame, and updating a property on construction and
destruction.

Differential Revision: https://phabricator.services.mozilla.com/D169724
2023-02-23 01:07:34 +00:00
Emilio Cobos Álvarez
fe8e5d2f7f Bug 1816915 - Tweak how we handle animation restyles on bind/unbind. r=hiro
Remove code on bind/unbind that requested a restyle on an unstyled
element, and that canceled that on an unbound element.

Instead, deal with detached nodes in EffectCompositor.

Tweak test restyles since we now expect one restyle as a result of the
initial composing of the animation that before happened eagerly.

Drive-by remove an unused test function in wpt (animationStartsRightNow
is not defined there anyways).

In practice, this makes it consistent with how we handle bind on
elements in shadow trees.

Differential Revision: https://phabricator.services.mozilla.com/D169932
2023-02-21 08:51:00 +00:00
Cosmin Sabou
16ef9eba19 Backed out 3 changesets (bug 1815140) for causing wrapper related dt failures. CLOSED TREE
Backed out changeset 0380de95a301 (bug 1815140)
Backed out changeset dd7288d15da0 (bug 1815140)
Backed out changeset 7f50487ea10c (bug 1815140)
2023-02-21 07:15:20 +02:00
Brad Werth
792fde2cfe Bug 1815140 Part 1: Make Grid dom object an idempotent property of its frame. r=emilio
This ensures that repeated calls to Element::GetGridFragments will return
an array of idempotent Grid objects for each fragment. This is
accomplished by making the Grid object hold a WeakFrame back to its
originating frame, and updating a property on construction and
destruction.

Differential Revision: https://phabricator.services.mozilla.com/D169724
2023-02-21 04:06:37 +00:00
Emilio Cobos Álvarez
46f75451b0 Bug 1816915 - Clean up EffectSet APIs. r=firefox-animation-reviewers,boris
EffectSet::GetEffectSet seems rather redundant, use just EffectSet::Get
and tweak naming of similar APIs.

Differential Revision: https://phabricator.services.mozilla.com/D169931
2023-02-15 20:39:16 +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
d3207e00dc Bug 1816242 - Optimize nsRange::ContentRemoved in some common cases, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D169549
2023-02-13 13:42:00 +00:00
Emilio Cobos Álvarez
30f4d8a5a5 Bug 1815430 - nsFocusManager::GetRedirectedFocus is dead code. r=smaug
No implementation of nsIDOMXULMenuListElement returns an input field
(this is menulist.js and autocomplete-input.js).

It seems autocomplete-input used to do this, but it got refactored to
extend HTMLInputElement instead, so this code can all go.

Differential Revision: https://phabricator.services.mozilla.com/D169066
2023-02-07 13:47:48 +00:00
Adam Vandolder
57da6ea373 Bug 1418449 - Add translate attribute to HTMLElement. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D167081
2023-01-19 16:00:55 +00:00
Iulian Moraru
3b28be9c3c Backed out changeset 62c51637951f (bug 1418449) for causing wpt failures on idlharness.https.html?include=HTML. CLOSED TREE 2023-01-19 07:57:43 +02:00
Makoto Kato
bd77026b85 Bug 1744288 - Store pending full screen request when calling element.requestFullscreen immediately. r=edgar
When `element.requestFullscreen` is called, we dispatch small task via
`Document::AsyncRequestFullscreen`. But it doesn't append `FullscreenRequests`
to `PendingFullscreenChangeList` immediately. So if we want to check
whether we have pending full screen request, we have to run an event loop.

Although I would like to check whether we have pending full screen request for
`screen.orientation.lock` compatibility, since we don't append it to pending
list immediately, we don't have the easy way to detect it.

`RequestFullscreen` doesn't wait for the completion if it runs on content
process since `RequestFullscreenInContentProcess` doesn't wait for the result
of chrome event. If runs on chrome process, `RequestFullscreenInParentProcess`
is synchronous. So this change removes `AsyncRequestFullscreen` and simply
calls `RequestFullscreen`.

By not using AsyncRequestFullscreen, we will append `FullscreenRequests` to
pending list immediately, so we can check it without event loop.

Differential Revision: https://phabricator.services.mozilla.com/D163583
2023-01-19 02:15:30 +00:00
Adam Vandolder
28609c25f4 Bug 1418449 - Add translate attribute to HTMLElement. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D167081
2023-01-19 01:45:35 +00:00
Tom Schuster
40c9f37d22 Bug 1784040 - Error handling during construction of the sanitizer. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159146
2023-01-16 15:21:40 +00:00
Emilio Cobos Álvarez
b0100048e4 Bug 1792057 - Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=smaug
The blur is a regression from bug 1740989, but it's really uncovering a
regression from bug 1729342, sorta. Before that, we used to focus the
inner text field on rebuild via focusInnerTextBox().

One could argue that the focus fixup rule should really deal with this,
but I guess since content can't really unattach shadow DOM, it's less of
a general issue and more of an implementation detail.

The test uncovers another pre-existing issue (switching from date ->
test was also broken, and we left a bogus ElementState::FOCUS state in
the element).

Differential Revision: https://phabricator.services.mozilla.com/D158167
2023-01-11 22:16:38 +00:00
Emilio Cobos Álvarez
59e7b13fee Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.

The basic set up is:

  * nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
    the current active menu item)

  * nsMenuFrame -> XULButtonElements that return true for IsMenu().
    Can't use XULMenuElement because of <button type=menu>, which
    behaves like a, well, menu.

This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).

Differential Revision: https://phabricator.services.mozilla.com/D164210
2023-01-04 19:01:13 +00:00
Boris Chiou
d6e6ce0fdf Bug 1807685 - Rename scroll-linked (animations) to scroll-driven (excluding WPT tests). r=dholbert
The spec is still using `Scroll-linked`, so we exclude the change of WPT tests.
I believe WPT will get updates once the spec doc is renamed.

Differential Revision: https://phabricator.services.mozilla.com/D165914
2023-01-04 00:50:45 +00:00
Csoregi Natalia
16528aebb2 Backed out changeset f11c529b2407 (bug 1805414) for failures on test_submenuClose.xhtml and nsMenuPopupFrame.cpp. CLOSED TREE 2023-01-04 01:48:30 +02:00
Emilio Cobos Álvarez
dd6fd3a3b0 Bug 1805414 - Remove nsMenuFrame and nsMenuParent. r=smaug,Jamie,desktop-theme-reviewers,settings-reviewers,dao
Move most the event handling stuff to the DOM. I've left nsMenuBarFrame
for now, but I will be removing that in the future.

The basic set up is:

  * nsMenuParent becomes XULMenuParentElement (menubar or popup, manages
    the current active menu item)

  * nsMenuFrame -> XULButtonElements that return true for IsMenu().
    Can't use XULMenuElement because of <button type=menu>, which
    behaves like a, well, menu.

This makes the a11y events for menus (DOMMenuItem{Active,Inactive}) make
sense (before that we were firing duplicate Inactive events etc, and the
event order was rather suspicious).

Differential Revision: https://phabricator.services.mozilla.com/D164210
2023-01-03 22:06:01 +00:00
Boris Chiou
32855a3cec Bug 1774505 - Preserve the progress of null timeline for print. r=hiro
We always use the document timeline of the cloned document, and clone the
paused animation with the preserved progress, even if the original
timeline is null.

Differential Revision: https://phabricator.services.mozilla.com/D164712
2022-12-16 02:28:02 +00:00
Martin Robinson
b5d910a0ca Bug 1791759 - Add support for content-visibility: auto r=emilio
This change adds support for `content-visibilty: auto` as well as
showing and hiding content based on the relevancy of the content as
defined in the specification. Changes to relevancy are handled by
triggering updates in a set of `content-visibility: auto` frames stored
in PresShell at the appropriate time in the document lifecycle.

Some tests are now failing due to this feature exposing the failures,
but they will be fixed in later changes.

This change is a reland of an earlier version that properly updates
intrinsic sizes and triggers an update of remembered size for the
purposes of contain-intrinsic-size when content relevancy changes.

Co-authored-by: Jihye Hong <jihye@igalia.com>

Differential Revision: https://phabricator.services.mozilla.com/D159693
2022-11-30 18:00:27 +00:00
Marian-Vasile Laza
3f33580c27 Backed out changeset c428c3ad7725 (bug 1791759) for causing wpt failures on auto-012.html. CLOSED TREE 2022-11-28 13:31:05 +02:00
Martin Robinson
92b6a75ea4 Bug 1791759 - Add support for content-visibility: auto r=emilio
This change adds support for `content-visibilty: auto` as well as
showing and hiding content based on the relevancy of the content as
defined in the specification. Changes to relevancy are handled by
triggering updates in a set of `content-visibility: auto` frames stored
in PresShell at the appropriate time in the document lifecycle.

Some tests are now failing due to this feature exposing the failures,
but they will be fixed in later changes.

Co-authored-by: Jihye Hong <jihye@igalia.com>

Differential Revision: https://phabricator.services.mozilla.com/D159693
2022-11-28 09:53:06 +00:00
Emilio Cobos Álvarez
cc9d07ce0d Bug 1801517 - Remove nsPresContext::IsRootContentDocument(). r=hiro
The Element caller only cares about avoiding a flush and can use the
observable parent layout stuff.

The scrollframe one clearly wants the cross-process version according to
the comment.

Differential Revision: https://phabricator.services.mozilla.com/D162477
2022-11-21 08:04:58 +00:00
Emilio Cobos Álvarez
29c4f202d9 Bug 1801094 - Clean-up a bit WhereToScroll. r=layout-reviewers,credential-management-reviewers,sgalich,dshin
This doesn't change behavior, but clarifies a bit the naming to match
the scrollIntoView() API. Also makes the name generic (rather than
Top/Left/etc), since for scrollIntoView we want to make the axes be
logical.

That will be done in bug 1789464 (probably via an extra ScrollFlag).

Differential Revision: https://phabricator.services.mozilla.com/D162286
2022-11-18 10:02:23 +00:00
Olli Pettay
3e7651a9eb Bug 1799354 - MutationRecord missing for Element.replaceChildren, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D161548
2022-11-16 20:29:52 +00:00
Emilio Cobos Álvarez
12e596995e Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-08 02:36:25 +00:00
Sandor Molnar
93a6e1c506 Backed out changeset c7f5349824c4 (bug 1799435) for causing crashes in mozilla::dom::HTMLImageElement::LoadSelectedImage CLOSED TREE 2022-11-08 02:39:14 +02:00
Emilio Cobos Álvarez
79700d8de9 Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-07 22:23:50 +00:00
Iulian Moraru
281af99f4d Backed out changeset 44cb21194dc0 (bug 1799435) for causing multiple resist fingerprint related failures. CLOSED TREE 2022-11-07 18:42:11 +02:00
Emilio Cobos Álvarez
553deca383 Bug 1799435 - Make RFP checks faster. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D161447
2022-11-07 14:40:57 +00:00
Razvan Cojocaru
363946e17f Bug 1060421 - Change the type of [Int]PointTyped::[x|y] back to [Int]CoordTyped. r=botond
[Int]CoordTyped no longer inherits Units because otherwise
instances of [Int]IntPointTyped may get one Base subobject because
it inherits Units, and others because of BasePoint's Coord members,
which end up increasing the [Int]CoordTyped's objects size (since
according to the ISO C++ standard, different Base subobject are
required to have different addresses).

Differential Revision: https://phabricator.services.mozilla.com/D160713
2022-11-04 18:29:35 +00:00
Emilio Cobos Álvarez
f31e9a0231 Bug 1798218 - Ignore transitions for printing. r=hiro
Two tweaks:

 * Use nsPresContext::Medium to decide whether to start transitions.
   This catches both the print emulation and the before/afterprint event
   dispatching code too, which is desirable.

 * Don't clone transition effects for print docs. This seems to match
   other browsers (click "trigger transition", then Ctrl+P in Chromium
   for example).

Move our existing css-animations tests to WPT. They were written for
compat with other browsers so we want to know if other browsers behave
differently.

Differential Revision: https://phabricator.services.mozilla.com/D161086
2022-11-03 23:23:39 +00:00
Adam Vandolder
88882be017 Bug 1665151 - Part 2: Expose custom element default accessibility attributes. r=edgar,Jamie,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D159237
2022-11-02 14:50:56 +00:00
Csoregi Natalia
d8d093364f Backed out changeset 4edc81a94eaa (bug 1792057) for causing multiple failures. CLOSED TREE 2022-10-05 21:53:02 +03:00
Emilio Cobos Álvarez
01538095ba Bug 1792057 - Make sure to focus inner text field when creating / rebuilding edit fields in datetime widget. r=smaug
The blur is a regression from bug 1740989, but it's really uncovering a
regression from bug 1729342, sorta. Before that, we used to focus the
inner text field on rebuild via focusInnerTextBox().

One could argue that the focus fixup rule should really deal with this,
but I guess since content can't really unattach shadow DOM, it's less of
a general issue and more of an implementation detail.

The test uncovers another pre-existing issue (switching from date ->
test was also broken, and we left a bogus ElementState::FOCUS state in
the element).

Differential Revision: https://phabricator.services.mozilla.com/D158167
2022-10-05 17:31:51 +00:00