Index: Source/devtools/front_end/PlatformFontsSidebarPane.js |
diff --git a/Source/devtools/front_end/PlatformFontsSidebarPane.js b/Source/devtools/front_end/PlatformFontsSidebarPane.js |
index 6ec7a5c35beae4cdfb8e33939381333c85279af8..819f59380ef875aab0288e7f3bac95e9d464c69d 100644 |
--- a/Source/devtools/front_end/PlatformFontsSidebarPane.js |
+++ b/Source/devtools/front_end/PlatformFontsSidebarPane.js |
@@ -40,13 +40,10 @@ WebInspector.PlatformFontsSidebarPane = function() |
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrRemoved, this._onNodeChange.bind(this)); |
WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.CharacterDataModified, this._onNodeChange.bind(this)); |
- var cssFontSection = this.element.createChild("div", "stats-section monospace"); |
- var cssFontPrefix = cssFontSection.createChild("span", "webkit-css-property"); |
- cssFontPrefix.textContent = "font-family"; |
- cssFontSection.createTextChild(":"); |
- this._cssFontValue = cssFontSection.createChild("span", "css-font-value"); |
- |
- this._fontStatsSection = this.element.createChild("div", "stats-section"); |
+ this._sectionTitle = document.createElementWithClass("div", "sidebar-separator"); |
+ this.element.insertBefore(this._sectionTitle, this.bodyElement); |
+ this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts"); |
+ this._fontStatsSection = this.bodyElement.createChild("div", "stats-section"); |
} |
WebInspector.PlatformFontsSidebarPane.prototype = { |
@@ -89,10 +86,12 @@ WebInspector.PlatformFontsSidebarPane.prototype = { |
{ |
if (this._node !== node) |
return; |
- this._cssFontValue.textContent = cssFamilyName + ";"; |
+ |
this._fontStatsSection.removeChildren(); |
- if (!platformFonts || !platformFonts.length) |
+ var isEmptySection = !platformFonts || !platformFonts.length; |
+ this._sectionTitle.enableStyleClass("hidden", isEmptySection); |
+ if (isEmptySection) |
return; |
platformFonts.sort(function (a, b) { |
return b.glyphCount - a.glyphCount; |