Commit graph

1456 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
5dfcee19a5 Bug 1600542 - Remove a few other no longer reachable XUL box special-cases. r=TYLin
The only XUL frames that remain are either scrollbars, or leafs. These are uses
that I'm pretty sure are no longer needed. There are a few others that will go
in the future.

Depends on D172874

Differential Revision: https://phabricator.services.mozilla.com/D172875
2023-03-20 23:56:03 +00:00
Dan Robertson
30e2548477 Bug 1168182 - Bind wheel event targets to wheel transactions. r=masayuki,smaug
- Create wheel transactions for wheel events handled by APZ.
 - Group wheel events with the current wheel transaction, so that all
   wheel events in a wheel transaction are fired to the same element.
 - Store the current event target for the first event in a wheel
   transaction to be used for subsequent events.
 - Add the dom.event.wheel-event-groups.enabled preference as a feature
   flag for this behavior.

Differential Revision: https://phabricator.services.mozilla.com/D163484
2023-03-20 12:19:36 +00:00
Robert Longson
4264460c99 Bug 367994 - Map all SVG styles to all non-animation SVG elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172590
2023-03-15 19:13:51 +00:00
Cosmin Sabou
f87f82e3b9 Backed out changeset 77efe6b04864 (bug 367994) for causing SVGLength animation wpt failures. CLOSED TREE 2023-03-15 17:11:05 +02:00
Robert Longson
23eb98ba93 Bug 367994 - Map all SVG styles to all non-animation SVG elements r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D172590
2023-03-15 13:27:02 +00:00
Dan Robertson
73fa554e54 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-27 21:09:06 +00:00
Csoregi Natalia
dd188e11f2 Backed out changeset 05981db2f726 (bug 1743045) for causing failures on test_group_scrollend.html. CLOSED TREE 2023-02-23 04:23:40 +02:00
Dan Robertson
8ac30ce878 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-22 23:26:18 +00:00
Iulian Moraru
a6d122dc1c Backed out changeset 2ddeecc9100b (bug 1168182) for causing mochitest failures on test_wheel_scroll.html. CLOSED TREE 2023-02-22 21:32:15 +02:00
Dan Robertson
e03ea6d72f Bug 1168182 - Bind wheel event targets to wheel transactions. r=masayuki,smaug
- Create wheel transactions for wheel events handled by APZ.
 - Group wheel events with the current wheel transaction, so that all
   wheel events in a wheel transaction are fired to the same element.
 - Store the current event target for the first event in a wheel
   transaction to be used for subsequent events.
 - Add the dom.event.wheel-event-groups.enabled preference as a feature
   flag for this behavior.

Differential Revision: https://phabricator.services.mozilla.com/D163484
2023-02-22 16:57:05 +00:00
Butkovits Atila
d434d2fc49 Backed out changeset c33204e69e49 (bug 1743045) for causing failures at scroll-behavior-3.html. CLOSED TREE 2023-02-22 01:15:14 +02:00
Dan Robertson
69572ca871 Bug 1743045 - Respect general.smoothScroll for programmatic scrolls. r=hiro
For programmatic scrolls, we should respect a users general.smoothScroll
preference. If smooth scrolls are disabled, programmatic scrolls with
behavior: "smooth" should be treated as instant programmatic scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D170110
2023-02-21 22:02:11 +00:00
Emilio Cobos Álvarez
e56553284e 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
Jonathan Kew
4594ae314a Bug 1815404 - Replace most uses of gfxContext::CreateOrNull with stack-allocated contexts. r=gfx-reviewers,lsalzman
Depends on D170370

Differential Revision: https://phabricator.services.mozilla.com/D170371
2023-02-21 07:28:25 +00:00
Jonathan Kew
1b3e69f8aa Bug 1815404 - Remove refcounting from gfxContext. r=gfx-reviewers,lsalzman
Depends on D170367

Differential Revision: https://phabricator.services.mozilla.com/D170369
2023-02-21 07:28:24 +00:00
Emilio Cobos Álvarez
3b2c7272b9 Bug 1817078 - Make allocated pointer tracking DEBUG-only. r=dholbert
It's helpful to catch issues, but I don't think we get much value in
return in practice.

Differential Revision: https://phabricator.services.mozilla.com/D170135
2023-02-16 23:58:27 +00:00
Otto Länd
1300d5eab1 Bug 1444491, 1801761: apply code formatting via Lando
# ignore-this-changeset
2023-02-15 20:11:59 +00:00
Sean Feng
485ad202a5 Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug
Spec: https://html.spec.whatwg.org/#the-autofocus-attribute

Differential Revision: https://phabricator.services.mozilla.com/D160127
2023-02-15 20:08:36 +00:00
Csoregi Natalia
fc752aa9f0 Backed out 7 changesets (bug 1444491, bug 1801761) for causing failures on autofocus-attribute.svg. CLOSED TREE
Backed out changeset 1cee414009cb (bug 1444491)
Backed out changeset 30f786b79191 (bug 1444491)
Backed out changeset ce06375518a7 (bug 1801761)
Backed out changeset 64c8bb293e5c (bug 1444491)
Backed out changeset 94aa0ce630f2 (bug 1444491)
Backed out changeset 80010eabc0c1 (bug 1444491)
Backed out changeset 7d8da1f44177 (bug 1444491)
2023-02-15 19:03:59 +02:00
Otto Länd
60fb43cbe2 Bug 1444491, 1801761: apply code formatting via Lando
# ignore-this-changeset
2023-02-15 14:19:45 +00:00
Sean Feng
6242b4e0ac Bug 1444491 - Update the autofocus steps to align with the spec r=emilio,smaug
Spec: https://html.spec.whatwg.org/#the-autofocus-attribute

Differential Revision: https://phabricator.services.mozilla.com/D160127
2023-02-15 14:13:40 +00:00
Emilio Cobos Álvarez
be40d4df76 Bug 1814668 - Fix viewport size invalidation on MVM changes. r=hiro
The MVM doesn't change the document viewer bounds nor the view manager
bounds (maybe it used to?). Right now when exiting RDM, depending on the
order of operations (if MVM reset is the last thing to happen) we end up
with a wrong viewport size, because nsDocShell::SetSize is
short-circuited here[1].

Instead, force a resize reflow with the current dimensions which is what
the dynamic toolbar code also does, for example.

[1]: https://searchfox.org/mozilla-central/rev/5ccb73c0217d1710b10d6e6e297cf3396d10ec23/view/nsViewManager.cpp#172

Differential Revision: https://phabricator.services.mozilla.com/D169806
2023-02-15 13:58:40 +00:00
Nazım Can Altınova
3c14a0bff0 Bug 1812368 - Truncate the URLs we are passing into profiler markers r=julienw
Differential Revision: https://phabricator.services.mozilla.com/D169053
2023-02-09 10:16:51 +00:00
Emilio Cobos Álvarez
2e7a582438 Bug 1813960 - Move nsContainerFrame::SyncWindowProperties to PresShell. r=smaug
It's a more natural place for it to live, since it concerns only the
root view.

Clean up a bit while at it, and factor out the window size constraints,
which we're going to use momentarily.

Differential Revision: https://phabricator.services.mozilla.com/D168461
2023-02-02 13:37:02 +00:00
Tom Schuster
87ff1c1ea1 Bug 1810959 - Use precise RFP check for PresShell::EventHandler::DispatchEventToDOM. r=masayuki,tjr
Differential Revision: https://phabricator.services.mozilla.com/D167137
2023-01-25 08:39:22 +00:00
Emilio Cobos Álvarez
9e530f224a Bug 1811834 - Clean up nsWidgetInitData. r=cmartin,geckoview-reviewers,calu
Move it to the mozilla::widget namespace.

Use enum classes for transparency, popup type, popup level, etc.

Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).

Differential Revision: https://phabricator.services.mozilla.com/D167537
2023-01-23 23:58:41 +00:00
Emilio Cobos Álvarez
4f1f5e7314 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
38556e307d 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
9807a6e6e8 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
3d82727505 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
Olli Pettay
5d21de32ac Bug 1807812 - Remove WidgetEventTime::mTime, r=masayuki,geckoview-reviewers,m_kato
HTMLSelectEventListener changes are needed, since currently that code works somewhat by accident given that
mTime often contains totally bogus values, like PR_IntervalNow(). Those changes then reveal issues also in
browser_editAddressDialog.js.

Differential Revision: https://phabricator.services.mozilla.com/D165618
2023-01-02 12:31:40 +00:00
Timothy Nikkel
a7a1533b7c Bug 1807909. Make PresShell::MarkFramesInSubtreeApproximatelyVisible correctly pass down aRemoveOnly parameter on recursive calls. r=emilio
Noticed this while looking at something else.

Differential Revision: https://phabricator.services.mozilla.com/D165675
2022-12-29 11:53:49 +00:00
Otto Länd
66a5d85c88 Bug 1806905, 1797752: apply code formatting via Lando
# ignore-this-changeset
2022-12-29 10:04:15 +00:00
Emilio Cobos Álvarez
f27d2f89cc Bug 1797752 - Make sure container queries make forward progress. r=Oriol
Instead of keeping a set of frames to update, keep a depth-ordered frame
list. Factor out the DirtyRootList for this.

Make sure that we're updating ancestor containers before children, and
make sure to store the last container state even if we end up not
updating (due to the element being in mUpdatedContainerQueryContents),
so that following layouts are stable.

This fixes the timeout in inline-size-bfc-floats, and the same kind of
instability in auto-scrollbars.html (if you take a profile of that test
you can see us infinitely recursing), as well as fixing various other
tests.

It causes a regression in nested-query-containers.html, probably to do with
ib-splits (since it's a block inside an inline and so on, and the frame
tree depth doesn't match the content tree depth, most likely). That
might need extra tweaks but it doesn't seem terribly concerning, so I'd
rather get this in.

Differential Revision: https://phabricator.services.mozilla.com/D165628
2022-12-29 10:01:22 +00:00
Emilio Cobos Álvarez
1685b6684a Bug 1806905 - Tweak reflow callback set-up to deal with container query reentrancy. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165611
2022-12-29 10:01:22 +00:00
Sandor Molnar
8358f58c22 Backed out changeset a878a69335a2 (bug 1806905) for causing reftest failures in layout/reftests/bugs/751012-1a.html 2022-12-29 01:06:34 +02:00
Sandor Molnar
d2d4edf4c4 Backed out changeset 8121bf2bc0eb (bug 1806905) for causing wpt failures in /css/css-contain/container-queries/auto-scrollbars.html CLOSED TREE 2022-12-29 00:02:58 +02:00
Emilio Cobos Álvarez
1abd5f56a9 Bug 1806905 - Deal with reflow callbacks triggered by other reflow callback flushes.
MANUAL PUSH: Fixes some orange CLOSED TREE
2022-12-28 19:32:39 +01:00
Emilio Cobos Álvarez
a98432a944 Bug 1806905 - Tweak reflow callback set-up to deal with container query reentrancy. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D165611
2022-12-28 17:46:44 +00:00
Botond Ballo
2d0aaf3a2d Bug 1519339 - Reclamp the visual viewport offset in SetresolutionAndScaleTo(). r=tnikkel
Depends on D161351

Differential Revision: https://phabricator.services.mozilla.com/D163532
2022-12-09 09:01:42 +00:00
Martin Robinson
abb5044ca7 Bug 1803377 - Rename the values of the IntrinsicDirty enum r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D163607
2022-12-02 12:27:31 +00:00
Martin Robinson
281ff8ade5 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
Botond Ballo
68c71a503c Bug 1802225 - Remove Layers.{h,cpp}. r=tnikkel,geckoview-reviewers,jgilbert,media-playback-reviewers,padenot,m_kato
Where appropriate, `#include "Layers.h"` is replaced with
more specific inclusions.

Differential Revision: https://phabricator.services.mozilla.com/D162934
2022-11-29 01:52:03 +00:00
Marian-Vasile Laza
f4d4ce0e21 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
e26b2a32b9 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
4c6d8f0273 Bug 1798396 - Remove appearance: -moz-win-glass, which is unused. r=tnikkel
This we don't need to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D162535
2022-11-22 10:56:38 +00:00
James Teh
6c0098d405 Bug 1801433: Remove PresShell::GetAccessibilityService/IsAccessibilityActive. r=emilio
These have just called GetAccService for a long time now, so callers should just call that directly.

Differential Revision: https://phabricator.services.mozilla.com/D162449
2022-11-19 23:04:08 +00:00
James Teh
eb1f9b4447 Bug 1800731: When a shadow root is attached, schedule removal of any unslotted a11y children in the host. r=morgan,emilio
PruneOrInsertSubtree already has code to deal with this.
However, layout previously didn't notify a11y about the change if a shadow root was attached without any content, so PruneOrInsertSubtree was never called.
We now schedule re-evaluation of the a11y tree of the shadow host when DOM notifies layout about the attached shadow root.
This will call PruneOrInsertSubtree during the next refresh tick.

Differential Revision: https://phabricator.services.mozilla.com/D162263
2022-11-19 01:31:57 +00:00
Emilio Cobos Álvarez
486040e135 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
Timothy Nikkel
1358ce8ff1 Bug 1799425. Only set checkboard flag when adding background color item for root content document. r=emilio
Webrender uses this flag as a hint to separate mix blend containers so it should only be present on the root content document.

Differential Revision: https://phabricator.services.mozilla.com/D162046
2022-11-15 23:03:49 +00:00