| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 return; | 350 return; |
| 351 } | 351 } |
| 352 | 352 |
| 353 var tooltipText = null; | 353 var tooltipText = null; |
| 354 if (properties.offsetHeight === properties.naturalHeight && properti
es.offsetWidth === properties.naturalWidth) | 354 if (properties.offsetHeight === properties.naturalHeight && properti
es.offsetWidth === properties.naturalWidth) |
| 355 tooltipText = WebInspector.UIString("%d × %d pixels", properties
.offsetWidth, properties.offsetHeight); | 355 tooltipText = WebInspector.UIString("%d × %d pixels", properties
.offsetWidth, properties.offsetHeight); |
| 356 else | 356 else |
| 357 tooltipText = WebInspector.UIString("%d × %d pixels (Natural: %d
× %d pixels)", properties.offsetWidth, properties.offsetHeight, properties.natu
ralWidth, properties.naturalHeight); | 357 tooltipText = WebInspector.UIString("%d × %d pixels (Natural: %d
× %d pixels)", properties.offsetWidth, properties.offsetHeight, properties.natu
ralWidth, properties.naturalHeight); |
| 358 callback(tooltipText); | 358 callback(tooltipText); |
| 359 } | 359 } |
| 360 var objectProxy = new WebInspector.ObjectProxy(node.id); | 360 var objectProxy = new WebInspector.ObjectProxy(node.injectedScriptId, no
de.id); |
| 361 WebInspector.ObjectProxy.getPropertiesAsync(objectProxy, ["naturalHeight
", "naturalWidth", "offsetHeight", "offsetWidth"], createTooltipThenCallback); | 361 WebInspector.ObjectProxy.getPropertiesAsync(objectProxy, ["naturalHeight
", "naturalWidth", "offsetHeight", "offsetWidth"], createTooltipThenCallback); |
| 362 }, | 362 }, |
| 363 | 363 |
| 364 updateSelection: function() | 364 updateSelection: function() |
| 365 { | 365 { |
| 366 var listItemElement = this.listItemElement; | 366 var listItemElement = this.listItemElement; |
| 367 if (!listItemElement) | 367 if (!listItemElement) |
| 368 return; | 368 return; |
| 369 | 369 |
| 370 if (document.body.offsetWidth <= 0) { | 370 if (document.body.offsetWidth <= 0) { |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 WebInspector.updateFocusedNode(nodeId); | 1068 WebInspector.updateFocusedNode(nodeId); |
| 1069 if (wasExpanded) { | 1069 if (wasExpanded) { |
| 1070 var newTreeItem = treeOutline.findTreeElement(WebInspector.domAg
ent.nodeForId(nodeId)); | 1070 var newTreeItem = treeOutline.findTreeElement(WebInspector.domAg
ent.nodeForId(nodeId)); |
| 1071 if (newTreeItem) | 1071 if (newTreeItem) |
| 1072 newTreeItem.expand(); | 1072 newTreeItem.expand(); |
| 1073 } | 1073 } |
| 1074 } | 1074 } |
| 1075 | 1075 |
| 1076 function commitChange(value) | 1076 function commitChange(value) |
| 1077 { | 1077 { |
| 1078 InjectedScriptAccess.setOuterHTML(node.id, value, wasExpanded, selec
tNode.bind(this)); | 1078 InjectedScriptAccess.get(node.injectedScriptId).setOuterHTML(node.id
, value, wasExpanded, selectNode.bind(this)); |
| 1079 } | 1079 } |
| 1080 | 1080 |
| 1081 InjectedScriptAccess.getNodePropertyValue(node.id, "outerHTML", this._st
artEditingAsHTML.bind(this, commitChange)); | 1081 InjectedScriptAccess.get(node.injectedScriptId).getNodePropertyValue(nod
e.id, "outerHTML", this._startEditingAsHTML.bind(this, commitChange)); |
| 1082 }, | 1082 }, |
| 1083 | 1083 |
| 1084 _copyHTML: function() | 1084 _copyHTML: function() |
| 1085 { | 1085 { |
| 1086 InspectorBackend.copyNode(this.representedObject.id); | 1086 InspectorBackend.copyNode(this.representedObject.id); |
| 1087 } | 1087 } |
| 1088 } | 1088 } |
| 1089 | 1089 |
| 1090 WebInspector.ElementsTreeElement.prototype.__proto__ = TreeElement.prototype; | 1090 WebInspector.ElementsTreeElement.prototype.__proto__ = TreeElement.prototype; |
| 1091 | 1091 |
| 1092 WebInspector.didRemoveNode = WebInspector.Callback.processCallback; | 1092 WebInspector.didRemoveNode = WebInspector.Callback.processCallback; |
| OLD | NEW |