layout/generic/test/frame_selection_underline-ref.xhtml

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <?xml version="1.0" encoding="ISO-8859-1"?>
     2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
     3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" class="willBeRemoved">
     4 <head>
     5 <link rel="stylesheet" type="text/css" href="frame_selection_underline.css"/>
     6 <script type="text/javascript">
     7 <![CDATA[
     9 function init(aTest)
    10 {
    11   var target = document.getElementById("target");
    12   var decoration = document.getElementById("decoration");
    13   var leftSpacer = document.getElementById("leftspacer");
    14   var rightSpacer = document.getElementById("rightspacer");
    16   var docShell =
    17     window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
    18           .getInterface(Components.interfaces.nsIWebNavigation)
    19           .QueryInterface(Components.interfaces.nsIDocShell);
    20   var controller =
    21     docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
    22             .getInterface(Components.interfaces.nsISelectionDisplay)
    23             .QueryInterface(Components.interfaces.nsISelectionController);
    25   const nsISelectionController = Components.interfaces.nsISelectionController;
    26   if (aTest.selection.isIME) {
    27     leftSpacer.style.display = rightSpacer.style.display = "inline-block";
    28   } else {
    29     leftSpacer.style.display = rightSpacer.style.display = "none";
    30   }
    32   target.style.fontFamily = aTest.font.family;
    33   target.style.fontSize = aTest.font.defaultSize;
    35   decoration.style.MozTextDecorationStyle = aTest.decoration.styleName;
    36   decoration.style.MozTextDecorationColor = aTest.selection.decorationColor;
    38   document.documentElement.removeAttribute("class");
    39   setTimeout(function () {
    40     document.documentElement.setAttribute("class", "willBeRemoved"); }, 0);
    41 }
    43 ]]>
    44 </script>
    45 </head>
    46 <body class="reference">
    47   <div id="target"><span id="decoration"><span id="leftspacer">&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="rightspacer"></span>&nbsp;</span></div>
    48 </body>
    49 </html>

mercurial