| Index: webkit/glue/devtools/js/devtools.js
|
| ===================================================================
|
| --- webkit/glue/devtools/js/devtools.js (revision 17398)
|
| +++ webkit/glue/devtools/js/devtools.js (working copy)
|
| @@ -3,7 +3,7 @@
|
| // found in the LICENSE file.
|
|
|
| /**
|
| - * @fileoverview Tools is a main class that wires all components of the
|
| + * @fileoverview Tools is a main class that wires all components of the
|
| * DevTools frontend together. It is also responsible for overriding existing
|
| * WebInspector functionality while it is getting upstreamed into WebCore.
|
| */
|
| @@ -60,7 +60,7 @@
|
| devtools.ToolsAgent.prototype.reset = function() {
|
| this.domAgent_.reset();
|
| this.debuggerAgent_.reset();
|
| -
|
| +
|
| this.domAgent_.getDocumentElementAsync();
|
| };
|
|
|
| @@ -154,10 +154,10 @@
|
| /**
|
| * Asynchronously queries for the resource content.
|
| * @param {number} identifier Resource identifier.
|
| - * @param {function(string):undefined} opt_callback Callback to call when
|
| + * @param {function(string):undefined} opt_callback Callback to call when
|
| * result is available.
|
| */
|
| -devtools.ToolsAgent.prototype.getResourceContentAsync = function(identifier,
|
| +devtools.ToolsAgent.prototype.getResourceContentAsync = function(identifier,
|
| opt_callback) {
|
| var resource = WebInspector.resources[identifier];
|
| if (!resource) {
|
| @@ -241,12 +241,12 @@
|
| if (treeElement)
|
| treeElement.highlighted = true;
|
| }
|
| -
|
| +
|
| if (nodes.length) {
|
| this.currentSearchResultIndex_ = 0;
|
| this.focusedDOMNode = nodes[0];
|
| }
|
| -
|
| +
|
| this.searchResultCount_ = nodes.length;
|
| };
|
|
|
| @@ -361,7 +361,7 @@
|
| var node = this.focusedDOMNode;
|
| if (node && node.nodeType === Node.TEXT_NODE && node.parentNode)
|
| node = node.parentNode;
|
| -
|
| +
|
| if (node && node.nodeType == Node.ELEMENT_NODE) {
|
| var callback = function(stylesStr) {
|
| var styles = JSON.parse(stylesStr);
|
| @@ -425,9 +425,9 @@
|
| return;
|
| }
|
|
|
| -
|
| +
|
| var self = this;
|
| - devtools.tools.getDomAgent().getNodePrototypesAsync(object.id_,
|
| + devtools.tools.getDomAgent().getNodePrototypesAsync(object.id_,
|
| function(json) {
|
| // Get array of prototype user-friendly names.
|
| var prototypes = JSON.parse(json);
|
| @@ -497,7 +497,7 @@
|
| var nodeId = this.parentObject.devtools$$nodeId_;
|
| var path = this.parentObject.devtools$$path_.slice(0);
|
| path.push(this.propertyName);
|
| - devtools.tools.getDomAgent().getNodePropertiesAsync(nodeId, path, -1,
|
| + devtools.tools.getDomAgent().getNodePropertiesAsync(nodeId, path, -1,
|
| goog.partial(
|
| WebInspector.didGetNodePropertiesAsync_,
|
| this,
|
| @@ -550,7 +550,7 @@
|
| }
|
|
|
| this.attach();
|
| -
|
| +
|
| if (this.script.source) {
|
| this.didResolveScriptSource_();
|
| } else {
|
| @@ -921,6 +921,26 @@
|
| })();
|
|
|
|
|
| +// WebKit's profiler displays milliseconds with high resolution (shows
|
| +// three digits after the decimal point). We never have such resolution,
|
| +// as our minimal sampling rate is 1 ms. So we are disabling high resolution
|
| +// to avoid visual clutter caused by meaningless ".000" parts.
|
| +(function InterceptTimeDisplayInProfiler() {
|
| + var originalDataGetter =
|
| + WebInspector.ProfileDataGridNode.prototype.__lookupGetter__('data');
|
| + WebInspector.ProfileDataGridNode.prototype.__defineGetter__('data',
|
| + function() {
|
| + var oldNumberSecondsToString = Number.secondsToString;
|
| + Number.secondsToString = function(seconds, formatterFunction) {
|
| + return oldNumberSecondsToString(seconds, formatterFunction, false);
|
| + };
|
| + var data = originalDataGetter.call(this);
|
| + Number.secondsToString = oldNumberSecondsToString;
|
| + return data;
|
| + });
|
| +})();
|
| +
|
| +
|
| /**
|
| * @override
|
| * TODO(pfeldman): Add l10n.
|
|
|