`IMEContentObserver` observes the text node change which contains the current
composition string. Therefore, it can let `TextComposition` know where is
updated by web apps and adjust offset and length in the text node.
Differential Revision: https://phabricator.services.mozilla.com/D141193
`selectionForTSF` may not have selection range. However, it retrieves max offset
of selection before checking `selectionForTSF` has a selection range.
Note that this path runs only when there is an a11y tool which refers native
caret such as attachment 9022868 or the active TIP is ATOK 2011-2015.
Differential Revision: https://phabricator.services.mozilla.com/D144071
InvalidateNonClientRegion mixed up these constants. They seem to always map to the same value on Windows so this doesn't change any behavior.
Depends on D143389
Differential Revision: https://phabricator.services.mozilla.com/D143390
Bug 618353 introduced padding in the non-client area at the top of the Windows widget that compensates for a bug in Windows that causes DwmDefWindowProc to ignore mouse events (and, by extension, window buttons) on maximized windows. The padding is then un-added when we define the client region for WM_NCCALCSIZE, making it functionally a no-op.
That predates Windows 10. On Windows 10+, this "fix" exposes a new Windows bug where we sometimes get undrawn regions on adjacent monitors. Windows is supposed to clip the regions of the maximized window that extend to other monitors but the undrawn regions are the result when it doesn't.
We don't need the fix from bug 618353 on Windows 10+ -- we use non-native window buttons and therefore don't run into the Windows bug. This patch limits the padding to Windows 7/8.1.
Differential Revision: https://phabricator.services.mozilla.com/D143389
Opt out of X11 code makes mozgtk.c empty. But following the comment in the
file, it requires at least a symbol to force libxul to depend on it.
Therefore I added a common gtk function. However, I don't know if adding that
chosen function can have unwanted side-effects.
Depends on D139532
Differential Revision: https://phabricator.services.mozilla.com/D139533
Force usage of EGL when building for wayland only.
Enable build component that get disabled by undefined MOZ_X11 but are required
for MOZ_WAYLAND.
Depends on D139530
Differential Revision: https://phabricator.services.mozilla.com/D139531
If we want to re-enable SanityTest.jsm test, we need to disable native compositor(DirectComposition) on the testing window, since taking snapshot of native compositor is very slow on Windows. Then CompositorOptions could be used to notice to disable native compositor(DirectComposition).
To notice it from SanityTest.jsm to gecko, nsIAppWindow::needFastSnaphot() is used.
Differential Revision: https://phabricator.services.mozilla.com/D130824
The Firefox in flatpak has no access to the wireless networks to determine
accurate geolocation. We have to use the location portal instead which
provides the current location based on the nearby wireless accesspoints
or other methods.
Differential Revision: https://phabricator.services.mozilla.com/D142329
We resolve editing commands on Linux and macOS to respect the system settings
of every key press when an `eKeyPress` event is sent to a remote process, and
it requires `WritingMode` at selection for arrow key handling for example.
Therefore, the parent process try to get the information.
However, in the case, the query succeeds only when IME has focus since
`ContentCacheInParent` does not have any data when IME does not have focus.
Therefore, `TextEventDispatcher::MaybeQueryWritingModeAtSelection` should
check the IME state before dispatching `eQuerySelectedText` event to avoid
the warnings and unnecessary runtime cost.
Differential Revision: https://phabricator.services.mozilla.com/D143901
The Firefox in flatpak has no access to the wireless networks to determine
accurate geolocation. We have to use the location portal instead which
provides the current location based on the nearby wireless accesspoints
or other methods.
Differential Revision: https://phabricator.services.mozilla.com/D142329
Opt out of X11 code makes mozgtk.c empty. But following the comment in the
file, it requires at least a symbol to force libxul to depend on it.
Therefore I added a common gtk function. However, I don't know if adding that
chosen function can have unwanted side-effects.
Depends on D139532
Differential Revision: https://phabricator.services.mozilla.com/D139533
Force usage of EGL when building for wayland only.
Enable build component that get disabled by undefined MOZ_X11 but are required
for MOZ_WAYLAND.
Depends on D139530
Differential Revision: https://phabricator.services.mozilla.com/D139531
Clipboard operations, cursor navigation and input mode changes should not hide the cursor. This mimics behavior in other Windows apps (e.g. WordPad).
Differential Revision: https://phabricator.services.mozilla.com/D143849
This adds new version of the GeckoView API
GeckoDisplay.surfaceChanged(), which takes a single argument of a new
type GeckoDisplay.SurfaceInfo. As well as containing fields for each
the the existing surfaceChanged() arguments, this has an additional
SurfaceControl field. This must be provided when rendering in to a
SurfaceView on SDK level 29 or greater. On earlier SDK levels, or when
rendering in to a TextureView or SurfaceTexture, this can be
null. SurfaceViewWrapper and GeckoView classes are updated to handle
this correctly. The old surfaceChanged() methods have been deprecated,
and tests have been updated to use the new version.
When provided, the SurfaceControl is passed along with the Surface
through to the widget and, when enabled, over to the GPU process. The
compositor widget then creates a child Surface from that
SurfaceControl, and renders in to that child Surface rather than the
parent one.
This works around a bug on Android 12 where following the GPU process
dying the Surface was left in an unusable state, meaning subsequent
attempts to initialize a compositor would fail. Because the Surface is
now created by the GPU process it gets destroyed when the process
dies, therefore a new Surface can successfully be created when we
reinitialize the compositor.
Differential Revision: https://phabricator.services.mozilla.com/D143485
And android.view.SurfaceControl$Transaction.
In order to generate these bindings we must increase the maximum SDK
version argument we pass to SDKProcessor to 29. However, doing so
means that we now attempt to generate bindings for both Surface's
Surface(SurfaceTexture) and Surface(SurfaceControl)
constructors. These both translate in to C++ functions with identical
signatures - Surface::New(jni::Object::Param) - causing a compilation
failure.
This patch therefore also allows the stubName property to override
constructor names, and overrides the latter to
Surface::FromSurfaceControl(), thereby avoiding the conflict.
Differential Revision: https://phabricator.services.mozilla.com/D143484
If Thunderbird sets this in its startup script (as it does in Debian
and Fedora), Firefox does not set this in its startup script (it doesn't
in Debian), and Firefox is the handler for clicking a link in
Thunderbird, then Firefox will think it is part of Thunderbird and offer
to make Thunderbird (not Firefox!) the default browser. If the user
accepts this, it will break the ability to open normal HTTP links and
HTML files from other applications.
The same would be true for any other pair of Mozilla-based applications.
To avoid this, unset MOZ_APP_LAUNCHER for the Firefox child process.
MANUAL PUSH: Patch submitted via Splinter.
Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>
Bug-Debian: https://bugs.debian.org/948691
Put mozilla.widget.raise-on-setfocus, widget.transparent-windows
and widget.wayland.use-move-to-rect in StaticPrefList.yaml, then
get rid of gRaiseWindows, gTransparentWindows and gUseMoveToRect
from widget/gtk/nsWindow.cpp.
Differential Revision: https://phabricator.services.mozilla.com/D143885
Due to breaking `mobile.twitter.com/explore` for Hebrew IME users on Android,
this patch backs out the patches for bug 1753420 except the last patch which
just rename some methods and variables.
Differential Revision: https://phabricator.services.mozilla.com/D143684
Actually, `nsIClipboard.emptyClipboard` on macOS doesn't clear system
clipboard. Since other platforms clear it, so I would like to change to same
behaviour.
Also, since we have base class of `nsIClipboard`, we should Inherit it to share
code.
Differential Revision: https://phabricator.services.mozilla.com/D143312
This removes the rounded, native-looking tooltips on Windows 7, but I don't
think it's too concerning, let me know if you disagree. I'm not sure what's
our Windows 7 support status, but in any case this regression would be
relatively minimal.
On regular (non-HCM) Windows 10+ we just fill a rect with infobackground color
and so on, so there shouldn't be any effective behavior change.
On HCM we go through the themed codepath and fail catastrophically, so just
don't do it.
Differential Revision: https://phabricator.services.mozilla.com/D143754
We use mDragPopup to visualize D&D operation. When previous D&D operation is not finished and new one is started, emulate what internal Gtk routine gtk_drag_remove_icon() does
and remove mDragPopup from the previous D&D context to avoid Gtk confusion.
Differential Revision: https://phabricator.services.mozilla.com/D143595
InvalidateNonClientRegion mixed up these constants. They seem to always map to the same value on Windows so this doesn't change any behavior.
Differential Revision: https://phabricator.services.mozilla.com/D143390
As with the other 3 borders, the top of the window should not try to move the region offscreen. We were doing this and compensating for it with widget padding in the theme. The problem is that Windows uses a heuristic internally to determine when this happens and clip drawing that would fall on another monitor, but this fails when we take our (non-standard) approach. Instead, we can just set the client region normally in WM_NCCALCSIZE.
Differential Revision: https://phabricator.services.mozilla.com/D143389
mDragService was already a refcounted pointer, but I had
to change the type to a COMPtr because do_getService()
returns a smart pointer type.
Differential Revision: https://phabricator.services.mozilla.com/D143218