Commit Graph

84214 Commits

Author SHA1 Message Date
Emilio Cobos Álvarez
b6728cedb7 Bug 1553769 - Have a single way of requesting window focus and switching to a tab. r=NeilDeakin,snorp
Right now there's some duplicated code with the focus manager and the
DOMWindowFocus event.

Android didn't handle the new framefocusrequested event, so the test-cases in
bug 416771 still didn't work there.

I think using the focus manager codepath everywhere is preferable. I confirmed
manually that the stuff that sent DOMWindowFocus events still works as expected
with this patch (i.e., switching to the right tab when you click on a
notification, etc.).

This fixes it so that it works in Fennec, and it sends the focus events right in
GeckoView Example (i.e., we get here[1] properly).

The snippet that Snorp provided on IRC to implement the "bring activity to
front" stuff (`startActivity(getIntent())`) didn't actually work for me, but I
confirmed that the right message is sent when the focus is requested, and that
we get there.

[1]: https://searchfox.org/mozilla-central/rev/952521e6164ddffa3f34bc8cfa5a81afc5b859c4/mobile/android/geckoview_example/src/main/java/org/mozilla/geckoview_example/GeckoViewActivity.java#503

Depends on D32353

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

--HG--
extra : moz-landing-system : lando
2019-06-03 19:42:28 +00:00
Emilio Cobos Álvarez
fe31845697 Bug 1545499 - Make whether to show focus-rings for all content by default a pref, and disable it on Android. r=NeilDeakin
This pref toggled gives me the desired behavior on Linux, and it should be
trivial to revert to the previous behavior if needed.

Depends on D33393

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

--HG--
extra : moz-landing-system : lando
2019-06-03 15:12:24 +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
Cosmin Sabou
bcd5ff3d98 Merge mozilla-central to autoland.
--HG--
extra : rebase_source : ec8335cc4fb4f7c2594b2b95cd6d5078af2be625
2019-06-03 19:24:20 +03:00
Tom Tung
04c511ffb3 Bug 944918 - Allow thumbs.db in the storage directory; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D33453

--HG--
rename : dom/quota/test/unit/test_whiteListFiles.js => dom/quota/test/unit/test_allowListFiles.js
extra : moz-landing-system : lando
2019-06-03 16:22:43 +00:00
Cosmin Sabou
e13e0af55b Merge mozilla-inbound to mozilla-central. a=merge 2019-06-03 19:01:53 +03: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
Shashank kaushik
c329f1cc44 Bug 1532937 - Enable ESLint for dom/flex and dom/grid (manual changes). r=Standard8,smaug
Depends on D33345

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

--HG--
extra : moz-landing-system : lando
2019-06-03 10:35:57 +00:00
Shashank kaushik
3ebe62f954 Bug 1532937 - Enable ESLint for dom/flex and dom/grid (automatic changes). r=Standard8,smaug
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-06-03 10:42:12 +00:00
Christoph Kerschbaumer
7cdbee6cd7 Bug 1496418: Update Content Policy checks and allow CSP checks for system principal triggered loads. r=mccr8,baku
Differential Revision: https://phabricator.services.mozilla.com/D32217

--HG--
extra : moz-landing-system : lando
2019-06-03 06:04:25 +00:00
Andrea Marchesini
8df66534cf Bug 1554847 - Improve cross-origin checks in canvas API - consider intermediate redirects, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D32792

--HG--
extra : moz-landing-system : lando
2019-06-03 09:54:43 +00:00
Edgar Chen
6c45f02a32 Bug 1553852 - Mark eCompositionChange as composed event; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33387

--HG--
extra : moz-landing-system : lando
2019-06-03 09:18:47 +00:00
Zibi Braniecki
314d90ae91 Bug 1555340 - Check for pending mutations when Document creates PresShell. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33378

--HG--
extra : moz-landing-system : lando
2019-06-03 10:00:47 +00:00
Ehsan Akhgari
3f0a5330d4 Bug 1555876 - Part 2: Use storage principal in IDBFactory::CreateForMainThreadJS(); r=baku
Differential Revision: https://phabricator.services.mozilla.com/D33243

--HG--
extra : moz-landing-system : lando
2019-05-31 19:31:04 +00:00
Jonathan Kingston
a9be4620ee Bug 1508939 - cpp serialization r=ckerschb,mccr8,mikedeboer
Migrating to pure Cpp

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

--HG--
extra : moz-landing-system : lando
2019-06-03 12:37:12 +00: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
Ryan Hunt
c382491672 Bug 1519546, part 5 - Add mIsTopLevel flag for tracking the root PBrowser actor in a remote browser. r=farre
The root PBrowser actor needs special case visibility behavior to satisfy the async tab
switcher. This commit adds a flag to track whether a BrowserChild is part of the root
actor.

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

--HG--
extra : rebase_source : 5f7cb11f77d41f3265d211e99713a1dad6ae2579
extra : intermediate-source : 49e4d0e4fc7ccfa7b2c58bb9b64534c2d569a881
extra : source : adcc870662770a99962e721bd3c5ff4c2616c21d
2019-05-29 11:35:37 -05:00
Ryan Hunt
ea567d2cec Bug 1519546, part 4 - Wire up basic EffectsInfo updates in DOM IPC. r=farre
This commit adds RemoteBrowser::UpdateEffects for updating a remote browser's
EffectsInfo over IPC.

A following commit will actually use the EffectsInfo for
enabling/disabling rendering for a remote browser, and another
commit will actually use these IPDL methods.

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

--HG--
extra : rebase_source : 304d843d2c4a35f468aa847ee66005a932bb7eb2
extra : intermediate-source : d31b7d33efc711fb8115663f4cfc5bc98fd58d73
extra : source : 5aea122dea2120efe107c639b17678e0464b1389
2019-05-15 15:26:25 -05:00
Ryan Hunt
40069aebf7 Bug 1519546, part 3 - Add EffectsInfo and store in BrowserChild. r=farre
This commits adds EffectsInfo for tracking graphical effects
that are applied to a remote browser's ancestors.

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

--HG--
extra : rebase_source : 5c4cda4019095dbd00aa3bca2edff0dbd16e5ca8
extra : intermediate-source : b4d5865e33079a36f535501293f8aaec8b6bcf64
extra : source : e8e3d2d76d860c76ee351c8b10ed488fdac2d9fc
2019-05-24 09:25:34 -05:00
Ryan Hunt
3f6dcaffd1 Bug 1519546, part 2 - Make BrowserBridgeParent more robust. r=farre
This commit adds two small fixes to make the OOP-iframe code more robust.

The first fixes a crash during shutdown for a tab that has OOP-iframes. It's
possible for the BrowserBridgeParent's to be shutdown before the root
BrowserParent. In this case, SetOwnerElement will run for the root BrowserParent,
but the child BrowserBridgeParent's will not have BrowserParent actors.

The second hooks up the BrowserBridgeParent constructor to actually use
the result code of BrowserBridgeParent::Init.

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

--HG--
extra : rebase_source : bbe098c5ce75bd0fd26682a3b98f9958df5a2fcf
extra : intermediate-source : 83576499bf77d37e31b5328c0117650e57a03447
extra : source : 8f865f1f199c3e74844559a89b0ff642905513bd
2019-05-16 09:32:34 -05:00
Dorel Luca
f8b1143315 Merge mozilla-inbound to mozilla-central a=merge 2019-06-02 12:43:23 +03:00
Martin Stransky
75265c17b3 Bug 1555783 - [Wayland] Don't send XDisplay fd over IPC on Wayland, r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D33255

--HG--
extra : moz-landing-system : lando
2019-05-31 16:19:48 +00:00
Emilio Cobos Álvarez
a14f58fefe Bug 1556095 - Make BindContext carry a bit more information. r=bzbarsky
This makes some callers a bit less awkward by not having, for example, to read
from the parent node or not depending on whether Element::BindToTree has been
called already or not.

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

--HG--
extra : moz-landing-system : lando
2019-06-01 14:40:33 +00:00
Cameron McCormack
faf479d778 Bug 1553731 - Part 1: Rename nsFrameIdList.h to FrameIdList.h. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D32603

--HG--
rename : layout/generic/nsFrameIdList.h => layout/generic/FrameIdList.h
extra : moz-landing-system : lando
2019-06-01 08:03:32 +00:00
Boris Zbarsky
768b65d83a Bug 1555374. Use StaticPrefs accessors for various prefs that moved to StaticPrefs recently. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D33060

--HG--
extra : moz-landing-system : lando
2019-06-01 02:29:26 +00:00
Cosmin Sabou
b93ad0326f Backed out 3 changesets (bug 1553731) for build bustages on nsIFrame.h CLOSED TREE
Backed out changeset 90ed9808e1c0 (bug 1553731)
Backed out changeset b8669aa5a820 (bug 1553731)
Backed out changeset 0d0bf5d84a3c (bug 1553731)

--HG--
rename : layout/generic/FrameIdList.h => layout/generic/nsFrameIdList.h
2019-06-01 04:23:49 +03:00
Cameron McCormack
c4adc9d346 Bug 1553731 - Part 1: Rename nsFrameIdList.h to FrameIdList.h. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D32603

--HG--
rename : layout/generic/nsFrameIdList.h => layout/generic/FrameIdList.h
extra : moz-landing-system : lando
2019-06-01 01:04:44 +00:00
Micah Tigley
387239448c Bug 1107456 - Part 1: While in RDM, scale the inner size values of the viewport using the device's full zoom to find its outer size. r=bradwerth,Ehsan
We want to ensure the RDM browser's outer window sizes are not affected as the page is zoomed in or out. In the context of RDM, the size of the browser window will be the same as the viewport so I believe it's safe to assume that the window's outer size will be equal to its inner size when the zoom level is set to 100%.

I found we can get this value by using the presentation context's `GetDeviceZullZoom` method and applying it to the inner sizes of the RDM viewport.

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

--HG--
extra : moz-landing-system : lando
2019-05-30 23:37:14 +00:00
Emilio Cobos Álvarez
21d5c25734 Bug 1553769 - Make nsIWidget::SetFocus infallible, and make it take an enum class. r=NeilDeakin
Only gtk returns failure ever, and nobody checks the result anyway.

Use an enum class so that it's clear from the caller what it means.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 22:13:56 +00:00
Emilio Cobos Álvarez
80e62fe4db Bug 1555944 - Make nsIContent::GetBindingParent return an element. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33308
2019-05-31 23:31:59 +02:00
Emilio Cobos Álvarez
6ada67c323 Bug 1555216 - Cache owner doc in the BindContext. r=bzbarsky
And use it to avoid some pointer chases per the review comments of D32949.

Differential Revision: https://phabricator.services.mozilla.com/D33288
2019-05-31 23:31:57 +02:00
Emilio Cobos Álvarez
abecd6b5f9 Bug 1555216 - Make CharacterData::BindToTree and Element::BindToTree more parallel. r=bzbarsky
They're supposed to be, but they have diverged quite a bit...

This unifies them again.

Depends on D32949

Differential Revision: https://phabricator.services.mozilla.com/D32950
2019-05-31 23:31:55 +02:00
Emilio Cobos Álvarez
6917a38081 Bug 1555216 - Change the signature of BindToTree to be (BindContext&, nsINode& aParentNode). r=bzbarsky
BindContext was going to have way more information at first, but then I realized
that most of the things I wanted to know were basically a flag away using the
parent node.

Still I think it's worth it, now experimenting with BindToTree will only mean
adding a field to a struct that's included from a couple cpp files, instead of a
massive pain.

I also think this is clearer, and doing this highlights quite a few
inconsistencies in our code which I've left untouched, but commented with
FIXMEs.

Steps are:

$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsresult BindToTree(Document\* aDocument, nsIContent\* aParent,#nsresult BindToTree(BindContext\&, nsINode\& aParent)#g' $file; done
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#                      nsIContent\* aBindingParent) override#override#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(Document\* aDocument, nsIContent\* aParent,#::BindToTree(BindContext\& aContext, nsINode\& aParent)#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsIContent\* aBindingParent)##g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(aDocument, aParent, aBindingParent)#::BindToTree(aContext, aParent)#g' $file; done
$ ./mach clang-format

Then manual fixups.

Depends on D32948

Differential Revision: https://phabricator.services.mozilla.com/D32949
2019-05-31 23:31:52 +02:00
Mark Striemer
ce0c11236e Bug 1532724 - Part 1: Inline options browser for HTML about:addons details r=rpl,kmag
Differential Revision: https://phabricator.services.mozilla.com/D29787

--HG--
extra : moz-landing-system : lando
2019-05-31 14:05:53 +00:00
Boris Zbarsky
63b07e7115 Bug 1478037. Allow bookmarklets to run even on pages with a CSP. r=ckerschb
The removal of the second CSP check is fixing a regression introduced in bug
965637.  See https://github.com/whatwg/html/issues/4651#issuecomment-495050351
for details.  We may want to re-introduce that check depending on the outcome
of that issue, but if so we should do that only if the target document's
principal subsumes our triggering principal.

This commit will not allow bookmarklets to access subresources that
CSP blocks, but will at least allow them to run.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 19:21:31 +00:00
Nika Layzell
6e3bc45fd5 Bug 1555492 - Update DocumentURI for WindowGlobalParent in SetNewDocument, r=farre
It appears that in some cases we can have the wrong value for the
WindowGlobalParent::DocumentURI. This patch adds another case in SetNewDocument
which should ideally catch the case where the Document is replaced while
preserving the inner window.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 14:16:43 +00:00
Cosmin Sabou
25d57e0fbd Backed out changeset 764fab821251 (bug 1478037) for crashtest failures on 439184-1.html. CLOSED TREE 2019-05-31 21:21:10 +03:00
Honza Bambas
c35df87597 Bug 1545421 - New nsresult error codes for 407, 502 and 504 http response codes returned by proxies + test, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D32817

--HG--
extra : moz-landing-system : lando
2019-05-31 17:29:53 +00:00
Sebastian Hengst
78e651853f Merge mozilla-central to autoland. CLOSED TREE 2019-05-31 19:07:44 +02:00
Sebastian Hengst
0dc14776cd Merge mozilla-inbound to mozilla-central. a=merge 2019-05-31 19:05:23 +02:00
Jon Coppeard
5d93091ef5 Bug 1555729 - Improve CallbackObject::CallbackPreserveColor comments to warn about use of Reset() r=bzbarsky?
Differential Revision: https://phabricator.services.mozilla.com/D33263

--HG--
extra : moz-landing-system : lando
2019-05-31 16:19:41 +00:00
Razvan Maries
7afbe4a8bf Backed out changeset 01dd2842bbaa (bug 1552428) for ES Lint failure. CLOSED TREE 2019-05-31 18:07:15 +03:00
Johann Hofmann
2718631dd6 Bug 1549832 - Send content blocking log to the parent process on document unload. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D32759

--HG--
extra : moz-landing-system : lando
2019-05-31 15:13:33 +00:00
Tom Tung
24dcf127a2 Bug 1546892 - Update the comment for the fix and add an assertion to ensure all cases have been caught; r=asuth
It turns out that the temporary fix for bug 1528690 might be the right way to
do. Based on the recent crash reports, the mResultCode for the Transaction
object wasn't an NS_OK and the crashing operation hasn't updated the failure to
that yet. So, the right way to do here is that we should abort the operation on
the connection thread.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 12:49:28 +00:00
Boris Zbarsky
409c6cf471 Bug 1478037. Allow bookmarklets to run even on pages with a CSP. r=ckerschb
The removal of the second CSP check is fixing a regression introduced in bug
965637.  See https://github.com/whatwg/html/issues/4651#issuecomment-495050351
for details.  We may want to re-introduce that check depending on the outcome
of that issue, but if so we should do that only if the target document's
principal subsumes our triggering principal.

This commit will not allow bookmarklets to access subresources that
CSP blocks, but will at least allow them to run.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 08:46:40 +00:00
Dorel Luca
071538b25c Backed out changeset 17a2436c527e (bug 1555876) for Geckoview related to mozilla::dom::IDBFactory. CLOSED TREE 2019-05-31 18:14:42 +03:00
violet
68be487937 Bug 1555795 - Check IsInner() to ensure it is an outer svg r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D33246

--HG--
extra : moz-landing-system : lando
2019-05-31 09:59:04 +00:00
John Dai
6a23fc1690 Bug 1555301 - Fix JSWindowActor.webidl comments; r=nika
Differential Revision: https://phabricator.services.mozilla.com/D33026

--HG--
extra : moz-landing-system : lando
2019-05-31 14:32:47 +00:00
Emilio Cobos Álvarez
19258bfbb4 Bug 1554716 - Remove nsStyleColor moving the color property to nsStyleText. r=jfkthame
I think this is a good change regardless of other discussion in bug 1552587. If
we decide to move `mColor` to the top-level of the struct that can be done
separately.

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

--HG--
extra : moz-landing-system : lando
2019-05-31 14:48:22 +00:00
Ehsan Akhgari
7a3585c49f Bug 1415270 - Part 3: Prevent the editing APIs from being called on non-HTML documents; r=masayuki
This is similar to this Chromium change:
https://codereview.chromium.org/1155353002

The editing spec doesn't mention editing non-HTML documents, and historically
this is only a feature that WebKit has supported.  Supporting this feature
increases the attack surface of the browser without a clear benefit, so it
seems like a good idea to converge on this behaviour.

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

--HG--
rename : testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode.html => testing/web-platform/tests/html/editing/editing-0/making-entire-documents-editable-the-designmode-idl-attribute/user-interaction-editing-designMode-xml.xml
extra : moz-landing-system : lando
2019-05-30 17:14:05 +00:00