layout/reftests/text-shadow/text-shadow-on-selection-2.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 <!DOCTYPE html>
michael@0 2 <html class="reftest-wait">
michael@0 3 <head>
michael@0 4 <script type="text/javascript">
michael@0 5 function onload() {
michael@0 6 var range = document.createRange();
michael@0 7 range.selectNodeContents(document.getElementById("selectMe"));
michael@0 8 var sel = window.getSelection();
michael@0 9 sel.removeAllRanges();
michael@0 10 sel.addRange(range);
michael@0 11 window.focus();
michael@0 12 }
michael@0 13 function disableReftestWait() {
michael@0 14 document.documentElement.className = '';
michael@0 15 }
michael@0 16 </script>
michael@0 17 <style type="text/css">
michael@0 18 body {
michael@0 19 background: white;
michael@0 20 font-size: 24px;
michael@0 21 }
michael@0 22 div {
michael@0 23 color: blue;
michael@0 24 text-shadow: red 2px 2px 0px;
michael@0 25 }
michael@0 26 ::-moz-selection {
michael@0 27 background: yellow;
michael@0 28 color: white;
michael@0 29 text-shadow: none;
michael@0 30 }
michael@0 31 ::selection {
michael@0 32 background: yellow;
michael@0 33 color: white;
michael@0 34 text-shadow: none;
michael@0 35 }
michael@0 36 </style>
michael@0 37 </head>
michael@0 38 <body onload="onload()" onfocus="disableReftestWait()">
michael@0 39 <div>
michael@0 40 hello <span id="selectMe">selected</span> world
michael@0 41 </div>
michael@0 42 </body>
michael@0 43 </html>

mercurial