layout/reftests/text-shadow/text-shadow-on-selection-1.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

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

mercurial