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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js

Issue 1417163003: DevTools: remove errors and warnings counters from the Resources panel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
index 2c9f122d59e7312c9b1880921acbe0af28ebfa11..ca025aa331f85bf7f77fc32ecc32e1a2c4db979c 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -1169,8 +1169,6 @@ WebInspector.FrameResourceTreeElement = function(storagePanel, resource)
WebInspector.BaseStorageTreeElement.call(this, storagePanel, resource.displayName, ["resource-sidebar-tree-item", "resources-type-" + resource.resourceType().name()]);
/** @type {!WebInspector.Resource} */
this._resource = resource;
- this._resource.addEventListener(WebInspector.Resource.Events.MessageAdded, this._consoleMessageAdded, this);
- this._resource.addEventListener(WebInspector.Resource.Events.MessagesCleared, this._consoleMessagesCleared, this);
this.tooltip = resource.url;
this._resource[WebInspector.FrameResourceTreeElement._symbol] = this;
}
@@ -1224,8 +1222,6 @@ WebInspector.FrameResourceTreeElement.prototype = {
this.listItemElement.draggable = true;
this.listItemElement.addEventListener("dragstart", this._ondragstart.bind(this), false);
this.listItemElement.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
-
- this._updateErrorsAndWarningsBubbles();
},
/**
@@ -1247,59 +1243,6 @@ WebInspector.FrameResourceTreeElement.prototype = {
},
/**
- * @param {string} x
- */
- _setBubbleText: function(x)
- {
- if (!this._bubbleElement)
- this._bubbleElement = this._statusElement.createChild("div", "bubble-repeat-count");
- this._bubbleElement.textContent = x;
- },
-
- _resetBubble: function()
- {
- if (this._bubbleElement) {
- this._bubbleElement.textContent = "";
- this._bubbleElement.classList.remove("warning");
- this._bubbleElement.classList.remove("error");
- }
- },
-
- _updateErrorsAndWarningsBubbles: function()
- {
- if (this._storagePanel.currentQuery)
- return;
-
- this._resetBubble();
-
- if (this._resource.warnings || this._resource.errors)
- this._setBubbleText(String(this._resource.warnings + this._resource.errors));
-
- if (this._resource.warnings)
- this._bubbleElement.classList.add("warning");
-
- if (this._resource.errors)
- this._bubbleElement.classList.add("error");
- },
-
- _consoleMessagesCleared: function()
- {
- // FIXME: move to the SourceFrame.
- if (this._sourceView)
- this._sourceView.clearMessages();
-
- this._updateErrorsAndWarningsBubbles();
- },
-
- _consoleMessageAdded: function(event)
- {
- var msg = event.data;
- if (this._sourceView)
- this._sourceView.addMessage(msg);
- this._updateErrorsAndWarningsBubbles();
- },
-
- /**
* @return {!WebInspector.ResourceSourceFrame}
*/
sourceView: function()
@@ -1308,10 +1251,6 @@ WebInspector.FrameResourceTreeElement.prototype = {
var sourceFrame = new WebInspector.ResourceSourceFrame(this._resource);
sourceFrame.setHighlighterType(this._resource.canonicalMimeType());
this._sourceView = sourceFrame;
- if (this._resource.messages) {
- for (var i = 0; i < this._resource.messages.length; i++)
- this._sourceView.addPersistentMessage(this._resource.messages[i]);
- }
}
return this._sourceView;
},

Powered by Google App Engine
This is Rietveld 408576698