Commit graph

1507 commits

Author SHA1 Message Date
Cathie Chen
5046f7ee73 Bug 1668136 - Set visible the content relevancy of an element with content-visibility:auto if its descendant is called scrollIntoView, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D186943
2023-10-31 01:38:16 +00:00
Adam Brouwers-Harries
a26eafe5c3 Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-24 15:18:12 +00:00
Narcis Beleuzu
948c7279ee Backed out changeset 714aaf6484fb (bug 1421651) for causing Bug 1860719. CLOSED TREE 2023-10-24 17:31:02 +03:00
Adam Brouwers-Harries
4cdf967b4e Bug 1421651 - Remove obseleted timeline and TimelineMarker code r=canaltinova,webidl,devtools-reviewers,saschanaz,smaug,ochameau
This patch removes the old docshell timeline and timeline markers codebase and replaces them with equivalent Gecko profiler marker. This patch also fixes Bug 1834143, which is a subset of 1421651.

Differential Revision: https://phabricator.services.mozilla.com/D184217
2023-10-23 13:55:50 +00:00
Sylvestre Ledru
d0f6c7fc66 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
6a90f5eded 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
cc8a0ee742 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
Emilio Cobos Álvarez
56346e9adf Bug 1857915 - Remove about:PreferenceStyleSheet. r=morgan,devtools-reviewers,nchevobbe
These days, after bug 1853323, about:PreferenceStyleSheet is basically
just an empty sheet for most users. For the ones that isn't, it's either
slightly or completely broken (see below).

If we were to implement this today, we'd do it with privileged env()
variables or media queries, and add a bunch of tests for different
combinations, but I don't think it's worth the effort:

 * There's no UI for any of these prefs.

 * There are no tests for any of these prefs.

 * browser.display.focus_ring_or_anything is not great, it's better
   replaced by browser.display.show_focus_rings, which actually makes
   the :focus-visible pseudo-class work. Otherwise the native controls
   may show no rings even though this pref is set.

 * for browser.display.focus_ring_style = 0, the color used
   (-moz-mac-focusring) is not implemented in any non-macOS platform.

 * The ::-moz-focus-inner rules are completely useless nowadays, because
   ::-moz-focus-inner only works on the windows native theme (which
   isn't used on content).

 * The focus colors are not color-scheme aware.

So given those, and that if you want the specific current behavior,
these are trivially implementable as a web extension (by using a user
stylesheet), I think we should just remove this code altogether.

Differential Revision: https://phabricator.services.mozilla.com/D190464
2023-10-11 17:47:50 +00:00
Emilio Cobos Álvarez
25c0d10932 Bug 1624819 - Remove TaskCategory and other quantum dom remnants. r=smaug,media-playback-reviewers,credential-management-reviewers,cookie-reviewers,places-reviewers,win-reviewers,valentin,mhowell,sgalich,alwu
Sorry this is not a particularly easy patch to review. But it should be
mostly straight-forward.

I kept Document::Dispatch mostly for convenience, but could be
cleaned-up too / changed by SchedulerGroup::Dispatch. Similarly maybe
that can just be NS_DispatchToMainThread if we add an NS_IsMainThread
check there or something (to preserve shutdown semantics).

Differential Revision: https://phabricator.services.mozilla.com/D190450
2023-10-10 08:51:12 +00:00
Masayuki Nakano
b8f3f296ed Bug 1844723 - Make CreateMouseOrPointerWidgetEvent() set mButton to "not pressed" value and compute mButtons if the source event has not been dispatched yet r=edgar,dom-core
`CreateMouseOrPointerWidgetEvent()` is designed to create `mouseenter`,
`mouseover`, `mouseout`, `mouseleave`, `pointerenter`, `pointerover`,
`pointerout` and `pointerleave` from a source event.

They are not button state change events, but the source event may be so.

According to the WPTs ([1], [2]) and the fact that the other browsers pass the
tests, the button state of pointer events of synthesizing events should be
synchronized with what the web apps notified (i.e., previous state of the
source event) if and only if the input source supports hover state and the
source event which changes a button state has not been dispatched into the DOM
yet.

1. https://searchfox.org/mozilla-central/rev/08d53deb2cf587e68d1825082c955e8a1926be73/testing/web-platform/tests/pointerevents/pointerevent_attributes_hoverable_pointers.html#44,51,60,63
2. https://searchfox.org/mozilla-central/rev/08d53deb2cf587e68d1825082c955e8a1926be73/testing/web-platform/tests/pointerevents/pointerevent_attributes_nohover_pointers.html#17,45,47,51

Differential Revision: https://phabricator.services.mozilla.com/D187644
2023-10-10 07:33:05 +00:00
Emilio Cobos Álvarez
432004fe4e Bug 1857073 - Remove ResizeObserverController. r=surkov,smaug
These days it's just a very thin wrapper over an nsTArray of
ResizeObservers. We also schedule notifications for resize observations
for the whole BrowsingContext tree at once, so there's no point on
individually keep track of them.

Differential Revision: https://phabricator.services.mozilla.com/D190113
2023-10-05 12:11:56 +00:00
Jan Varga
c458754592 Bug 1855134 - Move existing MOZ_TRY macros to a dedicated header file; r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D189226
2023-09-28 20:46:07 +00:00
Dan Robertson
baa1ce9de8 Bug 1816473 - Fix event reference point handling in accessible caret check. r=edgar
If an event will not be handled by accessible caret, do not use the
event reference point that may have been modified by event retargetting.
Restore the original reference point.

Depends on D185327

Differential Revision: https://phabricator.services.mozilla.com/D187896
2023-09-25 19:13:08 +00:00
Gregory Pappas
ce9f61c539 Bug 1854546 - Remove dom.focus.fixup pref r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D188929
2023-09-22 16:06:27 +00:00
Gregory Pappas
321f6d0ea4 Bug 1853832 - Remove dom.mouseevent.click.hack.use_legacy_non-primary_dispatch pref r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D188638
2023-09-20 08:38:04 +00:00
Emilio Cobos Álvarez
9dc286ae62 Bug 1847929 - Remove OOPIF activity grace period. r=smaug
This massive hack shouldn't be needed after the previous patch, and
throttling of in-process and out-of-process should be consistent now.

Differential Revision: https://phabricator.services.mozilla.com/D185809
2023-09-06 11:15:45 +00:00
Sean Feng
30faa0076d Bug 1830820 - Add tests for user input delay handling r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186053
2023-09-05 18:28:53 +00:00
Sean Feng
6721383752 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-09-05 18:28:52 +00:00
Iulian Moraru
1007c47c48 Backed out 2 changesets (bug 1830820) for causing marionette failures on test_actions_wheel.py. CLOSED TREE
Backed out changeset e930161a5935 (bug 1830820)
Backed out changeset 4df110e417d4 (bug 1830820)
2023-08-31 20:55:06 +03:00
Sean Feng
d7592d5abe Bug 1830820 - Add tests for user input delay handling r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D186053
2023-08-31 15:56:47 +00:00
Sean Feng
cd954eaa9f 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-31 15:56:47 +00:00
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