Граф коммитов

30111 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano 5c4fed5f9d Bug 1758420 - part 1: Let `TextComposition` know where is changed in storing text node r=m_kato
`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
2022-04-21 03:37:56 +00:00
Masayuki Nakano 3249ac0970 Bug 1764762 - Make `TSFTextStore::CreateNativeCaret` check whether there is selection range before accessing selection offset r=m_kato
`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
2022-04-21 03:08:31 +00:00
David Parks ee531e5e71 Bug 1614218: Clean up horizontal/vertical mixup in Windows widget r=cmartin
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
2022-04-20 17:54:48 +00:00
David Parks 527ad9bf71 Bug 1614218: Do not adjust for resize region when maximized on Windows r=emilio
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
2022-04-20 17:54:47 +00:00
ganguin 401a7db5f7 Bug 1661450 - 7/8 Special care for mozgtk.c r=stransky
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
2022-04-20 09:32:09 +00:00
ganguin 30626fcebe Bug 1661450 - 6/8 Separate code for X11 and wayland r=stransky
Depends on D139531

Differential Revision: https://phabricator.services.mozilla.com/D139532
2022-04-20 09:32:08 +00:00
ganguin 9396739e3c Bug 1661450 - 5/8 Fix build system to handle undefined MOZ_X11 r=stransky
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
2022-04-20 09:32:08 +00:00
ganguin 882971ce56 Bug 1661450 - 4/8 Fix includes r=stransky
Add missing includes from opting out X11 specific includes.

Remove unused gdk/gdkx.h includes.

Depends on D139529

Differential Revision: https://phabricator.services.mozilla.com/D139530
2022-04-20 09:32:08 +00:00
ganguin f01acfd647 Bug 1661450 - 2/8 Add wayland required code getting opt-out by disabling MOZ_X11 r=stransky,rmader
Ensure shared code with MOZ_X11 and MOZ_WAYLAND remains when MOZ_X11 is
undefined

Depends on D139526

Differential Revision: https://phabricator.services.mozilla.com/D139528
2022-04-20 09:32:07 +00:00
ganguin fc2a921247 Bug 1661450 - 1/8 Guard X11 specific code with MOZ_X11 r=stransky
Add MOZ_X11 ifdefs on X11 specific code, mainly alongside GdkIsX11Display.

Differential Revision: https://phabricator.services.mozilla.com/D139526
2022-04-20 09:32:07 +00:00
sotaro 0054e1bdb2 Bug 1736479 - Make gfx SanityTest.jsm work again r=gfx-reviewers,bradwerth
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
2022-04-20 01:08:52 +00:00
Emilio Cobos Álvarez a8ed7cf41b Bug 1761929 - Clear move-to-rect size on popup close. r=stransky
Otherwise showing the same popup again could incorrectly constrain the
position of the popup.

Differential Revision: https://phabricator.services.mozilla.com/D143906
2022-04-19 13:21:12 +00:00
Jan Horak 705f8983d6 Bug 1759840 Add support for location portal; r=emilio
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
2022-04-19 11:42:38 +00:00
Masayuki Nakano b3f898a618 Bug 1765109 - Make `TextEventDispatcher::MaybeQueryWritingModeAtSelection` not try to query selection if it's unavailable r=m_kato
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
2022-04-19 11:41:52 +00:00
Molnar Sandor 509c3805f9 Backed out changeset 1529955a0df7 (bug 1759840) for causing build bustage in geolocation/Geolocation CLOSED TREE 2022-04-19 12:41:47 +03:00
criss 8d62d22b30 Backed out 10 changesets (bug 1661450) for causing build bustages on nsWindow.cpp. CLOSED TREE
Backed out changeset 2c41d82de0c5 (bug 1661450)
Backed out changeset 5f58fcd7ac0b (bug 1661450)
Backed out changeset 62e56a6dcd22 (bug 1661450)
Backed out changeset 4b422ffa729f (bug 1661450)
Backed out changeset 6ca4705772da (bug 1661450)
Backed out changeset 031a6313459f (bug 1661450)
Backed out changeset 06ddf05e97d6 (bug 1661450)
Backed out changeset 4388b1b9aafd (bug 1661450)
Backed out changeset 600f9fd09fa6 (bug 1661450)
Backed out changeset cc5e8efe3ebf (bug 1661450)
2022-04-19 12:25:14 +03:00
Jan Horak f674f55333 Bug 1759840 Add support for location portal; r=emilio
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
2022-04-19 09:02:55 +00:00
ganguin 140f0687c1 Bug 1661450 - 7/8 Special care for mozgtk.c r=stransky
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
2022-04-19 08:35:28 +00:00
ganguin 798a827ca4 Bug 1661450 - 6/8 Separate code for X11 and wayland r=stransky
Depends on D139531

Differential Revision: https://phabricator.services.mozilla.com/D139532
2022-04-19 08:35:28 +00:00
ganguin 297f530b7c Bug 1661450 - 5/8 Fix build system to handle undefined MOZ_X11 r=stransky
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
2022-04-19 08:35:27 +00:00
ganguin c0544ec768 Bug 1661450 - 4/8 Fix includes r=stransky
Add missing includes from opting out X11 specific includes.

Remove unused gdk/gdkx.h includes.

Depends on D139529

Differential Revision: https://phabricator.services.mozilla.com/D139530
2022-04-19 08:35:27 +00:00
ganguin 255b4632d9 Bug 1661450 - 2/8 Add wayland required code getting opt-out by disabling MOZ_X11 r=stransky,rmader
Ensure shared code with MOZ_X11 and MOZ_WAYLAND remains when MOZ_X11 is
undefined

Depends on D139526

Differential Revision: https://phabricator.services.mozilla.com/D139528
2022-04-19 08:35:26 +00:00
ganguin 936e3f0555 Bug 1661450 - 1/8 Guard X11 specific code with MOZ_X11 r=stransky
Add MOZ_X11 ifdefs on X11 specific code, mainly alongside GdkIsX11Display.

Differential Revision: https://phabricator.services.mozilla.com/D139526
2022-04-19 08:35:26 +00:00
David Parks 1441683ada Bug 1759558: Ignore special keys when hiding pointer while typing on Windows r=cmartin
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
2022-04-18 20:00:58 +00:00
Jamie Nicol dee7767b62 Bug 1762424 - Unblock GPU process on Android 12. r=gfx-reviewers,nical
With the previous patches in this series we can properly recover from
a GPU process restart, so unblock it.

Differential Revision: https://phabricator.services.mozilla.com/D143487
2022-04-18 18:11:08 +00:00
Jamie Nicol 9849a83f64 Bug 1762424 - Provide SurfaceControl to compositor and render in to child Surface. r=agi,gfx-reviewers,geckoview-reviewers,jrmuizel,owlish
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
2022-04-18 18:11:07 +00:00
Jamie Nicol 366dbce5af Bug 1762424 - Generate SDK bindings for android.view.SurfaceControl. r=agi
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
2022-04-18 18:11:07 +00:00
Stephen A Pohl c2d9c786c6 Bug 1699936: Prevent possible crashes due to Objective-C exceptions when drawing the menubar on macOS. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D143845
2022-04-18 17:05:10 +00:00
Simon McVittie 7353eb0053 Bug 1494436 - Unset MOZ_APP_LAUNCHER for external MIME handlers. r=emilio
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
2022-04-18 17:33:49 +02:00
Razvan Cojocaru ad4c559a95 Bug 1758158 - nsWindow's initialize_prefs should use static prefs instead. r=emilio
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
2022-04-18 01:09:03 +00:00
Norisz Fay 1b7b7ac6b4 Backed out changeset e8b1eb2a82f1 (bug 1764354) for wrong fix CLOSED TREE 2022-04-18 01:10:25 +03:00
Butkovits Atila 726fd922c9 Bug 1764354 - Lint fix. r=fix. CLOSED TREE 2022-04-18 00:42:45 +03:00
Emilio Cobos Álvarez 20b8aec4d5 Bug 1764354 - Propagate color-scheme preference to SVG images on chrome documents. r=aosmond
This allows favicons to respect the user theme even when it doesn't
match the content theme.

Differential Revision: https://phabricator.services.mozilla.com/D143639
2022-04-17 20:38:01 +00:00
Emilio Cobos Álvarez 1cef054991 Bug 1762708 - Undefine a LOG macro to fix tier2 X11 builds after adding a file.
MANUAL PUSH: Tier 2 fix CLOSED TREE
2022-04-16 03:10:10 +02:00
Emilio Cobos Álvarez 810dd62cca Bug 1762708 - Add a friendly async interface for DBus. r=stransky
This makes calling dbus asynchronously somewhat easier.

Differential Revision: https://phabricator.services.mozilla.com/D143606
2022-04-15 23:28:07 +00:00
Andreea Pavel a401cb00e2 Bug 1759422 - disable tests on win7 32bits opt r=intermittent-reviewers,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D143557
2022-04-15 08:22:32 +00:00
Masayuki Nakano 36c2d519c8 Bug 1764238 - Backout the first and the second patch of bug 1758420 r=m_kato
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
2022-04-15 03:49:57 +00:00
Makoto Kato f1a05c105f Bug 666254 - nsIClipboard.emptyClipboard should clear system clipboard. r=mac-reviewers,spohl
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
2022-04-15 02:48:04 +00:00
Emilio Cobos Alvarez 7d2c51de76 Bug 1757797 - Don't use native tooltip drawing on Windows. r=dao,cmartin
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
2022-04-14 21:05:57 +00:00
Emilio Cobos Álvarez d5df487b65 Bug 1739339 - Address nit correctly.
MANUAL PUSH: Bustage fix CLOSED TREE
2022-04-14 16:09:37 +02:00
stransky 698f877ecf Bug 1739339 [Linux] Remove mDragPopup widget from Gtk D&D context before we reuse it for new D&D operation r=emilio
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
2022-04-14 13:43:54 +00:00
stransky efce6cb94a Bug 1739339 [Linux] Log GdkDragContext in D&D logs r=emilio"
Differential Revision: https://phabricator.services.mozilla.com/D143594
2022-04-14 13:43:53 +00:00
stransky 0971af219a Bug 1764319 [Wayland] Save initial position from nsWindow::Create() r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143692
2022-04-14 13:34:28 +00:00
stransky 5c5510777a Bug 1764283 [Wayland] Don't commit to MozContainer when WindowSurfaceProvider internals are released r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143602
2022-04-14 06:14:45 +00:00
Norisz Fay bb55e501b5 Backed out 2 changesets (bug 1614218) for causing Bug 1764624
Backed out changeset b46fde1669ca (bug 1614218)
Backed out changeset 0f6c40a96642 (bug 1614218)
2022-04-13 22:37:52 +03:00
David Parks 238a1e4332 Bug 1614218: Clean up horizontal/vertical mixup in Windows widget r=cmartin
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
2022-04-13 00:03:16 +00:00
David Parks 42f28fe61a Bug 1614218: Do not adjust for resize region when maximized on Windows r=emilio
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
2022-04-13 00:03:15 +00:00
Markus Stange 04121e8a05 Bug 1599061 - Don't reorder windows when clicking the Picture-in-picture window. r=mac-reviewers,spohl
Differential Revision: https://phabricator.services.mozilla.com/D143406
2022-04-12 18:23:48 +00:00
Andrew McCreight 157f547e74 Bug 1763481 - Get the drag service without NS_DEFINE_IID. r=NeilDeakin
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
2022-04-11 14:54:25 +00:00
stransky 3b94e78ae2 Bug 1763727 [Wayland] Paint to Gtk owned wl_surface in main thread r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D143266
2022-04-11 12:56:26 +00:00