| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 { | 61 { |
| 62 if (this._target === target) | 62 if (this._target === target) |
| 63 return; | 63 return; |
| 64 | 64 |
| 65 if (this._target) { | 65 if (this._target) { |
| 66 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetAdded, this.update, this); | 66 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetAdded, this.update, this); |
| 67 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetRemoved, this.update, this); | 67 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetRemoved, this.update, this); |
| 68 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetChanged, this.update, this); | 68 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.StyleSheetChanged, this.update, this); |
| 69 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.MediaQueryResultChanged, this.update, this); | 69 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.MediaQueryResultChanged, this.update, this); |
| 70 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.PseudoStateForced, this.update, this); | 70 this._cssModel.removeEventListener(WebInspector.CSSStyleModel.Events
.PseudoStateForced, this.update, this); |
| 71 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Node
Inserted, this.update, this); |
| 72 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Node
Removed, this.update, this); |
| 73 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Dist
ributedNodesChanged, this.update, this); |
| 71 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Modified, this.update, this); | 74 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Modified, this.update, this); |
| 72 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Removed, this.update, this); | 75 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Removed, this.update, this); |
| 73 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Char
acterDataModified, this.update, this); | 76 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Char
acterDataModified, this.update, this); |
| 74 } | 77 } |
| 75 this._target = target; | 78 this._target = target; |
| 76 if (target) { | 79 if (target) { |
| 77 this._domModel = WebInspector.DOMModel.fromTarget(target); | 80 this._domModel = WebInspector.DOMModel.fromTarget(target); |
| 78 this._cssModel = WebInspector.CSSStyleModel.fromTarget(target); | 81 this._cssModel = WebInspector.CSSStyleModel.fromTarget(target); |
| 79 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetAdded, this.update, this); | 82 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetAdded, this.update, this); |
| 80 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetRemoved, this.update, this); | 83 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetRemoved, this.update, this); |
| 81 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetChanged, this.update, this); | 84 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetChanged, this.update, this); |
| 82 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Me
diaQueryResultChanged, this.update, this); | 85 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Me
diaQueryResultChanged, this.update, this); |
| 83 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Ps
eudoStateForced, this.update, this); | 86 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Ps
eudoStateForced, this.update, this); |
| 87 this._domModel.addEventListener(WebInspector.DOMModel.Events.NodeIns
erted, this.update, this); |
| 88 this._domModel.addEventListener(WebInspector.DOMModel.Events.NodeRem
oved, this.update, this); |
| 89 this._domModel.addEventListener(WebInspector.DOMModel.Events.Distrib
utedNodesChanged, this.update, this); |
| 84 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrMod
ified, this.update, this); | 90 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrMod
ified, this.update, this); |
| 85 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrRem
oved, this.update, this); | 91 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrRem
oved, this.update, this); |
| 86 this._domModel.addEventListener(WebInspector.DOMModel.Events.Charact
erDataModified, this.update, this); | 92 this._domModel.addEventListener(WebInspector.DOMModel.Events.Charact
erDataModified, this.update, this); |
| 87 } | 93 } |
| 88 }, | 94 }, |
| 89 | 95 |
| 90 /** | 96 /** |
| 91 * @override | 97 * @override |
| 92 * @param {!WebInspector.Throttler.FinishCallback} finishedCallback | 98 * @param {!WebInspector.Throttler.FinishCallback} finishedCallback |
| 93 * @protected | 99 * @protected |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 | 140 |
| 135 var fontUsageElement = fontStatElement.createChild("span", "font-usa
ge"); | 141 var fontUsageElement = fontStatElement.createChild("span", "font-usa
ge"); |
| 136 var usage = platformFonts[i].glyphCount; | 142 var usage = platformFonts[i].glyphCount; |
| 137 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString("
%d glyph", usage) : WebInspector.UIString("%d glyphs", usage); | 143 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString("
%d glyph", usage) : WebInspector.UIString("%d glyphs", usage); |
| 138 } | 144 } |
| 139 finishedCallback(); | 145 finishedCallback(); |
| 140 }, | 146 }, |
| 141 | 147 |
| 142 __proto__: WebInspector.ElementsSidebarPane.prototype | 148 __proto__: WebInspector.ElementsSidebarPane.prototype |
| 143 } | 149 } |
| OLD | NEW |