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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 treeElement.appendChild(new WebInspector.CollectionEntriesMainTreeElemen
t(value)); | 571 treeElement.appendChild(new WebInspector.CollectionEntriesMainTreeElemen
t(value)); |
572 if (internalProperties) { | 572 if (internalProperties) { |
573 for (var i = 0; i < internalProperties.length; i++) { | 573 for (var i = 0; i < internalProperties.length; i++) { |
574 internalProperties[i].parentObject = value; | 574 internalProperties[i].parentObject = value; |
575 treeElement.appendChild(new treeElementConstructor(internalPropertie
s[i])); | 575 treeElement.appendChild(new treeElementConstructor(internalPropertie
s[i])); |
576 } | 576 } |
577 } | 577 } |
578 } | 578 } |
579 | 579 |
580 /** | 580 /** |
581 * @param {!WebInspector.RemoteObject} object | 581 * @param {?WebInspector.RemoteObject} object |
582 * @param {!Array.<string>} propertyPath | 582 * @param {!Array.<string>} propertyPath |
583 * @param {function(?WebInspector.RemoteObject, boolean=)} callback | 583 * @param {function(?WebInspector.RemoteObject, boolean=)} callback |
584 * @return {!Element} | 584 * @return {!Element} |
585 */ | 585 */ |
586 WebInspector.ObjectPropertyTreeElement.createRemoteObjectAccessorPropertySpan =
function(object, propertyPath, callback) | 586 WebInspector.ObjectPropertyTreeElement.createRemoteObjectAccessorPropertySpan =
function(object, propertyPath, callback) |
587 { | 587 { |
588 var rootElement = document.createElement("span"); | 588 var rootElement = document.createElement("span"); |
589 var element = rootElement.createChild("span", "properties-calculate-value-bu
tton"); | 589 var element = rootElement.createChild("span"); |
590 element.textContent = WebInspector.UIString("(...)"); | 590 element.textContent = WebInspector.UIString("(...)"); |
| 591 if (!object) |
| 592 return rootElement; |
| 593 element.classList.add("properties-calculate-value-button"); |
591 element.title = WebInspector.UIString("Invoke property getter"); | 594 element.title = WebInspector.UIString("Invoke property getter"); |
592 element.addEventListener("click", onInvokeGetterClick, false); | 595 element.addEventListener("click", onInvokeGetterClick, false); |
593 | 596 |
594 function onInvokeGetterClick(event) | 597 function onInvokeGetterClick(event) |
595 { | 598 { |
596 event.consume(); | 599 event.consume(); |
597 object.getProperty(propertyPath, callback); | 600 object.getProperty(propertyPath, callback); |
598 } | 601 } |
599 | 602 |
600 return rootElement; | 603 return rootElement; |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1057 { | 1060 { |
1058 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); | 1061 WebInspector.TextPrompt.call(this, WebInspector.ExecutionContextSelector.com
pletionsForTextPromptInCurrentContext); |
1059 this.setSuggestBoxEnabled(true); | 1062 this.setSuggestBoxEnabled(true); |
1060 if (renderAsBlock) | 1063 if (renderAsBlock) |
1061 this.renderAsBlock(); | 1064 this.renderAsBlock(); |
1062 } | 1065 } |
1063 | 1066 |
1064 WebInspector.ObjectPropertyPrompt.prototype = { | 1067 WebInspector.ObjectPropertyPrompt.prototype = { |
1065 __proto__: WebInspector.TextPrompt.prototype | 1068 __proto__: WebInspector.TextPrompt.prototype |
1066 } | 1069 } |
OLD | NEW |