Commit Graph

49514 Commits

Author SHA1 Message Date
Polly Shaw
226a5beff6 Bug 356831 - Proxy autodiscovery doesn't check DHCP (option 252) r=bagder,valentin
This patch addresses an issue with Firefox's proxy detection on networks which
do not have their a proxy auto-configuration (PAC) file hosted at
http://wpad/wpad.dat, and instead make use of DHCP option 252 for broadcasting
the address of the PAC file. See https://findproxyforurl.com/wpad-introduction/
for an introduction to the protocol.

Prior to this patch, proxy auto-detect missed out the DHCP query stage, and just
 looked for a PAC file at http://wpad/wpad.dat


This patch only addresses the issue for Firefox on Windows, although it defines a
DHCP client interface which could be implemented on other platforms.

The high-level components of this patch are:
 * nsIDHCPClient.idl - this is an interface which has been defined for querying the
   DHCP server.
 * nsPACMan.cpp - where previously when the PAC URL was simply set to a constant of
   http://wpad/wpad.dat, it now dispatches an asynchronous command to the proxy
   thread. The class ExecutePACThreadAction has been augmented to include an
   instruction to 'ConfigureWPAD' (Configure Web-proxy auto-detect), and a new class,
   'ConfigureWPADComplete' has been created to relay the result (the URL of the PAC
   file) back to the nsPACMan object.
 * nsProtocolProxyService.cpp
   Minor changes to reflect the fact that the PAC URL not being set does not always
   mean there is no PAC to be used; instead it could be in the process of being
   detected.
 * TestPACMan.cpp
   This is a new file, and tests only the DHCP auto-detect functionality.
   Some tests use multiple threads, as they test the non-blocking proxy detection.
 * DHCPUtils.cpp
   A class containing the main logic for querying DHCP.
 * WindowsNetworkFunctionsWrapper.cpp
   A very thin wrapper around the Windows API calls needed by DHCPUtils.
   This class was introduced so it could be mocked out in tests.
 * nsWindowsDHCPClient.cpp
 * An implementation of the interface defined in nsIDHCPClient.idl. Fairly thin:
   most logic is implemented in DHCPUtils.
 * TestDHCPUtils.cpp
   Tests for DHCPUtils and nsWindowsDHCPClient

MozReview-Commit-ID: 4xFQz3tOLEx

--HG--
extra : rebase_source : dfd5c588406a8b0d92f91cc8a0038ca722b7140a
2018-06-07 23:07:28 +01:00
Chris Pearce
5d98d9108c Bug 1471485 - Hide autoplay permission doorhanger if user plays video. r=johannh
If we're showing a permission UI prompt for "autoplay-media", the user can
still actually play media without interacting with the doorhanger; if they
click a "play" button in the document, they'll "gesture activate" the document
and unblock autoplay and be able to start playback.

It doesn't make sense to keep showing the permission doorhanger to approve
autoplay when the page is already playing, as playback has already started, and
if they clicked on "block" then the site would receive a promise reject on the
promise returned on the first call to HTMLMediaElement.play() for which we were
showing the permission prompt for, even though the media is actually playing.
This will likely confuse JS video players.

So we should hide the permission prompt when playback in the page starts.

MozReview-Commit-ID: 1XU47AfT6vf

--HG--
extra : rebase_source : 3d5c164527e26ba8f58f0baac3474d5b2d7fb587
2018-07-03 11:17:16 +12:00
Ciure Andrei
14976cd6b3 Merge inbound to mozilla-central. a=merge 2018-07-15 12:52:50 +03:00
Csoregi Natalia
b220f0c0d3 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-14 12:45:25 +03:00
Olli Pettay
5adedd4945 Bug 1439153 - try to fix ESlint failures, CLOSED TREE, r=bustage 2018-07-14 06:13:08 +03:00
Olli Pettay
de99e4460b Bug 1439153 - Make WebExtensions work with Shadow DOM/WebComponents, r=kmag
--HG--
extra : rebase_source : 83638cba42eea1523d32d06a2eb14df20cbab404
2018-07-14 05:26:15 +03:00
Drew Willcoxon
cce37bd375 Bug 1475398 - Update "Firefox 63 uses schema version 52" comment in Database.cpp. r=mak
MozReview-Commit-ID: DAkHO1Hubb3

--HG--
extra : rebase_source : 9c5972cf9d15548766da1b6215af855e20ad66a5
2018-07-12 16:39:33 -07:00
Noemi Erli
e9d21cd259 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-14 01:22:25 +03:00
Noemi Erli
9793ca2da4 Merge inbound to mozilla-central. a=merge 2018-07-14 00:52:51 +03:00
Brindusan Cristian
a68383b333 Backed out 12 changesets (bug 1471025) for build bustages on dom/ipc/ContentProcess.cpp. CLOSED TREE
Backed out changeset 398ccedc20dc (bug 1471025)
Backed out changeset 599895de063e (bug 1471025)
Backed out changeset dc7ec17179d1 (bug 1471025)
Backed out changeset 5051f15fc200 (bug 1471025)
Backed out changeset faef4df47b20 (bug 1471025)
Backed out changeset d344247b8706 (bug 1471025)
Backed out changeset 83d98ea5ebac (bug 1471025)
Backed out changeset 38f690f30e78 (bug 1471025)
Backed out changeset 4b7a8a35ed95 (bug 1471025)
Backed out changeset e3bbc87b71af (bug 1471025)
Backed out changeset 68bb03c63b3c (bug 1471025)
Backed out changeset 4a8fbb472c91 (bug 1471025)
2018-07-13 22:11:24 +03:00
Paolo Amadini
36a131aadc Bug 1472716 - Part 2 - Convert the listbox in "languages.xul" to "richlistbox". r=jaws,gandalf
Support for "listbox" in preferences is also removed, in preparation for the removal of the "listbox" element and binding.

MozReview-Commit-ID: Bi2VKKi5rdk

--HG--
extra : source : 762819bac1b9efe0e939be07394bd7d293638c40
2018-07-10 15:07:15 +01:00
Kris Maglione
0fb080d242 Bug 1471025: Part 8 - Add tests for shared memory preferences. r=njn
MozReview-Commit-ID: 8452JoTBHCU

--HG--
extra : rebase_source : dadc22ef0909102f93f6de3afb99f5b6e65db2f5
extra : absorb_source : 62a77303c36c3af308ee5529d81c637f81449370
2018-07-03 20:17:15 -07:00
Luca Greco
ede4ac5025 Bug 1474557 - Clear the dbPromise cached by ext-storage when IndexedDB raises an exception while opening the db. r=mixedpuppy
MozReview-Commit-ID: 9qsDYI0wgmI

--HG--
extra : rebase_source : f7ee4469841559d166f0b7c48b49a729ceabdec0
2018-07-02 21:37:58 +02:00
Luca Greco
f49ffe6940 Bug 1474557 - Prevent ExtensionStorageIDB and child/ext-storage from caching a stale or rejected selectBackend promise. r=mixedpuppy
MozReview-Commit-ID: Kgwtm7QXW9o

--HG--
extra : rebase_source : dc28d2f622876a359592d8e44a6cf449237acc30
2018-07-09 22:35:12 +02:00
Mike Conley
ff9485d612 Bug 1456843 - Compute FormLike elements lazily on <form>-less fields. r=MattN
MozReview-Commit-ID: 3blElMxkejf

--HG--
extra : rebase_source : 62a43ecb879bd033fb72436dc3a23d488cf32e52
2018-07-13 12:41:06 -04:00
ahillier
659bda3774 Bug 1475012 - fix ordering of getTopFrecentSites in ActivityStreamProvider r=ursula
MozReview-Commit-ID: Eymz3kAoHuX

--HG--
extra : rebase_source : af84f35c0674679b17a09eacca518cc62793a499
2018-07-11 12:26:39 -07:00
Mike de Boer
d3b8d2bdfe Bug 1463860 - Don't play a beep when the find string is not find when Whole Word matching is enabled; it simply beeps too much. r=Ehsan
MozReview-Commit-ID: S6dvbV5Q5d

--HG--
extra : rebase_source : 5852765bee02e4fae1370050db84b608dea3c0da
2018-07-13 13:25:02 +02:00
Lina Cambridge
699fdba348 Bug 1472963 - Add a totalSyncChanges counter and use it in the bookmarks mirror. r=mak
This patch:

* Exposes a global Sync change counter on `nsINavBookmarksService`.
  This is similar to SQLite's `total_changes()`, but just for changes
  to bookmarks that affect Sync, and accounts for changes from multiple
  threads and connections.
* Adds a SQL function to bump the counter, and extends the
  `moz_bookmarks` triggers to call it.
* Moves merging outside the transaction in the bookmarks mirror, and
  checks that the counters match before applying.

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

--HG--
extra : moz-landing-system : lando
2018-07-13 15:03:40 +00:00
Kris Maglione
6c6960d4c8 Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : rebase_source : c06aa38ff4bc2bdfa09a4aae359e1f418727ce29
extra : absorb_source : c68cd5f0e8f52980d35432cf21e1fc5552542bf2
2018-07-13 11:06:58 -07:00
Kris Maglione
de31493580 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : rebase_source : 28e8c6075bacf5f610058227a9731aeadb50f320
extra : absorb_source : f63602a163ed19fb65e26640319750fdd9b92ad1
2018-07-02 15:01:25 -07:00
Andrea Marchesini
eb58d7637b Bug 1475236 - Expiration time for the anti-tracking permission should be controllable via pref, r=ehsan 2018-07-13 19:19:26 +02:00
Andrea Marchesini
f1d9bed10f Bug 1473718 - Speculative connection should start using the correct OriginAttributes values, r=mconley 2018-07-13 19:17:58 +02:00
Andrea Marchesini
9fc78a12aa Bug 1475189 - Block storage access in tracking sub-resources when not in iframes - part 3 - image cache, r=ehsan
--HG--
rename : toolkit/components/antitracking/test/browser/script.sjs => toolkit/components/antitracking/test/browser/subResources.sjs
2018-07-13 12:02:19 +02:00
Andrea Marchesini
1892fdf469 Bug 1475189 - Block storage access in tracking sub-resources when not in iframes - part 2 - subresources, r=ehsan 2018-07-13 12:02:19 +02:00
Andrea Marchesini
2df3284f16 Bug 1475189 - Block storage access in tracking sub-resources when not in iframes - part 1 - tests, r=ehsan 2018-07-13 12:02:19 +02:00
Andrea Marchesini
1498612e1b Bug 1474812 - No needs to store granted storage access in nsILoadInfo and in the inner window, r=ehsan 2018-07-13 12:02:19 +02:00
Paolo Amadini
7555809ad6 Bug 1470870 - Load "menu.css" as a document stylesheet. r=bgrins
The specificity of some Windows rules is reduced to match other platforms.

MozReview-Commit-ID: 28oUf7b6vCW

--HG--
extra : source : 3c131dac495ed46d524f4de2f92cfe79049aff8f
extra : intermediate-source : 7c1de225e4ab5dff9443c763ad59f5aecd72a593
2018-07-13 10:20:21 +01:00
Margareta Eliza Balazs
448f792f96 Merge inbound to mozilla-central. a=merge 2018-07-13 11:52:00 +03:00
Francois Marier
3aa5d0aeda Bug 1362761 - Make WritePrefixes() more readable. r=dimi
Add assertions to highlight what the various data structures
should look like.

Also assert to ensure that mIndexPrefixes is always the same
length as mIndexDeltas and avoid writing the prefixes to disk
if that's not the case.

Do a single fallible allocation before we create the indexStarts
array instead of checking on each AppendElement() to simplify
the loop and emphasize the number of elements that the array
will receive (indexSize + 1). Remove the last element since we
don't actually end up writing it to disk.

MozReview-Commit-ID: HIg7ZmgaL7x

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

--HG--
extra : moz-landing-system : lando
2018-07-11 09:10:31 +00:00
Francois Marier
b81007a163 Bug 1362761 - Safer Clean() and IsEmpty() handling in PrefixSet. r=dimi
This simplifies the logic around clearing the prefix set and also adds
the clearing of the mIndexDeltasChecksum which should have been done
as part of 3a00711bb0e6.

Additionally, the checks for whether or not the prefix set is empty
include some sanity-checking asserts.

Finally, mTotalPrefixes could be out of sync with mIndexPrefixes
and mIndexDeltas if LoadPrefixes() or MakePrefixSet() fail so we
now only update it once all elements have been added successfully.

There is now a release assert to catch grossly out-of-sync (or
corrupt) values of mTotalPrefixes.

MozReview-Commit-ID: BSbyD2dGsUY

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

--HG--
extra : moz-landing-system : lando
2018-07-11 12:40:34 +00:00
Francois Marier
6d1a4291f4 Bug 1362761 - Add more specific warnings in case of file corruption. r=dimi
MozReview-Commit-ID: KsgcQWLGulH

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

--HG--
extra : moz-landing-system : lando
2018-07-11 08:58:15 +00:00
Francois Marier
3e4ea00c5f Bug 1362761 - Force file and streams to use smart pointers. r=dimi
MozReview-Commit-ID: GscB9PaaN02

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

--HG--
extra : moz-landing-system : lando
2018-07-12 22:19:40 +00:00
Francois Marier
53ee4cb546 Bug 1362761 - Make prefix and chunk sets as const as possible. r=dimi
MozReview-Commit-ID: JdnNOxnBAgC

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

--HG--
extra : moz-landing-system : lando
2018-07-11 12:52:37 +00:00
Marco Bonardo
d932936d53 Bug 1475276 - Remove some no more necessary usage of promiseItemGuid. r=lina
Some code is unnecessarily using promiseItemGuid

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

--HG--
extra : moz-landing-system : lando
2018-07-12 21:38:21 +00:00
Andreea Pavel
10f6df7c1f Merge mozilla-central to autoland. a=merge on a CLOSED TREE
--HG--
rename : dom/webidl/ScrollBoxObject.webidl => dom/chrome-webidl/XULScrollElement.webidl
rename : layout/xul/ScrollBoxObject.cpp => dom/xul/XULScrollElement.cpp
rename : layout/xul/ScrollBoxObject.h => dom/xul/XULScrollElement.h
2018-07-13 00:53:43 +03:00
Andreea Pavel
b0e30af17e Merge mozilla-inbound to mozilla-central. a=merge 2018-07-13 00:51:26 +03:00
Andreea Pavel
1e8d2e6f7d Backed out 7 changesets (bug 1420514) for breaking bc on different files on a CLOSED TREE
Backed out changeset 5a46a221b6e8 (bug 1420514)
Backed out changeset 48ed6dfe8772 (bug 1420514)
Backed out changeset 01bf643c77e5 (bug 1420514)
Backed out changeset 5791b17ccb82 (bug 1420514)
Backed out changeset 416e398d942f (bug 1420514)
Backed out changeset de4a4592dbd9 (bug 1420514)
Backed out changeset d3399edf0197 (bug 1420514)
2018-07-12 21:22:32 +03:00
Florian Quèze
c23f304b7f Bug 1474990 - Remove the 'Memory usage of Subprocesses' table from about:performance, r=mconley. 2018-07-12 20:01:23 +02:00
Mike Conley
c045933e61 Bug 1373408 - Make nsUpdateTimerManager notify callbacks on idle. r=rhelmer
MozReview-Commit-ID: INSvHMEXOxt

--HG--
extra : rebase_source : f91bc401f283b593d0c4bdf012923450676d7cbc
2018-07-12 14:38:38 -04:00
Emma Malysz
ce8c74748f Bug 1454358, removes unneccessary implementation of ScrollBoxObject rr?enndeakin+6102 r=bz,enndeakin+6102
MozReview-Commit-ID: LBQ0RoS0ZVc

--HG--
rename : dom/webidl/ScrollBoxObject.webidl => dom/chrome-webidl/XULScrollElement.webidl
rename : layout/xul/ScrollBoxObject.cpp => dom/xul/XULScrollElement.cpp
rename : layout/xul/ScrollBoxObject.h => dom/xul/XULScrollElement.h
extra : rebase_source : 6a0de76dfdacbc29d261a4aea703a44f87ad7e12
2018-06-25 10:11:31 -07:00
Chris Pearce
02f3883d8d Bug 1472580 - Test that starting play from tab audio indicator overrides block autoplay. r=mconley
MozReview-Commit-ID: 6RB09cd1PHP

--HG--
extra : rebase_source : f6a97dcdbc12cb53d58be6e7fe19de7825755425
2018-06-25 13:25:34 +12:00
Chris Pearce
063906e5bd Bug 1472580 - Gesture activate documents which are played via the tab audio indicator. r=mconley
(This patch was first presented for review in bug 1463919, I've split it off
into its own bug here).

If the user opens a tab in the background, and that tab tries to play media,
we'll delay playing that media until the tab is brought to the foreground.
But the user can explicitly start playback of such delayed media by clicking
the "play" icon we show in the tab indicator. Then if autoplay is disabled,
we'll block the play (unless the origin is whitelisted). This is bad, as the
user has clearly indicated intent to play media in this tab.

So this patch "gesture activates" the root content document when the tab audio
indicator play button is pressed. This means the block autoplay logic will
behave as if there's been a user gesture in the tab (mouse click or keypress),
and not block the play. Gesture activation state is per document, so it does
not persist across document loads.

MozReview-Commit-ID: 3pgrADRrJqt
***
fix

--HG--
extra : rebase_source : a099cd3eedf6785a7af0b95613c5bd210e791a53
2018-07-04 09:32:22 +12:00
Kris Maglione
84aacf4890 Bug 1470783: Migrate extensions framework to use sharedData for cross-process data. r=zombie
initialProcessData has the unfortunate side-effect of sending an entire copy
of all of its data to all content processes, and eagerly decoding it. For the
extension framework, this means that we wind up loading an entire copy of all
of our schema data, and of every extension's manifest and locale data, into
every process, even if we'll never need it.

The sharedData helper allows us to store an encoded copy of that data in a
shared memory region, and clone it into the current process only when we need
it, which can be a significant savings. For screenshots alone, it saves about
15K on locale and manifest data per content process, plus the size we save on
not copying schema data.

MozReview-Commit-ID: KkIOoLsBd99

--HG--
extra : rebase_source : 21cb433e8897a3d33943ebbd3d788d8d54e0844b
extra : source : 8074c985095c9951171311dac840684b915a57f6
2018-06-24 16:34:44 -07:00
Andreea Pavel
5754c092dc Backed out changeset c64603aec7e5 (bug 1469825) for breaking mochitest chrome at toolkit/content/tests/chrome/test_tree.xul on a CLOSED TREE 2018-07-13 06:10:19 +03:00
Mark Banner
5dd10a94cb Bug 1469825 - The tree component should only set the editing attribute after the input field is ready.
Summary: MozReview-Commit-ID: 1bQEn0yfg63

Reviewers: NeilDeakin

Reviewed By: NeilDeakin

Bug #: 1469825

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

--HG--
extra : rebase_source : 7168f7a3ba3dbf30de9c1e36e6499800e6d62b28
2018-07-13 05:04:45 +03:00
Mark Banner
601b9aaed9 Bug 1474637 - Make DownloadCore.jsm responsible for adding all downloads to history, rather than sharing with nsExternalHelperAppService. r=paolo
MozReview-Commit-ID: GRzLlDPPsCU

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

--HG--
extra : moz-landing-system : lando
2018-07-13 15:06:56 +00:00
Tarek Ziadé
a46c616883 Bug 1474844 - Filter out empty categories - r=baku
Filters out empty categories when ChromeUtils.requestPerformanceMetrics() is called.

This test also:

- adds more test coverage
- uses the worker windowId when it has no linked window.
- properly walk to the worker parent

MozReview-Commit-ID: 3UH9a0UtVmx

--HG--
extra : rebase_source : 337b95466c7e7a30f881e881358d3b8d290f8f5b
2018-07-13 11:57:59 +02:00
Dão Gottwald
bb4ce365a2 Bug 1471705 - Fix findbar status text color for lightweight themes. r=ntim
MozReview-Commit-ID: 7mta63GhgrW

--HG--
extra : rebase_source : 5735f2a0197ce5779e52a50c615ac201d4e8183b
2018-07-12 16:28:41 +02:00
Olli Pettay
2699d358da Bug 1475485, CLOSED TREE, add missing semicolon, r=bustage 2018-07-14 05:08:05 +03:00
Olli Pettay
6f378a4ffa Bug 1475485, @title tooltips should work also inside ShadowDOM, r=mrbkap 2018-07-14 04:48:19 +03:00