diff options
Diffstat (limited to 'WebCore/inspector/front-end')
-rw-r--r-- | WebCore/inspector/front-end/CSSStyleModel.js | 13 | ||||
-rw-r--r-- | WebCore/inspector/front-end/HeapSnapshotView.js | 203 | ||||
-rw-r--r-- | WebCore/inspector/front-end/HelpScreen.js | 16 | ||||
-rw-r--r-- | WebCore/inspector/front-end/InjectedScript.js | 8 | ||||
-rw-r--r-- | WebCore/inspector/front-end/NetworkItemView.js | 9 | ||||
-rw-r--r-- | WebCore/inspector/front-end/ProfilesPanel.js | 20 | ||||
-rw-r--r-- | WebCore/inspector/front-end/Resource.js | 61 | ||||
-rw-r--r-- | WebCore/inspector/front-end/ResourcesPanel.js | 47 | ||||
-rw-r--r-- | WebCore/inspector/front-end/ScriptsPanel.js | 13 | ||||
-rw-r--r-- | WebCore/inspector/front-end/Settings.js | 1 | ||||
-rw-r--r-- | WebCore/inspector/front-end/SourceView.js | 24 | ||||
-rw-r--r-- | WebCore/inspector/front-end/TimelinePanel.js | 2 | ||||
-rw-r--r-- | WebCore/inspector/front-end/inspector.html | 1 | ||||
-rw-r--r-- | WebCore/inspector/front-end/inspector.js | 10 |
14 files changed, 87 insertions, 341 deletions
diff --git a/WebCore/inspector/front-end/CSSStyleModel.js b/WebCore/inspector/front-end/CSSStyleModel.js index 23ed7a8..baf44c9 100644 --- a/WebCore/inspector/front-end/CSSStyleModel.js +++ b/WebCore/inspector/front-end/CSSStyleModel.js @@ -164,18 +164,9 @@ WebInspector.CSSStyleModel.prototype = { { var resource = WebInspector.resourceManager.resourceForURL(href); if (resource && resource.type === WebInspector.Resource.Type.Stylesheet) - resource.setContent(content, this._onRevert.bind(this, styleSheetId)); + resource.content = content; } - InspectorBackend.getStyleSheetText2(styleSheetId, callback.bind(this)); - }, - - _onRevert: function(styleSheetId, contentToRevertTo) - { - function callback(success) - { - this._styleSheetChanged(styleSheetId, true); - } - InspectorBackend.setStyleSheetText2(styleSheetId, contentToRevertTo, callback.bind(this)); + InspectorBackend.getStyleSheetText2(styleSheetId, callback); } } diff --git a/WebCore/inspector/front-end/HeapSnapshotView.js b/WebCore/inspector/front-end/HeapSnapshotView.js index d09f91d..6bcc0ff 100644 --- a/WebCore/inspector/front-end/HeapSnapshotView.js +++ b/WebCore/inspector/front-end/HeapSnapshotView.js @@ -27,154 +27,6 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -WebInspector.HeapSnapshotEdgesIterator = function(snapshot, edges) -{ - this._snapshot = snapshot; - this._edges = edges; - this._edgeIndex = 0; -} - -WebInspector.HeapSnapshotEdgesIterator.prototype = { - get done() - { - return this._edgeIndex >= this._edges.length; - }, - - get isElement() - { - return this._getType() === this._snapshot._edgeElementType; - }, - - get isHidden() - { - return this._getType() === this._snapshot._edgeHiddenType; - }, - - get name() - { - return this.isElement || this.isHidden ? this._getNameOrIndex() : this._snapshot._strings[this._getNameOrIndex()]; - }, - - next: function() - { - this._edgeIndex += this._snapshot._edgeFieldsCount; - }, - - get node() - { - return new WebInspector.HeapSnapshotNodeWrapper(this._snapshot, this.nodeIndex); - }, - - get nodeIndex() - { - return this._edges[this._edgeIndex + this._snapshot._edgeToNodeOffset]; - }, - - _getNameOrIndex: function() - { - return this._edges[this._edgeIndex + this._snapshot._edgeNameOffset]; - }, - - _getType: function() - { - return this._edges[this._edgeIndex + this._snapshot._edgeTypeOffset]; - } -}; - -WebInspector.HeapSnapshotNodeWrapper = function(snapshot, nodeIndex) -{ - this._snapshot = snapshot; - this._nodes = snapshot._nodes; - this._nodeIndex = nodeIndex; -} - -WebInspector.HeapSnapshotNodeWrapper.prototype = { - get edges() - { - return new WebInspector.HeapSnapshotEdgesIterator(this._snapshot, this._getEdges()); - }, - - get edgesCount() - { - return this._nodes[this._nodeIndex + this._snapshot._edgesCountOffset]; - }, - - get instancesCount() - { - return this._nodes[this._nodeIndex + this._snapshot._nodeInstancesCountOffset]; - }, - - get isHidden() - { - return this._getType() === this._snapshot._nodeHiddenType; - }, - - get name() - { - return this._snapshot._strings[this._getName()]; - }, - - get selfSize() - { - return this._nodes[this._nodeIndex + this._snapshot._nodeSelfSizeOffset]; - }, - - _getName: function() - { - return this._nodes[this._nodeIndex + this._snapshot._nodeNameOffset]; - }, - - _getEdges: function() - { - var firstEdgeIndex = this._nodeIndex + this._snapshot._firstEdgeOffset; - return this._nodes.slice(firstEdgeIndex, firstEdgeIndex + this.edgesCount * this._snapshot._edgeFieldsCount); - }, - - _getType: function() - { - return this._nodes[this._nodeIndex + this._snapshot._nodeTypeOffset]; - } -}; - -WebInspector.HeapSnapshot = function(profile) -{ - this._profile = profile; - this._nodes = profile.nodes; - this._strings = profile.strings; - - this._init(); -} - -WebInspector.HeapSnapshot.prototype = { - _init: function() - { - this._metaNodeIndex = 0; - this._rootNodeIndex = 1; - var meta = this._nodes[this._metaNodeIndex]; - this._nodeTypeOffset = meta.fields.indexOf("type"); - this._nodeNameOffset = meta.fields.indexOf("name"); - this._nodeIdOffset = meta.fields.indexOf("id"); - this._nodeInstancesCountOffset = this._nodeIdOffset; - this._nodeSelfSizeOffset = meta.fields.indexOf("self_size"); - this._edgesCountOffset = meta.fields.indexOf("children_count"); - this._firstEdgeOffset = meta.fields.indexOf("children"); - this._nodeTypes = meta.types[this._nodeTypeOffset]; - this._nodeHiddenType = this._nodeTypes.indexOf("hidden"); - var edgesMeta = meta.types[this._firstEdgeOffset]; - this._edgeFieldsCount = edgesMeta.fields.length; - this._edgeTypeOffset = edgesMeta.fields.indexOf("type"); - this._edgeNameOffset = edgesMeta.fields.indexOf("name_or_index"); - this._edgeToNodeOffset = edgesMeta.fields.indexOf("to_node"); - this._edgeTypes = edgesMeta.types[this._edgeTypeOffset]; - this._edgeElementType = this._edgeTypes.indexOf("element"); - this._edgeHiddenType = this._edgeTypes.indexOf("hidden"); - }, - - get rootEdges() - { - return (new WebInspector.HeapSnapshotNodeWrapper(this, this._rootNodeIndex)).edges; - } -}; WebInspector.HeapSnapshotView = function(parent, profile) { @@ -242,7 +94,6 @@ WebInspector.HeapSnapshotView = function(parent, profile) this.percentButton = new WebInspector.StatusBarButton("", "percent-time-status-bar-item status-bar-item"); this.percentButton.addEventListener("click", this._percentClicked.bind(this), false); - this._loadedCallbacks = []; this._loadProfile(this.profile, profileCallback.bind(this)); function profileCallback(profile) @@ -439,14 +290,6 @@ WebInspector.HeapSnapshotView.prototype = { this._updateSummaryGraph(); }, - snapshotLoaded: function(uid, loadedSnapshot) - { - if (!this._loadedCallbacks[uid]) - return; - this._loadedCallbacks[uid](loadedSnapshot); - delete this._loadedCallbacks[uid]; - }, - _changeBase: function() { if (this.baseSnapshot.uid === this._getProfiles()[this.baseSelectElement.selectedIndex].uid) @@ -489,17 +332,15 @@ WebInspector.HeapSnapshotView.prototype = { return; } - this._loadedCallbacks[profile.uid] = processLoadedSnapshot.bind(this); - InspectorBackend.getProfile(profile.typeId, profile.uid); + InspectorBackend.getProfile(profile.typeId, profile.uid, loadedCallback.bind(this)); - function processLoadedSnapshot(loadedSnapshot) - { - var snapshot = this._convertSnapshot(loadedSnapshot); - profile.children = snapshot.children; - profile.entries = snapshot.entries; - profile.lowlevels = snapshot.lowlevels; + function loadedCallback(loadedSnapshot) { + profile.children = loadedSnapshot.head.children; + profile.entries = loadedSnapshot.head.entries; + profile.lowlevels = loadedSnapshot.head.lowlevels; this._prepareProfile(profile); profile._loaded = true; + this.parent.updateProfile(profile); callback(profile); } }, @@ -543,26 +384,6 @@ WebInspector.HeapSnapshotView.prototype = { this.refreshShowAsPercents(); }, - _convertSnapshot: function(loadedSnapshot) - { - var snapshot = new WebInspector.HeapSnapshot(loadedSnapshot); - var result = {lowlevels: {}, entries: {}, children: {}}; - for (var rootEdges = snapshot.rootEdges; !rootEdges.done; rootEdges.next()) { - var node = rootEdges.node; - if (node.isHidden) - result.lowlevels[node.name] = {count: node.instancesCount, size: node.selfSize, type: node.name}; - else if (node.instancesCount) - result.entries[node.name] = {constructorName: node.name, count: node.instancesCount, size: node.selfSize}; - else { - var entry = {constructorName: node.name}; - for (var edges = node.edges; !edges.done; edges.next()) - entry[edges.nodeIndex] = {constructorName: edges.node.name, count: edges.name}; - result.children[rootEdges.nodeIndex] = entry; - } - } - return result; - }, - _prepareProfile: function(profile) { for (var profileEntry in profile.entries) @@ -571,12 +392,12 @@ WebInspector.HeapSnapshotView.prototype = { for (var addr in profile.children) { var retainer = profile.children[addr]; - var retainerId = retainer.constructorName + ":" + addr; + var retainerId = retainer.constructorName + ':' + addr; for (var childAddr in retainer) { - if (childAddr === "constructorName") continue; + if (childAddr === 'constructorName') continue; var item = retainer[childAddr]; - var itemId = item.constructorName + ":" + childAddr; - if ((item.constructorName === "Object" || item.constructorName === "Array")) { + var itemId = item.constructorName + ':' + childAddr; + if ((item.constructorName === 'Object' || item.constructorName === 'Array')) { if (!(itemId in profile.clusters)) profile.clusters[itemId] = { constructorName: itemId, retainers: {} }; mergeRetainers(profile.clusters[itemId], item); @@ -591,7 +412,7 @@ WebInspector.HeapSnapshotView.prototype = { entry.retainers[retainer.constructorName] = { constructorName: retainer.constructorName, count: 0, clusters: {} }; var retainerEntry = entry.retainers[retainer.constructorName]; retainerEntry.count += item.count; - if (retainer.constructorName === "Object" || retainer.constructorName === "Array") + if (retainer.constructorName === 'Object' || retainer.constructorName === 'Array') retainerEntry.clusters[retainerId] = true; } }, @@ -617,7 +438,7 @@ WebInspector.HeapSnapshotView.prototype = { var sortAscending = this.dataGrid.sortOrder === "ascending"; var sortColumnIdentifier = this.dataGrid.sortColumnIdentifier; var sortProperty = { - cons: ["constructorName", null], + cons: ["cons", null], count: ["count", null], size: ["size", "count"], countDelta: this.showCountDeltaAsPercent ? ["countDeltaPercent", null] : ["countDelta", null], diff --git a/WebCore/inspector/front-end/HelpScreen.js b/WebCore/inspector/front-end/HelpScreen.js index a1bbf1e..cad39d0 100644 --- a/WebCore/inspector/front-end/HelpScreen.js +++ b/WebCore/inspector/front-end/HelpScreen.js @@ -30,6 +30,8 @@ WebInspector.HelpScreen = function(title) { + this._addStyleSheetIfNeeded("helpScreen.css"); + this._element = document.createElement("div"); this._element.className = "help-window-outer"; this._element.addEventListener("keydown", this._onKeyDown.bind(this), false); @@ -84,5 +86,17 @@ WebInspector.HelpScreen.prototype = { // Pretend we're modal, grab focus back if we're still shown. if (this._isShown) WebInspector.currentFocusElement = this.contentElement; + }, + + _addStyleSheetIfNeeded: function(href) + { + if (WebInspector.HelpScreen._styleSheetAdded) + return; + + WebInspector.HelpScreen._styleSheetAdded = true; + var link = document.head.createChild("link"); + link.type = "text/css"; + link.rel = "stylesheet"; + link.href = href; } -} +}; diff --git a/WebCore/inspector/front-end/InjectedScript.js b/WebCore/inspector/front-end/InjectedScript.js index fb6b796..106668f 100644 --- a/WebCore/inspector/front-end/InjectedScript.js +++ b/WebCore/inspector/front-end/InjectedScript.js @@ -700,9 +700,11 @@ CommandLineAPI.prototype = { copy: function(object) { - if (injectedScript._type(object) === "node") - object = object.outerHTML; - InjectedScriptHost.copyText(object); + if (injectedScript._type(object) === "node") { + var nodeId = InjectedScriptHost.pushNodePathToFrontend(object, false, false); + InjectedScriptHost.copyNode(nodeId); + } else + InjectedScriptHost.copyText(object); }, clear: function() diff --git a/WebCore/inspector/front-end/NetworkItemView.js b/WebCore/inspector/front-end/NetworkItemView.js index 48e3b19..927e840 100644 --- a/WebCore/inspector/front-end/NetworkItemView.js +++ b/WebCore/inspector/front-end/NetworkItemView.js @@ -37,6 +37,7 @@ WebInspector.NetworkItemView = function(resource) this._headersView = new WebInspector.ResourceHeadersView(resource); // Do not store reference to content view - it can be recreated. var contentView = WebInspector.ResourceManager.resourceViewForResource(resource); + this._cookiesView = new WebInspector.ResourceCookiesView(resource); this._tabbedPane = new WebInspector.TabbedPane(this.element); this._tabbedPane.appendTab("headers", WebInspector.UIString("Headers"), this._headersView); @@ -45,10 +46,8 @@ WebInspector.NetworkItemView = function(resource) contentView.visible = false; this._tabbedPane.appendTab("content", WebInspector.UIString("Content"), contentView); } - if (Preferences.showCookiesTab) { - this._cookiesView = new WebInspector.ResourceCookiesView(resource); - this._tabbedPane.appendTab("cookies", WebInspector.UIString("Cookies"), this._cookiesView); - } + this._tabbedPane.appendTab("cookies", WebInspector.UIString("Cookies"), this._cookiesView); + if (Preferences.showTimingTab) { var timingView = new WebInspector.ResourceTimingView(resource); this._tabbedPane.appendTab("timing", WebInspector.UIString("Timing"), timingView); @@ -83,7 +82,7 @@ WebInspector.NetworkItemView.prototype = { resize: function() { - if (this._cookiesView && this._cookiesView.visible) + if (this._cookiesView.visible) this._cookiesView.resize(); } } diff --git a/WebCore/inspector/front-end/ProfilesPanel.js b/WebCore/inspector/front-end/ProfilesPanel.js index 50795e8..0aa4174 100644 --- a/WebCore/inspector/front-end/ProfilesPanel.js +++ b/WebCore/inspector/front-end/ProfilesPanel.js @@ -123,7 +123,6 @@ WebInspector.ProfilesPanel = function() this._profiles = []; this._profilerEnabled = Preferences.profilerAlwaysEnabled; - this._tempHeapSnapshots = []; this._reset(); } @@ -412,25 +411,6 @@ WebInspector.ProfilesPanel.prototype = { } }, - addHeapSnapshotChunk: function(uid, chunk) - { - if (this._tempHeapSnapshots[uid]) - this._tempHeapSnapshots[uid] += chunk; - else - this._tempHeapSnapshots[uid] = chunk; - }, - - finishHeapSnapshot: function(uid) - { - var profile = - this._profilesIdMap[this._makeKey(uid, WebInspector.HeapSnapshotProfileType.TypeId)]; - if (profile) { - var view = profile.__profilesPanelProfileType.viewForProfile(profile); - view.snapshotLoaded(uid, JSON.parse(this._tempHeapSnapshots[uid])); - } - delete this._tempHeapSnapshots[uid]; - }, - showView: function(view) { this.showProfile(view.profile); diff --git a/WebCore/inspector/front-end/Resource.js b/WebCore/inspector/front-end/Resource.js index aefdd6c..9da7f82 100644 --- a/WebCore/inspector/front-end/Resource.js +++ b/WebCore/inspector/front-end/Resource.js @@ -625,69 +625,22 @@ WebInspector.Resource.prototype = { return this._content; }, - get contentTimestamp() - { - return this._contentTimestamp; - }, - - setInitialContent: function(content) + set content(content) { + var data = { oldContent: this._content, oldContentTimestamp: this._contentTimestamp }; this._content = content; - }, - - isLocallyModified: function() - { - return !!this._baseRevision; - }, - - setContent: function(newContent, onRevert) - { - var revisionResource = new WebInspector.Resource(null, this.url); - revisionResource.type = this.type; - revisionResource.loader = this.loader; - revisionResource.timestamp = this.timestamp; - revisionResource._content = this._content; - revisionResource._actualResource = this; - revisionResource._fireOnRevert = onRevert; - - if (this.finished) - revisionResource.finished = true; - else { - function finished() - { - this.removeEventListener("finished", finished); - revisionResource.finished = true; - } - this.addEventListener("finished", finished.bind(this)); - } - - if (!this._baseRevision) - this._baseRevision = revisionResource; - else - revisionResource._baseRevision = this._baseRevision; - - var data = { revision: revisionResource }; - this._content = newContent; - this.timestamp = new Date(); + this._contentTimestamp = new Date(); this.dispatchEventToListeners("content-changed", data); }, - revertToThis: function() + get contentTimestamp() { - if (!this._actualResource || !this._fireOnRevert) - return; - - function callback(content) - { - if (content) - this._fireOnRevert(content); - } - this.requestContent(callback.bind(this)); + return this._contentTimestamp; }, - get baseRevision() + setInitialContent: function(content) { - return this._baseRevision; + this._content = content; }, requestContent: function(callback) diff --git a/WebCore/inspector/front-end/ResourcesPanel.js b/WebCore/inspector/front-end/ResourcesPanel.js index d6f7172..5c5c5d6 100644 --- a/WebCore/inspector/front-end/ResourcesPanel.js +++ b/WebCore/inspector/front-end/ResourcesPanel.js @@ -369,13 +369,13 @@ WebInspector.ResourcesPanel.prototype = { var view = WebInspector.ResourceManager.resourceViewForResource(resource); // Consider rendering diff markup here. - if (resource.baseRevision && view instanceof WebInspector.SourceView) { + if (resource._baseRevision && resource.content && view instanceof WebInspector.SourceView) { function callback(baseContent) { if (baseContent) this._applyDiffMarkup(view, baseContent, resource.content); } - resource.baseRevision.requestContent(callback.bind(this)); + resource._baseRevision.requestContent(callback.bind(this)); } this._innerShowView(view); }, @@ -1091,7 +1091,28 @@ WebInspector.FrameResourceTreeElement.prototype = { _contentChanged: function(event) { - this.insertChild(new WebInspector.ResourceRevisionTreeElement(this._storagePanel, event.data.revision), 0); + var revisionResource = new WebInspector.Resource(null, this._resource.url); + revisionResource.type = this._resource.type; + revisionResource.loader = this._resource.loader; + if (this._resource.finished) + revisionResource.finished = true; + else { + function finished() + { + revisionResource.finished = true; + } + this._resource.addEventListener("finished", finished); + } + + if (!this._resource._baseRevision) + this._resource._baseRevision = revisionResource; + else + revisionResource._baseRevision = this._resource._baseRevision; + + if (event.data.oldContent) + revisionResource.setInitialContent(event.data.oldContent); + this.insertChild(new WebInspector.ResourceRevisionTreeElement(this._storagePanel, revisionResource, event.data.oldContentTimestamp), 0); + var oldView = WebInspector.ResourceManager.existingResourceViewForResource(this._resource); if (oldView) { var newView = WebInspector.ResourceManager.recreateResourceView(this._resource); @@ -1225,13 +1246,13 @@ WebInspector.ApplicationCacheTreeElement.prototype = { } WebInspector.ApplicationCacheTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype; -WebInspector.ResourceRevisionTreeElement = function(storagePanel, revision) +WebInspector.ResourceRevisionTreeElement = function(storagePanel, resource, timestamp) { - var title = revision.timestamp ? revision.timestamp.toLocaleTimeString() : "(original)"; - WebInspector.BaseStorageTreeElement.call(this, storagePanel, null, title, "resource-sidebar-tree-item resources-category-" + revision.category.name); - if (revision.timestamp) - this.tooltip = revision.timestamp.toLocaleString(); - this._resource = revision; + var title = timestamp ? timestamp.toLocaleTimeString() : "(original)"; + WebInspector.BaseStorageTreeElement.call(this, storagePanel, null, title, "resource-sidebar-tree-item resources-category-" + resource.category.name); + if (timestamp) + this.tooltip = timestamp.toLocaleString(); + this._resource = resource; } WebInspector.ResourceRevisionTreeElement.prototype = { @@ -1240,7 +1261,6 @@ WebInspector.ResourceRevisionTreeElement.prototype = { WebInspector.BaseStorageTreeElement.prototype.onattach.call(this); this.listItemElement.draggable = true; this.listItemElement.addEventListener("dragstart", this._ondragstart.bind(this), false); - this.listItemElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true); }, onselect: function() @@ -1254,13 +1274,6 @@ WebInspector.ResourceRevisionTreeElement.prototype = { event.dataTransfer.setData("text/plain", this._resource.content); event.dataTransfer.effectAllowed = "copy"; return true; - }, - - _handleContextMenuEvent: function(event) - { - var contextMenu = new WebInspector.ContextMenu(); - contextMenu.appendItem(WebInspector.UIString("Revert to this revision"), this._resource.revertToThis.bind(this._resource)); - contextMenu.show(event); } } diff --git a/WebCore/inspector/front-end/ScriptsPanel.js b/WebCore/inspector/front-end/ScriptsPanel.js index 61a2f28..0a3c7a9 100644 --- a/WebCore/inspector/front-end/ScriptsPanel.js +++ b/WebCore/inspector/front-end/ScriptsPanel.js @@ -306,7 +306,7 @@ WebInspector.ScriptsPanel.prototype = { return Preferences.canEditScriptSource; }, - editScriptSource: function(editData, commitEditingCallback, cancelEditingCallback) + editScriptSource: function(sourceID, newContent, line, linesCountToShift, commitEditingCallback, cancelEditingCallback) { if (!this.canEditScripts()) return; @@ -323,19 +323,18 @@ WebInspector.ScriptsPanel.prototype = { if (callFrames && callFrames.length) this.debuggerPaused(callFrames); } else { - if (cancelEditingCallback) - cancelEditingCallback(); + cancelEditingCallback(); WebInspector.log(newBodyOrErrorMessage, WebInspector.ConsoleMessage.MessageLevel.Warning); } for (var i = 0; i < breakpoints.length; ++i) { var breakpoint = breakpoints[i]; var newLine = breakpoint.line; - if (success && breakpoint.line >= editData.line) - newLine += editData.linesCountToShift; - WebInspector.breakpointManager.setBreakpoint(editData.sourceID, breakpoint.url, newLine, breakpoint.enabled, breakpoint.condition); + if (success && breakpoint.line >= line) + newLine += linesCountToShift; + WebInspector.breakpointManager.setBreakpoint(sourceID, breakpoint.url, newLine, breakpoint.enabled, breakpoint.condition); } }; - InspectorBackend.editScriptSource(editData.sourceID, editData.content, mycallback.bind(this)); + InspectorBackend.editScriptSource(sourceID, newContent, mycallback.bind(this)); }, selectedCallFrameId: function() diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js index 163b184..9aac626 100644 --- a/WebCore/inspector/front-end/Settings.js +++ b/WebCore/inspector/front-end/Settings.js @@ -48,7 +48,6 @@ var Preferences = { fileSystemEnabled: false, useDataURLForResourceImageIcons: true, showTimingTab: false, - showCookiesTab: false, debugMode: false } diff --git a/WebCore/inspector/front-end/SourceView.js b/WebCore/inspector/front-end/SourceView.js index 9616321..e764cf8 100644 --- a/WebCore/inspector/front-end/SourceView.js +++ b/WebCore/inspector/front-end/SourceView.js @@ -147,28 +147,14 @@ WebInspector.SourceView.prototype = { lines.push(textModel.line(i)); } - var editData = {}; - editData.sourceID = this._sourceIDForLine(line); - editData.content = lines.join("\n"); - editData.line = line; - editData.linesCountToShift = newContent.split("\n").length - 1; - - WebInspector.panels.scripts.editScriptSource(editData, this._editLineComplete.bind(this, editData), cancelEditingCallback); - }, - - _editLineComplete: function(editData, newContent) - { - this.resource.setContent(newContent, this._revertEditLine.bind(this, editData)); + var linesCountToShift = newContent.split("\n").length - 1; + var newContent = lines.join("\n"); + WebInspector.panels.scripts.editScriptSource(this._sourceIDForLine(line), newContent, line, linesCountToShift, this._editLineComplete.bind(this, newContent), cancelEditingCallback); }, - _revertEditLine: function(editData, contentToRevertTo) + _editLineComplete: function(newContent) { - var newEditData = {}; - newEditData.sourceID = editData.sourceID; - newEditData.content = editData.content; - newEditData.line = editData.line; - newEditData.linesCountToShift = -editData.linesCountToShift; - WebInspector.panels.scripts.editScriptSource(newEditData, this._editLineComplete.bind(this, newEditData)); + this.resource.content = newContent; }, _sourceIDForLine: function(line) diff --git a/WebCore/inspector/front-end/TimelinePanel.js b/WebCore/inspector/front-end/TimelinePanel.js index 16eb4d7..8900d8d 100644 --- a/WebCore/inspector/front-end/TimelinePanel.js +++ b/WebCore/inspector/front-end/TimelinePanel.js @@ -961,7 +961,7 @@ WebInspector.TimelinePanel.FormattedRecord.prototype = { contentHelper._appendLinkRow(WebInspector.UIString("Script"), this.data.url, this.data.lineNumber); break; case recordTypes.Paint: - contentHelper._appendTextRow(WebInspector.UIString("Location"), WebInspector.UIString("(%d, %d)", this.data.x, this.data.y)); + contentHelper._appendTextRow(WebInspector.UIString("Location"), WebInspector.UIString("%d × %d", this.data.x, this.data.y)); contentHelper._appendTextRow(WebInspector.UIString("Dimensions"), WebInspector.UIString("%d × %d", this.data.width, this.data.height)); case recordTypes.RecalculateStyles: // We don't want to see default details. break; diff --git a/WebCore/inspector/front-end/inspector.html b/WebCore/inspector/front-end/inspector.html index 67fd081..2d47474 100644 --- a/WebCore/inspector/front-end/inspector.html +++ b/WebCore/inspector/front-end/inspector.html @@ -35,7 +35,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. <link rel="stylesheet" type="text/css" href="inspector.css"> <link rel="stylesheet" type="text/css" href="inspectorSyntaxHighlight.css"> <link rel="stylesheet" type="text/css" href="networkPanel.css"> - <link rel="stylesheet" type="text/css" href="helpScreen.css"> <link rel="stylesheet" type="text/css" href="popover.css"> <link rel="stylesheet" type="text/css" href="textViewer.css"> <script type="text/javascript" src="utilities.js"></script> diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js index 51145cf..78592ff 100644 --- a/WebCore/inspector/front-end/inspector.js +++ b/WebCore/inspector/front-end/inspector.js @@ -1545,16 +1545,6 @@ WebInspector.setRecordingProfile = function(isProfiling) this.panels.profiles.updateProfileTypeButtons(); } -WebInspector.addHeapSnapshotChunk = function(uid, chunk) -{ - this.panels.profiles.addHeapSnapshotChunk(uid, chunk); -} - -WebInspector.finishHeapSnapshot = function(uid) -{ - this.panels.profiles.finishHeapSnapshot(uid); -} - WebInspector.drawLoadingPieChart = function(canvas, percent) { var g = canvas.getContext("2d"); var darkColor = "rgb(122, 168, 218)"; |