Skip to content

Commit bee1188

Browse files
committed
Merge pull request #16 from kdzwinel/5-remove-ui-elements
Remove unused UI elements
2 parents 9b1e576 + c002175 commit bee1188

File tree

2 files changed

+3
-38
lines changed

2 files changed

+3
-38
lines changed

dt/network/NetworkLogView.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ WebInspector.NetworkLogView = function(filterBar, progressBarContainer, networkL
4444
this.registerRequiredCSS("network/networkLogView.css");
4545
this.registerRequiredCSS("ui/filter.css");
4646

47-
this._networkHideDataURLSetting = WebInspector.settings.createSetting("networkHideDataURL", false);
4847
this._networkResourceTypeFiltersSetting = WebInspector.settings.createSetting("networkResourceTypeFilters", {});
4948
this._networkShowPrimaryLoadWaterfallSetting = WebInspector.settings.createSetting("networkShowPrimaryLoadWaterfall", false);
5049

@@ -257,11 +256,6 @@ WebInspector.NetworkLogView.prototype = {
257256
this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged, this);
258257
this._filterBar.addFilter(this._textFilterUI);
259258

260-
var dataURLSetting = this._networkHideDataURLSetting;
261-
this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url", WebInspector.UIString("Hide data URLs"), true, dataURLSetting);
262-
this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterChanged, this._filterChanged.bind(this), this);
263-
this._filterBar.addFilter(this._dataURLFilterUI);
264-
265259
var filterItems = [];
266260
for (var categoryId in WebInspector.resourceCategories) {
267261
var category = WebInspector.resourceCategories[categoryId];
@@ -313,18 +307,14 @@ WebInspector.NetworkLogView.prototype = {
313307
this._hideRecordingHint();
314308
this._recordingHint = this.element.createChild("div", "network-status-pane fill");
315309
var hintText = this._recordingHint.createChild("div", "recording-hint");
316-
var reloadShortcutNode = this._recordingHint.createChild("b");
317-
reloadShortcutNode.textContent = WebInspector.shortcutRegistry.shortcutDescriptorsForAction("main.reload")[0].name;
318310

319311
if (this._recording) {
320312
var recordingText = hintText.createChild("span");
321313
recordingText.textContent = WebInspector.UIString("Recording network activity\u2026");
322-
hintText.createChild("br");
323-
hintText.appendChild(WebInspector.formatLocalized(WebInspector.UIString("Perform a request or hit %s to record the reload."), [reloadShortcutNode], null));
324314
} else {
325315
var recordNode = hintText.createChild("b");
326316
recordNode.textContent = WebInspector.shortcutRegistry.shortcutTitleForAction("network.toggle-recording");
327-
hintText.appendChild(WebInspector.formatLocalized(WebInspector.UIString("Record (%s) or reload (%s) to display network activity."), [recordNode, reloadShortcutNode], null));
317+
hintText.appendChild(WebInspector.formatLocalized(WebInspector.UIString("Record (%s) to display network activity."), [recordNode], null));
328318
}
329319
},
330320

@@ -1361,10 +1351,6 @@ WebInspector.NetworkLogView.prototype = {
13611351
contextMenu.appendSeparator();
13621352
contextMenu.appendItem(WebInspector.UIString.capitalize("Save as HAR with ^content"), this._exportAll.bind(this));
13631353

1364-
contextMenu.appendSeparator();
1365-
contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^browser ^cache"), this._clearBrowserCache.bind(this));
1366-
contextMenu.appendItem(WebInspector.UIString.capitalize("Clear ^browser ^cookies"), this._clearBrowserCookies.bind(this));
1367-
13681354
var blockedSetting = WebInspector.moduleSetting("blockedURLs");
13691355
if (request && Runtime.experiments.isEnabled("requestBlocking")) { // Disabled until ready.
13701356
contextMenu.appendSeparator();
@@ -1635,8 +1621,6 @@ WebInspector.NetworkLogView.prototype = {
16351621
var categoryName = request.resourceType().category().title;
16361622
if (!this._resourceCategoryFilterUI.accept(categoryName))
16371623
return false;
1638-
if (this._dataURLFilterUI.checked() && request.parsedURL.isDataURL())
1639-
return false;
16401624
for (var i = 0; i < this._filters.length; ++i) {
16411625
if (!this._filters[i](request))
16421626
return false;

dt/network/NetworkPanel.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ WebInspector.NetworkPanel.prototype = {
123123
this._clearButton.addEventListener("click", this._onClearButtonClicked, this);
124124
this._panelToolbar.appendToolbarItem(this._clearButton);
125125
this._panelToolbar.appendSeparator();
126-
var recordFilmStripButton = new WebInspector.ToolbarSettingToggle(this._networkRecordFilmStripSetting, "camera-toolbar-item", WebInspector.UIString("Capture screenshots"));
127-
this._panelToolbar.appendToolbarItem(recordFilmStripButton);
128126

129127
this._panelToolbar.appendToolbarItem(this._filterBar.filterButton());
130128
this._panelToolbar.appendSeparator();
@@ -139,16 +137,8 @@ WebInspector.NetworkPanel.prototype = {
139137
this._panelToolbar.appendToolbarItem(showOverviewButton);
140138
this._panelToolbar.appendSeparator();
141139

142-
this._preserveLogCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Preserve log"), WebInspector.UIString("Do not clear log on page reload / navigation"));
143-
this._preserveLogCheckbox.inputElement.addEventListener("change", this._onPreserveLogCheckboxChanged.bind(this), false);
144-
this._panelToolbar.appendToolbarItem(this._preserveLogCheckbox);
145-
146-
this._disableCacheCheckbox = new WebInspector.ToolbarCheckbox(WebInspector.UIString("Disable cache"), WebInspector.UIString("Disable cache (while DevTools is open)"), WebInspector.moduleSetting("cacheDisabled"));
147-
this._panelToolbar.appendToolbarItem(this._disableCacheCheckbox);
148-
149140
this._panelToolbar.appendSeparator();
150141
this._panelToolbar.appendToolbarItem(this._createBlockedURLsButton());
151-
this._panelToolbar.appendToolbarItem(this._createNetworkConditionsSelect());
152142
this._panelToolbar.appendToolbarItem(new WebInspector.ToolbarItem(this._progressBarContainer));
153143
},
154144

@@ -183,7 +173,7 @@ WebInspector.NetworkPanel.prototype = {
183173

184174
_toggleRecording: function()
185175
{
186-
if (!this._preserveLogCheckbox.checked() && !this._recordButton.toggled())
176+
if (!this._recordButton.toggled())
187177
this._reset();
188178
this._toggleRecordButton(!this._recordButton.toggled());
189179
},
@@ -224,14 +214,6 @@ WebInspector.NetworkPanel.prototype = {
224214
this._networkLogView.addFilmStripFrames(timestamps);
225215
},
226216

227-
/**
228-
* @param {!Event} event
229-
*/
230-
_onPreserveLogCheckboxChanged: function(event)
231-
{
232-
this._networkLogView.setPreserveLog(this._preserveLogCheckbox.checked());
233-
},
234-
235217
/**
236218
* @param {!WebInspector.Event} event
237219
*/
@@ -255,8 +237,7 @@ WebInspector.NetworkPanel.prototype = {
255237
*/
256238
_willReloadPage: function(event)
257239
{
258-
if (!this._preserveLogCheckbox.checked())
259-
this._reset();
240+
this._reset();
260241
this._toggleRecordButton(true);
261242
if (this._pendingStopTimer) {
262243
clearTimeout(this._pendingStopTimer);

0 commit comments

Comments
 (0)