Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Unified Diff: Source/devtools/front_end/PlatformFontsSidebarPane.js

Issue 59993003: DevTools: add title to computed fonts section (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fixing nits Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/devtools/front_end/elementsPanel.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | Source/devtools/front_end/elementsPanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698