dom/tests/js/style1.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 <html>
michael@0 2 <head>
michael@0 3 <title>Example 0</title>
michael@0 4 <style title="hello" media="screen, print">
michael@0 5 :first-letter { color: green; }
michael@0 6 a#id.foo:visited:first-line { color: red; }
michael@0 7 a#id.foo:first-line { color: red; }
michael@0 8 a#id.foo:visited { color: red; }
michael@0 9 a#id:first-line { color: red; }
michael@0 10 a#id:visited { color: red; }
michael@0 11 a:first-line { color: red; }
michael@0 12 a:visited { color: red; }
michael@0 13 a:visited:first-line { color: red; }
michael@0 14 a:visited:visited { color: red; }
michael@0 15 a:first-line:visited { color: red; }
michael@0 16 :active { color: blue; }
michael@0 17 P.first:first-line { color: blue; }
michael@0 18 P.first:first-letter { color: yellow; }
michael@0 19 </style>
michael@0 20 </head>
michael@0 21
michael@0 22 <body bgcolor="#FFFFFF" text="#000000">
michael@0 23 <h1>Example 0: Basic HTML Text Styles</h1>
michael@0 24 <p><br></p>
michael@0 25 <h2>Formatted Text</h2>
michael@0 26 <p>This is a basic paragraph with <b>bold</b>, <i>italic</i> and <i>bold-italic
michael@0 27 </i> text. It also includes <font color="#FF0000">red</font>, <font color="#00FF00">green</font>
michael@0 28 and <font color="#0000FF">blue</font> text. It has <s>strikethru</s> and <u>underline</u>.
michael@0 29 <u> </u></p>
michael@0 30 <p>This is a paragraph with font variations: <b><font face="Arial, Helvetica, sans-serif">Arial,</font></b><font face="Arial, Helvetica, sans-serif">
michael@0 31 <i><font face="Verdana, Arial, Helvetica, sans-serif">Verdana</font>,</i> <font face="co">COURIER,
michael@0 32 <font face="Times New Roman, Times, serif">Times New Roman.</font></font></font></p>
michael@0 33 <p class="first"><font size=7>Font size=7, </font><font size=6>Font size=6, </font><font size=5>Font
michael@0 34 size=5, </font><font size=4>Font size=4, </font><font size=3>Font size=3, </font><font size=2>Font
michael@0 35 size=2, </font><font size=1>Font size=1, </font><font point-size=24 font-weight=700>Font
michael@0 36 point-size=24 font-weight=700</font></p>
michael@0 37 <p><THREED>3D Text. 3D Text. 3D Text. 3D Text. 3D Text. </THREED><br>
michael@0 38 <h2><br>
michael@0 39 </h2>
michael@0 40 <h2>Listings</h2>
michael@0 41 <h3>Bulleted List </h3>
michael@0 42 <ul>
michael@0 43 <li>One</li>
michael@0 44 <li>Two
michael@0 45 <ul>
michael@0 46 <li>Apples</li>
michael@0 47 <li>Oranges</li>
michael@0 48 <li>Bananas</li>
michael@0 49 </ul>
michael@0 50 </li>
michael@0 51 <li>Three</li>
michael@0 52 </ul>
michael@0 53 <br>
michael@0 54 <h3>Numbered List </h3>
michael@0 55 <ol>
michael@0 56 <li>One</li>
michael@0 57 <li>Two
michael@0 58 <ol>
michael@0 59 <li>Apples</li>
michael@0 60 <li>Oranges</li>
michael@0 61 <li>Bananas</li>
michael@0 62 </ol>
michael@0 63 </li>
michael@0 64 <li>Three</li>
michael@0 65 </ol>
michael@0 66 <h2>Justified Text</h2>
michael@0 67 <p>This paragraph is aligned <b>left</b>. This paragraph is aligned <b>left</b>.
michael@0 68 This paragraph is aligned <b>left</b>. This paragraph is aligned <b>left</b>.
michael@0 69 This paragraph is aligned <b>left</b>. This paragraph is aligned <b>left</b>.
michael@0 70 This paragraph is aligned <b>left</b>. </p>
michael@0 71 <p align="RIGHT">This paragarph is aligned <b>right. </b>This paragarph is aligned
michael@0 72 <b>right. </b>This paragarph is aligned <b>right. </b>This paragarph is aligned
michael@0 73 <b>right. </b>This paragarph is aligned <b>right. </b>This paragarph is aligned
michael@0 74 <b>right. </b>This paragarph is aligned <b>right. </b><b> </b>This paragarph
michael@0 75 is aligned <b>right. </b></p>
michael@0 76 <p align="CENTER">This paragraph is aligned <b>center</b>. This paragraph is aligned
michael@0 77 <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned
michael@0 78 <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned
michael@0 79 <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned
michael@0 80 <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned
michael@0 81 <b>center</b>.</p>
michael@0 82 <p></p>
michael@0 83 <p>&nbsp;</p>
michael@0 84 <script>
michael@0 85 var r = 0, g = 0, b = 0;
michael@0 86 var h = document.documentElement.childNodes[1].childNodes[1];
michael@0 87 var sheet = document.styleSheets[0];
michael@0 88 var rule = sheet.cssRules[0];
michael@0 89 var size = 10;
michael@0 90
michael@0 91 function changeColor() {
michael@0 92 r += 5;
michael@0 93 g += 2;
michael@0 94 b += 3;
michael@0 95 r %= 255;
michael@0 96 g %= 255;
michael@0 97 b %= 255;
michael@0 98 size += 1;
michael@0 99 if (size > 48) {
michael@0 100 size = 10;
michael@0 101 }
michael@0 102
michael@0 103 h.style.backgroundColor = "rgb(" + r + "," + g + "," + b + ")";
michael@0 104 rule.style.color = "rgb(" + r + "," + g + "," + b + ")";
michael@0 105 rule.style.fontSize = size + "pt";
michael@0 106 }
michael@0 107
michael@0 108 setInterval(changeColor, 40);
michael@0 109 </script>
michael@0 110 </body>
michael@0 111 </html>

mercurial