Commit Graph

58 Commits

Author SHA1 Message Date
Dave Townsend
d6a045d61b Bug 1473264: Catch failures to get the favicon expiration. r=mak
This ignores failures to get expiration data from favicon requests. It also adds
some safety to the rest of onStopRequest wrapping it in a try...catch block to
catch any unexpected errors and correctly reject the waiting promise.

Differential Revision: https://phabricator.services.mozilla.com/D1938
2018-07-04 12:36:13 +00:00
Dave Townsend
cb21b0062f Bug 1472477: Follow redirects when loading favicons. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D1902
2018-07-02 13:44:47 +00: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
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
Cosmin Sabou
42e854deed Backed out changeset 638eb8a41245 (bug 1453751) for frequent linux debug e-10s failures on test_ext_webrequest_filter.html 2018-06-26 07:29:35 +03:00
Dave Townsend
e6cce6de21 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
2018-06-04 12:53:55 -07:00
Kris Maglione
b3990a2d91 Bug 1456686: Part 1 - Fix unused and shadowed explicit imports. r=standard8
These issues were previously ignored due to the nature of our global import
rules. They need to be fixed before that rule can be updated.

MozReview-Commit-ID: DCChktTc5TW
2018-04-24 20:18:09 -07:00
Marco Bonardo
912e27da25 Bug 1449523 - ContentLinkHandler only picks perfectly sized icons. r=Mardak
MozReview-Commit-ID: IY5vOIliWWC
2018-03-28 12:40:02 +02:00
Kirk Steuber
48df44549c Bug 1428948 - Add policies to modify the available search engines r=Felipe,florian
This adds a policy with the capability of adding search engines, choosing the default search engine, and blocking the installation of new search engines.

Additionally, fixes the messages for errors reported by MainProcessSingleton.addSearchEngine so that the offending URL is printed rather than "[xpconnect wrapped nsIURI]".

MozReview-Commit-ID: HuLT15Rnq0r
2018-03-02 12:11:16 -08:00
Valentin Gosu
b9160f5ce8 Bug 1433958 - Change code that sets nsIURI.userPass to use nsIURIMutator r=mayhemer
* Code in XMLHttpRequestMainThread is converted to set the username and password individually. This is because when the parameters are empty, it ended up calling SetUserPass(":") which always returns an error.

MozReview-Commit-ID: 3cK5HeyzjFE
2018-02-26 20:43:46 +01:00
Florian Quèze
f1a55f73f8 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Andrew McCreight
272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Kris Maglione
0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou
f09d6d985d Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian
483ba301cb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Ed Lee
8aeda44e3a Bug 1422289 - ContentLinkHandler should guess icon type from the extension when type is not defined. r=mak
MozReview-Commit-ID: HfuqudW77jM
2017-12-01 14:11:08 -08:00
Marco Bonardo
a549674ce5 Bug 1403829 - Prefer fetching properly sized favicons from pages. r=Mardak
MozReview-Commit-ID: CzMHWzsGuRo
2017-11-03 12:07:16 +01:00
Dan Banner
5af4450327 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Marco Bonardo
e678b6a8fb Bug 1402373 - Slack's red badge favicon is shown for no reason and then isn't cleared when all messages are read. r=Mardak,nanj
MozReview-Commit-ID: D1t9xo3Dlfv
2017-09-28 17:32:57 +02:00
Marco Bonardo
f44435719c Bug 1401777 - don't use rich icons for tabs. r=Mardak
MozReview-Commit-ID: DcqxEme7hfx
2017-09-21 10:21:50 +02:00
Sebastian Hengst
c82b6a2ef5 Backed out changeset 6b44b9c6114a (bug 1401777) for frequent failures in browser/base/content/test/general/browser_discovery.js on Linux. r=backout 2017-09-25 18:55:38 +02:00
Marco Bonardo
43adb346a8 Bug 1401777 - don't use rich icons for tabs. r=Mardak
MozReview-Commit-ID: DcqxEme7hfx
2017-09-21 10:21:50 +02:00
Sebastian Hengst
484bac0468 Backed out changeset 698252497ed8 (bug 1401777) for failing browser-chrome's browser/base/content/test/general/browser_discovery.js. r=backout 2017-09-24 21:43:23 +02:00
Marco Bonardo
c407a50e6c Bug 1401777 - don't use rich icons for tabs. r=Mardak
MozReview-Commit-ID: DcqxEme7hfx
2017-09-21 10:21:50 +02:00
Sebastian Hengst
de12c06a14 Backed out changeset 9c0e1bf558e6 (bug 1401777) for failing browser_discovery.js. r=backout 2017-09-22 17:16:25 +02:00
Marco Bonardo
b24770e8b3 Bug 1401851 - Skip masked favicons in ContentLinkHandler until we support them. r=nanj
MozReview-Commit-ID: 99du7AD11x7
2017-09-21 10:02:38 +02:00
Marco Bonardo
21b8a5d596 Bug 1401777 - don't use rich icons for tabs and remove crisp filters making hi res icons look blocky. r=Mardak
MozReview-Commit-ID: DcqxEme7hfx
2017-09-21 10:21:50 +02:00
Kershaw Chang
a72059f797 Bug 1247843 - Part 2: Set request context ID for the channel used to load favicon. r=mak
This patch covers two cases when loading a favicon:
1. Get the request context ID of the document load group, when <link rel="icon"> is found in the page.
2. Use the top level document's request context ID when using the default favicon.
2017-09-20 20:09:00 -04:00
Nan Jiang
30ffa2b3a5 Bug 1352459 - Collect rich icons in ContentLinkHandler. r=mak,Mardak
MozReview-Commit-ID: GrjpuyvY7nm
2017-09-12 09:47:51 -04:00
Wes Kocher
797fb55e59 Backed out changeset 5ed9b657a1ce (bug 1352459) for xperf failures a=backout CLOSED TREE
MozReview-Commit-ID: 9XmmBsTf39a
2017-09-12 18:06:16 -07:00
Nan Jiang
dcc029b876 Bug 1352459 - Collect rich icons in ContentLinkHandler. r=mak,Mardak
MozReview-Commit-ID: GrjpuyvY7nm
2017-09-12 09:47:51 -04:00
Florian Queze
c9a0637249 Bug 1359111 - stop using BrowserUtils.makeURI, r=jaws. 2017-04-25 09:21:49 +02:00
Andrew McCreight
75252a85e2 Bug 1350878 - ContentLinkHandler.jsm does not use its NetUtil.jsm import. r=mikedeboer
MozReview-Commit-ID: 7CJk7P3JfML
2017-03-22 14:59:33 -07:00
Florian Quèze
63de711857 Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
Jared Wein
242ab87626 Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. r=MattN
MozReview-Commit-ID: FuVu8skcqOe
2016-12-30 21:47:25 -05:00
Jared Wein
e3149c378f Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 7E7LPorrEje
2016-12-29 18:34:54 -05:00
Wes Kocher
2d7553dcfd Backed out 3 changesets (bug 1325464) for xpcshell failures a=backout
Backed out changeset 562ddc32cc21 (bug 1325464)
Backed out changeset cd10db6087dd (bug 1325464)
Backed out changeset 4079437c4648 (bug 1325464)
2016-12-29 14:05:44 -08:00
Jared Wein
34e228f767 Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN
MozReview-Commit-ID: 8WoGr8i6oCR
2016-12-29 15:20:47 -05:00
Jared Wein
4518d81cb5 Bug 1292042 - Enable the keyword-spacing rule for eslint. Most of this patch was autogenerated by 'eslint --fix'. Files with .xml extension needed to be changed by hand due to limitations of custom plugin. r=markh
MozReview-Commit-ID: EMjJ3yWt9Wt
2016-08-04 03:28:58 -04:00
Blake Kaplan
1a7dd0a15f Bug 1289944 - Remove now-unneeded blob URL hack for favicons. r=felipe 2016-07-28 11:51:59 -07:00
Pushpankar
77a14e357c Bug 1286854 - Replace ownerDocument.defaultView with ownerGlobal in browser/. r=dao 2016-07-16 10:20:04 +02:00
Christoph Kerschbaumer
b3c660bf43 Bug 1196013 - Use channel->ascynOpen2 in toolkit/components/places. r=billm r=sicking r=mak 2016-05-23 23:57:31 +02:00
Christoph Kerschbaumer
8f57c8b75d Bug 1269353 - Use channel.asyncOpen2() within ContentLinkHandler (r=blassey) 2016-05-06 15:22:11 +02:00
Brad Lassey
4e65e77633 bug 1184739 - Blob URLs as favicons don't work r=felipe 2016-03-25 10:06:38 -04:00
Blake Kaplan
fec8c7026e Bug 1186139 - Don't use a sync message where we don't have to. r=felipe 2016-03-25 15:38:10 -07:00
Christoph Kerschbaumer
3d6bec528f Bug 1119386 - Part 3: Use document's principal for favicons in browser (r=billm) 2015-11-24 13:32:10 -08:00
Tooru Fujisawa
558f027cad Bug 1207490 - Part 10: Remove use of expression closure from browser/modules/ContentLinkHandler.jsm. r=Gijs 2015-09-23 17:57:37 +09:00