Merge branch 'master' of git://github.com/mozilla/pdf.js.git into jpx6
Conflicts: test/test_manifest.json
This commit is contained in:
		
						commit
						f3ab505b41
					
				
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -71,7 +71,7 @@ bundle: | $(BUILD_DIR) | ||||
| 	cat $(PDF_JS_FILES) > all_files.tmp; \
 | ||||
| 	sed '/PDFJSSCRIPT_INCLUDE_ALL/ r all_files.tmp' pdf.js > ../$(BUILD_TARGET); \
 | ||||
| 	sed -i.bak "s/PDFJSSCRIPT_BUNDLE_VER/`git log --format="%h" -n 1`/" ../$(BUILD_TARGET); \
 | ||||
| 	rm -f ../$(BUILD_TARGET).bak | ||||
| 	rm -f ../$(BUILD_TARGET).bak; \
 | ||||
| 	rm -f *.tmp; \
 | ||||
| 	cd .. | ||||
| 
 | ||||
|  | ||||
| @ -832,8 +832,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | ||||
|     }, | ||||
|     setStrokeColor: function canvasGraphicsSetStrokeColor(/*...*/) { | ||||
|       var cs = this.current.strokeColorSpace; | ||||
|       var color = cs.getRgb(arguments); | ||||
|       var color = Util.makeCssRgb.apply(null, cs.getRgb(arguments)); | ||||
|       var rgbColor = cs.getRgb(arguments); | ||||
|       var color = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); | ||||
|       this.ctx.strokeStyle = color; | ||||
|       this.current.strokeColor = color; | ||||
|     }, | ||||
| @ -870,7 +870,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { | ||||
|     }, | ||||
|     setFillColor: function canvasGraphicsSetFillColor(/*...*/) { | ||||
|       var cs = this.current.fillColorSpace; | ||||
|       var color = Util.makeCssRgb.apply(null, cs.getRgb(arguments)); | ||||
|       var rgbColor = cs.getRgb(arguments); | ||||
|       var color = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); | ||||
|       this.ctx.fillStyle = color; | ||||
|       this.current.fillColor = color; | ||||
|     }, | ||||
|  | ||||
| @ -292,8 +292,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { | ||||
|                   // Create an IR of the pattern code.
 | ||||
|                   var depIdx = dependencyArray.length; | ||||
|                   var queueObj = {}; | ||||
|                   var codeIR = this.getIRQueue(pattern, dict.get('Resources'), | ||||
|                                                queueObj, dependencyArray); | ||||
|                   var codeIR = this.getIRQueue(pattern, dict.get('Resources') || | ||||
|                       resources, queueObj, dependencyArray); | ||||
| 
 | ||||
|                   // Add the dependencies that are required to execute the
 | ||||
|                   // codeIR.
 | ||||
| @ -336,8 +336,8 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { | ||||
|                 // This adds the IRQueue of the xObj to the current queue.
 | ||||
|                 var depIdx = dependencyArray.length; | ||||
| 
 | ||||
|                 this.getIRQueue(xobj, xobj.dict.get('Resources'), queue, | ||||
|                                 dependencyArray); | ||||
|                 this.getIRQueue(xobj, xobj.dict.get('Resources') || resources, | ||||
|                     queue, dependencyArray); | ||||
| 
 | ||||
|                // Add the dependencies that are required to execute the
 | ||||
|                // codeIR.
 | ||||
|  | ||||
							
								
								
									
										22
									
								
								src/fonts.js
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								src/fonts.js
									
									
									
									
									
								
							| @ -339,6 +339,21 @@ var stdFontMap = { | ||||
|   'TimesNewRomanPSMT-Italic': 'Times-Italic' | ||||
| }; | ||||
| 
 | ||||
| /** | ||||
|  * Holds the map of the non-standard fonts that might be included as a standard | ||||
|  * fonts without glyph data. | ||||
|  */ | ||||
| var nonStdFontMap = { | ||||
|   'ComicSansMS': 'Comic Sans MS', | ||||
|   'ComicSansMS-Bold': 'Comic Sans MS-Bold', | ||||
|   'ComicSansMS-BoldItalic': 'Comic Sans MS-BoldItalic', | ||||
|   'ComicSansMS-Italic': 'Comic Sans MS-Italic', | ||||
|   'LucidaConsole': 'Courier', | ||||
|   'LucidaConsole-Bold': 'Courier-Bold', | ||||
|   'LucidaConsole-BoldItalic': 'Courier-BoldOblique', | ||||
|   'LucidaConsole-Italic': 'Courier-Oblique' | ||||
| }; | ||||
| 
 | ||||
| var serifFonts = { | ||||
|   'Adobe Jenson': true, 'Adobe Text': true, 'Albertus': true, | ||||
|   'Aldus': true, 'Alexandria': true, 'Algerian': true, | ||||
| @ -785,7 +800,7 @@ var Font = (function FontClosure() { | ||||
|       // The file data is not specified. Trying to fix the font name
 | ||||
|       // to be used with the canvas.font.
 | ||||
|       var fontName = name.replace(/[,_]/g, '-'); | ||||
|       fontName = stdFontMap[fontName] || fontName; | ||||
|       fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName; | ||||
| 
 | ||||
|       this.bold = (fontName.search(/bold/gi) != -1); | ||||
|       this.italic = (fontName.search(/oblique/gi) != -1) || | ||||
| @ -2121,10 +2136,11 @@ var Font = (function FontClosure() { | ||||
|                  window.btoa(data) + ');'); | ||||
|       var rule = "@font-face { font-family:'" + fontName + "';src:" + url + '}'; | ||||
| 
 | ||||
|       var styleElement = document.createElement('style'); | ||||
|       document.documentElement.getElementsByTagName('head')[0].appendChild( | ||||
|         document.createElement('style')); | ||||
|         styleElement); | ||||
| 
 | ||||
|       var styleSheet = document.styleSheets[document.styleSheets.length - 1]; | ||||
|       var styleSheet = styleElement.sheet; | ||||
|       styleSheet.insertRule(rule, styleSheet.cssRules.length); | ||||
| 
 | ||||
|       return rule; | ||||
|  | ||||
| @ -94,9 +94,9 @@ Shadings.RadialAxial = (function RadialAxialClosure() { | ||||
| 
 | ||||
|     var colorStops = []; | ||||
|     for (var i = t0; i <= t1; i += step) { | ||||
|       var color = fn([i]); | ||||
|       var rgbColor = Util.makeCssRgb.apply(this, cs.getRgb(color)); | ||||
|       colorStops.push([(i - t0) / diff, rgbColor]); | ||||
|       var rgbColor = cs.getRgb(fn([i])); | ||||
|       var cssColor = Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); | ||||
|       colorStops.push([(i - t0) / diff, cssColor]); | ||||
|     } | ||||
| 
 | ||||
|     this.colorStops = colorStops; | ||||
| @ -234,9 +234,9 @@ var TilingPattern = (function TilingPatternClosure() { | ||||
|         tmpCtx.strokeStyle = ctx.strokeStyle; | ||||
|         break; | ||||
|       case PaintType.UNCOLORED: | ||||
|         color = Util.makeCssRgb.apply(this, color); | ||||
|         tmpCtx.fillStyle = color; | ||||
|         tmpCtx.strokeStyle = color; | ||||
|         var cssColor = Util.makeCssRgb(this, color[0], color[1], color[2]); | ||||
|         tmpCtx.fillStyle = cssColor; | ||||
|         tmpCtx.strokeStyle = cssColor; | ||||
|         break; | ||||
|       default: | ||||
|         error('Unsupported paint type: ' + paintType); | ||||
|  | ||||
							
								
								
									
										1
									
								
								test/pdfs/issue1055.pdf.link
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								test/pdfs/issue1055.pdf.link
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| http://mcpherrin.ca/code/mozilla/engl208b.pdf | ||||
| @ -9,7 +9,7 @@ USAGE_EXAMPLE = "%prog" | ||||
| # The local web server uses the git repo as the document root. | ||||
| DOC_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__),"..")) | ||||
| 
 | ||||
| ANAL = True | ||||
| GIT_CLONE_CHECK = True | ||||
| DEFAULT_MANIFEST_FILE = 'test_manifest.json' | ||||
| EQLOG_FILE = 'eq.log' | ||||
| BROWSERLOG_FILE = 'browser.log' | ||||
| @ -344,7 +344,7 @@ def verifyPDFs(manifestList): | ||||
| 
 | ||||
| def setUp(options): | ||||
|     # Only serve files from a pdf.js clone | ||||
|     assert not ANAL or os.path.isfile('../src/pdf.js') and os.path.isdir('../.git') | ||||
|     assert not GIT_CLONE_CHECK or os.path.isfile('../src/pdf.js') and os.path.isdir('../.git') | ||||
| 
 | ||||
|     if options.masterMode and os.path.isdir(TMPDIR): | ||||
|         print 'Temporary snapshot dir tmp/ is still around.' | ||||
|  | ||||
| @ -416,5 +416,12 @@ | ||||
|        "md5": "d0b6137846df6e0fe058f234a87fb588", | ||||
|        "rounds": 1, | ||||
|        "type": "eq" | ||||
|     }, | ||||
|     {  "id": "issue1055", | ||||
|       "file": "pdfs/issue1055.pdf", | ||||
|       "md5": "3ba56c2e48dce81da8669b1b9cf98ff0", | ||||
|       "rounds": 1, | ||||
|       "link": true, | ||||
|       "type": "eq" | ||||
|     } | ||||
| ] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user