[Pkg-javascript-commits] [pdf.js] 69/109: Ensure that the clipping path is reset when the state is restored (issue 6413)

David Prévot taffit at moszumanska.debian.org
Fri Sep 25 03:04:19 UTC 2015


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

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

commit cfd5a64df575ff0739208f60dd76aaf72efe837d
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Sep 3 17:35:32 2015 +0200

    Ensure that the clipping path is reset when the state is restored (issue 6413)
    
    According to the specification, see `NOTE 2` in http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf#G7.3882161, it appears that we should ensure that the clipping path is reset when the restore (`Q`) operator is encountered.
    
    Fixes 6413.
---
 src/display/canvas.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/display/canvas.js b/src/display/canvas.js
index 8e8deda..0330687 100644
--- a/src/display/canvas.js
+++ b/src/display/canvas.js
@@ -970,6 +970,9 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
         this.current = this.stateStack.pop();
         this.ctx.restore();
 
+        // Ensure that the clipping path is reset (fixes issue6413.pdf).
+        this.pendingClip = null;
+
         this.cachedGetSinglePixelWidth = null;
       }
     },

-- 
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