Commit Graph

544 Commits

Author SHA1 Message Date
sotaro
32b2475737 Bug 1774815 - Make sure if layers connection is requested by parent r=jnicol,gfx-reviewers,bradwerth
We want to skip InitRendering only when parent side does not requested to connect layers. Current implementation is not clear about meaning of "mLayersConnected == Some(false)". It has the following 2 meanings.
[1] parent side does not request to connect layers.
[2] parent side requested to connect layers, but the connect was failed.

We need to distinguish between [1] and [2]. mLayersConnectRequested is added for it.

Differential Revision: https://phabricator.services.mozilla.com/D149637
2022-06-18 15:00:41 +00:00
Jamie Nicol
e0f0c3a6c2 Bug 1774201 - Stop skipping ReinitRendering if previous attempt failed. r=gfx-reviewers,aosmond
In bug 1728062 we made it so that we that we skip
BrowserChild::ReinitRendering if the BrowserChild is not connected to
a compositor. This was in order to avoid initializing the compositor
for windowless browsers.

However, in cases where the GPU process dies before an initial
InitRendering has completed, then the BrowserChild will also be left
not connected to a compositor, with mLayersConnected == Some(false).
ReinitRendering will be called once the new GPU process has been
launched, but due to this condition we will exit early, and the tab
will be left in an unusable state.

To fix this, this patch changes the early return condition to only
check for mLayersConnected.isNothing(), ie we never even attempted to
initialize rendering. When it is Some(false), ie we attempted and
failed, then ReinitializeRendering is still executed.

Differential Revision: https://phabricator.services.mozilla.com/D149619
2022-06-17 14:16:42 +00:00
Benjamin VanderSloot
3625dae128 Bug 1770403, part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang
With the use of mStorageAccessPermissionGranted reduced to a single meaning, it turns out to be entirely redundant with the variable on the inner window.

Depends on D147867

Differential Revision: https://phabricator.services.mozilla.com/D147868
2022-06-08 21:57:15 +00:00
Marian-Vasile Laza
bd44a1b4a8 Backed out 5 changesets (bug 1765313, bug 1770403) for causing bc failures on browser_storageAccessPrivilegeAPI.js. CLOSED TREE
Backed out changeset 22153c8641e1 (bug 1765313)
Backed out changeset 588d54f796a0 (bug 1765313)
Backed out changeset 2376ca53eb9c (bug 1765313)
Backed out changeset 9cf02ec5657a (bug 1770403)
Backed out changeset 7d8147ba25e8 (bug 1770403)
2022-06-08 22:07:37 +03:00
Benjamin VanderSloot
68fc2d1b39 Bug 1770403, part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang
With the use of mStorageAccessPermissionGranted reduced to a single meaning, it turns out to be entirely redundant with the variable on the inner window.

Depends on D147867

Differential Revision: https://phabricator.services.mozilla.com/D147868
2022-06-08 17:11:18 +00:00
Nika Layzell
a4a6fe3798 Bug 1773088 - Part 2: Stop requiring an actor to serialize StructuredCloneData over IPC, r=asuth
This is largely a straightforward find and replace of various methods, with the
unnecessary arguments removed and compiler errors fixed.

Differential Revision: https://phabricator.services.mozilla.com/D148532
2022-06-08 15:24:27 +00:00
Molnar Sandor
cb1c2d7987 Backed out 5 changesets (bug 1765313, bug 1770403) for causing lint failure in tools/lint/rejected-words.yml CLOSED TREE
Backed out changeset c76671d99573 (bug 1765313)
Backed out changeset f0895e88c27e (bug 1765313)
Backed out changeset 81a0f8c40381 (bug 1765313)
Backed out changeset a11f5453e441 (bug 1770403)
Backed out changeset df452028881c (bug 1770403)
2022-06-08 15:48:57 +03:00
Benjamin VanderSloot
ae8d206f99 Bug 1770403, part 2 - Remove mStorageAccessPermissionGranted from the outer window, r=anti-tracking-reviewers,timhuang
With the use of mStorageAccessPermissionGranted reduced to a single meaning, it turns out to be entirely redundant with the variable on the inner window.

Depends on D147867

Differential Revision: https://phabricator.services.mozilla.com/D147868
2022-06-08 12:18:22 +00:00
Masayuki Nakano
c5a966e2bc Bug 1763634 - part 2: Make BrowserParent verify whether replied keyboard events are what it sent r=smaug
For making this, `BrowserParent` (temporarily) store sent keyboard events which
wants reply from the remote process.  Then, when it gets a reply event received,
it compares whether the event data is broken or not.

Differential Revision: https://phabricator.services.mozilla.com/D145944
2022-06-02 23:50:44 +00:00
James Teh
ecd3ad9bab Bug 1756728 part 1: Make it possible to retrieve a BrowsingContext from a DocAccessibleParent. r=morgan
Previously, even for remote in-process iframes, it was only possible to retrieve the top level BrowsingContext for the remote process by getting the managing BrowserParent.
This makes it possible to get the correct BrowsingContext even for in-process iframes.

Differential Revision: https://phabricator.services.mozilla.com/D147716
2022-06-01 00:34:17 +00:00
Daniel Holbert
95e3afe5ef Bug 1769832: Move a print-related #include to an ifdef-guarded section, to fix compile error with --disable-printing. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D146627
2022-05-17 21:55:45 +00:00
Edgar Chen
150934d5ab Bug 1768597 - Part 2: Use nsContentUtils::IPCTransferableToTransferable to convert IPCDataTransfer into nsITransferable; r=NeilDeakin
Differential Revision: https://phabricator.services.mozilla.com/D145941
2022-05-17 08:12:03 +00:00
Edgar Chen
2e6102ce40 Bug 1768597 - Part 1: Ensure all Shmem data is deallocated in nsContentUtils::IPCTransferableToTransferable; r=NeilDeakin
If a IPCDataTransferItem fails to be converted, the subsequent IPCDataTransferItems
will be ignored, and the data in Shmem won't be deallocated properly if any.

Differential Revision: https://phabricator.services.mozilla.com/D145940
2022-05-17 08:12:03 +00:00
Jonathan Watt
b677f00ccc Bug 1769388 - Change nsIPrintSettingsService's 'newPrintSettings' attribute to a 'createNewPrintSettings' function. r=bobowen,webdriver-reviewers,whimboo
Having an attribute be a constructor is just...wrong.

Differential Revision: https://phabricator.services.mozilla.com/D146383
2022-05-16 11:50:34 +00:00
Jonathan Watt
1592fc4878 Bug 1432651 p2 - Remove nsIPrintSession and all the code that uses it. r=emilio,geckoview-reviewers,m_kato
Lately nsIPrintSession was only used to pass around RemotePrintJobChild objects.
Now that we pass those objects explicitly where needed (part 1), this class
serves no purpose.

Another reason to want to get rid of this class is that having it as a member
of nsIPrintSettings made no sense and was confusing.

Differential Revision: https://phabricator.services.mozilla.com/D146381
2022-05-16 08:38:02 +00:00
Jonathan Watt
e5a8eb1650 Bug 1432651 p1 - Pass RemotePrintJobChild through to the places where it's needed. r=emilio
Given how nsIPrintSettings is passed around, stored and copied all over the
place, it's very hard to reason about where and when a RemotePrintJobChild is
needed or valid. This patch avoids all that by explicitly passing a
RemotePrintJobChild when it's needed.

Another reason to make this change is because RemotePrintJobChild really does
not belong on nsIPrintSettings. That interface is supposed to represent a
collection of settings for laying out the document that is to be printed.

Differential Revision: https://phabricator.services.mozilla.com/D146380
2022-05-16 08:38:01 +00:00
Timothy Nikkel
d426aa70aa Bug 1764878. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D144639
2022-05-04 06:15:43 +00:00
Csoregi Natalia
d61b1fe92b Backed out changeset d1f6439e5029 (bug 1764878) for causing bustage on nsWebBrowser.cpp. CLOSED TREE 2022-05-04 07:51:07 +03:00
Timothy Nikkel
254c8cac62 Bug 1764878. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D144639
2022-05-04 04:33:34 +00:00
David Parks
e07a05259e Bug 1766082: Allow content to wait for parent screen transforms r=emilio
Content processes can provide screen coordinates in e.g. window objects and events without waiting for the proper client-to-screen transforms to be given to them from the parent process.  This poses a problem for tests that want to check the screen coordinates, so we add SpecialPowers.ContentTransformsReceived() to allow content processes to wait for these transforms.

Differential Revision: https://phabricator.services.mozilla.com/D144742
2022-05-02 20:43:12 +00:00
Andreas Farre
ea19a48880 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
Mike Conley
360fc14ba5 Bug 1764790 - Remove TopLevelNavigationDelegate support. r=nika
Depends on D143926

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

Differential Revision: https://phabricator.services.mozilla.com/D138007
2022-02-15 08:00:05 +00:00
Olli Pettay
b2489b968b Bug 1753366, remove unexpected MOZ_ASSERT, r=peterv
Other places in BrowserChild explicitly just handle null docshell.
(The only special case is when we have just created WebBrowser object in Init())

Differential Revision: https://phabricator.services.mozilla.com/D138657
2022-02-14 15:34:36 +00:00
Makoto Kato
05a04737a2 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
Emilio Cobos Álvarez
faa98ed83f Bug 1748174 - Remove touch-action pref. r=hiro
It's been enabled by default since ~forever.

Differential Revision: https://phabricator.services.mozilla.com/D134935
2022-01-05 12:28:07 +00:00
Andrew McCreight
07ff31e20d Bug 1747177 - Add a null check in BrowserChild::RecvUpdateEpoch. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D134987
2022-01-04 14:39:58 +00:00
Emilio Cobos Álvarez
c31cbabb32 Bug 1748174 - Clean-up a bit touch-action code. r=hiro
This shouldn't change behavior but makes following the code a bit
easier. There's no point in using callbacks for touch-action as:

 * We return the computed flags anyways.
 * Each caller wants to do something different.
 * (more importantly) The callback gets called synchronously.

So move the relevant code to TouchActionHelper and make the callers deal
with the flags as they please. I've preserved the behavior of only doing
the thing if the flags array is non-empty.

Differential Revision: https://phabricator.services.mozilla.com/D134933
2022-01-04 13:31:34 +00:00
Peter Van der Beken
e3ef4b903e Bug 1744397 - Simplify refresh code: pass around delay as an unsigned int. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132863
2021-12-16 22:27:08 +00:00
Norisz Fay
d281685db4 Backed out 5 changesets (bug 1742865, bug 1744397) for causing wpt failures on attr-meta-http-equiv-refresh/parsing.html CLOSED TREE
Backed out changeset 7b01edc5a0e0 (bug 1744397)
Backed out changeset 41abd4b7d2c0 (bug 1744397)
Backed out changeset 634641e3a05a (bug 1744397)
Backed out changeset 6e7755177481 (bug 1744397)
Backed out changeset e9fc94b33da9 (bug 1742865)
2021-12-14 13:25:58 +02:00
Peter Van der Beken
d15e0b1095 Bug 1744397 - Simplify refresh code: pass around delay as an unsigned int. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D132863
2021-12-14 10:14:00 +00:00
Andrew Osmond
cabfab5e52 Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-10 02:57:50 +00:00
Csoregi Natalia
77f4c3192d Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond
6c4cd0191f Bug 1738971 - Part 3. Rework VsyncChild to allow multiple implementations. r=gfx-reviewers,jgilbert
VsyncChild is main thread only, and we would like to reuse PVsync on the
worker threads via PBackgroundChild which already implements it. This
patch does the necessary refactoring to have multiple implementations of
PVsyncChild.

Differential Revision: https://phabricator.services.mozilla.com/D130264
2021-12-09 19:25:23 +00:00
Makoto Kato
6d0db7ba15 Bug 1743780 - Get rid of PuppetScreenManager and PuppetScreen. r=emilio
Now we use `mozilla::widget::ScreenManager` even if on content process, so no
one uses `PuppetScreen` and `PuppetScreenManager`.

And I would like to remove `Hal.h` reference from `PuppetWidget`, so I remove
unused method.

Differential Revision: https://phabricator.services.mozilla.com/D132564
2021-12-01 15:07:14 +00:00
Jamie Nicol
01b7e43b00 Bug 1741156 - Reinitialize compositor and request repaint after GPU process restart. r=aosmond,geckoview-reviewers,agi
This patch ensures that, following a GPU process crash, we
re-initialize the compositor and resume painting on Android.

nsWindow::GetWindowRenderer() is made to always reinitialize the
window renderer if there is none, like on other platforms. We
therefore no longer need to track whether webrender is being disabled,
as this is no longer a special case.

Previously we started the compositor as initially paused in
nsBaseWidget::CreateCompositorSession only if the widget did not yet
have a surface. Now we must unconditionally (re)start it as initially
paused, as even though the widget in the parent process may have a
surface, we will not have been able to send it to the GPU process
yet. We will send the surface to the compositor once control flow
returns to nsWindow::CreateLayerManager, where we will also now resume
the compositor if required.

Finally, we must ensure that we manually trigger a paint, both in the
parent and content processes. On other platforms this occurs
automatically following a GPU process loss through various refresh
driver events. On Android, however, nothing causes the refresh driver
to paint by itself, and we cannot receive input without first
initializing our APZ controllers, which does not happen until the
compositor receives a display list. We therefore must manually
schedule a paint. We do so from nsWindow::NotifyCompositorSessionLost
for the parent process, and BrowserChild::ReinitRendering for content
processes.

Differential Revision: https://phabricator.services.mozilla.com/D131232
2021-11-29 20:52:31 +00:00
sotaro
07bb5b9eb6 Bug 1741783 - Rename PuppetWidget::HasLayerManager() to HasWindowRenderer() r=gfx-reviewers,nical
PuppetWidget already renamed GetLayerManager() to GetWindowRenderer().

Differential Revision: https://phabricator.services.mozilla.com/D131465
2021-11-18 14:16:00 +00:00
sotaro
c34d68e605 Bug 1741111 - Remove LayersBackend::LAYERS_BASIC r=gfx-reviewers,bradwerth
LayersBackend::LAYERS_BASIC is not used any more.

Differential Revision: https://phabricator.services.mozilla.com/D131104
2021-11-17 22:05:47 +00:00
Tooru Fujisawa
688a5da5c5 Bug 1701001 - Part 2: Add "is popup" field to browsing context. r=smaug
Add BrowsingContext::FieldValues.mIsPopupRequested, and pass "is popup"
value calculated before opening window/tab to BrowsingContext::CreateDetached.

Other code path that is unrelated to content-priv window.open uses the
default value false.

Differential Revision: https://phabricator.services.mozilla.com/D129411
2021-11-06 01:19:14 +00:00
Tooru Fujisawa
2023605d86 Bug 1701001 - Part 1: Standardize the condition for opening popup from window.open. r=smaug
Removed "width" feature from the popup condition, and removed related parameters
(aWidthSpecified, and aSizeSpec) from functions.

Also added "popup" feature that explicitly specify whether to request popup or
not.
This is only for content context, and it behaves differently than existing
"popup" feature for chrome context that makes the window no-style.

Differential Revision: https://phabricator.services.mozilla.com/D129410
2021-11-06 01:19:14 +00:00
Marian-Vasile Laza
1ad5e0f00b Backed out 4 changesets (bug 1737832, bug 1701001) for causing geckoview failures on noopener-noreferrer-BarProp.window.html. CLOSED TREE
Backed out changeset ff439d9c0391 (bug 1701001)
Backed out changeset b0e47b1f4d39 (bug 1701001)
Backed out changeset 0e2ca3cc650e (bug 1701001)
Backed out changeset 712b897cbc76 (bug 1737832)
2021-11-06 02:44:46 +02:00
Tooru Fujisawa
4b4b4f1547 Bug 1701001 - Part 2: Add "is popup" field to browsing context. r=smaug
Add BrowsingContext::FieldValues.mIsPopupRequested, and pass "is popup"
value calculated before opening window/tab to BrowsingContext::CreateDetached.

Other code path that is unrelated to content-priv window.open uses the
default value false.

Differential Revision: https://phabricator.services.mozilla.com/D129411
2021-11-05 23:07:40 +00:00
Tooru Fujisawa
b55930f157 Bug 1701001 - Part 1: Standardize the condition for opening popup from window.open. r=smaug
Removed "width" feature from the popup condition, and removed related parameters
(aWidthSpecified, and aSizeSpec) from functions.

Also added "popup" feature that explicitly specify whether to request popup or
not.
This is only for content context, and it behaves differently than existing
"popup" feature for chrome context that makes the window no-style.

Differential Revision: https://phabricator.services.mozilla.com/D129410
2021-11-05 23:07:40 +00:00
Timothy Nikkel
d6a5d9edd2 Bug 1721601. Move "zoom in if can't zoom out" from being a flag to part of ZoomTarget for AsyncPanZoomController::ZoomToRect. r=botond
Instead of passing this flag all of the time for double taps we want to decide to do this or not in CalculateRectToZoomTo. Moving it into ZoomTarget seems like a good way to do this (which is done in the next patch).

Differential Revision: https://phabricator.services.mozilla.com/D128435
2021-10-16 05:07:55 +00:00
Matt Woodrow
1503ff4f1e Bug 1725267 - Split Paint entry points to make them easier to understand. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D125800
2021-09-22 03:36:52 +00:00
Matt Woodrow
b80e61355d Bug 1725267 - Remove unused region from PresShell::Paint. r=tnikkel
PaintFrame only uses the input region if !WidgetLayers, which Paint always passes.

Differential Revision: https://phabricator.services.mozilla.com/D125795
2021-09-22 03:36:50 +00:00
Emily McDonough
b297a4713c Bug 1721265 Part 2 - Send information about CSS page-size values to the print frontend through FinishPrintPreview r=emilio
This adds an optional paper orientation to PrintPreviewResultInfo populates it
from the CSS page size when finishing print preview. The value is then placed
in the PrintPreviewSuccessInfo to be sent to the frontend.

Differential Revision: https://phabricator.services.mozilla.com/D124248
2021-09-21 16:38:53 +00:00
Matt Woodrow
0f8591792b Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D124433
2021-09-05 22:36:45 +00:00
Matt Woodrow
6d4cf7026a Bug 1728914 - Use WebRenderLayerManager directly in BrowserChild. r=gfx-reviewers,jrmuizel
Depends on D124414

Differential Revision: https://phabricator.services.mozilla.com/D124415
2021-09-05 02:16:36 +00:00
sotaro
dfb233a7a0 Bug 1728062 - Skip BrowserChild::ReinitRendering() when BrowserChild is not connected to compositor r=jrmuizel,gfx-reviewers
In some cases, like when we create a windowless browser, RemoteLayerTreeOwner/BrowserChild is not connected to a compositor.

When widget in parent process is PuppetWidget by nsAppShellService::CreateWindowlessBrowser() RemoteLayerTreeOwner/BrowserChild was not connected to compositor.

Differential Revision: https://phabricator.services.mozilla.com/D123917
2021-08-31 07:04:10 +00:00