mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 09:45:42 +02:00
Fix #7798: Refactor scratch canvas usage.
Fixes extra canvas create calls. Fixes unnecessary call of `new DOMCanvasFactory`. Fixes undefined error of DOMCanvasFactory. Fixes failures in some of the tests. Fixes expected behaviour. Remove unused vars.
This commit is contained in:
parent
e132fa976e
commit
32817633c9
6 changed files with 64 additions and 25 deletions
|
@ -186,6 +186,7 @@ var renderTextLayer = (function renderTextLayerClosure() {
|
|||
return;
|
||||
}
|
||||
|
||||
// The temporary canvas is used to measure text length in the DOM.
|
||||
var canvas = document.createElement('canvas');
|
||||
if (typeof PDFJSDev === 'undefined' ||
|
||||
PDFJSDev.test('FIREFOX || MOZCENTRAL || GENERIC')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue