Commit Graph

375 Commits

Author SHA1 Message Date
Ryan VanderMeulen
fb0f3ab264 Bug 1473118 - Update pdf.js to version 2.0.661. r=bdahl 2018-07-03 15:15:46 -04:00
Ryan VanderMeulen
32a787f1dd Bug 1472312 - Update pdf.js to version 2.0.641. r=bdahl 2018-06-29 17:02:22 -04:00
Ryan VanderMeulen
0e2ab233f1 Bug 1470790 - Update pdf.js to version 2.0.625. r=bdahl 2018-06-24 20:42:59 -04:00
Ryan VanderMeulen
faba344dd6 Bug 1469362 - Update pdf.js to version 2.0.602. r=bdahl 2018-06-18 15:06:21 -04:00
Ryan VanderMeulen
067b207db8 Bug 1468991 - Update pdf.js to version 2.0.581. r=bdahl 2018-06-15 12:24:14 -04:00
Ryan VanderMeulen
a5b00abdbf Bug 1468331 - Update pdf.js to version 2.0.575. r=bdahl 2018-06-12 09:43:35 -04:00
Joel Maher
d0823df1ef Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Ryan VanderMeulen
d391b96e1b Bug 1467859 - Update pdf.js to version 2.0.550. r=bdahl 2018-06-08 13:58:45 -04:00
Kris Maglione
0847e8227e Bug 1464548: Part 3 - Update callers to use defineLazyGlobalGetters. r=mccr8
MozReview-Commit-ID: 9APGewiDDYB
2018-05-25 17:02:29 -07:00
Andrew McCreight
dd1dbef63e Bug 1351690, part 4 - Only load the stream converter when we try to view a pdf. r=bdahl
This inlines and simplifies the call to XPCOMUtils._getFactory,
because otherwise passing PdfStreamConverter appears to resolve it
immediately, loading the JSM. (The stream converter prototype does not
have a property _xpcom_factory, so there's no need for the check.)

Once that is done, we can just lazily load the stream converter JSM to
keep it from being loaded on startup.

This patch also checks that the stream converter is not loaded at
startup in the main process or the content process, and that PdfJs.jsm
is not loaded at startup in the content process. It needs to be loaded
in the main process to watch for some prefs.

MozReview-Commit-ID: EA0pSgs4AWH
2018-05-22 16:13:47 -07:00
Andrew McCreight
75c9658968 Bug 1351690, part 3 - Move stream converter XPCOM registration constants into the registration file. r=bdahl
As with the last patch, the factory is only used for a single class,
so move the constants closer to where they are used. This will allow
us to register the stream converter without loading the stream
converter JSM.

MozReview-Commit-ID: DRKVtYQOs2J
2018-05-22 15:37:58 -07:00
Andrew McCreight
4b57ae3d8e Bug 1351690, part 2 - Specialize Factory into StreamConverterFactory. r=bdahl
Factory is only ever passed PdfStreamConverter, so specialize the
registration method and rename the class.  Also, classID2 is always
non-null for PdfStreamConverter, so drop the check.

MozReview-Commit-ID: Ts295QTmrm
2018-05-22 15:28:45 -07:00
Andrew McCreight
add39fc1ea Bug 1351690, part 1b - Don't unload the .jsm on unregister. r=bdahl
This patch fixes an intermittent failure in the pdf.js browser chrome
Mochitests, where it runs code inside PdfStreamConverter.jsm and gets
the error "TypeError: getBoolPref is not a function". getBoolPref is a
top-level function inside the JSM.

I couldn't reproduce this, but I suspect that defineModuleGetter would
run, and give us a reference to the PdfStreamConverter converter
object in the JSM. Eventually, we would unload this JSM, and somehow
clear out the top level scope. However, the registration JSM still had
its reference to the Converter object. Eventually we would try to
convert again, using the old JSM, but the scope was cleared out, so it
couldn't find the top level function in the converter JSM.

While I could probably work around this somehow by clearing the global
reference to the old JSM and setting up a new thunk, I think it is
better to simply not do the unload. Unloading a JSM is a weird
operation that we don't use much, and I think the only drawback for
not doing so is that a user that disables PDF.js will continue using a
little more memory during that session.

MozReview-Commit-ID: Lx3QZza5qCM
2018-06-01 11:16:38 -07:00
Andrew McCreight
320fae3d2c Bug 1351690, part 1 - Split out pdf.js stream registration into another jsm. r=bdahl
The goal of these patches is to load neither PdfJs.jsm nor
PdfStreamConverter.jsm in a content process unless the user is viewing
a PDF, to save memory.

This first patch creates a small stub JSM to do the stream
registration, and calls it directly in the content process, avoiding
one way we load PdfJs.jsm. The existing registration methods are kept
for the main process.

MozReview-Commit-ID: 5GH8tjHXfLb
2018-05-18 16:57:59 -07:00
Ryan VanderMeulen
7ffdf5bca6 Bug 1466519 - Update pdf.js to version 2.0.536. r=bdahl 2018-06-04 09:04:46 -04:00
Ryan VanderMeulen
5cc5b9a035 Bug 1464550 - Update pdf.js to version 2.0.517. r=bdahl 2018-05-29 12:23:11 -04:00
Ryan VanderMeulen
62dbd05bba Bug 1459248 - Update pdf.js to version 2.0.506. r=bdahl 2018-05-20 15:50:46 -04:00
Kris Maglione
fd7e9e6a69 Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY
2018-04-22 20:55:06 -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
Ryan VanderMeulen
0826845c0d Bug 1453838 - Update pdf.js to version 2.0.491. r=bdahl, r=yury 2018-04-12 19:29:03 -04:00
Ryan VanderMeulen
b31b43530d Bug 1451562 - Update pdf.js to version 2.0.480. r=bdahl 2018-04-04 17:57:32 -04:00
Ryan VanderMeulen
eb17185337 Bug 1450369 - Update pdf.js to version 2.0.466. r=bdahl 2018-03-30 17:25:35 -04:00
Brendan Dahl
7a24d04a4b Bug 1444499 - Update pdf.js to version 2.0.447. r=yury
MozReview-Commit-ID: 1gbyxWQyGvK
2018-03-20 16:20:03 -07:00
Brendan Dahl
8517dfbb4c Bug 1444499 - Remove checks for global PDFJS. r=yury
MozReview-Commit-ID: AU7hQSP2UyN
2018-03-20 16:09:11 -07:00
Tiberius Oros
2ce14426a7 Merge inbound to mozilla-central. a=merge 2018-03-16 11:53:43 +02:00
Kirk Steuber
d2a4c1e81e Bug 1429160 - Create enterprise policy to disable PDF.js. r=dthayer,felipe 2018-03-07 13:17:07 -08:00
Gijs Kruitbosch
38e03ed37a Bug 1358815 - update pdfjs for async-created findbar, r=bdahl
MozReview-Commit-ID: Byr5B4yAzfx
2018-03-13 11:52:56 +00:00
Coroiu Cristina
b2190285b2 Backed out changeset 7833a7b4a73f (bug 1429160) for browser-chrome failures at enterprisepolicies/tests/browser/browser_policies_sorted_alphabetically.js 2018-03-15 23:35:58 +02:00
Kirk Steuber
ecd7db4c98 Bug 1429160 - Create enterprise policy to disable PDFjs r=dthayer,Felipe
MozReview-Commit-ID: 4Ir407Qjdoq
2018-03-07 13:17:07 -08:00
Brindusan Cristian
a6e62d8ce3 Backed out 2 changesets (bug 1358815) for bc failures on browser_pdfjs_main.js CLOSED TREE
Backed out changeset 880736d97de3 (bug 1358815)
Backed out changeset a2a0a0990e1a (bug 1358815)
2018-03-15 21:23:12 +02:00
Gijs Kruitbosch
a767008864 Bug 1358815 - update pdfjs for async-created findbar, r=bdahl
MozReview-Commit-ID: Byr5B4yAzfx
2018-03-13 11:52:56 +00:00
Ryan VanderMeulen
b4e01d27a8 Bug 1442785 - Update pdf.js to version 2.0.402. r=bdahl 2018-03-02 17:25:38 -05:00
Sebastian Hengst
500c4f7ad2 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)
2018-03-01 11:51:09 +02:00
Peter Van der Beken
972562411b Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz. 2018-02-22 20:22:29 +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
Dorel Luca
9260b212cd Backed out 6 changesets (bug 888600) for Valgrind and build bustge on a CLOSED TREE
Backed out changeset 7c8317f4ad48 (bug 888600)
Backed out changeset 5b990735f1ad (bug 888600)
Backed out changeset 9eafe225b804 (bug 888600)
Backed out changeset 16af80d6cd93 (bug 888600)
Backed out changeset a109987af625 (bug 888600)
Backed out changeset 0949dba396ad (bug 888600)
2018-02-22 13:56:43 +02:00
Peter Van der Beken
5fb60d9c57 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz. 2017-11-23 16:27:27 +01:00
Ryan VanderMeulen
2e3b53c6bd Bug 1439634 - Update pdf.js to version 2.0.385. r=bdahl 2018-02-20 11:26:33 -05:00
Thomas Wisniewski
a244e64db4 Bug 792808 - Change PdfStreamConverter.jsm to import and instantiate XHRs from global properties rather than using Cc.createInstance(Ci.nsIXMLHttpRequest); r=mossop
MozReview-Commit-ID: 3dj92XGY1G2
2017-09-19 12:17:59 -04:00
Timothy Guan-tin Chien
f08391ee76 Bug 1234008 - Recompress some png images with zopflipng r=Dolske,Grisha,jryans
MozReview-Commit-ID: Cr2iMSB04uu
2018-01-27 15:57:42 +08: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
Ryan VanderMeulen
030b6dcbb1 Bug 1435814 - Update pdf.js to version 2.0.332. r=bdahl 2018-02-05 14:24:35 -05:00
Florian Quèze
c5f15a4700 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01: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
Ryan VanderMeulen
7aca63f2d9 Bug 1433810 - Update pdf.js to version 2.0.303. r=bdahl 2018-01-28 16:54:07 -05:00
Ryan VanderMeulen
dcecebb5de Bug 1432027 - Update pdf.js to version 2.0.288. r=bdahl 2018-01-21 09:46:41 -05:00