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

30968 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 042fc35bec Bug 1798117 - Only flush clipboard for text data. r=smaug
Otherwise Chromium gets confused when pasting (Signal is an Electron
application).

I need to dig a bit more, but this doesn't prevent the fix for
bug 1774285 from working, and fixes the issue here.

It's probably a Chromium bug that this doesn't work tho since,
as mentioned in comment 0, it works on other Windows applications.

Differential Revision: https://phabricator.services.mozilla.com/D160808
2022-11-01 17:58:45 +00:00
Cristian Tuns 47601caf13 Backed out changeset 6d8714cc305a (bug 1788720) for causing geckoview failures on clickNotificationParceled CLOSED TREE 2022-11-01 14:00:27 -04:00
Arturo Mejia b2bb2aa95a Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-11-01 16:49:12 +00:00
Jonathan Watt 2b527f4d33 Bug 1755153 p2 - Prevent saving print settings to prefs if print.save_print_settings=false. r=emilio
Depends on D146943

Differential Revision: https://phabricator.services.mozilla.com/D146944
2022-10-30 10:32:28 +00:00
Jonathan Watt 17f8eb8dec Bug 1755153 p1 - Centralize saving of last used printer name. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D146943
2022-10-30 10:32:28 +00:00
Emilio Cobos Álvarez 49e9630d14 Bug 1798160 - Avoid flushing the clipboard sync for images and files. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D160666
2022-10-29 19:48:32 +00:00
Cosmin Sabou 76db5a7d62 Backed out changeset c7074f4cf73c (bug 1788720) for causing geckoview failures on PermissionDelegateTest. CLOSED TREE 2022-10-28 22:03:56 +03:00
Greg Stoll e74b38cd42 Bug 1788271 - Part 3: richer logging for a bunch of Windows messages r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159199
2022-10-28 18:19:40 +00:00
Greg Stoll 87d8e86585 Bug 1788271 - Part 2.5: add tests for Window message logging utilities r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159609
2022-10-28 18:19:40 +00:00
Greg Stoll 8a57084885 Bug 1788271 - Part 2: set up utilities to log more info about Windows messages r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159198
2022-10-28 18:19:40 +00:00
Greg Stoll 290dbe1b3c Bug 1788271 - Part 1: log some Windows messages before and after we process them r=handyman
Differential Revision: https://phabricator.services.mozilla.com/D159197
2022-10-28 18:19:39 +00:00
Daniel Holbert 16170f25a6 Bug 1797840: Replace stray tab characters with spaces in IDL files throughout the tree. r=mccr8,necko-reviewers,credential-management-reviewers,smaug,sgalich,valentin
DONTBUILD because this is just whitespace cleanup.

I found the files to fix up here using this command:
    grep -r '   ' * 2>/dev/null | grep -v "other-licenses" | grep "idl:"

I replaced the tab characters with however many spaces seemed consistent with
the indentation in the surrounding code (and did some minor space-indentation
cleanup in contextual lines to preserve alignment, in a few cases).

Differential Revision: https://phabricator.services.mozilla.com/D160577
2022-10-28 18:08:17 +00:00
Arturo Mejia fd35bab7a0 Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-10-28 14:00:45 +00:00
James Teh 681e69a5ca Bug 1774285 - Avoid a11y instantiation after clipboard copy. r=nlapre,jamie CLOSED TREE
This prevents a11y from getting instantiated shortly after clipboard paste, in
order to prevent hangs with the Windows 11 suggested actions feature.

When combined with the previous patch, the behavior is the following:

 * For users with a11y already-enabled:

   * No hang (due to clipboard flush).
   * Quick actions menu is positioned at selection offset.

 * For users with a11y disabled (most):

   * No hang (due to no a11y instantiation + clipboard flush).
   * Quick actions menu is positioned at pointer (cursor) offset.

Co-Authored-By: Emilio Cobos Álvarez <emilio@crisal.io>

Differential Revision: https://phabricator.services.mozilla.com/D160652

Depends on D160646
2022-10-28 14:48:25 +00:00
James Teh 307f9e48aa Bug 1774285 - On Windows 11 22H2, flush the Windows clipboard immediately after setting it. r=neildeakin
This works around a windows 11 suggested actions bug, see comment.

Differential Revision: https://phabricator.services.mozilla.com/D160646
2022-10-28 14:17:54 +00:00
Andrew Osmond 77b6b3ccc7 Bug 1794722 - Part 3. Remove all uses of GfxInfo::GetWebRenderEnabled. r=jrmuizel,webcompat-reviewers,twisniewski
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160122
2022-10-28 12:36:06 +00:00
Andrew Osmond 9d245b8325 Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160121
2022-10-28 12:36:06 +00:00
Andrew Osmond 53608b802f Bug 1794722 - Part 1. Remove WebRender from the GfxInfo allowlist. r=jrmuizel
WebRender is a mature feature. We should start blocking it on known bad
devices over allowlisting known good devices. This may enable WebRender
in a few more obscure places than we shipped before.

Differential Revision: https://phabricator.services.mozilla.com/D160120
2022-10-28 12:36:05 +00:00
Cristian Tuns 1303ee58d8 Backed out 3 changesets (bug 1794722) for causing multiple failures on RemoteProcessMonitor CLOSED TREE
Backed out changeset 0217af5b1aa6 (bug 1794722)
Backed out changeset d7805be9dfb3 (bug 1794722)
Backed out changeset 0093f071f1a5 (bug 1794722)
2022-10-27 20:52:36 -04:00
Andrew Osmond f8dc716e8d Bug 1794722 - Part 3. Remove all uses of GfxInfo::GetWebRenderEnabled. r=jrmuizel,webcompat-reviewers,twisniewski
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160122
2022-10-28 00:08:04 +00:00
Andrew Osmond 93abf26cbc Bug 1794722 - Part 2. Remove all uses of gfxVars::UseWebRender(). r=jrmuizel,media-playback-reviewers,alwu
This is always true.

Differential Revision: https://phabricator.services.mozilla.com/D160121
2022-10-28 00:08:03 +00:00
Andrew Osmond b01099b79d Bug 1794722 - Part 1. Remove WebRender from the GfxInfo allowlist. r=jrmuizel
WebRender is a mature feature. We should start blocking it on known bad
devices over allowlisting known good devices. This may enable WebRender
in a few more obscure places than we shipped before.

Differential Revision: https://phabricator.services.mozilla.com/D160120
2022-10-28 00:08:03 +00:00
sotaro 9f92330280 Bug 1797464 - Enable/disable window occlusion only when compositor session exists on Windows r=gfx-reviewers,lsalzman
When compositor session exists, gfxConfig is already initialized.

If first AppWindow is destroyed in nsAppShellService::JustCreateTopWindow() because of error, the first window could be destroyed before calling gfxConfig::Init(). gfxConfig::Init() is called from gfxPlatform::GetPlatform(). gfxPlatform::GetPlatform() is called just before creating compositor by nsBaseWidget::CreateCompositor()

Differential Revision: https://phabricator.services.mozilla.com/D160453
2022-10-27 12:06:42 +00:00
sotaro 41bf2e8ee2 Bug 1796527 - Let reuse decoder device to release on non-intel GPUs on Windows r=jrmuizel,gfx-reviewers
Reuse decoder device is already enabled on Intel and AMD GPUs on release.

Differential Revision: https://phabricator.services.mozilla.com/D160010
2022-10-27 10:12:05 +00:00
Jamie Nicol 6511f3c4e5 Bug 1797055 - Force crash early if compositor is resumed with abandoned Surface. r=geckoview-reviewers,m_kato
In bug 1772839 we were seeing a large number of crashes due to
encountering a webrender error after exhausting all fallback
configurations. At least in some cases, this was due to the compositor
being resumed with an Android Surface that was already in an abandoned
state, meaning we can never succeed in creating an EGL Surface.

We added a check for this condition, and a workaround, to the
GeckoView java code. However, we are still seeing crash reports
matching this signature. To help determine whether these are also due
to the Surface being abandoned, or due to some other reason, this
patch adds a deliberate crash much earlier in the pipeline if we
detect an abandoned Surface.

Differential Revision: https://phabricator.services.mozilla.com/D160042
2022-10-27 08:01:28 +00:00
Andrew Osmond a377b7bb98 Bug 1797580 - Fix broken assumptions with allowlists and the downloadable blocklist. r=jrmuizel
Ensure that when we evaluate the downloadable blocklist, we actually
only use the downloadable blocklist. We should not include any platform
specific checks in these prefs, as it causes confusion about why the
prefs were set in the first place. Allowlisted features should be
ignored when evaluating the downloadable blocklist; if we wish to
override the ALLOW/ALLOW_QUALIFIED/DENIED statuses, we should use OK or
BLOCKED_DEVICE or similar instead.

This caused allowlisted features (like WebRender) to be taken away from
users in the most recent nightly.

Differential Revision: https://phabricator.services.mozilla.com/D160408
2022-10-27 01:12:50 +00:00
Emilio Cobos Álvarez 1731cea050 Bug 1797463 - Prevent windows widget sizemode from getting out of sync. r=cmartin
If we get via OnFrameChanging, we compute a new sizemode, but never store it on
the widget, yet we notify that it has changed.

We were relying on a call to mWindow->SetSizeMode from the widget delegate
which I removed in:

  c9785cd100

Instead, call EnsureSizeMode to make sure we already have the right sizemode
when notifying our listener.

Differential Revision: https://phabricator.services.mozilla.com/D160365
2022-10-26 23:09:57 +00:00
Marian-Vasile Laza a0fe811cf3 Backed out changeset 9cda62240050 (bug 1788720) for causing linting failures. CLOSED TREE 2022-10-27 01:49:08 +03:00
Arturo Mejia bd826e4068 Bug 1788720 - Expose private browsing flag in StorageController.getPermissions r=geckoview-reviewers,jonalmeida
Differential Revision: https://phabricator.services.mozilla.com/D160424
2022-10-26 21:56:06 +00:00
Marian-Vasile Laza babfa4a3b5 Backed out changeset cf1b318a7a98 (bug 1797463) for causing mochitest failures on test_sizemode_events.xhtml. CLOSED TREE 2022-10-27 01:15:50 +03:00
Marian-Vasile Laza b17847153a Backed out changeset 71b829538175 (bug 1797580) for causing xpcshell failures on test_gfxBlacklist_Version.js. 2022-10-27 01:14:25 +03:00
Emilio Cobos Álvarez 245ba2bb1f Bug 1797463 - Prevent windows widget sizemode from getting out of sync. r=cmartin
If we get via OnFrameChanging, we compute a new sizemode, but never store it on
the widget, yet we notify that it has changed.

We were relying on a call to mWindow->SetSizeMode from the widget delegate
which I removed in:

  c9785cd100

Instead, call EnsureSizeMode to make sure we already have the right sizemode
when notifying our listener.

Differential Revision: https://phabricator.services.mozilla.com/D160365
2022-10-26 20:32:16 +00:00
Andrew Osmond 351c4a5bac Bug 1797580 - Fix broken assumptions with allowlists and the downloadable blocklist. r=jrmuizel
Ensure that when we evaluate the downloadable blocklist, we actually
only use the downloadable blocklist. We should not include any platform
specific checks in these prefs, as it causes confusion about why the
prefs were set in the first place. Allowlisted features should be
ignored when evaluating the downloadable blocklist; if we wish to
override the ALLOW/ALLOW_QUALIFIED/DENIED statuses, we should use OK or
BLOCKED_DEVICE or similar instead.

This caused allowlisted features (like WebRender) to be taken away from
users in the most recent nightly.

Differential Revision: https://phabricator.services.mozilla.com/D160408
2022-10-26 20:29:13 +00:00
stransky 3cc418b893 Bug 1796751 [Wayland] Apply negative coordinates workaround to GdkWindow too r=emilio
Depends on D160343

Differential Revision: https://phabricator.services.mozilla.com/D160344
2022-10-26 11:47:33 +00:00
stransky 5e9381b0ad Bug 1796751 [Wayland] Apply negative coordinates workaround to GDK_WINDOW_TEMP GdkWindow r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160343
2022-10-26 11:47:33 +00:00
stransky 6f3cbe6f22 Bug 1797470 Remove MOZ_GTK_DRAG_RESULT_* r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160348
2022-10-26 11:00:01 +00:00
stransky c5fd68828c Bug 1794613 [Wayland] Don't make tooltips modal r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160328
2022-10-26 09:01:16 +00:00
stransky e5f83b8dd1 Bug 1796103 [Wayland] Log move-to-rect params r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159691
2022-10-26 08:58:24 +00:00
stransky fda76755db Bug 1797309 [Wayland] Use correct popup to calculate parent position for wl_subsurface popups r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D160223
2022-10-25 18:36:51 +00:00
Andrew Osmond 4d2f660e66 Bug 1793218 - Refactor gfx blocklist pref management to avoid missing features/status codes. r=gfx-reviewers,lsalzman
We have added a number of new status codes, for the allowlist and new
errors that were not previously handled by the code managing the gfx
blocklist prefs. We also now iterate over the range of features instead
of manually listing the features, as some were missed during previous
additions.

Differential Revision: https://phabricator.services.mozilla.com/D160053
2022-10-25 15:32:18 +00:00
stransky 0970447a78 Bug 1797046 [Wayland] Use mBounds to get Wayland popup coordinates for nsWindow::WidgetToScreenOffset() r=emilio
Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/5287 we can't use gdk_window_get_origin() on wl_subsurface Wayland popups.
In this patch we switch to mBounds to return popup position by nsWindow::WidgetToScreenOffset().

Differential Revision: https://phabricator.services.mozilla.com/D160048
2022-10-25 12:00:32 +00:00
Masayuki Nakano 6facd41997 Bug 1796044 - part 16: Make `intl.tsf.enable` a static pref and rename it r=m_kato
Some users may keep disabling TSF while we were improving TSF implementation due
to avoiding some bugs.

Currently, we don't test IMM handler.  Therefore, I think that we should rename
the pref and make users run well-tested path to handle IME.

Depends on D159818

Differential Revision: https://phabricator.services.mozilla.com/D159819
2022-10-25 07:07:01 +00:00
Masayuki Nakano a7a7af15f2 Bug 1796044 - part 15: Make `intl.tsf.support_imm` a static pref r=m_kato
This pref is used for behavior check of how newer TSF behave without IMC.
Therefore, this shouldn't be used by users.  However, like bug 1367692 and
bug 1409155, this may be useful when we meet a critical bug of old IME in
newer Windows.  Thus we should keep this pref.

Depends on D159817

Differential Revision: https://phabricator.services.mozilla.com/D159818
2022-10-25 07:07:00 +00:00
Masayuki Nakano 4deece589a Bug 1796044 - part 14: Get rid of `intl.tsf.associate_imc_only_when_imm_ime_is_active` r=m_kato
It's introduced in bug 1367692 to make it possible to test the bug of old
MS-IME on Windows 10 with later versions.  Now, the bug and the old versions
have gone.  Therefore, we don't need this pref anymore.

Depends on D159816

Differential Revision: https://phabricator.services.mozilla.com/D159817
2022-10-25 07:07:00 +00:00
Masayuki Nakano b224ff9c39 Bug 1796044 - part 13: Make `intl.tsf.hack.atok.search_input_scope_disabled` a static pref r=m_kato
Depends on D159815

Differential Revision: https://phabricator.services.mozilla.com/D159816
2022-10-25 07:06:59 +00:00
Masayuki Nakano 8edfa64e2d Bug 1796044 - part 12: Make `intl.tsf.hack.ms_traditional_chinese.query_insert_result` a static pref r=m_kato
Depends on D159814

Differential Revision: https://phabricator.services.mozilla.com/D159815
2022-10-25 07:06:59 +00:00
Masayuki Nakano 64a548a89f Bug 1796044 - part 11: Make `intl.tsf.hack.ms_simplified_chinese.query_insert_result` a static pref r=m_kato
Depends on D159813

Differential Revision: https://phabricator.services.mozilla.com/D159814
2022-10-25 07:06:58 +00:00
Masayuki Nakano 17b4be5465 Bug 1796044 - part 10: Make `intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_caret` a static pref r=m_kato
Depends on D159812

Differential Revision: https://phabricator.services.mozilla.com/D159813
2022-10-25 07:06:58 +00:00
Masayuki Nakano aac0e8ae24 Bug 1796044 - part 9: Make `intl.tsf.hack.ms_japanese_ime.do_not_return_no_layout_error_at_first_char` a static pref r=m_kato
Depends on D159811

Differential Revision: https://phabricator.services.mozilla.com/D159812
2022-10-25 07:06:58 +00:00
Masayuki Nakano d1bf8d6ac4 Bug 1796044 - part 8: Make `intl.tsf.hack.ms_traditional_chinese.do_not_return_no_layout_error_of_composition_string` a static pref r=m_kato
Depends on D159810

Differential Revision: https://phabricator.services.mozilla.com/D159811
2022-10-25 07:06:57 +00:00
Masayuki Nakano 5a0f89d274 Bug 1796044 - part 7: Make `intl.tsf.hack.ms_simplified_chinese.do_not_return_no_layout_error_of_composition_string` a static pref r=m_kato
Depends on D159809

Differential Revision: https://phabricator.services.mozilla.com/D159810
2022-10-25 07:06:57 +00:00
Masayuki Nakano cb2ce888a5 Bug 1796044 - part 6: Make `intl.tsf.hack.free_chang_jie.do_not_return_no_layout_error_of_composition_string` a static pref r=m_kato
Depends on D159808

Differential Revision: https://phabricator.services.mozilla.com/D159809
2022-10-25 07:06:57 +00:00
Masayuki Nakano 1532b6f3b9 Bug 1796044 - part 5: Make `intl.tsf.hack.japanist10.do_not_return_no_layout_error_of_composition_string` a static pref r=m_kato
Depends on D159807

Differential Revision: https://phabricator.services.mozilla.com/D159808
2022-10-25 07:06:56 +00:00
Masayuki Nakano db042e8f2f Bug 1796044 - part 4: Make `intl.tsf.hack.atok.do_not_return_no_layout_error_of_composition_string` a static pref r=m_kato
Depends on D159806

Differential Revision: https://phabricator.services.mozilla.com/D159807
2022-10-25 07:06:56 +00:00
Masayuki Nakano 591e25675b Bug 1796044 - part 3: Make `intl.tsf.hack.atok.create_native_caret` a static pref r=m_kato
Depends on D159805

Differential Revision: https://phabricator.services.mozilla.com/D159806
2022-10-25 07:06:55 +00:00
Masayuki Nakano 2796c1f140 Bug 1796044 - part 2: Make `intl.tsf.hack.allow_to_stop_hacking_on_build_17643_or_later` a static pref r=m_kato
Depends on D159804

Differential Revision: https://phabricator.services.mozilla.com/D159805
2022-10-25 07:06:55 +00:00
Masayuki Nakano 2bf2183f82 Bug 1796044 - part 1: Make `intl.ime.hack.set_input_scope_of_url_bar_to_default` a static pref r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D159804
2022-10-25 07:06:54 +00:00
Emilio Cobos Álvarez 6fa764c7d3 Bug 1796849 - Teach the non-native theme to draw tooltips. r=stransky
We haven't seen this with Adwaita because it uses dark tooltips in both
light and dark mode, so stuff kinda worked out in the end.

Differential Revision: https://phabricator.services.mozilla.com/D159966
2022-10-24 09:05:31 +00:00
Masayuki Nakano e7b7bb65d1 Bug 1793911 - part 2: Make `TSFTextStore` defer notifying TSF of content updates while initializing content cache r=m_kato
I don't know understand how to recursively run initializing `mContentForTSF`
with dispatching a query content event because it may flush pending layout,
but the notifications will be sent in next tick by `IMEContentObserver`.
However, anyway, it rarely occurs in some environments.

Therefore, this patch makes `TSFTextStore` defer notifying TSF until finishing
initializing the content/selection cache to avoid to emplace `Maybe` twice.
Additionally, with adding a call of `.reset()` and `MOZ_DIAGNOSTIC_ASSERT`,
this patch prevents the crash in the release channel.

Depends on D159660

Differential Revision: https://phabricator.services.mozilla.com/D159661
2022-10-20 12:59:23 +00:00
Masayuki Nakano 51cbf8347f Bug 1793911 - part.1: Rename `TSFTextStore::mDeferNotifyingTSF` r=m_kato
It means that `TSFTextStore` should defer notifying TSF of content/layout
changes until receiving a reply from `ContentCacheInParent` or
`IMEContentObserver`.  For making it explain by itself, this patch rename it.

Differential Revision: https://phabricator.services.mozilla.com/D159660
2022-10-20 12:59:23 +00:00
stransky 5e70d08ce3 Bug 1796392 [Wayland] Don't assert if there's tooltip in popup hierarchy r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159843
2022-10-20 10:49:26 +00:00
Kagami Sascha Rosylight fac20df060 Bug 1796085 - Part 1: Define MOZ_BACKGROUNDTASKS macro globally r=smaug,necko-reviewers,application-update-reviewers,nalexander,valentin
There are 10+ separate macro definition for this, we can do it globally instead.

Differential Revision: https://phabricator.services.mozilla.com/D156911
2022-10-19 12:04:08 +00:00
stransky e0b9399c0f Bug 1794597 [Wayland] Apply popup drop position workaround to both drag motion and drag drop operations r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159674
2022-10-19 11:41:43 +00:00
stransky 599b985afe Bug 1795849 [Linux] Chancel D&D operation on Wayland and XWayland when D&D source window is closing r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159588
2022-10-19 06:39:11 +00:00
Mark Banner 1b63e93005 Bug 1795370 - Add nsICrashReporter as an interface on nsAppRunner. r=gsvelto
This fixes ESLint issues raised by mozilla/valid-services-properties.
This also changes follow-on issues to use Services.appinfo rather than getService.

Differential Revision: https://phabricator.services.mozilla.com/D159461
2022-10-18 18:22:24 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
stransky f02086d01e Bug 1795822 [Wayland] Use correct popup for move-to-rect check r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159570
2022-10-18 09:45:11 +00:00
Jonathan Kew 92a15b0d02 Bug 1793113 - Apply overflow:clip to meter and progress elements, for better rendering when rounded corners are used. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159507
2022-10-18 09:06:18 +00:00
Cristian Tuns 0f148c29c0 Backed out changeset ae36f7ea16cf (bug 1793113) for causing reftest failures on bar-pseudo-element.html CLOSED TREE 2022-10-17 18:14:04 -04:00
Emilio Cobos Álvarez b03241e966 Bug 1795574 - Fix base-toolchains build.
MANUAL PUSH: Bustage fix CLOSED TREE
2022-10-17 23:25:45 +02:00
Jonathan Kew eacf8c524f Bug 1793113 - Apply overflow:clip to meter and progress elements, for better rendering when rounded corners are used. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159507
2022-10-17 20:54:43 +00:00
Emilio Cobos Álvarez adbad51e81 Bug 1795574 - Avoid deadlock in Wayland vsync. r=rmader
And add lock annotations too, fixing relevant issues.

Differential Revision: https://phabricator.services.mozilla.com/D159498
2022-10-17 20:40:45 +00:00
Nika Layzell f03eb07e0c Bug 1793676 - Dynamically generate DOM code names for some continuous runs of codes, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D159400
2022-10-14 21:32:17 +00:00
stransky f5c3b87f9c Bug 1695227 [Wayland] Set the OcclusionStateChanged() when inactive r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159250
2022-10-14 07:38:07 +00:00
Jan-Niklas Jaeschke 311f68ad19 Bug 1793485: Fixed memory issue in `NodeWillBeDestroyed()` for `MultiMutationObserver` classes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D158671
2022-10-13 14:26:07 +00:00
stransky fced4f3faf Bug 1749187 [Linux] Don't disable screensaver for audio playback r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D159256
2022-10-13 12:03:16 +00:00
stransky 67a1f07910 Bug 1793922 [Wayland] Refresh screen list if monitor/screen list is out of sync r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158747
2022-10-13 10:42:07 +00:00
stransky 3127a3d3f3 Bug 1786247 [Wayland] Use layout.throttled_frame_rate to set idle frame rate r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D159091
2022-10-13 08:41:36 +00:00
stransky 908d87c7c4 Bug 1786247 [Wayland] Implement Vsync idle callback and fire reduced vsync events if nsWindow is hidden r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D159039
2022-10-13 08:41:35 +00:00
stransky 75dff6ba15 Bug 1786247 [Wayland] Add Vsync idle callback r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D159038
2022-10-13 08:41:35 +00:00
stransky 7e5ed8ab5f Bug 1786247 [Wayland] Print nsWindow as part of Vsync logs r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D159037
2022-10-13 08:41:34 +00:00
Cristian Tuns 67ff6520de Backed out changeset 928edafe970f (bug 1793485) for causing leaks CLOSED TREE 2022-10-12 17:09:32 -04:00
Jan-Niklas Jaeschke e71ca074c5 Bug 1793485: Fixed memory issue in `NodeWillBeDestroyed()` for `MultiMutationObserver` classes. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D158671
2022-10-12 19:36:46 +00:00
Ashly Hale a90046c607 Bug 1791970 - Enable accelerated WebRender on several AMD APU and GPU models r=jrmuizel,gfx-reviewers
This allows hardware WebRender to be used on several AMD chips we have high confidence will work fine.

Differential Revision: https://phabricator.services.mozilla.com/D159008
2022-10-12 17:46:35 +00:00
stransky 26291a4850 Bug 1794284 [Wayland] Check critical Wayland interfaces on startup r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D158955
2022-10-11 20:10:00 +00:00
stransky 51fc6b95d1 Bug 1794284 [Wayland] Remove unused interfaces from nsWaylandDisplay r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D158953
2022-10-11 20:09:59 +00:00
stransky 9751510294 Bug 1794284 [Wayland] Handle missing shm interface in WaylandBufferSHM/WindowSurfaceWaylandMultiBuffer r=rmader
Differential Revision: https://phabricator.services.mozilla.com/D158946
2022-10-11 20:09:59 +00:00
Matthias Camenzind d18c0b5d1c Bug 1792839 - [Linux] Only update window size when also calling WindowResized. r=stransky
Updating mBounds.Size() without calling WindowResized leaves the window
temporarily in a state where inner and outer sizes are out of sync.

BrowserParent::UpdatePosition should call BrowserParent::UpdateDimension
with the size during the last update, rather than the current window
size. There is an edge case where a call can happen between a resize and
its reflow, and a second resize could prevent the reflow from changing
the frame loader size, leaving the BrowserChild with an outdated outer
size.

Differential Revision: https://phabricator.services.mozilla.com/D158343
2022-10-11 20:02:49 +00:00
kriswright a30473b09c Bug 1765712 - Create the color picker window at the mouse origin point. r=spohl
The color picker currently appears in a "default" location upon opening, which seems to be for my machines the bottom left of the screen or another screen entirely depending on where my Firefox instance was opened. It seems like the best way to fix this is to actually create the color picker where you have clicked for it. Since `nsColorPanel` ultimately inherits from `nsWindow`, we can do this while opening by calling our `setFrameOrigin` method with the current pointer location.

Differential Revision: https://phabricator.services.mozilla.com/D157710
2022-10-11 14:29:58 +00:00
Matthias Camenzind e94c6cb964 Bug 1793609 - [Linux] Wait for OnSizeAllocate while the window becomes visible before updating window size. r=stransky
The first size-allocate is likely (or guaranteed) to be of the size at
the time of the first NativeShow(true) call. Any resize between show and
the first size-allocate will be accounted for in a second size-allocate
signal. If we update and dispatch the window size at the beginning of
such a resize, we end up reverting back to previous size from the first
size-allocate signal before dispatching the size for the resize again
from the second size-allocate signal.

Differential Revision: https://phabricator.services.mozilla.com/D158580
2022-10-11 07:47:39 +00:00
Olivia Hall d2bed2b014 Bug 1784554 - Return Input Stream Earlier for GeckoView Save to PDF r=geckoview-reviewers,amejiamarmol,owlish,emilio
Patch returns the input stream earlier for save to PDF. It now uses
SendError when the PDF does not process.

Differential Revision: https://phabricator.services.mozilla.com/D158702
2022-10-10 18:08:34 +00:00
Frederic Wang 4766c8a994 Bug 1793387 - disable lquote/rquote attributes on the <ms> element. r=emilio
This commit introduces a MathML preference for the legacy implementation
of the lquote/rquote attributes, and disable it by default. This feature
is not implemented in Chromium or WebKit, not part of MathML Core and
Firefox's implementation has issues (e.g. bugs 787215 and 1108608).

Differential Revision: https://phabricator.services.mozilla.com/D158479
2022-10-08 11:37:32 +00:00
Makoto Kato 8821cd8445 Bug 1714496 - Part 1. Implement Image keyboard support. r=geckoview-reviewers,calu
GBoard has image keyboard support, and spec issue is resolved [*1]. So this
adds image keyboard support via GBoard and Android 7.1+.

*1 https://github.com/w3c/input-events/issues/117

Differential Revision: https://phabricator.services.mozilla.com/D157713
2022-10-07 09:03:31 +00:00
Emilio Cobos Álvarez 8f6c1fee57 Bug 1726454 - Make nsGenericHTMLElement::HandleKeyboardActivation handle spacebar key press correctly. r=masayuki
This prevents <summary> from scrolling with the space bar. Add a test
for that.

Differential Revision: https://phabricator.services.mozilla.com/D158517
2022-10-06 14:28:43 +00:00
Masayuki Nakano 31375f07bd Bug 1793534 - part 1: Make `IMEStateManager` stop exposing some private things in URL to native IME r=smaug
Non-malicious IME (and text services) must not require private things in URL,
such as username and password, query data and reference in the document.
Therefore, we should omit them from URI exposed from our native IME handlers in
any platforms.

Differential Revision: https://phabricator.services.mozilla.com/D158734
2022-10-06 10:04:44 +00:00
stransky 256ffbd81f Bug 1766197 [Wayland] Update move-to-rect anchor for tooltips according to nsMenuPopupFrame::SetPopupPosition()/X11 r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158566
2022-10-06 06:57:31 +00:00
Dan Robertson 0e8347096e Bug 1785105 - Fire scrollend events. r=hiro,emilio
Fire scrollend events to the document and elements if
apz.scrollend.event.enabled is set. If the guarding preference is not set,
fire a chrome-only event to preserve the pre-existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D157652
2022-10-06 01:07:16 +00:00
Emilio Cobos Álvarez f4b0644e06 Bug 1793700 - follow-up: Make color control styling match Chromium. r=TYLin
The previous patch made me realize that we have this widget-imposed size
for color controls which doesn't match any other browser. This patch
removes it.

I don't feel strongly whether we should land this other than "it matches
other browsers, and removes a special case from Gecko". Behavior might
be simpler to understand for authors this way.

Differential Revision: https://phabricator.services.mozilla.com/D158620
2022-10-05 21:32:59 +00:00
Emilio Cobos Álvarez 2414af9244 Bug 1793689 - Make GetMinimumWidgetSize work properly on non-XUL flexbox. r=TYLin,layout-reviewers
The XUL behavior in nsBox.cpp is fairly different to what the non-XUL
layout code paths do. In particular, canOverride=false means that the
min-{width,height} properties cannot go under the min widget size of the
widget, but that doesn't mean that intrinsic sizes don't affect the
final size of the widget.

This is very visible if you turn on flex emulation on Windows or macOS,
where the toolbar has an appearance that returns
width=0,height=N,canOverride=false.

With flex emulation we'd collapse the item to be zero-width, which is
not good at all.

The good thing is that this is no longer exposed to the web
(non-native-theme always returns canOverride=true), and our front-end
code doesn't seem to rely on this, so we can just remove support for
canOverride=false.

Differential Revision: https://phabricator.services.mozilla.com/D158608
2022-10-05 19:09:29 +00:00
stransky 930759b5f3 Bug 1791539 [Wayland] Use mShell Gdk window position for D&D r=emilio
Due to https://gitlab.gnome.org/GNOME/gtk/-/issues/4437 / Bug 1710344 we need to add popup window position to D&D coordinates provided by Gtk.
In this patch always use GdkWindow derived from mShell which is attached to parent window.
Don't use GdkWindow of mContainer which is nested child window and it's positioned at 0,0.

Differential Revision: https://phabricator.services.mozilla.com/D158653
2022-10-05 18:09:09 +00:00
Emilio Cobos Álvarez 69535154e5 Bug 1792802 - Fix tree column picker. r=aminomancer
This element had a really weird dependency on the order of the command
events from the menuitems and the button which broke in bug 1790920.

Instead of keeping this element as a XULButtonElement, have a separate
button and popup. That's simpler and less prone to breakage, and allows
to get rid of special cases in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D158438
2022-10-05 06:59:13 +00:00
Norisz Fay 167133ff80 Backed out changeset f9249f760526 (bug 1792802) for causing mochitest failures on test_struct_tree.xhtml CLOSED TREE 2022-10-05 05:58:02 +03:00
Emilio Cobos Álvarez 5c4de29d0e Bug 1792802 - Fix tree column picker. r=aminomancer
This element had a really weird dependency on the order of the command
events from the menuitems and the button which broke in bug 1790920.

Instead of keeping this element as a XULButtonElement, have a separate
button and popup. That's simpler and less prone to breakage, and allows
to get rid of special cases in Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D158438
2022-10-05 02:09:03 +00:00
Narcis Beleuzu d55e1f332d Backed out changeset 6f819654ebc5 (bug 1726454) for wpt failure on details-keyboard-activation.html . CLOSED TREE 2022-10-04 17:52:13 +03:00
Emilio Cobos Álvarez 7ddd987dbe Bug 1726454 - Make nsGenericHTMLElement::HandleKeyboardActivation handle spacebar key press correctly. r=masayuki
This prevents <summary> from scrolling with the space bar. Add a test
for that.

Differential Revision: https://phabricator.services.mozilla.com/D158517
2022-10-04 10:15:20 +00:00
Masayuki Nakano 95251dfc29 Bug 1792387 - part 9: Make `widget/tests/test_composition_text_querycontent.xhtml` be aware of both split/join node directions r=m_kato
This means that the change has a risk of compatibility with IME, but from the
other point of view, we already behave differently from the other browsers
in native IME API handler level too.

Differential Revision: https://phabricator.services.mozilla.com/D158107
2022-09-30 22:20:23 +00:00
Masayuki Nakano ea14dc51d0 Bug 1774317 - part 3: Fix forgotten member initializing of `TSFTextStore` r=m_kato
The crash tracked in bug 1792767 is caused by uninitialized member of
`TSFTextStore`.  Therefore, it runs the cleaning up the TSF objects at
setting focus to new `TSFTextStore`, but MS-IME didn't grab the necessary
objects and thus, the crash occurs.

Differential Revision: https://phabricator.services.mozilla.com/D158311
2022-09-29 14:06:03 +00:00
Masayuki Nakano 725ca35ef4 Bug 1792515 - Rename `InputContext::mHTMLInputInputmode` to `mHTMLInputMode` r=m_kato,geckoview-reviewers
Now, `inputmode` attribute (`inputMode` in the DOM interface) is a global
attribute for `contenteditable`.  Therefore, `Input` is not necessary and
`Inputmode` should be `InputMode`.

Differential Revision: https://phabricator.services.mozilla.com/D158244
2022-09-29 14:06:03 +00:00
Masayuki Nakano 723de0691e Bug 1774317 - part 2: Make `TSFTextStore` support `GUID_PROP_URL` r=m_kato
`GUID_PROP_URL` is defined here:
https://learn.microsoft.com/en-us/windows/win32/tsf/predefined-properties

> Contains a BSTR value representing the URL of the text control source, where
> applicable.

The URL may contain sensitive information, e.g., user name, password, query
string.  However, they are already leaked via MSAA/UIA.
https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/accessible/generic/DocAccessible.cpp#350

Therefore, this patch just has prefs to completely prevent to expose the URL
for users who don't like this feature.

Differential Revision: https://phabricator.services.mozilla.com/D157894
2022-09-29 14:06:02 +00:00
Masayuki Nakano 3f00f4d8e8 Bug 1774317 - part 1: Make `IMEStateManager` notify `nsIWidget` of the document URL r=smaug
`TSFTextStore` needs to expose the document URL for supporting new feature
of Windows 11 22H2 update.  Therefore, the `InputContext` should have the
document URL.

Differential Revision: https://phabricator.services.mozilla.com/D157893
2022-09-29 14:06:02 +00:00
stransky f0ffbdcf82 Bug 1791856 [Wayland] Remove rounding error workaround r=emilio
The rounding error workaround is broken - on recent Gtk it produces needless stream of move-to-rect callback.
It's because we move popup of GDK_WINDOW_TYPE_HINT_POPUP_MENU type and this is positioned by Gtk by move-to-rect even if gtk_window_move() is called.

But it looks like we don't need this workaround any more due to recent fixes (1786525, 1786588, 1786525, 1765714).

Differential Revision: https://phabricator.services.mozilla.com/D158217
2022-09-29 07:29:17 +00:00
Mark Banner 8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Sandor Molnar c6f1e9ee28 Backed out 2 changesets (bug 1774317) for causing top-crash (bug 1792767) CLOSED TREE
Backed out changeset 418dec4ac3f9 (bug 1774317)
Backed out changeset 329666086b40 (bug 1774317)
2022-09-29 04:48:26 +03:00
Andrew McCreight 2da84b8ac4 Bug 1792574, part 3 - Don't include nsMemory where it isn't needed. r=xpcom-reviewers,necko-reviewers,valentin,nika
There are only 3 places where nsMemory.h is still needed (image/RasterImage.cpp,
gfx/thebes/gfxFT2FontList.cpp, and nsMemory.cpp). Remove the rest.

Differential Revision: https://phabricator.services.mozilla.com/D158213
2022-09-28 15:17:46 +00:00
Masayuki Nakano 58fa8fca99 Bug 1774317 - part 2: Make `TSFTextStore` support `GUID_PROP_URL` r=m_kato
`GUID_PROP_URL` is defined here:
https://learn.microsoft.com/en-us/windows/win32/tsf/predefined-properties

> Contains a BSTR value representing the URL of the text control source, where
> applicable.

The URL may contain sensitive information, e.g., user name, password, query
string.  However, they are already leaked via MSAA/UIA.
https://searchfox.org/mozilla-central/rev/b1e5f2c7c96be36974262551978d54f457db2cae/accessible/generic/DocAccessible.cpp#350

Therefore, this patch just has prefs to completely prevent to expose the URL
for users who don't like this feature.

Differential Revision: https://phabricator.services.mozilla.com/D157894
2022-09-28 11:46:59 +00:00
Masayuki Nakano b3600e6d25 Bug 1774317 - part 1: Make `IMEStateManager` notify `nsIWidget` of the document URL r=smaug
`TSFTextStore` needs to expose the document URL for supporting new feature
of Windows 11 22H2 update.  Therefore, the `InputContext` should have the
document URL.

Differential Revision: https://phabricator.services.mozilla.com/D157893
2022-09-28 11:46:59 +00:00
Andrew McCreight cc63625045 Bug 1792437, part 2 - Remove nsIModule. r=xpcom-reviewers,nika
I think some prior XPCOM component work removed the uses of this.

Differential Revision: https://phabricator.services.mozilla.com/D158210
2022-09-27 22:16:29 +00:00
stransky 6fd20dd767 Bug 1792125 [Wayland] Don't use move-to-rect if there are more popup parents of wl_subsurface popup type r=emilio
We can't use move-to-rect if there are more parents of wl_subsurface popups types.
It's because wl_subsurface is ignored by xgd_popup (created by move-to-rect) so our popup scenario:

toplevel -> xgd_popup(1) -> wl_subsurface(2) -> xgd_popup(3)

looks for Wayland compositor as:

toplevel -> xgd_popup(1) -> xgd_popup(3)

If xgd_popup(1) and xgd_popup(3) are not adjacent then move-to-rect applied to xgd_popup(3) fails and we get missing popup.

Depends on D158120

Differential Revision: https://phabricator.services.mozilla.com/D158121
2022-09-27 10:20:09 +00:00
stransky 666c946a5b Bug 1792125 [Wayland] Always calculate relative popup coordinates for context menu r=emilio
Wne context menu is positioned by plain move, we need relative popup coordinates. So calculate them according to context menu parent popup.

Differential Revision: https://phabricator.services.mozilla.com/D158120
2022-09-27 10:20:09 +00:00
stransky 1e3bd4ab3e Bug 1792512 [Linux] Don't skip resize if recent window size is different than requested one r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D158190
2022-09-27 09:08:13 +00:00
stransky a88baa8f03 Bug 1791977 [Linux] Don't expect CompositorWidget is always GtkCompositorWidget r=emilio
Don't crash/assert when mCompositorWidgetDelegate is different than GtkCompositorWidget.

Differential Revision: https://phabricator.services.mozilla.com/D158003
2022-09-23 09:42:50 +00:00
stransky daf65b6eb5 Bug 1792091 [Wayland] Assert when shm interface is missing r=emilio
There are some suspect crashes around Wayland SHM interface so let's make sure we have valid shm handle before we pass it to Wayland.
It covers the 'It can't happen' scenario which tends to happen despite of all premises.

Differential Revision: https://phabricator.services.mozilla.com/D157975
2022-09-23 06:19:28 +00:00
Emilio Cobos Álvarez bf26fdb5a6 Bug 1792063 - Fix menuhover background computation in some gtk themes. r=stransky
When figuring out menuhover background, make sure not to come up with
the exact same color as the menu background. This ensures we also try
gradients / background-images before giving up.

This is only an issue with the dark theme in this case, because
otherwise we use native drawing.

Differential Revision: https://phabricator.services.mozilla.com/D157963
2022-09-22 20:20:30 +00:00
stransky 4b164391e1 Bug 1789956 [Wayland] Don't use move-to-rect offset for non-adjacent popups r=emilio
move-to-rect offset does not work realibly in mutter and can lead to invisible window.
It's used mainly for tooltips so let's skip it for now.

Differential Revision: https://phabricator.services.mozilla.com/D157926
2022-09-22 19:43:33 +00:00
stransky a875f16df0 Bug 1791735 [Wayland] Don't paint to unmapped window by SW backend r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157795
2022-09-22 18:42:01 +00:00
stransky 60f547bec1 Bug 1789956 [Wayland] Use mBounds to get parent popup position r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157915
2022-09-22 18:32:16 +00:00
stransky e957b7cb4a Bug 1645677 [Linux] Fix build on X11 r=emilio
Depends on D157629

Differential Revision: https://phabricator.services.mozilla.com/D157898
2022-09-22 09:41:06 +00:00
stransky 016607e147 Bug 1645677 [Linux] Call unmap for X11 mozcontainer r=emilio
Depends on D157360

Differential Revision: https://phabricator.services.mozilla.com/D157629
2022-09-22 09:41:05 +00:00
stransky e89edaae90 Bug 1645677 [Wayland] Stop vsync before GtkWindow si hidden r=emilio
Depends on D157359

Differential Revision: https://phabricator.services.mozilla.com/D157360
2022-09-22 09:41:05 +00:00
stransky d37a4e539c Bug 1645677 [Linux] Don't use SendResumeAsync() as we need to sync render thread with main thread where Gtk operates r=emilio
Depends on D157358

Differential Revision: https://phabricator.services.mozilla.com/D157359
2022-09-22 09:41:05 +00:00
stransky cb46f7b2dd Bug 1645677 [Wayland] Update EGLSurface when wl_surface is deleted r=emilio,jgilbert
When GtkWidget is hidden, underlying wl_surface is deleted. We need to also update EGLSurface of GtkWidget (GtkCompositorWidget)
as EGLSurface is directly linked to wl_surface:

- When GtkWidget is hidden, call GtkCompositorWidget::DisableRendering(). That releases GtkCompositorWidget resources
  related to GtkWidget (XWindow/XVisual etc.) and marks the widget as hidden.
- If GtkWidget is backed by EGL call compositor resume which forces compositor to create new EGLSurface.
- Make sure GLContextEGL can create EGLSurface even when GtkWidget is hidden and wl_surface is missing.
  It prevents fallback to SW rendering or pause RenderCompositorEGL which leads to Bug 1777664 (whole browser UI freeze).
- Return early from RenderCompositorEGL::BeginFrame()/RenderCompositorEGL::EndFrame() when GtkCompositorWidget is hidden.

Depends on D157357

Differential Revision: https://phabricator.services.mozilla.com/D157358
2022-09-22 09:41:04 +00:00
stransky 24d8cfd0dd Bug 1645677 [Wayland] Attach map/unmap signals to mContainer r=emilio
Map/Unmap signals creates and deletes mContainer wayland surface and EGL window.

As we need to call the handlers in correct order (mContainer::map -> nsWindow::map and nsWindow::unmap -> mContainer::unmap)
connect the signals to mContainer widget and call mContainer::unmap from nsWindow::unmap.

Then nsWindow::unmap can update compositor before wl_surface/EGL window is released by mContainer.

Differential Revision: https://phabricator.services.mozilla.com/D157357
2022-09-22 09:41:04 +00:00
stransky b1f3f5e5af Bug 1744148 [Linux] Don't crash if we get configure event for hidden window r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157820
2022-09-22 06:24:38 +00:00
Neill Miller 627d6fe873 Bug 1768907 - Part 2: nsTransferable disk-leaks when private browsing mode is enabled by default. r=handyman
nsTransferable was modified to prevent disk leakings when copying data
in private browsing mode with Bug 1123480.
However, the context is nullptr when it is initialized, so it still
leaks if PBM is enabled by default.
Our solution is to check the browser.privatebrowsing.autostart in this
condition.

Differential Revision: https://phabricator.services.mozilla.com/D157800
2022-09-22 00:26:17 +00:00
Pier Angelo Vendrame aa21b01cfa Bug 1768907 - Part 1: Make browser.privatebrowsing.autostart a static pref. r=handyman,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D157843
2022-09-22 00:26:17 +00:00
Jamie Nicol 49c0f0ed43 Bug 1780093 - Use custom SurfaceView which allows magnifier widget to work. r=geckoview-reviewers,owlish
The android magnifier widget does not work when using our
SurfaceControl rendering path, as we no longer render in to the
Surface provided by the SurfaceView, but instead into a child Surface
we have created and attached the SurfaceControl.

To fix this, we create a SurfaceView subclass, MagnifiableSurfaceView,
which allows us to set an override Surface to be used by the
magnifier. This class works by overriding getHolder() to return a
custom SurfaceHolder, which returns our override Surface rather than
the default one when called by the Magnifier class.

Depends on D157308

Differential Revision: https://phabricator.services.mozilla.com/D157309
2022-09-21 17:30:26 +00:00
Jamie Nicol 5e60f35505 Bug 1780093 - Remove code for enabling/disabling SurfaceControl rendering path. r=geckoview-reviewers,owlish
In order to fix the magnifier widget being broken, the previous patch
in this bug added a mechanism to disable and enable the SurfaceControl
rendering path. This caused some glitches to occur, so we removed the
calls to that code in bug 1783542, but the code remained.

As we now have an alternative solution to fix the magnifier widget, we
no longer require this code. This patch therefore reverts the original
patch, to lead the way for the new solution in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D157308
2022-09-21 17:30:25 +00:00
Butkovits Atila 7d55852039 Backed out 5 changesets (bug 1645677) for causing build bustages at nsWindow.cpp.
Backed out changeset 4f164c3d0ba9 (bug 1645677)
Backed out changeset 27a918234048 (bug 1645677)
Backed out changeset ca32ff38fc67 (bug 1645677)
Backed out changeset 6841dc516087 (bug 1645677)
Backed out changeset 5ba3a56b3038 (bug 1645677)
2022-09-21 18:26:03 +03:00
stransky 58f9ba8b8d Bug 1791752 [Linux] Make sure we have correct compositor widget r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157814
2022-09-21 10:29:47 +00:00
Norisz Fay 965f18a5e2 Backed out changeset ddd9b4ac6f84 (bug 1791752) for causing multiple failures CLOSED TREE 2022-09-21 16:20:18 +03:00
Jan-Niklas Jaeschke 4265f72859 Bug 1777925: Replaced MutationObserver array container type with linked list. r=smaug
Deletion of mutation observers from a list resulted in O(n^2) behavior and could lead to massive freezes.
This is resolved by using a LinkedList instead, reducing complexity to O(n).

A safely iterable doubly linked list was implemented based on `mozilla::DoublyLinkedList`,
allowing to insert and remove elements while iterating the list.

Due to the nature of `mozilla::DoublyLinkedList`, every Mutation Observer now inherits `mozilla::DoublyLinkedListElement<T>`.
This implies that a Mutation Observer can only be part of one DoublyLinkedList.
This conflicts with some Mutation Observers, which are being added to multiple `nsINode`s.
To continue supporting this, new MutationObserver base classes `nsMultiMutationObserver` and `nsStubMultiMutationObserver` are introduced,
which create `MutationObserverWrapper` objects each time they are added to a `nsINode`.
The wrapper objects forward every call to the actual observer.

Differential Revision: https://phabricator.services.mozilla.com/D157031
2022-09-21 11:31:44 +00:00
stransky 4a1d94379a Bug 1645677 [Linux] Call unmap for X11 mozcontainer r=emilio
Depends on D157360

Differential Revision: https://phabricator.services.mozilla.com/D157629
2022-09-21 10:32:45 +00:00
stransky cc566d923e Bug 1645677 [Wayland] Stop vsync before GtkWindow si hidden r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157360
2022-09-21 10:32:45 +00:00
stransky bd787b68e0 Bug 1645677 [Linux] Don't use SendResumeAsync() as we need to sync render thread with main thread where Gtk operates r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157359
2022-09-21 10:32:44 +00:00
stransky 4a3192c560 Bug 1645677 [Wayland] Update EGLSurface when wl_surface is deleted r=emilio,jgilbert
When GtkWidget is hidden, underlying wl_surface is deleted. We need to also update EGLSurface of GtkWidget (GtkCompositorWidget)
as EGLSurface is directly linked to wl_surface:

- When GtkWidget is hidden, call GtkCompositorWidget::DisableRendering(). That releases GtkCompositorWidget resources
  related to GtkWidget (XWindow/XVisual etc.) and marks the widget as hidden.
- If GtkWidget is backed by EGL call compositor resume which forces compositor to create new EGLSurface.
- Make sure GLContextEGL can create EGLSurface even when GtkWidget is hidden and wl_surface is missing.
  It prevents fallback to SW rendering or pause RenderCompositorEGL which leads to Bug 1777664 (whole browser UI freeze).
- Return early from RenderCompositorEGL::BeginFrame()/RenderCompositorEGL::EndFrame() when GtkCompositorWidget is hidden.

Depends on D157357

Differential Revision: https://phabricator.services.mozilla.com/D157358
2022-09-21 10:32:44 +00:00
stransky 793e504659 Bug 1645677 [Wayland] Attach map/unmap signals to mContainer r=emilio
Map/Unmap signals creates and deletes mContainer wayland surface and EGL window.

As we need to call the handlers in correct order (mContainer::map -> nsWindow::map and nsWindow::unmap -> mContainer::unmap)
connect the signals to mContainer widget and call mContainer::unmap from nsWindow::unmap.

Then nsWindow::unmap can update compositor before wl_surface/EGL window is released by mContainer.

Differential Revision: https://phabricator.services.mozilla.com/D157357
2022-09-21 10:32:44 +00:00
stransky d7b6c906b3 Bug 1791752 [Linux] Make sure we have correct compositor widget r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157814
2022-09-21 10:29:47 +00:00
stransky 9c23920f74 Bug 1791469 [Wayland] Accept plain move for tooltips r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D157806
2022-09-21 10:00:13 +00:00
Ray Kraesig 5687bd89ee Bug 1776895 - [6/6] Add logging for fullscreen entry/exit r=cmartin,handyman
Add logging for fullscreen position-state saving and restoration.

Differential Revision: https://phabricator.services.mozilla.com/D153411
2022-09-20 16:22:58 +00:00
Ray Kraesig ec80afc7a4 Bug 1776895 - [5/6] Save and restore original relative position r=cmartin,handyman
When entering fullscreen and saving the original position of a window,
also save the position to which it was moved.

When leaving fullscreen, keep the window on the same screen. Restore its
_screen-relative_ position, rather than its absolute position.

Differential Revision: https://phabricator.services.mozilla.com/D153410
2022-09-20 16:22:57 +00:00