html2canvas-0.5.0-beta4/ 0000775 0000000 0000000 00000000000 12650760301 0014733 5 ustar 00root root 0000000 0000000 html2canvas-0.5.0-beta4/.editorconfig 0000664 0000000 0000000 00000000536 12650760301 0017414 0 ustar 00root root 0000000 0000000 # http://editorconfig.org root = true [*] charset = utf-8 end_of_line = lf trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 4 [{.travis.yml,package.json}] # The indent size used in the `package.json` file cannot be changed # https://github.com/npm/npm/pull/3180#issuecomment-16336516 indent_size = 2 html2canvas-0.5.0-beta4/.gitignore 0000664 0000000 0000000 00000000205 12650760301 0016720 0 ustar 00root root 0000000 0000000 /nbproject/ image.jpg /.project /.settings/ node_modules/ .envrc *.sublime-workspace *.baseline *.iml .idea/ .DS_Store npm-debug.log html2canvas-0.5.0-beta4/.gitmodules 0000664 0000000 0000000 00000000133 12650760301 0017105 0 ustar 00root root 0000000 0000000 [submodule "src/fabric"] path = src/fabric url = https://github.com/kangax/fabric.js.git html2canvas-0.5.0-beta4/.jshintrc 0000664 0000000 0000000 00000000516 12650760301 0016562 0 ustar 00root root 0000000 0000000 { "curly": true, "eqeqeq": true, "immed": true, "latedef": false, "newcap": true, "noarg": true, "sub": true, "undef": true, "boss": true, "eqnull": true, "browser": true, "node": true, "indent": 4, "globals": { "jQuery": true }, "predef": ["Promise", "define"] } html2canvas-0.5.0-beta4/.npmignore 0000664 0000000 0000000 00000000134 12650760301 0016730 0 ustar 00root root 0000000 0000000 tests/ examples/ Gruntfile.js bower.json src/ *.iml .idea/ .npmignore .jshintrc .travis.yml html2canvas-0.5.0-beta4/.travis.yml 0000664 0000000 0000000 00000002256 12650760301 0017051 0 ustar 00root root 0000000 0000000 language: node_js node_js: - '4.0' env: global: - secure: eW41gIqOizwO4pTgWnAAbW75AP7F+CK9qfSed/fSh4sJ9HWMIY1YRIaY8gjr+6jV/f7XVHcXuym6ZxgINYSkVKbF1JKxBJNLOXtSgNbVHSic58pYFvUjwxIBI9aPig9uux1+DbnpWqXFDTcACJSevQZE0xwmjdrSkDLgB0G34v8= - secure: Y2Av+Gd3z9uQEB36GwdOOuGka0hx0/HeitASEo59z934O8RxnmN9eNTXS7dDT3XtKtwxIyLTOEpS7qlRdWahH28hr/dS4xJj6ao58C+1xMcDs6NAPGmDxUlcJWpcGEsnjmXjQCc3fBioSTdpIBrK/gdvgpNh77UKG74Sk7Z+YGk= - secure: YI+YbTOGf2x4fPMKW+KhJiZWswoXT6xOKGwLfsQsVwmFX1LerJouil5D5iYOQuL4FE3pNaoJSNakIsokJQuGKJMmnPc8rdhMZuBJBk6MRghurE2Xe9qBHfuUBPlfD61nARESm4WDcyMwM0QVYaOKeY6aIpZ91qbUbyc60EEx3C4= addons: sauce_connect: true before_script: - npm install -g grunt-cli - npm install -g uglify-js notifications: webhooks: urls: - https://webhooks.gitter.im/e/2b007d4f86de89588804 on_success: always on_failure: always on_start: false deploy: - provider: npm email: niklasvh@gmail.com api_key: secure: G/Szpr8q4/D6hp+H/Z9yyluUXtHAwf7LLa1Y07X59/Enlj1h7V5fQ7AW4/iAVM3XbIsrCPWR3dJU9g/ZxpxFg4OovIHVpS2Jr/mahtPYWdHR3pWuSmMW8QD+Twnq2VAFwSgg5Oumq3QxhX3YbCOnZox6+6Uviqk8FO7Z5B0RwW4= on: tags: true branch: master repo: niklasvh/html2canvas html2canvas-0.5.0-beta4/CHANGELOG.md 0000664 0000000 0000000 00000010035 12650760301 0016543 0 ustar 00root root 0000000 0000000 ### Changelog ### v0.5.0-beta4 - 23.1.2016 * Fix logger requiring access to window object * Derequire browserify build * Fix rendering of specific elements when window is scrolled and `type` isn't set to `view` v0.5.0-beta3 - 6.12.2015 * Handle color names in linear gradients v0.5.0-beta2 - 20.10.2015 * Remove Promise polyfill (use native or provide it yourself) v0.5.0-beta1 - 19.10.2015 * Fix bug with unmatched color stops in gradients * Fix scrolling issues with iOS * Correctly handle named colors in gradients * Accept matrix3d transforms * Fix transparent colors breaking gradients * Preserve scrolling positions on render v0.5.0-alpha2 - 3.2.2015 * Switch to using browserify for building * Fix (#517) Chrome stretches background images with 'auto' or single attributes v0.5.0-alpha - 19.1.2015 * Complete rewrite of library * Switched interface to return Promise * Uses hidden iframe window to perform rendering, allowing async rendering and doesn't force the viewport to be scrolled to the top anymore. * Better support for unicode * Checkbox/radio button rendering * SVG rendering * iframe rendering * Changed format for proxy requests, permitting binary responses with CORS headers as well * Fixed many layering issues (see z-index tests) v0.4.1 - 7.9.2013 * Added support for bower * Improved z-index ordering * Basic implementation for CSS transformations * Fixed inline text in top element * Basic implementation for text-shadow v0.4.0 - 30.1.2013 * Added rendering tests with webdriver * Switched to using grunt for building * Removed support for IE<9, including any FlashCanvas bits * Support for border-radius * Support for multiple background images, size, and clipping * Support for :before and :after pseudo elements * Support for placeholder rendering * Reformatted all tests to small units to test specific features v0.3.4 - 26.6.2012 * Removed (last?) jQuery dependencies (niklasvh) * SVG-powered rendering (niklasvh) * Radial gradients (SunboX) * Split renderers to their own objects (niklasvh) * Simplified API, cleaned up code (niklasvh) v0.3.3 - 2.3.2012 * SVG taint fix, and additional taint testing options for rendering (niklasvh) * Added support for CORS images and option to create canvas as tainted (niklasvh) * Improved minification saved ~1K! (cobexer) * Added integrated support for Flashcanvas (niklasvh) * Fixed a variety of legacy IE bugs (niklasvh) v0.3.2 - 20.2.2012 * Added changelog! * Added bookmarklet (cobexer) * Option to select single element to render (niklasvh) * Fixed closure compiler warnings (cobexer) * Enable profiling in FF (cobexer) html2canvas-0.5.0-beta4/Gruntfile.js 0000664 0000000 0000000 00000016305 12650760301 0017235 0 ustar 00root root 0000000 0000000 /*global module:false*/ var _ = require('lodash'), path = require('path'); var proxy = require('html2canvas-proxy'); module.exports = function(grunt) { var meta = { banner: '/*\n <%= pkg.title || pkg.name %> <%= pkg.version %>' + '<%= pkg.homepage ? " <" + pkg.homepage + ">" : "" %>' + '\n' + ' Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>' + '\n\n Released under <%= _.pluck(pkg.licenses, "type").join(", ") %> License\n*/\n' }; var browsers = { chrome: { browserName: "chrome", platform: "Windows 7", version: "39" }, firefox: { browserName: "firefox", version: "15", platform: "Windows 7" }, ie9: { browserName: "internet explorer", version: "9", platform: "Windows 7" }, ie10: { browserName: "internet explorer", version: "10", platform: "Windows 8" }, ie11: { browserName: "internet explorer", version: "11", platform: "Windows 8.1" }, chromeOSX:{ browserName: "chrome", platform: "OS X 10.8", version: "39" } }; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), browserify: { dist: { src: ['src/core.js'], dest: 'dist/<%= pkg.name %>.js', options: { browserifyOptions: { standalone: 'html2canvas' }, banner: meta.banner, plugin: [ [ "browserify-derequire" ] ] } }, svg: { src: [ 'src/fabric/dist/fabric.js' ], dest: 'dist/<%= pkg.name %>.svg.js', options:{ browserifyOptions: { standalone: 'html2canvas.svg' }, banner: meta.banner, plugin: [ [ "browserify-derequire" ] ] } } }, connect: { server: { options: { port: 8080, base: './', keepalive: true } }, altServer: { options: { port: 8083, base: './' } }, cors: { options: { port: 8081, base: './', middleware: function(connect, options) { return [ function(req, res, next) { if (req.url !== '/tests/assets/image2.jpg') { next(); return; } res.setHeader("Access-Control-Allow-Origin", "*"); res.end(require("fs").readFileSync('tests/assets/image2.jpg')); } ]; } } }, proxy: { options: { port: 8082, middleware: function(connect, options) { return [ function(req, res, next) { res.jsonp = function(content) { res.end(req.query.callback + "(" + JSON.stringify(content) + ")"); }; next(); }, proxy() ]; } } }, ci: { options: { port: 8080, base: './' } } }, execute: { fabric: { options: { args: ['modules=' + ['text','serialization', 'parser', 'gradient', 'pattern', 'shadow', 'freedrawing', 'image_filters', 'serialization'].join(","), 'no-es5-compat', 'dest=' + path.resolve(__dirname, 'src/fabric/dist/') + '/'] }, src: ['src/fabric/build.js'] } }, uglify: { dist: { src: ['<%= browserify.dist.dest %>'], dest: 'dist/<%= pkg.name %>.min.js' }, svg: { src: ['<%= browserify.svg.dest %>'], dest: 'dist/<%= pkg.name %>.svg.min.js' }, options: { banner: meta.banner } }, watch: { files: ['src/**/*', '!src/fabric/**/*'], tasks: ['jshint', 'build'] }, jshint: { all: ['src/*.js', 'src/renderers/*.js'], options: grunt.file.readJSON('./.jshintrc') }, mochacli: { options: { reporter: 'spec' }, all: ['tests/node/*.js'] }, mocha_phantomjs: { all: ['tests/mocha/**/*.html'] }, mocha_webdriver: browsers, webdriver: browsers }); grunt.registerTask('webdriver', 'Browser render tests', function(browser, test) { var selenium = require("./tests/selenium.js"); var done = this.async(); var browsers = (browser) ? [grunt.config.get(this.name + "." + browser)] : _.values(grunt.config.get(this.name)); selenium.tests(browsers, test).catch(function() { done(false); }).finally(function() { console.log("Done"); done(); }); }); grunt.registerTask('mocha_webdriver', 'Browser mocha tests', function(browser, test) { var selenium = require("./tests/mocha/selenium.js"); var done = this.async(); var browsers = (browser) ? [grunt.config.get(this.name + "." + browser)] : _.values(grunt.config.get(this.name)); selenium.tests(browsers, test).catch(function() { done(false); }).finally(function() { done(); }); }); grunt.loadNpmTasks('grunt-browserify'); grunt.loadNpmTasks('grunt-mocha-phantomjs'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-execute'); grunt.loadNpmTasks('grunt-mocha-cli'); grunt.registerTask('server', ['connect:cors', 'connect:proxy', 'connect:altServer', 'connect:server']); grunt.registerTask('build', ['execute', 'browserify', 'uglify']); grunt.registerTask('default', ['jshint', 'build', 'mochacli', 'connect:altServer', 'mocha_phantomjs']); grunt.registerTask('travis', ['jshint', 'build', 'connect:altServer', 'connect:ci', 'connect:proxy', 'connect:cors', 'mocha_phantomjs', 'webdriver']); }; html2canvas-0.5.0-beta4/LICENSE 0000664 0000000 0000000 00000002045 12650760301 0015741 0 ustar 00root root 0000000 0000000 Copyright (c) 2012 Niklas von Hertzen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. html2canvas-0.5.0-beta4/bower.json 0000664 0000000 0000000 00000000261 12650760301 0016743 0 ustar 00root root 0000000 0000000 { "name": "html2canvas", "description": "Screenshots with JavaScript", "main": "dist/html2canvas.js", "ignore": [ "tests", ".travis.yml" ] } html2canvas-0.5.0-beta4/examples/ 0000775 0000000 0000000 00000000000 12650760301 0016551 5 ustar 00root root 0000000 0000000 html2canvas-0.5.0-beta4/examples/demo.html 0000664 0000000 0000000 00000010132 12650760301 0020360 0 ustar 00root root 0000000 0000000
the world ends
bar maids,
This is a nonsensical document, but syntactically valid HTML 4.0. All 100% conformant CSS1 agents should be able to render the document elements above this paragraph indistinguishably (to the pixel) from this reference rendering, (except font rasterization and form widgets). All discrepancies should be traceable to CSS1 implementation shortcomings. Once you have finished evaluating this test, you can return to the parent page.
html2canvas-0.5.0-beta4/examples/demo2.html 0000664 0000000 0000000 00000003107 12650760301 0020446 0 ustar 00root root 0000000 0000000Followed by some text wrapped in a <p> paragraph.
Maybe add a link or a different style of link with a highlight.