Commit Graph

2555 Commits

Author SHA1 Message Date
Kris Maglione
8766ceb571 Bug 1472523: Part 4 - Avoid unnecessary domain string duplication in preference observers. r=njn
MozReview-Commit-ID: EMCgMRTDqDn
2018-07-04 14:52:48 -07:00
Tim Huang
0c5713210a Bug 1470156 - Part 1: Adding a test case for reassuring mozilla::OriginAttributes::CreateSuffix won't be crashed with invalid characters in firstParty domain. r=baku,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D1845
2018-07-03 13:48:18 +00:00
Brindusan Cristian
08c01699dd Backed out changeset 604fb83b6b61 (bug 1470156) for mochitest failures on test_ext_cookies_first_party.html. CLOSED TREE 2018-07-04 00:01:49 +03:00
Tim Huang
b95d7d0501 Bug 1470156 - Part 1: Adding a test case for reassuring mozilla::OriginAttributes::CreateSuffix won't be crashed with invalid characters in firstParty domain. r=baku,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D1845
2018-07-03 13:48:18 +00:00
Shane Caraveo
ff732ce6c2 Bug 1470516 - remove or fix localized values in securityInfo, r=rpl
MozReview-Commit-ID: 3xURSfbPTmS
2018-07-02 15:45:18 -03:00
Rob Wu
88992d666c Bug 1351663 - Support SameSite flag in browser.cookies API r=rpl
A part of cookies.json is copied from
ea90e37756/chrome/common/extensions/api/cookies.json

MozReview-Commit-ID: LCVN9Y8uHIL
2018-06-09 01:26:26 +02:00
Mark Banner
d636d89aae Bug 1470455 - Add the 'expected' arguments to throws/rejects for toolkit. r=mossop
MozReview-Commit-ID: Ln9EpDpTR91
2018-06-22 16:02:22 +01:00
Andreea Pavel
16e969ea82 No bug - fix merge conflict mistake r=Aryx on a CLOSED TREE 2018-06-30 13:57:50 +03:00
Andreea Pavel
fe013701c6 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2018-06-30 13:10:01 +03:00
Kris Maglione
bb663b9c15 Bug 1471102: Move more code out of ExtensionUtils.jsm. r=aswan
MozReview-Commit-ID: Fqlv5BRuuW8
2018-06-25 19:30:21 -07:00
Coroiu Cristina
72b3df5f72 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-06-30 01:00:54 +03:00
Dave Townsend
0f2c3bd648 Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy
Summary:
This moves the load of favicons into the content process. We use the same logic
for finding favicons (based on waiting until none have shown up for a short
time) but then load the favicon and convert it to a data uri which we then
dispatch to the parent process. Along the way this fixes asssociating the load
with the tab for WebExtension and devtools, fixes CSP usage for the load, fixes
expiry detection of the favicon and stops us from loading the same resource
twice.

This change also merges the prefs browser.chrome.site_icons and
browser.chrome.favicons leaving just the former controlling favicon loading. It
adds the pref browser.chrome.guess_favicon to allow disabling guessing where
a favicon might be located for a site (at <hostname>/favicon.ico). This is
mainly to allow disabling this in tests where those additional yet automatic
requests are uninteresting for the test.

There are multiple clean-ups that can follow this but this is a first step along
that path.

MozReview-Commit-ID: E0Cs59UnxaF

Reviewers: mak

Tags: #secure-revision

Bug #: 1453751

Differential Revision: https://phabricator.services.mozilla.com/D1672
Differential Revision: https://phabricator.services.mozilla.com/D1673
Differential Revision: https://phabricator.services.mozilla.com/D1674
Differential Revision: https://phabricator.services.mozilla.com/D1850
Differential Revision: https://phabricator.services.mozilla.com/D1869
2018-06-28 16:06:09 -07:00
Adam Plaice
8302e669de Bug 1364784 - Allow more modifier combinations for webextensions commands key; r=mixedpuppy,mstriemer
This allows keyboard shortcuts containing both "Ctrl" and "Alt" in the
manifest of webextensions (in the "commands" -> "suggested_key" key),
rather than just one of these modifiers. The equivalent combinations
on MacOS (any two of "Command", "Alt" and "MacCtrl") are also allowed.

Non-sensical combinations (such as "Ctrl+Command" or "Ctrl+Ctrl") are
forbidden.

MozReview-Commit-ID: 59tC2efLm5q
2018-06-02 00:56:44 +02:00
Brindusan Cristian
d94fd86e60 Backed out changeset b11aa832c41a (bug 1453751) for Mochitest-15 failures in toolkit/components/extensions/test/mochitest/test_ext_webrequest_filter.html. CLOSED TREE 2018-06-28 23:15:49 +03:00
Dave Townsend
ebc2c6ff75 Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan
Summary:
This moves the load of favicons into the content process. We use the same logic
for finding favicons (based on waiting until none have shown up for a short
time) but then load the favicon and convert it to a data uri which we then
dispatch to the parent process. Along the way this fixes asssociating the load
with the tab for WebExtension and devtools, fixes CSP usage for the load, fixes
expiry detection of the favicon and stops us from loading the same resource
twice.

This change also merges the prefs browser.chrome.site_icons and
browser.chrome.favicons leaving just the former controlling favicon loading. It
adds the pref browser.chrome.guess_favicon to allow disabling guessing where
a favicon might be located for a site (at <hostname>/favicon.ico). This is
mainly to allow disabling this in tests where those additional yet automatic
requests are uninteresting for the test.

There are multiple clean-ups that can follow this but this is a first step along
that path.

MozReview-Commit-ID: E0Cs59UnxaF

Reviewers: mak

Tags: #secure-revision

Bug #: 1453751

Differential Revision: https://phabricator.services.mozilla.com/D1672
Differential Revision: https://phabricator.services.mozilla.com/D1673
Differential Revision: https://phabricator.services.mozilla.com/D1674
Differential Revision: https://phabricator.services.mozilla.com/D1850
2018-06-04 12:53:55 -07:00
Oriol Brufau
498a7b8c8c Bug 1465170 - Implement support for the 'highlighted' API for multiselect tabs with tabs.query r=jaws,mixedpuppy
MozReview-Commit-ID: 6eFnxrXJXXB
2018-06-03 02:53:59 +02:00
Jeff Gilbert
70a22b2878 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Oriol Brufau
50907cadd4 Bug 1464862 - Expose multiselected status to "tabs.Tab.highlighted", and allow to change it via "browser.tabs.highlight()" r=mixedpuppy
MozReview-Commit-ID: H2SiqM5ksCH
2018-06-23 21:46:58 +02:00
Luca Greco
6955a5677f Bug 1465129 - Collect telemetry data related to the storage.local "JSONFile to IDBBackend" data migrations. r=mixedpuppy
MozReview-Commit-ID: 3iGv5XkqeA3
2018-06-17 13:38:02 +02:00
Sebastian Hengst
488ae7beb1 Bug 1469872 - update bugzilla products and components in moz.build files: webextensions. r=nalexander
MozReview-Commit-ID: JtvcjQKclJf
2018-06-20 21:41:59 +03:00
Kris Maglione
1bd73e3079 Bug 1463635: Part 2 - Update test_temporary to use mostly WebExtensions. r=aswan
MozReview-Commit-ID: 1tK3FiNXgAV
2018-05-22 20:24:12 -07:00
Tim Nguyen
5a84252c00 Bug 1469318 - Do not require 'theme' permission for theme.getCurrent() and theme.onUpdated. r=jaws
MozReview-Commit-ID: JFGm2xzlsJ1
2018-06-18 21:26:00 +01:00
Brindusan Cristian
43fc1e53a1 Backed out changeset 1c40cef0e222 (bug 1469318) for mochitest failures on test_ext_all_apis.html CLOSED TREE 2018-06-18 22:18:28 +03:00
Tim Nguyen
59f2f00b29 Bug 1469318 - Do not require 'theme' permission for theme.getCurrent() and theme.onUpdated. r=jaws
MozReview-Commit-ID: 1FctjuDSXWb
2018-06-18 17:18:57 +01:00
Mark Banner
ea6c3b2e37 Bug 1456762 - Add parsing of HTML files to ESLint to discover their script tags and the globals that are imported. r=mossop
MozReview-Commit-ID: 6jiEbZnyv6e

Differential Revision: https://phabricator.services.mozilla.com/D1643
2018-06-16 08:20:38 +00:00
Joel Maher
d0823df1ef Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Luca Greco
07a2cafcbd Bug 1465120 - Use a different telemetry histogram key for the storage.local IndexedDB backend. r=aswan,chutten
MozReview-Commit-ID: ApaNLXehExf
2018-06-08 15:15:29 +02:00
Luca Greco
a2474fddfa Bug 1467720 - Fix "dead object" error raised from ext-storage.js on browser.storage.local API calls. r=aswan
When ExtensionStorageIDB.selectBackend is called from a child process, it calls the main process
and cache the result as a promise, to be reused for the other contexts for the same extension
that are running in the same process.

The cached promise should not be tied to a particular extension context's cloneScope, otherwise
accessing it will raise "can't access dead object" errors after that cloneScope has been
destroyed.

MozReview-Commit-ID: GJuul8sQmlF
2018-06-08 05:19:34 +02:00
Rob Wu
c7dc7c44a4 Bug 1465063 - Return FP cookies from cookies.getAll even if domain/url is set r=rpl
`browser.cookies.getAll(details)` is expected to return all cookies if the
"details.firstPartyDomain" key is set to undefined/null.
This usually works, because `getCookiesWithOriginAttributes` is used,
which iterates over all cookies and only checks origin attributes that
exist in the specified pattern.

If a "url" or "domain" are set, then `getCookiesFromHost` was used,
which uses a look-up table keyed by host and OriginAttributes, with
undefined origin attributes initialized at their default value.
Consequently, only non-FP cookies were returned.

This commit fixes the issue by using `getCookiesWithOriginAttributes`
when the `firstPartyDomain` does not have an explicit (string) value.

MozReview-Commit-ID: AxHbbDeqSwr
2018-06-08 17:20:02 +02:00
Rob Wu
f73131fe49 Bug 1465063 - Add tests for get/getAll w/o firstPartyDomain r=rpl
The test coverage for cookies.get was incomplete, as scenarios
with empty, null and undefined firstPartyDomain were not checked.

There is a distinction between "empty" and "w/o firstPartyDomain".

MozReview-Commit-ID: 1l54nUOCneK
2018-06-08 13:36:36 +02:00
Rob Wu
ca31f07e88 Bug 1465063 - Add await before assertRejects r=rpl
Wait for the promise resolution before moving to the next line in the tests.

MozReview-Commit-ID: Ldeiwj9vCzn
2018-06-08 11:31:05 +02:00
Kris Maglione
0847e8227e Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB
2018-05-25 17:02:29 -07:00
Kris Maglione
188b8c3938 Bug 1464743: Restore extension child shutdown timeout. r=aswan
MozReview-Commit-ID: 8O6CgKsOwom
2018-06-06 12:43:26 -07:00
Andrew Swan
207ad9dc56 Bug 1467136 Ensure extension messaging cannot miss the startup event r=kmag
When a background page has a messaging listener but the background page
is started in response to something other than an extension message, we
were missing the background "startup" event.  Fix that by setting up the
listener earlier.

MozReview-Commit-ID: Cr58EyCoY6W
2018-06-06 13:58:43 -07:00
Oriol Brufau
630367dfa7 Bug 1466388 - Android webext popup should not be considered to be the active or highlighted tab r=rpl
MozReview-Commit-ID: 3WVoR80ICzo
2018-06-03 03:00:39 +02:00
Luca Greco
3d6b1a6a75 Bug 1406181 - Test storage.local from extension tab pages on file and indexedDB backends. r=aswan
MozReview-Commit-ID: BYhlnLiitgh
2017-10-19 16:27:02 +02:00
Luca Greco
e10a902040 Bug 1406181 - Test storage.local from content scripts on file and indexedDB backends. r=aswan
MozReview-Commit-ID: C4ij1o3TXIO
2017-10-19 16:22:58 +02:00
Luca Greco
39815fc623 Bug 1406181 - Test storage.local cleanup on uninstall on file and indexedDB backends. r=aswan
MozReview-Commit-ID: H8W8ry1dQIt
2017-10-19 16:00:52 +02:00
Luca Greco
64c71a5b24 Bug 1406181 - Test storage.local telemetry on file and indexedDB backends. r=aswan
MozReview-Commit-ID: AHSPICGKdib
2017-10-19 15:46:51 +02:00
Luca Greco
0496d0ffea Bug 1406181 - Test storage.local JSONFile and IndexedDB backends. r=kmag
MozReview-Commit-ID: CU9CVdIp8l8
2017-10-19 15:15:31 +02:00
Luca Greco
9d477a36c5 Bug 1406181 - Test storage.local data migration from JSONFile to IDB backend. r=aswan
MozReview-Commit-ID: 8qzy0z1ei0w
2018-04-19 15:15:35 +02:00
Luca Greco
fb1814a3e1 Bug 1406181 - Add ExtensionStorageIDB JSM module. r=aswan
This patch defined a new ExtensionStorageIDB module, which provides the
same "internal" API currently provided by ExtensionStorage and uses
IndexedDB as its backend (instead of the JSONFile used as the backend
provided by ExtensionStorage).

MozReview-Commit-ID: DsvPudExcyr
2017-10-17 04:12:15 +02:00
Luca Greco
2014f60047 Bug 1406181 - Move serialize/deserialize helpers from ext-c-storage.js to ExtensionStorage.jsm. r=kmag
MozReview-Commit-ID: 4iundHpQ8d2
2017-10-18 19:31:27 +02:00
Andrew Swan
84ecc06250 Bug 1369841 Make browser.runtime.onMessage and onConnect persistent r=zombie
MozReview-Commit-ID: 4LdBeEERtsD
2018-05-29 17:40:53 -07:00
Shane Caraveo
7c4e7aca47 Bug 1404724 - remove browser_style warning, fix default values, r=aswan
MozReview-Commit-ID: Akdhrm4leIQ
2018-05-29 16:55:43 -04:00
Tomislav Jovanovic
ecc35e8e14 Bug 1466349 part 3 - Ignore ignorePath for privileged about: MatchPatterns r=aswan
Paths are all about: URIs have, so ignoring them doesn't make sense.

MozReview-Commit-ID: ATwAeI7m61z
2018-06-03 19:38:29 +02:00
Tomislav Jovanovic
8799df59dc Bug 1466349 part 1 - Enable passing addonData flags to embedded WE, r=aswan
also fix permission matcher creation in child process

MozReview-Commit-ID: Ht9rEKwaUsp
2018-06-05 20:26:24 +02:00
Andrew Swan
30b252e25d Bug 1465537 Move browser startup promises to ExtensionParent.jsm r=zombie
Creating these promises from ext-toolkit.js was always dicey since that
script is loaded asynchronously during startup.  This should ensure that
the startup promises are reliably created early enough in startup.

MozReview-Commit-ID: A0V7iCOFNI8
2018-06-04 10:51:56 -07:00
Miko Mynttinen
3df26bc8a5 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO
2018-06-01 17:59:07 +02:00
arthur.iakab
9588ba6d78 Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00