Commit Graph
477 Commits
Author SHA1 Message Date
velzie 7dd8e3d2f8 wr and jit pt 1 2026-06-16 19:20:10 -04:00
velzie 673a67963e initial commit for wasm work 2026-06-15 19:20:19 -04:00
Tom Schuster 3fec848f3e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301261
2026-06-01 14:01:36 +00:00
Tom Schuster 5fb4496e9e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301246
2026-06-01 14:01:33 +00:00
Tom Schuster eb77d9c97a Bug 2039903 - Use proper types for PBrowser::SynthesizeNativeMouseEvent. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D300803
2026-06-01 14:01:31 +00:00
Tom Schuster 86424bc2fa Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D300802
2026-06-01 14:01:29 +00:00
rperta 700e284d7c Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll" for causing build bustages
This reverts commit 312ba34b1e.

Revert "Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll"

This reverts commit cdcd922a07.

Revert "Bug 2039903 - Use proper types for PBrowser::SynthesizeNativeMouseEvent. r=masayuki"

This reverts commit 45369938ed.

Revert "Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll"

This reverts commit 479f174ddb.
2026-06-01 11:32:48 +00:00
Tom Schuster 312ba34b1e Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeMouseScrollEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301261
2026-06-01 10:06:07 +00:00
Tom Schuster cdcd922a07 Bug 2039903 - Use nsIWidget::NativeModifiers for SynthesizeNativeKeyEvent. r=masayuki,win-reviewers,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D301246
2026-06-01 10:06:05 +00:00
Tom Schuster 45369938ed Bug 2039903 - Use proper types for PBrowser::SynthesizeNativeMouseEvent. r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D300803
2026-06-01 10:06:03 +00:00
Tom Schuster 479f174ddb Bug 2039903 - Change from nsIWidget::Modifiers to nsIWidget::NativeModifiers. r=masayuki,geckoview-reviewers,win-reviewers,m_kato,gstoll
Differential Revision: https://phabricator.services.mozilla.com/D300802
2026-06-01 10:06:01 +00:00
Edgar Chen 90143df1b5 Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first; r=webidl,smaug,mstange
Co-authored-by: Edgar Chen <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D297193
2026-05-10 07:05:18 +00:00
Cosmin Sabou 53bb72f274 Revert "Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first; r=webidl,smaug,mstange" for causing failures on pointerlock-maintains-mousedown.html.
This reverts commit 782dcf9aee.

Revert "Bug 1829401 - Part 1: Implements Element.requestPointerLock() to return Promise<undefined>; r=smaug,webidl"

This reverts commit e4344e3d3c.
2026-05-08 21:17:50 +00:00
Edgar ChenandNoah Peterson 782dcf9aee Bug 1829401 - Part 2: Support unadjustedMovement option and implement on macOS first; r=webidl,smaug,mstange
Co-authored-by: Noah Peterson <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D297193
2026-05-07 23:39:54 +00:00
Sylvestre Ledru 6fd783649e Bug 2036402 - Apply std::move in widget where values can be moved instead of copied r=win-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D298104
2026-05-04 19:01:26 +00:00
Jamie Nicol 8e99051731 Bug 2028516 - Ensure WebRenderLayerManager's mWrChild cannot be null. r=gfx-reviewers,lsalzman
Future patches to make WebRenderLayerManager able to be initialised
asynchronously will be made simpler if we can rely on mWrChild always
being non-null. This patch achieves this by moving the first part of
Initialize(), which creates the WebRenderBridgeChild, to a static
Create() function, which then passes the non-null WebRenderBridgeChild
to the constructor. Some existing but now redundant null checks are
removed.

Unfortunately there is a chicken or egg problem, as
WebRenderLayerManager::Create() requires a pointer to the
CompositorBridgeChild, but the CompositorBridgeChild is created by the
CompositorSession which requires the WebRenderLayerManager in order to
call CompositorBridgeChild::InitForWidget().

To solve this we remove the WebRenderLayerManager argument from
CompositorBridgeChild::InitForWidget(), and instead have the widget
call the function CompositorBridgeChild::CreateLayerManager() to
obtain the layer manager.

Differential Revision: https://phabricator.services.mozilla.com/D291522
2026-04-02 11:49:01 +00:00
Josh Aas dad2010a77 Bug 1525379 - Fix issue causing the incorrect reporting of screen resolutions to web content. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D287283
2026-03-26 05:18:12 +00:00
Sylvestre Ledru 4f6b8b516d Bug 2023419 - Remove Emacs/Vim modelines from widget/ r=emilio
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287877
2026-03-16 17:22:02 +00:00
LIU Xinyu b99253dfd8 Bug 2018858 - Move PerformHapicFeedback to nsIWidget r=geckoview-reviewers,layout-reviewers,emilio,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D285391
2026-03-09 09:09:18 +00:00
Masayuki Nakano 57daabe7f5 Bug 2019547 - Use ContiguousEnumSerializerInclusive more at receiving/sending IME messages r=m_kato,geckoview-reviewers,win-reviewers,gstoll
We should use `ContiguousEnumSerializerInclusive` to receive/send an
`enum` value.

`IMENotificationRequests` has an enum whose values are used as bit
field. So, we can use `EnumSet` for it and then, we don't need to write
`ParamTraits` for it directly.

Differential Revision: https://phabricator.services.mozilla.com/D285200
2026-03-05 02:34:56 +00:00
Emilio Cobos Álvarez f465bef00d Bug 2006320 - Clean up WindowMoved / WindowResized to use typed units. r=win-reviewers,gstoll
Make sure that we notify of outer position and inner sizes.

Differential Revision: https://phabricator.services.mozilla.com/D276645
2025-12-16 22:27:48 +00:00
Emilio Cobos Álvarez 1d93d8f2ae Bug 337801 - Rename nsView to PresShellWidgetListener, and remove the view/ dir. r=jwatt
Since that's what it does now. Also clean-up a little bit while at it.

Differential Revision: https://phabricator.services.mozilla.com/D274410
2025-11-28 15:07:09 +00:00
Emilio Cobos Álvarez d7598a4a4a Bug 2002232 - Clean up top level widget painting. r=jwatt
Turns out this PaintSynchronously() call is needed, however we can do
better and centralize all the painting in a single PaintWindow():

 * DidPaintWindow is not needed, it's only used to dispatch an observer
   notification for testing.

 * WillPaintWindow and PaintWindow can be unified. Both can already run
   script in practice, and toplevel window bounds and widget bounds
   shouldn't change here anyways nowadays, since we recompute widget
   bounds only during the rendering loop.

Differential Revision: https://phabricator.services.mozilla.com/D273997
2025-11-27 08:52:20 +00:00
Cosmin Sabou 4e8d566344 Revert "Bug 2002232 - Clean up top level widget painting. r=jwatt" for causing failures on browser_startup.js
This reverts commit 0c8a58a9fe.
2025-11-27 01:58:24 +00:00
Emilio Cobos Álvarez 0c8a58a9fe Bug 2002232 - Clean up top level widget painting. r=jwatt
Turns out this PaintSynchronously() call is needed, however we can do
better and centralize all the painting in a single PaintWindow():

 * DidPaintWindow is not needed, it's only used to dispatch an observer
   notification that can be done async (and it's only for talos tests).

 * WillPaintWindow and PaintWindow can be unified. Both can already run
   script in practice, and toplevel window bounds and widget bounds
   shouldn't change here anyways nowadays, since we recompute widget
   bounds only during the rendering loop.

Differential Revision: https://phabricator.services.mozilla.com/D273997
2025-11-26 22:48:05 +00:00
Emilio Cobos Álvarez 6851c1266d Bug 2000153 - Clean up paint listener set-up. r=tnikkel,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D272734
2025-11-17 04:28:22 +00:00
Emilio Cobos Álvarez 79e3fdc22a Bug 2000153 - Clean up widget event dispatch. r=masayuki
Make all nsIWidgetListener::HandleEvent go through a single
nsIWidget::DispatchEvent().

Differential Revision: https://phabricator.services.mozilla.com/D272601
2025-11-17 04:28:20 +00:00
Emilio Cobos Álvarez ae9c84efa9 Bug 1999867 - Remove some more nsView usage outside of view. r=tnikkel,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D272383
2025-11-14 02:59:30 +00:00
Emilio Cobos Álvarez 18be90ee9f Bug 1994942 - Don't use views for subdocs. r=tnikkel,jwatt
This allows to clean up even more view code, since views now are just a
link between layout and widget at the root and little else (so the whole
view children and so on can go), but that will be done in separate
patches since these patches are not risk-free.

Notable changes:

 * PresShell::WillPaint() now recurses into subdocuments. That was done
   previously via CallWillPaintOnObservers().
 * Embedder frame is tracked directly by nsSubDocumentFrame an
   PresShell. It might be possible to simplify this further,
   if bug 1997773 sticks.

Differential Revision: https://phabricator.services.mozilla.com/D232057
2025-11-11 07:33:01 +00:00
Andrew Osmond bcf14f680d Bug 1992857 - Avoid disabling GPU process when backgrounded on Android. r=jnicol
This patch makes it so that we silently fail to setup the GPU process
and its associated IPDL actors on Android when we are in the background.
This is because Android limits our ability to keep a GPU process when
backgrounded, and the higher levels should have an ability to recover
from this situation for content processes when brought back into the
foreground. It also resets the unstable and launch attempt counters when
the fore/background state changes to be more forgiving of GPU process
crashes during the transitions.

When the GPU process is relaunched, it will also destroy the fallback
renderers created on Android, so that the next paint will properly
request remote compositing.

Differential Revision: https://phabricator.services.mozilla.com/D267679
2025-11-04 23:34:42 +00:00
serge-sans-paille 7662b3abdc Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 19:36:01 +00:00
Cristina Horotan 8a1b1970b7 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing Gtest failures on AlreadyAddRefed.h
This reverts commit e98adca292.
2025-10-21 16:16:29 +00:00
serge-sans-paille e98adca292 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 15:05:17 +00:00
Cristina Horotan aab924e90d Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing build bustage at nsBrowserApp.cpp
This reverts commit fd0ffa193c.
2025-10-21 10:44:13 +00:00
serge-sans-paille fd0ffa193c Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 09:44:11 +00:00
Narcis Beleuzu e1e6bbb1c9 Revert "Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch" for causing bustages on Document.cpp
This reverts commit b23c15e927.
2025-10-21 06:34:58 +00:00
serge-sans-paille b23c15e927 Bug 1994397 - Remove obsolete Unused.h header r=emilio,tschuster,geckoview-reviewers,extension-reviewers,application-update-reviewers,media-playback-reviewers,webrtc-reviewers,cookie-reviewers,places-reviewers,profiler-reviewers,win-reviewers,dom-storage-reviewers,permissions-reviewers,profiles-reviewers,toolkit-telemetry-reviewers,firefox-style-system-reviewers,firefox-svg-reviewers,layout-reviewers,timhuang,gstoll,TravisLong,bytesized,mstange,karlt,robwu,pehrsons,m_kato,jari,jhirsch
It is replaced by a standard-conforming cast to (void) which is
understood the same by the compiler.

In some cases this could be replaced by `[[maybe_unused]]` but for
expression whose value is ignored, this requires storing to a temporary
variable first, so not going that way.

One notable change is that marking an object of type already_AddRefed as
unused used to implicitly leak memory. This is now made explicit.

Most of the heavy lifting was done through:

    $ git grep -l '\<Unused\> <<' | xargs sed -i -e 's/Unused << /(void)/g'
    $ git grep -l mozilla/Unused.h | xargs sed -i -e '/mozilla\/Unused.h/ d'

Differential Revision: https://phabricator.services.mozilla.com/D268706
2025-10-21 06:01:36 +00:00
Emilio Cobos Álvarez d2eb173cee Bug 1995049 - Simplify widget move/resize APIs. r=stransky,mac-reviewers,mstange
We no longer have child windows which means that all widgets use desktop
pixels. Make the type system enforce that.

We want to start storing coordinates in DesktopPixels for GTK, to deal
correctly with fractional scaling, so move mBounds to the relevant
subclasses.

There's no behavior change. Some of the changes uncover coordinate
system confusions in Windows that I plan to fix in followups.

Android / iOS / PuppetWidgets don't care about the coordinate
differences, because their DesktopToLayoutDeviceScale is 1.0. Still I
made puppet widgets go through the coordinate conversion because it
seemed easier than casting or what not.

Differential Revision: https://phabricator.services.mozilla.com/D269091
2025-10-17 23:33:52 +00:00
Emilio Cobos Álvarez 5d95a0922d Bug 1994893 - Avoid null InitData in widget init. r=mac-reviewers,geckoview-reviewers,bradwerth,m_kato
widget/cocoa was already dereferencing without checking. There were two
callers with null init data which were for headless / puppet widgets,
but this is clearer.

Differential Revision: https://phabricator.services.mozilla.com/D268978
2025-10-17 08:10:05 +00:00
Emilio Cobos Álvarez cc2759f7e5 Bug 1994157 - Remove nsBaseWidget. r=stransky,win-reviewers,gstoll
The distinction between nsBaseWidget and nsIWidget is useless as all our
implementations use the former.

So just merge both.

Differential Revision: https://phabricator.services.mozilla.com/D268518
2025-10-14 15:19:51 +00:00
Emilio Cobos Álvarez 620fe9af60 Bug 1977851 - PuppetWidget::mVisible should not start to true. r=vhilla
That's how all other widgets behave, and seems green on try.

Differential Revision: https://phabricator.services.mozilla.com/D257720
2025-07-21 16:36:13 +00:00
longsonr a0357fea68 Bug 1978310 - Simplify some nsRegion usage r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D257994
2025-07-21 16:34:09 +00:00
Andrew McCreight b67406d5a0 Bug 1976562 - Remove WidgetToTopLevelWidgetTransform for being very frequent. r=emilio
Also, reverse the test to avoid calling GetOwningBrowserChild() twice.

Differential Revision: https://phabricator.services.mozilla.com/D256879
2025-07-11 17:41:13 +00:00
Edgar Chen ecbdba93e3 Bug 1968352 - Stop using nsIObserver in nsIDOMWindowUtils.sendNative*Event; r=masayuki,smaug,geckoview-reviewers,hiro
The observer is always notified with null subject and data, and use different
topics for different events, but not all call sites check the topic. So it could
be just a callback with no arguments, would also clean up the code a bit.

Differential Revision: https://phabricator.services.mozilla.com/D251080
2025-06-03 09:47:52 +00:00
Edgar Chen 49b512ad44 Bug 1968362 - Get rid of nsIDOMWindowUtils.clearNativeTouchSequence(); r=masayuki
It was introduced in bug 941774 for tesing purposes, but it’s no longer used by anyone.

Differential Revision: https://phabricator.services.mozilla.com/D251084
2025-05-26 20:10:24 +00:00
Hiroyuki Ikezoe 6b4247687a Bug 1941175 - Make nsIDOMWindowUtils.getLayersId work for popup window. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D234226
2025-01-16 01:59:17 +00:00
Alexandru Marc 3678a3f430 Backed out 5 changesets (bug 1941175) for causing reftest failures @ details-display-inline.html CLOSED TREE
Backed out changeset e908e40ae014 (bug 1941175)
Backed out changeset f0ddddc22390 (bug 1941175)
Backed out changeset 7e16ac152467 (bug 1941175)
Backed out changeset e5ff999da3c5 (bug 1941175)
Backed out changeset 1509d43843a0 (bug 1941175)
2025-01-16 07:56:47 +02:00
Hiroyuki Ikezoe 5e5cc6a2ea Bug 1941175 - Make nsIDOMWindowUtils.getLayersId work for popup window. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D234226
2025-01-16 01:59:17 +00:00
Emilio Cobos Álvarez 30929e04af Bug 1930476 - Improve units in nsFrameLoader and related code. r=geckoview-reviewers,jwatt,ohall
Use LayoutDevice units for most these things, since it's what they are:

  ScreenIntSize(presContext->AppUnitsToDevPixels(size.width), ...

Is clearly a lie :)

Differential Revision: https://phabricator.services.mozilla.com/D228586
2024-11-12 15:16:50 +00:00
Emilio Cobos Álvarez 8955f5a673 Bug 1924240 - Devirtualize parent handling. r=mac-reviewers,win-reviewers,geckoview-reviewers,bradwerth,m_kato,rkraesig
Move mParent to nsIWidget.h along with kids and so on. Instead of
ReparentNativeWidget add a more general DidChangeParent method.

Make mParent weak to prevent cycles. These are broken on Destroy() but
it feels kinda silly, and we were inconsistent before I started this
effort so pretty sure it can be done.

Differential Revision: https://phabricator.services.mozilla.com/D225796
2024-10-22 20:25:18 +00:00