mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
commit
1b0bf24322
8 changed files with 493 additions and 20 deletions
|
@ -269,7 +269,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
},
|
||||
|
||||
executeIRQueue: function canvasGraphicsExecuteIRQueue(codeIR,
|
||||
executionStartIdx, continueCallback) {
|
||||
executionStartIdx, continueCallback,
|
||||
stepper) {
|
||||
var argsArray = codeIR.argsArray;
|
||||
var fnArray = codeIR.fnArray;
|
||||
var i = executionStartIdx || 0;
|
||||
|
@ -288,6 +289,11 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
var slowCommands = this.slowCommands;
|
||||
|
||||
while (true) {
|
||||
if (stepper && i === stepper.nextBreakPoint) {
|
||||
stepper.breakIt(i, continueCallback);
|
||||
return i;
|
||||
}
|
||||
|
||||
fnName = fnArray[i];
|
||||
|
||||
if (fnName !== 'dependency') {
|
||||
|
|
|
@ -57,6 +57,7 @@ function getPdf(arg, callback) {
|
|||
xhr.send(null);
|
||||
}
|
||||
globalScope.PDFJS.getPdf = getPdf;
|
||||
globalScope.PDFJS.pdfBug = false;
|
||||
|
||||
var Page = (function PageClosure() {
|
||||
function Page(xref, pageNumber, pageDict, ref) {
|
||||
|
@ -254,10 +255,16 @@ var Page = (function PageClosure() {
|
|||
var startIdx = 0;
|
||||
var length = this.IRQueue.fnArray.length;
|
||||
var IRQueue = this.IRQueue;
|
||||
var stepper = null;
|
||||
if (PDFJS.pdfBug && StepperManager.enabled) {
|
||||
stepper = StepperManager.create(this.pageNumber);
|
||||
stepper.init(IRQueue);
|
||||
stepper.nextBreakPoint = stepper.getNextBreakPoint();
|
||||
}
|
||||
|
||||
var self = this;
|
||||
function next() {
|
||||
startIdx = gfx.executeIRQueue(IRQueue, startIdx, next);
|
||||
startIdx = gfx.executeIRQueue(IRQueue, startIdx, next, stepper);
|
||||
if (startIdx == length) {
|
||||
self.stats.render = Date.now();
|
||||
gfx.endDrawing();
|
||||
|
|
|
@ -2225,6 +2225,9 @@ var Font = (function FontClosure() {
|
|||
var styleSheet = styleElement.sheet;
|
||||
styleSheet.insertRule(rule, styleSheet.cssRules.length);
|
||||
|
||||
if (PDFJS.pdfBug && FontInspector.enabled)
|
||||
FontInspector.fontAdded(this, url);
|
||||
|
||||
return rule;
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue