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

Unified Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 724413002: DevTools: NetworkPanel: tune members visibility. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « LayoutTests/inspector/network/network-filter-updated-requests.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/network/NetworkPanel.js
diff --git a/Source/devtools/front_end/network/NetworkPanel.js b/Source/devtools/front_end/network/NetworkPanel.js
index 05786004b57492030ee8c06397b246e0c1033334..c361fa1f8054a4f0e7b5f2a18a54a9e81ecebe49 100644
--- a/Source/devtools/front_end/network/NetworkPanel.js
+++ b/Source/devtools/front_end/network/NetworkPanel.js
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
* Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
- * Copyright (C) 2011 Google Inc. All rights reserved.
+ * Copyright (C) 2010, 2011, 2012, 2013, 2014 Google Inc. All rights reserved.
apavlov 2014/11/14 09:55:26 Why this change at all? Only the first year is req
eustas 2014/11/14 10:05:17 1) Apple lists all years it did modifications to a
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,7 +44,6 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting)
this._filterBar = filterBar;
this._coulmnsVisibilitySetting = coulmnsVisibilitySetting;
- this._allowRequestSelection = false;
/** @type {!Map.<string, !WebInspector.NetworkDataGridNode>} */
this._nodesByRequestId = new Map();
/** @type {!Object.<string, boolean>} */
@@ -87,6 +86,9 @@ WebInspector.NetworkLogView = function(filterBar, coulmnsVisibilitySetting)
WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, this._domContentLoadedEventFired, this);
}
+WebInspector.NetworkLogView._isFilteredOutSymbol = Symbol("isFilteredOut");
+WebInspector.NetworkLogView._isMatchingSearchQuerySymbol = Symbol("isMatchingSearchQuery");
+
WebInspector.NetworkLogView.HTTPSchemas = {"http": true, "https": true, "ws": true, "wss": true};
WebInspector.NetworkLogView._responseHeaderColumns = ["Cache-Control", "Connection", "Content-Encoding", "Content-Length", "ETag", "Keep-Alive", "Last-Modified", "Server", "Vary"];
WebInspector.NetworkLogView.defaultColumnsVisibility = {
@@ -167,7 +169,7 @@ WebInspector.NetworkLogView.prototype = {
*/
allowRequestSelection: function()
{
- return this._allowRequestSelection;
+ return !this._allowPopover;
},
_addFilters: function()
@@ -591,7 +593,7 @@ WebInspector.NetworkLogView.prototype = {
var request = nodes[i].request();
var requestTransferSize = request.transferSize;
transferSize += requestTransferSize;
- if (!nodes[i]._isFilteredOut) {
+ if (!nodes[i][WebInspector.NetworkLogView._isFilteredOutSymbol]) {
selectedRequestsNumber++;
selectedTransferSize += requestTransferSize;
}
@@ -796,10 +798,10 @@ WebInspector.NetworkLogView.prototype = {
var node = this._nodesByRequestId.get(requestId);
if (!node)
continue;
- if (!node._isFilteredOut)
+ if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol])
rootNode.removeChild(node);
- node._isFilteredOut = !this._applyFilter(node);
- if (!node._isFilteredOut)
+ node[WebInspector.NetworkLogView._isFilteredOutSymbol] = !this._applyFilter(node);
+ if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol])
nodesToInsert.push(node);
}
@@ -808,7 +810,7 @@ WebInspector.NetworkLogView.prototype = {
var request = node.request();
node.refresh();
dataGrid.insertChild(node);
- node._isMatchingSearchQuery = this._matchRequest(request);
+ node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = this._matchRequest(request);
if (calculator.updateBoundaries(request))
boundariesChanged = true;
}
@@ -889,6 +891,8 @@ WebInspector.NetworkLogView.prototype = {
_appendRequest: function(request)
{
var node = new WebInspector.NetworkDataGridNode(this, request);
+ node[WebInspector.NetworkLogView._isFilteredOutSymbol] = true;
+ node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = false;
// In case of redirect request id is reassigned to a redirected
// request and we need to update _nodesByRequestId and search results.
@@ -1357,7 +1361,7 @@ WebInspector.NetworkLogView.prototype = {
var matchCount = 0;
var node = null;
for (var i = 0; i < nodes.length; ++i) {
- if (nodes[i]._isMatchingSearchQuery) {
+ if (nodes[i][WebInspector.NetworkLogView._isMatchingSearchQuerySymbol]) {
if (matchCount === n) {
node = nodes[i];
break;
@@ -1401,7 +1405,7 @@ WebInspector.NetworkLogView.prototype = {
/** @type {!Array.<!WebInspector.NetworkDataGridNode>} */
var nodes = this._dataGrid.rootNode().children;
for (var i = 0; i < nodes.length; ++i)
- nodes[i]._isMatchingSearchQuery = this._matchRequest(nodes[i].request());
+ nodes[i][WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = this._matchRequest(nodes[i].request());
var newMatchedRequestIndex = this._updateMatchCountAndFindMatchIndex(currentMatchedRequestNode);
if (!newMatchedRequestIndex && jumpBackwards)
newMatchedRequestIndex = this._matchedRequestCount - 1;
@@ -1435,7 +1439,7 @@ WebInspector.NetworkLogView.prototype = {
var matchCount = 0;
var matchIndex = 0;
for (var i = 0; i < nodes.length; ++i) {
- if (!nodes[i]._isMatchingSearchQuery)
+ if (!nodes[i][WebInspector.NetworkLogView._isMatchingSearchQuerySymbol])
continue;
if (node === nodes[i])
matchIndex = matchCount;
@@ -2111,7 +2115,6 @@ WebInspector.NetworkPanel.prototype = {
this._networkLogView.switchViewMode(true);
this._networkLogView.setAllowPopover(true);
- this._networkLogView._allowRequestSelection = false;
},
_toggleViewingRequestMode: function()
@@ -2123,7 +2126,6 @@ WebInspector.NetworkPanel.prototype = {
this.element.classList.add("viewing-resource");
this._splitView.showBoth();
this._networkLogView.setAllowPopover(false);
- this._networkLogView._allowRequestSelection = true;
this._networkLogView.switchViewMode(false);
},
@@ -2612,8 +2614,6 @@ WebInspector.NetworkDataGridNode = function(parentView, request)
this._parentView = parentView;
this._request = request;
this._linkifier = new WebInspector.Linkifier();
- this._isFilteredOut = true;
- this._isMatchingSearchQuery = false;
this._staleGraph = true;
}
« no previous file with comments | « LayoutTests/inspector/network/network-filter-updated-requests.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698