Commit Graph

755 Commits

Author SHA1 Message Date
Gregory Pappas
974de01de7 Bug 1858801 - Add ability to spin the cursor while the page is loading r=emilio,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D207953
2024-05-22 18:51:54 +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
Edgar Chen
f7c182f937 Bug 1892598 - Reuse IPCImage for PBrowser::SetCursor; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D208075
2024-04-23 06:01:47 +00:00
Nika Layzell
3943bcf519 Bug 1875528 - Part 7: Expose more BrowserParent members to the CC, r=smaug
It appears that the Element member may have been creating a reference
cycle passing through the new strong WindowGlobalParent::Manager()
reference.

This patch also removes an unused member from BrowserParent which
otherwise may have needed to be cycle-collected.

Differential Revision: https://phabricator.services.mozilla.com/D207170
2024-04-22 17:13:25 +00:00
Nika Layzell
656f3c5a4a Bug 1875528 - Part 6: Allow cycle-collecting the strong IPDL Manager reference, r=mccr8
There are a few IPDL actors which are cycle-collected, including `PBrowser`,
`PContent`, and `PWindowGlobal`.

This patch adds support for these actors to traverse and unlink the new strong
Manager() reference added by IPDL, allowing cycles containing these actors to
be properly unlinked and avoiding leaks.

Differential Revision: https://phabricator.services.mozilla.com/D198629
2024-04-22 17:13:24 +00:00
Nika Layzell
565a71f690 Bug 1875528 - Part 4: Clean up VsyncParent handling in BrowserParent, r=smaug
Previously there was dead code handling DeallocPvsyncParent which hasn't been
called since PVsync was made refcounted. The new logic handles the reference
within IPC, and delays some initialization to the proper constructor.

Differential Revision: https://phabricator.services.mozilla.com/D198627
2024-04-22 17:13:23 +00:00
Gregory Pappas
8338ef10d5 Bug 1887230 - Remove unused child-process-shutdown message r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D205509
2024-03-25 15:46:32 +00:00
Gregory Pappas
3a68660a11 Bug 1878401 - part 1 - Pass BrowsingContext to nsIFilePicker::Init instead of mozIDOMWindow r=geckoview-reviewers,win-reviewers,emilio,nika,m_kato,rkraesig
This will improve the situation in bug 1878336

Differential Revision: https://phabricator.services.mozilla.com/D200546
2024-02-28 21:29:37 +00:00
Sandor Molnar
c853f2f3e9 Backed out 8 changesets (bug 1878401, bug 1879041) for causing build bustages on widget/nsBaseFilePicker.cpp CLOSED TREE
Backed out changeset 2e2b8df3bdd6 (bug 1879041)
Backed out changeset 6d6952f9df2c (bug 1878401)
Backed out changeset 30b5bb590d3e (bug 1878401)
Backed out changeset 9a4b830334b9 (bug 1878401)
Backed out changeset 3c3d67f1fcb7 (bug 1878401)
Backed out changeset c83ba4026822 (bug 1878401)
Backed out changeset 6bcb670ce475 (bug 1878401)
Backed out changeset f263b196df96 (bug 1878401)
2024-02-28 17:56:48 +02:00
Gregory Pappas
44b053ba1a Bug 1878401 - part 1 - Pass BrowsingContext to nsIFilePicker::Init instead of mozIDOMWindow r=geckoview-reviewers,win-reviewers,emilio,nika,m_kato,rkraesig
This will improve the situation in bug 1878336

Differential Revision: https://phabricator.services.mozilla.com/D200546
2024-02-28 15:07:44 +00:00
Stanca Serban
6980988721 Backed out 6 changesets (bug 1875528) for causing leakcheck failures. CLOSED TREE
Backed out changeset dcbbb7316940 (bug 1875528)
Backed out changeset a5c0564f9761 (bug 1875528)
Backed out changeset f3bc6e972f79 (bug 1875528)
Backed out changeset 535378dd79b0 (bug 1875528)
Backed out changeset 3cef14ed0f25 (bug 1875528)
Backed out changeset f0941fdbbabb (bug 1875528)
2024-01-25 01:26:46 +02:00
Nika Layzell
ba697a7ca5 Bug 1875528 - Part 6: Allow cycle-collecting the strong IPDL Manager reference, r=mccr8
There are a few IPDL actors which are cycle-collected, including `PBrowser`,
`PContent`, and `PWindowGlobal`.

This patch adds support for these actors to traverse and unlink the new strong
Manager() reference added by IPDL, allowing cycles containing these actors to
be properly unlinked and avoiding leaks.

Differential Revision: https://phabricator.services.mozilla.com/D198629
2024-01-24 20:54:42 +00:00
Nika Layzell
d410e17f9c Bug 1875528 - Part 4: Clean up VsyncParent handling in BrowserParent, r=smaug
Previously there was dead code handling DeallocPvsyncParent which hasn't been
called since PVsync was made refcounted. The new logic handles the reference
within IPC, and delays some initialization to the proper constructor.

Differential Revision: https://phabricator.services.mozilla.com/D198627
2024-01-24 20:54:41 +00:00
Nika Layzell
88d10dcf09 Bug 1874739 - Part 11: Make PWebBrowserPersistDocument refcounted, r=ipc-reviewers,mccr8
This is part of removing [ManualDealloc] from all protocols which manage other
protocols.

Differential Revision: https://phabricator.services.mozilla.com/D198621
2024-01-19 20:23:21 +00:00
Edgar Chen
c9cb1e4b5e Bug 1873035 - Adjust mRefPoint for generated mouse event when sending to content process; r=smaug
Mouse events can be generated from other mouse events, e.g. mouseout event, and
these events can originate from different widgets, such as the notification
panel. In such case, we need to adjust the coordinates when sending to content
process.

Differential Revision: https://phabricator.services.mozilla.com/D197715
2024-01-09 10:31:11 +00:00
Edgar Chen
3d56f815a9 Bug 1833172 - Remove unused data from PasteTransferable IPC; r=masayuki
The PasteTransferable IPC is used for sending the nsITransferable in paste
command to content process. And the nsITransferable in paste command is from
 - https://searchfox.org/mozilla-central/rev/eb07633057d66ab25f9db4c5900eeb6913da7579/widget/android/GeckoEditableSupport.cpp#1685
 - https://searchfox.org/mozilla-central/rev/eb07633057d66ab25f9db4c5900eeb6913da7579/widget/cocoa/nsChildView.mm#4528
 - or from nsIDOMWindowUtils::sendContentCommandEvent which is used for tests.

None of them have valid requesting principal and content policy type set.

Differential Revision: https://phabricator.services.mozilla.com/D195948
2023-12-20 13:18:23 +00:00
Hiroyuki Ikezoe
ad709bfe9d Bug 1715179 - Propagate VisualViewport rect and the root scrollable rect and use them on the main-thread. r=botond
Depends on D186323

Differential Revision: https://phabricator.services.mozilla.com/D186324
2023-12-04 09:31:22 +00:00
Stanca Serban
358a6e26a0 Backed out 5 changesets (bug 1715179) for causing mochitests failures in test_group_double_tap_zoom-2.html. CLOSED TREE
Backed out changeset 600afc2dc0ca (bug 1715179)
Backed out changeset 75c2c7f6230e (bug 1715179)
Backed out changeset b851e0aff383 (bug 1715179)
Backed out changeset 0acfcbbdf460 (bug 1715179)
Backed out changeset b0c83c964ccf (bug 1715179)
2023-11-28 18:45:32 +02:00
Hiroyuki Ikezoe
6017e8b01f Bug 1715179 - Propagate VisualViewport rect and the root scrollable rect and use them on the main-thread. r=botond
Depends on D186323

Differential Revision: https://phabricator.services.mozilla.com/D186324
2023-11-28 09:42:21 +00:00
Tom Schuster
b69f140767 Bug 1847990 - Canvas fingerprinting telemetry. r=timhuang,anti-tracking-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189111
2023-11-13 10:05:22 +00:00
Gijs Kruitbosch
437bfc8b05 Bug 1855992 - remove about: specialcase from principal validation in BrowserParent, r=nika,necko-reviewers,jesup,perftest-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189923
2023-11-07 11:34:42 +00:00
Sandor Molnar
fbc8ce4acb Backed out 2 changesets (bug 1855992) for causing talos failures @ mozilla::net::nsAboutProtocolHandler::NewChannel CLOSED TREE
Backed out changeset f287e725a845 (bug 1855992)
Backed out changeset 81236027b7dc (bug 1855992)
2023-11-03 00:02:09 +02:00
Gijs Kruitbosch
c82b6d518c Bug 1855992 - remove about: specialcase from principal validation in BrowserParent, r=nika,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D189923
2023-11-02 17:41:17 +00:00
Cristina Horotan
d3ea12700a Backed out 2 changesets (bug 1855992) for causing assertion failures at ContentParent.cpp CLOSED TREE
Backed out changeset 794155e516b3 (bug 1855992)
Backed out changeset 5489de5365fe (bug 1855992)
2023-10-31 12:19:43 +02:00
Gijs Kruitbosch
16d66991c2 Bug 1855992 - remove about: specialcase from principal validation in BrowserParent, r=nika,necko-reviewers,jesup
Differential Revision: https://phabricator.services.mozilla.com/D189923
2023-10-31 09:11:30 +00:00
Sylvestre Ledru
b0fe72dee5 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-15 15:29:02 +00:00
Cristina Horotan
7388749830 Backed out 2 changesets (bug 1856795) for causing build bustage at BasicEvents.h CLOSED TREE
Backed out changeset 1d98b028923a (bug 1856795)
Backed out changeset eae2ac93e17c (bug 1856795)
2023-10-14 21:42:14 +03:00
Sylvestre Ledru
4a97019e39 Bug 1856795 - Remove redundant member init r=emilio
Done with:
./mach static-analysis check --checks="-*, readability-redundant-member-init" --fix .

https://clang.llvm.org/extra/clang-tidy/checks/readability/redundant-member-init.html

Differential Revision: https://phabricator.services.mozilla.com/D190002
2023-10-14 17:34:26 +00:00
Emilio Cobos Álvarez
cd406d5fd2 Bug 1854092 - Don't clear cursor if not over the relevant document. r=saschanaz,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D188709
2023-09-21 09:54:40 +00:00
Emilio Cobos Álvarez
f589903d08 Bug 1848357 - Remove PaintWhileInterruptingJSNoOp(). r=mconley
This should not be needed anymore. We no longer need to "ack" an epoch,
since there's no epoch.

Make the logic to trigger a paint and request composite a bit more
generic. That doesn't change behavior right now, because our visibility
state is tied to mRenderLayers, but without this change setting
renderLayers = true on a display: none iframe will trigger a useless
paint after bug 1847584.

Differential Revision: https://phabricator.services.mozilla.com/D187293
2023-09-02 07:09:01 +00:00
Emilio Cobos Álvarez
11692470d4 Bug 1848357 - Cleanup layer observer handling. r=mconley,gfx-reviewers,bradwerth
This seems to work, and turns out I need to fix this before bug 1847584,
because the epoch handling breaks with those patches in the case
customize mode sets display: none on browser elements.

Instead of dealing with epochs, just always report the last "has layers"
state to BrowserParent. This is both simpler and more reliable (there
were a couple hacks in WebRenderBridgeParent to make sure we notified
even though a transaction failed).

AsyncTabSwitcher pretty much already deals with this correctly because
it already needs to deal with browsers that already have layers, we only
had to loosen some assertions for potentially previous messages which
are fine.

Differential Revision: https://phabricator.services.mozilla.com/D187203
2023-09-01 17:09:27 +00:00
James Teh
3b0b0de227 Bug 1831035 part 7: Remove (now empty) platform specific RemoteAccessible classes and rename RemoteAccessibleBase to RemoteAccessible. r=eeejay
This involved moving ApplyCache from the .h into the .cpp because now that the class is no longer a template, forward declaration of DocAccessibleParent is not sufficient.

Differential Revision: https://phabricator.services.mozilla.com/D181852
2023-06-26 21:20:13 +00:00
Jens Stutte
1ef3406daa Bug 1838779 - Overhaul the thread safety and synchronization of our keepalive checks. r=dom-worker-reviewers,asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D180958
2023-06-21 16:47:08 +00:00
Cristina Horotan
86fccc888b Backed out changeset 81e6aadf9911 (bug 1838779) for causing build bustage at ContentParent.cpp 2023-06-21 18:57:32 +03:00
Jens Stutte
ee69996ea3 Bug 1838779 - Overhaul the thread safety and synchronization of our keepalive checks. r=dom-worker-reviewers,asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D180958
2023-06-21 14:59:10 +00:00
Narcis Beleuzu
cc8fdcbbd3 Backed out changeset cc655f99b353 (bug 1838779) for bc failure on RecursiveMutex.cpp 2023-06-21 14:14:59 +03:00
Jens Stutte
f5d9db1869 Bug 1838779 - Overhaul the thread safety and synchronization of our keepalive checks. r=dom-worker-reviewers,asuth,smaug
Differential Revision: https://phabricator.services.mozilla.com/D180958
2023-06-21 09:17:18 +00:00
Edgar Chen
591fe42773 Bug 1836550 - Validate image data received from IPC; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D181261
2023-06-20 08:40:05 +00:00
Emilio Cobos Álvarez
ad77d3cd03 Bug 1837450 - Check for overflow when validating custom cursor data. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D181260
2023-06-19 14:54:59 +00:00
Masayuki Nakano
155fd7857c Bug 1832306 - Make BrowserParent stop handling access keys with delayed events r=smaug,NeilDeakin
`EventStateManager::WalkESMTreeToHandleAccessKey()` requests all `BrowserParent`
instances to handle access key in content processes:
https://searchfox.org/mozilla-central/rev/a4fd6daad3a4123d995478467c1274653b283801/dom/events/EventStateManager.cpp#1379,1398,1410-1411

Then, content processes will reply if no element matches with the access key:
https://searchfox.org/mozilla-central/rev/8e1b221afcdae76284b1439c547b032d1f84d236/dom/ipc/BrowserChild.cpp#2304-2305,2310

Finally, the parent process handles the keypress event:
https://searchfox.org/mozilla-central/rev/8e1b221afcdae76284b1439c547b032d1f84d236/dom/ipc/BrowserParent.cpp#2710-2712,2720,2725

However, this is odd because if multiple remote processes calls
`BrowserParent::RecvAccessKeyNotHandled()`, the parent process will handle
same `keypress` event multiple times.

The approach of this patch is, `BrowserParent` should store main data of
sending `eKeyPress` event, and `RecvAccessKeyNotHandled()` handles only if
the coming event matches with the stored one and clear the data to avoid
handling multiple times.

Even with this approach, we cannot avoid one `eKeyPress` event handled in
multiple content processes, or in both the main process and a content process.

Differential Revision: https://phabricator.services.mozilla.com/D179172
2023-06-15 13:33:19 +00:00
Masayuki Nakano
ae2415dd66 Bug 1690827 - part 1: Number each composition for native IME or synthesized in the parent process r=smaug
For handling (ignoring) "too late" composition commit request from content
process, we need to distinguish a request is for which composition.  Therefore,
we need to number each composition originated in the parent process.

This patch makes `TextComposition` instance which is created at first
composition event for a composition consider a composition ID in the parent
process and set it to composition events which are dispatched into the DOM
tree in the parent or sent to a remote process.

And also this patch adds the composition ID param to the request method of
committing composition and reply methods to notify the parent process of ending
a composition event handling.

The last patch handle them in `ContentCacheInParent` to consider
whether a request/reply should be ignored or handled.

Differential Revision: https://phabricator.services.mozilla.com/D179310
2023-06-14 01:57:33 +00:00
Cosmin Sabou
db0847b0f7 Backed out 6 changesets (bug 1690827, bug 1835577, bug 1835578) for causing build bustages on widget/ContentCache.cpp. CLOSED TREE
Backed out changeset 8f96604b79a6 (bug 1835578)
Backed out changeset 3afcf20d7fb6 (bug 1835577)
Backed out changeset 41105bb6e199 (bug 1690827)
Backed out changeset feedd62f908d (bug 1690827)
Backed out changeset bc45f9483150 (bug 1690827)
Backed out changeset d2c874809470 (bug 1690827)
2023-06-13 09:31:03 +03:00
Masayuki Nakano
15b0e0a16e Bug 1690827 - part 1: Number each composition for native IME or synthesized in the parent process r=smaug
For handling (ignoring) "too late" composition commit request from content
process, we need to distinguish a request is for which composition.  Therefore,
we need to number each composition originated in the parent process.

This patch makes `TextComposition` instance which is created at first
composition event for a composition consider a composition ID in the parent
process and set it to composition events which are dispatched into the DOM
tree in the parent or sent to a remote process.

And also this patch adds the composition ID param to the request method of
committing composition and reply methods to notify the parent process of ending
a composition event handling.

The last patch handle them in `ContentCacheInParent` to consider
whether a request/reply should be ignored or handled.

Differential Revision: https://phabricator.services.mozilla.com/D179310
2023-06-13 04:07:45 +00:00
Masayuki Nakano
3ea832e4ce Bug 1825693 - Make ContentCache stop assigning invalid data r=m_kato,nika
There are some crash reports crashed in TSF module which may be caused by
passing invalid selection range (e.g., out of bounds of text).  However,
the cache is created in the child process and that causes the invalid cache
creation does not appear in the crash reports.  Therefore, let's try to
crash as soon as possible if `ContentCache` has invalid data.

Note that this does not detect all of the invalid cases because it's hard to
(re-)understand the edge cases.  Therefore, this tries to detect the cases
checked in `ContentCacheInParent::HandleQueryContentEvent` (*1) and some other
obvious odd cases.

1. https://searchfox.org/mozilla-central/rev/0ffaecaa075887ab07bf4c607c61ea2faa81b172/widget/ContentCache.cpp#776-778

Differential Revision: https://phabricator.services.mozilla.com/D176747
2023-05-26 01:24:35 +00:00
Olli Pettay
e8471cb79d Bug 1534586 - Remove unused PBrowser::DispatchFocusToTopLevelWindow, r=aiunusov,ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D178976
2023-05-25 12:15:44 +00:00
Emilio Cobos Álvarez
f8efc66d64 Bug 1834813 - Document.allowDeprecatedTls is dead code. r=smaug,geckoview-reviewers,m_kato
This was added in bug 1641597, but nowadays neither us nor Fenix show
any UI to enable deprecated TLS anymore. That string isn't in the
firefox-android repo afaict:

  https://github.com/search?type=code&q=repo%3Amozilla-mobile%2Ffirefox-android+allowDeprecatedTls

So this is just dead code.

Differential Revision: https://phabricator.services.mozilla.com/D178958
2023-05-25 10:00:46 +00:00
James Teh
45e9e9b5ee Bug 1821956 part 7: Remove DocAccessibleChildBase::IsConstructedInParentProcess. r=nlapre
Now that we don't defer events on Windows, this isn't necessary on Windows.
Usage of this on other platforms was removed in bug 1821957.

Differential Revision: https://phabricator.services.mozilla.com/D177900
2023-05-21 22:23:48 +00:00
James Teh
a8c3928847 Bug 1821956 part 4: Remove COM proxy, HWND and MSAA id code from PDocAccessible. r=nlapre
All of this is only used to support content process COM proxies.

Differential Revision: https://phabricator.services.mozilla.com/D177897
2023-05-21 22:23:47 +00:00
James Teh
2241907f41 Bug 1821956 part 1: Remove content process COM proxy support from MsaaAccessible, ia2Accessible, etc. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D177894
2023-05-21 22:23:47 +00:00
James Teh
ddfdb64368 Bug 1821955 part 5: Change all CtW pref checks to use a11y::IsCacheActive. r=eeejay,taskgraph-reviewers,bhearsum
This was done using the following script:

```
matchingFiles=`git grep -l accessibility_cache_enabled`
sed -i 's/StaticPrefs::accessibility_cache_enabled_AtStartup/a11y::IsCacheActive/' $matchingFiles
for f in $matchingFiles; do
  usesA11yPref=
  grep -q StaticPrefs::accessibility_ $f && usesA11yPref=1
  hasA11yInclude=
  grep -q 'nsAccessibilityService.h' $f && hasA11yInclude=1
  if [ -z $usesA11yPref ] && [ -z $hasA11yInclude ]; then
    sed -i 's,mozilla/StaticPrefs_accessibility.h,nsAccessibilityService.h,' $f
  elif [ -z $usesA11yPref ] && [ $hasA11yInclude ]; then
    sed -i '/"mozilla.StaticPrefs_accessibility.h"/d' $f
  elif [ $usesA11yPref ] && [ -z $hasA11yInclude ]; then
    sed -i '/"mozilla.StaticPrefs_accessibility.h"/a#include "nsAccessibilityService.h"' $f
  fi
done
```

Differential Revision: https://phabricator.services.mozilla.com/D177722
2023-05-19 02:56:48 +00:00