Skip to content

Commit

Permalink
Upgrade: pdf.js 1.9.450 (#329)
Browse files Browse the repository at this point in the history
- Include bug and performance tweaks from latest minor change
- Update functional tests to run Chrome with web security disabled (CORS)
- Delete all except for two latest versions of third party libraries (they will still exist on the static servers)
  • Loading branch information
tonyjin committed Aug 23, 2017
1 parent 5eb2738 commit 987a417
Show file tree
Hide file tree
Showing 452 changed files with 22,791 additions and 97,814 deletions.
2 changes: 1 addition & 1 deletion build/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable */
const webpackConfig = require('./webpack.karma.config');

const DOC_STATIC_ASSETS_VERSION = '0.130.0';
const DOC_STATIC_ASSETS_VERSION = '1.7.0';
const MEDIA_STATIC_ASSETS_VERSION = '0.127.0';
const MODEL3D_STATIC_ASSETS_VERSION = '1.4.1';
const SWF_STATIC_ASSETS_VERSION = '0.112.0';
Expand Down
4 changes: 2 additions & 2 deletions build/upgrade_pdfjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ rm -rf ./pdfjs-dist/

# Fix Chrome console warning issue by not testing for moz-chunked-arraybuffer support in Chrome
echo "-----------------------------------------------------------------------------------"
echo "Tweaking pdf.worker.js for Chrome..."
echo "Tweaking pdf.js for Chrome..."
echo "-----------------------------------------------------------------------------------"
sed -e 's/function supportsMozChunkedClosure/!\(\/Chrome\/\.test\(navigator\.userAgent\)\) \&\& function supportsMozChunkedClosure/' -i '' src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf.worker.js
sed -e 's/function supportsMozChunkedClosure/!\(\/Chrome\/\.test\(navigator\.userAgent\)\) \&\& function supportsMozChunkedClosure/' -i '' src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf.js

# Decreased default cached pages size to 5 on mobile web to lower memory usage
echo "-----------------------------------------------------------------------------------"
Expand Down
10 changes: 8 additions & 2 deletions functional-tests/base-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ describe('Base Test', () => {
build: process.env.TRAVIS_BUILD_NUMBER,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY,
browserName: 'chrome'
browserName: 'chrome',
chromeOptions: {
args: ['--disable-web-security']
}
}).build();
} else {
this.browser = new webdriver.Builder()
.withCapabilities({
browserName: 'chrome'
browserName: 'chrome',
chromeOptions: {
args: ['--disable-web-security']
}
}).build();
}
});
Expand Down
2 changes: 1 addition & 1 deletion src/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const X_REP_HINT_VIDEO_MP4 = '[mp4]';

// These should be updated to match the Preview version in package.json
// whenever a file in that third party directory is updated
export const DOC_STATIC_ASSETS_VERSION = '0.130.0';
export const DOC_STATIC_ASSETS_VERSION = '1.7.0';
export const MEDIA_STATIC_ASSETS_VERSION = '0.127.0';
export const MODEL3D_STATIC_ASSETS_VERSION = '1.4.1';
export const SWF_STATIC_ASSETS_VERSION = '0.112.0';
Expand Down
Binary file removed src/third-party/doc/0.120.1/cursors/highlight.cur
Binary file not shown.
Binary file removed src/third-party/doc/0.120.1/cursors/point.cur
Binary file not shown.

0 comments on commit 987a417

Please sign in to comment.