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

29820 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 47d1f077af Bug 1755737 - Make layout.css.dpi a static pref. r=jfkthame,layout-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D138921
2022-02-16 17:39:57 +00:00
Andrew Osmond 60e09748cb Bug 1755441 - Stop padding driver versions on platforms other than Windows. r=jrmuizel
Windows has different driver version semantics than other platforms. We
shouldn't pad the driver versions the same way on Linux/OSX/Android for
our blocklist rules and instead just take the numbers as given. This
really only impacted Linux since it had numerous blocklist rules which
depending on the vendor or Mesa driver versions.

Differential Revision: https://phabricator.services.mozilla.com/D138905
2022-02-16 17:19:05 +00:00
Mirko Brodesser 397f4fc254 Bug 1755481: correct documentation of `nsIClipboard::getData`. r=mccr8
Before, it was confusing. One could have assumed that the method gets
the data for all flavors.

Differential Revision: https://phabricator.services.mozilla.com/D138776
2022-02-16 15:38:27 +00:00
Makoto Kato 3b00604204 Bug 1677464 - Set screen orientation type and angle from OS API. r=gsvelto
Windows can get current screen orientation from OS API.

Differential Revision: https://phabricator.services.mozilla.com/D138880
2022-02-16 12:55:56 +00:00
Norisz Fay eef7d5c5ac Backed out changeset 00f6bd7aa727 (bug 1755481) for causing multiple clipboard related failures CLOSED TREE 2022-02-16 12:14:58 +02:00
Mirko Brodesser 8aa76ff1d7 Bug 1755481: rename `nsIClipboard::getData` to `nsIClipboard::getSomeData` and document it. r=mccr8
Before, it was confusing. One could have assumed that the method gets
the data for all flavors.

Differential Revision: https://phabricator.services.mozilla.com/D138776
2022-02-16 09:03:00 +00:00
Hiroyuki Ikezoe 5f2996def4 Bug 1755422 - Set swipe tracker prefs in browser_test_swipe_gesture.js. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D138861
2022-02-16 06:42:20 +00:00
Shazib Summar b8d30e610b Bug 1617283 - Removed COM violations and shifted AudioSession to MTA r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D136377
2022-02-15 22:28:41 +00:00
Emilio Cobos Álvarez 28290f66db Bug 1754858 - Simplify screen orientation API implementation. r=smaug,m_kato,geckoview-reviewers
Make the ScreenOrientation part of the screen struct, as it should. Stop
using HAL to propagate just screen orientation updates, use the more
general screen manager.

Instead of HAL observers, add a simple observer service notification,
and clean a bunch of the code.

This will simplify bug 1754802 a bit, and is generally simpler.
Shouldn't change behavior. I've tested the events and some common
orientation locking use cases like Youtube, and they behave the same.

Differential Revision: https://phabricator.services.mozilla.com/D138477
2022-02-15 20:22:54 +00:00
sotaro 2daf591edf Bug 1732737 - Add VirtualDesktop handling to window occlusion on Windows r=gfx-reviewers,bradwerth
Implementation of WindowOcclusionCalculator::Initialize() is borrowed from InitializeVirtualDesktopManagerTask::Run().
And implementation of WindowOcclusionCalculator::IsWindowOnCurrentVirtualDesktop() is borrowed from chromium's WindowOcclusionCalculator::IsWindowOnCurrentVirtualDesktop()

Differential Revision: https://phabricator.services.mozilla.com/D133327
2022-02-15 14:33:06 +00:00
Masayuki Nakano 8afd3c5af5 Bug 1191862 - part 3: Make `GlobalKeyListener` not reserve key combination which is mapped to an edit command or a navigation command by native key bindings r=NeilDeakin,smaug
Users may map reserved shortcut keys of Firefox/Thunderbird as an editing
command or a navigation command.  Therefore if and only if an editable element
has focus and a reserved key combination is mapped to an editing command or
a navigation command by the system settings, we should allow to dispatch it
into the content and work it as what user expects.

With this change, keyboard only users may loose some shortcut keys to leave
from a web content which blocks keyboard focus in it.  However, there may
be another reserved shortcut keys to escape from such web apps only with
keyboard because it's hard to think that all reserved shortcut keys conflict
with users' settings.

Differential Revision: https://phabricator.services.mozilla.com/D138009
2022-02-15 08:00:06 +00:00
Masayuki Nakano 4e5ab7b4f1 Bug 1191862 - part 2: Make `TextEventDispatcher` store writing mode at selection at receiving focus notification r=m_kato
Querying selection for getting writing mode may run script in the main process
if focus is in it.  For avoiding new users of writing mode at selection **only**
when the value is required during an editable content has focus,
`TextEventDispatcher` should always store writing mode at receiving focus
notification.

Differential Revision: https://phabricator.services.mozilla.com/D138008
2022-02-15 08:00:06 +00:00
Masayuki Nakano d450beac6f Bug 1191862 - part 1: Make `nsIWidget::NativeKeyBindingsType` independent from `nsIWidget` and defined in an independent header file r=smaug
I'd like to use it in `IMEData.h`.  However, adding new include into it may
cause bustage with MinGW, and it's included by `nsIWidget.h` because `nsIWidget`
requires some classes defined in `IMEData.h`.  Therefore, I'd like to make a
new header file for avoiding the include hell.

Differential Revision: https://phabricator.services.mozilla.com/D138007
2022-02-15 08:00:05 +00:00
Hiroyuki Ikezoe 554dfc9c32 Bug 1753146 - Add preferences for tweaking swipe gestures. r=tnikkel
And use 2x threshold value to trigger each SwipeGesture for Windows.

Differential Revision: https://phabricator.services.mozilla.com/D138237
2022-02-14 22:12:20 +00:00
Hiroyuki Ikezoe 955ca926b3 Bug 1753146 - Drop unused kRubberBandResistanceFactor. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D138236
2022-02-14 22:12:20 +00:00
Cristian Tuns eaf42f1f14 Backed out changeset 39c7765869e9 (bug 1754219) for causing build bustages on GfxDriverInfo.cpp CLOSED TREE 2022-02-14 15:12:50 -05:00
Jeff Muizelaar f32ded62e5 Bug 1754219 - Move to a WebRender blocklist for Nvidia on Windows. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D138150
2022-02-14 19:36:30 +00:00
Emilio Cobos Álvarez 51f5539b57 Bug 1754813 - Make Hal::ScreenOrientation an enum class. r=gsvelto,m_kato,geckoview-reviewers
This adds proper IPC validation too.

Differential Revision: https://phabricator.services.mozilla.com/D138461
2022-02-14 07:51:06 +00:00
Emilio Cobos Álvarez c7de191b45 Bug 1147847 - Allow users to enable overlay scrollbars on Linux from about:preferences. r=Gijs,fluent-reviewers,preferences-reviewers
We might want to do this on Windows 11 as well, but Windows 11 has a
system-wide preference with UI so let's not do that just yet at least,
UI-exposed preference.

Differential Revision: https://phabricator.services.mozilla.com/D138502
2022-02-14 07:43:42 +00:00
Ray Kraesig 8fdfb93360 Bug 302092 - Perform various minor modernizations r=handyman
Perform some cleanup to bring the code in this function closer to modern
standards. (This includes, but is not limited to, the simple
variable-name change requested by the Bugzilla bug.)

This commit should have no effective functional changes.

Tested via `browser/base/content/test/general/browser_clipboard.js`,
which was confirmed to complain if changes were made to this function's
output (and, specifically, to the values in the start- and
end-positions).

Differential Revision: https://phabricator.services.mozilla.com/D138087
2022-02-11 22:53:12 +00:00
Emilio Cobos Álvarez f25b45a97f Bug 1751644 - Don't shrink padding of non-native menulist items. r=stransky
Native ones also have a big-ish padding (set by the theme).

Differential Revision: https://phabricator.services.mozilla.com/D136813
2022-02-11 18:41:46 +00:00
Florian Quèze 7b45ca4063 Bug 1754519 - Add missing profiler_thread_sleep annotations, r=gerald,necko-reviewers,kershaw.
Differential Revision: https://phabricator.services.mozilla.com/D138341
2022-02-11 15:19:46 +00:00
stransky 7d218e435f Bug 1743365 [Linux] Cache clipboard targets r=emilio
nsClipboard::HasDataMatchingFlavors() calls nsRetrievalContext::GetTargets() which obtains clipboard targets. We need to call Gtk code for that and spin evetn loop to get the targets.
In this patch we store clipboard tragets internally to speed up nsClipboard::HasDataMatchingFlavors() calls. We also listen at owner-change signal to clear target cache when clipboard content changes.

Differential Revision: https://phabricator.services.mozilla.com/D137899
2022-02-11 07:43:11 +00:00
Emilio Cobos Álvarez 5fed8de04b Bug 1754547 - Generalize moz-os-version into moz-platform. r=dao,preferences-reviewers,Gijs
Allow differentiating non-windows platforms on it.

Differential Revision: https://phabricator.services.mozilla.com/D138431
2022-02-10 15:50:31 +00:00
Emilio Cobos Álvarez 969e514b9a Bug 1754275 - Port nsGIOService::OrgFreedesktopFileManager1ShowItems to use GDBusProxy. r=stransky
GDBusProxy is not deprecated, and allows having time outs.

Differential Revision: https://phabricator.services.mozilla.com/D138287
2022-02-10 12:19:59 +00:00
Hiroyuki Ikezoe e1d5377755 Bug 1754674 - Send a pan end event before momentum events on Windows. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D138401
2022-02-10 07:24:59 +00:00
Masayuki Nakano 37e94b914c Bug 1754367 - Get rid of `WidgetGUIEvent::mPluginEvent` r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D138257
2022-02-10 00:39:42 +00:00
Jamie Nicol 8fb7eecd6e Bug 1754334 - Return error when GPU process crash occurs during screen pixels request. r=agi
In bug 1750569 we attempted to ensure that following a GPU process
crash outstanding screen pixels requests would be fulfilled. While
this usually worked there was a race condition between sending the
request to the new compositor and the content process sending the
display list to the new compositor, which meant that sometimes we
would screenshot an empty screen instead of the page content.

As a GPU process crash is an extraordinary circumstance and
screenshots are non-critical, the best solution is to simply return an
error if a GPU process crash occurs while there is an outstanding
request (or if a new request is made whilst the GPU process is
restarting). This patch also updates the junit test to check for this
error rather than expecting a screenshot to be returned.

Differential Revision: https://phabricator.services.mozilla.com/D138323
2022-02-09 19:36:49 +00:00
Nika Layzell dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Nika Layzell 91ec85c593 Bug 1752444 - Part 2: Rewrite direct_call.py protocols to use {Parent,Child}Impl attributes, r=ipc-reviewers,media-playback-reviewers,alwu,mccr8
This is a mechanical change which was performed by a script based on the
contents of direct_call.py, and then manually checked over to fix
various rewriting bugs caused by my glorified sed script. See the
previous part for more context on the change.

Differential Revision: https://phabricator.services.mozilla.com/D137227
2022-02-09 17:29:46 +00:00
Emilio Cobos Álvarez 6f9c285bd9 Bug 1754225 - Some more trivial clean-ups to the cocoa scrollbar drawing code. r=mstange
Use LayoutDeviceRect consistently, and add default initializers.

Differential Revision: https://phabricator.services.mozilla.com/D138164
2022-02-09 11:27:16 +00:00
Emilio Cobos Álvarez f4cdc0bbf9 Bug 1754225 - Move a bunch of cocoa-specific scrollbar code to ScrollbarDrawingCocoa.cpp. r=mstange
Drive-by but we can do this now that this code is not needed by
nsNativeThemeCocoa (bug 1749531).

Differential Revision: https://phabricator.services.mozilla.com/D138083
2022-02-09 11:27:16 +00:00
Emilio Cobos Álvarez 2ef346a2f5 Bug 1754225 - Allow using dark themed scrollbars on GTK too. r=stransky,mstange
This is faster and more straight-forward code than the old
ShouldUseDarkScrollbar shenanigans, and allows to have dark-themed
scrollbars.

Differential Revision: https://phabricator.services.mozilla.com/D138077
2022-02-09 11:27:16 +00:00
Makoto Kato b2edc6930a Bug 1753919 - Allow non-copy C++ object for GeckoResult paramenter. r=geckoview-reviewers,bholley,agi
Actually, we require that the parameter of promise by `GeckoResult` has copy
constructor. We should allow non-copy C++ class for this parameter.

Differential Revision: https://phabricator.services.mozilla.com/D137974
2022-02-09 06:59:52 +00:00
Makoto Kato 926307a1d7 Bug 1753919 - AndroidWebAuthnTokenManager uses GeckoResult directly instead of callback. r=geckoview-reviewers,agi
Since WebAuthnTokenManager uses GeckoReuslt, we can remove callback of WebAuthnTokenManager.

Differential Revision: https://phabricator.services.mozilla.com/D137973
2022-02-09 06:59:52 +00:00
Daniel Holbert d724bbe121 Bug 1754105: Fix non-unified build errors in layout/xul, and mark it as safe to build in non-unified mode. r=emilio
Build errors being fixed here:

layout/xul/nsDeckFrame.cpp:164:43: error: unknown type name 'nsSetAttrRunnable'

layout/xul/nsMenuBarListener.cpp:45:7: error: cannot initialize a member subobject of type 'mozilla::dom::EventTarget *' with an rvalue of type 'nsINode::Document *' (aka 'mozilla::dom::Document *')
(...where "Document" is not defined; this patch includes the header that defines it, which fixes this.)

layout/xul/nsBoxFrame.cpp:270:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]

dist/include/nsIRollupListener.h:36:38: error: no type named 'LayoutDeviceIntPoint' in namespace 'mozilla'
(For this error, this patch is changing a header outside of layout/xul, but
it's still required in order for layout/xul to build properly, since it's
#included by layout/xul/nsXULPopupManager.cpp (indirectly, via its .h file).

Differential Revision: https://phabricator.services.mozilla.com/D138092
2022-02-08 20:16:55 +00:00
Emilio Cobos Álvarez 91ee8905cc Bug 1753830 - Take GTK unthemed scrollbar colors from Adwaita. r=stransky
Rather than windows 10, which has much wider scrollbars.

Differential Revision: https://phabricator.services.mozilla.com/D137938
2022-02-08 16:36:12 +00:00
Emilio Cobos Álvarez 20a681b496 Bug 1753830 - Add a pref to allow disabling themed scrollbar colors. r=stransky
This is useful for testing.

Differential Revision: https://phabricator.services.mozilla.com/D137937
2022-02-08 16:36:12 +00:00
Jamie Nicol a01c2107a2 Bug 1754159 - Correctly wait for GPU process to be restarted in test. r=tnikkel
Bug 1742985 added the test helper_zoom_after_gpu_process_restart.html,
but it doesn't actually get run on any platform with the GPU process
enabled. (Due to bug 1495580 on windows, and because the GPU process
isn't yet enabled on android.)

The test kills the GPU process, then tries to wait for it to be
restarted before proceeding. However, the function
ensureGPUProcessReadyForTests doesn't always work as intended, as the
GPUProcessManager may not have yet noticed that the process has been
killed, and therefore may return immediately from EnsureGPUReady.

This patch removes the buggy ensureGPUProcessReadyForTests function,
and instead makes the test wait for the "compositor-reinitialized"
topic to be observed.

Differential Revision: https://phabricator.services.mozilla.com/D138125
2022-02-08 12:06:15 +00:00
criss 9d316600e9 Backed out changeset 4faa7eb5aed9 (bug 1732737) for causing GTets failures 2022-02-08 09:38:23 +02:00
Iulian Moraru 5d2d64aa7e Backed out changeset c43ced1d19d9 (bug 1754105) for causing bp-hybrid bustages on nsBoxFrame. 2022-02-08 07:46:15 +02:00
Daniel Holbert dbdeaeabaf Bug 1754105: Fix non-unified build errors in layout/xul, and mark it as safe to build in non-unified mode. r=emilio
Build errors being fixed here:

layout/xul/nsDeckFrame.cpp:164:43: error: unknown type name 'nsSetAttrRunnable'


layout/xul/nsMenuBarListener.cpp:45:7: error: cannot initialize a member subobject of type 'mozilla::dom::EventTarget *' with an rvalue of type 'nsINode::Document *' (aka 'mozilla::dom::Document *')
(...where "Document" is not defined; this patch includes the header that defines it, which fixes this.)


dist/include/nsIRollupListener.h:36:38: error: no type named 'LayoutDeviceIntPoint' in namespace 'mozilla'
(For this error, this patch is changing a header outside of layout/xul, but
it's still required in order for layout/xul to build properly, since it's
#included by layout/xul/nsXULPopupManager.cpp (indirectly, via its .h file).

Differential Revision: https://phabricator.services.mozilla.com/D138092
2022-02-08 01:04:19 +00:00
Masayuki Nakano df03fca056 Bug 1753173 - part 2: Make `IMContextWrapper` set IME focus at receiving `NOTIFY_IME_OF_FOCUS` r=m_kato
Currently, it sets "input-purpose" and "input-hints" and notify IME of focus
at updating `InputContext`.  This occurs before receiving `NOTIFY_IME_OF_FOCUS`.
Therefore, at the moment, `IMContextWrapper` cannot access content cache, but
IME may query it.  E.g., IME may start composition immediately
(ibus-pinyin 1.5.0-6 does it).

For avoiding the trouble, `IMContextWrapper` should notify IME of focus when
and only when it receives `NOTIFY_IME_OF_FOCUS`.

Differential Revision: https://phabricator.services.mozilla.com/D137610
2022-02-08 00:41:12 +00:00
Masayuki Nakano 956a5e7150 Bug 1752956 - Make `IMEContentObserver` invalidate selection cache when it gets DOM mutations r=m_kato
Oddly, in some complicated web apps, `IMEContentObserver` may get selection
change notifications **after** sending a text change notification to IME.
However, I cannot reproduce it with simple testcase.  Therefore, the new test
does not test the original issue, but the approach of this patch must avoid
regressions of this special case handling.

Differential Revision: https://phabricator.services.mozilla.com/D137522
2022-02-08 00:13:21 +00:00
sotaro 6d6928bdcf Bug 1732737 - Add VirtualDesktop handling to window occlusion on Windows r=gfx-reviewers,bradwerth
Implementation of WindowOcclusionCalculator::Initialize() is borrowed from InitializeVirtualDesktopManagerTask::Run().
And implementation of WindowOcclusionCalculator::IsWindowOnCurrentVirtualDesktop() is borrowed from chromium's WindowOcclusionCalculator::IsWindowOnCurrentVirtualDesktop()

Differential Revision: https://phabricator.services.mozilla.com/D133327
2022-02-08 00:13:09 +00:00
Masayuki Nakano 69c1675bde Bug 1746104 - part 7: Make `eQuerySelectedText` event and `ContentEventHandler` work with no selection ranges r=m_kato
Finally, making `WidgetQueryContentEvent::Succeeded` return `true` when there
is no selection when its message is `eQuerySelectedText`, and making
`ContentEventHandler::OnQuerySelectedText` set the no selection range data even
when the queried selection type is "normal.  Then, all things which are
changed by the previous patches start to work.

And this patch adds a simple test for `ContentCache` and update tests of
`nsITextInputProcessor`.

Differential Revision: https://phabricator.services.mozilla.com/D137432
2022-02-07 22:33:41 +00:00
Masayuki Nakano 1f3b6b7927 Bug 1746104 - part 6-5: Make `ContentCache` not stop caching other data when it fails caching something r=m_kato
Currently, `mSelection` is cached only when `mText` is some, text rects are
cached only when `mSelection` is cached.  However, as far as widget can work
with IME, it should cache content as far as possible.  Therefore, this patch
makes it keep querying content data even after something fails.

Differential Revision: https://phabricator.services.mozilla.com/D137431
2022-02-07 22:33:41 +00:00
Masayuki Nakano 31390e88e6 Bug 1746104 - part 6-4: Make `ContentCacheInParent` and `ContentCacheInChild` handle the case there is no selection range r=m_kato
Even after applying this patch, it still returns error when queried with a
relative offset from selection and only when there is no composition string.
However, this shouldn't cause any problem because in this case, widget should
not try to query content with relative offset.

Differential Revision: https://phabricator.services.mozilla.com/D137430
2022-02-07 22:33:40 +00:00
Masayuki Nakano 55bc376f36 Bug 1746104 - part 6-3: Wrap `ContentCache::mText` with `Maybe` r=m_kato
For managing the state of text content cache independent from selection, it
should be wrapped with `Maybe`.

Differential Revision: https://phabricator.services.mozilla.com/D137429
2022-02-07 22:33:40 +00:00
Masayuki Nakano 47397b7081 Bug 1746104 - part 6-2: Make constructors of `ContentCache::Selection` take `IMENotification::SelectionChangeData` or `WidgetQueryContentEvent` r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D137428
2022-02-07 22:33:40 +00:00