Commit graph

564 commits

Author SHA1 Message Date
Ryan VanderMeulen
fd1ec3e717 Bug 1636528 - Update pdf.js to version 2.5.153. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D74430
2020-05-08 17:02:43 +00:00
Gijs Kruitbosch
88153109ac Bug 1633790 - pass channels to stream conversion getContentType and always allow PDF.js use for user-opened local PDF files, r=mattwoodrow,jaws
Differential Revision: https://phabricator.services.mozilla.com/D73511
2020-05-06 20:34:51 +00:00
Gijs Kruitbosch
6c3c9b5bf3 Bug 1633790 - allow PDF.js use when we've misled the user into misconfiguring PDF handlers, r=jaws,mattwoodrow
Prior to this patch, PDF.js tracks both its own 'disabled' pref (which is used
by enterprise policy) and whether it is the default handler per the handler
service - but it tracks both in one bool, which determines whether its
streamconverter registers.

Really, what we want is to never use PDF.js if it's preffed off.

However, if there is some other default, it should be acceptable to use PDF.js
in some circumstances, like for <embed> or <object>s where otherwise we
would show no content at all.

Even for toplevel PDFs, if the user has configured Firefox to open PDFs in
an external helper app which is Firefox (which is currently an easy mistake
to make in the unknownContentType dialog), or has it set to the OS default,
but has changed their OS default to Firefox, we really still want to open
those PDFs with PDF.js.

This patch fixes all of this by splitting out the pref tracking from the
handler state tracking. Only the pref will completely disable PDF.js.

Then, in the streamconverter code, we check whether PDF.js should be used for
PDFs, and if there's a misconfiguration that we can correct. This code is
invoked from the parent process when we load PDFs in frames or toplevel
documents, and will prevent us from invoking PDF.js in the child if the user
would prefer that not to happen.

As a driveby, this cleans up how we track the pref inside PDF.js, and how we
get notified of changes to the handler - we were missing changes made in the
unknown content type dialog, so it seemed worth making it generic.

Differential Revision: https://phabricator.services.mozilla.com/D73510
2020-05-06 20:28:36 +00:00
Ian Moody
011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Ryan VanderMeulen
af8f6fcadb Bug 1632623 - Update pdf.js to version 2.5.145. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D72203
2020-05-04 17:26:56 +00:00
Ryan VanderMeulen
12bac77b70 Bug 1630806 - Update pdf.js to version 2.5.95. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D71246
2020-04-17 22:37:35 +00:00
Ryan VanderMeulen
a1da71c534 Bug 1629150 - Update pdf.js to version 2.5.80. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D70557

--HG--
extra : moz-landing-system : lando
2020-04-13 16:01:39 +00:00
Ryan VanderMeulen
4e317e27ab Bug 1627021 - Update pdf.js to version 2.5.49. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D69412

--HG--
extra : moz-landing-system : lando
2020-04-02 18:16:00 +00:00
Ryan VanderMeulen
7bb0df2436 Bug 1625949 - Update pdf.js to version 2.5.42. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D68800

--HG--
extra : moz-landing-system : lando
2020-03-31 21:04:19 +00:00
Jonas Jenwald
7015ab6e16 Bug 1625430 - Allow clean-up of the DOM event dispatching in the PDF Viewer. r=bdahl
As part of the work to clean-up the event dispatching in the PDF Viewer, particularily re-dispatching of internal `EventBus` events to the DOM, this patch is necessary to unblock the upstream work that's currently pending in [PR 11655](https://github.com/mozilla/pdf.js/pull/11655).

Finally, the patch also removes the `ChromeActions.supportsDocumentColors` method given that it's been unused since [bug 1611175](https://bugzilla.mozilla.org/show_bug.cgi?id=1611175) and [PR 11521](https://github.com/mozilla/pdf.js/pull/11521).

Differential Revision: https://phabricator.services.mozilla.com/D68533

--HG--
extra : moz-landing-system : lando
2020-03-27 17:27:30 +00:00
Ryan VanderMeulen
bfb8c00f81 Bug 1624500 - Update pdf.js to version 2.5.23. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D67965

--HG--
extra : moz-landing-system : lando
2020-03-25 15:50:56 +00:00
Ryan VanderMeulen
bdbb0b4ec0 Bug 1622069 - Update pdf.js to version 2.4.445. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D66645

--HG--
extra : moz-landing-system : lando
2020-03-23 15:34:07 +00:00
Ed Lee
acb960676c Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128

--HG--
extra : moz-landing-system : lando
2020-03-13 23:38:52 +00:00
Ryan VanderMeulen
b5c95c8f94 Bug 1620601 - Update pdf.js to version 2.4.407. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D65726

--HG--
extra : moz-landing-system : lando
2020-03-09 19:25:11 +00:00
Mark Banner
15cfe23b88 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703

--HG--
extra : moz-landing-system : lando
2020-03-07 10:09:44 +00:00
Ryan VanderMeulen
832b836f88 Bug 1618875 - Update pdf.js to version 2.4.392. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D64743

--HG--
extra : moz-landing-system : lando
2020-02-28 16:43:57 +00:00
Boris Zbarsky
4750163d3b Bug 911444 part 3. Store the principal a PDF viewer document would have had if the PDF viewer had not messed with the principal. r=bdahl,bholley
Differential Revision: https://phabricator.services.mozilla.com/D63709

--HG--
extra : moz-landing-system : lando
2020-02-27 14:54:53 +00:00
Dorel Luca
1def5d818a Backed out 4 changesets (bug 911444) for Mochitest failures in dom/base/test/test_pdf_print.html. CLOSED TREE
Backed out changeset d156bbaabbd5 (bug 911444)
Backed out changeset a32592af0b11 (bug 911444)
Backed out changeset b96d0a37ed1a (bug 911444)
Backed out changeset fd2e3e8728d9 (bug 911444)
2020-02-25 00:11:50 +02:00
Boris Zbarsky
cf22ea5cf0 Bug 911444 part 3. Store the principal a PDF viewer document would have had if the PDF viewer had not messed with the principal. r=bdahl,bholley
Differential Revision: https://phabricator.services.mozilla.com/D63709

--HG--
extra : moz-landing-system : lando
2020-02-24 21:05:04 +00:00
Ryan VanderMeulen
a9e9474027 Bug 1616560 - Update pdf.js to version 2.4.375. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D63326

--HG--
extra : moz-landing-system : lando
2020-02-19 18:23:01 +00:00
Gijs Kruitbosch
a3d7372669 Bug 1545167 - write default pdf behaviour to handlers.json without going to the OS, r=florian,mkaply
I'm taking the opportunity to remove isDefaultHandlerApp messaging as the
content-side calls were removed in bug 1353029.

Depends on D59788

Differential Revision: https://phabricator.services.mozilla.com/D59789

--HG--
extra : moz-landing-system : lando
2020-02-10 23:52:21 +00:00
Ryan VanderMeulen
fc773ab807 Bug 1614330 - Update pdf.js to version 2.4.349. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D62255

--HG--
extra : moz-landing-system : lando
2020-02-10 21:13:02 +00:00
Narcis Beleuzu
c8f08e0930 Backed out 2 changesets (bug 1547693, bug 1545167) for xpcshell failures on test_handlerService.js . CLOSED TREE
Backed out changeset 0e6e758f47b5 (bug 1545167)
Backed out changeset f74a32d5753a (bug 1547693)
2020-02-06 18:49:44 +02:00
Gijs Kruitbosch
f3a6914b76 Bug 1545167 - write default pdf behaviour to handlers.json without going to the OS, r=florian,mkaply
I'm taking the opportunity to remove isDefaultHandlerApp messaging as the
content-side calls were removed in bug 1353029.

Depends on D59788

Differential Revision: https://phabricator.services.mozilla.com/D59789

--HG--
extra : moz-landing-system : lando
2020-01-23 15:27:26 +00:00
Ryan VanderMeulen
20e7951d6c Bug 1613426 - Update pdf.js to version 2.4.326. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D61713

--HG--
extra : moz-landing-system : lando
2020-02-05 17:18:48 +00:00
Ryan VanderMeulen
3adabd99a5 Bug 1611175 - Update pdf.js to version 2.4.292. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D60852

--HG--
extra : moz-landing-system : lando
2020-02-04 16:46:55 +00:00
shindli
fca74ac308 Bug 1603014 - unskip browser_pdfjs_zoom.js on mac r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D59271

--HG--
extra : moz-landing-system : lando
2020-01-15 07:53:22 +00:00
Ryan VanderMeulen
5af29b2e62 Bug 1608186 - Update pdf.js to version 2.4.264. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D59379

--HG--
extra : moz-landing-system : lando
2020-01-10 21:29:12 +00:00
Kris Maglione
d85d1fedb7 Bug 1603014: Wait for content tasks to add listener before triggering things they're listening for. r=mccr8
SpecialPowers.spawn bounces tasks off SpecialPowersParent before sending them
to SpecialPowersChild, which means that any operations which are sent
immediately afterwards and take a more direct route (like zoom changes) will
get to the content process before the task starts running. In the case of
tasks which depending on registering a listener before said operations take
place, this is obviously a problem.

So this patch fixes those cases in this test to wait for the listeners to be
setup before continuing.

Differential Revision: https://phabricator.services.mozilla.com/D57870

--HG--
extra : moz-landing-system : lando
2020-01-05 00:38:19 +00:00
Brindusan Cristian
3a213de941 Bug 1603014 - Disable on OSX for frequent failures. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D58698

--HG--
extra : moz-landing-system : lando
2020-01-05 11:51:47 +00:00
Michael Kaply
ce18ace1e4 Bug 1599935 - Make unsupported PDF features a warning. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D55527

--HG--
extra : moz-landing-system : lando
2020-01-02 18:30:16 +00:00
Ryan VanderMeulen
c0c02a8427 Bug 1606634 - Update pdf.js to version 2.4.254. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D58521

--HG--
extra : moz-landing-system : lando
2020-01-02 18:20:07 +00:00
Matt Woodrow
a925a86ada Bug 1574372 - Add API to test stream converters to find out their output type. r=bzbarsky
We don't want to run stream conversion in the parent (since a lot of them require access to the document), so this instead adds a way to find out what their output type will be.

Differential Revision: https://phabricator.services.mozilla.com/D56134

--HG--
extra : moz-landing-system : lando
2019-12-17 03:02:02 +00:00
Oana Pop Rus
5545e5a016 Backed out 9 changesets (bug 1574372) for bustage and wpt failures. on a CLOSED TREE
Backed out changeset b0183a606fec (bug 1574372)
Backed out changeset b7c96254826e (bug 1574372)
Backed out changeset 196d61adc272 (bug 1574372)
Backed out changeset 419b94b1210e (bug 1574372)
Backed out changeset c192e499eb47 (bug 1574372)
Backed out changeset 4e57038c3518 (bug 1574372)
Backed out changeset 6ec2aa542b59 (bug 1574372)
Backed out changeset d71b4c0aac1a (bug 1574372)
Backed out changeset a05c3b113ac1 (bug 1574372)
2019-12-17 03:26:38 +02:00
Matt Woodrow
d1851fa263 Bug 1574372 - Add API to test stream converters to find out their output type. r=bzbarsky
We don't want to run stream conversion in the parent (since a lot of them require access to the document), so this instead adds a way to find out what their output type will be.

Differential Revision: https://phabricator.services.mozilla.com/D56134

--HG--
extra : moz-landing-system : lando
2019-12-16 21:40:06 +00:00
Kris Maglione
3cb2072737 Bug 1596918: Part 4e - Fix callers which rely on frame message manager globals. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53746

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:40 +00:00
Kris Maglione
94e3b0bd8d Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-13 20:36:16 +00:00
Emma Malysz
be0238569b Bug 1601090, rename .xul files to .xhtml in toolkit/mozapps r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D55837

--HG--
rename : toolkit/mozapps/downloads/content/unknownContentType.xul => toolkit/mozapps/downloads/content/unknownContentType.xhtml
rename : toolkit/mozapps/extensions/content/blocklist.xul => toolkit/mozapps/extensions/content/blocklist.xhtml
rename : toolkit/mozapps/extensions/content/extensions.xul => toolkit/mozapps/extensions/content/extensions.xhtml
rename : toolkit/mozapps/handling/content/dialog.xul => toolkit/mozapps/handling/content/dialog.xhtml
rename : toolkit/mozapps/update/content/updateElevation.xul => toolkit/mozapps/update/content/updateElevation.xhtml
extra : moz-landing-system : lando
2019-12-12 16:30:59 +00:00
Ryan VanderMeulen
0e1aa31bb9 Bug 1602858 - Update pdf.js to version 2.4.176. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D56568

--HG--
extra : moz-landing-system : lando
2019-12-11 22:59:06 +00:00
shindli
91924fedc7 Backed out 9 changesets (bug 1596918) for causing mochitest permafailures in toolkit/content/tests/chrome/test_findbar_events.xhtml CLOSED TREE
Backed out changeset 45a1c42118f2 (bug 1596918)
Backed out changeset db09910ffa56 (bug 1596918)
Backed out changeset 5c9d9f141c10 (bug 1596918)
Backed out changeset 6a135670d603 (bug 1596918)
Backed out changeset 3a0184e0df72 (bug 1596918)
Backed out changeset 2f0036486823 (bug 1596918)
Backed out changeset a770c6d08d52 (bug 1596918)
Backed out changeset ef062eb7a6ee (bug 1596918)
Backed out changeset a6ea596e98db (bug 1596918)
2019-12-11 03:09:26 +02:00
Kris Maglione
d7164b11c3 Bug 1596918: Part 4e - Fix callers which rely on frame message manager globals. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53746

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:28 +00:00
Kris Maglione
16a9b29848 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-10 23:07:13 +00:00
Noemi Erli
82d41a33b2 Backed out 9 changesets (bug 1596918) for causing multiple browser-chrome failures
Backed out changeset 415007efd8c9 (bug 1596918)
Backed out changeset 011eb5ce927b (bug 1596918)
Backed out changeset e5fd3ee22ea1 (bug 1596918)
Backed out changeset 0bca4de31d40 (bug 1596918)
Backed out changeset 11ec4393f23d (bug 1596918)
Backed out changeset c5404a7c286d (bug 1596918)
Backed out changeset 7e9304405a46 (bug 1596918)
Backed out changeset fa0f0aeabf99 (bug 1596918)
Backed out changeset de196b077000 (bug 1596918)
2019-12-07 22:26:43 +02:00
Kris Maglione
63b8ddb1c0 Bug 1596918: Part 4e - Fix callers which rely on frame message manager globals. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53746

--HG--
extra : moz-landing-system : lando
2019-12-07 18:44:35 +00:00
Kris Maglione
910eab35d2 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-07 19:11:58 +00:00
Daniel Varga
84a601a6d4 Backed out 17 changesets (bug 1596918) for multiple browser-chrome and dev-tools failures. On a CLOSED TREE
Backed out changeset ab87d2c1afae (bug 1596918)
Backed out changeset 775f3b06a687 (bug 1596918)
Backed out changeset 67cc63ef5d7f (bug 1596918)
Backed out changeset 7d290bcd2067 (bug 1596918)
Backed out changeset 048db9f4db7c (bug 1596918)
Backed out changeset 96a79d2ba614 (bug 1596918)
Backed out changeset be770d112dd8 (bug 1596918)
Backed out changeset 302c8ab8391c (bug 1596918)
Backed out changeset 44ef8f20732e (bug 1596918)
Backed out changeset 38c11ebfb8ff (bug 1596918)
Backed out changeset b586fc081374 (bug 1596918)
Backed out changeset 12283166716f (bug 1596918)
Backed out changeset 99b0421015d8 (bug 1596918)
Backed out changeset 97ec49dbbbf3 (bug 1596918)
Backed out changeset ec79478f58f1 (bug 1596918)
Backed out changeset c6d356833bb8 (bug 1596918)
Backed out changeset 5ef6026806c8 (bug 1596918)
2019-12-07 03:12:07 +02:00
Kris Maglione
41c61c2bb9 Bug 1596918: Part 4e - Fix callers which rely on frame message manager globals. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D53746

--HG--
extra : moz-landing-system : lando
2019-12-06 22:15:29 +00:00
Kris Maglione
20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

Differential Revision: https://phabricator.services.mozilla.com/D53740

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +00:00
Ryan VanderMeulen
df44a5ec51 Bug 1600994 - Update pdf.js to version 2.4.163. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D55694

--HG--
extra : moz-landing-system : lando
2019-12-05 17:12:56 +00:00
Ryan VanderMeulen
ecce4a80cd Bug 1598435 - Update pdf.js to version 2.4.152. r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D54182

--HG--
extra : moz-landing-system : lando
2019-11-26 19:45:52 +00:00