OLD | NEW |
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 19 matching lines...) Expand all Loading... |
30 | 30 |
31 /** | 31 /** |
32 * @constructor | 32 * @constructor |
33 * @extends {WebInspector.SidebarPane} | 33 * @extends {WebInspector.SidebarPane} |
34 */ | 34 */ |
35 WebInspector.PlatformFontsSidebarPane = function() | 35 WebInspector.PlatformFontsSidebarPane = function() |
36 { | 36 { |
37 WebInspector.SidebarPane.call(this, WebInspector.UIString("Fonts")); | 37 WebInspector.SidebarPane.call(this, WebInspector.UIString("Fonts")); |
38 this.element.classList.add("platform-fonts"); | 38 this.element.classList.add("platform-fonts"); |
39 | 39 |
40 this._sectionTitle = document.createElementWithClass("div", "sidebar-separat
or"); | 40 this._sectionTitle = createElementWithClass("div", "sidebar-separator"); |
41 this.element.insertBefore(this._sectionTitle, this.bodyElement); | 41 this.element.insertBefore(this._sectionTitle, this.bodyElement); |
42 this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts"); | 42 this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts"); |
43 this._fontStatsSection = this.bodyElement.createChild("div", "stats-section"
); | 43 this._fontStatsSection = this.bodyElement.createChild("div", "stats-section"
); |
44 } | 44 } |
45 | 45 |
46 WebInspector.PlatformFontsSidebarPane.prototype = { | 46 WebInspector.PlatformFontsSidebarPane.prototype = { |
47 _onNodeChange: function() | 47 _onNodeChange: function() |
48 { | 48 { |
49 if (this._innerUpdateTimeout) | 49 if (this._innerUpdateTimeout) |
50 return; | 50 return; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 fontDelimeterElement.textContent = "\u2014"; | 123 fontDelimeterElement.textContent = "\u2014"; |
124 | 124 |
125 var fontUsageElement = fontStatElement.createChild("span", "font-usa
ge"); | 125 var fontUsageElement = fontStatElement.createChild("span", "font-usa
ge"); |
126 var usage = platformFonts[i].glyphCount; | 126 var usage = platformFonts[i].glyphCount; |
127 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString("
%d glyph", usage) : WebInspector.UIString("%d glyphs", usage); | 127 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString("
%d glyph", usage) : WebInspector.UIString("%d glyphs", usage); |
128 } | 128 } |
129 }, | 129 }, |
130 | 130 |
131 __proto__: WebInspector.SidebarPane.prototype | 131 __proto__: WebInspector.SidebarPane.prototype |
132 } | 132 } |
OLD | NEW |