Commit Graph
3347 Commits
Author SHA1 Message Date
Gregory Pappas 53b8148c7b Bug 1914578 - Remove EventTracer r=perftest-reviewers,geckoview-reviewers,win-reviewers,profiler-reviewers,mstange,sparky,gstoll,owlish
Differential Revision: https://phabricator.services.mozilla.com/D219955
2024-08-31 03:39:50 +00:00
Makoto Kato 709c8ad35a Bug 1546267 - Detect system locale/timezone change. r=geckoview-reviewers,owlish
We should notify system locale and timezone of changes to Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D218514
2024-08-27 08:40:58 +00:00
Hiroyuki Ikezoe 29265bc3fa Bug 1831649 - Propagate the software keyboard height change into nsPresContext. r=botond,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D204166
2024-08-06 07:46:21 +00:00
Tom Schuster 864c31e3e4 Bug 1809713 - Change nsIClipboard to use the ClipboardType enum. r=nika,geckoview-reviewers,win-reviewers,gstoll,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D217807
2024-07-29 11:52:34 +00:00
Stanca Serban b74d1bcd26 Backed out 12 changesets (bug 1831649) for causing multiple failures.
Backed out changeset 501dc3134ae1 (bug 1831649)
Backed out changeset 21235ab42839 (bug 1831649)
Backed out changeset 279fdf36aac1 (bug 1831649)
Backed out changeset 17fb50534fae (bug 1831649)
Backed out changeset b2718b2f730d (bug 1831649)
Backed out changeset a05aa1c75ece (bug 1831649)
Backed out changeset becfb23cd6b4 (bug 1831649)
Backed out changeset 2d0e7e662530 (bug 1831649)
Backed out changeset 22538f7bdc88 (bug 1831649)
Backed out changeset 4ddecb37950f (bug 1831649)
Backed out changeset 1e6ed8b78e8f (bug 1831649)
Backed out changeset 6e96a1a01c24 (bug 1831649)
2024-07-18 06:13:43 +03:00
Hiroyuki Ikezoe 56a2fb332d Bug 1831649 - Propagate the software keyboard height change into nsPresContext. r=botond,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D204166
2024-07-18 00:31:12 +00:00
Sylvestre Ledru a3ea006705 Bug 1519636 - Reformat recent changes to the Google coding style r=emilio,necko-reviewers,geckoview-reviewers,application-update-reviewers,media-playback-reviewers,devtools-reviewers,anti-tracking-reviewers,profiler-reviewers,win-reviewers,migration-reviewers,padenot,mconley,nchevobbe,kershaw,gstoll,mstange,bytesized,m_kato
This new version of clang 17 also slightly changed the formatting.

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D215914
2024-07-17 11:15:31 +00:00
Otto Länd ee85122101 Bug 1893119: apply code formatting via Lando
# ignore-this-changeset
2024-07-04 07:52:52 +00:00
David P 48b66f76d5 Bug 1893119: Part 22 - Make nsIDragService::StartDragSession return the nsIDragSession r=rkraesig,win-reviewers,gstoll,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D212298
2024-07-04 07:48:12 +00:00
David P e844cdeed5 Bug 1893119: Part 21 - Separate nsIDragService and nsIDragSession implementations r=gstoll,geckoview-reviewers,rkraesig,win-reviewers,m_kato
Split the class inheritance trees for nsIDragService and nsIDragSession.
Remember that, before the start of this patch series, the inheritance
diagram was:

nsDragService -> nsBaseDragService -> nsIDragService + nsIDragSession

and the only instance was a singleton.  We switched it to:

nsDragService -> nsDragSession -> nsBaseDragService -> nsIDragService + nsBaseDragSession -> nsIDragSession

and maintained the singleton.  This allowed us to allow us to move things to
the new classes without breaking behavior.  We are done with that,
so we can now change the inheritance to its final form:

nsDragService -> nsBaseDragService -> nsIDragService

nsDragSession -> nsBaseDragSession -> nsIDragSession

Of course, we also need to properly construct and release the
nsIDragSessions (formerly part of the singleton), so that is done here as
well.  That happens in nsBaseDrag[Service|Session] for parent process drags
and in nsDrag[Service|Session]Proxy for content.  This is all fairly
straightforward, except in the case of gtk, where we need to change
some callback behavior.

Differential Revision: https://phabricator.services.mozilla.com/D211084
2024-07-04 07:48:11 +00:00
David P 5c77b63f65 Bug 1893119: Part 20 - Move EndDragSession from nsIDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
This is a straightforward move.  It does take the liberty of breaking out an
EndDragSessionImpl method, which will be needed later.

Differential Revision: https://phabricator.services.mozilla.com/D211083
2024-07-04 07:48:11 +00:00
David Parks 447704fe80 Bug 1893119: Part 18 - Copy/Move MaybeAddBrowser, RemoveAllBrowsers and MustUpdateDataTransfer from nsIDragService to nsIDragSession r=geckoview-reviewers,gstoll,m_kato
MustUpdateDataTransfer is a simple function that makes more sense on
nsIDragSession.

MaybeAddBrowser records BrowserParents for processes with existing drag
sessions.  There may be such processes before the parent process
even has a drag session, so they cannot be tied to drag sessions.  We tie
them to the drag service, until the service creates a drag session in
the process, at which point we move them to the drag session.  Since
the session and service are still the same object and each now has methods
with these names, we leave part of session's implementation commented out
so that we run correctly instead of looping infinitely.  The code is
exposed when the objects separate later in the patch series.

Finally, the implementation of TakeSessionBrowserListFromService currently
amounts to a nop, but it will have substace when the service and session
are separated.

Differential Revision: https://phabricator.services.mozilla.com/D211081
2024-07-04 07:48:10 +00:00
David P 19861d5e8d Bug 1893119: Part 17 - Pass the widget to StartDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D211080
2024-07-04 07:48:10 +00:00
David Parks f62a3a2577 Bug 1893119: Part 14 - Move SetDragEndPoint from nsBaseDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D211078
2024-07-04 07:48:08 +00:00
David Parks 88e30b7141 Bug 1893119: Part 13 - Move FireDragEventAtSource from nsIDragService to nsIDragSession r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D211077
2024-07-04 07:48:08 +00:00
David P 102bafa7f7 Bug 1893119: Part 9 - Move additional parts of nsIDragService to nsIDragSession r=gstoll,rkraesig,geckoview-reviewers,win-reviewers,m_kato
Moving additional methods and fields.  No substantive changes.

Differential Revision: https://phabricator.services.mozilla.com/D211073
2024-07-04 07:48:06 +00:00
David P 9f2046bb92 Bug 1893119: Part 8 - Prepare for nsBaseDragSession to be broken out of nsBaseDragService r=gstoll,rkraesig,win-reviewers,geckoview-reviewers,m_kato
Creates the nsBaseDragSession class and moves nsIDragSession's methods and data
into it.  This patch also does this for each platform-specific nsDragService
and the nsDragServiceProxy.  The result is that the drag service and drag
session are still one object in both the main and child processes, and the
inheritance diagram for each platform implementation goes from its present
from:

nsDragService -> nsBaseDragService -> nsIDragService + nsIDragSession

to:

nsDragService -> nsDragSession -> nsBaseDragService -> nsIDragService + nsBaseDragSession -> nsIDragSession

(and similar for the nsDragServiceProxy).

At the end of this patch series, the objects will be separated and the
inheritance diagram will be as expected:

nsDragService -> nsBaseDragService -> nsIDragService

nsDragSession -> nsBaseDragSession -> nsIDragSession

There are no substantive changes here -- it's essentially all cut
and paste to prepare to smoothly sever the unwanted inheritance.

Differential Revision: https://phabricator.services.mozilla.com/D211072
2024-07-04 07:48:06 +00:00
David Parks 6755e73ac9 Bug 1893119: Part 2 - Make C++ callers of nsIDragService::GetCurrentSession pass a widget r=gstoll,win-reviewers,geckoview-reviewers,m_kato
Content process callers must call nsIDragService::GetCurrentSession with the
correct widget under the drag.  For all callers, it is a sanity check.

Differential Revision: https://phabricator.services.mozilla.com/D211065
2024-07-04 07:48:03 +00:00
Alex Jakobi e165d7eec9 Bug 1855990 - Hide dynamic toolbar r=botond,geckoview-reviewers,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D209844
2024-06-28 01:10:40 +00:00
Masayuki Nakano 7310f1cf4d Bug 1904192 - Make TextControlState::SetValue suppress TextEditor to dispatch input events even after dispatching input event during composition r=m_kato,geckoview-reviewers
`input` event listeners may be async functions and may set the text control
element value after the editor ends dispatching an `input` event.  Even in this
case, the `input` event listener should not be called recursively by committing
composition which is caused by setting the value because the value is
overwritten by the setting value which was intended by the web app.

Unfortunately, we cannot check whether the value setter is an async `input`
event listener.  Therefore, we need to suppress `input` events even after the
editor ends dispatching `input` event.

On the other hand, we should not suppress `input` event if the value is set
by a `compositionupdate` event listener which runs before the editor starts
handling the latest composition change because once we do that, the app won't
receive `input` event for the composition.  Therefore, we should not suppress
the editor starts handling the composition change (including during
`beforeinput` event dispatching, but the `beforeinput` is not cancelable, so,
the result will be odd, therefore, we have no tests for the cases).

Therefore, this patch adds a new method to `TextComposition` to make
`TextControlState::SetValue` can check whether the editor is handling the
latest composition change or after that.  So, during composition, setting
value should cause `input` events between `TextComposition` starts dispatching a
`compositionupdate` event and `EditorBase` starts handling `eCompositionChange`
event which is dispatched after `compositionupdate`.

Differential Revision: https://phabricator.services.mozilla.com/D214676
2024-06-25 03:52:54 +00:00
Emilio Cobos Álvarez e5de6363a8 Bug 1902315 - Remove other widget z-level fiction. r=win-reviewers,rkraesig,geckoview-reviewers,spohl,m_kato
This comes back to bug 42557 and co. It only does something
half-reasonable on Windows (on macOS we just lie and make z-order
tracking be latest-active tracking), and given we don't use the special
zorder flags elsewhere I'm pretty sure we should be able to just rip
this off... On some DEs like Wayland we can't re-stack toplevel windows.

Differential Revision: https://phabricator.services.mozilla.com/D213602
2024-06-19 07:47:36 +00:00
Masayuki Nakano b3c5045ec1 Bug 1675847 - part 5: Make contextmenu event dispatchers use WidgetPointerEvent or PointerEvent r=smaug,pip-reviewers,devtools-reviewers,nchevobbe,mconley
`eContextMenu` event may be fired from `widget`.  Therefore, different from
`ePointerClick` and `ePointerAuxClick`, they may cross the process boundary,
may be handled by APZ and may be dispatched into the DOM after a delay.
Therefore, this patch is complicated than the previous patch.  This adds
* New IPC message handlers for sending/receiving a `WidgetPointerEvent`
* New `DelayedPointerEvent` class and templated `MouseInput::ToWidgetEvent`
* `PresShell::EventHandler` handles `eContextMenu` as same as `WidgetMouseEvent`

Differential Revision: https://phabricator.services.mozilla.com/D213003
2024-06-14 00:18:48 +00:00
Jan-Niklas Jaeschke c25a8c4b54 Bug 1867940 - Text Fragments: Implement sensible default colors. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D212378
2024-06-05 10:46:53 +00:00
Makoto Kato b122cf296c Bug 1888330 - Don't use composition if unnecessary. r=geckoview-reviewers,masayuki,ohall
Chrome/Android doesn't dispatch composition event when
`InputConnection.commitText` is called from input method without composition.

So we should use same way as compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D210197
2024-05-31 10:21:33 +00:00
kycn e72d9e1640 Bug 1677190 - Use shared code for updating the session state on Android when SHIP is enabled. r=geckoview-reviewers,sessionstore-reviewers,farre,owlish
Differential Revision: https://phabricator.services.mozilla.com/D210757
2024-05-23 06:45:36 +00:00
Mike Hommey 32831b48cc Bug 1897317 - Rename MOZ_ANDROID_HISTORY to MOZ_GECKOVIEW_HISTORY. r=firefox-build-system-reviewers,geckoview-reviewers,nalexander,owlish
Differential Revision: https://phabricator.services.mozilla.com/D210743
2024-05-17 00:29:35 +00:00
Makoto Kato f67b3b8b63 Bug 1862132 - Part 1. Move data class to WebAuthnUtils. r=jschanck,geckoview-reviewers,owlish
I would like to move data class from WebAuthnTokenManager to new class
since WebAuthnTokenManager may becomes complex when we add Credential
Manager support.

Differential Revision: https://phabricator.services.mozilla.com/D207500
2024-05-16 04:14:55 +00:00
sotaro da674bd3c0 Bug 1896780 - Change IsGpuProcessEnabled() as to complete soon r=gfx-reviewers,bradwerth,jnicol
config state of gfx::Feature::GPU_PROCESS is mirrored to gfx::gfxVars::GPUProcessEnabled(). It is threadsafe.

Differential Revision: https://phabricator.services.mozilla.com/D210386
2024-05-16 00:06:33 +00:00
Makoto Kato e553448717 Bug 1837119 - Support double click event on GeckoView. r=geckoview-reviewers,owlish
When using mouse on GeckoView, dblclick event isn't fired. Android doesn't
have a state of double click for mouse, so we have to emulate it like
Windows widget.

The default of timeout values are from android.view.GestureDetector's double
tap.

Differential Revision: https://phabricator.services.mozilla.com/D209654
2024-05-15 01:43:46 +00:00
Jamie Nicol dd6fbeeb91 Bug 1880503 - Ensure compositor reinitialization respects intended paused/resumed state. r=geckoview-reviewers,m_kato
When the Android frontend attempts to pause or resume the compositor
there is a chance this may fail. When this happens, the compositor
will automatically be reinitialized. However, it will currently be
reinitialized in the previous state, not the state the frontend
intended. For example, if the compositor fails to resume then it will
be reinitialized but remain in a paused state, displaying a blank
screen to the user.

To avoid this, we update the value of mCompositorPaused prior to
attempting to pause or resume the compositor. This means when
NotifyCompositorCreated eventually gets called, it knows the correct
state in which to initialize the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D202165
2024-05-14 12:58:35 +00:00
Stanca Serban a160adf466 Backed out 3 changesets (bug 1880503) for causing build bustages in nsCOMPtr.h. CLOSED TREE
Backed out changeset 437063345a7b (bug 1880503)
Backed out changeset 9665aa5e821d (bug 1880503)
Backed out changeset 44d08ce97ae6 (bug 1880503)
2024-05-13 21:08:49 +03:00
Jamie Nicol ff568f9e02 Bug 1880503 - Ensure compositor reinitialization respects intended paused/resumed state. r=geckoview-reviewers,m_kato
When the Android frontend attempts to pause or resume the compositor
there is a chance this may fail. When this happens, the compositor
will automatically be reinitialized. However, it will currently be
reinitialized in the previous state, not the state the frontend
intended. For example, if the compositor fails to resume then it will
be reinitialized but remain in a paused state, displaying a blank
screen to the user.

To avoid this, we update the value of mCompositorPaused prior to
attempting to pause or resume the compositor. This means when
NotifyCompositorCreated eventually gets called, it knows the correct
state in which to initialize the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D202165
2024-05-13 16:52:12 +00:00
Edgar Chen 179c0a8bbb Bug 1892976 - Stop throwing error on nsIClipboard::GetData() when the type isn't available on android; r=geckoview-reviewers,m_kato
Other platforms don't throw error; this patch makes android behave consistently
with other platforms.

Differential Revision: https://phabricator.services.mozilla.com/D208470
2024-05-01 20:49:08 +00:00
Emilio Cobos Álvarez a1f5f732e4 Bug 1893949 - Make the fix work on android properly too.
MANUAL PUSH: Orange fix CLOSED TREE
2024-05-01 03:01:32 +02:00
Natalia Csoregi f3ec5febcc Backed out 3 changesets (bug 1880503) for causing bustage on CrashReporterHost.h. CLOSED TREE
Backed out changeset 296455072556 (bug 1880503)
Backed out changeset 842611b8fcbc (bug 1880503)
Backed out changeset eae32f6ab26c (bug 1880503)
2024-04-30 18:26:00 +03:00
Jamie Nicol f4195b3022 Bug 1880503 - Ensure compositor reinitialization respects intended paused/resumed state. r=geckoview-reviewers,m_kato
When the Android frontend attempts to pause or resume the compositor
there is a chance this may fail. When this happens, the compositor
will automatically be reinitialized. However, it will currently be
reinitialized in the previous state, not the state the frontend
intended. For example, if the compositor fails to resume then it will
be reinitialized but remain in a paused state, displaying a blank
screen to the user.

To avoid this, we update the value of mCompositorPaused prior to
attempting to pause or resume the compositor. This means when
NotifyCompositorCreated eventually gets called, it knows the correct
state in which to initialize the compositor.

Differential Revision: https://phabricator.services.mozilla.com/D202165
2024-04-30 15:06:20 +00:00
Jamie Nicol eaa188054a Bug 1891726 - Supply thread name to JavaVM::AttachCurrentThread(). r=geckoview-reviewers,jrmuizel,m_kato
By default, AttachCurrentThread() overwrites the existing thread name
with "Thread-<n>", making it hard to identify these threads in a
debugger. By supplying the existing thread name as an argument to
AttachCurrentThread, we ensure that the thread keeps its name as
desired.

Differential Revision: https://phabricator.services.mozilla.com/D207559
2024-04-22 07:46:40 +00:00
Chris H-C 9e8450d739 Bug 1884526 - Remove GV support from Telemetry r=TravisLong,Dexter,owlish,geckoview-reviewers
This is actually the removal of two different deprecated geckoview adapters:
GV Persistence, and GV Streaming Telemetry.

GVP has been out of use for four years. GVST has had all of its data migrated
to direct Glean use back in February and has been deprecated for two versions.

Differential Revision: https://phabricator.services.mozilla.com/D207475
2024-04-18 17:24:04 +00:00
Chris Peterson fcd756c6eb Bug 1880917 - Remove pragmas disabling -Wc++2a-compat warnings in widget/android. r=geckoview-reviewers,m_kato
Now that -Wc++2a-compat is no longer enabled (bug 1887580), we don't need these pragmas disabling -Wc++2a-compat warnings about u8"" string literals' type changing from const char[] in C++17 to const char8_t[] in C++20.

Depends on D206742

Differential Revision: https://phabricator.services.mozilla.com/D206743
2024-04-08 20:03:24 +00:00
Emilio Cobos Álvarez 3a5519d46c Bug 1887552 - Simplify caret visibility code. r=sefeng,geckoview-reviewers
Make the "is hidden due to non-collapsed selection" use the regular
caret-hiding mechanism, so that we make sure nsCaret and paint are
consistent on their caret visibility.

As part of this simplification:

 * Remove LookAndFeel::IntID::ShowCaretDuringSelection, it's 0 on all
   platforms.

 * Remove nsCaret::IsMenuPopupHidingCaret. Is really broken as per the
   comments (it assumes single-process mode, doesn't deal with shadow
   dom, and it's not like it's particularly useful anyways since the
   menu popup could be semi-transparent or what not).

Differential Revision: https://phabricator.services.mozilla.com/D205557
2024-03-26 10:53:17 +00:00
jackyzy823 94a7d247eb Bug 1757352 - Dispatch contextMenu event when right-clicking. r=geckoview-reviewers,m_kato,botond
Differential Revision: https://phabricator.services.mozilla.com/D200462
2024-03-23 07:24:24 +00:00
Brad Werth e8fc3af8ac Bug 1764201 Part 1: Make widget::Screen track if the screen is HDR capable. r=geckoview-reviewers,ahale,m_kato
This duplicates existing HDR checks in gfxPlatformMac and
gfxWindowsPlatform. A later part of this patch series will remove that
redundant code, as it replaces calls to gfxPlatform functions with calls
to ScreenManager functions.

Differential Revision: https://phabricator.services.mozilla.com/D203670
2024-03-22 00:55:46 +00:00
Jamie Nicol f2dde55ddc Bug 1886715 - Block webgpu by default on Android. r=webgpu-reviewers,jimb
Currently webgpu is enabled by default on Nightly Android. As it is
currently receiving no testing at all, we should disable it by default
by adding a blocklist entry. Adventurous souls will still be able to
enable it by setting the pref gfx.webgpu.ignore-blocklist=true.

Differential Revision: https://phabricator.services.mozilla.com/D205300
2024-03-21 17:17:25 +00:00
Sandor Molnar 938c7c0e0d Backed out 3 changesets (bug 1764201) for causing multiple failures, including build bustages @ widget/windows/ScreenHelperWin.cpp CLOSED TREE
Backed out changeset ea6921c88429 (bug 1764201)
Backed out changeset ff751c2ce8ef (bug 1764201)
Backed out changeset 2d21d14a2df3 (bug 1764201)
2024-03-19 17:12:40 +02:00
Brad Werth 654c74bb8d Bug 1764201 Part 1: Make widget::Screen track if the screen is HDR capable. r=geckoview-reviewers,ahale,m_kato
This duplicates existing HDR checks in gfxPlatformMac and
gfxWindowsPlatform. A later part of this patch series will remove that
redundant code, as it replaces calls to gfxPlatform functions with calls
to ScreenManager functions.

Differential Revision: https://phabricator.services.mozilla.com/D203670
2024-03-19 13:52:31 +00:00
Gabriele Svelto e1e9346196 Bug 1831092 - Use the new pull-based API for all crash annotations and remove the global annotations table r=jgilbert,necko-reviewers,media-playback-reviewers,profiler-reviewers,win-reviewers,padenot,handyman,afranchuk,valentin,alwu,sotaro
This changes comes with several different refactorings all rolled into one,
unfotunately I couldn't find a way to pull them apart:
- First of all annotations now can either recorded (that is, we copy the value
  and have the crash reporting code own the copy) or registered. Several
  annotations are changed to use this functionality so that we don't need to
  update them as their value change.
- The code in the exception handler is modified to read the annotations from
  the mozannotation_client crate. This has the unfortunate side-effect that
  we need three different bits of code to serialize them: one for annotations
  read from a child process, one for reading annotations from the main process
  outside of the exception handler and one for reading annotations from the
  main process within the exception handler. As we move to fully
  out-of-process crash reporting the last two methods will go away.
- The mozannotation_client crate now doesn't record annotation types anymore.
  I realized as I was working on this that storing types at runtime has two
  issues: the first one is that buggy code might change the type of an
  annotation (that is record it under two different types at two different
  moments), the second issue is that types might become corrupt during a
  crash, so better enforce them at annotation-writing time. The end result is
  that the mozannotation_* crates now only store byte buffers, track the
  format the data is stored in (null-terminated string, fixed size buffer,
  etc...) but not the type of data each annotation is supposed to contain.
- Which brings us to the next change: concrete types for annotations are now
  enforced when they're written out. If an annotation doesn't match the
  expected type it's skipped. Storing an annotation with the wrong type will
  also trigger an assertion in debug builds.

Differential Revision: https://phabricator.services.mozilla.com/D195248
2024-03-04 10:24:43 +00:00
Chris Peterson f427a1474b Bug 1878465 - Change Android event error string from char8_t to char to fix C++20 build error. r=geckoview-reviewers,m_kato
When compiled with -std=c++17, `u8""` string literals have type `const char[]`. When compiled with -std=c++20, `u8""` strings have type `const char8_t[]`. `JS_ReportErrorUTF8()` has no override for `char8_t` strings, so `u8"Invalid event data property %s"` at https://searchfox.org/mozilla-central/rev/5eedf36dc46f1683af7478c7adaf308ceb42911b/widget/android/EventDispatcher.cpp#132 fails to compile. In this case, there's no reason for `"Invalid event data property %s"` to be a `u8` string because it contains no non-ASCII characters that would be encoded incorrectly. Plus, clang's default character encoding for .cpp files is UTF-8, so `u8` is redundant here.

widget/android/EventDispatcher.cpp:125:7: error: no matching function for call to 'JS_ReportErrorUTF8'
  125 |       JS_ReportErrorUTF8(
      |       ^~~~~~~~~~~~~~~~~~
obj-aarch64-unknown-linux-android/dist/include/js/ErrorReport.h:465:27: note: candidate function not viable: no known conversion from 'const char8_t[31]' to 'const char *' for 2nd argument
  465 | extern JS_PUBLIC_API void JS_ReportErrorUTF8(JSContext* cx, const char* format,
      |                           ^                                 ~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D200553
2024-02-22 17:40:21 +00:00
Emilio Cobos Álvarez cbb5a52d47 Bug 1881488 - Use a static pref for tooltip delay. r=masayuki,dom-core
It's 500 everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D202419
2024-02-22 12:59:41 +00:00
Makoto Kato 46414f7d37 Bug 1878599 - Allow to insert text on text control from dropping external application on Geckoview. r=masayuki,geckoview-reviewers,owlish
Android's drag and drop API will set a dropped item on `drop` event. But other
platforms will be set during `dragstart` event.

Editor's drag and drop event listener checks current dropped item on some
events such as `dragover` event in
`EditorEventListener::DragEventHasSupportingData`. Since there is no way to
set dropped item on `dragover` event, GeckoView will set temporary dropped
item with MIME type.

Differential Revision: https://phabricator.services.mozilla.com/D200618
2024-02-14 00:58:48 +00:00
Perry McManis 68edc94d59 Bug 1877576 - Migrate geckoview GVST probes r=geckoview-reviewers,perry.mcmanis,owlish
Most are brought over straightforwardly, their Telemetry callsites reworded
to use Glean, with mirroring to the Telemetry probes taken care of by the Glean
Interface For Firefox Telemetry (see the telemetry_mirror property).

There were some special cases:
* HistogramStopwatch becomes GleanStopwatch.
  After migration it was only serving Glean consumers.
  Could've used standard Glean APIs, but having something to hold the TimerIds
  was convenient.
* GV_STARTUP_MODULES_MS was removed.
  It was configured to only report for the `firefox` product,
  but could only have a value in `geckoview_streaming`,
  so never reported data.
* MEDIA_DECODING_PROCESS_CRASH was removed.
  It was configured to only report for the `firefox` product,
  but could only have a value in `geckoview_streaming`,
  so never reported data.
* GV_CONTENT_PROCESS_LIFETIME_MS was removed.
  It was configured to only report for the `geckoview_streaming` product,
  meaning it only reported data when used with GVST to reach the Glean
  `geckoview.content_process_lifetime` metric.
  This is now accomplished directly.
* GV_STARTUP_RUNTIME_MS was removed.
  Though it was configured to report data for both `firefox` and
  `geckoview_streaming` products, it only ever had values in geckoview.
  Its data continues to be reported via `geckoview.startup_runtime`.
* gecko.version and gecko.build_id (Scalars) were removed.
  In Firefox Desktop this information is available in the `application`
  section of the Environment.
  In geckoview-using products, this information continues to be available via
  `geckoview.version` and `geckoview.build_id`.
* GV_STARTUP_RUNTIME_MS and GV_CONTENT_PROCESS_LIFETIME_MS are handled oddly.
  Since those probes were recorded in the Java portion of the code,
  and that portion doesn't include Glean,
  we use `nativeAddHistogram` to relay the samples for those two pieces of
  instrumentation.
  If there will be more instrumentation landing in that part of the code,
  I recommend you review the instructions for including the Glean SDK in a
  library, and retire this use of JNI.

Differential Revision: https://phabricator.services.mozilla.com/D200094
2024-02-09 21:11:05 +00:00