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.
This reverts commit 782dcf9aee.
Revert "Bug 1829401 - Part 1: Implements Element.requestPointerLock() to return Promise<undefined>; r=smaug,webidl"
This reverts commit e4344e3d3c.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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