mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-04-02 04:22:56 +00:00
Bug 873963 - Set fontFamily property directly; r=dcamp, mgoodwin
This commit is contained in:
parent
08bfd84263
commit
342dbaef36
@ -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);
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user