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

93515 Коммитов

Автор SHA1 Сообщение Дата
Agi Sferro c36e973433 Bug 1629113 - Move remaining services to components.conf. r=snorp,baku
Differential Revision: https://phabricator.services.mozilla.com/D75878
2020-05-26 07:44:52 +00:00
Emilio Cobos Álvarez ce1947b502 Bug 1640917 - Remove XBL mentions in layout. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D76846
2020-05-26 16:16:32 +00:00
Tim Huang 8d0fd9b1f8 Bug 1637226 - Part 3: Revert the assertion in ClientSource.cpp back to MOZ_DIAGNOSTIC_ASSERT. r=dimi
Depends on D76732

Differential Revision: https://phabricator.services.mozilla.com/D76733
2020-05-26 07:27:25 +00:00
Jon Coppeard ab181a2867 Bug 1529203 - Add tests to check that the module map is cleared when using document.open r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D21719
2020-05-26 14:06:28 +00:00
Emilio Cobos Álvarez 8a058b3bf3 Bug 1640907 - Remove some dead code in BindContext. r=edgar
I forgot to remove these in bug 1624359.

Differential Revision: https://phabricator.services.mozilla.com/D76844
2020-05-26 14:15:55 +00:00
Christoph Kerschbaumer 159f21fe04 Bug 1638826: Exempt pdfjs from being subject to CSP permits function. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75787
2020-05-26 12:48:15 +00:00
Jonathan Kew 58d58635f7 Bug 1640119 - Pass shared-memory blocks for the font list as part of SetXPCOMProcessAttributes. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D76507
2020-05-26 09:30:17 +00:00
Yaron Tausky b5246d2cc5 Bug 1638170 - Don't dispatch buggy WorkerRunnables r=asuth,dom-workers-and-storage-reviewers,sg
This patch removes the dispatch of ReportGenericErrorRunnables when
a worker fails to start, since they were causing crashes and
weren't getting run anyway. It also adds an assertion that prevents
the creation of strong references to workers before they begin
their main loop.

Differential Revision: https://phabricator.services.mozilla.com/D76693
2020-05-26 11:38:58 +00:00
JulianWels 2cc2e49495 Bug 1625156 - Error page for HTTPS Only Mode. r=fluent-reviewers,ckerschb,nhnt11,flod,nika,johannh,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D72129
2020-05-26 11:45:21 +00:00
Emilio Cobos Álvarez 8020f8fc08 Bug 1640400 - Remove dom.link.disabled_attribute.enabled. r=jwatt
We've shipped this since bug 1281135 (Firefox 68).

Differential Revision: https://phabricator.services.mozilla.com/D76677
2020-05-26 09:31:49 +00:00
Georg Koppen 1bda9aacdf Bug 1640707 - Make sure whitelist_onions is disabled in test_isOriginPotentiallyTrustworthy.js r=ckerschb
In Tor Browser dom.securecontext.whitelist_onions is true by default, so we need a small
patch for tests from bug 1382359 to pass. We would like to upstream that patch, which
is just making sure dom.securecontext.whitelist_onions is false before starting the test.

Differential Revision: https://phabricator.services.mozilla.com/D76726
2020-05-26 08:21:26 +00:00
Butkovits Atila 1d2238af48 Backed out 2 changesets (bug 1620679) for perma Reftest failure. CLOSED TREE
Backed out changeset 8190c67514cc (bug 1620679)
Backed out changeset 4ca2912d7421 (bug 1620679)
2020-05-26 10:58:42 +03:00
Butkovits Atila a2bda5fd7e Backed out 5 changesets (bug 1629113) for causing Geckoview perma failures. CLOSED TREE
Backed out changeset cd5c87a17008 (bug 1629113)
Backed out changeset 3729b2c288ba (bug 1629113)
Backed out changeset 2cd92d6c2998 (bug 1629113)
Backed out changeset 6d7c87f3c329 (bug 1629113)
Backed out changeset 2bcba09433b5 (bug 1629113)
2020-05-26 10:39:42 +03:00
Agi Sferro 398b7f2e76 Bug 1629113 - Move remaining services to components.conf. r=snorp,baku
Differential Revision: https://phabricator.services.mozilla.com/D75878
2020-05-26 04:14:12 +00:00
Matt Woodrow d347ab0ef5 Bug 1620679 - Don't fire load event from within Stop(). r=smaug
This matches what the spec says, and what blink does.

Differential Revision: https://phabricator.services.mozilla.com/D73994
2020-05-26 03:08:40 +00:00
Cameron McCormack 253234aaa1 Bug 1640545 - Make attribute substring selectors a little faster. r=emilio
In the common case of using case sensitive matching, improvements come from:

* for attributes backed by nsStringBuffers, not needing to AddRef/Release the
  string buffer
* for attributes backed by atoms, not needing to run the destructor of an
  nsDependentAtomString
* for prefix and suffix attribute selectors, using memcmp instead of the
  slower StringBeginsWith/StringEndsWith (which read a character at a
  time and call a virtual function on the comparator object)
* for the substring attribute selector, using std::search(), which also
  avoids virtual function calls on a comparator object

Attribute selector performance is important on pages with many links
with ad blocker extensions that use such selectors installed.

On my machine, this drops total time spent loading the single page HTML
spec

* under Gecko_AttrHasPrefix from 2.69 s to 1.25 s
* under Gecko_AttrHasSubstring from 1.06 s to 0.30 s

Differential Revision: https://phabricator.services.mozilla.com/D76643
2020-05-25 22:26:09 +00:00
Honza Bambas 07f63ad409 Bug 1637039 - Notify script preload when the loading channel synchronously fails to open, remove a used script preload from Document, r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D76364
2020-05-25 18:39:11 +00:00
Nika Layzell 73d17519e7 Bug 1639367 - Clean up TabContext logic for PBrowser, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D76055
2020-05-21 22:38:44 +00:00
Masatoshi Kimura 9c7a29b17e Bug 1531851 - Make WebAudio GC tests more reliable. r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D76590
2020-05-25 18:04:58 +00:00
Nika Layzell e6a9e27a19 Bug 1637088 - Delay creating BrowserBridgeChild until after new PBrowser has been created, r=farre,emilio
Differential Revision: https://phabricator.services.mozilla.com/D75614
2020-05-25 06:06:30 +00:00
sefeng f2affadce6 Bug 1324958 - Implement <dialog> focusing steps r=smaug
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dialog-focusing-steps

Differential Revision: https://phabricator.services.mozilla.com/D74923
2020-05-25 14:57:25 +00:00
Nicolas Silva bdabdf112f Bug 1635016 - Remove the rest of the SetTransactionLogging glue. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74866
2020-05-18 12:11:33 +00:00
Emilio Cobos Álvarez 6989efb908 Bug 1640605 - Remove some now-unneeded casts / type-checks. r=edgar
IsInNativeAnonymousSubtree and IsRootOfNativeAnonymousSubtree are
exposed in nsINode, so we don't need to make sure to call them on
nsIContent objects.

Depends on D76681

Differential Revision: https://phabricator.services.mozilla.com/D76682
2020-05-25 11:46:43 +00:00
Emilio Cobos Álvarez 89958b377a Bug 1640605 - Remove IsInAnonymousSubtree / IsRootOfAnonymousSubtree. r=edgar
In favor of the NativeAnonymous versions which they forward to.

Done automatically with:

  rg -l 'IsInAnonymousSubtree' | xargs sed -i 's/IsInAnonymousSubtree/IsInNativeAnonymousSubtree/g'

And removing the function definitions afterwards.

Differential Revision: https://phabricator.services.mozilla.com/D76681
2020-05-25 11:43:51 +00:00
Narcis Beleuzu 31ca1d2605 Backed out changeset 2b4796470c0b (bug 1638826) for wpt failure on form-action-src-javascript-blocked.sub.html . CLOSED TREE 2020-05-25 13:52:24 +03:00
Emilio Cobos Álvarez 1ed9a59aaf Bug 1640158 - Remove useless principal-passing in the CSS loader. r=ckerschb
The only caller that passes that principal is the only caller that calls
into LoadSheet with a loader that has a document anyway.

And the principal we're passing is Document::NodePrincipal(), which is
what we'd end up using anyway, so the new code is exactly equivalent, as
far as I can tell.

Differential Revision: https://phabricator.services.mozilla.com/D76469
2020-05-25 09:42:01 +00:00
Sylvestre Ledru 615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +00:00
Christoph Kerschbaumer 00cb73739d Bug 1638826: Make CSP permits function (e.g. restricting base-uri) consult subjectCSP before enforcing CSP. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75787
2020-05-25 08:24:09 +00:00
Christoph Kerschbaumer 6ae4ad1947 Bug 1422284 - Upgrade insecure requests should only apply to top-level same-origin redirects. r=baku,valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75259
2020-05-25 08:14:10 +00:00
Gijs Kruitbosch 38b061ef45 Bug 1638373 - remove js/ipc now that CPOWs are dead, r=mccr8
Depends on D76597

Differential Revision: https://phabricator.services.mozilla.com/D76598
2020-05-24 18:47:04 +00:00
Dorel Luca a94d31585c Backed out changeset 1334652d0ec4 (bug 1640280) for build bustage in workspace/obj-build/dist/include/mozilla/dom/Document.h. CLOSED TREE 2020-05-25 01:31:54 +03:00
longsonr cdcace5073 Bug 1640280 - Extend autofocus to SVGGraphicsElement r=emilio
Note we're still limited to markup only because of bug 662496
so we don't pass the web platform tests for this feature.
Chrome has implemented support per
https://www.chromestatus.com/feature/5654905853313024
In SVG only SVGGraphicsElements are focusable.

Differential Revision: https://phabricator.services.mozilla.com/D76546
2020-05-24 21:04:14 +00:00
Olli Pettay 1d2d27759a Bug 1615564, clearing timeouts should be O(1),
Differential Revision: https://phabricator.services.mozilla.com/D76630
2020-05-24 20:59:08 +00:00
Neil Deakin 31f934aecf Bug 1640245, remove frame script and message manager from workers tests, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D76518
2020-05-23 03:20:07 +00:00
Neil Deakin 7d5d797ff3 Bug 1640240, remove message manager usage from browser_test_focus_after_modal_state.js, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D76517
2020-05-22 19:03:02 +00:00
Narcis Beleuzu 34d12babb2 Backed out 5 changesets (bug 1602757, bug 1612063) for marionette failures on test_crash.py
Backed out changeset 232da017dc6a (bug 1602757)
Backed out changeset 32851bed1929 (bug 1602757)
Backed out changeset 1c6a6bfaaeef (bug 1602757)
Backed out changeset 45e22f062bce (bug 1612063)
Backed out changeset a7d7edf158a4 (bug 1602757)
2020-05-23 23:45:59 +03:00
Randell Jesup 2208332d44 Bug 1602757: disable process caching/preallocation while testing browser_resource_uri r=zbraniecki
Differential Revision: https://phabricator.services.mozilla.com/D76534
2020-05-23 05:07:53 +00:00
Randell Jesup b70bc6db7b Bug 1612063: Disable test_peerConnection_relayOnly.html due to raciness r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D74677
2020-05-23 18:51:40 +00:00
Randell Jesup ec264a9a49 Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-23 05:37:26 +00:00
Denis Palmeiro 4479f6b01c Bug 1637802 - Replace ScriptEvaluation profiler marker with compilation & execution markers for bytecode, module, binast, and text sources. r=smaug
Replace ScriptEvaluation profiler marker with compilation & execution markers for bytecode, module, binast, and text sources.

Differential Revision: https://phabricator.services.mozilla.com/D75223
2020-05-23 18:22:49 +00:00
Emilio Cobos Álvarez a361d764b1 Bug 1639057 - Simplify Bug 426082.html to not depend on paint events. r=mstange
I removed some outlines in gtk which causes some repaints not to show
up. However I think this test should be simplified a bit instead.

When this test landed in bug 426082, snapshots and such were the only
way to test this because it was a widget hack, effectively. Nowadays,
that "forward hover and active state from label to labeled element"
happens at the event state manager level, and thus we can test it much
more easily using simple selector-matching.

Differential Revision: https://phabricator.services.mozilla.com/D76602
2020-05-23 17:26:56 +00:00
Emilio Cobos Álvarez a42bfa75a9 Bug 1156934 - Notify all content processes when LookAndFeel changes. r=jesup
This should fix the issue for preallocated processes that still don't
host any document, and also send a few less IPC messages.

Differential Revision: https://phabricator.services.mozilla.com/D76537
2020-05-23 14:28:40 +00:00
Daosheng Mu 433f122bcc Bug 1538805 - Send GamepadAdded events to the later GamepadEventChannels. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74769
2020-05-23 03:14:42 +00:00
Jonathan Kingston f34d7b951e Bug 1557386 - Testing CORS content and errors for beacon. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75804
2020-05-22 11:51:46 +00:00
Eden Chuang 501eb4718d Bug 1603168 - Reject Cache.match and Cache.matchAll if the response doesn't match the caller context coep r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D70020
2020-05-23 01:44:58 +00:00
sefeng 67c1284c8c Bug 1637307 - Push/Pop dialog to top layer when needed r=smaug,emilio
This patch completes the top layer requirement for showModal()
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-showmodal

Differential Revision: https://phabricator.services.mozilla.com/D74922
2020-05-23 01:45:33 +00:00
Edgar Chen 3c8a28b7ab Bug 1638806 - Do not update sLastMouseRemoteTarget for eMouseExitFromWidget event; r=smaug
Firing eMouseExitFromWidget means we are leaving a specific remote target, then
we should not update sLastMouseRemoteTarget. Otherwise the subsequent event
might trigger sending eMouseExitFromWidget again.

Differential Revision: https://phabricator.services.mozilla.com/D75916
2020-05-22 20:12:25 +00:00
Mihai Alexandru Michis 37ef8a125d Backed out changeset a845717e4d10 (bug 1482279) for causing multiple failures.
CLOSED TREE
2020-05-23 02:22:20 +03:00
Masatoshi Kimura 0701e89b7e Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in SpecialPowers. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D74641
2020-05-22 21:46:25 +00:00
Masatoshi Kimura 7ecd6866bd Bug 1482279 - Stop using Cu.forcePermissiveCOWs() in test_resize_move_windows.xhtml. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D75302
2020-05-22 21:46:54 +00:00
Mihai Alexandru Michis ffc83ce958 Bug 1637715 - Add missing quotation mark to mac condition. a=fix
CLOSED TREE
2020-05-23 01:13:47 +03:00
Andreea Pavel c592561f15 Bug 1637715 - update disabling condition to include mac and all win r=jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D76545
2020-05-22 22:01:28 +00:00
Kartikaya Gupta 5edeaf80d3 Bug 1638314 - Add some telemetry around wheel modifiers and triggered actions. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D76044
2020-05-22 21:21:34 +00:00
Timothy Nikkel 4c02404cb3 Bug 1639975. Make sure CanvasRenderingContextHelper::mCurrentContextType is initialized. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D76438
2020-05-22 09:14:04 +00:00
Bob Owen 5ef9be5d40 Bug 1633791 part 1: Add ability to notify the child processes of an impending shutdown. r=nika
This also adds a call to the new function in ContentParent::StartForceKillTimer.

Differential Revision: https://phabricator.services.mozilla.com/D75507
2020-05-22 18:21:59 +00:00
Dorel Luca 871005ec93 Backed out changeset 9133eeb54db8 (bug 1529203) for Crashtests failures in dom/base/crashtests/1529203-2.html. CLOSED TREE 2020-05-22 18:54:44 +03:00
Mark Banner 5d044573da Bug 1632447 - Disable window.external/sidebar.AddSearchProvider by preference. r=baku
This makes them both operate as dummy functions.

Differential Revision: https://phabricator.services.mozilla.com/D76329
2020-05-22 11:41:15 +00:00
Jon Coppeard 9f814b62de Bug 1529203 - Add tests to check that the module map is cleared when using document.open r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D21719
2020-05-22 08:08:42 +00:00
Barret Rennie f5258e1188 Bug 1603185 - Collect per tab unique site origin telemetry r=Dexter,Gijs,nika
Top-level content WindowGlobalParents now keep track of the site origins of the
documents in their document tree. When the WindowGlobalParent is torn down, the
maximum of the number of unique site origins is submitted for telemetry.

Differential Revision: https://phabricator.services.mozilla.com/D71493
2020-05-22 00:34:17 +00:00
Emilio Cobos Álvarez e485c5c372 Bug 1630919 - Do not throttle an effect due to opacity if the frame is animating opacity itself. r=hiro
When transitioning visibility and opacity at the same time, we create
two effects, one animating opacity, and one visibility.

We're incorrectly throttling the visibility animation due to opacity,
because _that_ effect is not animating opacity, but the other one is and
thus doesn't get throttled.

Use HasAnimationOfOpacity() to check for this case. This is slightly
sketchy, because the first time we get through there we may not even
have started the opacity animation yet. However it kinda works, because
the fact that there's a (non-throttled, because of the
aEffect.HasOpacityChange()) opacity animation means that we'll tick both
of them, and unthrottle them next frame.

This seems better than the alternative which is never throttling
animations in opacity: 0 roots.

Differential Revision: https://phabricator.services.mozilla.com/D76405
2020-05-21 23:12:26 +00:00
Emilio Cobos Álvarez 7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Bogdan Tara 81a4d66bf7 Backed out changeset 68aec891cd2e (bug 1557386) for test_beaconFrame.html failures CLOSED TREE 2020-05-21 20:46:37 +03:00
Jon Coppeard d12ca3002f Bug 1632439 - Make CallbackObject methods return JSObject pointers rather than handles r=peterv
This turned out to be simpler than expected. Apart from generated bindings, a lot of the callers didn't make use of the fact that the return value was a handle.

Differential Revision: https://phabricator.services.mozilla.com/D72120
2020-05-21 14:09:02 +00:00
Eden Chuang 4f231bbd53 Bug 1633344 - Throw RangeError when creating PaymentRequest with a duplicate payment method. r=alchen
Differential Revision: https://phabricator.services.mozilla.com/D74686
2020-05-21 10:30:00 +00:00
Jonathan Kingston 04df574987 Bug 1557386 - Testing CORS content and errors for beacon. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75804
2020-05-21 10:17:44 +00:00
Jonathan Kingston 72cac8db01 Bug 1557386 - Pass correct CORS flags for Beacon requests r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75757
2020-05-21 10:17:21 +00:00
Atila Butkovits a059fdad21 Backed out changeset (Bug 1615564) 1c58f39177c0 for bustages at TimeoutManager.cpp. CLOSED TREE 2020-05-21 13:06:15 +03:00
Olli Pettay 5e1e544d7b Bug 1615564, clearing timeouts should be O(1) r=farre
Differential Revision: https://phabricator.services.mozilla.com/D74566
2020-05-20 14:08:59 +00:00
Boris Chiou 599c6939d9 Bug 1635939 - Let aspect-ratio (css-sizing-4) support 'auto | <ratio>'. r=emilio
In order to test its parsing and serialization, we expose it but protect
it behind a pref.

Besides, I would like to drop layout.css.aspect-ratio-number.enabled in
the next patch because the spec has been updated. It seems we don't have
to keep this pref and we should always use Number.

Differential Revision: https://phabricator.services.mozilla.com/D74955
2020-05-21 06:45:10 +00:00
Andrea Marchesini 0ae464faaa Bug 1639154 - Isolate network cache per first-party when privacy.partition.network_state is set to true - part 2 - tests, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D75922
2020-05-21 05:41:50 +00:00
Emilio Cobos Álvarez c3b7227771 Bug 1639392 - Merge nsIStyleSheetLinkingElement and nsStyleLinkElement, and call it LinkStyle. r=jwatt
Which is the spec term. nsIStyleSheetLinkingElement is even more
confusing since it may not be an element at all (see: processing
instructions).

Differential Revision: https://phabricator.services.mozilla.com/D76071
2020-05-21 03:07:16 +00:00
Emilio Cobos Álvarez 9bf325345b Bug 1639392 - Move nsIStyleSheetLinkingElement::OverrideBaseURI to its only implementation. r=jwatt
It's a PI thing, so keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D76070
2020-05-21 00:40:31 +00:00
Emilio Cobos Álvarez 22b5f93899 Bug 1639392 - Make some nsStyleLinkElement methods final. r=jwatt
Depends on D76068

Differential Revision: https://phabricator.services.mozilla.com/D76069
2020-05-20 17:35:25 +00:00
Emilio Cobos Álvarez 7353713339 Bug 1639392 - Remove nsIStyleSheetLinkingElement::InitStyleLinkElement. r=jwatt
Always gets false as an argument, and the value starts false, so it's
just dead code.

Depends on D76067

Differential Revision: https://phabricator.services.mozilla.com/D76068
2020-05-20 17:35:25 +00:00
Emilio Cobos Álvarez 8fa3b075e8 Bug 1639392 - Remove unused nsIStyleSheetLinkingElement::GetStyleSheet. r=jwatt
Depends on D76003

Differential Revision: https://phabricator.services.mozilla.com/D76067
2020-05-20 17:35:25 +00:00
Csoregi Natalia 40b453bd7c Backed out 7 changesets (bug 1602757, bug 1612063) for browser-chrome failures on browser_resource_uri.js. CLOSED TREE
Backed out changeset 2556e3876602 (bug 1602757)
Backed out changeset 1c98ac1c4283 (bug 1602757)
Backed out changeset 2c7bf6206bb4 (bug 1602757)
Backed out changeset a0142f6bb65f (bug 1602757)
Backed out changeset 7f114ce6b98d (bug 1612063)
Backed out changeset d9b4b2cffaa5 (bug 1602757)
Backed out changeset 33515632a7db (bug 1602757)
2020-05-21 04:09:56 +03:00
Randell Jesup 14c6c29a53 Bug 1602757: Block extension processes from using the preallocation queue r=nika
Differential Revision: https://phabricator.services.mozilla.com/D75412
2020-05-20 22:37:42 +00:00
Randell Jesup 36ea8e1a97 Bug 1612063: Disable test_peerConnection_relayOnly.html due to raciness r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D74677
2020-05-20 22:38:42 +00:00
Randell Jesup b127aeed3f Bug 1602757: Fix e10s process reuse cache and add debugs r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72553
2020-05-20 22:38:09 +00:00
Randell Jesup ce46a60d0a Bug 1602757: add preallocation cache for webIsolated (fission) processes r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D69589
2020-05-20 22:38:42 +00:00
alwu 0445af8ee7 Bug 1638559 - return a deny action when the window context is null. r=bryce
I suspect that when enabling Fission, in some situation, we might get a null window context which results in a crash. Therefore, returning a deny action if we are not able to get a window context.

Differential Revision: https://phabricator.services.mozilla.com/D76196
2020-05-20 21:12:13 +00:00
Andrea Marchesini 81a382b344 Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 4 - DNS originAttributes suffix in about:networking, r=valentin,fluent-reviewers,necko-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D75986
2020-05-20 16:46:26 +00:00
Andrea Marchesini e69aa140ef Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 3 - implementation, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75985
2020-05-20 17:27:43 +00:00
Razvan Maries 958490b3c1 Backed out 4 changesets (bug 1639392) for build bustages on nsCOMPtr.h. CLOSED TREE
Backed out changeset 379e2c6c0491 (bug 1639392)
Backed out changeset ce2500faad38 (bug 1639392)
Backed out changeset cee5116fbef3 (bug 1639392)
Backed out changeset 7c5823c53db8 (bug 1639392)
2020-05-20 19:36:00 +03:00
Razvan Maries 02e0a1d9a4 Backed out 3 changesets (bug 1639247) for build bustages on on StoragePrincipalHelper.cpp. CLOSED TREE
Backed out changeset 48a854ee6710 (bug 1639247)
Backed out changeset 032d302608e4 (bug 1639247)
Backed out changeset 2d2ff22a0ea4 (bug 1639247)
2020-05-20 19:34:22 +03:00
Andrea Marchesini 50ea627cef Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 3 - DNS originAttributes suffix in about:networking, r=valentin,fluent-reviewers,necko-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D75986
2020-05-20 15:52:54 +00:00
Andrea Marchesini de934d0d8f Bug 1639247 - Isolate DNS cache per first-party when privacy.partition.network_state is set to true - part 2 - implementation, r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D75985
2020-05-20 15:25:35 +00:00
Emilio Cobos Álvarez 0b3825c885 Bug 1639392 - Move nsIStyleSheetLinkingElement::OverrideBaseURI to its only implementation. r=jwatt
It's a PI thing, so keep it there.

Depends on D76069

Differential Revision: https://phabricator.services.mozilla.com/D76070
2020-05-20 10:32:14 +00:00
Emilio Cobos Álvarez 824dca2f33 Bug 1639392 - Make some nsStyleLinkElement methods final. r=jwatt
Depends on D76068

Differential Revision: https://phabricator.services.mozilla.com/D76069
2020-05-20 10:32:12 +00:00
Emilio Cobos Álvarez 4b6f3e905b Bug 1639392 - Remove nsIStyleSheetLinkingElement::InitStyleLinkElement. r=jwatt
Always gets false as an argument, and the value starts false, so it's
just dead code.

Depends on D76067

Differential Revision: https://phabricator.services.mozilla.com/D76068
2020-05-20 10:30:32 +00:00
Emilio Cobos Álvarez a56ff6f29c Bug 1639392 - Remove unused nsIStyleSheetLinkingElement::GetStyleSheet. r=jwatt
Depends on D76003

Differential Revision: https://phabricator.services.mozilla.com/D76067
2020-05-20 15:39:33 +00:00
Brad Werth 823a2b0645 Bug 1638773: Allow initial-scale clamping when user-scalable=no, add WPT. r=hiro
This corrects the handling of user-scalable=no to first clamp scale (whether
specified or default) between min and max scales, then applies the resulting
value to initial-scale, min and max.

Differential Revision: https://phabricator.services.mozilla.com/D76056
2020-05-20 15:15:07 +00:00
Olli Pettay 9a394a854e Bug 1637712 - Consider to move *Ancestor* API to nsINode r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75169
2020-05-20 14:55:15 +00:00
owlishDeveloper 887def6ff1 Bug 1432949 - Allow system principal initialize a channel for revoked blob URLs r=geckoview-reviewers,snorp,baku,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75659
2020-05-20 14:39:28 +00:00
John Lin f4bf60b4d4 Bug 1628048 - send telemetry data when users attempt to play HLS contents. r=bryce,liuche
Differential Revision: https://phabricator.services.mozilla.com/D75158
2020-05-20 01:41:43 +00:00
Frederik Braun ab74268189 Bug 1613609 - prototype patch with whitelist for sysrequest r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75064
2020-05-20 13:01:35 +00:00
Peter Van der Beken 2c8f84716d Bug 1570255 - Forward ChildSHistory::Go to the parent. r=smaug
This enables navigating by index in session history go through the
session history in the parent (if enabled with the pref).

If the pref is enabled, then ChildSHistory::Go will send an IPC message
to the parent with the index to navigate to. The parent calls the
existing nsSHistory implementation and starts the loads, and
asynchronously returns the index that we actually navigated to. The
child process then uses that result to update the session history
implementation in the child process (this part is temporary, while we
have session history both in parent and in child). We also make the
parent send an updated length to the child process over IPC, so that
history.length always the length for the implementation in the parent.

Differential Revision: https://phabricator.services.mozilla.com/D65330
2020-05-20 09:15:31 +00:00
Peter Van der Beken f38cc0e952 Bug 1570255 - Reboot session history in parent part 1. r=smaug,necko-reviewers,valentin
This adds a new implementation of nsISHEntry
(mozilla::dom::SessionHistoryEntry). When session history in the parent
is turned on, we'll instantiate the existing nsSHistory in the parent
process, but it will store entries of this new type. The nsSHistory in
the child process will also be instantiated for now, to avoid breaking
too many assumptions, and we try to keep parent and child
implementations in sync.

mozilla::dom::SessionHistoryEntry stores most of its data in a new
structure (mozilla::dom::SessionHistoryInfo) which can be sent over IPC.
When a load starts through the DocumentChannel we create an entry of
this new type for it in the parent process in
DocumentLoadListener::Open. The SessionHistoryInfo for that entry (with
an associated ID) is then sent over IPC in the RedirectToRealChannelArgs
to the process that does the actual load, where we store it in the
nsDocShell in mLoadingEntry (and mLoadingEntryId). The parent process
keeps track of outstanding loading entries in an array (mLoadingEntries)
in the CanonicalBrowsingContext. When a load finishes the nsDocShell
transfers mLoadingEntry into mActiveEntry, and notifies the parent
process through an IPC message (HistoryCommit) with the id of that
entry. The CanonicalBrowsingContext then removes the entry from the
array and stores it in its mActiveEntry, and adds the entry to the
nsSHistory object.

There are a number of things in this patch that are broken, and a lot of
FIXME comments. However, with the pref turned off things should just be
working as before. The goal is to land this first part, and then iterate
on the new implementation until we can switch over.

Differential Revision: https://phabricator.services.mozilla.com/D65329
2020-05-20 09:09:12 +00:00
Peter Van der Beken 1990918ebe Bug 1570255 - Remove sync session history implementation. r=smaug,nika
Differential Revision: https://phabricator.services.mozilla.com/D65326
2020-05-20 09:09:06 +00:00
Corentin Arnould 3f10a4c034 Bug 1638832 - Remove unused full duplex code r=padenot
Removed "media.navigator.audio.full_duplex" pref
It was related to `MediaEnginePrefs::mFullDuplex` which wasn't used too, so the according code has been removed

Differential Revision: https://phabricator.services.mozilla.com/D75993
2020-05-20 08:42:21 +00:00
Tom Tung d9d34b2983 Bug 1605176 - Send a error message data and cause a message error on the receiver side when the message data contains a shared memory object in BrowsingContext::PostMessageMoz; r=baku,kmag
Differential Revision: https://phabricator.services.mozilla.com/D75035
2020-05-20 08:27:16 +00:00
Tim Huang 4b67d42692 Bug 1639195 - Part 1: Make BrowserChild::RecvLoadURL() to use the correct triggering princpal. r=ckerschb,mattwoodrow
This patch makes the triggering princpal to be propagated to the
BrowserChild when calling LoadURL in nsFrameLoader. And use it as the
triggering principal for loading instead of the system principal.

Differential Revision: https://phabricator.services.mozilla.com/D75965
2020-05-19 20:22:34 +00:00
Dorel Luca ff400dbd96 Merge mozilla-central to autoland 2020-05-20 06:40:42 +03:00
Dorel Luca a40ef31fc9 Merge autoland to mozilla-central. a=merge 2020-05-20 06:38:18 +03:00
Dorel Luca 305e9f8c08 Backed out changeset be2d763a80d8 (bug 1613609) for making nightlies not being able to connecto to sites fi add-ons are installed. a=backout DONTBUILD 2020-05-20 06:35:48 +03:00
Dimi Lee 27c0acc692 Bug 1637194 - P4. Inherit the first-party domain from the parent document when creating CookieJarSetting in document r=timhuang,baku
This fixes a issue that about:blank page can't get correct first-party
domain when fission is enabled.

Differential Revision: https://phabricator.services.mozilla.com/D75784
2020-05-19 09:47:42 +00:00
Frederik Braun b27d095e3d Bug 1613609 - prototype patch with whitelist for sysrequest r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75064
2020-05-19 08:55:06 +00:00
Frederik Braun de3412e689 Bug 1613609 - Add required loadinfo flag requests initiated with SystemPrincipal r=necko-reviewers,dragana
Adding the flag to existing channel/loadinfo object for:
- PushServices HTTP, WebSocket
- NetworkGeolocationProvider
- NetUtil.jsm's NewChannel
- NetworkConnectivityService
- OCSP
- Portal Detection
- ProductAddonChecker.jsm
- URLClassifier

Differential Revision: https://phabricator.services.mozilla.com/D75063
2020-05-19 08:54:58 +00:00
Steve Fink 35e5881162 Bug 1633625 - move performance.mozMemory -> performance.mozMemory.gc to match the JS shell, and because performance.mozMemory.mallocBytes is deceptive when it only refers to GC-controlled malloc bytes r=jonco,smaug
Differential Revision: https://phabricator.services.mozilla.com/D74447
2020-05-19 21:54:24 +00:00
John Lin 697efd3eea Bug 1619550 - p2: use media segment URL access for access control. r=bryce
Differential Revision: https://phabricator.services.mozilla.com/D74990
2020-05-19 21:23:59 +00:00
Ting-Yu Lin 48fdff53fc Bug 1639053 - Remove the ability to reverse axes internally for nsFlexContainerFrame. r=dholbert
The ability to reverse axes internally was added in bug 983427, but it
turns out not to be used.

test_flex_lines.html needs to be modified because those expected cross
values are written as if the flex lines are physically in top-to-bottom
order (due to we reversed the axes internally).

Now we don't reverse the internal axes, the order of the flex lines
becomes bottom-to-top due to "flex-wrap: wrap-reverse". The crossStart
coordinate begins from the flex container's bottom end edge, and it
increases from bottom to the top to the flex container's top end
edge. (Note the flex container has 42px height.)

Differential Revision: https://phabricator.services.mozilla.com/D75887
2020-05-19 21:13:35 +00:00
Peter Van der Beken ef557497ca Bug 1629866 - Store ChildSHistory on the BrowsingContext. r=nika,smaug
Differential Revision: https://phabricator.services.mozilla.com/D70997
2020-05-19 08:57:44 +00:00
Peter Van der Beken ef6ec7de76 Bug 1639310 - Simplify implicitJSContext support. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D76021
2020-05-19 20:48:29 +00:00
Peter Van der Beken af82496fc7 Bug 1639310 - Remove unnecessary implicitJSContext annotations. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D76020
2020-05-19 20:48:21 +00:00
Coroiu Cristina a9c2a2b735 Backed out changeset bb7c330d407f (bug 1637307) for wpt failures at layout/generic/ViewportFrame.cpp on s CLOSED TREE 2020-05-20 00:01:55 +03:00
Nika Layzell 276399470c Bug 1638124 - Part 2: Convert media types to NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_DESTROY, r=jya
Differential Revision: https://phabricator.services.mozilla.com/D75608
2020-05-19 18:30:55 +00:00
sefeng 66114f4029 Bug 1634854 - Make performance.observe queues task when buffered is set r=baku
Spec: https://w3c.github.io/performance-timeline/#observe-method

Per sepc, when the buffered flag is set, a PerformanceObserver
task should be queued to notify the observer for buffered entires.

Differential Revision: https://phabricator.services.mozilla.com/D75574
2020-05-18 11:53:06 +00:00
alwu c6ddd24262 Bug 1545108 - use diagnostic assertion to ensure the sample is valid to be accessed. r=bryce
This patch will do :
- add `MOZ_DIAGNOSTIC_ASSERT` to ensure the sample is valid to be accessed

The advantage  :
- to ensure the sample is still valid when we push it to the queue or pop it out the queue

Differential Revision: https://phabricator.services.mozilla.com/D75871
2020-05-19 15:42:06 +00:00
Dorel Luca 134e648c76 Backed out 6 changesets (bug 1631593) for Assertion failure in xpcom/base/nsCycleCollector.cpp. CLOSED TREE
Backed out changeset 35b4cd4bb12a (bug 1631593)
Backed out changeset a20b9fb485fc (bug 1631593)
Backed out changeset 8ade55be1042 (bug 1631593)
Backed out changeset ee3255e55ab3 (bug 1631593)
Backed out changeset 7d5a3d1035dc (bug 1631593)
Backed out changeset 90972e768c33 (bug 1631593)
2020-05-19 20:02:59 +03:00
David Teller 49d5a4d3b4 Bug 1636089 - ActorManagerParent.addJSProcessActors;r=kmag,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D75047
2020-05-19 16:29:36 +00:00
Zibi Braniecki 3e0c621a68 Bug 1631593 - Lazify JSM initialization. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71834
2020-05-19 16:28:28 +00:00
Zibi Braniecki 907ab624b4 Bug 1631593 - Move generateBundles to be stored on Localization C++. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71814
2020-05-19 16:28:05 +00:00
Zibi Braniecki f6d6adc6b3 Bug 1631593 - Move aIsSync to Localization C++. r=stas,jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D71679
2020-05-19 16:27:58 +00:00
Liang-Heng Chen 60404d1a7a Bug 1631676 - Part 3: Use global cookie behavior getter; r=baku,johannh
Differential Revision: https://phabricator.services.mozilla.com/D74214
2020-05-19 14:48:07 +00:00
Liang-Heng Chen 466189ebb4 Bug 1631676 - Part 2: remember FPI state in CookieJarSettings; r=baku,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D74050
2020-05-19 14:47:57 +00:00
sefeng ca6d5ba134 Bug 1637307 - Push/Pop dialog to top layer when needed r=smaug
This patch completes the top layer requirement for showModal()
Spec: https://html.spec.whatwg.org/multipage/interactive-elements.html#dom-dialog-showmodal

Differential Revision: https://phabricator.services.mozilla.com/D74922
2020-05-19 15:40:08 +00:00
Neil Deakin accd5effbf Bug 1594752, expose WindowGlobalParent's document title attribute to script, and fire a pagetitlechanged event on the frame/browser when it changes, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D72561
2020-05-19 13:42:18 +00:00
Sebastian Streich 159ab546db Bug 1625845 - Remove GetUri in Navigator.cpp r=ckerschb,baku
Differential Revision: https://phabricator.services.mozilla.com/D68749
2020-05-19 14:51:40 +00:00
Bogdan Tara 1498e0890a Backed out 2 changesets (bug 1633344) for bustages complaining about PaymentRequest.cpp CLOSED TREE
Backed out changeset ec269840dc1b (bug 1633344)
Backed out changeset 0ec92438aef0 (bug 1633344)
2020-05-19 16:59:46 +03:00
Eden Chuang 8c59e98c15 Bug 1633344 - Throw RangeError when creating PaymentRequest with a duplicate payment method. r=alchen
Differential Revision: https://phabricator.services.mozilla.com/D74686
2020-05-19 13:17:13 +00:00
Paul Adenot 781a32b68c Bug 1607781 - Consistently use a fixed sample-rate when resisting fingerprinting. r=jib
Differential Revision: https://phabricator.services.mozilla.com/D75937
2020-05-19 12:50:30 +00:00
Eden Chuang 16b5f23697 Bug 1532287 - P2 Propagate loading document/worker's COEP to nsHttpChannel through nsILoadInfo r=necko-reviewers,valentin,JuniorHsu
Currently, the worker's COEP is saved in WorkerPrivate and not be respected when loading resources in workers.
This patch adds an attribute loadingEmbedderPolicy in nsILoadInfo, which indicates the COEP header the loading must be respected.

The default value of loadingEmbedderPolicy is nsILoadInfo::EMBEDDER_POLICY_NULL.
loadingEmbedderPolicy is initialized with the COEP of the BrowsingContext used for creating LoadInfo.
And it could be set to other value when fetch in workers.

Differential Revision: https://phabricator.services.mozilla.com/D73690
2020-05-19 12:50:39 +00:00
Eden Chuang c42e8d4e87 Bug 1532287 - P1 Saving the loading document/worker's COEP in InternalRequest. r=dom-workers-and-storage-reviewers,perry
Currently, the worker's COEP value is saved in WorkerPrivate and it is not respected for fetch/cache API in workers.
This patch saving the COEP value which fetch/cache API should be respected when using in workers.
Notice that for the dedicated workers, it is not only respected to worker's COEP but also its owner's.

For fetch in workers, P2 will propagate the COEP value through nsILoadInfo to HttpChannels, such that COEP can be respected in parent process when calling ProcessCrossOriginResourcePolicyHeader() and ProcessCrossOriginEmbedderPolicyHeader().

For cache in workers. We handle it in bug 1603168. COEP will be propagated through CacheRequest to the parent process and respected in CacheOpParent::OnOpComplete().

Differential Revision: https://phabricator.services.mozilla.com/D73689
2020-05-19 12:50:36 +00:00
Honza Bambas 87cfab963e Bug 1618544 - Make XMLHttpRequest use <link preload>, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75557
2020-05-19 11:34:36 +00:00
Tom Tung dd538bb240 Bug 1606624 - Changes on interface tests in mochitest; r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D66777
2020-05-19 04:30:19 +00:00
Jean-Yves Avenard de5872ee7a Bug 1637890 - P2. Don't use ClearOnShutdown to destroy AbstractThread::MainThread(). r=froydnj
During the last cycle collection, state watchers may attempt to dispatch tasks to the current AbstractThread, so we can't clear the TLS entry until that step has completed.

We want the object to be deleted last; ordering in call to ClearOnShutdown() can't guarantee it.

Differential Revision: https://phabricator.services.mozilla.com/D75498
2020-05-18 16:12:28 +00:00
Jean-Yves Avenard dfb2061bb1 Bug 1634264 - Reject MozPromise when DomPromiseListener is deleted. r=mattwoodrow
We remove the assertion that the error code was NS_OK, as users of FromDomPromise assert it must be a failure.

Differential Revision: https://phabricator.services.mozilla.com/D75737
2020-05-18 22:16:38 +00:00
Jan-Ivar Bruaroey 4c1c0a25af Bug 1635716 - Remove pending gUM requests on navigation. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D75632
2020-05-18 20:37:16 +00:00
Tilden Windsor 6f2e45cfda Bug 1629604 - Fixed phrase not found in visible <script> and added a test for visible <script>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D75824
2020-05-18 21:28:46 +00:00
Barret Rennie b042e254ba Bug 1635885 - Remove debug assertions that fail during process switch r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D75395
2020-05-18 20:47:56 +00:00
Kershaw Chang bdbecde447 Bug 1539819 - P1: Make TRRService work in socket process r=dragana,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D68880
2020-05-18 20:18:03 +00:00
Emily McDonough 0ee5c5dc91 Bug 1626794 - Add strong ref to document and MOZ_CAN_RUN_SCRIPT annotation to Animation::CommitStyles r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D75418
2020-05-17 20:47:37 +00:00
Jan Varga 626676da02 Bug 1638831 - Rename clearStorageForPrincipal to clearStoragesForPrincipal in tests; r=dom-workers-and-storage-reviewers,ttung
Depends on D75786

Differential Revision: https://phabricator.services.mozilla.com/D75788
2020-05-18 13:05:28 +00:00
Jan Varga 99503e97e8 Bug 1638831 - Clean up the test for clearStoragesForOriginAttributesPattern(); r=dom-workers-and-storage-reviewers,ttung
Differential Revision: https://phabricator.services.mozilla.com/D75786
2020-05-18 13:05:25 +00:00
Honza Bambas d88ed92c5f Bug 1618548 - Make `Link: rel=preload` response header work with preload-as-speculative-load, r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D75133
2020-05-18 17:33:57 +00:00
Jon Coppeard 5a5b2daeba Bug 1627711 - Remove unused nsDOMWindowUtils::IsIncrementalGCEnabled method r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75810
2020-05-18 16:09:45 +00:00
Mihai Alexandru Michis a2026344a1 Backed out 2 changesets (bug 1613609) for causing bustages.
CLOSED TREE

Backed out changeset dd6e395dc342 (bug 1613609)
Backed out changeset 5bcb7b13a4ad (bug 1613609)
2020-05-18 16:38:58 +03:00
Emilio Cobos Álvarez 2c3b3a6166 Bug 1638127 - Fix a typo in an ifdef on a CLOSED TREE.
MANUAL PUSH: Mac bustage
2020-05-18 15:26:10 +02:00
Dimi Lee 267aee84fa Bug 1624269 - P4. Not using permission manager to sync HasStorageAccess. r=timhuang,baku
We already have an architecture to sync the storage access granted
result to all 3rd-party frames with the same tracking origin.
We use the same way to sync HasStorageAccess flag instead of relying
on permission manager update permissions to child processes.

Differential Revision: https://phabricator.services.mozilla.com/D73711
2020-05-18 11:04:48 +00:00
Dimi Lee 3cd4188086 Bug 1624269 - P3. Inform all the windows whose storage permission is granted. r=timhuang,baku
Before this patch, we only call StorageAccessGranted on windows that
triggers the storage heuristics. So even if we sync storage permission to the
other frames, their data will not be refreshed. For example, if a document
has a worker, we don't propagate the permission to the worker.

In this patch, we call ::StorageAccessGranted as long as we update
the window's storage permission.

Differential Revision: https://phabricator.services.mozilla.com/D74321
2020-05-18 11:58:25 +00:00
Dimi Lee 3ad661e06a Bug 1624269 - P2. Cache access granted result in the 3rd-party window instead of top-level window in fission mode. r=timhuang,baku
Before this patch, in non-fission mode, we cache storage access granted result
in the top-level window so we don't have to iterate all the browsing contexts
in the same tree while syncing the storage permission granted decision.

However, since we plan to rely on the current update mechanism to sync
mHasStorageAccess flag for different documents in the same tab (instead of using
the syncing mechanism of permission manager), we will eventually need to iterate
the browsing context tree to find all the documents to sync. Base on this,
we no longer have to maintain different method for fission and non-fission.

In this patch, we store the permission granted result in the inner
window instead of using permission key and store the key in the top-level
window.

Differential Revision: https://phabricator.services.mozilla.com/D73710
2020-05-18 11:04:50 +00:00
Honza Bambas 7a64bc8d9b Bug 1618543 - Let `fetch()` use "fetch" preloads, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74899
2020-05-18 12:18:14 +00:00
Christoph Kerschbaumer a13abcc66d Bug 1632811: Use final URI for CSP reports in case of iframes. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75326
2020-05-16 16:57:00 +00:00
Frederik Braun 6cdb200d94 Bug 1613609 - prototype patch with whitelist for sysrequest r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75064
2020-05-18 10:59:12 +00:00
Frederik Braun 3baff21cbd Bug 1613609 - Add required loadinfo flag requests initiated with SystemPrincipal r=necko-reviewers,dragana
Adding the flag to existing channel/loadinfo object for:
- PushServices HTTP, WebSocket
- NetworkGeolocationProvider
- NetUtil.jsm's NewChannel
- NetworkConnectivityService
- OCSP
- Portal Detection
- ProductAddonChecker.jsm
- URLClassifier

Differential Revision: https://phabricator.services.mozilla.com/D75063
2020-05-18 10:59:04 +00:00
Emilio Cobos Álvarez 78e77439c9 Bug 1637459 - Make nsXULElement::HasMenu flush frames. r=tnikkel
The UITour code assumes that it will return the up-to-date value, which
doesn't happen with lazy frame construction.

This is used sparingly in the front end code, so it doesn't quite
warrant more optimization.

Differential Revision: https://phabricator.services.mozilla.com/D75710
2020-05-18 10:43:23 +00:00
Emilio Cobos Álvarez 16af962c7e Bug 1638127 - Make Linux focus ring behavior match Windows, rather than Mac. r=karlt
The Mac focus model is a bit different (mouse doesn't focus form
controls for example).

This matches GTK3 to my knowledge, where outlines are not shown until
you've navigated with the keyboard.

We should maybe consider changing Android as well (and maybe all
platforms, actually), but that's a bit of a bigger endeavour.

Differential Revision: https://phabricator.services.mozilla.com/D75505
2020-05-18 10:33:14 +00:00
Csoregi Natalia 88ab085eff Backed out 5 changesets (bug 1624269) for browser-chrome failures on browser_storageAccessWithHeuristics.js. CLOSED TREE
Backed out changeset 59cdba115447 (bug 1624269)
Backed out changeset 23b5c53f4be8 (bug 1624269)
Backed out changeset be697a5bc0fd (bug 1624269)
Backed out changeset 81420bca683c (bug 1624269)
Backed out changeset 599db5acefe1 (bug 1624269)
2020-05-18 13:59:44 +03:00
Csoregi Natalia 5162f86676 Backed out 2 changesets (bug 1613609) for failures on nsXPConnect.cpp. CLOSED TREE
Backed out changeset c593a7296df4 (bug 1613609)
Backed out changeset 72199fc4ea2b (bug 1613609)
2020-05-18 13:05:12 +03:00
Frederik Braun 7bb9748003 Bug 1613609 - prototype patch with whitelist for sysrequest r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D75064
2020-05-18 09:19:28 +00:00
Frederik Braun 3b0d63cd07 Bug 1613609 - Add required loadinfo flag requests initiated with SystemPrincipal r=necko-reviewers,dragana
Adding the flag to existing channel/loadinfo object for:
- PushServices HTTP, WebSocket
- NetworkGeolocationProvider
- NetUtil.jsm's NewChannel
- NetworkConnectivityService
- OCSP
- Portal Detection
- ProductAddonChecker.jsm
- URLClassifier

Differential Revision: https://phabricator.services.mozilla.com/D75063
2020-05-18 09:19:17 +00:00
Dimi Lee 76cd40637d Bug 1624269 - P4. Not using permission manager to sync HasStorageAccess. r=timhuang,baku
We already have an architecture to sync the storage access granted
result to all 3rd-party frames with the same tracking origin.
We use the same way to sync HasStorageAccess flag instead of relying
on permission manager update permissions to child processes.

Differential Revision: https://phabricator.services.mozilla.com/D73711
2020-05-18 09:14:09 +00:00
Dimi Lee 1f96287d53 Bug 1624269 - P3. Inform all the windows whose storage permission is granted. r=timhuang,baku
Before this patch, we only call StorageAccessGranted on windows that
triggers the storage heuristics. So even if we sync storage permission to the
other frames, their data will not be refreshed. For example, if a document
has a worker, we don't propagate the permission to the worker.

In this patch, we call ::StorageAccessGranted as long as we update
the window's storage permission.

Differential Revision: https://phabricator.services.mozilla.com/D74321
2020-05-18 09:09:57 +00:00
Dimi Lee 6960df4b88 Bug 1624269 - P2. Cache access granted result in the 3rd-party window instead of top-level window in fission mode. r=timhuang,baku
Before this patch, in non-fission mode, we cache storage access granted result
in the top-level window so we don't have to iterate all the browsing contexts
in the same tree while syncing the storage permission granted decision.

However, since we plan to rely on the current update mechanism to sync
mHasStorageAccess flag for different documents in the same tab (instead of using
the syncing mechanism of permission manager), we will eventually need to iterate
the browsing context tree to find all the documents to sync. Base on this,
we no longer have to maintain different method for fission and non-fission.

In this patch, we store the permission granted result in the inner
window instead of using permission key and store the key in the top-level
window.

Differential Revision: https://phabricator.services.mozilla.com/D73710
2020-05-18 09:14:09 +00:00
Martin Stransky 9b1a136632 Bug 1637992 [Linux] Remove gtk2xtbin as it's not used, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D75323
2020-05-18 08:12:16 +00:00
Simon Giesecke 35ff93b006 Bug 1638151 - Add support for nullable sequence types in Event classes. r=fabrice
Differential Revision: https://phabricator.services.mozilla.com/D75491
2020-05-15 18:33:45 +00:00
Eden Chuang 86a73dc9a7 Bug 1631618 - Make SharedWorkerService be alive until shutdown r=dom-workers-and-storage-reviewers,asuth
Using StaticRefPtr instead of a raw pointer for sSharedWorkerService in SharedWorkerService.cpp, and keeping sSharedWorkerService be alive until shutdown by registering sSharedWorkerService to ClearOnShutdown.

Since sSharedWorkerService is not raw pointer anymore, SharedWorkerService needs not to inherit from SupportsCheckedUnsafePtr<CheckIf<DiagnosticAssertEnabled>>

Differential Revision: https://phabricator.services.mozilla.com/D72379
2020-05-15 13:49:39 +00:00
Botond Ballo 9193635dca Bug 1638458 - Do not use ignoreRootScrollFrame when dispatching a contextmenu event in APZEventState. r=tnikkel
The patch also removes the ignoreRootScrollFrame option from
APZCCallbackHelper::DispatchMouseEvent() altogether as it is
no longer used.

Depends on D75735

Differential Revision: https://phabricator.services.mozilla.com/D75736
2020-05-18 03:07:12 +00:00
Botond Ballo ba458447b3 Bug 1638458 - Remove the ignoreRootScrollFrame parameter of FrameLoader.sendCrossProcessMouseEvent(). r=tnikkel
No one is setting this parameter to true any more.

Depends on D75734

Differential Revision: https://phabricator.services.mozilla.com/D75735
2020-05-18 03:05:32 +00:00
Emilio Cobos Álvarez a0a895f5d1 Bug 1638677 - Remove some minor dead code in Document::QueryCommandState. r=masayuki
Local compiler warns about the return being unreached. Remove one of the
two copy-pasta links.

Differential Revision: https://phabricator.services.mozilla.com/D75708
2020-05-17 23:52:05 +00:00
Gijs Kruitbosch 72186b2199 Bug 1638092 - do not require a browsingcontext to call the external protocol service's loadURI method, r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D75543
2020-05-17 22:54:30 +00:00
Brindusan Cristian 09b8072a54 Bug 1637715 - Disable test_upgrade_add_index.html for frequent failures on Linux and Windows. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D75667
2020-05-16 09:51:08 +00:00
Nicklas Boman 4f2fa0cfa7 Bug 1515419 - fixing ToNewCString (and ToNewUnicode as well) xpcom/string/nsReadableUtils.cpp r=froydnj,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D17411
2020-05-17 06:58:48 +00:00
Cosmin Sabou b93117dadd Bug 1614436 - Disable browser_ConsoleStorageAPITests.js on linux asan for frequent failures. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D75686
2020-05-16 20:24:47 +00:00
alwu e55212e5f4 Bug 1612557 - part5 : use `MediaSampleMarkerPayload` in VideoSink. r=jolin
This patch will do :
- use `MediaSampleMarkerPayload` to replace `VideoFrameMarkerPayload`

The advantage of doing so :
- after finishing a support for `MediaSampleMarkerPayload` in profiler front-end side, we can show the sample's start and end time when hovering on the marker icon.

Differential Revision: https://phabricator.services.mozilla.com/D75469
2020-05-15 23:51:14 +00:00
alwu fd606724bc Bug 1612557 - part4 : use `Media` category for markers r=bryce,gerald,canaltinova
This patch will do :
- add `Media` markers in related codes
- implement `MediaSampleMarkerPayload` to record the media sample

The advantage of doing so :
- using markers can help us know what happens on the media by a glance without expanding the call stack
- adding sample markers allows us compare the speed of decoding sample in `MediaDecoderStataMachine` and rendering sample in `VideoSink`

Differential Revision: https://phabricator.services.mozilla.com/D74174
2020-05-16 19:58:25 +00:00
alwu 0bccc7a4cf Bug 1612557 - part2 : create a sub-category 'Cubeb'. r=padenot
This patch will do :
- create a sub-category `Cubeb`
- add  `Cubeb` profiling labels in related codes

The advantage of doing so :
- allow us to know the percentage of time respectively we spend on cubeb and non-cubeb codes

More details :
The profiling code would include `<atomic>` which is C++ only, so I can't use the label in `cubeb.c` directly. Instead, I add labels on the `AudioStream` and `AudioCallbackDriver` where we would call cubeb related methods.

Differential Revision: https://phabricator.services.mozilla.com/D74172
2020-05-11 14:08:10 +00:00
alwu 8dda6be6ef Bug 1612557 - part1 : create a profiling category `Media`. r=bryce,gerald
This patch will do :
- create a profiling category `Media`
- add  `Media` profiling labels in related codes

The advantage of doing so :
- allow us to easily see what operations are related to media playback from the profiled report

More details :
According to the description in the `ProfilingCategory.h`, `topmost profiler label frame in the label stack determines the category pair of that stack`. Therefore, most labels I added are the first task would run on the thread, in order to ensure all its following tasks can be marked as the media playback label as well.

Differential Revision: https://phabricator.services.mozilla.com/D74171
2020-05-12 17:35:19 +00:00
Emilio Cobos Álvarez 74f2dc7de8 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-16 18:03:54 +00:00
David Teller a0afcb3d4b Bug 1638138 - Restoring missing thread names in requestProcInfo;r=tarek
ChromeUtils::requestProcInfo was dropping thread names for the process process. This patch restores them and tests that at least *one* thread is named. Unfortunately, at the time of this writing, we cannot assume that *all*
threads are named. Investigation pending.

Differential Revision: https://phabricator.services.mozilla.com/D75420
2020-05-15 20:19:25 +00:00
Narcis Beleuzu 0c898075c2 Bug 1604538 - Disable browser_destroy_callbacks.js on OSX. r=egao
Differential Revision: https://phabricator.services.mozilla.com/D75663
2020-05-16 07:18:15 +00:00
alwu 386dc9b342 Bug 1627999 - part9 : handle the owner browsing context change for the media element. r=chunmin
This patch will do :
- update the media status when media changes its owner browsing context

The advantage of doing so :
- make the media status in `ContextMediaInfo` correcly

More details :
`ContextMediaInfo` stores the media status of each browsing context, but actually the media doesn't always need to stay in one browsing context. We can move it to other browsing contexts (iframe) by appending it to other browsing context's document body.
For example, in [1], we move the video from the main frame to another iframe.

Therefore, when we move the media to a new browsing context, we should also update its media status (controlledMedia/playing/audio number) for its previous owner browsing context.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html

Differential Revision: https://phabricator.services.mozilla.com/D75477
2020-05-16 00:26:20 +00:00
alwu 3c416fbc0a Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-15 21:50:10 +00:00
alwu eac28634c9 Bug 1627999 - part7 : add test. r=bryce
This patch will do :
- add test cases
- introduce the test-only notification `media-displayed-metadata-changed` when the event source updates its metadata

The advantage of doing so :
- increase test coverage

Differential Revision: https://phabricator.services.mozilla.com/D72501
2020-05-15 21:50:12 +00:00
alwu fa7fe1ff9d Bug 1627999 - part6 : modify 'test_trigger_actionhanlder.html'. r=bryce
This patch will do :
- play media from different frame, rather than alway playing media from the main frame

The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus

Differential Revision: https://phabricator.services.mozilla.com/D72500
2020-05-15 21:49:54 +00:00
alwu b37d0955bb Bug 1627999 - part5 : remove out-of-date test. r=bryce
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session

The advantage of doing so :
- prevent the failure causing by out-of-date test

Differential Revision: https://phabricator.services.mozilla.com/D72499
2020-05-15 21:49:56 +00:00
alwu b80c125661 Bug 1627999 - part4 : listen to the playback change from the event source. r=bryce
This patch will do :
- listen to the playback change from the event source directly

The advantage of doing so :
- more close to the real situation because the event source is where we decide the information that should be displayed the virtual control interface

Differential Revision: https://phabricator.services.mozilla.com/D72498
2020-05-15 21:49:58 +00:00
alwu 45e722d39f Bug 1627999 - part3 : activate controller when it first time becomes audible. r=bryce
This patch will do :
- postpone the timing of activating the media controller. Activate the controller after it first time becomes audible.

The advantage of doing so :
- prevent setting incorrect media metadata before the controller becomes audible

---

More details about this change :

The active media session would be chose after the context owns the audio focus. Therefore, if we would like to get the correct metadata from the media session, we should postpone the timimg of activate controller and wait until we decide the active media session then we can get the correct metadata.

Differential Revision: https://phabricator.services.mozilla.com/D72497
2020-05-15 21:50:01 +00:00
alwu 1c063b25ca Bug 1627999 - part2 : update the active media session when the owner of the audio focus changes. r=bryce
This patch will do :
- using the audio focus to decide which media session is the active media session. That is a recommend way of the spec [1].

The advantage of doing so :
- prevent to routing media control keys to incorrect media session
- prevent showing the incorrect metadata on the virtual control interface

[1] https://w3c.github.io/mediasession/#active-media-session

Differential Revision: https://phabricator.services.mozilla.com/D72496
2020-05-15 21:50:03 +00:00
alwu 7316002adb Bug 1627999 - part1 : manage the audio focus in `MediaPlaybackStatus` r=bryce
This patch will do :
- introduce a concept `audio focus` among different contexts within a tab
- determine the audio focus owner when the context becomes audible or the owner destroys

The advantage of doing so :
- the audio focus helps us to decide the active media session that would be implemented in the following part

More details:
When there are serveral contexts playing at the same time within a tab, we would like to determine an audible context from them to represent the tab, and that is the `audio focus` we mean in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D72495
2020-05-15 21:50:05 +00:00
Jeff Gilbert 13e67cc06b Bug 1638163 - Reduce unnecessary GeckoContentController.h includes. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75433
2020-05-15 21:20:48 +00:00
alwu be6b3fe17f Bug 1597450 - part2 : check autoplay permission via the top-level window context. r=bryce
This patch will do :
- replace the usage of `nsIDocShellTreeItem` with accessing the permission stored in the `WindowContext`

The advantage of doing so :
- determine the correct result for the blocking autoplay because `nsIDocShellTreeItem` is not always possible to be accessed after we enable Fission

More details :
When determining the result of the blocking autoplay, we would always check if the page is in user customized whitelist or blacklist in which we store sites domain, and the domain we check is always the top level window's domain.

For example, a page (foo.com) has an iframe (bar.com), and we allow `foo.com` to autoplay. Then, if the iframe `bar.com` wants to  autoplay from this page, we would also allow it because the main page is `foo.com`.

However, the current way of checking `nsIDocShellTreeItem` is not Fission compatible, because you can't access `nsIDocShellTreeItem` in the different process if the iframe is cross-origin. Therefore, we should remove its usage.

Differential Revision: https://phabricator.services.mozilla.com/D74512
2020-05-13 21:20:58 +00:00
alwu f9e89ee7ae Bug 1597450 - part1 : store autoplay permission on the WindowContext. r=nika
This patch will do :
- create a sync field `AutoplayPermission` on WindowContext
- update the field whenever site's the autoplay permission changes

The advantage of doing so :
- to help determine the result of the blocking autoplay correctly.

More details :
As the field would be automatically synced between processes, then we can know the correct site's autoplay permission for the whole page even if we're in the different process if the iframe is in different origin after we enable Fission.

Differential Revision: https://phabricator.services.mozilla.com/D74511
2020-05-15 21:18:07 +00:00
Csoregi Natalia 4302fa80f7 Backed out changeset a8850a0ffab1 (bug 1638127) for failures on test_focusrings.xhtml. CLOSED TREE 2020-05-16 00:44:59 +03:00
Csoregi Natalia b6df18cc7a Backed out 9 changesets (bug 1627999) for bustages on HTMLMediaElement.cpp. CLOSED TREE
Backed out changeset 05ba58699a1b (bug 1627999)
Backed out changeset b9025bab4036 (bug 1627999)
Backed out changeset 2e1c8f9e8f88 (bug 1627999)
Backed out changeset 55ac831f54f3 (bug 1627999)
Backed out changeset e0fa806a6942 (bug 1627999)
Backed out changeset f4d85f0b61d9 (bug 1627999)
Backed out changeset 84434656006c (bug 1627999)
Backed out changeset 021c014ba882 (bug 1627999)
Backed out changeset 76c6b64928e9 (bug 1627999)
2020-05-16 00:22:23 +03:00
alwu e71fdbe9e6 Bug 1627999 - part9 : handle the owner browsing context change for the media element. r=chunmin
This patch will do :
- update the media status when media changes its owner browsing context

The advantage of doing so :
- make the media status in `ContextMediaInfo` correcly

More details :
`ContextMediaInfo` stores the media status of each browsing context, but actually the media doesn't always need to stay in one browsing context. We can move it to other browsing contexts (iframe) by appending it to other browsing context's document body.
For example, in [1], we move the video from the main frame to another iframe.

Therefore, when we move the media to a new browsing context, we should also update its media status (controlledMedia/playing/audio number) for its previous owner browsing context.

[1] https://searchfox.org/mozilla-central/source/testing/web-platform/tests/html/semantics/embedded-content/media-elements/playing-the-media-resource/pause-move-to-other-document.html

Differential Revision: https://phabricator.services.mozilla.com/D75477
2020-05-15 21:00:45 +00:00
alwu 8c97b84395 Bug 1627999 - part8 : remove audible check in media element. r=bryce
This patch will do :
- remove audible check from the logic of registering controller
- include audio channel affect on the media element's audible state

The advantage of doing so :
- it can help to reduce the intermittent failure during testing by earlier hooking media elements in the content process to the media controller in the chrome process

More details :
In D72497, we have added the audible check to postpone the activation of the media controller, which would ensure that we only control media after it become audible. Therefore, we can remove the previous implementation which we use to achieve that in media element.

When having that audible check in media element, it would postpone the timing of adding media element to `ContentMediaController` that causes some intermitent failures when I was writing test for bug1633565. When removing those checks, we can ensure that the media element would have always been added into `ContentMediaController` after calling `video.play()`. If the element haven't been added into `ContentMediaController`, then it would miss to handle the media key events when test generates a fake media key event, which causes an intermitent failure.

Differential Revision: https://phabricator.services.mozilla.com/D73335
2020-05-15 21:00:45 +00:00
alwu b476c3cdfd Bug 1627999 - part7 : add test. r=bryce
This patch will do :
- add test cases
- introduce the test-only notification `media-displayed-metadata-changed` when the event source updates its metadata

The advantage of doing so :
- increase test coverage

Differential Revision: https://phabricator.services.mozilla.com/D72501
2020-05-14 09:33:32 +00:00
alwu 973d534b7f Bug 1627999 - part6 : modify 'test_trigger_actionhanlder.html'. r=bryce
This patch will do :
- play media from different frame, rather than alway playing media from the main frame

The advantage of doing so :
- to make the media session in child frame become the active media session because that can only be the context with the audio focus

Differential Revision: https://phabricator.services.mozilla.com/D72500
2020-05-14 09:33:35 +00:00
alwu 129153228a Bug 1627999 - part5 : remove out-of-date test. r=bryce
This patch will do :
- remove out-of-date test that uses the previous implementation of determining the active media session

The advantage of doing so :
- prevent the failure causing by out-of-date test

Differential Revision: https://phabricator.services.mozilla.com/D72499
2020-05-14 09:33:37 +00:00
alwu fb72912836 Bug 1627999 - part4 : listen to the playback change from the event source. r=bryce
This patch will do :
- listen to the playback change from the event source directly

The advantage of doing so :
- more close to the real situation because the event source is where we decide the information that should be displayed the virtual control interface

Differential Revision: https://phabricator.services.mozilla.com/D72498
2020-05-14 09:33:39 +00:00
alwu 96b2a42335 Bug 1627999 - part3 : activate controller when it first time becomes audible. r=bryce
This patch will do :
- postpone the timing of activating the media controller. Activate the controller after it first time becomes audible.

The advantage of doing so :
- prevent setting incorrect media metadata before the controller becomes audible

---

More details about this change :

The active media session would be chose after the context owns the audio focus. Therefore, if we would like to get the correct metadata from the media session, we should postpone the timimg of activate controller and wait until we decide the active media session then we can get the correct metadata.

Differential Revision: https://phabricator.services.mozilla.com/D72497
2020-05-14 09:33:42 +00:00
alwu 93c8fed2d1 Bug 1627999 - part2 : update the active media session when the owner of the audio focus changes. r=bryce
This patch will do :
- using the audio focus to decide which media session is the active media session. That is a recommend way of the spec [1].

The advantage of doing so :
- prevent to routing media control keys to incorrect media session
- prevent showing the incorrect metadata on the virtual control interface

[1] https://w3c.github.io/mediasession/#active-media-session

Differential Revision: https://phabricator.services.mozilla.com/D72496
2020-05-14 09:33:44 +00:00
alwu 88d192705c Bug 1627999 - part1 : manage the audio focus in `MediaPlaybackStatus` r=bryce
This patch will do :
- introduce a concept `audio focus` among different contexts within a tab
- determine the audio focus owner when the context becomes audible or the owner destroys

The advantage of doing so :
- the audio focus helps us to decide the active media session that would be implemented in the following part

More details:
When there are serveral contexts playing at the same time within a tab, we would like to determine an audible context from them to represent the tab, and that is the `audio focus` we mean in this bug.

Differential Revision: https://phabricator.services.mozilla.com/D72495
2020-05-14 09:33:47 +00:00
Csoregi Natalia 29948708ee Backed out changeset cec3221b9268 (bug 1638163) for causing bustages on APZCTreeManagerChild.cpp. CLOSED TREE 2020-05-15 23:28:13 +03:00
Tom Schuster a5a57442ed Bug 1636590 - Expose isPromiseRejection on nsIScriptError. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D74549
2020-05-15 20:18:34 +00:00
Tom Schuster 16d853c816 Bug 1636590 - Provide an exception stack for uncaught promises rejections. r=baku
This will improve error message information when the rejection value is not an erorr object.

Differential Revision: https://phabricator.services.mozilla.com/D74479
2020-05-15 20:11:30 +00:00
Emilio Cobos Álvarez f1b1884de4 Bug 1638127 - Remove nsGlobalWindowInner::mShowFocusRingForContent. r=edgar
Instead move the check to the focus manager, more similar to how
focus-visible works.

Now nsGlobalWindowInner::ShouldShowFocusRing means "Should we show focus
ring for anything in this window", that is: Have we keyboard-navigated
in this window, or do we have a pref that says that we should always
show focus rings.

Fix some callers appropriately (some of them that were not properly
accounting for the element being focused in the first place...).

Differential Revision: https://phabricator.services.mozilla.com/D75504
2020-05-15 20:12:14 +00:00
Andrea Marchesini d3645b765f Bug 1637857 - URLSearchParams serialized for XHR in workers, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D74712
2020-05-15 20:04:54 +00:00
Jeff Gilbert 617cc85ba0 Bug 1638163 - Reduce unnecessary GeckoContentController.h includes. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D75433
2020-05-15 19:25:44 +00:00
Emilio Cobos Álvarez ab92960118 Bug 1638127 - Minor cleanup around nsWindowRoot. r=edgar
Depends on D75501

Differential Revision: https://phabricator.services.mozilla.com/D75502
2020-05-15 19:04:42 +00:00
Aaron Klotz 7a8903706b Bug 1637452: Part 17 - Fix JNI includes in dom; r=nika
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75380
2020-05-15 17:06:28 +00:00
Aaron Klotz b66ad1f151 Bug 1637452: Part 15 - Fix JNI includes in dom/webauthn; r=keeler,jcj
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75378
2020-05-15 17:06:07 +00:00
Aaron Klotz 0894f56add Bug 1637452: Part 11 - Fix JNI includes in dom/media; r=jya
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75374
2020-05-15 17:05:12 +00:00
Aaron Klotz be11f78f6a Bug 1637452: Part 10 - Fix JNI includes in dom/ipc; r=nika
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75373
2020-05-15 17:04:44 +00:00
Razvan Maries 481517ce87 Backed out 2 changesets (bug 1558394) for perma failures on iframe_sandbox_anchor_download_block_downloads.sub.tentative.html. CLOSED TREE
Backed out changeset 79046ff8143b (bug 1558394)
Backed out changeset e13ede3c68d4 (bug 1558394)
2020-05-15 19:18:34 +03:00
Dan Minor 746e5a3557 Bug 1632489 - Negotiate repaired-rtp-stream-id in simulcast mochitests; r=ng
Differential Revision: https://phabricator.services.mozilla.com/D74841
2020-05-15 12:11:41 +00:00
Sebastian Streich 6733f1311c Bug 1558394 - Block downloads in sandboxed iframes r=ckerschb,smaug
Differential Revision: https://phabricator.services.mozilla.com/D67351
2020-05-15 14:03:43 +00:00
Sebastian Streich bb0855332f Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-05-15 14:03:28 +00:00
Razvan Maries e744ca1ac5 Backed out changeset ccd3a06efe81 (bug 1638138) for perma failures on browser_test_procinfo.js. CLOSED TREE 2020-05-15 17:48:53 +03:00
Byron Campen [:bwc] 3110119ac1 Bug 1636615: Work around Apple VT decoder saying it dropped a frame, and then decoding that frame anyway. r=jya
We do this by keeping the unexpected frame in mReorderQueue, and outputting it later when the caller is expecting frames.

Differential Revision: https://phabricator.services.mozilla.com/D75116
2020-05-14 23:45:26 +00:00
David Teller 62b04861d5 Bug 1638138 - Restoring missing thread names in requestProcInfo;r=tarek
ChromeUtils::requestProcInfo was dropping thread names for the process process. This patch restores them and tests that at least *one* thread is named. Unfortunately, at the time of this writing, we cannot assume that *all*
threads are named. Investigation pending.

Differential Revision: https://phabricator.services.mozilla.com/D75420
2020-05-15 10:41:29 +00:00
Andreea Pavel 9257ea9bef Backed out 2 changesets (bug 1594752) for causing bug 1638148 on a CLOSED TREE
Backed out changeset 66cc44b67170 (bug 1594752)
Backed out changeset e781cf38f088 (bug 1594752)
2020-05-15 13:47:49 +03:00
Karl Tomlinson dc85ea650c Bug 1625372 permit ForceShutDown() on a realtime graph r=padenot
Depends on D74812

Differential Revision: https://phabricator.services.mozilla.com/D74813
2020-05-15 08:22:31 +00:00
Karl Tomlinson e8ab6c7193 Bug 1625372 remove unnecessary DestroyNonRealtimeInstance() call from AudioDestinationNode::DestroyMediaTrack() r=padenot
DestroyMediaTrack() is called only on Unlink or destruction of the AudioDestinationNode.
If there are no references to the AudioDestinationNode, then the graph's last stream
will be destroyed and the graph will shut down itself.

Differential Revision: https://phabricator.services.mozilla.com/D74812
2020-05-13 10:13:19 +00:00
Karl Tomlinson 0a1151e126 Bug 1625372 request interrupt of AudioWorklet JS on force shutdown r=padenot
Differential Revision: https://phabricator.services.mozilla.com/D71915
2020-05-15 08:24:06 +00:00
alwu 3581879481 Bug 1509933 - part3 : use the new pref in tests. r=padenot
This patch will do :
- replace the old pref with the new pref

The advantage of doing so :
- to ensure those tests can still use the correct blocking autoplay policy

Differential Revision: https://phabricator.services.mozilla.com/D73973
2020-05-15 02:51:18 +00:00
alwu f986ca0c1f Bug 1509933 - part1 : add new pref 'media.autoplay.blocking_policy'. r=geckoview-reviewers,snorp,padenot
This patch will do :
- rename the old pref `media.autoplay.enabled.user-gestures-needed` to  the new pref `media.autoplay.blocking_policy`
- modify the value of the pref to `int` in order to introduce new policy
- implement new policy in `AutoplayPoliocy`

The advantage of doing so :
- rename the pref to explicitly indicate that it's related the block policy we use
- use the transient user gesture activation as a new policy to replace the old one using the user input, which doesn't work on the async handler

More details :
The old `click-to-play` policy we use is using the user input to determine if the play invocation is called by users or by scripts. But `UserActivation::IsHandlingUserInput()` is buggy which would fail when you call `video.play()` inside an async event handler. So we would like to replace it with the new transient user activation, which would treat the action as an user input if the action is performed within a certain period of time after a user interacts (eg. click) with the page.

[1] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation

Differential Revision: https://phabricator.services.mozilla.com/D73971
2020-05-15 03:40:31 +00:00
Emily McDonough c161bb67d3 Bug 1564128 part 2 - Copy animations to static document clones r=emilio,hiro
This also requires changing the EffectCompositor to allow animations in print
and print preview, and setting up a document timeline for the cloned document

Differential Revision: https://phabricator.services.mozilla.com/D69069
2020-05-14 19:41:03 +00:00
Emily McDonough fe1836fe09 Bug 1564128 part 1 - Add clone function for Animation and constructor for KeyframeEffect to copy properties but not the target. r=hiro
This is needed for copying animations from an original document to a static
clone during printing/print preview.

Differential Revision: https://phabricator.services.mozilla.com/D73139
2020-05-14 19:41:01 +00:00
Dorel Luca fc22d41aeb Backed out changeset 9bedd57840ed (bug 1637085) for WPT failures. CLOSED TREE 2020-05-15 05:37:57 +03:00
Dorel Luca 68c900462b Backed out 3 changesets (bug 1509933) for Linting failure in gecko/mobile/android/app/mobile.js. CLOSED TREE
Backed out changeset c15ecdcd5d13 (bug 1509933)
Backed out changeset 951ea1d0f42a (bug 1509933)
Backed out changeset 3abb24d6dfc9 (bug 1509933)
2020-05-15 05:02:07 +03:00
Nico Grunbaum 3ad9a07524 Bug 1279153 - Add support for rtcp-rsize;r=bwc,dminor
Differential Revision: https://phabricator.services.mozilla.com/D72807
2020-05-15 01:54:34 +00:00
alwu 1c6be41aa9 Bug 1509933 - part3 : use the new pref in tests. r=padenot
This patch will do :
- replace the old pref with the new pref

The advantage of doing so :
- to ensure those tests can still use the correct blocking autoplay policy

Differential Revision: https://phabricator.services.mozilla.com/D73973
2020-05-07 13:05:22 +00:00
alwu 8ed9cb7dbc Bug 1509933 - part1 : add new pref 'media.autoplay.blocking_policy'. r=geckoview-reviewers,snorp,padenot
This patch will do :
- rename the old pref `media.autoplay.enabled.user-gestures-needed` to  the new pref `media.autoplay.blocking_policy`
- modify the value of the pref to `int` in order to introduce new policy
- implement new policy in `AutoplayPoliocy`

The advantage of doing so :
- rename the pref to explicitly indicate that it's related the block policy we use
- use the transient user gesture activation as a new policy to replace the old one using the user input, which doesn't work on the async handler

More details :
The old `click-to-play` policy we use is using the user input to determine if the play invocation is called by users or by scripts. But `UserActivation::IsHandlingUserInput()` is buggy which would fail when you call `video.play()` inside an async event handler. So we would like to replace it with the new transient user activation, which would treat the action as an user input if the action is performed within a certain period of time after a user interacts (eg. click) with the page.

[1] https://html.spec.whatwg.org/multipage/interaction.html#transient-activation

Differential Revision: https://phabricator.services.mozilla.com/D73971
2020-05-15 01:39:31 +00:00
John Lin 96743256a1 Bug 1630106 - limit the max queue size for prerolling. r=bryce
Without limitation, when playing at fast rate the prerolling state could
prevent playback from starting before the codec exhausts all buffers. Set
a cap value so the state machine can exit prerolling state before queuing
too many buffers.

Differential Revision: https://phabricator.services.mozilla.com/D75174
2020-05-14 22:56:14 +00:00
Sebastian Streich 1ec5974790 Bug 1636148 - "BandAid" - Cast Remaining Callers To BasePrincipal r=ckerschb,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D74248
2020-05-14 19:42:57 +00:00
Imanol Fernandez bbbf079a0d Bug 1638123 - Call WebGLContext::ClearVRFrame when ending WebXR session. r=jgilbert,kip,daoshengmu
In WebVR we call WebGLContext::ClearVRFrame when the presentation ends. We didn't have the equivalent call in WebXR. It helps to reduce memory usage earlier when exiting WebXR and reduces potential deadlocks if the ExternalVR client didn't call SurfaceTexture->ReleaseTexImage() correctly.

Differential Revision: https://phabricator.services.mozilla.com/D75417
2020-05-14 23:05:48 +00:00
Karl Tomlinson a9ed249e9d Bug 1637837 adjust assert so as not to read mForceShutDown until it is known set r=padenot
mForceShutDown is set on the graph thread and so can be safely read
once the graph has handed control to the main thread.

Differential Revision: https://phabricator.services.mozilla.com/D75239
2020-05-14 18:14:35 +00:00
Karl Tomlinson edd2019f42 Bug 1637159 rename BindToOwnerInternal() to BindToOwner() r=smaug
This method can be and is used by derived classes as well as DOMEventTargetHelper
itself, so it does not need to be "Internal".

Differential Revision: https://phabricator.services.mozilla.com/D75246
2020-05-14 19:51:55 +00:00
Karl Tomlinson 57c91c20a0 Bug 1637159 remove unused unbind code from BindToOwnerInternal() r=smaug
Depends on D75042

Differential Revision: https://phabricator.services.mozilla.com/D75043
2020-05-14 19:51:55 +00:00
Karl Tomlinson 62c2076a1b Bug 1637159 remove now-unused public DOMEventTargetHelper::BindToOwner() rebind methods r=smaug
The virtual is no longer required since
https://hg.mozilla.org/mozilla-central/rev/a01586b62cf5#l1.92

Differential Revision: https://phabricator.services.mozilla.com/D75042
2020-05-14 05:29:49 +00:00
Karl Tomlinson b33bcd4e3b Bug 1637159 use BindToOwnerInternal() from WorkerGlobalScopeBase r=smaug
WorkerGlobalScopeBase has no override for `BindToOwner()`, so there is no need
for the virtual call.

The DOMEventTargetHelper(nsIGlobalObject*) constructor is not suitable here
because the nsIGlobalObject would not have been constructed when the
DOMEventTargetHelper constructor would need it.

Depends on D75037

Differential Revision: https://phabricator.services.mozilla.com/D75039
2020-05-14 05:29:49 +00:00
Kris Maglione 710c64adb4 Bug 1637085: Use AsyncShutdown for ContentParent shutdown. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D74746
2020-05-13 16:38:11 +00:00
Denis Palmeiro c626a5ea13 Bug 1637886 - Check for valid JSScript* before getting private value r=smaug
Missing check to see if the JSScript coming from exec.GetScript() is valid.

Differential Revision: https://phabricator.services.mozilla.com/D75320
2020-05-14 17:22:52 +00:00
Emilio Cobos Álvarez b9c1bf761c Bug 312971 - Unprefix -moz-read-write / -moz-read-only. r=edgar
And remove some duplicated tests from WPT.

Differential Revision: https://phabricator.services.mozilla.com/D75231
2020-05-14 16:46:08 +00:00
Zibi Braniecki 749612612f Bug 1629291 - Don't set l10n as cached if there was any error during initial translation. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D74818
2020-05-14 16:56:57 +00:00
Bogdan Tara dc69f70165 Backed out 2 changesets (bug 1624802) for test_listOrigins.js failures CLOSED TREE
Backed out changeset e374ffe2e05e (bug 1624802)
Backed out changeset 8e2da4b3c32b (bug 1624802)
2020-05-14 19:56:00 +03:00
Alex Chronopoulos 9cce351cdc Bug 1596528 - Get the statistics under the same mutex to avoid inconsistency. r=padenot
Get all the statistics in one call, under the same mutex, and extract from them the decoded and total frames. The individual getters were previously used, created uncertainty since they lock the mutex separately.

Differential Revision: https://phabricator.services.mozilla.com/D75096
2020-05-14 16:36:19 +00:00
Jan Varga 17f553f88d Bug 1624802 - Run some dom/quota xpcshell tests in a child process as well; r=dom-workers-and-storage-reviewers,sg
For now, only test_listOrigins.js, test_originWithCaret.js and test_simpledb.js
can run in a child process because they don't need to set preferences or access
files in the profile directory.
We will be able to run more tests in a child process once we have SpecialPowers
for xpcshell implemented using JSProcessActors and when we expose the base
directory used by QuotaManager through a new QuotaManagerService method (to
avoid getting the profile directory using nsIDirectoryService because that
doesn't work in a child process).

Differential Revision: https://phabricator.services.mozilla.com/D75281
2020-05-14 15:35:29 +00:00