Rename the src/display/dom_utils.js file to src/display/display_utils.js

This file (currently) contains not only DOM-specific helper functions/classes, but is used generally for various helper code relevant for main-thread functionality.
This commit is contained in:
Jonas Jenwald 2019-02-23 15:41:02 +01:00
parent ece6a31a44
commit a1f7517996
11 changed files with 18 additions and 16 deletions

View File

@ -15,7 +15,7 @@
import {
addLinkAttributes, DOMSVGFactory, getFilenameFromUrl, LinkTarget
} from './dom_utils';
} from './display_utils';
import {
AnnotationBorderStyleType, AnnotationType, stringToPDFString, unreachable,
Util, warn

View File

@ -25,7 +25,7 @@ import {
import {
DOMCanvasFactory, DOMCMapReaderFactory, DummyStatTimer, loadScript,
PageViewport, RenderingCancelledException, StatTimer
} from './dom_utils';
} from './display_utils';
import { FontFaceObject, FontLoader } from './font_loader';
import { apiCompatibilityParams } from './api_compatibility';
import { CanvasGraphics } from './canvas';

View File

@ -18,7 +18,7 @@ import {
createObjectURL, FONT_IDENTITY_MATRIX, IDENTITY_MATRIX, ImageKind, isNum, OPS,
TextRenderingMode, Util, warn
} from '../shared/util';
import { DOMSVGFactory } from './dom_utils';
import { DOMSVGFactory } from './display_utils';
import isNodeJS from '../shared/is_node';
var SVGGraphics = function() {

View File

@ -25,7 +25,7 @@ var pdfjsSharedUtil = require('./shared/util.js');
var pdfjsDisplayAPI = require('./display/api.js');
var pdfjsDisplayTextLayer = require('./display/text_layer.js');
var pdfjsDisplayAnnotationLayer = require('./display/annotation_layer.js');
var pdfjsDisplayDOMUtils = require('./display/dom_utils.js');
var pdfjsDisplayDisplayUtils = require('./display/display_utils.js');
var pdfjsDisplaySVG = require('./display/svg.js');
let pdfjsDisplayWorkerOptions = require('./display/worker_options.js');
let pdfjsDisplayAPICompatibility = require('./display/api_compatibility.js');
@ -107,11 +107,11 @@ exports.Util = pdfjsSharedUtil.Util;
exports.ReadableStream = pdfjsSharedUtil.ReadableStream;
exports.URL = pdfjsSharedUtil.URL;
exports.RenderingCancelledException =
pdfjsDisplayDOMUtils.RenderingCancelledException;
exports.getFilenameFromUrl = pdfjsDisplayDOMUtils.getFilenameFromUrl;
exports.LinkTarget = pdfjsDisplayDOMUtils.LinkTarget;
exports.addLinkAttributes = pdfjsDisplayDOMUtils.addLinkAttributes;
exports.loadScript = pdfjsDisplayDOMUtils.loadScript;
pdfjsDisplayDisplayUtils.RenderingCancelledException;
exports.getFilenameFromUrl = pdfjsDisplayDisplayUtils.getFilenameFromUrl;
exports.LinkTarget = pdfjsDisplayDisplayUtils.LinkTarget;
exports.addLinkAttributes = pdfjsDisplayDisplayUtils.addLinkAttributes;
exports.loadScript = pdfjsDisplayDisplayUtils.loadScript;
exports.GlobalWorkerOptions = pdfjsDisplayWorkerOptions.GlobalWorkerOptions;
exports.apiCompatibilityParams =
pdfjsDisplayAPICompatibility.apiCompatibilityParams;

View File

@ -23,7 +23,7 @@ import {
} from '../../src/shared/util';
import {
DOMCanvasFactory, RenderingCancelledException, StatTimer
} from '../../src/display/dom_utils';
} from '../../src/display/display_utils';
import {
getDocument, PDFDataRangeTransport, PDFDocumentProxy, PDFPageProxy, PDFWorker
} from '../../src/display/api';

View File

@ -14,8 +14,8 @@
"colorspace_spec.js",
"crypto_spec.js",
"display_svg_spec.js",
"display_utils_spec.js",
"document_spec.js",
"dom_utils_spec.js",
"encodings_spec.js",
"evaluator_spec.js",
"function_spec.js",

View File

@ -14,7 +14,7 @@
*/
import { CMap, CMapFactory, IdentityCMap } from '../../src/core/cmap';
import { DOMCMapReaderFactory } from '../../src/display/dom_utils';
import { DOMCMapReaderFactory } from '../../src/display/display_utils';
import isNodeJS from '../../src/shared/is_node';
import { Name } from '../../src/core/primitives';
import { NodeCMapReaderFactory } from './test_utils';

View File

@ -14,7 +14,7 @@
*/
import { buildGetDocumentParams, NodeCanvasFactory } from './test_utils';
import { DOMCanvasFactory } from '../../src/display/dom_utils';
import { DOMCanvasFactory } from '../../src/display/display_utils';
import { getDocument } from '../../src/display/api';
import isNodeJS from '../../src/shared/is_node';

View File

@ -13,10 +13,12 @@
* limitations under the License.
*/
import { DOMSVGFactory, getFilenameFromUrl } from '../../src/display/dom_utils';
import {
DOMSVGFactory, getFilenameFromUrl
} from '../../src/display/display_utils';
import isNodeJS from '../../src/shared/is_node';
describe('dom_utils', function() {
describe('display_utils', function() {
describe('DOMSVGFactory', function() {
let svgFactory;

View File

@ -56,8 +56,8 @@ function initializePDFJS(callback) {
'pdfjs-test/unit/crypto_spec',
'pdfjs-test/unit/custom_spec',
'pdfjs-test/unit/display_svg_spec',
'pdfjs-test/unit/display_utils_spec',
'pdfjs-test/unit/document_spec',
'pdfjs-test/unit/dom_utils_spec',
'pdfjs-test/unit/encodings_spec',
'pdfjs-test/unit/evaluator_spec',
'pdfjs-test/unit/function_spec',