Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!-- |
michael@0 | 2 | DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! |
michael@0 | 3 | |
michael@0 | 4 | This file is specifically designed to create a page larger than |
michael@0 | 5 | any screen fennec could run on (to allow panning in both axes). |
michael@0 | 6 | It is filled with 100x100 pixel boxes that are of unique colour, |
michael@0 | 7 | so that we can identify exactly what part of the page we are |
michael@0 | 8 | rendering at any given time. The colours are specifically chosen |
michael@0 | 9 | so that adjacent boxes have a fairly large variation in colour, |
michael@0 | 10 | and so that errors due to 565/888 conversion are minimised. This |
michael@0 | 11 | is done by dropping the bottom few bits on each color channel, |
michael@0 | 12 | so that conversion from 888->565 is pretty much lossless, and any |
michael@0 | 13 | variation only comes in from however the drivers do 565->888. |
michael@0 | 14 | |
michael@0 | 15 | A lot of the tests depend on this behaviour, so ensure that all |
michael@0 | 16 | the tests pass (on a variety of screen sizes) when making any |
michael@0 | 17 | changes to this file. |
michael@0 | 18 | --> |
michael@0 | 19 | <html style="margin: 0; padding: 0"> |
michael@0 | 20 | <head> |
michael@0 | 21 | <title>Browser Box test</title> |
michael@0 | 22 | <meta name="viewport" content="initial-scale=1.0"/> |
michael@0 | 23 | <meta charset="utf-8"> |
michael@0 | 24 | </head> |
michael@0 | 25 | <body style="margin: 0; padding: 0"> |
michael@0 | 26 | <script type="text/javascript"> |
michael@0 | 27 | for (var y = 0; y < 2000; y += 100) { |
michael@0 | 28 | document.write("<div style='width: 2000px; height: 100px; margin: 0; padding: 0; border: none'>\n"); |
michael@0 | 29 | for (var x = 0; x < 2000; x += 100) { |
michael@0 | 30 | var r = (Math.floor(x / 3) % 256); |
michael@0 | 31 | r = r & 0xF8; |
michael@0 | 32 | var g = (x + y) % 256; |
michael@0 | 33 | g = g & 0xFC; |
michael@0 | 34 | var b = (Math.floor(y / 3) % 256); |
michael@0 | 35 | b = b & 0xF8; |
michael@0 | 36 | document.write("<div style='float: left; width: 100px; height: 100px; margin: 0; padding: 0; border: none; background-color: rgb(" + r + "," + g + "," + b + ")'> </div>\n"); |
michael@0 | 37 | } |
michael@0 | 38 | document.write("</div>\n"); |
michael@0 | 39 | } |
michael@0 | 40 | </script> |
michael@0 | 41 | </body> |
michael@0 | 42 | </html> |