From eb6b296df2263a954fd8807f5a93f5f81ee6a37a Mon Sep 17 00:00:00 2001 From: eugenesqr Date: Thu, 21 Jun 2018 09:12:30 +0300 Subject: [PATCH] removed safari compatibility check --- gulpfile.js | 2 +- src/display/api.js | 4 ++-- src/display/api_compatibility.js | 13 ------------- web/app_options.js | 4 ++-- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index acd104d4e3964..40719ef1d4851 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -78,7 +78,7 @@ var AUTOPREFIXER_CONFIG = { 'Firefox >= 52', // Last supported on Windows XP 'Firefox ESR', 'IE >= 11', - 'Safari >= 8', + 'Safari >= 9', '> 0.5%', 'not dead', ], diff --git a/src/display/api.js b/src/display/api.js index a1f18ed6698f7..4463a89736b6d 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -286,10 +286,10 @@ function getDocument(src) { } if (typeof params.disableRange !== 'boolean') { - params.disableRange = apiCompatibilityParams.disableRange || false; + params.disableRange = false; } if (typeof params.disableStream !== 'boolean') { - params.disableStream = apiCompatibilityParams.disableStream || false; + params.disableStream = false; } if (typeof params.disableAutoFetch !== 'boolean') { params.disableAutoFetch = false; diff --git a/src/display/api_compatibility.js b/src/display/api_compatibility.js index beb49fe6545f3..2b7b871b6fbbe 100644 --- a/src/display/api_compatibility.js +++ b/src/display/api_compatibility.js @@ -20,10 +20,7 @@ if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) { const userAgent = (typeof navigator !== 'undefined' && navigator.userAgent) || ''; const isIE = /Trident/.test(userAgent); - const isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent); const isIOSChrome = /CriOS/.test(userAgent); - const isSafari = /Safari\//.test(userAgent) && - !/(Chrome\/|Android\s)/.test(userAgent); // Checks if possible to use URL.createObjectURL() // Support: IE, Chrome on iOS @@ -35,16 +32,6 @@ if (typeof PDFJSDev === 'undefined' || PDFJSDev.test('GENERIC')) { } })(); - // Support: Safari 6.0+, iOS - (function checkRangeRequests() { - // Safari has issues with cached range requests, see issue #3260. - // Last tested with version 6.0.4. - if (isSafari || isIOS) { - compatibilityParams.disableRange = true; - compatibilityParams.disableStream = true; - } - })(); - // Support: Node.js (function checkFontFaceAndImage() { // Node.js is missing native support for `@font-face` and `Image`. diff --git a/web/app_options.js b/web/app_options.js index 266c90484213f..b9f91b5fde9ee 100644 --- a/web/app_options.js +++ b/web/app_options.js @@ -157,12 +157,12 @@ const defaultOptions = { }, disableRange: { /** @type {boolean} */ - value: apiCompatibilityParams.disableRange || false, + value: false, kind: OptionKind.API, }, disableStream: { /** @type {boolean} */ - value: apiCompatibilityParams.disableStream || false, + value: false, kind: OptionKind.API, }, isEvalSupported: {