Bug 873963 - Set fontFamily property directly; r=dcamp, mgoodwin

This commit is contained in:
Joe Walker 2013-05-25 09:51:31 +01:00
parent 08bfd84263
commit 342dbaef36
2 changed files with 2 additions and 2 deletions

View File

@ -183,7 +183,6 @@ FontInspector.prototype = {
*/
let extraCSS = "* {padding:0;margin:0}";
extraCSS += ".theme-dark {color: white}";
extraCSS += "p {font-family: '" + name + "';}";
extraCSS += "p {font-size: 40px;line-height:60px;padding:0 10px;margin:0;}";
cssCode += extraCSS;
let src = "data:text/html;charset=utf-8,<!DOCTYPE HTML><head><base></base></head><style></style><p contenteditable>Abc</p>";
@ -194,6 +193,7 @@ FontInspector.prototype = {
// nightmare.
doc.querySelector("base").href = base;
doc.querySelector("style").textContent = cssCode;
doc.querySelector("p").style.fontFamily = name;
// Forward theme
doc.documentElement.className = document.documentElement.className;
}, true);

View File

@ -24,7 +24,7 @@
</div>
<div id="template" style="display:none">
<section class="font">
<iframe sandbox="allow-same-origin" class="font-preview"></iframe>
<iframe sandbox="" class="font-preview"></iframe>
<div class="font-info">
<h1 class="font-name"></h1>
<span class="font-is-local">&system;</span>