Skip to content

Commit

Permalink
Update: Upgrade pdf.js to v1.8.175 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyjin authored Apr 11, 2017
1 parent 930c432 commit 14ac6f9
Show file tree
Hide file tree
Showing 186 changed files with 53,924 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const webpackConfig = require('./webpack.karma.config');

const DOC_STATIC_ASSETS_VERSION = '0.114.0';
const DOC_STATIC_ASSETS_VERSION = '0.118.0';
const MEDIA_STATIC_ASSETS_VERSION = '0.112.0';
const MODEL3D_STATIC_ASSETS_VERSION = '0.115.0';
const SWF_STATIC_ASSETS_VERSION = '0.112.0';
Expand Down
3 changes: 1 addition & 2 deletions build/minify_pdfjs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ java -jar build/closure-compiler-v20161201.jar --rewrite_polyfills false --langu
echo "-----------------------------------------------------------------------------------"
echo "Minifying pdf.js CSS with cssnano"
echo "-----------------------------------------------------------------------------------"
./node_modules/.bin/cssnano
src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf_viewer.css src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf_viewer.min.css
./node_modules/.bin/cssnano src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf_viewer.css src/third-party/doc/$DOC_STATIC_ASSETS_VERSION/pdf_viewer.min.css
echo "-----------------------------------------------------------------------------------"
echo "Successfully updated and minified pdf.js files!"
echo "-----------------------------------------------------------------------------------"
2 changes: 1 addition & 1 deletion src/lib/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,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.114.0';
export const DOC_STATIC_ASSETS_VERSION = '0.118.0';
export const MEDIA_STATIC_ASSETS_VERSION = '0.112.0';
export const MODEL3D_STATIC_ASSETS_VERSION = '0.115.0';
export const SWF_STATIC_ASSETS_VERSION = '0.112.0';
Expand Down
Binary file added src/third-party/doc/0.118.0/cmaps/78-EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/78-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/78-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/78-RKSJ-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/78-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/78-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/78ms-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/83pv-RKSJ-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/90ms-RKSJ-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/90ms-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/90msp-RKSJ-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/90msp-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/90pv-RKSJ-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/90pv-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Add-H.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Add-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Add-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-0.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-1.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-2.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-3.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-4.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-5.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-CNS1-6.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-GB1-0.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-GB1-1.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-GB1-2.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-GB1-3.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-GB1-4.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Adobe-GB1-5.bcmap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/B5-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/B5-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/B5pc-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/B5pc-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/CNS-EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/CNS-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/CNS1-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/CNS1-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/CNS2-H.bcmap
Binary file not shown.
3 changes: 3 additions & 0 deletions src/third-party/doc/0.118.0/cmaps/CNS2-V.bcmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
�RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE�CNS2-H
Binary file added src/third-party/doc/0.118.0/cmaps/ETHK-B5-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/ETHK-B5-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/ETen-B5-V.bcmap
Binary file not shown.
3 changes: 3 additions & 0 deletions src/third-party/doc/0.118.0/cmaps/ETenms-B5-H.bcmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
�RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE� ETen-B5-H` ^
Binary file added src/third-party/doc/0.118.0/cmaps/ETenms-B5-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Ext-H.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Ext-RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Ext-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GB-EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GB-EUC-V.bcmap
Binary file not shown.
4 changes: 4 additions & 0 deletions src/third-party/doc/0.118.0/cmaps/GB-H.bcmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
�RCopyright 1990-2009 Adobe Systems Incorporated.
All rights reserved.
See ./LICENSE!!��]aX!!]`�21�> �p �z�$]��"R�d�-U�7�*�4�%�+ �Z �{�/�%�<�9K�b�1]�.�"� �`]�,�"]�
�"]�h�"]�F�"]�$�"]��"]�`�"]�>�"]��"]�z�"]�X�"]�6�"]��"]�r�"]�P�"]�.�"]� �"]�j�"]�H�"]�&�"]��"]�b�"]�@�"]��"]�|�"]�Z�"]�8�"]��"]�t�"]�R�"]�0�"]��"]�l�"]�J�"]�(�"]��"]�d�"]�B�"]� �"X�~�']�W�"]�5�"]��"]�q�"]�O�"]�-�"]� �"]�i�"]�G�"]�%�"]��"]�a�"]�?�"]��"]�{�"]�Y�"]�7�"]��"]�s�"]�Q�"]�/�"]��"]�k�"]�I�"]�'�"]��"]�c�"]�A�"]��"]�}�"]�[�"]�9
Expand Down
Binary file added src/third-party/doc/0.118.0/cmaps/GB-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBK-EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBK-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBK2K-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBK2K-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBKp-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBT-EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBT-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBT-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBT-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBTpc-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBpc-EUC-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/GBpc-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/H.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/HKdla-B5-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/HKdlb-B5-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/HKgccs-B5-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/HKm314-B5-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/HKm471-B5-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/HKscs-B5-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Hankaku.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Hiragana.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/KSC-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/KSC-H.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/KSC-Johab-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/KSC-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/KSCms-UHC-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/KSCpc-EUC-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Katakana.bcmap
Binary file not shown.
36 changes: 36 additions & 0 deletions src/third-party/doc/0.118.0/cmaps/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
%%Copyright: -----------------------------------------------------------
%%Copyright: Copyright 1990-2009 Adobe Systems Incorporated.
%%Copyright: All rights reserved.
%%Copyright:
%%Copyright: Redistribution and use in source and binary forms, with or
%%Copyright: without modification, are permitted provided that the
%%Copyright: following conditions are met:
%%Copyright:
%%Copyright: Redistributions of source code must retain the above
%%Copyright: copyright notice, this list of conditions and the following
%%Copyright: disclaimer.
%%Copyright:
%%Copyright: Redistributions in binary form must reproduce the above
%%Copyright: copyright notice, this list of conditions and the following
%%Copyright: disclaimer in the documentation and/or other materials
%%Copyright: provided with the distribution.
%%Copyright:
%%Copyright: Neither the name of Adobe Systems Incorporated nor the names
%%Copyright: of its contributors may be used to endorse or promote
%%Copyright: products derived from this software without specific prior
%%Copyright: written permission.
%%Copyright:
%%Copyright: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
%%Copyright: CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
%%Copyright: INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
%%Copyright: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
%%Copyright: DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
%%Copyright: CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
%%Copyright: SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
%%Copyright: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
%%Copyright: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
%%Copyright: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
%%Copyright: CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
%%Copyright: OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
%%Copyright: SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
%%Copyright: -----------------------------------------------------------
Binary file added src/third-party/doc/0.118.0/cmaps/NWP-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/NWP-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/RKSJ-H.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/RKSJ-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/Roman.bcmap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/UniGB-UCS2-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/UniGB-UTF8-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/UniKS-UCS2-V.bcmap
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/UniKS-UTF8-V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/V.bcmap
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cmaps/WP-Symbol.bcmap
Binary file not shown.
105 changes: 105 additions & 0 deletions src/third-party/doc/0.118.0/compatibility.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
/* Copyright 2012 Mozilla Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint strict: ["error", "function"] */
/* eslint-disable no-extend-native */
/* globals VBArray, PDFJS */

(function compatibilityWrapper() {
'use strict';

var userAgent = navigator.userAgent;

var isAndroid = /Android/.test(userAgent);
var isIE = userAgent.indexOf('Trident') >= 0;
var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);
var isSafari = /Safari\//.test(userAgent) &&
!/(Chrome\/|Android\s)/.test(userAgent);

// Initializing PDFJS global object here, it case if we need to change/disable
// some PDF.js features, e.g. range requests
if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {};
}

// Checks if possible to use URL.createObjectURL()
// Support: IE
(function checkOnBlobSupport() {
// sometimes IE loosing the data created with createObjectURL(), see #3977
if (isIE) {
PDFJS.disableCreateObjectURL = true;
}
})();

// Checks if navigator.language is supported
(function checkNavigatorLanguage() {
if ('language' in navigator) {
return;
}
PDFJS.locale = navigator.userLanguage || 'en-US';
})();

// Support: IE<10, Android<4.0, iOS
(function checkRequestAnimationFrame() {
function fakeRequestAnimationFrame(callback) {
window.setTimeout(callback, 20);
}

if (isIOS) {
// requestAnimationFrame on iOS is broken, replacing with fake one.
window.requestAnimationFrame = fakeRequestAnimationFrame;
return;
}
if ('requestAnimationFrame' in window) {
return;
}
window.requestAnimationFrame =
window.mozRequestAnimationFrame ||
window.webkitRequestAnimationFrame ||
fakeRequestAnimationFrame;
})();

// Support: Android, iOS
(function checkCanvasSizeLimitation() {
if (isIOS || isAndroid) {
// 5MP
PDFJS.maxCanvasPixels = 5242880;
}
})();

// Disable fullscreen support for certain problematic configurations.
// Support: IE11+ (when embedded).
(function checkFullscreenSupport() {
if (isIE && window.parent !== window) {
PDFJS.disableFullscreen = true;
}
})();

// Provides document.currentScript support
// Support: IE, Chrome<29.
(function checkCurrentScript() {
if ('currentScript' in document) {
return;
}
Object.defineProperty(document, 'currentScript', {
get: function () {
var scripts = document.getElementsByTagName('script');
return scripts[scripts.length - 1];
},
enumerable: true,
configurable: true
});
})();

}).call((typeof window === 'undefined') ? this : window);
2 changes: 2 additions & 0 deletions src/third-party/doc/0.118.0/compatibility.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added src/third-party/doc/0.118.0/cursors/highlight.cur
Binary file not shown.
Binary file added src/third-party/doc/0.118.0/cursors/point.cur
Binary file not shown.
Loading

0 comments on commit 14ac6f9

Please sign in to comment.