@@ -153,7 +153,7 @@ var Page = (function pagePage() {
153
153
return shadow (this , 'rotate' , rotate );
154
154
},
155
155
156
- startRenderingFromIRQueue : function startRenderingFromIRQueue (
156
+ startRenderingFromIRQueue : function pageStartRenderingFromIRQueue (
157
157
IRQueue , fonts ) {
158
158
var self = this ;
159
159
this .IRQueue = IRQueue ;
@@ -173,12 +173,13 @@ var Page = (function pagePage() {
173
173
});
174
174
};
175
175
176
- this .ensureFonts (fonts , function () {
176
+ this .ensureFonts (fonts ,
177
+ function pageStartRenderingFromIRQueueEnsureFonts () {
177
178
displayContinuation ();
178
179
});
179
180
},
180
181
181
- getIRQueue : function (handler , dependency ) {
182
+ getIRQueue : function pageGetIRQueue (handler , dependency ) {
182
183
if (this .IRQueue ) {
183
184
// content was compiled
184
185
return this .IRQueue ;
@@ -202,7 +203,7 @@ var Page = (function pagePage() {
202
203
content , resources , IRQueue , dependency );
203
204
},
204
205
205
- ensureFonts : function (fonts , callback ) {
206
+ ensureFonts : function pageEnsureFonts (fonts , callback ) {
206
207
// Convert the font names to the corresponding font obj.
207
208
for (var i = 0 ; i < fonts .length ; i ++) {
208
209
fonts [i ] = this .objs .objs [fonts [i ]].data ;
@@ -211,7 +212,7 @@ var Page = (function pagePage() {
211
212
// Load all the fonts
212
213
var fontObjs = FontLoader .bind (
213
214
fonts ,
214
- function (fontObjs ) {
215
+ function pageEnsureFontsFontObjs (fontObjs ) {
215
216
this .stats .fonts = Date .now ();
216
217
217
218
callback .call (this );
@@ -220,7 +221,7 @@ var Page = (function pagePage() {
220
221
);
221
222
},
222
223
223
- display : function (gfx , callback ) {
224
+ display : function pageDisplay (gfx , callback ) {
224
225
var xref = this .xref ;
225
226
var resources = xref .fetchIfRef (this .resources );
226
227
var mediaBox = xref .fetchIfRef (this .mediaBox );
@@ -305,7 +306,7 @@ var Page = (function pagePage() {
305
306
}
306
307
return links ;
307
308
},
308
- startRendering : function (ctx , callback ) {
309
+ startRendering : function pageStartRendering (ctx , callback ) {
309
310
this .ctx = ctx ;
310
311
this .callback = callback ;
311
312
@@ -446,7 +447,7 @@ var PDFDocModel = (function pdfDoc() {
446
447
return constructor ;
447
448
})();
448
449
449
- var PDFDoc = (function () {
450
+ var PDFDoc = (function pdfDoc () {
450
451
function constructor (arg , callback ) {
451
452
var stream = null ;
452
453
var data = null ;
@@ -475,10 +476,10 @@ var PDFDoc = (function() {
475
476
} else {
476
477
// If we don't use a worker, just post/sendMessage to the main thread.
477
478
var worker = {
478
- postMessage : function (obj ) {
479
+ postMessage : function pdfDocPostMessage (obj ) {
479
480
worker .onmessage ({data : obj });
480
481
},
481
- terminate : function () {}
482
+ terminate : function pdfDocTerminate () {}
482
483
};
483
484
}
484
485
this .worker = worker ;
@@ -488,15 +489,15 @@ var PDFDoc = (function() {
488
489
var processorHandler = this .processorHandler =
489
490
new MessageHandler ('main' , worker );
490
491
491
- processorHandler .on ('page' , function (data ) {
492
+ processorHandler .on ('page' , function pdfDocPage (data ) {
492
493
var pageNum = data .pageNum ;
493
494
var page = this .pageCache [pageNum ];
494
495
var depFonts = data .depFonts ;
495
496
496
497
page .startRenderingFromIRQueue (data .IRQueue , depFonts );
497
498
}, this );
498
499
499
- processorHandler .on ('obj' , function (data ) {
500
+ processorHandler .on ('obj' , function pdfDocObj (data ) {
500
501
var id = data [0 ];
501
502
var type = data [1 ];
502
503
@@ -540,7 +541,7 @@ var PDFDoc = (function() {
540
541
}
541
542
}, this );
542
543
543
- processorHandler .on ('font_ready' , function (data ) {
544
+ processorHandler .on ('font_ready' , function pdfDocFontReady (data ) {
544
545
var id = data [0 ];
545
546
var font = new FontShape (data [1 ]);
546
547
@@ -559,7 +560,7 @@ var PDFDoc = (function() {
559
560
}
560
561
561
562
this .workerReadyPromise = new Promise ('workerReady' );
562
- setTimeout (function () {
563
+ setTimeout (function pdfDocFontReadySetTimeout () {
563
564
processorHandler .send ('doc' , this .data );
564
565
this .workerReadyPromise .resolve (true );
565
566
}.bind (this ));
@@ -570,14 +571,14 @@ var PDFDoc = (function() {
570
571
return this .pdf .numPages ;
571
572
},
572
573
573
- startRendering : function (page ) {
574
+ startRendering : function pdfDocStartRendering (page ) {
574
575
// The worker might not be ready to receive the page request yet.
575
- this .workerReadyPromise .then (function () {
576
+ this .workerReadyPromise .then (function pdfDocStartRenderingThen () {
576
577
this .processorHandler .send ('page_request' , page .pageNumber + 1 );
577
578
}.bind (this ));
578
579
},
579
580
580
- getPage : function (n ) {
581
+ getPage : function pdfDocGetPage (n ) {
581
582
if (this .pageCache [n ])
582
583
return this .pageCache [n ];
583
584
@@ -589,7 +590,7 @@ var PDFDoc = (function() {
589
590
return this .pageCache [n ] = page ;
590
591
},
591
592
592
- destroy : function () {
593
+ destroy : function pdfDocDestroy () {
593
594
if (this .worker )
594
595
this .worker .terminate ();
595
596
0 commit comments