Bug 960737 - Remove inline script / style in browser/devtools/fontinspector/font-inspector.xhtml;r=bgrins

This commit is contained in:
Kay Plößer 2014-01-24 10:49:37 -06:00
parent f31564924c
commit 20384147cb
3 changed files with 8 additions and 3 deletions

View File

@ -6,7 +6,8 @@
.font:not(.has-code) .font-css-code, .font:not(.has-code) .font-css-code,
.font-is-local, .font-is-local,
.font-is-remote, .font-is-remote,
.font.is-local .font-format-url { .font.is-local .font-format-url,
#template {
display: none; display: none;
} }

View File

@ -22,6 +22,9 @@ FontInspector.prototype = {
this.onNewNode = this.onNewNode.bind(this); this.onNewNode = this.onNewNode.bind(this);
this.inspector.selection.on("new-node", this.onNewNode); this.inspector.selection.on("new-node", this.onNewNode);
this.inspector.sidebar.on("fontinspector-selected", this.onNewNode); this.inspector.sidebar.on("fontinspector-selected", this.onNewNode);
this.showAll = this.showAll.bind(this);
this.showAllButton = this.chromeDoc.getElementById("showall");
this.showAllButton.addEventListener("click", this.showAll);
this.update(); this.update();
}, },
@ -40,6 +43,7 @@ FontInspector.prototype = {
this.chromeDoc = null; this.chromeDoc = null;
this.inspector.sidebar.off("layoutview-selected", this.onNewNode); this.inspector.sidebar.off("layoutview-selected", this.onNewNode);
this.inspector.selection.off("new-node", this.onNewNode); this.inspector.selection.off("new-node", this.onNewNode);
this.showAllButton.removeEventListener("click", this.showAll);
}, },
/** /**

View File

@ -20,9 +20,9 @@
<script type="application/javascript;version=1.8" src="font-inspector.js"></script> <script type="application/javascript;version=1.8" src="font-inspector.js"></script>
<div id="root"> <div id="root">
<ul id="all-fonts"></ul> <ul id="all-fonts"></ul>
<button id="showall" onclick="fontInspector.showAll()">&showAllFonts;</button> <button id="showall">&showAllFonts;</button>
</div> </div>
<div id="template" style="display:none"> <div id="template">
<section class="font"> <section class="font">
<iframe sandbox="" class="font-preview"></iframe> <iframe sandbox="" class="font-preview"></iframe>
<div class="font-info"> <div class="font-info">