This patch is similar to part 4 but for MediaSessionSupport.
Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.
Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.
Differential Revision: https://phabricator.services.mozilla.com/D88088
This patch is similar to part 4 but for `GeckoEditableSupport`.
Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.
Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.
Differential Revision: https://phabricator.services.mozilla.com/D87364
These conversions are pretty straight forward thanks to the type system.
Basically we take a `NativeWeakPtr`, call `Access()` on it, and if the
accessor is truthy, then we call whatever methods we need to call.
Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.
Differential Revision: https://phabricator.services.mozilla.com/D87363
* Having `AndroidView` and `GeckoViewSupport` as nested classes inside of
`nsWindow` make it impossible to forward declare them. We move those classes
into their own headers. We also move `WindowEvent` into its own header.
* We remove the old `NativePtr` and `WindowPtr` implementations from `nsWindow`
and convert the class definitions in this patch to use the new `NativeWeakPtr`.
* `GeckoViewSupport` had a unique quirk where it was owned by `nsWindow`
instead of its Java counterpart. To make `GeckoViewSupport`'s ownership work
like the other classes that use `NativeWeakPtr` (and to substantially simplify
the implementation of `NativeWeakPtr` itself), I have reversed that: now
`nsWindow` holds a `NativeWeakPtr` to `GeckoViewSupport`, while
`GeckoViewSupport` is owned by its Java counterpart and holds a strong ref to
the `nsWindow`.
* `GeckoViewSupport` no longer inherits from `SupportsWeakPtr`, since using it
with `NativeWeakPtr` provides stronger and safer guarantees.
Differential Revision: https://phabricator.services.mozilla.com/D87362
* We rename the existing `NativePtr` struct to `NativePtrTraits`, as that is
more descriptive of what that code actually does;
* We introduce `NativeWeakPtr` as a smart pointer type that holds a pointer
to an object and allows its access in a thread-safe way. See comments.
* We replace some explicit uses of template types with type deduction via
`auto` and `decltype(auto)`. This allows for more use of forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D87361
This pauses composition when a window becomes fully occluded.
This is particularly important for platforms like macOS, where minimized /
hidden windows historically would remain compositing, potentially on every vsync
if the hidden window contained animations. This should lead to a nice power
savings by skipping this unnecessary work.
This change affects both the WebRender and legacy compositor paths.
As bug 1580117 is believed to be a macOS specific issue, this is currently
implemented for macOS only, but could in the future be generalized to other
platforms as well (likely using size mode changes since other platforms do not
notify on occlusion change).
Differential Revision: https://phabricator.services.mozilla.com/D85954
- Restore active texture when dmabuf texture is created at DMABufSurfaceRGBA::CreateTexture()/DMABufSurfaceYUV::CreateTexture.
- Provide more logging for DMABufSurfaceRGBA surfaces.
- Implement DMABufSurfaceRGBA::DumpToFile() to save dmabuf surface content to png file.
Differential Revision: https://phabricator.services.mozilla.com/D88382
This patch ensures that our fallback paper list (used for print saving
as PDF) will use PWG standardized names for the paper sizes for GTK
print settings.
Differential Revision: https://phabricator.services.mozilla.com/D88736
There are three cases,
- Move to inner OOP frame.
- Move to outer OOP frame.
- Move to an OOP frame that is in different sub-tree.
We could use common BrowserParent ancestor to determine which case is and
dispatch MouseExitFromWidget event with proper ExitFrom type.
Depends on D84748
Differential Revision: https://phabricator.services.mozilla.com/D84761
eTopLevel is reused in content process to indicates that the mouse leaves
the puppet widget rendering area, now we add a separated type, ePuppet, for it.
Differential Revision: https://phabricator.services.mozilla.com/D84748
Print settings stores margin units in TWIPS, but the API expects inches.
This was causing an extra conversion from inches to TWIPS on values that
were already in TWIPS.
Differential Revision: https://phabricator.services.mozilla.com/D88674
Our data indicates a few users of x86 system hit failure to load urlmon.dll
for unknown reasons. Since we don't always require urlmon.dll,
we delay-load it, which causes a crash if loading urlmon.dll fails.
A proposed fix is to dynamically load urlmon.dll on x86.
Differential Revision: https://phabricator.services.mozilla.com/D88534
This patch is similar to part 4 but for MediaSessionSupport.
Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.
Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.
Differential Revision: https://phabricator.services.mozilla.com/D88088
This patch is similar to part 4 but for `GeckoEditableSupport`.
Conversions over to `NativeWeakPtr` are pretty straight forward thanks to the
type system. Basically we take a `NativeWeakPtr`, call `Access()` on it, and
if the accessor is truthy, then we call whatever methods we need to call.
Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.
Differential Revision: https://phabricator.services.mozilla.com/D87364
These conversions are pretty straight forward thanks to the type system.
Basically we take a `NativeWeakPtr`, call `Access()` on it, and if the
accessor is truthy, then we call whatever methods we need to call.
Creation of new pointers is done using `NativeWeakPtrHolder::Attach()` and
detaching of strong references is done by `NativeWeakPtr::Detach()`.
Differential Revision: https://phabricator.services.mozilla.com/D87363
* Having `AndroidView` and `GeckoViewSupport` as nested classes inside of
`nsWindow` make it impossible to forward declare them. We move those classes
into their own headers. We also move `WindowEvent` into its own header.
* We remove the old `NativePtr` and `WindowPtr` implementations from `nsWindow`
and convert the class definitions in this patch to use the new `NativeWeakPtr`.
* `GeckoViewSupport` had a unique quirk where it was owned by `nsWindow`
instead of its Java counterpart. To make `GeckoViewSupport`'s ownership work
like the other classes that use `NativeWeakPtr` (and to substantially simplify
the implementation of `NativeWeakPtr` itself), I have reversed that: now
`nsWindow` holds a `NativeWeakPtr` to `GeckoViewSupport`, while
`GeckoViewSupport` is owned by its Java counterpart and holds a strong ref to
the `nsWindow`.
* `GeckoViewSupport` no longer inherits from `SupportsWeakPtr`, since using it
with `NativeWeakPtr` provides stronger and safer guarantees.
Differential Revision: https://phabricator.services.mozilla.com/D87362
* We rename the existing `NativePtr` struct to `NativePtrTraits`, as that is
more descriptive of what that code actually does;
* We introduce `NativeWeakPtr` as a smart pointer type that holds a pointer
to an object and allows its access in a thread-safe way. See comments.
* We replace some explicit uses of template types with type deduction via
`auto` and `decltype(auto)`. This allows for more use of forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D87361
There are three cases,
- Move to inner OOP frame.
- Move to outer OOP frame.
- Move to an OOP frame that is in different sub-tree.
We could use common BrowserParent ancestor to determine which case is and
dispatch MouseExitFromWidget event with proper ExitFrom type.
Differential Revision: https://phabricator.services.mozilla.com/D84761
eTopLevel is reused in content process to indicates that the mouse leaves
the puppet widget rendering area, now we add a separated type, ePuppet, for it.
Differential Revision: https://phabricator.services.mozilla.com/D84748
It always returns a new print settings object, so the docs are just
wrong. At that point it is just an alias of thew newPrintSettings
attribute, so document it as such.
Differential Revision: https://phabricator.services.mozilla.com/D88399
This patch defines a new macro `MOZ_USE_LAUNCHER_ERROR` and keeps
the use of `LauncherError` behind `MOZ_USE_LAUNCHER_ERROR` instead of
`MOZILLA_INTERNAL_API` so that we can selectively use `LauncherError`
in locations where `MOZILLA_INTERNAL_API` is defined.
Differential Revision: https://phabricator.services.mozilla.com/D83638