Commit Graph

14 Commits

Author SHA1 Message Date
Calixte Denizet
ea1d090109 Remove <base> tag from the Firefox built-in viewer (bug 1821408)
The tag <base> is used to resolve relative URIs within the document.
Newly added SVG filters use a relative URI which then use the URI in base
but this one mismatches with the document URI and consequently filters are
not found in the Firefox viewer.
So this patch just removes <base> and replace few relative URLs by absolute
ones.
2023-03-14 10:12:42 +01:00
Jonas Jenwald
249b199ff1 Stop bundling the ReadableStream polyfill in MOZCENTRAL builds (PR 10470 follow-up)
Based on the discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1521413, this patch simply removes the `ReadableStream` polyfill completely from MOZCENTRAL builds.

With this patch, the size of the `gulp mozcentral` build target is thus further reduced (building on PR 10470):

|       | `build/mozcentral`
|-------|-------------------
|master |   3 339 666
|patch  |   3 209 572
2019-01-23 20:33:20 +01:00
Jonas Jenwald
480110625a Try to, completely, avoid loading the ReadableStream polyfill in MOZCENTRAL builds
With https://bugzilla.mozilla.org/show_bug.cgi?id=1505122 landing in Firefox 65, the native `ReadableStream` implementation is now enabled by default in Firefox.

Obviously it would be nice to simply stop bundling the polyfill in MOZCENTRAL builds altogether, however given that it's still possible to disable[1] `ReadableStream` this is probably not a good idea just yet.
Nonetheless, now that native support is available, it seems unnecessary (and wasteful) to keep bundling the polyfill twice[2] in MOZCENTRAL builds. Hence this patch, which contains a suggest approach for packing the polyfill in a *separate* file which is then *only* loaded if/when needed.

With this patch, the size of the `gulp mozcentral` build target is thus reduced accordingly:

|       | `build/mozcentral`
|-------|-------------------
|master |   3 461 089
|patch  |   3 340 268

Besides the PDF.js files taking up less space in Firefox this way, the additional benefit is that there's (by default) less code that needs to be loaded and parsed when the PDF Viewer is used which also cannot hurt.

---
[1] In `about:config`, by toggling the `javascript.options.streams` preference.

[2] Once in the `build/pdf.js` file, and once in the `build/pdf.worker.js` file.
2019-01-19 09:05:01 +01:00
Yury Delendik
5438ce9b98 Wraps mozL10n to async calls; splits firefox and generic l10n libs. 2017-05-31 09:22:25 -05:00
Tim van der Meij
edb2eecdc8 Remove XHTML leftovers from the viewer HTML files 2016-02-14 13:23:34 +01:00
Michał Gołębiowski
e625af3fef Remove type="text/javascript" from script tags.
"text/javascript" is not a correct MIME type (the correct one is
"application/javascript") but it's not even needed; all browsers default
to the correct type and treat it as executable JS when type is ommited.
Since not all browsers recognize the "application/javascript" MIME type
the only way to both stay compliant and to support all popular browsers
is to omit the type. It's also shorter this way.
2014-05-13 02:41:01 +02:00
Yury Delendik
689927282e Removes reference to the Makefile 2014-04-15 08:27:35 -05:00
Brendan Dahl
babd8df176 Un-inline pdf.js for the extension/mozcentral and remove fetch pdf by content code. 2012-10-29 12:44:18 -07:00
Brendan Dahl
492fa6edb4 Add the new preprocessor. 2012-08-01 11:55:39 -07:00
Yury Delendik
89156cec89 Fallback locale string for JS code; simplify locale embedding for the extension 2012-05-04 08:37:08 -05:00
Yury Delendik
bc094a84f4 Keeping l10n.js file reference; removing temp/unused files 2012-04-30 22:06:54 -05:00
Yury Delendik
00543a1c89 Embed locale.properties in the viewer.html for extension 2012-04-30 21:55:21 -05:00
Yury Delendik
9b8b3bd25f Initial localization 2012-04-30 15:29:05 -05:00
Brendan Dahl
178b89342a Switch to stream converter for extension. 2012-01-23 16:50:45 -08:00