gecko-dev/browser/components/sessionstore
Dave Townsend d8b7fb22e3 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

--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 : 6372b2681a59d267f966e9fa2ca9a54e3ff0cea0
extra : intermediate-source : b11aa832c41ac5beef9065f804d11fb7c9887990
extra : source : 638eb8a41245f6d9932861afda21edd5e0b2618a
2018-06-28 16:06:09 -07:00
..
content Bug 1458119: Part 1: Use idleDispatch to be independent from a content window. r=mikedeboer 2018-05-27 11:21:49 -07:00
test Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy 2018-06-28 16:06:09 -07:00
ContentRestore.jsm Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8 2018-04-22 20:55:06 -07:00
DocShellCapabilities.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
GlobalState.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
jar.mn
moz.build Bug 1456391 - Part 7: Move PrivacyFilter to Toolkit. r=mikedeboer 2018-04-25 22:33:50 +02:00
nsISessionStartup.idl Bug 1403648 - focus the urlbar at first paint without waiting for a promise to resolve in most cases, r=johannh. 2018-02-14 22:15:05 +01:00
nsSessionStartup.js Bug 603903 - Part 2: restore session when restarted by Windows r=mikedeboer 2018-05-15 18:28:08 -07:00
nsSessionStartup.manifest Bug 1450559 - Remove nsISessionStore in favor of SessionStore.jsm. r=mikedeboer 2018-04-05 16:30:48 +02:00
RecentlyClosedTabsAndWindowsMenuUtils.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
RunState.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
SessionCookies.jsm Bug 1434252 - nsICookieService may throw an error in certain circumstances, so let's make SessionCookies::restore infallible. r=dao 2018-05-17 19:09:08 +02:00
SessionFile.jsm Bug 1456686: Part 1 - Fix unused and shadowed explicit imports. r=standard8 2018-04-24 20:18:09 -07:00
SessionMigration.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
SessionSaver.jsm Bug 1456391 - Part 7: Move PrivacyFilter to Toolkit. r=mikedeboer 2018-04-25 22:33:50 +02:00
SessionStorage.jsm Bug 1440094 - Remove imports to Console.jsm that only access the 'console' object;r=mossop 2018-02-27 11:29:59 -08:00
SessionStore.jsm Bug 1422588 fix discard if tab sessionstate is not ready, r=Gijs,mikedeboer 2018-06-19 10:47:25 -04:00
SessionWorker.js Bug 1411368 - Automatically fix no-multi-spaces issues raised when using ESLint 4. r=mossop 2017-10-26 11:47:01 +01:00
SessionWorker.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
StartupPerformance.jsm Bug 1440094 - Remove imports to Console.jsm that only access the 'console' object;r=mossop 2018-02-27 11:29:59 -08:00
TabAttributes.jsm Bug 1458383 - Don't session restore browser.mediaBlocked. r=mikedeboer 2018-05-04 16:22:16 +12:00
TabState.jsm Bug 1458383 - Don't session restore browser.mediaBlocked. r=mikedeboer 2018-05-04 16:22:16 +12:00
TabStateCache.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
TabStateFlusher.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00