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.removeDOMMutationsObserver(this.update, this); |
71 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Modified, this.update, this); | 72 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Modified, this.update, this); |
72 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Removed, this.update, this); | 73 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Attr
Removed, this.update, this); |
73 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Char
acterDataModified, this.update, this); | 74 this._domModel.removeEventListener(WebInspector.DOMModel.Events.Char
acterDataModified, this.update, this); |
74 } | 75 } |
75 this._target = target; | 76 this._target = target; |
76 if (target) { | 77 if (target) { |
77 this._domModel = WebInspector.DOMModel.fromTarget(target); | 78 this._domModel = WebInspector.DOMModel.fromTarget(target); |
78 this._cssModel = WebInspector.CSSStyleModel.fromTarget(target); | 79 this._cssModel = WebInspector.CSSStyleModel.fromTarget(target); |
79 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetAdded, this.update, this); | 80 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetAdded, this.update, this); |
80 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetRemoved, this.update, this); | 81 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetRemoved, this.update, this); |
81 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetChanged, this.update, this); | 82 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.St
yleSheetChanged, this.update, this); |
82 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Me
diaQueryResultChanged, this.update, this); | 83 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Me
diaQueryResultChanged, this.update, this); |
83 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Ps
eudoStateForced, this.update, this); | 84 this._cssModel.addEventListener(WebInspector.CSSStyleModel.Events.Ps
eudoStateForced, this.update, this); |
| 85 this._domModel.addDOMMutationsObserver(this.update, this); |
84 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrMod
ified, this.update, this); | 86 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrMod
ified, this.update, this); |
85 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrRem
oved, this.update, this); | 87 this._domModel.addEventListener(WebInspector.DOMModel.Events.AttrRem
oved, this.update, this); |
86 this._domModel.addEventListener(WebInspector.DOMModel.Events.Charact
erDataModified, this.update, this); | 88 this._domModel.addEventListener(WebInspector.DOMModel.Events.Charact
erDataModified, this.update, this); |
87 } | 89 } |
88 }, | 90 }, |
89 | 91 |
90 /** | 92 /** |
91 * @override | 93 * @override |
92 * @param {!WebInspector.Throttler.FinishCallback} finishedCallback | 94 * @param {!WebInspector.Throttler.FinishCallback} finishedCallback |
93 * @protected | 95 * @protected |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 136 |
135 var fontUsageElement = fontStatElement.createChild("span", "font-usa
ge"); | 137 var fontUsageElement = fontStatElement.createChild("span", "font-usa
ge"); |
136 var usage = platformFonts[i].glyphCount; | 138 var usage = platformFonts[i].glyphCount; |
137 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString("
%d glyph", usage) : WebInspector.UIString("%d glyphs", usage); | 139 fontUsageElement.textContent = usage === 1 ? WebInspector.UIString("
%d glyph", usage) : WebInspector.UIString("%d glyphs", usage); |
138 } | 140 } |
139 finishedCallback(); | 141 finishedCallback(); |
140 }, | 142 }, |
141 | 143 |
142 __proto__: WebInspector.ElementsSidebarPane.prototype | 144 __proto__: WebInspector.ElementsSidebarPane.prototype |
143 } | 145 } |
OLD | NEW |