Skip to content

Commit ee62c25

Browse files
committed
squash 'resources/unpacked/devtools' changes from 3284500..5374413
5374413 [DevTools] Fix bad unicode symbols in network conditions. 217ba4a DevTools: [SourceMapNamesResolver] do not throw exception on hovering over compiled 8380dd1 DevTools: [Console] fix console stick-to-bottom behavior in case of multiline messages 41ef867 [DevTools] Move inspect from Inspector to Runtime. ec6ab05 DevTools: display recent SW revisions on top of the list, remove stale redundant ones. cd037cf DevTools Timeline: show input latencies and animations under RAIL group fb2d391 SameSite: Teach devtools about the new 'samesite' syntax. 22444a0 DevTools: Fix first paint screenshot. baf10e5 [DevTools] Add "Show all" check box in Service Worker view. e07ca99 DevTools: [Elements] set non-zero hide timeout timer for image popover bcf91f0 DevTools: Refactor CPU profile tree c2b629e [DevTools] Use plain text for network conditions menu. 0f18ee4 DevTools: remove the step into async experiment, it'll need to be implemented differently. 66fc008 DevTools: trim file paths at the middle in source selection dialog 6b5f3d8 DevTools: remove unused "Auto-reload generated CSS" setting 3b8792c DevTools: [SASS] speedup AST.findNodeForPosition method 47ff8c4 [DevTools] Fix stale requests in Network panel not being refreshed 9089491 DevTools: move the force update SW on reload checkbox to the Resources / Service Workers view. Remove the "Debug on start" option from Resources / Service Workers. git-subtree-dir: resources/unpacked/devtools git-subtree-split: 5374413
1 parent a829a47 commit ee62c25

39 files changed

+541
-1098
lines changed

devtools.gypi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,6 @@
638638
'front_end/sources/uiList.css',
639639
'front_end/sources/AddSourceMapURLDialog.js',
640640
'front_end/sources/AdvancedSearchView.js',
641-
'front_end/sources/AsyncOperationsSidebarPane.js',
642641
'front_end/sources/CallStackSidebarPane.js',
643642
'front_end/sources/CSSSourceFrame.js',
644643
'front_end/sources/EditingLocationHistoryManager.js',
@@ -658,7 +657,6 @@
658657
'front_end/sources/ScopeChainSidebarPane.js',
659658
'front_end/sources/ScriptFormatter.js',
660659
'front_end/sources/ScriptFormatterEditorAction.js',
661-
'front_end/sources/ServiceWorkersSidebarPane.js',
662660
'front_end/sources/SimpleHistoryManager.js',
663661
'front_end/sources/SourceMapNamesResolver.js',
664662
'front_end/sources/SourcesNavigator.js',

front_end/common/TextRange.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,20 @@ WebInspector.TextRange.prototype = {
186186
return 0;
187187
},
188188

189+
/**
190+
* @param {number} lineNumber
191+
* @param {number} columnNumber
192+
* @return {number}
193+
*/
194+
compareToPosition: function(lineNumber, columnNumber)
195+
{
196+
if (lineNumber < this.startLine || (lineNumber === this.startLine && columnNumber < this.startColumn))
197+
return -1;
198+
if (lineNumber > this.endLine || (lineNumber === this.endLine && columnNumber > this.endColumn))
199+
return 1;
200+
return 0;
201+
},
202+
189203
/**
190204
* @param {!WebInspector.TextRange} other
191205
* @return {boolean}

front_end/components/NetworkConditionsSelector.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@ WebInspector.NetworkConditionsGroup;
2323

2424
/**
2525
* @param {number} throughput
26+
* @param {boolean=} plainText
2627
* @return {string}
2728
*/
28-
WebInspector.NetworkConditionsSelector._throughputText = function(throughput)
29+
WebInspector.NetworkConditionsSelector._throughputText = function(throughput, plainText)
2930
{
3031
if (throughput < 0)
3132
return "";
3233
var throughputInKbps = throughput / (1024 / 8);
34+
var delimiter = plainText ? "" : " ";
3335
if (throughputInKbps < 1024)
34-
return WebInspector.UIString("%d kb/s", throughputInKbps);
36+
return WebInspector.UIString("%d%skb/s", throughputInKbps, delimiter);
3537
if (throughputInKbps < 1024 * 10)
36-
return WebInspector.UIString("%.1f Mb/s", throughputInKbps / 1024);
37-
return WebInspector.UIString("%d Mb/s", (throughputInKbps / 1024) | 0);
38+
return WebInspector.UIString("%.1f%sMb/s", throughputInKbps / 1024, delimiter);
39+
return WebInspector.UIString("%d%sMb/s", (throughputInKbps / 1024) | 0, delimiter);
3840
}
3941

4042
/** @type {!Array.<!WebInspector.NetworkManager.Conditions>} */
@@ -52,9 +54,10 @@ WebInspector.NetworkConditionsSelector._presets = [
5254

5355
/**
5456
* @param {!WebInspector.NetworkManager.Conditions} conditions
57+
* @param {boolean=} plainText
5558
* @return {!{text: string, title: string}}
5659
*/
57-
WebInspector.NetworkConditionsSelector._conditionsTitle = function(conditions)
60+
WebInspector.NetworkConditionsSelector._conditionsTitle = function(conditions, plainText)
5861
{
5962
var downloadInKbps = conditions.download / (1024 / 8);
6063
var uploadInKbps = conditions.upload / (1024 / 8);
@@ -63,9 +66,10 @@ WebInspector.NetworkConditionsSelector._conditionsTitle = function(conditions)
6366
if (!isThrottling)
6467
return {text: conditionTitle, title: conditionTitle};
6568

66-
var downloadText = WebInspector.NetworkConditionsSelector._throughputText(conditions.download);
67-
var uploadText = WebInspector.NetworkConditionsSelector._throughputText(conditions.upload);
68-
var title = WebInspector.UIString("%s (%s\u2b07 %s\u2b06 %dms RTT)", conditionTitle, downloadText, uploadText, conditions.latency);
69+
var downloadText = WebInspector.NetworkConditionsSelector._throughputText(conditions.download, plainText);
70+
var uploadText = WebInspector.NetworkConditionsSelector._throughputText(conditions.upload, plainText);
71+
var pattern = plainText ? "%s (%dms, %s, %s)" : "%s (%dms RTT, %s\u2b07, %s\u2b06)";
72+
var title = WebInspector.UIString(pattern, conditionTitle, conditions.latency, downloadText, uploadText);
6973
return {text: title, title: WebInspector.UIString("Maximum download throughput: %s.\r\nMaximum upload throughput: %s.\r\nMinimum round-trip time: %dms.", downloadText, uploadText, conditions.latency)};
7074
}
7175

@@ -143,7 +147,7 @@ WebInspector.NetworkConditionsSelector.decorateSelect = function(selectElement)
143147
options.push(null);
144148
}
145149
for (var conditions of group.items) {
146-
var title = WebInspector.NetworkConditionsSelector._conditionsTitle(conditions);
150+
var title = WebInspector.NetworkConditionsSelector._conditionsTitle(conditions, true);
147151
var option = new Option(title.text, title.text);
148152
option.title = title.title;
149153
groupElement.appendChild(option);
@@ -196,7 +200,7 @@ WebInspector.NetworkConditionsSelector.createToolbarMenuButton = function()
196200
if (!conditions)
197201
contextMenu.appendSeparator();
198202
else
199-
contextMenu.appendCheckboxItem(WebInspector.NetworkConditionsSelector._conditionsTitle(conditions).text, selector.optionSelected.bind(selector, conditions), selectedIndex === index);
203+
contextMenu.appendCheckboxItem(WebInspector.NetworkConditionsSelector._conditionsTitle(conditions, true).text, selector.optionSelected.bind(selector, conditions), selectedIndex === index);
200204
}
201205
contextMenu.appendItem(WebInspector.UIString("Edit\u2026"), selector.revealAndUpdate.bind(selector));
202206
}

front_end/components/ShortcutsScreen.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,6 @@ WebInspector.ShortcutsScreen.registerShortcuts = function()
249249
section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-over"), WebInspector.UIString("Step over"));
250250
section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-into"), WebInspector.UIString("Step into"));
251251
section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-out"), WebInspector.UIString("Step out"));
252-
if (Runtime.experiments.isEnabled("stepIntoAsync"))
253-
section.addAlternateKeys(WebInspector.shortcutRegistry.shortcutDescriptorsForAction("debugger.step-into"), WebInspector.UIString("Step into"));
254252

255253
var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcuts.NextCallFrame.concat(WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame);
256254
section.addRelatedKeys(nextAndPrevFrameKeys, WebInspector.UIString("Next/previous call frame"));

front_end/components_lazy/CookiesTable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ WebInspector.CookiesTable = function(expandable, refreshCallback, selectedCallba
5151
{id: "size", title: WebInspector.UIString("Size"), sortable: true, align: WebInspector.DataGrid.Align.Right, weight: 7},
5252
{id: "httpOnly", title: WebInspector.UIString("HTTP"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7},
5353
{id: "secure", title: WebInspector.UIString("Secure"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7},
54-
{id: "sameSite", title: WebInspector.UIString("Same-Site"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7}
54+
{id: "sameSite", title: WebInspector.UIString("SameSite"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7}
5555
];
5656

5757
if (readOnly)
@@ -261,7 +261,7 @@ WebInspector.CookiesTable.prototype = {
261261
const checkmark = "\u2713";
262262
data.httpOnly = (cookie.httpOnly() ? checkmark : "");
263263
data.secure = (cookie.secure() ? checkmark : "");
264-
data.sameSite = (cookie.sameSite() ? checkmark : "");
264+
data.sameSite = cookie.sameSite() || "";
265265

266266
var node = new WebInspector.DataGridNode(data);
267267
node.cookie = cookie;

front_end/components_lazy/FilmStripModel.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,8 @@ WebInspector.FilmStripModel.prototype = {
7171
*/
7272
frameByTimestamp: function(timestamp)
7373
{
74-
/**
75-
* @param {number} timestamp
76-
* @param {!WebInspector.FilmStripModel.Frame} frame
77-
* @return {number}
78-
*/
79-
function comparator(timestamp, frame)
80-
{
81-
return timestamp - frame.timestamp;
82-
}
83-
var index = this._frames.lowerBound(timestamp, comparator);
84-
return index < this._frames.length ? this._frames[index] : null;
74+
var index = this._frames.upperBound(timestamp, (timestamp, frame) => timestamp - frame.timestamp) - 1;
75+
return index >= 0 ? this._frames[index] : null;
8576
}
8677
}
8778

front_end/elements/ElementsTreeOutline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ WebInspector.ElementsTreeOutline = function(domModel, omitRootDOMNode, selectEna
7373
this._visible = false;
7474

7575
this._popoverHelper = new WebInspector.PopoverHelper(this._element, this._getPopoverAnchor.bind(this), this._showPopover.bind(this));
76-
this._popoverHelper.setTimeout(0);
76+
this._popoverHelper.setTimeout(0, 100);
7777

7878
/** @type {!Map<!WebInspector.DOMNode, !WebInspector.ElementsTreeOutline.UpdateRecord>} */
7979
this._updateRecords = new Map();

front_end/main/Main.js

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ WebInspector.Main.prototype = {
122122
Runtime.experiments.register("timelineShowAllEvents", "Show all events on Timeline", true);
123123
Runtime.experiments.register("timelineLatencyInfo", "Show input latency events on the Timeline", true);
124124
Runtime.experiments.register("securityPanel", "Security panel");
125-
Runtime.experiments.register("stepIntoAsync", "Step into async");
126125
Runtime.experiments.register("timelineFlowEvents", "Timeline flow events", true);
127126
Runtime.experiments.register("timelineInvalidationTracking", "Timeline invalidation tracking", true);
128127
Runtime.experiments.register("timelineRecordingPerspectives", "Timeline recording perspectives UI");
@@ -543,42 +542,6 @@ WebInspector.Main.prototype = {
543542
WebInspector.Main._reloadPage(hard);
544543
},
545544

546-
/**
547-
* @override
548-
* @param {!RuntimeAgent.RemoteObject} payload
549-
* @param {!Object=} hints
550-
*/
551-
inspect: function(payload, hints)
552-
{
553-
var object = this._mainTarget.runtimeModel.createRemoteObject(payload);
554-
if (object.isNode()) {
555-
WebInspector.Revealer.revealPromise(object).then(object.release.bind(object));
556-
return;
557-
}
558-
559-
if (object.type === "function") {
560-
WebInspector.RemoteFunction.objectAsFunction(object).targetFunctionDetails().then(didGetDetails);
561-
return;
562-
}
563-
564-
/**
565-
* @param {?WebInspector.DebuggerModel.FunctionDetails} response
566-
*/
567-
function didGetDetails(response)
568-
{
569-
object.release();
570-
571-
if (!response || !response.location)
572-
return;
573-
574-
WebInspector.Revealer.reveal(WebInspector.debuggerWorkspaceBinding.rawLocationToUILocation(response.location));
575-
}
576-
577-
if (hints.copyToClipboard)
578-
InspectorFrontendHost.copyText(object.value);
579-
object.release();
580-
},
581-
582545
/**
583546
* @override
584547
* @param {string} reason

front_end/network/NetworkLogView.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,10 @@ WebInspector.NetworkLogView.prototype = {
961961

962962
var dataGrid = this._dataGrid;
963963
var rootNode = dataGrid.rootNode();
964+
/** @type {!Array<!WebInspector.NetworkDataGridNode> } */
964965
var nodesToInsert = [];
966+
/** @type {!Array<!WebInspector.NetworkDataGridNode> } */
967+
var nodesToRefresh = [];
965968
for (var requestId in this._staleRequestIds) {
966969
var node = this._nodesByRequestId.get(requestId);
967970
if (!node)
@@ -976,6 +979,8 @@ WebInspector.NetworkLogView.prototype = {
976979
if (!node[WebInspector.NetworkLogView._isFilteredOutSymbol])
977980
nodesToInsert.push(node);
978981
}
982+
if (!isFilteredOut)
983+
nodesToRefresh.push(node);
979984
var request = node.request();
980985
this._timeCalculator.updateBoundaries(request);
981986
this._durationCalculator.updateBoundaries(request);
@@ -985,10 +990,12 @@ WebInspector.NetworkLogView.prototype = {
985990
var node = nodesToInsert[i];
986991
var request = node.request();
987992
dataGrid.insertChild(node);
988-
node.refresh();
989993
node[WebInspector.NetworkLogView._isMatchingSearchQuerySymbol] = this._matchRequest(request);
990994
}
991995

996+
for (var node of nodesToRefresh)
997+
node.refresh();
998+
992999
this._highlightNthMatchedRequestForSearch(this._updateMatchCountAndFindMatchIndex(this._currentMatchedRequestNode), false);
9931000

9941001
if (!this.calculator().boundary().equals(oldBoundary)) {

front_end/profiler/CPUProfileBottomUpDataGrid.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,14 @@ WebInspector.BottomUpProfileDataGridNode._sharedPopulate = function(container)
178178
/**
179179
* @constructor
180180
* @extends {WebInspector.ProfileDataGridTree}
181-
* @param {!WebInspector.CPUProfileView} profileView
181+
* @param {!WebInspector.ProfileDataGridNode.Formatter} formatter
182+
* @param {!WebInspector.SearchableView} searchableView
182183
* @param {!ProfilerAgent.CPUProfileNode} rootProfileNode
184+
* @param {number} totalTime
183185
*/
184-
WebInspector.BottomUpProfileDataGridTree = function(profileView, rootProfileNode)
186+
WebInspector.BottomUpProfileDataGridTree = function(formatter, searchableView, rootProfileNode, totalTime)
185187
{
186-
WebInspector.ProfileDataGridTree.call(this, profileView, rootProfileNode);
188+
WebInspector.ProfileDataGridTree.call(this, formatter, searchableView, totalTime);
187189

188190
// Iterate each node in pre-order.
189191
var profileNodeUIDs = 0;
@@ -304,22 +306,22 @@ WebInspector.BottomUpProfileDataGridTree.prototype = {
304306
* @param {!WebInspector.SearchableView.SearchConfig} searchConfig
305307
* @param {boolean} shouldJump
306308
* @param {boolean=} jumpBackwards
307-
* @return {number}
308309
*/
309310
performSearch: function(searchConfig, shouldJump, jumpBackwards)
310311
{
311312
this.searchCanceled();
312313
var matchesQuery = this._matchFunction(searchConfig);
313314
if (!matchesQuery)
314-
return 0;
315+
return;
315316

316317
this._searchResults = [];
317318
for (var current = this.children[0]; current; current = current.traverseNextNode(true, null, true)) {
318319
if (matchesQuery(current))
319320
this._searchResults.push({ profileNode: current });
320321
}
321322
this._searchResultIndex = jumpBackwards ? 0 : this._searchResults.length - 1;
322-
return this._searchResults.length;
323+
this._searchableView.updateSearchMatchesCount(this._searchResults.length);
324+
this._searchableView.updateCurrentMatchIndex(this._searchResultIndex);
323325
},
324326

325327
/**

0 commit comments

Comments
 (0)