From bb5fa043a7ef2de165c7903548e5663a6f8bcf9a Mon Sep 17 00:00:00 2001 From: tonikitoo Date: Fri, 19 Aug 2016 11:18:29 -0700 Subject: Stub out Document::syncAnnotScan method. The PDF specification [1] says: " syncAnnotScan guarantees that all annotations will be scanned by the time this method returns. (..) Normally a background task runs that examine every page and looks for annotations during idle times. " The statement details specifically how Acrobat implements this method. Although, neither the method itself nor the background scanner task are implemented in PDFium (as of today, Ago/2016), not having ::syncAnnotScan at least stubbed out can be considered harmfull since its absence makes JS acrobat scripts silently fail when it has a call to it. Given that, and following a stub-out pattern present in other methods including ::addAnnot and ::addField, CL provides a stubbed out implementation of Document::syncAnnotScan. [1] http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_api_reference.pdf BUG=pdfium:492 Review-Url: https://codereview.chromium.org/2265553002 --- testing/resources/javascript/document_methods.in | 1 + 1 file changed, 1 insertion(+) (limited to 'testing/resources/javascript/document_methods.in') diff --git a/testing/resources/javascript/document_methods.in b/testing/resources/javascript/document_methods.in index bc0f3f1126..cdbd6845c8 100644 --- a/testing/resources/javascript/document_methods.in +++ b/testing/resources/javascript/document_methods.in @@ -314,6 +314,7 @@ try { testUnsupported('this.removeIcon'); testUnsupported('this.replacePages'); testUnsupported('this.saveAs'); + testUnsupported('this.syncAnnotScan'); app.alert('*** Testing Supported Methods ***'); testAddIcon(); -- cgit v1.2.3