gecko-dev/toolkit/components
Dave Townsend 9cbfdc7c2d 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

--HG--
rename : browser/base/content/test/general/browser_bug408415.js => browser/base/content/test/favicons/browser_bug408415.js
rename : browser/base/content/test/general/browser_bug550565.js => browser/base/content/test/favicons/browser_bug550565.js
rename : browser/base/content/test/general/browser_favicon_change.js => browser/base/content/test/favicons/browser_favicon_change.js
rename : browser/base/content/test/general/browser_favicon_change_not_in_document.js => browser/base/content/test/favicons/browser_favicon_change_not_in_document.js
rename : browser/base/content/test/general/browser_subframe_favicons_not_used.js => browser/base/content/test/favicons/browser_subframe_favicons_not_used.js
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_bug970276_favicon1.ico
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_bug970276_favicon2.ico
rename : browser/base/content/test/general/file_bug970276_popup1.html => browser/base/content/test/favicons/file_bug970276_popup1.html
rename : browser/base/content/test/general/file_bug970276_popup2.html => browser/base/content/test/favicons/file_bug970276_popup2.html
rename : browser/base/content/test/general/file_favicon_change.html => browser/base/content/test/favicons/file_favicon_change.html
rename : browser/base/content/test/general/file_favicon_change_not_in_document.html => browser/base/content/test/favicons/file_favicon_change_not_in_document.html
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_generic_favicon.ico
rename : browser/base/content/test/general/file_with_favicon.html => browser/base/content/test/favicons/file_with_favicon.html
extra : rebase_source : 53dc0c682bf61d5135fbca172ac5238b414a1771
2018-06-04 12:53:55 -07:00
..
aboutcache Bug 1456151 - Apply Meta CSP to Content Privileged about:cache. r=ckerschb, r=Gijs 2018-04-28 09:50:45 -04:00
aboutcheckerboard Bug 1453989 - Apply Meta CSP to Content Privileged about:checkerboard. r=ckerschb,Gijs 2018-04-21 02:16:30 +03:00
aboutmemory Bug 1447951 - Store nsDynamicAtom's chars after the end of the object. r=froydnj 2018-06-22 09:38:42 +10:00
aboutperformance Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
alerts Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
antitracking Bug 1470578 - Rename the anti-tracking pref, r=francois 2018-06-25 22:46:13 +02:00
apppicker
asyncshutdown Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
autocomplete Bug 1467537 - The delete trigger on moz_updateoriginsinsert_temp is recalculating the whole table every time. r=adw 2018-06-08 11:31:13 +02:00
backgroundhangmonitor Bug 1467549 - Disable the BackgroundHangReporter in ASan builds. r=Nika 2018-06-07 12:32:57 -07:00
browser Bug 1446937 - Have ContextForTopLevelLoad return already_AddRefed<nsISupports> within LoadInfo, r=qdot 2018-05-30 21:21:18 +02:00
build Bug 1461965 - Enable xpcshell test coverage for GeckoView Telemetry. r=chutten,froydnj,janerik 2018-06-05 17:01:04 +02:00
captivedetect Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8 2018-05-25 17:02:29 -07:00
cleardata Bug 1268889 - Implement Clear-Site-Data header - part 4 - cleanup image cache, r=aosmond 2018-06-20 11:57:50 -04:00
clearsitedata Bug 1268889 - Implement Clear-Site-Data header - part 2 - pref, r=smaug 2018-06-20 11:57:49 -04:00
cloudstorage Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8 2018-05-25 17:02:29 -07:00
commandlines
contentprefs Bug 1456762 - Remove now unnecessary import-globals-from statements in html files. r=mossop 2018-06-16 08:21:33 +00:00
contextualidentity Backed out 10 changesets (bug 1406181) as per developers request. 2018-06-03 16:10:23 +03:00
crashes Bug 1464773 - Add low-memory event counts to the crash report; r=ted.mielczarek 2018-05-28 10:09:20 +02:00
crashmonitor Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
ctypes Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
diskspacewatcher
downloads Bug 1405428 - skip-if = verify on xpcshell tests which do not pass test-verify. r=gbrown 2018-06-13 11:34:40 -04:00
enterprisepolicies
extensions Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan 2018-06-04 12:53:55 -07:00
feeds Bug 1462937: Update callers to use nsIFile::GetDirectoryEntries as a nsIDirectoryEnumerator. r=froydnj 2018-05-19 20:17:45 -07:00
filewatcher Bug 1467438 - Need to include Scoped.h (unified bustage) on a CLOSED TREE 2018-06-22 18:47:08 -07:00
finalizationwitness
find No bug - Remove unneeded DEBUG_FIND ifdef. r=me 2018-06-25 21:19:31 +02:00
gfx Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
jsoncpp
lz4
maintenanceservice Bug 1457999: Backed out changeset fc8e373f027c for Linux bustage; r=backout CLOSED TREE 2018-05-07 11:21:32 -06:00
mediasniffer
microformats Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8 2018-05-25 17:02:29 -07:00
mozintl Bug 1463673 - Add the expected argument to Assert.throws/rejects for various tests in toolkit/. r=mossop 2018-05-22 19:25:34 +01:00
mozprotocol Bug 1456762 - Add parsing of HTML files to ESLint to discover their script tags and the globals that are imported. r=mossop 2018-06-16 08:20:38 +00:00
narrate Bug 1455674 part 19. Get rid of JS uses of nsIDOMElement. r=qdot 2018-04-26 23:37:34 -04:00
normandy Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
osfile Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj 2018-06-01 10:45:27 +02:00
parentalcontrols Bug 1460210 - Don't use GetProcAddress on Parental Control code. r=dmajor 2018-05-14 10:58:53 +09:00
passwordmgr Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
perf
perfmonitoring Bug 1466121 part 1 - Rename JSCompartment to JS::Compartment. r=luke 2018-06-07 16:44:40 +02:00
places Bug 1470525 - Support for not displaying synced tabs in awesomebar results. r=lina 2018-06-22 15:36:56 -03:00
printing Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
printingui Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
privatebrowsing Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
processsingleton Bug 1462798 - Create a base custom element class that shares the parseXULToFragment helper;r=Paolo 2018-05-19 13:56:06 -07:00
promiseworker
prompts Bug 1456762 - Remove now unnecessary import-globals-from statements in html files. r=mossop 2018-06-16 08:21:33 +00:00
protobuf Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
reader Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan 2018-06-04 12:53:55 -07:00
reflect
remote Bug 1462571 - Check dbus name by dbus_validate_bus_name() before use, r=jhorak 2018-05-18 12:54:03 +02:00
remotebrowserutils Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
reputationservice Bug 1469427 - Add settings shortcuts to download protection. r=gcp 2018-06-18 15:43:54 -07:00
resistfingerprinting Bug 1461933 - Remove ServoBindings.h from ComputedStyleInline.h. r=emilio 2018-05-16 15:35:59 +10:00
satchel Bug 1456762 - Remove now unnecessary import-globals-from statements in html files. r=mossop 2018-06-16 08:21:33 +00:00
search Bug 1405428 - skip-if = verify on xpcshell tests which do not pass test-verify. r=gbrown 2018-06-13 11:34:40 -04:00
securityreporter Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8 2018-05-25 17:02:29 -07:00
sessionstore Bug 1456391 - Part 1: Move nsISessionStoreUtils to Toolkit. r=Nika 2018-04-24 21:52:46 +02:00
startup
statusfilter
telemetry Merge inbound to mozilla-central a=merge 2018-06-22 12:55:04 +03:00
terminator Bug 1296819 - Intermittent valgrind-test | Invalid write of size 4 at mozilla:: / _pt_root / start_thread / clone. r=amarchesini@mozilla.com. 2018-05-31 14:15:39 +02:00
thumbnails Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
timermanager Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
tooltiptext Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
typeaheadfind Bug 1465875 part 3. Eliminate C++ use of nsIDOMNSEditableElement. r=qdot 2018-06-01 22:35:22 -04:00
url-classifier Bug 1467581 - Replace all nsAutoPtrs with UniquePtrs in Safe Browsing code. r=gcp 2018-06-18 13:54:59 -07:00
urlformatter Bug 1463183 - Remove all instances of isUniversalBinary since we no longer build universal binaries for macOS r=spohl 2018-05-31 20:04:23 +05:30
utils Bug 1452533 - JsonSchemaValidator should output URL types as URL objects instead of nsIURIs. r=felipe 2018-06-05 19:20:40 +05:30
viewconfig
viewsource Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8 2018-05-25 17:02:29 -07:00
windowcreator Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs 2018-05-08 18:36:22 -07:00
windowwatcher Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz 2018-05-11 19:46:15 +02:00
workerloader
xulstore Bug 1430023 - Get rid of some remaining localstore.rdf code. r=mossop 2018-05-09 10:49:35 +02:00
moz.build Backed out 4 changesets (bug 1268889) for Windows GTest failures. CLOSED TREE 2018-06-21 16:51:55 +03:00
nsDefaultCLH.js Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
nsDefaultCLH.manifest