Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(560)

Side by Side Diff: inspector/front-end/ElementsTreeOutline.js

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « inspector/front-end/ElementsPanel.js ('k') | inspector/front-end/EventListenersSidebarPane.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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;
OLDNEW
« no previous file with comments | « inspector/front-end/ElementsPanel.js ('k') | inspector/front-end/EventListenersSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698