1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/test/frame_selection_underline-ref.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +<?xml version="1.0" encoding="ISO-8859-1"?> 1.5 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 1.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" class="willBeRemoved"> 1.7 +<head> 1.8 +<link rel="stylesheet" type="text/css" href="frame_selection_underline.css"/> 1.9 +<script type="text/javascript"> 1.10 +<![CDATA[ 1.11 + 1.12 +function init(aTest) 1.13 +{ 1.14 + var target = document.getElementById("target"); 1.15 + var decoration = document.getElementById("decoration"); 1.16 + var leftSpacer = document.getElementById("leftspacer"); 1.17 + var rightSpacer = document.getElementById("rightspacer"); 1.18 + 1.19 + var docShell = 1.20 + window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) 1.21 + .getInterface(Components.interfaces.nsIWebNavigation) 1.22 + .QueryInterface(Components.interfaces.nsIDocShell); 1.23 + var controller = 1.24 + docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor) 1.25 + .getInterface(Components.interfaces.nsISelectionDisplay) 1.26 + .QueryInterface(Components.interfaces.nsISelectionController); 1.27 + 1.28 + const nsISelectionController = Components.interfaces.nsISelectionController; 1.29 + if (aTest.selection.isIME) { 1.30 + leftSpacer.style.display = rightSpacer.style.display = "inline-block"; 1.31 + } else { 1.32 + leftSpacer.style.display = rightSpacer.style.display = "none"; 1.33 + } 1.34 + 1.35 + target.style.fontFamily = aTest.font.family; 1.36 + target.style.fontSize = aTest.font.defaultSize; 1.37 + 1.38 + decoration.style.MozTextDecorationStyle = aTest.decoration.styleName; 1.39 + decoration.style.MozTextDecorationColor = aTest.selection.decorationColor; 1.40 + 1.41 + document.documentElement.removeAttribute("class"); 1.42 + setTimeout(function () { 1.43 + document.documentElement.setAttribute("class", "willBeRemoved"); }, 0); 1.44 +} 1.45 + 1.46 +]]> 1.47 +</script> 1.48 +</head> 1.49 +<body class="reference"> 1.50 + <div id="target"><span id="decoration"><span id="leftspacer"> </span> <span id="rightspacer"></span> </span></div> 1.51 +</body> 1.52 +</html>