Browse Source

PDF.js version 1.6.256 - See mozilla/pdf.js@1783f145115f6f23119b581aaa54f2ce9490f3fa

master v1.6.256
Pdf Bot 8 years ago
parent
commit
df3ca25c3d
  1. 2
      bower.json
  2. 51
      build/pdf.combined.js
  3. 51
      build/pdf.js
  4. 4
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.6.254", "version": "1.6.256",
"main": [ "main": [
"build/pdf.js", "build/pdf.js",
"build/pdf.worker.js" "build/pdf.worker.js"

51
build/pdf.combined.js

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.254'; var pdfjsVersion = '1.6.256';
var pdfjsBuild = '273d2de'; var pdfjsBuild = '1783f14';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -24884,8 +24884,8 @@
this.dashPhase = 0; this.dashPhase = 0;
this.dependencies = []; this.dependencies = [];
// Clipping // Clipping
this.clipId = ''; this.activeClipUrl = null;
this.pendingClip = false; this.clipGroup = null;
this.maskId = ''; this.maskId = '';
} }
SVGExtraState.prototype = { SVGExtraState.prototype = {
@ -25465,24 +25465,29 @@
clip: function SVGGraphics_clip(type) { clip: function SVGGraphics_clip(type) {
var current = this.current; var current = this.current;
// Add current path to clipping path // Add current path to clipping path
current.clipId = 'clippath' + clipCount; var clipId = 'clippath' + clipCount;
clipCount++; clipCount++;
this.clippath = document.createElementNS(NS, 'svg:clipPath'); var clipPath = document.createElementNS(NS, 'svg:clipPath');
this.clippath.setAttributeNS(null, 'id', current.clipId); clipPath.setAttributeNS(null, 'id', clipId);
clipPath.setAttributeNS(null, 'transform', pm(this.transformMatrix));
var clipElement = current.element.cloneNode(); var clipElement = current.element.cloneNode();
if (type === 'evenodd') { if (type === 'evenodd') {
clipElement.setAttributeNS(null, 'clip-rule', 'evenodd'); clipElement.setAttributeNS(null, 'clip-rule', 'evenodd');
} else { } else {
clipElement.setAttributeNS(null, 'clip-rule', 'nonzero'); clipElement.setAttributeNS(null, 'clip-rule', 'nonzero');
} }
this.clippath.setAttributeNS(null, 'transform', pm(this.transformMatrix)); clipPath.appendChild(clipElement);
this.clippath.appendChild(clipElement); this.defs.appendChild(clipPath);
this.defs.appendChild(this.clippath); if (current.activeClipUrl) {
// Create a clipping group that references the clipping path. // The previous clipping group content can go out of order -- resetting
current.pendingClip = true; // cached clipGroup's.
this.cgrp = document.createElementNS(NS, 'svg:g'); current.clipGroup = null;
this.cgrp.setAttributeNS(null, 'clip-path', 'url(#' + current.clipId + ')'); this.extraStack.forEach(function (prev) {
this.svg.appendChild(this.cgrp); prev.clipGroup = null;
});
}
current.activeClipUrl = 'url(#' + clipId + ')';
this.tgrp = null;
}, },
closePath: function SVGGraphics_closePath() { closePath: function SVGGraphics_closePath() {
var current = this.current; var current = this.current;
@ -25677,6 +25682,18 @@
this.svg = rootGroup; this.svg = rootGroup;
return svg; return svg;
}, },
/**
* @private
*/
_ensureClipGroup: function SVGGraphics_ensureClipGroup() {
if (!this.current.clipGroup) {
var clipGroup = document.createElementNS(NS, 'svg:g');
clipGroup.setAttributeNS(null, 'clip-path', this.current.activeClipUrl);
this.svg.appendChild(clipGroup);
this.current.clipGroup = clipGroup;
}
return this.current.clipGroup;
},
/** /**
* @private * @private
*/ */
@ -25684,8 +25701,8 @@
if (!this.tgrp) { if (!this.tgrp) {
this.tgrp = document.createElementNS(NS, 'svg:g'); this.tgrp = document.createElementNS(NS, 'svg:g');
this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix)); this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix));
if (this.current.pendingClip) { if (this.current.activeClipUrl) {
this.cgrp.appendChild(this.tgrp); this._ensureClipGroup().appendChild(this.tgrp);
} else { } else {
this.svg.appendChild(this.tgrp); this.svg.appendChild(this.tgrp);
} }

51
build/pdf.js

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.254'; var pdfjsVersion = '1.6.256';
var pdfjsBuild = '273d2de'; var pdfjsBuild = '1783f14';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {
@ -3279,8 +3279,8 @@
this.dashPhase = 0; this.dashPhase = 0;
this.dependencies = []; this.dependencies = [];
// Clipping // Clipping
this.clipId = ''; this.activeClipUrl = null;
this.pendingClip = false; this.clipGroup = null;
this.maskId = ''; this.maskId = '';
} }
SVGExtraState.prototype = { SVGExtraState.prototype = {
@ -3860,24 +3860,29 @@
clip: function SVGGraphics_clip(type) { clip: function SVGGraphics_clip(type) {
var current = this.current; var current = this.current;
// Add current path to clipping path // Add current path to clipping path
current.clipId = 'clippath' + clipCount; var clipId = 'clippath' + clipCount;
clipCount++; clipCount++;
this.clippath = document.createElementNS(NS, 'svg:clipPath'); var clipPath = document.createElementNS(NS, 'svg:clipPath');
this.clippath.setAttributeNS(null, 'id', current.clipId); clipPath.setAttributeNS(null, 'id', clipId);
clipPath.setAttributeNS(null, 'transform', pm(this.transformMatrix));
var clipElement = current.element.cloneNode(); var clipElement = current.element.cloneNode();
if (type === 'evenodd') { if (type === 'evenodd') {
clipElement.setAttributeNS(null, 'clip-rule', 'evenodd'); clipElement.setAttributeNS(null, 'clip-rule', 'evenodd');
} else { } else {
clipElement.setAttributeNS(null, 'clip-rule', 'nonzero'); clipElement.setAttributeNS(null, 'clip-rule', 'nonzero');
} }
this.clippath.setAttributeNS(null, 'transform', pm(this.transformMatrix)); clipPath.appendChild(clipElement);
this.clippath.appendChild(clipElement); this.defs.appendChild(clipPath);
this.defs.appendChild(this.clippath); if (current.activeClipUrl) {
// Create a clipping group that references the clipping path. // The previous clipping group content can go out of order -- resetting
current.pendingClip = true; // cached clipGroup's.
this.cgrp = document.createElementNS(NS, 'svg:g'); current.clipGroup = null;
this.cgrp.setAttributeNS(null, 'clip-path', 'url(#' + current.clipId + ')'); this.extraStack.forEach(function (prev) {
this.svg.appendChild(this.cgrp); prev.clipGroup = null;
});
}
current.activeClipUrl = 'url(#' + clipId + ')';
this.tgrp = null;
}, },
closePath: function SVGGraphics_closePath() { closePath: function SVGGraphics_closePath() {
var current = this.current; var current = this.current;
@ -4072,6 +4077,18 @@
this.svg = rootGroup; this.svg = rootGroup;
return svg; return svg;
}, },
/**
* @private
*/
_ensureClipGroup: function SVGGraphics_ensureClipGroup() {
if (!this.current.clipGroup) {
var clipGroup = document.createElementNS(NS, 'svg:g');
clipGroup.setAttributeNS(null, 'clip-path', this.current.activeClipUrl);
this.svg.appendChild(clipGroup);
this.current.clipGroup = clipGroup;
}
return this.current.clipGroup;
},
/** /**
* @private * @private
*/ */
@ -4079,8 +4096,8 @@
if (!this.tgrp) { if (!this.tgrp) {
this.tgrp = document.createElementNS(NS, 'svg:g'); this.tgrp = document.createElementNS(NS, 'svg:g');
this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix)); this.tgrp.setAttributeNS(null, 'transform', pm(this.transformMatrix));
if (this.current.pendingClip) { if (this.current.activeClipUrl) {
this.cgrp.appendChild(this.tgrp); this._ensureClipGroup().appendChild(this.tgrp);
} else { } else {
this.svg.appendChild(this.tgrp); this.svg.appendChild(this.tgrp);
} }

4
build/pdf.worker.js vendored

@ -24,8 +24,8 @@
}(this, function (exports) { }(this, function (exports) {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.6.254'; var pdfjsVersion = '1.6.256';
var pdfjsBuild = '273d2de'; var pdfjsBuild = '1783f14';
var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? document.currentScript.src : null;
var pdfjsLibs = {}; var pdfjsLibs = {};
(function pdfjsWrapper() { (function pdfjsWrapper() {

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.6.254", "version": "1.6.256",
"main": "build/pdf.js", "main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [

Loading…
Cancel
Save