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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/elements/PlatformFontsWidget.js

Issue 2171653002: DevTools: fix computed style pane layout (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/computedStyleSidebarPane.css » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 */ 35 */
36 WebInspector.PlatformFontsWidget = function(sharedModel) 36 WebInspector.PlatformFontsWidget = function(sharedModel)
37 { 37 {
38 WebInspector.ThrottledView.call(this, WebInspector.UIString("Fonts"), true); 38 WebInspector.ThrottledView.call(this, WebInspector.UIString("Fonts"), true);
39 this.registerRequiredCSS("elements/platformFontsWidget.css"); 39 this.registerRequiredCSS("elements/platformFontsWidget.css");
40 40
41 this._sharedModel = sharedModel; 41 this._sharedModel = sharedModel;
42 this._sharedModel.addEventListener(WebInspector.ComputedStyleModel.Events.Co mputedStyleChanged, this.update, this); 42 this._sharedModel.addEventListener(WebInspector.ComputedStyleModel.Events.Co mputedStyleChanged, this.update, this);
43 43
44 this._sectionTitle = createElementWithClass("div", "title"); 44 this._sectionTitle = createElementWithClass("div", "title");
45 this.contentElement.classList.add("platform-fonts");
45 this.contentElement.appendChild(this._sectionTitle); 46 this.contentElement.appendChild(this._sectionTitle);
46 this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts"); 47 this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts");
47 this._fontStatsSection = this.contentElement.createChild("div", "stats-secti on"); 48 this._fontStatsSection = this.contentElement.createChild("div", "stats-secti on");
48 } 49 }
49 50
50 WebInspector.PlatformFontsWidget.prototype = { 51 WebInspector.PlatformFontsWidget.prototype = {
51 /** 52 /**
52 * @override 53 * @override
53 * @protected 54 * @protected
54 * @return {!Promise.<?>} 55 * @return {!Promise.<?>}
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 fontOrigin.textContent = platformFonts[i].isCustomFont ? WebInspecto r.UIString("Network resource") : WebInspector.UIString("Local file"); 97 fontOrigin.textContent = platformFonts[i].isCustomFont ? WebInspecto r.UIString("Network resource") : WebInspector.UIString("Local file");
97 98
98 var fontUsageElement = fontStatElement.createChild("span", "font-usa ge"); 99 var fontUsageElement = fontStatElement.createChild("span", "font-usa ge");
99 var usage = platformFonts[i].glyphCount; 100 var usage = platformFonts[i].glyphCount;
100 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString(" (%d glyph)", usage) : WebInspector.UIString("(%d glyphs)", usage); 101 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString(" (%d glyph)", usage) : WebInspector.UIString("(%d glyphs)", usage);
101 } 102 }
102 }, 103 },
103 104
104 __proto__: WebInspector.ThrottledView.prototype 105 __proto__: WebInspector.ThrottledView.prototype
105 } 106 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/elements/computedStyleSidebarPane.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698