Граф коммитов

288 Коммитов

Автор SHA1 Сообщение Дата
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
kanika e0c4b56af2 Bug 1428847 - Move is_hidden and is_visible helper functions into BrowserTestUtils.jsm. r=johannh
MozReview-Commit-ID: 2xshA0CAPgY

--HG--
extra : rebase_source : ac908827986cdee251a454c0cd366a59c5cfdac0
2018-03-22 21:14:23 +05:30
Gijs Kruitbosch f777f77f9c Bug 1467742 - update reader mode code and tests for readability updates, r=jaws
The phrasing content change means that the contents of <div id="foo"> were being put
in their own paragraph inside that div, and then later the singly nested <div><p></p></div>
is unnested and we throw the div away, thus losing the ID attribute, which causes the
browser_readerMode_with_anchor test to fail. The test document is a bit abstract and
I doubt this will be an issue in practice, though I filed
https://github.com/mozilla/readability/issues/460 to copy the id attribute across for
cases where the inner <p> has no such attribute (which would preserve the
id in this case).

MozReview-Commit-ID: 8XBKFiYllxY

--HG--
extra : rebase_source : 8aa713bced0dfb517de5a6a4463356741eb3c5a0
2018-06-08 12:54:35 +01:00
Gijs Kruitbosch 69f3da3ddd Bug 1467742 - update readability from github rev 8fec62d246f563090f5711c02907e2bea7ce96f8, r=jaws
MozReview-Commit-ID: JPdLWPyToCb

--HG--
extra : rebase_source : 701ba8ee87bddbbcb4acb169615600162cc32d1b
2018-06-08 11:57:03 +01:00
Kris Maglione 7b7264f453 Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB

--HG--
extra : rebase_source : 2931dd0eec0e4206414b698a9700fc20d922eb3a
2018-05-25 17:02:29 -07:00
Bianca Danforth ae0a7bc371 Bug 1465698 - Add readermode event probes for Savant Shield study; r=jaws
These probes will register and record (for the duration of the study only):
* When the user turns on Reader Mode.
* When the user turns off Reader Mode.

Note: The events are recorded in the content process.

MozReview-Commit-ID: BNEYW3TP1aN

--HG--
extra : rebase_source : 2474bdf3e10e960ab5264804dbf693c5bd3b6ac1
2018-06-06 03:56:32 -07:00
Gijs Kruitbosch b19e00359f Bug 1456652 - use triggering principal when leaving reader mode, r=mgoodwin
--HG--
extra : rebase_source : f3b86433b44551c75f0fc4f4d835fe07eb411efd
2018-04-26 12:30:34 +01:00
Kris Maglione a7b308c3a2 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

--HG--
extra : rebase_source : cffb1c9762191c579d1397c8169e6e7635d229da
extra : histedit_source : dea59ddd2daaae52069c5faceae9149a4f08dd73
2018-04-24 20:18:09 -07:00
Francois Marier 1ab2ebf84b Bug 1453818 - Add test for same-site cookies in reader mode. r=ckerschb,Gijs
MozReview-Commit-ID: 58j7geRM6KW

--HG--
extra : rebase_source : 8e8faf01d1d7a1afe12ca69604b47b267c95bd39
2018-04-17 13:40:18 -07:00
Cosmin Sabou bbd97ff8de Backed out changeset fd0857bfc9d4 (bug 1453818) for ESlint failure on browser_bug1453818_samesite_cookie.js. CLOSED TREE 2018-04-20 00:13:20 +03:00
Francois Marier d30ce800d1 Bug 1453818 - Add test for same-site cookies in reader mode. r=ckerschb,Gijs
MozReview-Commit-ID: 58j7geRM6KW

--HG--
extra : rebase_source : 11029ae7ffe9d246e19e25a03a8f7931491672c8
2018-04-17 13:40:18 -07:00
Marco Bonardo dbde0c7df9 Bug 1453580 - Remove promiseFaviconLinkUrl and fix its consumers. r=Gijs
MozReview-Commit-ID: GrY8s3l71Mp

--HG--
extra : rebase_source : 6f5ec9404f12eb988501df56c7ee264ade2b054c
2018-04-16 18:24:06 +02:00
Dorel Luca c4fec6222b Backed out changeset 897bbf35e781 (bug 1453580) for XPCShell failure on services/sync/tests/unit/test_syncedtabs.js. CLOSED TREE 2018-04-18 14:06:34 +03:00
Marco Bonardo b00d20562d Bug 1453580 - Remove promiseFaviconLinkUrl and fix its consumers. r=Gijs
MozReview-Commit-ID: GrY8s3l71Mp

--HG--
extra : rebase_source : e8a1adb7c1004eaefddc42d12048d445eecd6530
2018-04-16 18:24:06 +02:00
Nika Layzell 4464c02334 Bug 1434768 - Part 3: Rewrite JS consumers of .sessionHistory, r=bz 2018-04-10 17:49:45 -04:00
Boris Zbarsky 5171e626a4 Bug 1452235 part 3. Stop using nsIDOMSerializer from JS. r=qdot
MozReview-Commit-ID: JbWGcfbmM4b
2018-04-09 16:30:32 -04:00
Kris Maglione 313b707b2e Bug 1443964: Part 3 - Remove no-cpows-in-tests rule. r=mconley
The shims that this rule tests for no longer exist.

MozReview-Commit-ID: DMgP7Hczavc

--HG--
extra : rebase_source : 765ddd5c62c9449c07ed050e44d86a3bd5c0ae64
extra : amend_source : 627a7694ac07182200f876901ded7a34721cd228
2018-03-07 19:31:28 -08:00
Kris Maglione 83957914cc Bug 1445551: Part 1b - Whitelist unsafe CPOW use in existing tests. r=mconley
MozReview-Commit-ID: 4ojwvjw9XGT

--HG--
extra : rebase_source : f7b79ad5998f1138266e89767ee1b434e4797b30
2018-03-14 14:35:05 -07:00
Gijs Kruitbosch 4340ba60f2 Bug 1444082 - sync reader mode to github tip ( 8525c6af36d3badbe27c4672a6f2dd99ddb4097f ), r=johannh
MozReview-Commit-ID: LZLFf9kyUR5

--HG--
extra : rebase_source : 9f2e517afa764dbe339b84abfaaf948b1402cba1
2018-03-08 14:35:02 +00:00
Mark Banner 0722fe3ee3 Bug 1434869 - Automatically mark EXPORTED_SYMBOLS as used, so that we don't need to ignore it in ESLint's no-unused-vars rule. r=florian.
MozReview-Commit-ID: IVMeZHGdVBk

--HG--
extra : rebase_source : 0705e96256baf6dc82811297058aa1d820b2f119
2018-03-06 12:01:59 +00:00
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Christoph Kerschbaumer 72ce8edf3d Bug 1436808: Apply Meta CSP to content privileged about: pages. r=gijs,freddyb 2018-02-09 11:42:21 +01:00
Mark Banner 606beee3f2 Bug 1230369 - Manually fix some remaining instances of Ci/Cc/Cu definitions and switch Components.* to using the shorthand in some places. r=florian
MozReview-Commit-ID: 9SmoR9RlvZE

--HG--
extra : rebase_source : 054e14150921615ed67415ddb91b45169cc868d4
2018-02-07 09:24:15 +00:00
Andrew McCreight 5dec0e0beb 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

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Sebastian Hengst adbe513381 Bug 1431533: Part 5z - Use ChromeUtils import methods at positions highlighted by eslint after merge. a=eslint-fix 2018-01-31 02:02:52 +02:00
arthur.iakab c4dd80eca3 Merge mozilla-central to autoland 2018-01-31 00:41:58 +02:00
Gijs Kruitbosch 1c557b83fe Bug 1420714 - fix favicon fetching in reader mode, r=mak
MozReview-Commit-ID: KZFoKNqVPPy

--HG--
extra : rebase_source : 802b0140f3069013130d042167c7f08d615730b7
2018-01-30 15:13:23 +00:00
Kris Maglione 19a956c2c6 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
extra : amend_source : 09a90b29837e339eec7bdf8504f86c28e74ca3dd
extra : intermediate-source : a1eca62826a1341ca24d4d2a93d4884d4fc7ad51
extra : histedit_source : eb26e73b531f9a34d3401d39f60b533b27b78540
2018-01-18 16:27:26 -08:00
Kris Maglione 918ed6c474 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 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 e050496c59 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
extra : amend_source : d0515fe4eb13b59cc490ca9d964ad9ee15ef3cd3
extra : intermediate-source : 6e56f4c8843ed134b2dba34fb007298fd55be966
extra : histedit_source : 88abf9f4ea4e740a9391278625ef07395205c3f5%2Cc14bc7a71eb413fcb573ed0d030fd7f99a1468f0
2018-01-18 16:27:26 -08:00
Kris Maglione 6476f95b13 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

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb 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 e70d01a9e9 Bug 1431533: Part 5b - Fix ESLint errors left over after rewrite. r=florian
MozReview-Commit-ID: 7bVI1iM6hor

--HG--
extra : rebase_source : 6286dcfd1a7c970272ac6befaccd3e47e90d2f6b
extra : intermediate-source : d48657228a0b84cf3a37a35227ca3b3d0bd2a017
extra : source : 0b97a30cadb1a96d3cafae6b79ef0d3ec26770cf
2018-01-18 16:27:26 -08:00
Kris Maglione c276bb9375 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

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Gijs Kruitbosch fa8d818e47 Bug 1425270 - update readability from github commit fa9d8bda48ee574bcffbc19d68b4ca39e1f9036a, rs=already-reviewed
--HG--
extra : rebase_source : 0d5e3c74b166f50425ffa5e6afd5efbf52810b51
2017-12-14 11:26:53 -06:00
Bill McCloskey 9f4d083047 Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)
MozReview-Commit-ID: 2nQPOSGTr1s
2017-12-07 12:55:24 -08:00
Andreea Pavel 89531e8dc3 Backed out 9 changesets (bug 1412456) for crashing talos g2 and unexpected network connections in browser-chrome's browser_searchEngine_behaviors.js r=backout a=backout on a CLOSED TREE
Backed out changeset 0c01a98f4fd5 (bug 1412456)
Backed out changeset 27077db47231 (bug 1412456)
Backed out changeset f35ec2a884f8 (bug 1412456)
Backed out changeset 602b30ac3c69 (bug 1412456)
Backed out changeset b1ff1050c589 (bug 1412456)
Backed out changeset f100d953f9eb (bug 1412456)
Backed out changeset d85af60fe259 (bug 1412456)
Backed out changeset 736f38486832 (bug 1412456)
Backed out changeset 13a637602dc2 (bug 1412456)
2017-12-07 12:20:21 +02:00
Bill McCloskey bef7c122df Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)
MozReview-Commit-ID: 2nQPOSGTr1s
2017-12-06 21:17:05 -08:00
Dorel Luca eb65c24c7b Backed out 8 changesets (bug 1412456) for ESlint failure on browser_urlbarKeepStateAcrossTabSwitches.js:13:49 r=backout on a CLOSED TREE
Backed out changeset 0e88de036c55 (bug 1412456)
Backed out changeset 49b93f807db0 (bug 1412456)
Backed out changeset 039e980b7dc6 (bug 1412456)
Backed out changeset c7698410ddbd (bug 1412456)
Backed out changeset e56a1ba26b7c (bug 1412456)
Backed out changeset 0c4506e124ac (bug 1412456)
Backed out changeset a7aec2ce903b (bug 1412456)
Backed out changeset 3e9fb71f1e8e (bug 1412456)
2017-12-07 07:09:33 +02:00
Bill McCloskey be77cf4a01 Bug 1412456 - Test changes to no longer use interposition (r=felipe,bgrins,mrbkap)
MozReview-Commit-ID: 2nQPOSGTr1s
2017-12-06 20:46:58 -08:00
Gijs Kruitbosch fede8c406c Bug 1396565, make reader mode fetch the article from within the content process on desktop, r=jaws
MozReview-Commit-ID: 11uTaQYwz2Y

--HG--
extra : rebase_source : 211b23a9f1e56e8573ef68062ad6135a0ce70775
2017-11-14 16:53:55 +00:00
Cameron McCormack 544acb33d3 Bug 1417837 - Part 3: Replace all IDs in about:reader documents with class names. r=Gijs
Since the readerized article content will have its class names stripped
but will retain its original IDs, and we don't want our aboutReader.css
rules targetting UI elements to match anything in the article.

MozReview-Commit-ID: JuXTo8Nth5Q

--HG--
extra : rebase_source : dde58f56e55f82ddda364ec5978e43fe71be875c
2017-11-30 11:55:32 +08:00
Cameron McCormack b8a6e87467 Bug 1417837 - Part 2: Preserve class names in readerized output that we use in aboutReader.css. r=Gijs
MozReview-Commit-ID: 7qV2SRHeeOJ

--HG--
extra : rebase_source : ca8b15ef9ceb95da5f7b1d985ba60cfb594bfd3e
2017-11-21 11:54:25 +08:00
Cameron McCormack 0c46625eab Bug 1417837 - Part 1: De-scope about:reader style sheets. r=Gijs
MozReview-Commit-ID: 8C65ljtFDrh

--HG--
extra : rebase_source : 442d8cbaf7f7252b6b6393845d2d09e265678ae9
2017-11-16 17:58:37 +08:00
Dorel Luca 5343debb6a Backed out 3 changesets (bug 1417837) for failing browser/chrome/test_media_playback.html r=backout on a CLOSED TREE
Backed out changeset 9556f12b4058 (bug 1417837)
Backed out changeset 49a463e85e42 (bug 1417837)
Backed out changeset 7a76f2363663 (bug 1417837)
2017-12-04 14:59:31 +02:00
Cameron McCormack 824f088ce8 Bug 1417837 - Part 3: Replace all IDs in about:reader documents with class names. r=Gijs
Since the readerized article content will have its class names stripped
but will retain its original IDs, and we don't want our aboutReader.css
rules targetting UI elements to match anything in the article.

MozReview-Commit-ID: JuXTo8Nth5Q

--HG--
extra : rebase_source : a5987d80f45c3ec5192c1aa5da772a05cfda79ff
2017-11-30 11:55:32 +08:00
Cameron McCormack e7abc5fa5f Bug 1417837 - Part 2: Preserve class names in readerized output that we use in aboutReader.css. r=Gijs
MozReview-Commit-ID: 7qV2SRHeeOJ

--HG--
extra : rebase_source : ca8b15ef9ceb95da5f7b1d985ba60cfb594bfd3e
2017-11-21 11:54:25 +08:00
Cameron McCormack 311c671019 Bug 1417837 - Part 1: De-scope about:reader style sheets. r=Gijs
MozReview-Commit-ID: 8C65ljtFDrh

--HG--
extra : rebase_source : 442d8cbaf7f7252b6b6393845d2d09e265678ae9
2017-11-16 17:58:37 +08:00