Merge pull request #5480 from CodingFabian/issue-5458
Remove TryCatch in canvas for EvenOdd winding rule.
This commit is contained in:
		
						commit
						dd9d0b8770
					
				| @ -1099,12 +1099,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | ||||
|           ctx.fill(); | ||||
|           ctx.mozFillRule = 'nonzero'; | ||||
|         } else { | ||||
|           try { | ||||
|           ctx.fill('evenodd'); | ||||
|           } catch (ex) { | ||||
|             // shouldn't really happen, but browsers might think differently
 | ||||
|             ctx.fill(); | ||||
|           } | ||||
|         } | ||||
|         this.pendingEOFill = false; | ||||
|       } else { | ||||
| @ -2117,12 +2112,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | ||||
|             ctx.clip(); | ||||
|             ctx.mozFillRule = 'nonzero'; | ||||
|           } else { | ||||
|             try { | ||||
|             ctx.clip('evenodd'); | ||||
|             } catch (ex) { | ||||
|               // shouldn't really happen, but browsers might think differently
 | ||||
|               ctx.clip(); | ||||
|             } | ||||
|           } | ||||
|         } else { | ||||
|           ctx.clip(); | ||||
|  | ||||
| @ -522,9 +522,9 @@ if (typeof PDFJS === 'undefined') { | ||||
| 
 | ||||
|     if (polyfill) { | ||||
|       var contextPrototype = window.CanvasRenderingContext2D.prototype; | ||||
|       contextPrototype._createImageData = contextPrototype.createImageData; | ||||
|       var createImageData = contextPrototype.createImageData; | ||||
|       contextPrototype.createImageData = function(w, h) { | ||||
|         var imageData = this._createImageData(w, h); | ||||
|         var imageData = createImageData.call(this, w, h); | ||||
|         imageData.data.set = function(arr) { | ||||
|           for (var i = 0, ii = this.length; i < ii; i++) { | ||||
|             this[i] = arr[i]; | ||||
| @ -532,6 +532,8 @@ if (typeof PDFJS === 'undefined') { | ||||
|         }; | ||||
|         return imageData; | ||||
|       }; | ||||
|       // this closure will be kept referenced, so clear its vars
 | ||||
|       contextPrototype = null; | ||||
|     } | ||||
|   } | ||||
| })(); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user