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

99 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 64c062d570 Bug 1570773: Move browsingContext getter to nsIDocShellTreeItem and add notxpcom variant. r=nika
This also renames the existing infallible nsDocShell:GetBrowsingContext()
getter to BrowsingContextRef(), and changes the return type, since several
callers rely on it returning a raw pointer rather than an already_AddRefed.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 16:59:30 +00:00
Kris Maglione c01ad83372 Bug 1571502: Don't leak TabGroups which have never had windows joined to them. r=nika
Currently, TabGroups know to break their reference cycles only when the last
window leaves them. For TabGroups which have never had a window join (which
happens under Fission), this means they also never see a window leave, and
therefore never break their reference cycles, and leak.

This patch adds a check to break reference cycles if no windows have joined by
the time a BrowserChild they belong to is destroyed.

MANUAL PUSH: Lando fails to rebase.

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

--HG--
extra : source : 03acb28ab60fb77fa06064385a62cc46cf4ad1bd
extra : amend_source : 0a71625d99951bebe45ee6f62570de491a714e97
2019-08-02 18:19:53 -07:00
Kris Maglione 22592538f5 Bug 1561015: Part 1 - Use BrowsingContext in window provider APIs. r=bzbarsky,mossop
This is the first step in making it possible to return remote WindowProxy
objects from window.open() and related APIs.

This patch also incidentally fixes a bug where getContentWindowOrOpenURI
returned the top-level browser window rather than the new content window when
passed OPEN_NEWWINDOW for the `aWhere` parameter. This was not the expected
behavior, and was a potentially major footgun for any new users who expected
to always get the content window for the URL they were loading, rather than
sometimes getting a chrome browser window instead.

For now, that case just returns null, which is only a minor footgun, rather
than the major one we had before.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 20:48:33 +00:00
Alphan Chen efa34c0a06 Bug 1544371 - Implement FormDataListener for contentSessionStore in C++ r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D30078

--HG--
extra : moz-landing-system : lando
2019-08-02 14:19:00 +00:00
Emilio Cobos Álvarez 9c34445fce Bug 1568051 - Don't paint during interrupt callbacks if it's not safe to run script. r=bzbarsky
So that paint doesn't reenter on layout, or mess with incomplete frame trees, or
what not.

I just early-returned rather than only skipping the PaintWhileInterruptingJS
call because I don't think we should be running untrusted scripts in the first
place when IsSafeToRunScript() is false.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 10:29:32 +00:00
Nika Layzell a4f8f4db51 Bug 1550560 - Part 5: Remove unnecessary Alloc method for PBrowserBridge, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D39536

--HG--
extra : moz-landing-system : lando
2019-07-29 19:54:21 +00:00
Nika Layzell 2698092f32 Bug 1550560 - Part 3: Make BrowserBridgeParent refcounted in IPDL, r=mccr8
This is an example refcounted actor which was easy enough to port over as an
initial test. More can be ported in the future, potentially alongside removing
`mIPCOpen`.

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

--HG--
extra : moz-landing-system : lando
2019-07-29 19:54:18 +00:00
James Willcox bc13c95548 Bug 1561079 - Add `referrerInfo` to <browser> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D36525

--HG--
extra : moz-landing-system : lando
2019-07-29 15:34:30 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Coroiu Cristina 075c52994f Backed out 4 changesets (bug 1561079, bug 1561913) for mochitest failures at dom/base/test/test_bug375314.html on a CLOSED TREE
Backed out changeset 0d1eaf86253f (bug 1561913)
Backed out changeset 1d1be67a5950 (bug 1561079)
Backed out changeset 528a46ffe2af (bug 1561079)
Backed out changeset f562e67e38cf (bug 1561079)
2019-07-24 20:56:30 +03:00
James Willcox 212e5673e3 Bug 1561079 - Add `referrerInfo` to <browser> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D36525

--HG--
extra : moz-landing-system : lando
2019-07-24 16:33:47 +00:00
Bogdan Tara e82c5fe738 Backed out 4 changesets (bug 1561079, bug 1561913) for apilint and checkstyle failures CLOSED TREE
Backed out changeset 50244d8132f9 (bug 1561913)
Backed out changeset 9abb44cca93b (bug 1561079)
Backed out changeset e6e23c902808 (bug 1561079)
Backed out changeset e48cf42b707f (bug 1561079)
2019-07-24 19:23:44 +03:00
James Willcox a7171dad07 Bug 1561079 - Add `referrerInfo` to <browser> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D36525

--HG--
extra : moz-landing-system : lando
2019-07-24 15:47:55 +00:00
Bogdan Tara c230c12dae Backed out 2 changesets (bug 1561079) foe ES lint failure on browser-custom-element.js CLOSED TREE
Backed out changeset 74cd5c0338ee (bug 1561079)
Backed out changeset adbc4ea67da9 (bug 1561079)
2019-07-24 18:31:15 +03:00
James Willcox 0a734ca6ba Bug 1561079 - Add `referrerInfo` to <browser> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D36525

--HG--
extra : moz-landing-system : lando
2019-07-24 14:53:19 +00:00
Alphan Chen bb06ecd152 Bug 1567057 - TabListener is only for contentSessionStore on desktop r=peterv
Don't need TabListener on geckoview

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

--HG--
extra : moz-landing-system : lando
2019-07-24 08:05:55 +00:00
Ciure Andrei c0756f3389 Backed out 10 changesets (bug 1523638) for causing high frequency Android 7.0 mochitests failures CLOSED TREE
Backed out changeset 644ceb2fe568 (bug 1523638)
Backed out changeset 27647ee7a927 (bug 1523638)
Backed out changeset 96f1ccb95570 (bug 1523638)
Backed out changeset b60a17ea716a (bug 1523638)
Backed out changeset 507e63186c5f (bug 1523638)
Backed out changeset 33255408ca61 (bug 1523638)
Backed out changeset d97b2d223616 (bug 1523638)
Backed out changeset eba2a0514cde (bug 1523638)
Backed out changeset d7065174c5c4 (bug 1523638)
Backed out changeset c21b361e175d (bug 1523638)
2019-07-23 05:13:32 +03:00
Nika Layzell 83236ff0f4 Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:22 +00:00
Nika Layzell 96156f34c3 Bug 1523638 - Part 5: Create a WindowGlobal actor during normal PBrowser construction, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37652

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:14 +00:00
Bogdan Tara ca45889546 Backed out 9 changesets (bug 1523638) for browser_contextmenu.js failures CLOSED TREE
Backed out changeset 0a584a07b696 (bug 1523638)
Backed out changeset 8c5af2289900 (bug 1523638)
Backed out changeset 40ed1bd64b09 (bug 1523638)
Backed out changeset 9a99a0391979 (bug 1523638)
Backed out changeset 07fb4748b91a (bug 1523638)
Backed out changeset 49047c3ebae9 (bug 1523638)
Backed out changeset d606d072126c (bug 1523638)
Backed out changeset 76dc1937fc77 (bug 1523638)
Backed out changeset c784c14b5d5d (bug 1523638)
2019-07-16 23:40:47 +03:00
Nika Layzell 89d26ca7eb Bug 1523638 - Part 9: Use provided 'WindowGlobalChild' actors to create the initial about:blank document, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37656

--HG--
extra : moz-landing-system : lando
2019-07-16 18:47:56 +00:00
Nika Layzell fe65d00241 Bug 1523638 - Part 5: Create a WindowGlobal actor during normal PBrowser construction, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37652

--HG--
extra : moz-landing-system : lando
2019-07-16 18:47:43 +00:00
Kashav Madan e7ad7b7104 Bug 1543251 - Move hasBeforeUnload from PBrowser to PWindowGlobal, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D37003

--HG--
extra : moz-landing-system : lando
2019-07-15 17:30:26 +00:00
Alphan Chen 02e1dcbe25 bug 1562889 - Convert content-sessionStore to C++: add browser epochs support r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D36606

--HG--
extra : moz-landing-system : lando
2019-07-11 09:46:14 +00:00
Will Hawkins 88b4396a69 Bug 1559657: Pass load time in RemoteWebProgress. r=Ehsan,barret
Differential Revision: https://phabricator.services.mozilla.com/D35147

--HG--
extra : moz-landing-system : lando
2019-07-11 04:00:41 +00:00
Noemi Erli ad5ab4b3e4 Backed out changeset 405100db6c45 (bug 1543251) for failing in nsGlobalWindowInner.cpp 2019-07-11 01:47:47 +03:00
Kashav Madan 0fcee1ff24 Bug 1543251 - Move hasBeforeUnload from PBrowser to PWindowGlobal, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D37003

--HG--
extra : moz-landing-system : lando
2019-07-10 21:13:44 +00:00
Ryan Hunt 27bd25767f Bug 1561395 - Move drawSnapshot API to WindowGlobalParent and allow specifying the whole viewport as a rect. r=mattwoodrow,nika
Differential Revision: https://phabricator.services.mozilla.com/D35842

--HG--
extra : moz-landing-system : lando
2019-07-10 16:45:46 +00:00
Barret Rennie 0c2335e52f Bug 1289211 - Rename InfallibleTArray to nsTArray in dom/ipc/ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D36945

--HG--
extra : moz-landing-system : lando
2019-07-10 03:27:27 +00:00
Andreea Pavel 507d17c2ce Backed out changeset 3bcfadc6de38 (bug 1559657) for failing 1419902.html 2019-07-10 11:37:21 +03:00
Will Hawkins 379d618812 Bug 1559657: Pass load time in RemoteWebProgress. r=Ehsan,brennie
Differential Revision: https://phabricator.services.mozilla.com/D35147

--HG--
extra : moz-landing-system : lando
2019-07-10 04:41:21 +00:00
Ryan Hunt 6b6abd3a36 Bug 1554861 - Disable clipping and scaling for top-level remote browsers to resolve regressions. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D35702

--HG--
extra : moz-landing-system : lando
2019-06-25 03:16:31 +00:00
Ryan Hunt 116f9c9f98 Bug 1559518 - Use LayoutDevicePixel for BrowserChild visible rect and composition size. r=kats
App units of a remote browser element in the parent process are
different from app units inside the remote content in the child
process. We should apply the appropriate conversions by exposing
the relevant data as LayoutDevicePixel.

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

--HG--
extra : moz-landing-system : lando
2019-06-19 18:20:52 +00:00
Ryan Hunt efbd0db708 Bug 1559211 - Fallback to conservative visible rect for top-level remote browsers. r=mattwoodrow
Using a precise visible rect for a top-level browser can cause an
artifact when resizing the window.

I believe this is caused by the message to resize the browser, and
the following paint, to be processed before the message with the
new visible rect.

We can be smarter about this, but in the interest of getting a
quick fix, this commit reverts the behavior here only for top-level
browsers.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 02:45:09 +00:00
Barret Rennie 43bd779652 Bug 1510569 - Port Content:LoadURIResult message to IPDL r=mconley
The `WebProgress#sendLoadCallResult` method only existed to send a empty async
message and was only called from the `WebNavigationChild`. Since
`WebNavigationChild` is in the process of being removed, it makes sense to
inline the replaced method into its call site.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 21:00:34 +00:00
Barret Rennie 2de25cc4ca Bug 1510569 - Port onLocationChange notifications inside WebProgressChild.jsm to C++ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D34563

--HG--
extra : moz-landing-system : lando
2019-06-13 21:08:40 +00:00
Narcis Beleuzu ed60adfc3c Backed out 5 changesets (bug 1510569) for bustages on BrowserChild.cpp . CLOSED TREE
Backed out changeset 4f0f5351be8b (bug 1510569)
Backed out changeset 14bbe0916bdd (bug 1510569)
Backed out changeset 19e734aeffa9 (bug 1510569)
Backed out changeset abb51690fd32 (bug 1510569)
Backed out changeset 1bf1907ee0c9 (bug 1510569)
2019-06-13 22:08:23 +03:00
Barret Rennie 75f83f43fc Bug 1510569 - Port Content:LoadURIResult message to IPDL r=mconley
The `WebProgress#sendLoadCallResult` method only existed to send a empty async
message and was only called from the `WebNavigationChild`. Since
`WebNavigationChild` is in the process of being removed, it makes sense to
inline the replaced method into its call site.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 17:55:04 +00:00
Barret Rennie 15c17bbb9f Bug 1510569 - Port onLocationChange notifications inside WebProgressChild.jsm to C++ r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D34563

--HG--
extra : moz-landing-system : lando
2019-06-13 17:54:23 +00:00
Oana Pop Rus b93335c27f Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-06-13 13:04:19 +03:00
Peter Van der Beken 8b00dd9ff2 Bug 1490044 - Move all prefs used in WebIDL to StaticPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33507

--HG--
extra : moz-landing-system : lando
2019-06-13 09:00:59 +00:00
Ryan Hunt b76533bae0 Bug 1558482 - Only initialize the root displayport for the cross process root content document. r=kats
The root displayport has some assumptions built into it about being positioned at
the origin and sized to the composition bounds that seem like they only apply to
the cross process root content document. This commit changes us to avoid taking
this code path for OOP-iframes.

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

--HG--
extra : rebase_source : 026bb84b7ad086f508228620d19d9f459f28bf1d
2019-06-11 07:57:23 -05:00
Ryan Hunt d4e1195aed Bug 1558482 - Apply visibleRect and scaling when painting. r=mattwoodrow
visibleRect should affect both WR/layers, and scaling will only affect
layers.

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

--HG--
extra : rebase_source : 49273db3e10088c9493f693d5f8b58864dcb01aa
2019-06-11 07:52:12 -05:00
Ryan Hunt 99aaa4e6c6 Bug 1558482 - Add visibleRect and scaling to EffectsInfo and compute them when using layers. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D34523

--HG--
extra : rebase_source : 3bbef496359ae108e1f4adc2548e0140cfd7b0a8
2019-06-11 07:50:40 -05:00
Ryan Hunt d1d4eb916c Bug 1556557 - Remove BrowserChildBase. r=nika
This class is only inherited by BrowserChild and seems to be a remnant of
the B2G days.

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

--HG--
extra : rebase_source : 504b3185b4cf59bcd4150935b9569641fbf8f844
extra : source : 82604ba5659a292616a10d19ad3f977b3094b33e
extra : histedit_source : 24b70700a41aeac53e2f34bf1f190867ffb75af6
2019-06-03 16:04:46 -04:00
Ryan Hunt 67035334dd Bug 1556555 - Generate TabId for PBrowserBridge in content process and retain reference to it. r=nika
This lets us get the TabId for the PBrowser created via PBrowserBridge in the embedding process.

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

--HG--
extra : rebase_source : 32f4b465426e4d19e4a81df0fc67076b0132038b
extra : source : 5e938107e10ed489477d104c70e413e0c4e6091d
extra : histedit_source : 24bda5ef39697eb4ba9e691d4a3afcc5f144737b
2019-06-02 13:42:03 -04:00
Jim Porter f665b313f3 Bug 1552017 - Expand the kinds of URLs that can cancel content JS when navigating; r=smaug
This patch makes several changes to the kinds of URLs where we can cancel
content JS when navigating between them:

 1) When navigating directly to a URL (e.g. by typing something into the
    location bar and hitting Enter), we allow canceling content JS if the URLs
    differ in any way *except* their ref ("#"). To help with this, we also
    attempt to fix up the URL (e.g. by prepending "http://" to it).

 2) When navigating through history, we allow canceling content JS if the
    `prePath` part of the URLs differ. Most notably, this allows canceling
    content JS when one of the URLs is an `about:` page (e.g. when hitting the
    Home button).

 3) We explicitly disallow cancelling content JS if the currently-running JS
    is trusted or if the page being navigated away from is anything but
    http(s): or file:.

 4) We also disallow cancelling content JS for windows that are still being
    created (e.g. when creating a new tab or window via `window.open`). For
    more background on this, see the comments about `mCreatingWindow` in
    dom/ipc/BrowserParent.h.

 5) We ensure that, when attempting to cancel JS, the tab ID of the
    currently-running script matches the original tab that requested the
    cancellation. This avoids a race condition in which a particular JSContext
    has already moved on to executing another tab's JS by the time we hit our
    interrupt callback.

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

--HG--
extra : moz-landing-system : lando
2019-06-04 16:19:27 +00:00
Emilio Cobos Álvarez d143aaa5f3 Bug 1545499 - Remove dead code for threading accelerator state. r=NeilDeakin
It's only moved around, but not actually used anywhere.

I have no idea what this was supposed to control in the past but it doesn't seem
useful to keep it around.

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:29:06 +00:00
Henri Sivonen ae34dc651a Bug 1543077 part 4 - Have only one item for Japanese in the Text Encoding menu. r=Gijs,emk.
Differential Revision: https://phabricator.services.mozilla.com/D28634
2019-06-03 15:30:41 +03:00
Ryan Hunt d6cbd07301 Bug 1519546, part 6 - Centralize the visibility logic in BrowserChild and use EffectsInfo. r=mattwoodrow
Currently, BrowserChild rendering is enabled and disabled by `RecvRenderLayers`, and this
method is called only by the tab switching code.

This commit does several things.
1. It factors out the code to enable/disable rendering to MakeVisible/MakeHidden so it can
   be used outside of `RecvRenderLayers`
2. We track the current value of RenderLayers and use it in conjunction with EffectsInfo to
   determine if we need to be rendering at any given moment
3. We only apply RenderLayers to the root OOP browser (not OOP-iframes)

These changes together make it so that BrowserChild will render IFF 'visible' || 'renderLayers',
and will only apply 'renderLayers' to the root browser.

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

--HG--
extra : rebase_source : 12ad66f514cf1217899af42ca3891fe7b3f897dc
extra : intermediate-source : 3cb9ddccccf320b19f0deae88cd990982b703022
extra : source : e2197dd98aaeeb3d80b65c9892a82d41c4adc80d
2019-05-15 15:29:22 -05:00