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

329 Коммитов

Автор SHA1 Сообщение Дата
Andreas Farre f9f96d23ca Bug 1662410 - Part 1: Fix usage of ChildSHistory.legacySHistory . r=peterv
ChildSHistory.legacySHistory isn't valid for content processes when
session history in the parent is enabled. We try to fix this by either
delegating to the parent by IPC or move the implementation partially
or as a whole to the parent.

Differential Revision: https://phabricator.services.mozilla.com/D89353
2020-09-16 14:51:01 +00:00
Kartikaya Gupta 803a237d97 Bug 1648491 - Have the main thread double-check APZ's consumable state. r=botond
APZ can sometimes indicate that it will be consuming touch events, even though
the touch-action properties prohibit it. This can happen if, for example, APZ
is waiting on the main-thread for accurate touch-action information. In such
cases, the main thread has enough information to filter out these false positives.
This patch makes it do that, by plumbing the allowed touch behaviors into
the APZEventState code that triggers the pointercancel event.

Differential Revision: https://phabricator.services.mozilla.com/D89303
2020-09-09 19:57:36 +00:00
Andrew Osmond c45c3ac881 Bug 1662836 - Expose detailed initialization failure reason for WebRender. r=kvark
We don't know why we see initialization failures in the telemetry which
makes it hard to investigate why users aren't getting WebRender and
instead fallback to basic. Let's expose the detailed error message
WebRender already generates and puts in the critical log.

Differential Revision: https://phabricator.services.mozilla.com/D89185
2020-09-08 02:03:26 +00:00
Emilio Cobos Álvarez c0f4091be3 Bug 1662975 - Don't return from window.print() until the print dialog is closed. r=jwatt
As much as I hate nested event loops, I think we need to do it for this
case :)

Hopefully print() already assumes nested event loops can happen because
of the native dialog so it's already properly set up for this.

Differential Revision: https://phabricator.services.mozilla.com/D89254
2020-09-03 17:03:06 +00:00
Bogdan Tara 473f41370a Backed out changeset 52d0f9a901a9 (bug 1662975) for nested_fullscreen.https.html failures CLOSED TREE 2020-09-03 23:41:38 +03:00
Emilio Cobos Álvarez 0d73b10ab3 Bug 1662975 - Don't return from window.print() until the print dialog is closed. r=jwatt
As much as I hate nested event loops, I think we need to do it for this
case :)

Hopefully print() already assumes nested event loops can happen because
of the native dialog so it's already properly set up for this.

Differential Revision: https://phabricator.services.mozilla.com/D89254
2020-09-03 17:03:06 +00:00
Bob Owen 5cb94890b3 Bug 1661975: Add whether we have a selection to PrintPreviewResultInfo. r=jwatt
This is then used in the front end to set the option in the settings.

Differential Revision: https://phabricator.services.mozilla.com/D89045
2020-09-02 08:15:35 +00:00
Jonathan Watt ad76c1dcba Bug 1653340. Add new FrameLoader.printPreview() API. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D88703
2020-09-01 11:00:36 +00:00
Anny Gakhokidze 8b553ecfcf Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-28 17:20:30 +00:00
Emilio Cobos Álvarez 044b3c4332 Bug 1636728 - Centralize printing entry points in nsGlobalWindowOuter, and move cloning out of nsPrintJob. r=jwatt,geckoview-reviewers,smaug,agi
This centralizes our print and preview setup in nsGlobalWindowOuter so
that we never re-clone a clone, and so that we reuse the window.open()
codepath to create the browsing context to clone into.

For window.print, for both old print dialog / silent printing and new
print preview UI, we now create a hidden browser (as in with visibility:
collapse, which takes no space but still gets a layout box).

 * In the modern UI case, this browser is swapped with the actual print
   preview clone, and the UI takes care of removing the browser.

 * In the print dialog / silent printing case, the printing code calls
   window.close() from nsDocumentViewer::OnDonePrinting().

 * We don't need to care about the old print preview UI for this case
   because it can't be open from window.print().

We need to fall back to an actual window when there's no
nsIBrowserDOMWindow around for WPT print tests and the like, which don't
have one. That seems fine, we could special-case this code path more if
needed but it doesn't seem worth it.

Differential Revision: https://phabricator.services.mozilla.com/D87063
2020-08-25 17:45:12 +00:00
Jamie Nicol 54ed855193 Bug 1647797 - Add GeckoView API to listen for when contentful paint status has been reset. r=geckoview-reviewers,agi,esawin
Android-components listens to the GeckoView callback onFirstContentfulPaint to
track whether a contentful paint has occured, in order to decide when to
thumbnail a tab. Currently this gets fired once per tab.

However, when the GeckoSession is paused, we clear cached resources in the
compositor. This means that when the session is resumed, the compositor does not
have the necessary information to render the page (such as painted content
buffers, or the webrender display list). Because android-components attempts to
capture a new thumbnail immediately upon resuming, it ends up capturing a blank
thumbnail.

To fix this, add a new callback onPaintStatusReset() which is invoked when the
cached resources are cleared. Android-components can listen for this to be
informed when the contentful paint is no longer visible. It can then wait until
the subsequent contentful paint occurs before capturing the thumbnail.

Differential Revision: https://phabricator.services.mozilla.com/D87341
2020-08-19 15:24:14 +00:00
Emilio Cobos Álvarez 6c008dd4fd Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-11 16:42:46 +00:00
Razvan Maries eed7de660b Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html. CLOSED TREE
Backed out changeset 23130282a937 (bug 1639328)
Backed out changeset 8628c5cddd14 (bug 1639328)
2020-08-11 05:13:41 +03:00
Emilio Cobos Álvarez 36a4392364 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 18:39:31 +00:00
Razvan Maries b29c16e540 Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html and browser_hidden_iframe.js. CLOSED TREE
Backed out changeset be370bea0702 (bug 1639328)
Backed out changeset 954bf9f3dca5 (bug 1639328)
2020-08-10 21:02:42 +03:00
Emilio Cobos Álvarez 9d054b84e4 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 14:50:27 +00:00
Emilio Cobos Álvarez ac6059e379 Bug 1657841 - Remove unused visible tabs tracking. r=edgar
This stopped being used at some point and now it's just useless.

Differential Revision: https://phabricator.services.mozilla.com/D86322
2020-08-07 09:40:07 +00:00
Butkovits Atila 3bd0e5497c Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE
Backed out changeset 0d22ad297b19 (bug 1589102)
Backed out changeset 14bcaf2a452c (bug 1589102)
Backed out changeset 20905f91e2bb (bug 1589102)
Backed out changeset 29ee0fbe855f (bug 1589102)
Backed out changeset d1f6185030af (bug 1589102)
Backed out changeset 31949872cc1d (bug 1589102)
Backed out changeset ec04e1a20597 (bug 1589102)
Backed out changeset ffe8da473b91 (bug 1589102)
Backed out changeset 3b92f7306c64 (bug 1589102)
Backed out changeset b187548e258f (bug 1589102)
2020-08-05 21:47:50 +03:00
Anny Gakhokidze e903c66d34 Bug 1589102 - Part 1: Enable about:srcdoc loads via DocumentChannel, r=mattwoodrow
This patch enables sandboxed srcdoc loads to take place via DocumentChannel,
and adds mechanisms for enabling unsandboxed ones.

Both unsandboxed srcdoc, and in subsequent patches, about:blank, loads require
that the triggering principal and the principal to inherit point to the same
instance if the load takes place in the same process as where we are inheriting
those principals from. We save those principals on a target browsing context before
we load the URI, and later, when we are deserializing LoadInfoArgs into
LoadInfo in the content process, we retrieve the saved principals if the
current load identifier of the target BC matches the load identifier saved
along with the principals.

We also need to make sure that during a process switch for about:srcdoc load,
we don't use the original URI for about:srcdoc to determine the remote type and
instead we use channel's result principal.

Differential Revision: https://phabricator.services.mozilla.com/D85079
2020-08-05 16:44:01 +00:00
Simon Giesecke 1e6ec7ec86 Bug 1656117 - Reduce include dependencies on nsRefreshDriver.h. r=mstange
The abstract observer base classes are moved to a separate header file
nsRefreshObservers.h and the includes are adjusted accordingly.

Some method implementations are moved to the corresponding implementation files
to avoid the need to include the nsRefreshDriver.h file in the header.

Differential Revision: https://phabricator.services.mozilla.com/D85764
2020-08-04 21:17:50 +00:00
Nika Layzell 1c71a222fc Bug 1653729 - Part 1: Generalize do_QueryActor API, r=kmag
This changes the set of types which can be passed as the second argument to
do_QueryActor to ones which can be unambiguously converted to a JSActorManager,
and combines nsCOMPtr_helper implementations.

Differential Revision: https://phabricator.services.mozilla.com/D84067
2020-08-04 21:34:29 +00:00
Andreas Farre 8d7d0ec85c Bug 1613431 - Part 2: Ignore synced setters return value. r=nika
Depends on D83645

Differential Revision: https://phabricator.services.mozilla.com/D83646
2020-07-31 13:37:00 +00:00
Hiroyuki Ikezoe 4205879729 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Depends on D75731

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 11:45:01 +00:00
Brindusan Cristian 7f75410fd7 Backed out 9 changesets (bug 1324591) for linux build bustages on central on nsDisplayList.h.
Backed out changeset 75966ee1fe65 (bug 1324591)
Backed out changeset d6a01c6bc40e (bug 1324591)
Backed out changeset fef36ff2ea3d (bug 1324591)
Backed out changeset 4a4ae4bd95d1 (bug 1324591)
Backed out changeset 732804c83add (bug 1324591)
Backed out changeset 84657a3522fb (bug 1324591)
Backed out changeset e6c74ba41007 (bug 1324591)
Backed out changeset 8e6d4e9f5aa0 (bug 1324591)
Backed out changeset 6bc284863aff (bug 1324591)
2020-07-05 13:45:35 +03:00
Hiroyuki Ikezoe 92208a9c28 Bug 1324591 - Report janked animations to the main-thread and update them on the main-thread. r=botond,boris
The machinery to report janked animations is;

1) Store the partial pre-rendered animation id and the Animation object in a
   hashtable in LayerManager
2) Store the animation id in the Animation object as well
3) When we detect jank, we send the animation id to the main-thread via an IPC
   call
4) Find the Animation object with the id in the hashtable and update the
   Animaiton
5) Whenever the partial pre-rendered Animation stop running on the compositor
   i.e. the Animation finished normally, the Animation's target element is
   changed, etc. etc., remove the Animation from the hashtable

Differential Revision: https://phabricator.services.mozilla.com/D75732
2020-07-05 02:21:01 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kris Maglione 6aa06b33a7 Bug 1645510: Part 2 - Avoid using the unprivileged junk scope where possible. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D79720
2020-06-27 03:06:28 +00:00
Matt Woodrow b351d48f0c Bug 1646582 - Pull the inner window id from the WindowGlobalParent, rather than passing it across PBrowser for updateForLocationChange. r=nika,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D80131
2020-06-24 19:59:32 +00:00
Matt Woodrow 00dc8d3d73 Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-24 19:58:15 +00:00
Matt Woodrow a637ca6c0d Bug 1646582 - Remove nsIRemoteWebProgressRequest since it's not being used anywhere. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D80127
2020-06-24 19:57:30 +00:00
Emilio Cobos Álvarez 2948ee6b8c Bug 1647871 - Remove AutoResizeReflowSquasher. r=kats
After the above, I don't think this is needed anymore, because we
shouldn't be looking at the widget size from layout.

It also shouldn't cause more reflows on desktop at least, because of the
early out in ResizeReflowIgnoreOverride before calling
SimpleResizeReflow().

Differential Revision: https://phabricator.services.mozilla.com/D80731
2020-06-24 13:29:18 +00:00
Dorel Luca 90a64f0da1 Backed out 4 changesets (bug 1646582) for Browser-chrome failures on nsIWebProgress.addProgressListener. CLOSED TREE
Backed out changeset 2111dd0d6dc0 (bug 1646582)
Backed out changeset e6c496c5a4b1 (bug 1646582)
Backed out changeset 49b4ae8c8be0 (bug 1646582)
Backed out changeset 9d42ec89240c (bug 1646582)
2020-06-24 07:50:07 +03:00
Matt Woodrow f430dac707 Bug 1646582 - Pull the inner window id from the WindowGlobalParent, rather than passing it across PBrowser for updateForLocationChange. r=nika,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D80131
2020-06-24 03:25:35 +00:00
Matt Woodrow 21ac707a3b Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-24 03:24:21 +00:00
Matt Woodrow 6924cb49df Bug 1646582 - Remove nsIRemoteWebProgressRequest since it's not being used anywhere. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D80127
2020-06-24 03:23:38 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Narcis Beleuzu b894acb874 Backed out 4 changesets (bug 1646582) for mochitest failures on test_ext_tabs_create.html . CLOSED TREE
Backed out changeset ce5cdfc5d7cf (bug 1646582)
Backed out changeset 2ac69a2b6708 (bug 1646582)
Backed out changeset 74d89cb24414 (bug 1646582)
Backed out changeset 7de0ff1af560 (bug 1646582)
2020-06-23 06:30:03 +03:00
Matt Woodrow 2ee0adfb0e Bug 1646582 - Pull the inner window id from the WindowGlobalParent, rather than passing it across PBrowser for updateForLocationChange. r=nika,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D80131
2020-06-23 01:24:17 +00:00
Matt Woodrow 79562a2ca1 Bug 1646582 - Remove DOM(Inner)WindowID from nsIWebProgress. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80128
2020-06-23 01:23:57 +00:00
Matt Woodrow 899c6f8198 Bug 1646582 - Remove nsIRemoteWebProgressRequest since it's not being used anywhere. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D80127
2020-06-23 01:22:21 +00:00
Kartikaya Gupta e28e2f103c Bug 1645954 - Ensure we update both the content viewer and widget sizes before doing a reflow. r=tnikkel
The existing comment in BrowserChild::RecvUpdateDimensions may have been
accurate at some point in the past, but I'm seeing cases where setting
the content viewer size itself triggers a reflow. Since the widget size
hasn't been updated yet, the reflow uses some stale values and produces
incorrect outcomes. This patch ensures both the content viewer and widget
get their sizes updated first, and only then do we do the reflow.

Differential Revision: https://phabricator.services.mozilla.com/D79885
2020-06-20 11:25:22 +00:00
Nika Layzell cde53b3bec Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-15 23:24:07 +00:00
Narcis Beleuzu a8dde16e58 Backed out 10 changesets (bug 1508306, bug 1640019) for bc failures on browser_autoOpen.js . CLOSED TREE
Backed out changeset 8844170ff408 (bug 1508306)
Backed out changeset b750f1d873cf (bug 1508306)
Backed out changeset c7170e76e676 (bug 1640019)
Backed out changeset 5905995e4815 (bug 1640019)
Backed out changeset 7bf86513348e (bug 1640019)
Backed out changeset f7d0605295f7 (bug 1640019)
Backed out changeset 521b4d5a9a89 (bug 1640019)
Backed out changeset 8542edc564bc (bug 1640019)
Backed out changeset 4f6a03152526 (bug 1640019)
Backed out changeset 30d2bf04719b (bug 1640019)
2020-06-12 22:47:50 +03:00
Nika Layzell 47c0aeb539 Bug 1508306 - Part 1: Migate the Large-Allocation handler to DocumentLoadListener, r=mattwoodrow,necko-reviewers,geckoview-reviewers,agi,valentin
This removes the diagnostic warnings which used to be logged when the
Large-Allocation header was present, but failed to switch into a
Large-Allocation process. Due to the low adoption of the header, this shouldn't
be too large of a problem, but we can look into re-adding the diagnostics if
needed in the future.

The new codepath no longer performs multiple network requests for
Large-Allocation resources, and now relies on the battle-tested
DocumentLoadListener codepath for process switching.

Differential Revision: https://phabricator.services.mozilla.com/D78998
2020-06-12 16:52:13 +00:00
Kartikaya Gupta 621c1f3b9d Bug 1643381 - Inline ProcessUpdateFrame and remove stale declaration. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D78322
2020-06-04 21:43:24 +00:00
Andrea Marchesini 69818a4d17 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-03 06:12:06 +00:00
Andrea Marchesini 22d905d24e Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-03 06:09:52 +00:00
Csoregi Natalia 2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini 6f2eed62c8 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 4 - Renaming storage access permission methods, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76917
2020-06-02 08:30:24 +00:00
Andrea Marchesini e31c7313ca Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-02 08:28:05 +00:00