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.

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

mercurial