Commit graph

1486 commits

Author SHA1 Message Date
Markus Stange
d89c20090c Bug 1843484 - Use EventTarget* instead of nsISupports* for the event target parameter of the EventDispatcher::Dispatch methods. r=smaug
This saves a few QueryInterface calls on the hot path.

Differential Revision: https://phabricator.services.mozilla.com/D186977
2023-08-28 23:38:43 +00:00
Ziran Sun
9dac459535 Bug 1849689 - Initial steps on handling Esc key for popover. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186643
2023-08-28 07:47:24 +00:00
Narcis Beleuzu
0c70f2a736 Backed out 2 changesets (bug 1830820) for reftest failure on inline-block-slice-5.html . CLOSED TREE
Backed out changeset 941c44881781 (bug 1830820)
Backed out changeset da493ba4c9a6 (bug 1830820)
2023-08-15 18:55:44 +03:00
Sean Feng
c8985f4b39 Bug 1830820 - Add tests for user input delay handling r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186053
2023-08-15 13:55:57 +00:00
Sean Feng
65383b4b4e Bug 1830820 - Introduce some delays to user input handling r=smaug
In some edge cases, we may start handling user input events that
are not supposed to be handled by the current document.

This patch introduces some delay to handle user input events.

Differential Revision: https://phabricator.services.mozilla.com/D180976
2023-08-15 13:55:57 +00:00
Emilio Cobos Álvarez
dbbf7dc0fb Bug 1835864 - Make printing / paged mode deal with multiple canvas backgrounds properly. r=dholbert
The subdocument call when there's no root frame is silly, because we
won't find a canvas frame and we'll end up with transparent.

This needs to tweak the canvas frame construction code to make canvas
anon content show up on the "top" canvas, not on the page content
canvas.

This can be simplified now, because the reason we had to build canvas
anon content before processing kids of the root frame (bug 1558352) no
longer applies since I made popups regular out-of-flow elements
(bug 1799343).

Differential Revision: https://phabricator.services.mozilla.com/D179461
2023-08-10 12:59:00 +00:00
Masayuki Nakano
e4d8451468 Bug 1845904 - Make PresShell::EventHandler::HandleEventWithCurrentEventInfo stop flushing pending notifications if a query content event does not require that r=emilio
We've already known that `WidgetQueryContentEvent` is dispatched at initializing
a popup menu on macOS (bug 1530188).  Therefore, I made the dispatcher under
`widget/cocoa` set `WidgetQueryContentEvent::mNeedLayoutFlush` to `false` to
avoid to flush pending things in `ContentEventHandler`, but
`PresShell::EventHandler` does it.

Differential Revision: https://phabricator.services.mozilla.com/D185264
2023-08-07 05:24:20 +00:00
Emilio Cobos Álvarez
9aa60b822a Bug 1844241 - Remove now-dead graphics glass code. r=tnikkel,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D183942
2023-07-19 12:44:34 +00:00
Emilio Cobos Álvarez
bd1b363ff9 Bug 1824886 - Rewrite AnonymousContent to use a shadow tree. r=smaug,TYLin,sfoster,devtools-reviewers,nchevobbe
Subtle things:

 * We now have shadow trees in NAC, inception! Only a couple lines of
   code in the style system had to be changed to match :host rules and
   so properly.

 * Had to make highlighters.css contentaccessible, because otherwise we
   can't load it from the shadow tree. I don't think it's a big deal.

 * I removed some of the code from highlighters.css that claimed that
   stuff inherited from the html element. That's just no longer true.

 * Had to switch from `setAttribute("style", ...)` to `.style = ...;`.
   This is needed because CSSOM from chrome code bypasses CSP (as
   AnonymousContent did), but setAttribute() doesn't, see bug 1424474.

Differential Revision: https://phabricator.services.mozilla.com/D173998
2023-07-09 11:34:05 +00:00
Gregory Pappas
ada05ac4fa Bug 1759303 - Allow disabling Shift+Right Click force-opening the context menu r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D183075
2023-07-09 02:58:11 +00:00
Stanca Serban
15c8455338 Backed out changeset 1c835137f532 (bug 1824886) for causing multiple failures. CLOSED TREE 2023-07-06 02:11:59 +03:00
Emilio Cobos Álvarez
3338831b84 Bug 1824886 - Rewrite AnonymousContent to use a shadow tree. r=smaug,TYLin,sfoster,devtools-reviewers,nchevobbe
Subtle things:

 * We now have shadow trees in NAC, inception! Only a couple lines of
   code in the style system had to be changed to match :host rules and
   so properly.

 * Had to make highlighters.css contentaccessible, because otherwise we
   can't load it from the shadow tree. I don't think it's a big deal.

 * I removed some of the code from highlighters.css that claimed that
   stuff inherited from the html element. That's just no longer true.

 * Had to switch from `setAttribute("style", ...)` to `.style = ...;`.
   This is needed because CSSOM from chrome code bypasses CSP (as
   AnonymousContent did), but setAttribute() doesn't, see bug 1424474.

Differential Revision: https://phabricator.services.mozilla.com/D173998
2023-07-05 21:59:44 +00:00
Cosmin Sabou
fb92d5f42f Backed out 2 changesets (bug 1824886) for causing failures on browser_all_files_referenced.js. CLOSED TREE
Backed out changeset 650ef77d1c4d (bug 1824886)
Backed out changeset 1c835137f532 (bug 1824886)
2023-07-06 00:42:53 +03:00
Emilio Cobos Álvarez
454c0b932e Bug 1824886 - Rewrite AnonymousContent to use a shadow tree. r=smaug,TYLin,sfoster,devtools-reviewers,nchevobbe
Subtle things:

 * We now have shadow trees in NAC, inception! Only a couple lines of
   code in the style system had to be changed to match :host rules and
   so properly.

 * Had to make highlighters.css contentaccessible, because otherwise we
   can't load it from the shadow tree. I don't think it's a big deal.

 * I removed some of the code from highlighters.css that claimed that
   stuff inherited from the html element. That's just no longer true.

 * Had to switch from `setAttribute("style", ...)` to `.style = ...;`.
   This is needed because CSSOM from chrome code bypasses CSP (as
   AnonymousContent did), but setAttribute() doesn't, see bug 1424474.

Differential Revision: https://phabricator.services.mozilla.com/D173998
2023-07-05 18:21:31 +00:00
Peter Van der Beken
b52a207bb0 Bug 1522052 - remove nsIDOMChromeWindow. r=dom-core,webdriver-reviewers,devtools-reviewers,whimboo,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D34310
2023-06-23 14:21:05 +00:00
Tom Schuster
cac1e671bf Bug 1838415 - Introduce RFPTarget::WidgetEvents. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D180951
2023-06-21 07:01:22 +00:00
Neil Deakin
18f5e1220a Bug 1776339, add a browsing context field that syncs the isUnderHiddenEmbedderElement state, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D168440
2023-05-31 19:46:49 +00:00
Tom Schuster
b4c6e62b3c Bug 1834737 - Make RFPTarget parameter of Document::ShouldResistFingerprinting non-optional. r=tjr
Differential Revision: https://phabricator.services.mozilla.com/D178925
2023-05-31 09:46:54 +00:00
Emilio Cobos Álvarez
67b6c8dad6 Bug 1833733 - Properly detect page sequence background from FindEffectiveBackgroundColor. r=dholbert
And specify it since we don't look at gradients.

Differential Revision: https://phabricator.services.mozilla.com/D178476
2023-05-30 11:25:36 +00:00
Cosmin Sabou
b3f3b7cab8 Backed out changeset 12975d519459 (bug 1833733) for causing pagination reftest failures. CLOSED TREE 2023-05-19 17:19:56 +03:00
Emilio Cobos Álvarez
23020ca032 Bug 1833733 - Properly detect page sequence background from FindEffectiveBackgroundColor. r=dholbert
And specify it since we don't look at gradients.

Differential Revision: https://phabricator.services.mozilla.com/D178476
2023-05-19 12:42:22 +00:00
Hiroyuki Ikezoe
2b70168145 Bug 1764606 - Expand nsDisplaySolidColor's bounds including the dynamic toolbar area. r=botond,tnikkel,geckoview-reviewers,owlish
Differential Revision: https://phabricator.services.mozilla.com/D168913
2023-05-11 21:17:30 +00:00
Emilio Cobos Álvarez
3a99b7feb9 Bug 1831136 - Plumb android text scale via nsLookAndFeel. r=geckoview-reviewers,dholbert,owlish
That's how we do it for all other platforms. Do this rather than via a
custom mostly-untested pref, which allows us to simplify text zoom
handling.

Differential Revision: https://phabricator.services.mozilla.com/D177062
2023-05-11 19:01:19 +00:00
Emilio Cobos Álvarez
99eea56b5d Bug 1829137 - When sizing to content, ceil to CSS pixels. r=dholbert
Much like in bug 1620575. The front-end works with sizing in int CSS
pixels, so size to that so that there isn't a mismatch between our size
and the window size.

Differential Revision: https://phabricator.services.mozilla.com/D176359
2023-05-10 22:56:18 +00:00
Emilio Cobos Álvarez
8b5b7ad998 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
Cristian Tuns
f65f34399a Backed out 2 changesets (bug 1753565) for causing bc failures in browser_proton_moreTools_panel.js CLOSED TREE
Backed out changeset 817b0cf1e4e0 (bug 1753565)
Backed out changeset 947534ff1319 (bug 1753565)
2023-04-18 02:03:20 -04:00
Dan Robertson
e4776501d3 Bug 1753565 - Disable smooth scrolls if prefers-reduced-motion. r=botond
If the user has the prefers-reduced-motion system setting enabled, do
not enable smooth scrolls.

Differential Revision: https://phabricator.services.mozilla.com/D172446
2023-04-18 04:11:10 +00:00
Emilio Cobos Álvarez
2d0e69f4a1 Bug 1824957 - Remove a bunch of now completely dead XUL layout code. r=layout-reviewers,desktop-theme-reviewers,devtools-reviewers,dao,TYLin
And some related tests.

A bunch of -moz-box* properties are web exposed, so I'll file a
follow-up for hiding them.

Differential Revision: https://phabricator.services.mozilla.com/D173819
2023-03-29 21:23:55 +00:00
Jonathan Kew
5de5902b95 Bug 1822561 - Distinguish profiler markers for interruptible vs sync reflows. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D173636
2023-03-26 18:14:05 +00:00
Emilio Cobos Álvarez
cb2a32d8af Bug 1823455 - Merge ScrollFrameHelper and nsHTMLScrollFrame. r=layout-reviewers,TYLin
Now that we've removed nsXULScrollFrame, ScrollFrameHelper can be
subsumed under nsHTMLScrollFrame.

I want to do this before making scrollbars non-XUL.

Renaming to mozilla::ScrollFrame is left for a follow-up bug.

Differential Revision: https://phabricator.services.mozilla.com/D173063
2023-03-22 13:06:40 +00:00
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