Commit Graph

604361 Commits

Author SHA1 Message Date
Andrei Lazar
65f0721e90 Bug 1450447 - Start using notification channels. r=jchen
Made all the notifications within the app to use notification channel for devices with API26 and higher.

MozReview-Commit-ID: CVmpitNsS66

--HG--
extra : amend_source : 6628a1e06975e23b7b38a43650df12c9835cb3ee
2018-07-06 17:57:22 +03:00
Petru Lingurar
ad67bdea7e Bug 1465323 - Update FxAccountUpgradeReceiver. r=JanH
Listening for `ACTION_MY_PACKAGE_REPLACED` [1] is the easiest way to get notified
when the app has been updated.
This broadcast, while not explicitly exempt from Oreo's Background Execution
Limits [2] is considered explicit because it is sent only to the package being
replaced and so it is compatible with the new limitations.

The previous intent action was chosen because at that time this action was not
supported by all platforms Fennec ran on [3], but this is not the case anymore.

[1] https://developer.android.com/reference/android/content/Intent.html#ACTION_MY_PACKAGE_REPLACED
[2] https://developer.android.com/guide/components/broadcast-exceptions
[3] 5c06063be6

MozReview-Commit-ID: Ak0dd2koJ9U

--HG--
extra : rebase_source : 58f32f574b13e5d7e9256f578821445eae1e3b57
extra : histedit_source : 204d858fe7408276714b2d228b612baddf76804d
2018-06-12 19:26:53 +03:00
Petru Lingurar
4378fd95bb Bug 1465323 - Update PackageAddedReceiver. r=JanH
This Receiver was used for implicit broadcasts and registered statically.
Refactored MmaDelegate() to register it dynamically in the init() method,
called in activity's onCreate and unregister it in activity's onDestroy.
This way we will still get notified immediately if the user installs any of
the apps we are interested in, even though he might not return to Fennec
immediately after. This will help to better asses the impact of suggestions to
install recommended packages.

For the cases in which the user installs the packages without us suggesting to
or if he kills our app before completing the new install, we will trigger a
check for the install status of the packages in MmaDelegate().init().

Also cleaned the code a little.

MozReview-Commit-ID: I00mLS2snzj

--HG--
extra : rebase_source : 9d767744dc3f4f2a44ab6de67c20f68a137a3beb
extra : histedit_source : e33a46fe4ece77b08eb8c9d161513e669fc14631
2018-07-16 21:15:32 +03:00
Petru Lingurar
55070cd7e6 Bug 1465323 - Update NotificationReceiver. r=JanH
The only change needed was to make sure the broadcast for
NotificationHelper.HELPER_BROADCAST_ACTION is sent explicitly to
our receiver.
The other 2 broadcasts that this receiver listens for are already explicit.

MozReview-Commit-ID: C3A88ijqIsd

--HG--
extra : rebase_source : bd6beb4a6b5656b59ee61d0122a133042d77e380
extra : histedit_source : 63103038680580f5e30082e245fb0be5168529eb
2018-06-12 13:01:23 +03:00
Petru Lingurar
f249aa63e8 Bug 1465323 - Update WhatsNewReceiver. r=JanH
Listening for `ACTION_MY_PACKAGE_REPLACED` [1] is the easiest way to get
notified when the app has been updated.
This broadcast, while not explicitly exempt from Oreo's Background Execution
Limits [2] is considered explicit because it is sent only to the package being
replaced and so it is compatible with the new limitations.
The previous intent action was chosen because at that time this action was not
supported by all platforms Fennec ran on [3], but this is not the case anymore.

The other broadcast - `ACTION_NOTIFICATION_CANCELLED` that this receiver
listens to is send explicitly.

[1] https://developer.android.com/reference/android/content/Intent.html#ACTION_MY_PACKAGE_REPLACED
[2] https://developer.android.com/guide/components/broadcast-exceptions
[3] 5c06063be6

MozReview-Commit-ID: DLUdw906i3P

--HG--
extra : rebase_source : a8544ae169344896aba4c7b922b68af4ad4bc94c
extra : histedit_source : c41c60cedea452ba8662fa836faa2aa8f9b5627e
2018-06-12 12:43:55 +03:00
Petru Lingurar
0940f02f48 Bug 1467840 - Use a JobIntentService for GCM token refresh; r=JanH
Whenever the GCM token expires it need to be refreshed.
For this, after targeting Android 8.0 (API level 26) or higher
Google recommends using a JobIntentService
https://developers.google.com/cloud-messaging/android/client

MozReview-Commit-ID: 1vz092TQfbz

--HG--
extra : amend_source : afecc9454dd64c1b0a83bc469d7cf201909ee2ae
2018-06-26 19:04:10 +03:00
Petru Lingurar
37e967daf5 Bug 1467840 - Migrate GeckoService to JobIntentService; r=snorp
This simple Service needed to be migrated to JobIntentService because it could
be started from background and we don't want it as a foreground service
(with a notification).
(For example: when the app is updated org.mozilla.gecko.PackageReplacedReceiver
would try and start this service. If in background, the app would crash)

Had to break the initial Service into separate JobIntentServices because in the
event that there are concurrent calls (even with different Intent actions)
JobScheduler would assume they are for the same already running service.

INTENT_ACTION_UPDATE_ADDONS was removed as it was being unused.

MozReview-Commit-ID: 2GiWFZdAVvp

--HG--
extra : amend_source : 7236a78707b781ee24eafe1e69662c10bd6a0ea6
2018-06-26 18:41:38 +03:00
petru
86aa31b5f4 Bug 1407046 - Migrate FileCleanupService to JobIntentService: Follow-up to for android-test. r=test-fix 2018-07-16 21:46:15 +03:00
Eitan Isaacson
6d59d60177 Bug 1471951 - Support expand selection with caret (2/2). r=yzen r=jchen 2018-07-16 10:53:27 -07:00
Eitan Isaacson
ffbf9af4d8 Bug 1471951 - Support set selection and clipboard actions (1/2). r=yzen r=jchen 2018-07-16 10:53:27 -07:00
Masatoshi Kimura
632e94cf4d Bug 1476000 - Support warnings format from clang-cl. r=dmajor
--HG--
extra : rebase_source : faf01d659a589c81718e58e2c73b1b46063ce989
2018-07-17 01:08:04 +09:00
David Major
6043bb48c5 Bug 1448980: Make --enable-lto work with clang-cl. r=froydnj 2018-07-16 12:26:36 -04:00
David Major
1eb86751ab Bug 1448980 prequel: Rename LTO flags to cflags. r=froydnj 2018-07-16 12:25:40 -04:00
David Major
85279470b7 Bug 1448976: Pick up two LLVM fixes for ThinLTO undefined symbols on Windows. r=froydnj
https://bugs.llvm.org/show_bug.cgi?id=38105#c4
https://bugs.llvm.org/show_bug.cgi?id=38139#c5
2018-07-16 12:24:57 -04:00
Petru Lingurar
417a481b63 Bug 1467461 - Migrate CrashReportingService to JobIntentService. r=snorp
Use the fact that a JobIntentService is still a Service to keep most of the
previous implementation and method of starting CrashReportingService.
On 26+ devices it will be called with "start-foreground-service".
This ensures it can be started even from background and the crash reporting
process would work as before but ActivityManager will post an ANR error to
logcat after 5 seconds because we aren't calling Service.startForeground()
(which would mean a user visible notification).

Will use different Job Ids depending on if the app is Firefox Release or
Firefox Beta.
The Job Id will be passed to GeckoThread when first initializing and then be
made available to CrashHandler and nsExceptionHandler.cpp to be sent in the
Intent that starts the CrashReporterService.

MozReview-Commit-ID: GATl6Waa9St

--HG--
extra : amend_source : 70bc130b9411df336181e825ebb3e19bdc5a778c
2018-07-02 17:32:10 +03:00
Petru Lingurar
8ee271210b Bug 1407046 - Migrate UpdateService to JobIntentService. r=jchen
Broke the big IntentService into four small JobIntentServices because
the same JobIntentService class cannot be used with multiple JobIds
(b6838fd2d2/compat/src/main/java/android/support/v4/app/JobIntentService.java (L121))
Also:
    - will make the code easier to be migrated to WorkManager in the future
    - more in line with SRP. It was initially doing too much.

All the functionality of the big UpdateService class has been incorporated in
Updater.java, UpdatesPrefs.java and UpdatesServiceHelper.java
with the main logic to drive the important actions inside the new Services.
UpdaterService is used as parent of the newly created service to help avoid
duplicated code.
Created an inner BroadcastReceiver to act upon notification actions while
the service which posted it is running as it's state needed to be modified.
Created a BroadcastReceiver to act on actions from notifications which remained
posted after the service that posted them finished. This receiver will just
start another UpdaterService.
Otherwise the services are to be started from the UpdateServiceHelper class.

MozReview-Commit-ID: 2OyBZ4YYvgh

--HG--
extra : rebase_source : 17b98a1209409c09227490ca66d75d8d37717a6e
2018-07-13 20:53:38 +03:00
Petru Lingurar
0ce784d030 Bug 1407046 - Migrate FileCleanupService to JobIntentService. r=JanH
Also cleaned the code a little.

MozReview-Commit-ID: Bs3bUdxxz8k

--HG--
extra : rebase_source : bf564b683e786010d8f4836a1ee75aefa0514fa8
2018-06-26 17:42:28 +03:00
Petru Lingurar
d1e02a31c5 Bug 1407046 - Migrate TelemetryUploadService to JobIntentService. r=JanH
MozReview-Commit-ID: 8UGDzgmY81y

--HG--
extra : rebase_source : c5495972fe15769eb15f97ea6121123804868bd2
2018-06-26 17:40:48 +03:00
Petru Lingurar
41571be939 Bug 1407046 - Migrate FxAccountDeletedService to JobIntentService. r=jchen
MozReview-Commit-ID: 5ksrTc1Stre

--HG--
extra : rebase_source : 01bf5896d1fd23baf1cab223cd7a3985ab4e8450
2018-06-26 17:38:30 +03:00
Petru Lingurar
cbed3e4cc6 Bug 1407046 - Migrate FxAccountProfileService to JobIntentService. r=JanH
Also cleaned the code a little.

MozReview-Commit-ID: 1Zm3oLVVZ8s

--HG--
extra : rebase_source : 88c392f4276860785e98a6f7d7122fc4ca689d19
2018-06-26 17:36:11 +03:00
Petru Lingurar
198f113ef4 Bug 1407046 - Migrate TabReceivedService to JobIntentService. r=JanH
MozReview-Commit-ID: 5CEfJtUfmHq

--HG--
extra : rebase_source : 430bf2dde4dc7f52c954c404fa7bbec4641e9eb9
2018-06-26 17:33:58 +03:00
Petru Lingurar
8830f08311 Bug 1407046 - Migrate DownloadContentService to JobIntentService. r=snorp
Broke the big IntentService into four small JobIntentServices because
the same JobIntentService class cannot be used with multiple JobIds
(b6838fd2d2/compat/src/main/java/android/support/v4/app/JobIntentService.java (L121))
Also:
    - will make the code easier to be migrated to WorkManager in the future
    - more in line with SRP. It was initially doing too much.

Cleaned the code a little, removed the superfluous creation of new Threads for
DownloadContentCatalog().persistChanges() / .startLoadFromDisk()
as those methods are always called from the background threads
of the new JobIntentServices.
The new DlcHelper helps reducing duplicated code.

MozReview-Commit-ID: G3fsWYOGEbR

--HG--
extra : rebase_source : 5bdc3e64a44b7a3f77743b2b2f8f5d528a7b51c3
2018-06-26 17:31:19 +03:00
Emilio Cobos Álvarez
8805f43898 Bug 1473813: Don't make pseudo-elements replaced by content: url(..). r=bz
Differential Revision: https://phabricator.services.mozilla.com/D1996
2018-07-16 18:06:39 +02:00
Emilio Cobos Álvarez
0da3dae9c9 Bug 1472403: Simplify generated image content. r=bz,dholbert
This way we reuse the same machinery everywhere for the content property.

The only difference is that we need to look at the parent style for content
instead of just our style, and at a given index.

Again, this is fine because changing content reframes, so no chance to mess up.

This allows the generated content stuff to not implement nsImageLoadingContent
and all that stuff, nor deal with events, which makes it much simpler IMO.

Now it just tracks an index. We may not even need for it to be an HTML element,
but I've kept that for now.

I added a crashtest that used to crash because of the bogus
nsCSSFrameConstructor code which trusted the node name without checking it was
native anonymous.

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

MozReview-Commit-ID: 1pAzIvRRVnL
2018-07-16 18:06:38 +02:00
Emilio Cobos Álvarez
09e04b0f0f Bug 1475980: A moved table should be empty. r=froydnj
MozReview-Commit-ID: 7K9wNGhIhaD
2018-07-16 18:06:37 +02:00
Andrea Marchesini
ceea0172b0 Bug 1473587 - CSP Violation events should have the correct sample for inline contexts, r=jorendorff, r=ckerschb 2018-07-16 17:58:04 +02:00
Paul Adenot
788fbbb0f0 Bug 1456271 - Implement new behaviour of PeriodicWave ctor: not passing in any array makes it into a sine wave. r=baku
MozReview-Commit-ID: AbI62hSxZyS

--HG--
extra : rebase_source : 2d6e9ec5bf95fcfe30d964dfc38eb29333a58578
2018-05-30 18:42:29 +02:00
Francesco Lodolo (:flod)
d7d4117b37 Bug 1474553 - [br] Update Freelang searchplugin to https, update icon r=mkaply
MozReview-Commit-ID: AxsKzQGrTOz

--HG--
extra : rebase_source : 1fba07c540febbc3dda87b0af2629b6092a17c25
2018-07-16 08:37:58 +02:00
Shane Caraveo
43b464a409 Bug 1455405 fix intermittent by using real events, r=rpl
This test was testing that files are loaded/executed/etc in the page, but
what we really care about is that the webrequest api works.  Other tests
are responsible for stuff like css and js actually work.  The patch does
maintain (fixed) the js test, but removes the css test for lack of a good
way to properly wait for css to apply.

MozReview-Commit-ID: B2uByaxNeK2

--HG--
extra : rebase_source : 6779116f9f1a4a7ce24cd32c3648d1027343db93
2018-07-16 09:08:30 -03:00
Tim Nguyen
2ec98e736f Bug 1475978 - Add chromeOuterWindowID global to mozilla/frame-script ESLint environment. r=mconley
MozReview-Commit-ID: FYfTDDY2d8j

--HG--
extra : rebase_source : b225e887b279305043511d8d7be5b92f642e7420
2018-07-16 14:36:35 +01:00
Margareta Eliza Balazs
a865255e0e Backed out 2 changesets (bug 1456271) for mda failures in dom/media/webaudio/test/test_periodicWave.html
Backed out changeset b99bd4121181 (bug 1456271)
Backed out changeset b37a0606d6a0 (bug 1456271)
2018-07-16 17:11:14 +03:00
Paul Adenot
357fe664a2 Bug 1456271 - Ajust WPT expectations: the idl test for PeriodicWave now passes. r=padenot
MozReview-Commit-ID: 2UIq4zrcd02

--HG--
extra : rebase_source : a46760c048314f989509fc24e7240d68fa9976e6
2018-07-16 15:04:11 +02:00
Paul Adenot
15677a0da5 Bug 1456271 - Implement new behaviour of PeriodicWave ctor: not passing in any array makes it into a sine wave. r=baku
MozReview-Commit-ID: AbI62hSxZyS

--HG--
extra : rebase_source : 2d6e9ec5bf95fcfe30d964dfc38eb29333a58578
2018-05-30 18:42:29 +02:00
Gregory Szorc
4a88e570a0 Bug 1475649 - Always use --untracked-files; r=ahal
a35b188d0e44 inadvertently regressed behavior in the case where
the Git status.showUntrackedFiles config option was set and
we want to purge untracked files.

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

--HG--
extra : moz-landing-system : lando
2018-07-16 13:19:09 +00:00
Xidorn Quan
1f2e5ca9b2 Bug 1472386 - Take overflow-wrap into account when calculating min-content intrinsic size. r=jfkthame
MozReview-Commit-ID: Fu6Gbmxs4PN

--HG--
extra : rebase_source : b90c58f16c5cad717961b586fc0a6574343a5692
2018-07-09 14:54:34 +10:00
Brindusan Cristian
6ef44c90c6 Backed out changeset 085439248886 (bug 1460074) for lint build bustages on FocusableDatePicker.java. CLOSED TREE 2018-07-16 15:45:50 +03:00
Brindusan Cristian
62fc67175b Backed out changeset 057ccf1cc3fc (bug 1474704) for bc failures on browser_multiselect_tabs_using_Ctrl.js. CLOSED TREE 2018-07-16 15:44:14 +03:00
Petru Lingurar
ae0a53d265 Bug 1460074 - Still cannot switch between years in date picker; r=jchen
The problem stemmed from having the DatePicker inside a ScrollView which
was receiving the swipe events.
To avoid this I've created the new FocusableDatePicker which has the ability
to prevent it's parent from receiving touch events.

MozReview-Commit-ID: 6VntjE5A0ec

--HG--
extra : rebase_source : a0f9589bf000ba10e5429347fe1dc7516e8eef3f
2018-07-12 18:30:41 +03:00
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
Abdoulaye O. Ly
0e79f1bedf Bug 1474704 - Enable the multiselect tabs feature by default on Nightly builds. r=jaws
MozReview-Commit-ID: CAWYr0RM96Z

--HG--
extra : rebase_source : 85682c1b2ab72bf1efc391f7d32d291326337a37
2018-07-16 04:29:19 +00:00
Julian Descottes
96e2cf4b96 Bug 1475474 - Fix broken link to Firefox Build page in devtools-docs;r=sole
MozReview-Commit-ID: 8xHvnLPU7DK

--HG--
extra : rebase_source : b368a7a45c5167a2ef1aee1504db37c84cb2fb14
2018-07-13 09:02:27 +02:00
Raphael Pierzina
d4d5aeaf26 Bug 1428709 - Enable several mozhttpd tests for Python 3; r=davehunt
MozReview-Commit-ID: K7m58KGR29N

--HG--
extra : rebase_source : cc95b403348679ee4cc263c7ae0e9f6d54026261
2018-07-12 18:37:54 +02:00
Raphael Pierzina
6650158314 Bug 1428709 - Add six for Python 3 compat in mozhttpd; r=davehunt
MozReview-Commit-ID: 1fNdmG9YVQq

--HG--
extra : rebase_source : 560e433640947384baf93d53ffaedad3a64ea2c4
2018-07-03 11:42:29 +02:00
Raphael Pierzina
0ea361ac9f Bug 1428709 - Add py35 skip-if to individual mozhttpd tests;r=davehunt
MozReview-Commit-ID: GXbdp9SU3vn

--HG--
extra : rebase_source : 933bf29e3035c961bfc921dec7947dc311bfb70d
2018-07-03 11:23:02 +02:00
Razvan Caliman
34ed9c55b8 Bug 1470375 - Set the font editor pref to true in Nightly builds. r=gl
MozReview-Commit-ID: 1SKpRcD9VBZ

--HG--
extra : rebase_source : 630feea2217929ec345db943053f5b1909d98d22
2018-07-11 13:36:48 +02:00
shindli
0520c40527 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-16 12:29:59 +03:00
shindli
6f86cc3479 Merge inbound to mozilla-central. a=merge 2018-07-16 12:26:56 +03:00
Tim Huang
e73037dc0e Bug 1473247 - Part 2: Add a test case for making sure that IP addresses can work properly for the firstPartyDomain. r=arthuredelstein,baku
Differential Revision: https://phabricator.services.mozilla.com/D1978

--HG--
extra : moz-landing-system : lando
2018-07-13 19:55:02 +00:00
Tim Huang
c0118a2d73 Bug 1473247 - Part 1: Fixing the issue that the IP addresses won't be set for first party domains. r=arthuredelstein,baku
Right now, the firstPartyDomain won't be set when using IP addresses as
first party domains. It is because of that the TLD service won't accept
IP addresses as valid hosts. The patch fixes this problem by detecting
that if the host is a IP address. If it is, we will still set the
firstPartyDoamin with the IP address.

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

--HG--
extra : moz-landing-system : lando
2018-07-13 19:53:15 +00:00
Daniel Holbert
76f667e72e Bug 1462983: Check for redundant "loaded" messages from opened window, in test_bug607529.html. r=bz
Such messages happen intermittently on Android, presumably from bfcache being
purged due to memory pressure (which would then cause the back() operation
behave like a fresh load).  So on Android, we'll now treat these redundant
messages as a "todo()" failure, to indicate that something went wrong but avoid
turning the testsuite orange.

MozReview-Commit-ID: GkaxB06vL7q

--HG--
extra : rebase_source : 64c0c0a41452d573062774b2300a26aad179b309
2018-07-13 08:38:52 -07:00