Ensure that PDFFindController_reset actually resets *all* state (issue 7034)

To reduce code duplication, the initialization code now uses the `reset` method.
Also, this patch moves `charactersToNormalize` out of `PDFFindController`, since it seemed better suited to be a "constant".
This commit is contained in:
Jonas Jenwald 2016-02-26 18:06:59 +01:00
parent 2b813c0ca4
commit e7d039dbce
2 changed files with 43 additions and 44 deletions

View file

@ -526,6 +526,8 @@ var PDFViewerApplication = {
this.pdfLinkService.setDocument(null, null);
}
this.findController.reset();
if (typeof PDFBug !== 'undefined') {
PDFBug.cleanup();
}
@ -804,8 +806,6 @@ var PDFViewerApplication = {
var self = this;
scale = scale || UNKNOWN_SCALE;
this.findController.reset();
this.pdfDocument = pdfDocument;
this.pdfDocumentProperties.setDocumentAndUrl(pdfDocument, this.url);