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

338 Коммитов

Автор SHA1 Сообщение Дата
Markus Stange 8a3a14adde Bug 1765399 - Make VsyncParent use VsyncDispatcher instead of VsyncSource. r=smaug
This doesn't change much; VsyncParent was already only using mVsyncSource
to obtain the VsyncDispatcher. (And to get the vsync rate, which it can
now get directly from the dispatcher.)

Differential Revision: https://phabricator.services.mozilla.com/D144370
2022-05-05 02:15:16 +00:00
Marian-Vasile Laza 1cd0ac703f Backed out 16 changesets (bug 1765399) for causing build bustages on RefPtr.h.
Backed out changeset 8ff5e213e351 (bug 1765399)
Backed out changeset bd164f5cc8b3 (bug 1765399)
Backed out changeset 939b577eee05 (bug 1765399)
Backed out changeset ee00e3583f42 (bug 1765399)
Backed out changeset e5001537e536 (bug 1765399)
Backed out changeset d5a4004a2955 (bug 1765399)
Backed out changeset d3c1f6c420e3 (bug 1765399)
Backed out changeset d21fca656853 (bug 1765399)
Backed out changeset 5e5a29a99c9e (bug 1765399)
Backed out changeset ce326de1e107 (bug 1765399)
Backed out changeset 3890e83660b0 (bug 1765399)
Backed out changeset 2f3ceca7aefe (bug 1765399)
Backed out changeset 40c47c498858 (bug 1765399)
Backed out changeset 3a3a2aa6de9b (bug 1765399)
Backed out changeset 4a30a4b3d30d (bug 1765399)
Backed out changeset a9115d9d648e (bug 1765399)
2022-05-05 00:30:06 +03:00
Markus Stange 158eed9303 Bug 1765399 - Make VsyncParent use VsyncDispatcher instead of VsyncSource. r=smaug
This doesn't change much; VsyncParent was already only using mVsyncSource
to obtain the VsyncDispatcher. (And to get the vsync rate, which it can
now get directly from the dispatcher.)

Differential Revision: https://phabricator.services.mozilla.com/D144370
2022-05-04 16:13:37 +00:00
Andreas Farre e4c062012a Bug 1739450 - Part 1: Move ownership of session store scroll and form data to platform. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D130389
2022-04-19 15:19:22 +00:00
Timothy Nikkel 4cac1c7814 Bug 1763121. nsIDOMWindowUtils::sendNativeTouchpadPan should use an observer to notify when the event has been sent to the destination widget. r=hiro
Otherwise we can return without the widget even seeing the event. This is how other test functions are implemented.

We need this to make the test in bug 1757928 pass.

Differential Revision: https://phabricator.services.mozilla.com/D142943
2022-04-05 22:53:35 +00:00
Cathy Lu b5b91ffc69 Bug 1753700 - Add priorityHint to allow apps to increase process priority for background tabs r=geckoview-reviewers,mccr8,agi
Prior behavior for active tabs in an inactive app would have the process priority oom score of 15. Now it's set to a higher priority oom score of 11. This will increase priority for recently used tabs on apps and prevent Android from unloading them.

Differential Revision: https://phabricator.services.mozilla.com/D142386
2022-04-04 17:41:37 +00:00
Makoto Kato a52f695229 Bug 1750532 - Get rid of orientation information from BrowserParent/BrowserChild. r=nika
This is introduced by bug 805939, but no one uses it.
Screen orientation information is handled by `hal::ScreenConfiguration` now.

Differential Revision: https://phabricator.services.mozilla.com/D136119
2022-01-18 00:57:36 +00:00
Kagami Sascha Rosylight 6a8c77d944 Bug 1539884 - Part 16: Mark BrowserParent::RecvReplyKeyEvent/RecvAccessKeyNotHandled as CAN_RUN_SCRIPT_BOUNDARY r=masayuki
Depends on D134106

Differential Revision: https://phabricator.services.mozilla.com/D134107
2021-12-17 13:27:51 +00:00
Nika Layzell 90a12e2587 Bug 1725572 - Part 3: Recover from a missing subframe BrowsingContext in ConstructBrowser, r=smaug
If the BrowsingContext is missing in ConstructBrowser, previously we would fail
out, crashing the content process. With this new change, we instead exit
successfully, destroying the `ManagedEndpoint` instances due to the earlier
changes in this bug, and displaying the subframe as crashed.

As we don't know how to reproduce the case which caused this crash, this change
instead triggers the failure using a custom pref, which can be used to request
that attempts to create a BrowserParent for a specific BrowsingContext fail in
the same way as it would for a missing BrowsingContext, allowing us to test the
behaviour.

Differential Revision: https://phabricator.services.mozilla.com/D128778
2021-10-18 22:59:18 +00:00
Olli Pettay a20bf5465f Bug 1731132, unsuppress painting on top level content presshells sooner, r=emilio
Unsuppressing is done only if the page can use stylesheet cache. That should mean the
load isn't a cold load and also some other resources may be cached and thus
painting could happen sooner.

There is currently a regression around dom.ipc.processCount.webIsolated handling, but the
testing has been done with dom.ipc.processCount.webIsolated==1, and the patch for bug 1731792
should give back similar behavior as what process count 1 has.

Differential Revision: https://phabricator.services.mozilla.com/D125878
2021-09-28 12:04:42 +00:00
criss 9d7155125b Backed out 2 changesets (bug 1731792) for causing devtools failures on browser_console_error_source_click.js
Backed out changeset 567d4eb7bc83 (bug 1731792)
Backed out changeset db57b8568ae9 (bug 1731792)
2021-09-28 06:15:28 +03:00
Nika Layzell 2793bb97a7 Bug 1731792 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2021-09-27 22:34:20 +00:00
Butkovits Atila 24d8b4f45f Backed out 2 changesets (bug 1731792) for causing mochitest failures.
Backed out changeset 44c28a29bbd8 (bug 1731792)
Backed out changeset 51bdb1d4baab (bug 1731792)
2021-09-27 18:54:29 +03:00
Nika Layzell e1a2352d73 Bug 1731792 - Part 1: Avoid cycling between processes when navigating within a tab, r=smaug
This patch replaces the previous process selection infrastructure with a
new setup implemented entirely in C++, which should more accurately
track the set of processes in use, and should encourage re-use of the
existing content process when navigating by not counting the current
tab.

This approach intentionally allows for process switching to another
process during navigation if there is uneven load between processes to
encourage balanced process use.

I think this may also fix some of the session restore issues with many
tabs using the same process, rather than being spread over 4, as we now
track a tab earlier in its lifecycle before the BrowserParent instance
is created.

Differential Revision: https://phabricator.services.mozilla.com/D126405
2021-09-27 13:49:32 +00:00
Kagami Sascha Rosylight 6c8d3ce28a Bug 1728171 - Part 2: Add button parameter to utils.sendNativePenInput r=cmartin,edgar
Differential Revision: https://phabricator.services.mozilla.com/D124172
2021-09-06 11:50:34 +00:00
Neil Deakin 096cf745db Bug 1727176, use window contexts for the drag and drop source, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D123520
2021-08-31 00:58:34 +00:00
Timothy Nikkel 5014725e77 Bug 1678771. Add test. r=hiro
We implement a new nsIDOMWindowUtils function sendNativeTouchpadPan to do this. It is only implemented on Windows here.

Depends on D122048

Differential Revision: https://phabricator.services.mozilla.com/D122049
2021-08-08 22:04:18 +00:00
Timothy Nikkel 5eefc2666f Bug 1678771. Rename TouchpadPinchPhase to TouchpadGesturePhase. r=hiro
So we can use it for sending pan gestures too.

Depends on D114358

Differential Revision: https://phabricator.services.mozilla.com/D122048
2021-08-08 22:04:17 +00:00
Olli Pettay 6492d1564b Bug 1721306, hide the tooltip when deactivating a BrowserParent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D121756
2021-08-06 19:33:04 +00:00
Marian-Vasile Laza 9c94fc9c4c Backed out changeset 37008f131c6f (bug 1721306) for causing bustages on SessionHistoryEntry.cpp. 2021-08-06 19:28:58 +03:00
Olli Pettay ece46d2b64 Bug 1721306, hide the tooltip when deactivating a BrowserParent, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D121756
2021-08-06 15:13:36 +00:00
Matt Woodrow 4b6db2ad05 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-08-05 06:48:34 +00:00
Emilio Cobos Álvarez edad6cfc6f Bug 1677324 - Keep painting the of the old remote frame when going into the bfcache until the child unsuppresses painting. r=nika
This should pretty much match our non-fission behavior. I found the
original approach of keeping the frameloader from nsSubDocumentFrame
quite hard to get green on try unfortunately, because among other
things, the new frameloader wouldn't get the right viewport sizes /
position / etc.

Differential Revision: https://phabricator.services.mozilla.com/D121198
2021-08-01 21:45:56 +00:00
Kashav Madan f090aabc96 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-31 01:39:09 +00:00
Sandor Molnar ca94997814 Backed out changeset 4593c3d66951 (bug 1718761) for causing clang build bustages. CLOSED TREE 2021-07-31 03:44:56 +03:00
Kashav Madan c84c4eb9d7 Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
This accomplishes 2 things:

1. Allows us to directly fetch the layersId of the process that is
   autoscrolling, which avoids having to fetch it in AutoScrollChild and pass it
   around. This fixes autoscrolling out-of-process frames with Fission enabled.
2. Makes it easier to handle autoscrolling of in-process documents, since that
   can't happen through PBrowser.

Differential Revision: https://phabricator.services.mozilla.com/D120766
2021-07-30 23:39:32 +00:00
Emilio Cobos Álvarez 82baca9319 Bug 1722910 - Remove unused FrameLoader.requestNotifyAfterRemotePaint machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D121195
2021-07-30 09:37:20 +00:00
Csoregi Natalia bc4c680c8d Backed out 3 changesets (bug 1722258) for causing Bug 1722935. a=backout
Backed out changeset cf8a1175abd1 (bug 1722258)
Backed out changeset 41176d476eb7 (bug 1722258)
Backed out changeset 4149d596d03d (bug 1722258)
2021-07-29 20:19:48 +03:00
Matt Woodrow 7cd494afba Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120920
2021-07-28 20:58:22 +00:00
Aaron Klotz 022c804b33 Bug 1690296: Add callback to notify app to fully display its dynamic toolbar; r=agi,owlish,hiro
* Per advice from Emilio on Matrix, I consolidated overflow checks into `ScrollFrameHelper::GetOverflowState()`.
* In `ScrollFrameHelper::ReflowFinished` we detect the condition requring the app to expand the toolbar.
  (Hiro, I know that you suggested a second place to detect this. If you feel that it is important enough to add that,
   we'd prefer filing a follow-up bug in Layout for that case that your team can follow up on.)
* We then propagate the notification through `PresShell`, up through `PBrowser`, through the `nsWindow`, then into the `GeckoSession`
* We invoke a new method on the `ContentDelegate`. This seemed like the reasonable delegate to use given other existing
  callbacks in the similar vein (such as going fullscreen), but let me know if this should go elsewhere.
* We update GVE and JUnit tests to test this.

Differential Revision: https://phabricator.services.mozilla.com/D120499
2021-07-27 21:50:03 +00:00
Emilio Cobos Álvarez 0c7b4c828a Bug 1717983 - Don't consider a browser active if the tab is inactive but we're preserving layers. r=nika
GeckoView always calls preserveLayers(true) on all <browser> elements,
which causes the puppet widget to always be considered visible.

Given how the code worked before, aBrowsingContext.isActive = false
after that call would deactivate the pres shell, but after my patch it
stops doing so.

We don't really want to un-throttle the refresh driver etc just because
we're preserving layers, so propagate the state to the child process and
account for that in the logic to determine PresShell activeness.

Depends on D118703

Differential Revision: https://phabricator.services.mozilla.com/D118884
2021-07-05 17:31:49 +00:00
Emilio Cobos Álvarez b2f35d2cc0 Bug 1714614 - Avoid some copies of URI arrays in GeckoViewHistory. r=geckoview-reviewers,agi
Also preliminar cleanup.

Depends on D117177

Differential Revision: https://phabricator.services.mozilla.com/D117178
2021-06-08 17:53:04 +00:00
Nika Layzell 7168587605 Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-06-03 16:59:32 +00:00
Edgar Chen e3649a9c0c Bug 1714313 - Get rid of FrameLoader::SendCrossProcessMouseEvent; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116707
2021-06-03 13:47:02 +00:00
Kashav Madan 2dafa64364 Bug 1706445 - Handle `isFinal` updates through native code, r=nika
Replaces the `isFinal` bit with a "browser-shutdown-tabstate-updated" observer
notification, which is fired after all frames in the document are flushed.

Differential Revision: https://phabricator.services.mozilla.com/D116146
2021-06-01 20:06:47 +00:00
Andreas Farre dd51467c22 Part 7: Bug 1700623 - Make session storage session store work with Fission. r=nika
Use the newly added session storage data getter to access the session
storage in the parent and store it in session store without a round
trip to content processes.

Depends on D111433

Differential Revision: https://phabricator.services.mozilla.com/D111434
2021-05-26 07:14:06 +00:00
Csoregi Natalia 15d4f16e13 Backed out 2 changesets (bug 1709346) for causing XPCConvert crashes. CLOSED TREE
Backed out changeset 7c1e15680741 (bug 1709346)
Backed out changeset 34eff3430674 (bug 1709346)
2021-05-26 00:32:25 +03:00
Nika Layzell 804c0c75da Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 17:31:53 +00:00
Butkovits Atila 8ef6ea3d5d Backed out 2 changesets (bug 1709346) for causing failures on browser_bug1709346.js. CLOSED TREE
Backed out changeset 19df1a8bfacc (bug 1709346)
Backed out changeset 602a7b4a41de (bug 1709346)
2021-05-25 19:52:49 +03:00
Nika Layzell a013b4d74e Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers
This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
2021-05-25 15:54:48 +00:00
Alexandru Michis 84d8f14b41 Backed out 9 changesets (bug 1700623) for causing bc failures in browser_history_menu.js
CLOSED TREE

Backed out changeset 5eae296ad8b5 (bug 1700623)
Backed out changeset 97c3add3b00a (bug 1700623)
Backed out changeset 7ab483627a27 (bug 1700623)
Backed out changeset a4e673640de5 (bug 1700623)
Backed out changeset 513ea16be430 (bug 1700623)
Backed out changeset 88b4add342df (bug 1700623)
Backed out changeset c13bdee1b526 (bug 1700623)
Backed out changeset 26df421dac02 (bug 1700623)
Backed out changeset 6cd0b7a269e5 (bug 1700623)
2021-05-21 11:43:54 +03:00
Andreas Farre dc6296a1ba Part 7: Bug 1700623 - Make session storage session store work with Fission. r=nika
Use the newly added session storage data getter to access the session
storage in the parent and store it in session store without a round
trip to content processes.

Depends on D111433

Differential Revision: https://phabricator.services.mozilla.com/D111434
2021-05-20 12:48:23 +00:00
Kershaw Chang 8394bdd6d1 Bug 1491084 - Remove unused code that shows http auth prompt for nested content process, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D115374
2021-05-18 19:43:05 +00:00
Masayuki Nakano e9d6280e92 Bug 1520983 - part 1: Add new content command event for inserting text r=smaug
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events.  Instead, they expose only
`beforeinput` event and `input` event.  We should follow their behavior for web-compat
because `beforeinput` events for IME composition are never cancelable, but the
`beforeinput` events for the cases are cancelable of the other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D114826
2021-05-18 06:30:35 +00:00
Butkovits Atila f3f08e64ba Backed out 2 changesets (bug 1520983) for causing build bustages. CLOSED TREE
Backed out changeset c09060ee8358 (bug 1520983)
Backed out changeset b4c25d047cee (bug 1520983)
2021-05-18 07:47:57 +03:00
Masayuki Nakano 1bb2df9ea3 Bug 1520983 - part 1: Add new content command event for inserting text r=smaug
For inserting text from OS in special cases, e.g., when inserting 2 or more characters
per keydown or inserting text without key press, we use a set of composition events on
macOS, but the other browsers don't use composition events.  Instead, they expose only
`beforeinput` event and `input` event.  We should follow their behavior for web-compat
because `beforeinput` events for IME composition are never cancelable, but the
`beforeinput` events for the cases are cancelable of the other browsers.

Differential Revision: https://phabricator.services.mozilla.com/D114826
2021-05-17 23:52:43 +00:00
Andrew McCreight 0688567b46 Bug 1618547 - Support Fission in the process priority manager. r=kmag,gsvelto
With Fission, there can be multiple BrowserParents in a single tab, so
this patch moves the tracking of active tabs onto the top BrowsingContext
in a tab. If the priority of a top BC is changed, then the activity
of all of the BPs of the BCs in the tree are all adjusted. The flag
that tracks this state gets carried forward to the new BC in the case
of a cross-group navigation by the changes in ReplacedBy().

The other change here covers the case where we do a process-switching
navigation on an iframe. If we create a new BrowserParent with an active
top BC, then the BP gets marked as active in the priority manager. Doing
this tracking on the BP instead of the BC (both here in and in the part
that landed previously in BrowserParent::Deactivated()) means that we
don't need to track down every place that a BC switches processes.

I left the tracking of activity in ParticularProcessPriorityManager
centered around BrowserParents, instead of changing it to BCs, to
minimize the changes required. There are some tricky interactions there
with wakelocks that I didn't want to have to figure out.

browser_ProcessPriorityManager.js was set up to track a mapping of
browsers to priorities, but for the purposes of testing Fission support
I changed it to track a mapping of child IDs to priorities.

In the test, I also removed an assignment (this.window = null) that
didn't seem to be doing anything.

Differential Revision: https://phabricator.services.mozilla.com/D112213
2021-05-07 17:51:34 +00:00
Noemi Erli b7da3f34ee Backed out changeset f45996fe15b2 (bug 1618547) for causing failures in browser_ProcessPriorityManager.js CLOSED TREE 2021-05-06 00:53:54 +03:00
Andrew McCreight 063f9001b0 Bug 1618547 - Support Fission in the process priority manager. r=kmag,gsvelto
With Fission, there can be multiple BrowserParents in a single tab, so
this patch moves the tracking of active tabs onto the top BrowsingContext
in a tab. If the priority of a top BC is changed, then the activity
of all of the BPs of the BCs in the tree are all adjusted. The flag
that tracks this state gets carried forward to the new BC in the case
of a cross-group navigation by the changes in ReplacedBy().

The other change here covers the case where we do a process-switching
navigation on an iframe. If we create a new BrowserParent with an active
top BC, then the BP gets marked as active in the priority manager. Doing
this tracking on the BP instead of the BC (both here in and in the part
that landed previously in BrowserParent::Deactivated()) means that we
don't need to track down every place that a BC switches processes.

I left the tracking of activity in ParticularProcessPriorityManager
centered around BrowserParents, instead of changing it to BCs, to
minimize the changes required. There are some tricky interactions there
with wakelocks that I didn't want to have to figure out.

browser_ProcessPriorityManager.js was set up to track a mapping of
browsers to priorities, but for the purposes of testing Fission support
I changed it to track a mapping of child IDs to priorities.

In the test, I also removed an assignment (this.window = null) that
didn't seem to be doing anything.

Differential Revision: https://phabricator.services.mozilla.com/D112213
2021-05-05 20:29:14 +00:00
Emilio Cobos Álvarez 1cdf344860 Bug 1680387 - Apply intrinsic image resolution as appropriate in layout/style/dom, and update test expectations. r=tnikkel
This should be mostly straight-forward, since we have code for this
anyways for image-set() and srcset.

The only thing is that we were using floats for resolution, but since
EXIF allows you to scale each axis separately, we now need to pass an
image::Resolution instead.

The main outstanding issue is the spec comment mentioned in the previous
patch, about what happens if you have srcset/image-set and the image
density specified together. For now I've implemented what the
image-set() spec says, but this is subject to change before shipping of
course.

Differential Revision: https://phabricator.services.mozilla.com/D113265
2021-05-05 09:41:24 +00:00