Merge remote-tracking branch 'upstream/master'
This commit is contained in:
		
						commit
						d7c2e79cb8
					
				@ -24,7 +24,9 @@ var CanvasExtraState = (function canvasExtraState() {
 | 
			
		||||
    this.wordSpacing = 0;
 | 
			
		||||
    this.textHScale = 1;
 | 
			
		||||
    // Color spaces
 | 
			
		||||
    this.fillColorSpace = new DeviceGrayCS;
 | 
			
		||||
    this.fillColorSpaceObj = null;
 | 
			
		||||
    this.strokeColorSpace = new DeviceGrayCS;
 | 
			
		||||
    this.strokeColorSpaceObj = null;
 | 
			
		||||
    this.fillColorObj = null;
 | 
			
		||||
    this.strokeColorObj = null;
 | 
			
		||||
@ -332,10 +334,12 @@ var CanvasGraphics = (function canvasGraphics() {
 | 
			
		||||
      this.restoreFillRule(savedFillRule);
 | 
			
		||||
    },
 | 
			
		||||
    closeFillStroke: function canvasGraphicsCloseFillStroke() {
 | 
			
		||||
      return this.fillStroke();
 | 
			
		||||
      this.closePath();
 | 
			
		||||
      this.fillStroke();
 | 
			
		||||
    },
 | 
			
		||||
    closeEOFillStroke: function canvasGraphicsCloseEOFillStroke() {
 | 
			
		||||
      var savedFillRule = this.setEOFillRule();
 | 
			
		||||
      this.closePath();
 | 
			
		||||
      this.fillStroke();
 | 
			
		||||
      this.restoreFillRule(savedFillRule);
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								src/util.js
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/util.js
									
									
									
									
									
								
							@ -16,16 +16,15 @@ function warn(msg) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function backtrace() {
 | 
			
		||||
  var stackStr;
 | 
			
		||||
  try {
 | 
			
		||||
    throw new Error();
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
    stackStr = e.stack;
 | 
			
		||||
    return e.stack ? e.stack.split('\n').slice(2).join('\n') : '';
 | 
			
		||||
  }
 | 
			
		||||
  return stackStr.split('\n').slice(1).join('\n');
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function error(msg) {
 | 
			
		||||
  log('Error: ' + msg);
 | 
			
		||||
  log(backtrace());
 | 
			
		||||
  throw new Error(msg);
 | 
			
		||||
}
 | 
			
		||||
@ -222,19 +221,19 @@ var Promise = (function() {
 | 
			
		||||
  Promise.prototype = {
 | 
			
		||||
    hasData: false,
 | 
			
		||||
 | 
			
		||||
    set data(data) {
 | 
			
		||||
      if (data === undefined) {
 | 
			
		||||
    set data(value) {
 | 
			
		||||
      if (value === undefined) {
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
      if (this._data !== EMPTY_PROMISE) {
 | 
			
		||||
        throw 'Promise ' + this.name +
 | 
			
		||||
                                ': Cannot set the data of a promise twice';
 | 
			
		||||
      }
 | 
			
		||||
      this._data = data;
 | 
			
		||||
      this._data = value;
 | 
			
		||||
      this.hasData = true;
 | 
			
		||||
 | 
			
		||||
      if (this.onDataCallback) {
 | 
			
		||||
        this.onDataCallback(data);
 | 
			
		||||
        this.onDataCallback(value);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								test/pdfs/.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								test/pdfs/.gitignore
									
									
									
									
										vendored
									
									
								
							@ -12,4 +12,4 @@
 | 
			
		||||
!rotation.pdf
 | 
			
		||||
!simpletype3font.pdf
 | 
			
		||||
!sizes.pdf
 | 
			
		||||
 | 
			
		||||
!close-path-bug.pdf
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										69
									
								
								test/pdfs/close-path-bug.pdf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								test/pdfs/close-path-bug.pdf
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,69 @@
 | 
			
		||||
%PDF-1.4
 | 
			
		||||
1 0 obj
 | 
			
		||||
  <</Type /Catalog/Outlines 2 0 R/Pages 3 0 R>>
 | 
			
		||||
endobj
 | 
			
		||||
 | 
			
		||||
2 0 obj
 | 
			
		||||
  <</Type /Outlines/Count 0>>
 | 
			
		||||
endobj
 | 
			
		||||
 | 
			
		||||
3 0 obj
 | 
			
		||||
  <</Type /Pages/Kids [4 0 R]/Count 1>>
 | 
			
		||||
endobj
 | 
			
		||||
 | 
			
		||||
4 0 obj
 | 
			
		||||
  <</Type /Page/Parent 3 0 R/MediaBox [0 0 612 792]/Contents 5 0 R/Resources << /ProcSet 6 0 R >>>>
 | 
			
		||||
endobj
 | 
			
		||||
 | 
			
		||||
5 0 obj
 | 
			
		||||
  << /Length 885 >>
 | 
			
		||||
stream
 | 
			
		||||
   % Draw a black line segment, using the default line width.
 | 
			
		||||
   150 250 m
 | 
			
		||||
   150 350 l
 | 
			
		||||
   S
 | 
			
		||||
   
 | 
			
		||||
   % Draw a thicker, dashed line segment.
 | 
			
		||||
   4 w                                        % Set line width to 4 points
 | 
			
		||||
   [4 6] 0 d                                  % Set dash pattern to 4 units on, 6 units off
 | 
			
		||||
   150 250 m
 | 
			
		||||
   400 250 l
 | 
			
		||||
   S
 | 
			
		||||
   
 | 
			
		||||
   [] 0 d                                     % Reset dash pattern to a solid line
 | 
			
		||||
   1 w                                        % Reset line width to 1 unit
 | 
			
		||||
   
 | 
			
		||||
   % Draw a rectangle with a 1−unit red border, filled with light blue.
 | 
			
		||||
   1.0 0.0 0.0 RG                             % Red for stroke color
 | 
			
		||||
   0.5 0.75 1.0 rg                            % Light blue for fill color
 | 
			
		||||
   200 300 50 75 re
 | 
			
		||||
   B
 | 
			
		||||
   
 | 
			
		||||
   % Draw a curve filled with gray and with a colored border.
 | 
			
		||||
   0.5 0.1 0.2 RG
 | 
			
		||||
   0.7 g
 | 
			
		||||
   300 300 m
 | 
			
		||||
   300 400 400 400 400 300 c
 | 
			
		||||
   b
 | 
			
		||||
endstream
 | 
			
		||||
endobj
 | 
			
		||||
 | 
			
		||||
6 0 obj
 | 
			
		||||
  [/PDF]
 | 
			
		||||
endobj
 | 
			
		||||
 | 
			
		||||
xref
 | 
			
		||||
0 7
 | 
			
		||||
0000000000 65535 f
 | 
			
		||||
0000000009 00000 n
 | 
			
		||||
0000000074 00000 n
 | 
			
		||||
0000000120 00000 n
 | 
			
		||||
0000000179 00000 n
 | 
			
		||||
0000000300 00000 n
 | 
			
		||||
0000001532 00000 n
 | 
			
		||||
 | 
			
		||||
trailer
 | 
			
		||||
  <</Size 7/Root 1 0 R>>
 | 
			
		||||
startxref
 | 
			
		||||
1556
 | 
			
		||||
%%EOF
 | 
			
		||||
@ -217,5 +217,10 @@
 | 
			
		||||
       "link": false,
 | 
			
		||||
       "rounds": 1,
 | 
			
		||||
       "type": "eq"
 | 
			
		||||
    },
 | 
			
		||||
    {  "id": "close-path-bug",
 | 
			
		||||
       "file": "pdfs/close-path-bug.pdf",
 | 
			
		||||
       "rounds": 1,
 | 
			
		||||
       "type": "eq"
 | 
			
		||||
    }
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user