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

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

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 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
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 18 matching lines...) Expand all
29 */ 29 */
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 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrModi fied, this._onNodeChange.bind(this)); 39 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.AttrModi fied, this._onNodeChange.bind(this));
40 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.AttrRemo ved, this._onNodeChange.bind(this)); 40 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.AttrRemo ved, this._onNodeChange.bind(this));
41 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.Characte rDataModified, this._onNodeChange.bind(this)); 41 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.Characte rDataModified, this._onNodeChange.bind(this));
42 42
43 this._sectionTitle = document.createElementWithClass("div", "sidebar-separat or"); 43 this._sectionTitle = document.createElementWithClass("div", "sidebar-separat or");
44 this.element.insertBefore(this._sectionTitle, this.bodyElement); 44 this.element.insertBefore(this._sectionTitle, this.bodyElement);
45 this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts"); 45 this._sectionTitle.textContent = WebInspector.UIString("Rendered Fonts");
46 this._fontStatsSection = this.bodyElement.createChild("div", "stats-section" ); 46 this._fontStatsSection = this.bodyElement.createChild("div", "stats-section" );
47 } 47 }
48 48
49 WebInspector.PlatformFontsSidebarPane.prototype = { 49 WebInspector.PlatformFontsSidebarPane.prototype = {
50 _onNodeChange: function() 50 _onNodeChange: function()
51 { 51 {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 fontDelimeterElement.textContent = "\u2014"; 107 fontDelimeterElement.textContent = "\u2014";
108 108
109 var fontUsageElement = fontStatElement.createChild("span", "font-usa ge"); 109 var fontUsageElement = fontStatElement.createChild("span", "font-usa ge");
110 var usage = platformFonts[i].glyphCount; 110 var usage = platformFonts[i].glyphCount;
111 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString(" %d glyph", usage) : WebInspector.UIString("%d glyphs", usage); 111 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString(" %d glyph", usage) : WebInspector.UIString("%d glyphs", usage);
112 } 112 }
113 }, 113 },
114 114
115 __proto__: WebInspector.SidebarPane.prototype 115 __proto__: WebInspector.SidebarPane.prototype
116 } 116 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/OverridesSupport.js ('k') | Source/devtools/front_end/RemoteObject.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698