7 years ago
6 years ago


(Reporter: bdahl, Assigned: bdahl)


Firefox 17
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)

Comment hidden (empty)

Comment 1

7 years ago
Release Notes
#1899 Catch errors when parsing the linearization header.
#1901 Sync up a few files with mozcentral.  Address mozcentral review comments.
#1903 Also check abbreviation for colorspace in jpegs.
#1839 Speedup textLayer creation
#1915 Don't trigger TODO on marked content.
#1910 Support more type 1 font hsbw formats.
#1909 Prevent the error callback from being called twice when getPdf fails because of a cross domain request.
#1892 Add support for type 1 seac charstring command.
#1840 Moves loading of the binary PDF data to the worker
#1926 Allow relative URLs in getDocument
#1919 Updated Japanese locale
#1939 Update danish locale
#1938 Presentation Mode - Replaces #1388
#1952 Fixes Shading.Dummy return type
#1942 Workaround Opera background style in <select> element.
#1908 Fix initial scroll direction detection.
#1947 Fix loading of the font widths
#1956 Clean up the test manifest file.
#1958 Update Spanish l10n
#1961 Use timeout for font ready callback to avoid intermittent chrome failure
#1957 Sanitize the document info.
#1964 Improved page tracking on scrolling [squashed]
#1965 Added .DS_Store reference in gitignore file
#1953 Add B2G build and new preprocessor.
#1963 Fix some minor issues/nits detected by JetBrains' WebStorm inspector.
#1962 Adds overrideMimeType for IE10 and discontinues readAsBinaryString use
#1967 Cleanup references to dom elements.
#1974 Changing cubic spline interpolation error to TODO
#1972 Finds correct window/notification box for fallback message
#1971 Using fast pixels copy in putBinaryImageData
#1981 Update Japanese l10n
#1976 Marks xref entries with offset 0 as free
#1977 Adds callothersubr support
#1978 Fixes bias calculation for type2 subr
#1975 Simulate support of data URIs for IE10
#1979 Discards invalid values for Blues
#1992 Stop streams from being sent from worker for indexed color spaces.
#2002 Adds textlayer debug modes
#2001 Adds stub of the PdfJs.jsm
#2005 Removes horizontal lines in scanned images
#1943 Implements loading PDF data by extension/chrome
#1999 Add carriage return checks to make.js.
#2009 Correct gjslint warnings in builder.js.
#2010 [cherry-pick #1997] Update src/fonts.js
#2012 Bump version to 0.4

Try Run:

Comment 2

7 years ago
Posted patch pdf.js 0.4.3 (obsolete) — Splinter Review
As usual most of the changes are in content only code, but there has been a change to pdfstreamconverter.js.  We now load the pdf in chrome code and send it to the content code (see
Attachment #654256 - Flags: review?(dtownsend+bugmail)

Comment 3

7 years ago
Posted patch pdf.js 0.4.11Splinter Review
Small fix for when servers report a bad length or offset.
Attachment #654256 - Attachment is obsolete: true
Attachment #654256 - Flags: review?(dtownsend+bugmail)
Attachment #654822 - Flags: review?(dtownsend+bugmail)
Comment on attachment 654822 [details] [diff] [review]
pdf.js 0.4.11

Review of attachment 654822 [details] [diff] [review]:

::: browser/extensions/pdfjs/components/PdfStreamConverter.js
@@ +327,5 @@
> +    }
> +    if (!notificationBox) {
> +      log('Unable to get a notification box for the fallback message');
> +      return;
> +    }

This is ok for now but I don't think you need the loop here, you can just directly get the main window for the child document using something like this

I think there may also be a frameElement property on one of those interfaces that gives you the browser element for the child window too.
Attachment #654822 - Flags: review?(dtownsend+bugmail) → review+

Comment 5

7 years ago
Thanks, for the review.  I opened an issue on github for the feedback and we'll update in the next version.
Keywords: checkin-needed
Last Resolved: 7 years ago
Resolution: --- → FIXED
Blocks: 782217
Blocks: 776026

Comment 8

7 years ago
     // Keep the URL the same so the browser sees it as the same.
     channel.originalURI = aRequest.URI;
     channel.asyncOpen(proxy, aContext);
+    if (useFetchByChrome) {
+      // We can use resource principal when data is fetched by the chrome
+      // e.g. useful for NoScript
+      var securityManager = Cc[';1']
+                            .getService(Ci.nsIScriptSecurityManager);
+      var uri = ioService.newURI(PDF_VIEWER_WEB_PAGE, null, null);
+      // FF16 and below had getCodebasePrincipal (bug 774585)
+      var resourcePrincipal = 'getSimpleCodebasePrincipal' in securityManager ?
+                              securityManager.getSimpleCodebasePrincipal(uri) :
+                              securityManager.getCodebasePrincipal(uri);
+      channel.owner = resourcePrincipal;
+    }

I'm going to replace getSimpleCodebasePrincipal() with getNoAppCodebasePrincipal() to fix a crash. See bug 773373
(In reply to Jan Varga [:janv] from comment #8)
> I'm going to replace getSimpleCodebasePrincipal() with
> getNoAppCodebasePrincipal() to fix a crash. See bug 773373

You would need to remove "FF16 and below" comment and logic as well:

  var resourcePrincipal = securityManager.getNoAppCodebasePrincipal(uri);

The issue opened to add fallback logic for the pdf.js addon
You need to log in before you can comment on or make changes to this bug.