There is no autorelease pool in place at the time that C++ globals are initialized, so this array
causes warnings when running with `OBJC_DEBUG_MISSING_POOLS=YES LIBDISPATCH_DEBUG_MISSING_POOLS=NO`.
And avoiding static initializers is a good practice anyway.
Differential Revision: https://phabricator.services.mozilla.com/D100736
There is no autorelease pool in place at the time that C++ globals are initialized, so this array
causes warnings when running with `OBJC_DEBUG_MISSING_POOLS=YES LIBDISPATCH_DEBUG_MISSING_POOLS=NO`.
And avoiding static initializers is a good practice anyway.
Differential Revision: https://phabricator.services.mozilla.com/D100734
This patch does three things, all centered around these new APIs:
(1) Add the APIs themselves -- some nsIPrintSettings methods to reason about
the sheet-orientation being potentially flipped to accomodate 2 and 6
pages-per-sheet.
(2) Use these new APIs, where appropriate, in places where we previously used
the page-orientation to set up the platform-native print-settings objects and
print-target. Now, we'll use the *sheet* orientation instead of the page
orientation, to be sure we produce the appropriately-oriented platform-native
surfaces. Also, for symmetry, this patch adds similar logic to the reverse
codepaths, where we update an existing nsIPrintSettings object based on a
platform-native print-settings object.
(3) Update nsPrintJob's code that informs nsPresContext about the page-size.
This patch makes sure that this code uses the *page* size, rather than the
*sheet* size, in cases where they differ. (The code that consumes this
nsPresContext::GetPageSize API, e.g. our CSS media-query code, really does want
the page size, not the sheet size.)
Differential Revision: https://phabricator.services.mozilla.com/D100372
- Move nsWaylandDisplay::SyncBegin() out of FlushPendingCommitsLocked() call to avoid a deadlock there
- Rename FlushPendingCommitsInternal() to FlushPendingCommitsLocked() to clearly state it operates on locked surface only.
- Implement nsWaylandDisplay::QueueSyncBegin() which delays SyncBegin() execution untill recent event batch is finished
and use it instead of SyncBegin().
Differential Revision: https://phabricator.services.mozilla.com/D100384
And re-enable the RemoteLookAndFeel by default with Gtk.
When the RemoteLookAndFeel is enabled and the non-native theme is not
enabled, we still need to configure the Gtk theme in content processes,
since we're still using Gtk to paint widget backgrounds etc. Without
this, we can end up using LookAndFeel colors from a light theme but
painting widget backgrounds from a dark theme.
Other platforms don't configure themes for content processes
differently, so on those platforms LookAndFeelTheme is an empty struct
and we skip the ConfigureTheme call.
Differential Revision: https://phabricator.services.mozilla.com/D100223
As WindowSurfaceWayland can be acessed from various threads we need to guard public interface by mutex to avoid
threading issues. We also can't delete WindowSurfaceWayland internals untill it's used.
Depends on D100313
Differential Revision: https://phabricator.services.mozilla.com/D100314
Use g_timeout for delayed/pending commits instead of PostDelayedTask()/NewRunnableFunction()
and remove an active timeout when WindowSurfaceWayland is deleted.
Differential Revision: https://phabricator.services.mozilla.com/D100313
As now the lowest version SDK we use for developing would be 10.12, so we don't need to this wrapper anymore and can import `MediaPlayer` directly.
Differential Revision: https://phabricator.services.mozilla.com/D97223
This is an attempt clean up any stale information to try and solve crashes later
in the drag in nsNativeDragTarget::DragOver.
Differential Revision: https://phabricator.services.mozilla.com/D100124
Currently, they are never focusable when its type is "plugin".
So, making stop them returning `IMEEnabled::Plugin` won't change
anything, but it guarantees that nobody will see `IMEEnabled::Plugin`
at runtime. This is a preparation for the following patches.
Differential Revision: https://phabricator.services.mozilla.com/D100101
Before deleting `IMEState::Enabled::PLUGIN`, let's make it an enum class
for making the change safer. Almost all of this change is done by
"replace" of VSCode.
Differential Revision: https://phabricator.services.mozilla.com/D100100
Fcitx5 sets its context name to "fcitx5", not "fcitx". Therefore,
we need to add new check for it to enable the asynchronous keyboard
event handling.
Note that some options for disabling the async handling and
enabling key snooper are not supported so that we can ignore them
at initializing the state.
Differential Revision: https://phabricator.services.mozilla.com/D100075
Otherwise we wouldn't send a pinch start. This should never be hit because if we get here the current scale should not be fuzzy equal to the previous scale so SendPinch should compute a non-zero deltaY and send an event and return true.
Differential Revision: https://phabricator.services.mozilla.com/D100170
Bug 1583109 introduced new function templates StringJoin and StringJoinAppend.
These are now used to replace several custom loops across the codebase that
implement string-joining algorithms to simplify the code.
Differential Revision: https://phabricator.services.mozilla.com/D98750
nsTSubstring::Split used to heap-allocate an array to store all tokens.
However, most uses of Split just use it to iterate in a range-based for loop.
The few remaining uses also don't need to iterate multiple times over all
tokens, so it's better to just use nsTokenizedRange, which tokenizes lazily.
Differential Revision: https://phabricator.services.mozilla.com/D99234
This patch is to mitigate the crash which was probably caused by Diebold Warsaw.
We couldn't reproduce the problem, but our crash reports indicate the crash happened
when `winmm!mciwindow` called `USER32!GetMessageA` but it was redirected to a freed
buffer. This happens Firefox calls to `PlaySound` e.g. showing the menu bar by
pressing Alt key, or showing a dialogbox.
Most of (not 100%) the crash instances have wslbdhm64 loaded but wslbscrwh64.dll
was unloaded. The proposed mitigation is to suppress playing a sound under
such a condition.
Differential Revision: https://phabricator.services.mozilla.com/D99705
Since Software WebRender is the replacement for Basic compositor, we
should not allow generic blocklist rules which block all features to
block Software WebRender. This feature must work under all
configurations, including safe mode, so it doesn't make sense to allow
blocking it.
This does not however prevent rules specifically targeting SW-WR from
blocking/allowing it.
Differential Revision: https://phabricator.services.mozilla.com/D99834