[Pkg-javascript-commits] [pdf.js] 53/207: Fix #4914 by ignoring hidden annotation

David Prévot taffit at moszumanska.debian.org
Mon Jul 28 15:36:29 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit f362b3c744034eaff92bf31edde5baee19095993
Author: Samuel Chantaraud <s.chantaraud at gmail.com>
Date:   Tue Jun 10 22:19:17 2014 -0400

    Fix #4914 by ignoring hidden annotation
---
 src/shared/annotation.js | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/shared/annotation.js b/src/shared/annotation.js
index 7e1c256..8eae8c2 100644
--- a/src/shared/annotation.js
+++ b/src/shared/annotation.js
@@ -189,7 +189,7 @@ var Annotation = (function AnnotationClosure() {
                 data &&
                 (!data.annotationFlags ||
                  !(data.annotationFlags & 0x22)) &&  // Hidden or NoView
-                data.rect);                          // rectangle is nessessary
+                data.rect);                          // rectangle is necessary
     },
 
     isPrintable: function Annotation_isPrintable() {
@@ -198,7 +198,8 @@ var Annotation = (function AnnotationClosure() {
                 data &&
                 data.annotationFlags &&              // Default: not printable
                 data.annotationFlags & 0x4 &&        // Print
-                data.rect);                          // rectangle is nessessary
+                !(data.annotationFlags & 0x2) &&     // Hidden
+                data.rect);                          // rectangle is necessary
     },
 
     loadResources: function Annotation_loadResources(keys) {
@@ -323,7 +324,9 @@ var Annotation = (function AnnotationClosure() {
     if (annotation.isViewable() || annotation.isPrintable()) {
       return annotation;
     } else {
-      warn('unimplemented annotation type: ' + subtype);
+      if (SUPPORTED_TYPES.indexOf(subtype) === -1) {
+        warn('unimplemented annotation type: ' + subtype);
+      }
     }
   };
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list