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

Side by Side Diff: Source/devtools/front_end/elements/PlatformFontsSidebarPane.js

Issue 662793002: [DevTools] Replace usages of document with custom functions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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 | Annotate | Revision Log
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 19 matching lines...) Expand all
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/elements/MetricsSidebarPane.js ('k') | Source/devtools/front_end/elements/Spectrum.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698