OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 }, | 43 }, |
44 | 44 |
45 update: function() | 45 update: function() |
46 { | 46 { |
47 var self = this; | 47 var self = this; |
48 var callback = function(properties) { | 48 var callback = function(properties) { |
49 if (!properties) | 49 if (!properties) |
50 return; | 50 return; |
51 self.updateProperties(properties); | 51 self.updateProperties(properties); |
52 }; | 52 }; |
53 InjectedScriptAccess.getProperties(this.object, this.ignoreHasOwnPropert
y, true, callback); | 53 InjectedScriptAccess.get(this.object.injectedScriptId).getProperties(thi
s.object, this.ignoreHasOwnProperty, true, callback); |
54 }, | 54 }, |
55 | 55 |
56 updateProperties: function(properties, rootTreeElementConstructor, rootPrope
rtyComparer) | 56 updateProperties: function(properties, rootTreeElementConstructor, rootPrope
rtyComparer) |
57 { | 57 { |
58 if (!rootTreeElementConstructor) | 58 if (!rootTreeElementConstructor) |
59 rootTreeElementConstructor = this.treeElementConstructor; | 59 rootTreeElementConstructor = this.treeElementConstructor; |
60 | 60 |
61 if (!rootPropertyComparer) | 61 if (!rootPropertyComparer) |
62 rootPropertyComparer = WebInspector.ObjectPropertiesSection.CompareP
roperties; | 62 rootPropertyComparer = WebInspector.ObjectPropertiesSection.CompareP
roperties; |
63 | 63 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 var callback = function(properties) { | 140 var callback = function(properties) { |
141 this.removeChildren(); | 141 this.removeChildren(); |
142 if (!properties) | 142 if (!properties) |
143 return; | 143 return; |
144 | 144 |
145 properties.sort(WebInspector.ObjectPropertiesSection.CompareProperti
es); | 145 properties.sort(WebInspector.ObjectPropertiesSection.CompareProperti
es); |
146 for (var i = 0; i < properties.length; ++i) { | 146 for (var i = 0; i < properties.length; ++i) { |
147 this.appendChild(new this.treeOutline.section.treeElementConstru
ctor(properties[i])); | 147 this.appendChild(new this.treeOutline.section.treeElementConstru
ctor(properties[i])); |
148 } | 148 } |
149 }; | 149 }; |
150 InjectedScriptAccess.getProperties(this.property.value, false, true, cal
lback.bind(this)); | 150 InjectedScriptAccess.get(this.property.value.injectedScriptId).getProper
ties(this.property.value, false, true, callback.bind(this)); |
151 }, | 151 }, |
152 | 152 |
153 ondblclick: function(event) | 153 ondblclick: function(event) |
154 { | 154 { |
155 this.startEditing(); | 155 this.startEditing(); |
156 }, | 156 }, |
157 | 157 |
158 onattach: function() | 158 onattach: function() |
159 { | 159 { |
160 this.update(); | 160 this.update(); |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 self.update(); | 244 self.update(); |
245 | 245 |
246 if (!expressionLength) { | 246 if (!expressionLength) { |
247 // The property was deleted, so remove this tree element. | 247 // The property was deleted, so remove this tree element. |
248 self.parent.removeChild(this); | 248 self.parent.removeChild(this); |
249 } else { | 249 } else { |
250 // Call updateSiblings since their value might be based on the v
alue that just changed. | 250 // Call updateSiblings since their value might be based on the v
alue that just changed. |
251 self.updateSiblings(); | 251 self.updateSiblings(); |
252 } | 252 } |
253 }; | 253 }; |
254 InjectedScriptAccess.setPropertyValue(this.property.parentObjectProxy, t
his.property.name, expression.trimWhitespace(), callback); | 254 InjectedScriptAccess.get(this.property.parentObjectProxy.injectedScriptI
d).setPropertyValue(this.property.parentObjectProxy, this.property.name, express
ion.trimWhitespace(), callback); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 WebInspector.ObjectPropertyTreeElement.prototype.__proto__ = TreeElement.prototy
pe; | 258 WebInspector.ObjectPropertyTreeElement.prototype.__proto__ = TreeElement.prototy
pe; |
OLD | NEW |