c2a1e84512d875dff87e1f5767ebf03f3d427e15
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2017-11-01  Devin Rousso  <webkit@devinrousso.com>
2
3         Web Inspector: consolidate DOMTreeElement contextmenu items into submenus
4         https://bugs.webkit.org/show_bug.cgi?id=178996
5
6         Reviewed by Joseph Pecoraro.
7
8         * Localizations/en.lproj/localizedStrings.js:
9
10         * UserInterface/Views/ContextMenu.js:
11         (WI.ContextSubMenuItem.prototype.appendItem):
12         (WI.ContextSubMenuItem.prototype.appendSubMenuItem):
13         (WI.ContextSubMenuItem.prototype.appendCheckboxItem):
14         (WI.ContextSubMenuItem.prototype.pushItem):
15         (WI.ContextSubMenuItem.prototype._pushItem): Deleted.
16         Made `pushItem` public so that it is possible to create a ContextMenuItem without
17         immediately adding it to the ContextMenu.
18
19         (WI.ContextSubMenuItem.prototype._buildDescriptor):
20         (WI.ContextMenu.prototype._buildDescriptor):
21         Filter out submenus that have no items.
22
23         * UserInterface/Views/ContextMenuUtilities.js:
24         (WI.appendContextMenuItemsForDOMNode):
25         * UserInterface/Views/DOMTreeElement.js:
26         (WI.DOMTreeElement.prototype.toggleElementVisibility):
27         (WI.DOMTreeElement.prototype._populateTagContextMenu):
28         (WI.DOMTreeElement.prototype._populateTextContextMenu):
29         (WI.DOMTreeElement.prototype._populateNodeContextMenu):
30         (WI.DOMTreeElement.prototype._populateForcedPseudoStateItems): Deleted.
31         Add relevant items to the provided submenus and reorder the entire contextmenu for better
32         readability and consistency.
33
34         * UserInterface/Views/DOMTreeOutline.js:
35         (WI.DOMTreeOutline.prototype.populateContextMenu):
36         Create submenus for Add, Edit, Copy, and Delete, and pass them to the DOMTreeElement
37         "populate*ContextMenu" functions so that they can add items to each submenu.
38
39         (WI.DOMTreeOutline.prototype._hideElement):
40         Move to DOMTreeElement so that it can be used by a contextmenu item.
41
42 2017-11-01  Ross Kirsling  <ross.kirsling@sony.com>
43
44         Web Inspector: Improve UX of Layers tab visualization
45         https://bugs.webkit.org/show_bug.cgi?id=178966
46
47         Reviewed by Devin Rousso.
48
49         * UserInterface/Views/Layers3DContentView.js:
50         (WI.Layers3DContentView):
51         (WI.Layers3DContentView.prototype.initialLayout):
52         (WI.Layers3DContentView.prototype._canvasMouseDown):
53         (WI.Layers3DContentView.prototype._createLayerGroup): Renamed from _addLayerGroup.
54         (WI.Layers3DContentView.prototype._updateLayerGroupPosition): Merged into _updateLayers.
55         Set up zoom and pan.
56
57         (WI.Layers3DContentView.prototype._animate):
58         (WI.Layers3DContentView.prototype._restrictPan):
59         Restrict pan to bounding box on XY plane.
60
61         (WI.Layers3DContentView.prototype.layout):
62         (WI.Layers3DContentView.prototype._updateDocument):
63         (WI.Layers3DContentView.prototype._resetCamera):
64         On new document, throw out all old layers and center the camera on the new document layer.
65
66         (WI.Layers3DContentView.prototype.selectLayerById):
67         (WI.Layers3DContentView.prototype._centerOnSelection):
68         Recenter the camera when layer group selection is updated programmatically.
69
70         (WI.Layers3DContentView.prototype._updateLayers):
71         (WI.Layers3DContentView.prototype._createLayerMesh):
72         Fix visual artifact due to "depthWrite" flag.
73
74         * UserInterface/Views/LayerDetailsSidebarPanel.js:
75         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
76         Suppress selection update event when the data grid selection is updated programmatically.
77
78         * UserInterface/Views/DataGridNode.js:
79         (WI.DataGridNode.prototype.revealAndSelect):
80         Allow forwarding of select()'s parameter.
81
82 2017-11-01  Joseph Pecoraro  <pecoraro@apple.com>
83
84         Web Inspector: Combine all storage icon files into a single file
85         https://bugs.webkit.org/show_bug.cgi?id=179134
86
87         Reviewed by Devin Rousso.
88
89         * UserInterface/Main.html:
90         * UserInterface/Views/CookieIcon.css: Removed.
91         * UserInterface/Views/DOMStorageIcons.css: Removed.
92         * UserInterface/Views/DatabaseIcon.css: Removed.
93         * UserInterface/Views/DatabaseTableIcon.css: Removed.
94         * UserInterface/Views/StorageIcons.css: Added.
95         (.application-cache-manifest .icon):
96         (.application-cache-frame .icon):
97         (.cookie-icon .icon):
98         (.local-storage-icon .icon):
99         (.session-storage-icon .icon):
100         (.database-icon .icon):
101         (.database-table-icon .icon):
102
103 2017-11-01  Nikita Vasilyev  <nvasilyev@apple.com>
104
105         Web Inspector: Styles Redesign: Hovering over a selector should highlight matching elements on the page
106         https://bugs.webkit.org/show_bug.cgi?id=179040
107
108         Reviewed by Devin Rousso.
109
110         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
111         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
112         Use mouseenter/mouseleave events instead of mousein/mouseout (as in the old styles sidebar)
113         to avoid unnecessary events being fired.
114
115         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._highlightNodesWithSelector):
116         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._hideDOMNodeHighlight):
117
118 2017-10-30  Nikita Vasilyev  <nvasilyev@apple.com>
119
120         Web Inspector: [PARITY] Styles Redesign: Ability to modify style attributes
121         https://bugs.webkit.org/show_bug.cgi?id=178328
122         <rdar://problem/35000990>
123
124         Reviewed by Joseph Pecoraro.
125
126         Before this patch, modifying a property of a style attribute duplicated the old property
127         and appended the new one. This happened because WI.TextRange.prototype.resolveOffsets
128         didn't resolve offsets correctly when text didn't end with a trailing new line.
129
130         Since WI.TextRange.prototype.resolveOffsets is used elsewhere and this could be expected
131         behavior, append a line break before resolving a range.
132
133         * UserInterface/Models/CSSProperty.js:
134         (WI.CSSProperty.prototype._updateOwnerStyleText):
135
136 2017-10-30  Ross Kirsling  <ross.kirsling@sony.com>
137
138         Web Inspector: Clicking filler in data grid should clear selection
139         https://bugs.webkit.org/show_bug.cgi?id=179027
140
141         Reviewed by Brian Burg.
142
143         * UserInterface/Views/DataGrid.js:
144         (WI.DataGrid.prototype._mouseDownInDataTable):
145
146 2017-10-30  Devin Rousso  <webkit@devinrousso.com>
147
148         Web Inspector: Canvas Tab: no path components shown in recording content view after selecting a recording via View Recordings... dropdown
149         https://bugs.webkit.org/show_bug.cgi?id=178807
150         <rdar://problem/35176463>
151
152         Reviewed by Brian Burg.
153
154         When the first Recording is taken of a canvas, it is immediately added as a child. When the
155         CanvasTreeElement is `attached`, however, it will attempt to regenerate its children if
156         necessary. This is especially true for canvases with ShaderPrograms, as they are added with
157         `addRepresentedObjectToNewChildQueue`, meaning that the child TreeElements aren't actually
158         added until the next tick, preventing the ContentBrowser logic from generating path
159         components correctly.
160
161         This patch switches to using `addChildForRepresentedObject` so that there is no delay when
162         adding children, and also ensures that any existing recordings are also added on regeneration.
163
164         * UserInterface/Views/CanvasTabContentView.js:
165         (WI.CanvasTabContentView.prototype._recordingAdded):
166         Move logic for adding TreeElements for new Recordings to CanvasTreeElement.
167
168         * UserInterface/Views/CanvasTreeElement.js:
169         (WI.CanvasTreeElement.createRecordingTreeElement):
170         (WI.CanvasTreeElement):
171         (WI.CanvasTreeElement.prototype.onattach):
172         (WI.CanvasTreeElement.prototype.ondetach):
173         (WI.CanvasTreeElement.prototype.onpopulate):
174         (WI.CanvasTreeElement.prototype._handleItemAdded):
175         (WI.CanvasTreeElement.prototype._handleItemRemoved):
176         (WI.CanvasTreeElement.prototype._shaderProgramAdded): Deleted.
177         (WI.CanvasTreeElement.prototype._shaderProgramRemoved): Deleted.
178
179 2017-10-30  Fujii Hironori  <Hironori.Fujii@sony.com>
180
181         [GTK] Web Inspector: Add Path.svg
182         https://bugs.webkit.org/show_bug.cgi?id=178432
183
184         Reviewed by Carlos Garcia Campos.
185
186         * UserInterface/Images/gtk/Path.svg: Added.
187
188 2017-10-30  Nikita Vasilyev  <nvasilyev@apple.com>
189
190         Web Inspector: [PARITY] Styles Redesign: clicking on the white space after the property should create a blank property
191         https://bugs.webkit.org/show_bug.cgi?id=178022
192         <rdar://problem/34861687>
193
194         Reviewed by Matt Baker.
195
196         - Clicking on the whitespace on the right side of a property should insert a blank property after the clicked one.
197         - Clicking on the whitespace at the end of a CSS rule should append a blank property.
198         - Clicking on the whitespace before the first property should insert a blank property before the first one.
199
200         * UserInterface/Models/CSSProperty.js:
201         (WI.CSSProperty.prototype.remove):
202         (WI.CSSProperty.prototype._updateOwnerStyleText):
203         Remove method previously didn't do anything for a newly added property.
204
205         * UserInterface/Models/CSSStyleDeclaration.js:
206         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
207         Update indices of all properties after the newly added property.
208
209         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
210         (WI.SpreadsheetCSSStyleDeclarationEditor):
211         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
212         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
213         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
214         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.isFocused):
215         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
216         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
217         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
218         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty): Deleted.
219         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused): Deleted.
220         Re-layout SpreadsheetCSSStyleDeclarationEditor after adding a new property. Preserve edited property
221         so we can restore editing state after the re-layout.
222
223         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
224         (WI.SpreadsheetCSSStyleDeclarationSection):
225         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
226         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
227         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
228         Clicking should add a new property only when we aren't editing an existing property.
229
230         * UserInterface/Views/SpreadsheetStyleProperty.js:
231         (WI.SpreadsheetStyleProperty):
232         (WI.SpreadsheetStyleProperty.prototype.updateClassNames):
233         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
234         Remove newlyAdded property of SpreadsheetStyleProperty. During layout SpreadsheetCSSStyleDeclarationEditor
235         recreates SpreadsheetStyleProperty views and newlyAdded property gets lost.
236
237         * UserInterface/Views/SpreadsheetTextField.js:
238         (WI.SpreadsheetTextField.prototype.get valueBeforeEditing):
239         (WI.SpreadsheetTextField.prototype.startEditing):
240         (WI.SpreadsheetTextField.prototype.stopEditing):
241         (WI.SpreadsheetTextField.prototype._discardChange):
242
243 2017-10-27  Devin Rousso  <webkit@devinrousso.com>
244
245         Web Inspector: Canvas Tab: no way to see backtrace of where a canvas context was created
246         https://bugs.webkit.org/show_bug.cgi?id=178799
247         <rdar://problem/35175805>
248
249         Reviewed by Brian Burg.
250
251         * Localizations/en.lproj/localizedStrings.js:
252
253         * UserInterface/Models/Canvas.js:
254         (WI.Canvas.fromPayload):
255         (WI.Canvas.prototype.get backtrace):
256
257         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
258         (.sidebar > .panel.details.canvas .details-section.canvas-backtrace .call-frame):
259
260         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
261         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
262         (WI.CanvasDetailsSidebarPanel.prototype.layout):
263         (WI.CanvasDetailsSidebarPanel.prototype._refreshBacktraceSection):
264
265         * UserInterface/Views/ResourceIcons.css:
266         (.canvas > .icon):
267         (.canvas .icon): Deleted.
268
269 2017-10-26  Devin Rousso  <webkit@devinrousso.com>
270
271         Web Inspector: Canvas Tab: canvas path components from old page stick around when page is reloaded
272         https://bugs.webkit.org/show_bug.cgi?id=178806
273         <rdar://problem/35176360>
274
275         Reviewed by Brian Burg.
276
277         Before this change, the CanvasCollection was regenerated each time the Canvas tab was
278         attached. This also caused the invisible TreeOutline, used for the path components and to
279         manage selection, to be reset as well. Whenever the page refreshed, however, the old
280         canvases, and associated recordings, were not removed. This patch reworks all of this logic
281         to create the CanvasCollection on construction of the tab and add/remove canvases as needed.
282
283         * UserInterface/Controllers/CanvasManager.js:
284         (WI.CanvasManager.prototype.canvasAdded):
285         (WI.CanvasManager.prototype.canvasRemoved):
286         (WI.CanvasManager.prototype._removeCanvas):
287         (WI.CanvasManager.prototype._mainResourceDidChange):
288         Replaced the "Cleared" event by instead firing "CanvasRemoved" for every tracked canvas. This
289         massively simplifies the logic for when the page navigates, as everything goes through a
290         single event listener.
291         Drive-by: changed existing event names to remove unnecessary words.
292
293         * UserInterface/Views/CanvasTabContentView.js:
294         (WI.CanvasTabContentView):
295         (WI.CanvasTabContentView.prototype.attached):
296         (WI.CanvasTabContentView.prototype.detached):
297         (WI.CanvasTabContentView.prototype._addCanvas):
298         (WI.CanvasTabContentView.prototype._removeCanvas):
299         (WI.CanvasTabContentView.prototype._handleCanvasAdded):
300         (WI.CanvasTabContentView.prototype._handleCanvasRemoved):
301         (WI.CanvasTabContentView.prototype._canvasAdded): Deleted.
302         (WI.CanvasTabContentView.prototype._canvasRemoved): Deleted.
303         (WI.CanvasTabContentView.prototype._mainResourceDidChange): Deleted.
304         Rework logic for the way that the CanvasCollection is maintained. It is no longer
305         created/destroyed each time the view is attached/detached, and instead a diff is calculated
306         for the added/existing/removed canvases and the content views are added/removed as such.
307
308         * UserInterface/Views/CanvasOverviewContentView.js:
309         (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged):
310         Drive-by: if an imported recording is selected on the Canvas Overview view, we should show it.
311
312 2017-10-26  Devin Rousso  <webkit@devinrousso.com>
313
314         Web Inspector: Canvas Tab: canvases overview should support navigation via keyboard
315         https://bugs.webkit.org/show_bug.cgi?id=178800
316         <rdar://problem/35175856>
317
318         Reviewed by Brian Burg.
319
320         Create a KeyboardShorcut for each of the following:
321          - Up: selects the previous canvas in the selected column
322          - Down: selects the next canvas in the selected column
323          - Right: selects the next canvas in the selected row
324          - Left: selects the previous canvas in the selected row
325          - Space: toggle recording of the selected canvas
326          - Shift+Space: toggle single-frame recording of the selected canvas
327
328         The calculation for selected row/colum is based on the `offsetWidth` of the parent element
329         and the selected item's content view element. Since this view uses a flexbox, all of the
330         items are expected to have the same dimensions, meaning that this value is uniform. The
331         intended functionality is that of a spreadsheet, where pressing pressing left/right will
332         never change the selected row and up/down will never change the selected column.
333
334         * UserInterface/Views/CanvasOverviewContentView.css:
335         (.content-view.canvas-overview):
336         (.content-view.canvas-overview .content-view.canvas):
337         Move margin value to a CSS variable so that it can be easily retrieved via JavaScript.
338
339         * UserInterface/Views/CanvasOverviewContentView.js:
340         (WI.CanvasOverviewContentView):
341         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
342         (WI.CanvasOverviewContentView.prototype.contentViewRemoved):
343         (WI.CanvasOverviewContentView.prototype.attached):
344         (WI.CanvasOverviewContentView.prototype.detached):
345         (WI.CanvasOverviewContentView.prototype.get _itemMargin):
346         (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically):
347         (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally):
348         (WI.CanvasOverviewContentView.prototype._updateNavigationItems):
349         (WI.CanvasOverviewContentView.prototype._handleUp):
350         (WI.CanvasOverviewContentView.prototype._handleRight):
351         (WI.CanvasOverviewContentView.prototype._handleDown):
352         (WI.CanvasOverviewContentView.prototype._handleLeft):
353         (WI.CanvasOverviewContentView.prototype._handleSpace):
354         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
355         Drive-by: call `_updateNavigationItems` whenever an item is added/removed so that if there
356         are no items the navigation items cannot be clicked.
357
358 2017-10-26  Nikita Vasilyev  <nvasilyev@apple.com>
359
360         Web Inspector: Styles Redesign: Make "Style Attribute" text darker and non-focusable
361         https://bugs.webkit.org/show_bug.cgi?id=178837
362
363         Reviewed by Brian Burg.
364
365         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
366         (.spreadsheet-css-declaration .selector.style-attribute):
367         Use the same shade of gray as in the "Inherited from" sections.
368
369         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
370         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
371         Only editable selectors should be focusable.
372
373 2017-10-26  Fujii Hironori  <Hironori.Fujii@sony.com>
374
375         [GTK] Web Inspector: Add CanvasOverview.svg and Canvas.svg
376         https://bugs.webkit.org/show_bug.cgi?id=178426
377
378         Reviewed by Carlos Garcia Campos.
379
380         * UserInterface/Images/gtk/Canvas.svg: Added.
381         * UserInterface/Images/gtk/CanvasOverview.svg: Added.
382
383 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
384
385         Web Inspector: provide a way to enable/disable event listeners
386         https://bugs.webkit.org/show_bug.cgi?id=177451
387         <rdar://problem/34994925>
388
389         Reviewed by Joseph Pecoraro.
390
391         * Localizations/en.lproj/localizedStrings.js:
392
393         * UserInterface/Controllers/DOMTreeManager.js:
394         (WI.DOMTreeManager.prototype.setEventListenerDisabled):
395
396         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
397         (WI.DOMNodeDetailsSidebarPanel.prototype.attached):
398         (WI.DOMNodeDetailsSidebarPanel.prototype.detached):
399         (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
400         (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted.
401         (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted.
402         Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we
403         will still want to refresh the event listeners section in the event that an event listener
404         is removed from a parent node.
405
406         * UserInterface/Views/EventListenerSectionGroup.js:
407         (WI.EventListenerSectionGroup):
408         (WI.EventListenerSectionGroup.prototype._eventText):
409         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink):
410         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement):
411         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle):
412         * UserInterface/Views/EventListenerSectionGroup.css:
413         (.event-listener-section > .content input[type="checkbox"]):
414
415         * UserInterface/Views/DetailsSectionSimpleRow.js:
416         (WI.DetailsSectionSimpleRow.prototype.get label):
417         (WI.DetailsSectionSimpleRow.prototype.set label):
418
419 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
420
421         Web Inspector: replace TypeVerifier with subclasses of WI.Collection
422         https://bugs.webkit.org/show_bug.cgi?id=178045
423         <rdar://problem/35174307>
424
425         Reviewed by Brian Burg.
426
427         * UserInterface/Models/Collection.js:
428         (WI.Collection):
429         (WI.Collection.prototype.get displayName):
430         (WI.Collection.prototype.objectIsRequiredType):
431         (WI.Collection.prototype.add):
432         (WI.Collection.prototype.get typeVerifier): Deleted.
433         Instead of exposing the typeVerifier, we create a public predicate that returns whether the
434         given object matches the expected type of the Collection. Subclasses can override it to
435         limit the scope of the collection to a particular type.
436
437         * UserInterface/Models/CollectionTypes.js:
438         (WI.FrameCollection.prototype.get displayName):
439         (WI.FrameCollection.prototype.objectIsRequiredType):
440         (WI.FrameCollection): Deleted.
441         (WI.ScriptCollection.prototype.get displayName):
442         (WI.ScriptCollection.prototype.objectIsRequiredType):
443         (WI.ScriptCollection): Deleted.
444         (WI.CSSStyleSheetCollection.prototype.get displayName):
445         (WI.CSSStyleSheetCollection.prototype.objectIsRequiredType):
446         (WI.CSSStyleSheetCollection): Deleted.
447         (WI.CanvasCollection.prototype.get displayName):
448         (WI.CanvasCollection.prototype.objectIsRequiredType):
449         (WI.CanvasCollection): Deleted.
450         (WI.ShaderProgramCollection.prototype.get displayName):
451         (WI.ShaderProgramCollection.prototype.objectIsRequiredType):
452         (WI.ShaderProgramCollection): Deleted.
453         (WI.RecordingCollection.prototype.get displayName):
454         (WI.RecordingCollection.prototype.objectIsRequiredType):
455         (WI.RecordingCollection): Deleted.
456         * UserInterface/Models/ResourceCollection.js:
457         (WI.ResourceCollection):
458         (WI.ResourceCollection.prototype.get displayName):
459         (WI.ResourceCollection.prototype.objectIsRequiredType):
460         (WI.ResourceCollection.verifierForType): Deleted.
461         * UserInterface/Views/TreeOutlineGroup.js:
462         (WI.TreeOutlineGroup.prototype.objectIsRequiredType):
463         (WI.TreeOutlineGroup): Deleted.
464         Introduce additional subclasses of Collection for other model types. Modify existing
465         subclasses to remove `typeVerifier` and instead extend `objectIsRequiredType`.
466
467         * UserInterface/Models/Canvas.js:
468         (WI.Canvas):
469         * UserInterface/Models/Frame.js:
470         (WI.Frame):
471         * UserInterface/Protocol/Target.js:
472         (WI.Target):
473         * UserInterface/Views/ResourceSidebarPanel.js:
474         (WI.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
475         (WI.ResourceSidebarPanel.prototype._addScript):
476
477         * UserInterface/Views/CollectionContentView.js:
478         (WI.CollectionContentView):
479         (WI.CollectionContentView.titleForCollection): Delete.
480         * UserInterface/Views/ResourceCollectionContentView.js:
481         (WI.ResourceCollectionContentView):
482         Require that subclasses of Collection override `get displayName` if the CollectionContentView
483         is not provided with a `contentPlaceholderText`.
484
485         (WI.CollectionContentView.prototype.initialLayout):
486         We don't need to create and add ContentView for each item of the Collection, as this is
487         already done by attached().
488
489         (WI.CollectionContentView.prototype._showContentPlaceholder):
490         Remove the 250ms delay before showing the placeholder TitleView.
491
492         * UserInterface/Views/FolderizedTreeElement.js:
493         (WI.FolderizedTreeElement.prototype._settingsForRepresentedObject):
494
495 2017-10-25  Joseph Pecoraro  <pecoraro@apple.com>
496
497         Web Inspector: Display fetch() initiated loads as "fetch" instead of "xhr" in the Network Tab
498         https://bugs.webkit.org/show_bug.cgi?id=178826
499
500         Reviewed by Youenn Fablet.
501
502         * UserInterface/Views/NetworkTableContentView.js:
503         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
504         Fetch and XHR loads are still grouped under the succinct "XHR" filter, but
505         at least display the better type name in the "Type" column of the table.
506
507 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
508
509         Web Inspector: Canvas Tab: selected canvas card loses selection outline style while recording
510         https://bugs.webkit.org/show_bug.cgi?id=178814
511         <rdar://problem/35177317>
512
513         Reviewed by Brian Burg.
514
515         * UserInterface/Views/CanvasOverviewContentView.css:
516         (.content-view.canvas-overview .content-view.canvas):
517         (.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)):
518         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),):
519         (.content-view.canvas-overview .content-view.canvas > header):
520         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
521         (.content-view.canvas-overview .content-view.canvas > .preview):
522         (.content-view.canvas-overview .content-view.canvas > footer):
523         (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)): Deleted.
524         Instead of applying the border to the entire element, apply parts of the border to each of
525         its children so that we can choose what colors to use for each part.
526
527 2017-10-25  Nikita Vasilyev  <nvasilyev@apple.com>
528
529         Web Inspector: [PARITY] Styles Redesign: Add color gradient, bezier curve, and spring inline widgets
530         https://bugs.webkit.org/show_bug.cgi?id=178404
531         <rdar://problem/35035992>
532
533         Reviewed by Devin Rousso.
534
535         Add inline widgets for the following CSS values:
536         - Gradients, e.g. `background-image: linear-gradient(yellow, orange)`
537         - Bezier curves, e.g. `transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55)`
538         - Spring functions, e.g. `transition-timing-function: spring(1, 2, 2, 4)`
539
540         * UserInterface/Models/Color.js:
541         (WI.Color.prototype.toString):
542         Don't throw. The are never try/catch blocks on the callsites.
543
544         * UserInterface/Views/SpreadsheetStyleProperty.js:
545         (WI.SpreadsheetStyleProperty.prototype._renderValue):
546         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
547         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
548         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
549         (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
550
551 2017-10-25  Nikita Vasilyev  <nvasilyev@apple.com>
552
553         Web Inspector: Styles Redesign: Newly added invalid property isn't immediately shown as invalid
554         https://bugs.webkit.org/show_bug.cgi?id=178488
555
556         Reviewed by Brian Burg.
557
558         * UserInterface/Models/CSSStyleDeclaration.js:
559         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
560         Call this.update to update _properties, _allProperties, _visibleProperties, and _allVisibleProperties.
561
562         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
563         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled)):
564         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled)):
565         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value):
566         When the property name is valid, but the value isn't, display red line-through only for the value.
567         This is how it works in the old styles sidebar as well.
568
569         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
570         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
571         (WI.SpreadsheetCSSStyleDeclarationEditor):
572         * UserInterface/Views/SpreadsheetStyleProperty.js:
573         (WI.SpreadsheetStyleProperty):
574         (WI.SpreadsheetStyleProperty.prototype.updateClassNames):
575         (WI.SpreadsheetStyleProperty.prototype._update):
576         Introduce updateClassNames method. Unlike _update, it doesn't change text selection or focus and
577         can be safely called on a property while it's being edited.
578
579 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
580
581         Web Inspector: Canvas Tab: clicking on a canvas card causes details sidebar to show and mess up card arrangement
582         https://bugs.webkit.org/show_bug.cgi?id=178803
583         <rdar://problem/35176082>
584
585         Reviewed by Brian Burg.
586
587         * Localizations/en.lproj/localizedStrings.js:
588         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
589         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder):
590         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message):
591         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
592         (WI.CanvasDetailsSidebarPanel):
593         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
594         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
595         (WI.CanvasDetailsSidebarPanel.prototype.layout):
596
597         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
598         (WI.RecordingNavigationSidebarPanel.disallowInstanceForClass): Deleted.
599         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
600         (WI.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): Deleted.
601         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
602         (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): Deleted.
603         Drive-by: these sidebar panels are now only used by the Canvas tab, so we no longer need to
604         provide support for multiple instances of them.
605
606 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
607
608         Web Inspector: preserve Recordings for each Canvas after closing the Canvas tab
609         https://bugs.webkit.org/show_bug.cgi?id=178767
610         <rdar://problem/35167239>
611
612         Reviewed by Brian Burg.
613
614         * UserInterface/Test.html:
615         Include CollectionTypes for tests.
616
617         * UserInterface/Controllers/CanvasManager.js:
618         (WI.CanvasManager.prototype.recordingFinished):
619
620         * UserInterface/Models/Canvas.js:
621         (WI.Canvas):
622         (WI.Canvas.prototype.get recordingCollection):
623
624         * UserInterface/Models/CollectionTypes.js:
625         (WI.CanvasCollection):
626         (WI.RecordingCollection):
627
628         * UserInterface/Views/CanvasContentView.js:
629         (WI.CanvasContentView.prototype.initialLayout):
630         (WI.CanvasContentView.prototype._addRecording):
631         (WI.CanvasContentView.prototype._recordingStopped):
632
633         * UserInterface/Views/CanvasTabContentView.js:
634         (WI.CanvasTabContentView.prototype.attached):
635         (WI.CanvasTabContentView.prototype._recordingAdded):
636
637 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
638
639         REGRESSION(r222181): Web Inspector: Augmenting Agents Domains are not getting activated
640         https://bugs.webkit.org/show_bug.cgi?id=178768
641         <rdar://problem/35081334>
642
643         Reviewed by Brian Burg.
644
645         * UserInterface/Base/Main.js:
646         Simplify event dispatch.
647
648         * UserInterface/Controllers/AppController.js:
649         (WI.AppController.prototype.activateExtraDomains):
650         Pass the domains on.
651
652 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
653
654         Web Inspector: Console Drawer resizing doesn't match cursor position
655         https://bugs.webkit.org/show_bug.cgi?id=178753
656         <rdar://problem/35160484>
657
658         Reviewed by Brian Burg.
659
660         * UserInterface/Views/ConsoleDrawer.js:
661         (WI.ConsoleDrawer.prototype._updateDrawerHeight):
662         Drive-by fix an early return that would never have worked.
663
664         * UserInterface/Views/Main.css:
665         (#content):
666         Give the #content a flex grow of 1. This causes the space to grow as it
667         already was but now it does not affect the size of the fixed height sibling.
668
669 2017-10-24  Eric Carlson  <eric.carlson@apple.com>
670
671         Web Inspector: Enable WebKit logging configuration and display
672         https://bugs.webkit.org/show_bug.cgi?id=177027
673         <rdar://problem/33964767>
674
675         Reviewed by Joseph Pecoraro.
676
677         * Localizations/en.lproj/localizedStrings.js: Add new localized strings.
678
679         * UserInterface/Controllers/LogManager.js:
680         (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels.
681         (WI.LogManager.supportsLogChannels): New.
682         (WI.LogManager.prototype.get customLoggingChannels): New.
683         (WI.LogManager.prototype.get logChannelSources): New.
684
685         * UserInterface/Main.html:
686         * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC.
687
688         * UserInterface/Models/IssueMessage.js:
689         (WI.IssueMessage): Add media and webrtc.
690
691         * UserInterface/Models/LoggingChannel.js: Added.
692         (WI.LoggingChannel):
693         (WI.LoggingChannel.fromPayload):
694         (WI.LoggingChannel.prototype.get source):
695         (WI.LoggingChannel.prototype.get level):
696
697         * UserInterface/Views/LogContentView.js:
698         (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel
699             scope buttons once logging has started.
700         (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary.
701         (WI.LogContentView.prototype._scopeFromMessageSource): New.
702         (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug.
703         (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log
704             message is added.
705
706         (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons.
707         (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New.
708         (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons.
709
710         * UserInterface/Views/SettingsTabContentView.js:
711         (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus
712             for each log channel.
713
714 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
715
716         Uncaught Exception: TypeError: null is not an object (evaluating 'this.treeOutline.isXMLMimeType')
717         https://bugs.webkit.org/show_bug.cgi?id=178745
718
719         Reviewed by Brian Burg.
720
721         * UserInterface/Views/DOMTreeUpdater.js:
722         (WI.DOMTreeUpdater.prototype._updateModifiedNodes):
723         An earlier tree element update might have caused this other tree element's
724         waiting to be updated to actually be removed. So just skip past them.
725
726 2017-10-24  Fujii Hironori  <Hironori.Fujii@sony.com>
727
728         [GTK] Web Inspector: Add Recording.svg
729         https://bugs.webkit.org/show_bug.cgi?id=175045
730
731         Reviewed by Brian Burg.
732
733         * UserInterface/Images/gtk/Recording.svg: Added.
734
735 2017-10-24  Devin Rousso  <webkit@devinrousso.com>
736
737         Web Inspector: allow ShaderProgram to be shown in CanvasContentView
738         https://bugs.webkit.org/show_bug.cgi?id=178714
739
740         Reviewed by Brian Burg.
741
742         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
743         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
744         Allow ShaderProgram to show the related Canvas information.
745
746         * UserInterface/Views/CanvasTabContentView.js:
747         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
748         (WI.CanvasTabContentView.prototype.showRepresentedObject):
749         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
750         If a ShaderProgram is selected in the path component, display a ShaderProgramContentView.
751
752 2017-10-24  Devin Rousso  <webkit@devinrousso.com>
753
754         Web Inspector: remove canvases from Resources and experimental setting/UI
755         https://bugs.webkit.org/show_bug.cgi?id=178711
756
757         Reviewed by Brian Burg.
758
759         * UserInterface/Base/Main.js:
760         (WI.tabContentViewClassForRepresentedObject):
761         * UserInterface/Base/Setting.js:
762         * UserInterface/Controllers/CanvasManager.js:
763         (WI.CanvasManager.prototype.canvasAdded):
764         (WI.CanvasManager.prototype.canvasRemoved):
765         * UserInterface/Models/Canvas.js:
766         * UserInterface/Models/Frame.js:
767         (WI.Frame):
768         (WI.Frame.prototype.get extraScriptCollection):
769         (WI.Frame.prototype.commitProvisionalLoad):
770         (WI.Frame.prototype.get canvasCollection): Deleted.
771         * UserInterface/Views/CanvasTabContentView.js:
772         (WI.CanvasTabContentView.isTabAllowed):
773         * UserInterface/Views/FrameTreeElement.js:
774         (WI.FrameTreeElement):
775         (WI.FrameTreeElement.prototype.onattach):
776         (WI.FrameTreeElement.prototype.ondetach):
777         (WI.FrameTreeElement.prototype.onpopulate):
778         (WI.FrameTreeElement.prototype._styleSheetAdded):
779         (WI.FrameTreeElement.prototype._canvasWasAdded): Deleted.
780         (WI.FrameTreeElement.prototype._canvasWasRemoved): Deleted.
781         * UserInterface/Views/ResourceSidebarPanel.js:
782         (WI.ResourceSidebarPanel):
783         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
784         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
785         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
786         * UserInterface/Views/ResourcesTabContentView.js:
787         (WI.ResourcesTabContentView):
788         (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
789         * UserInterface/Views/SettingsTabContentView.js:
790         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
791
792 2017-10-24  Devin Rousso  <webkit@devinrousso.com>
793
794         Web Inspector: Show recordings in CanvasTabContentView
795         https://bugs.webkit.org/show_bug.cgi?id=177606
796         <rdar://problem/34715819>
797
798         Reviewed by Brian Burg.
799
800         Original patch by Matt Baker <mattbaker@apple.com>.
801
802         This patch folds canvas recordings into the new Canvas tab, which now
803         supports showing both CanvasCollections and Recordings.
804
805         When viewing recordings, a back button is shown at the start of the
806         navigation bar, allowing the user to return to the overview. It has been
807         styled with a back arrow, to make its function as clear as possible.
808         Like other navigation path components, the item for the recording can
809         clicked to select another recording taken from the same canvas.
810
811         The recording action scrubber has been moved from the content browser's
812         navigation bar to a more prominent location in the recording content view.
813         Selecting a frame tree element in the navigation sidebar no longer selects
814         the last action for that frame. This was changed to prevent the scrubber
815         position from behaving non-monotonically when selecting actions in sequential
816         order.
817
818         While this patch retains support for importing recordings, the feature
819         is not polished. Currently it is not possible to return to an imported
820         recording after leaving closing the view. In the future we may want to
821         consider including a navigation sidebar panel for the overview, which
822         could list canvas recordings (and eventually shaders).
823
824         * .eslintrc:
825         Drive-by: remove duplicate key.
826
827         * Localizations/en.lproj/localizedStrings.js:
828         * UserInterface/Base/Main.js:
829         (WI.contentLoaded):
830         (WI.tabContentViewClassForRepresentedObject):
831         * UserInterface/Main.html:
832         * UserInterface/Views/RecordingTabContentView.js: Removed.
833         Remove RecordingTabContentView.
834
835         * UserInterface/Images/Recording.svg:
836         New recording icon, used for tree elements and canvas preview UI.
837
838         * UserInterface/Models/Recording.js:
839         (WI.Recording):
840         (WI.Recording.prototype.get visualActionIndexes):
841         Visual action indexes should be computed by the recording.
842
843         * UserInterface/Views/CanvasContentView.js:
844         (WI.CanvasContentView):
845         (WI.CanvasContentView.prototype.refresh):
846         (WI.CanvasContentView.prototype.initialLayout):
847         (WI.CanvasContentView.prototype.attached):
848         (WI.CanvasContentView.prototype._recordingStopped):
849         (WI.CanvasContentView.prototype._handleRecordingSelectElementChange):
850         New UI for showing CanvasContentView as a CollectionView item. Includes
851         recordings button and select for choosing a recording to view.
852
853         * UserInterface/Views/CanvasOverviewContentView.css:
854         (.content-view.canvas-overview .content-view.canvas > header):
855         Switch to 13px, which is more frequently used.
856
857         (.content-view.canvas-overview .content-view.canvas > header .subtitle::before):
858         Switch to literal em dash. Surrounding spaces were ignored when using
859         the backslash-escaped character.
860
861         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar):
862         (.content-view.canvas-overview .content-view.canvas > footer > .recordings):
863         (.content-view.canvas-overview .content-view.canvas > footer > .recordings::before):
864         (.content-view.canvas-overview .content-view.canvas > footer > .recordings > select):
865         (.content-view.canvas-overview .content-view.canvas > footer .recordings > select:focus):
866         (.content-view.canvas-overview .content-view.canvas > footer > .flexible-space):
867         (.popover-content > .tree-outline .item.recording > .icon):
868         (.popover-content > .tree-outline .item.recording:hover):
869         (.popover-content > .tree-outline .item.recording:hover > .icon):
870         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar): Deleted.
871         (.content-view.canvas-overview .content-view.canvas > footer): Deleted.
872         New styles for the recording picker.
873
874         * UserInterface/Views/CanvasOverviewContentView.js:
875         (WI.CanvasOverviewContentView):
876         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents):
877         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
878         (WI.CanvasOverviewContentView.prototype.contentViewRemoved):
879         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
880         (WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged): Deleted.
881         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent): Deleted.
882         Canvas tree elements are now managed by CanvasTabContentView, which is
883         now responsible for maintaining the tree of canvas objects. For now the
884         tree holds canvases and recordings, but will eventually include shader programs.
885
886         * UserInterface/Views/CanvasTabContentView.css:
887         (.content-view.tab.canvas .navigation-bar > .item .recording > .icon):
888         (.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon): Deleted.
889         Add styles for recording path components.
890
891         * UserInterface/Views/CanvasTabContentView.js:
892         (WI.CanvasTabContentView):
893         (WI.CanvasTabContentView.prototype.treeElementForRepresentedObject):
894         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
895         (WI.CanvasTabContentView.prototype.showRepresentedObject):
896         (WI.CanvasTabContentView.prototype.shown):
897         (WI.CanvasTabContentView.prototype.restoreStateFromCookie):
898         (WI.CanvasTabContentView.prototype.attached):
899         (WI.CanvasTabContentView.prototype.detached):
900         (WI.CanvasTabContentView.prototype._canvasAdded):
901         (WI.CanvasTabContentView.prototype._canvasRemoved):
902         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
903         (WI.CanvasTabContentView.prototype._recordingStopped):
904         (WI.CanvasTabContentView.prototype._navigationSidebarImport):
905         (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged):
906         (WI.CanvasTabContentView.prototype._recordingAdded):
907         (WI.CanvasTabContentView.prototype._recordingActionIndexChanged):
908         (WI.CanvasTabContentView.prototype._updateActionIndex):
909         (WI.CanvasTabContentView.prototype.restoreFromCookie): Deleted.
910         (WI.CanvasTabContentView.prototype._overviewPathComponentClicked): Deleted.
911
912         * UserInterface/Views/ContentView.js:
913         (WI.ContentView.createFromRepresentedObject):
914
915         * UserInterface/Views/RecordingActionTreeElement.css:
916         (body:not(.window-inactive, .window-docked-inactive) .tree-outline:matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,):
917         (body:not(.window-inactive, .window-docked-inactive) :matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): Deleted.
918
919         * UserInterface/Views/RecordingContentView.css:
920         (.content-view:not(.tab).recording):
921         (.content-view:not(.tab).recording > header):
922         (.content-view:not(.tab).recording > header > .slider-container):
923         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
924         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-runnable-track):
925         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-thumb):
926         (.content-view:not(.tab).recording > .preview-container):
927
928         * UserInterface/Views/RecordingContentView.js:
929         (WI.RecordingContentView):
930         (WI.RecordingContentView.prototype.updateActionIndex):
931         (WI.RecordingContentView.prototype.initialLayout):
932         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
933         (WI.RecordingContentView.prototype._updateSliderValue):
934         (WI.RecordingContentView.prototype._sliderChanged):
935         (WI.RecordingContentView.prototype.get supplementalRepresentedObjects): Deleted.
936
937         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
938         (WI.RecordingNavigationSidebarPanel.prototype.set recording):
939         (WI.RecordingNavigationSidebarPanel.prototype.updateActionIndex):
940
941         * UserInterface/Views/ResourceIcons.css:
942         (.canvas .icon):
943         (.canvas.canvas-2d .icon): Deleted.
944         (.canvas:matches(.webgl, .webgl2, .webgpu) .icon): Deleted.
945
946 2017-10-24  Ross Kirsling  <ross.kirsling@sony.com>
947
948         Web Inspector: Layer mutations should be purely based on layerId, not based on nodeId
949         https://bugs.webkit.org/show_bug.cgi?id=178554
950
951         Reviewed by Devin Rousso.
952
953         * UserInterface/Controllers/LayerTreeManager.js:
954         (WI.LayerTreeManager.prototype.layerTreeMutations):
955         Looking for special cases involving nodeIds is incorrect, as nodeIds need not be unique in the layer list (such
956         as when an element and a pseudo-element thereof each give rise to a layer). A layer object marked "preserved" in
957         this way shares no data with its predecessor, meaning that no consumer can act upon this so-called preservation.
958         A preserved layer should be nothing more or less than a recycled layerId (the thing that *is* unique).
959
960 2017-10-23  Nikita Vasilyev  <nvasilyev@apple.com>
961
962         Web Inspector: Styles Redesign: Inline widgets don't hide when starting editing by tabbing from property name
963         https://bugs.webkit.org/show_bug.cgi?id=178638
964
965         Reviewed by Joseph Pecoraro.
966
967         * UserInterface/Views/SpreadsheetStyleProperty.js:
968         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
969         Blur event on the property name text field caused WI.SpreadsheetStyleProperty.prototype._renderValue,
970         which displayed inline swatches. Display inline swatches only after blur event on the property value.
971
972 2017-10-23  Joseph Pecoraro  <pecoraro@apple.com>
973
974         Web Inspector: Please support HAR Export for network traffic
975         https://bugs.webkit.org/show_bug.cgi?id=146692
976         <rdar://problem/7463672>
977
978         Reviewed by Brian Burg.
979
980         * UserInterface/Main.html:
981         * UserInterface/Test.html:
982         New resources.
983
984         * UserInterface/Base/Platform.js:
985         Include a build number as well.
986         
987         * UserInterface/Base/URLUtilities.js:
988         (parseLocationQueryParameters): Deleted.
989         Remove unused function.
990
991         * UserInterface/Controllers/FrameResourceManager.js:
992         (WI.FrameResourceManager.prototype.frameDidNavigate):
993         (WI.FrameResourceManager.prototype.resourceRequestWillBeSent):
994         (WI.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
995         (WI.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
996         (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
997         Pass along a walltime.
998
999         * UserInterface/Protocol/NetworkObserver.js:
1000         (WI.NetworkObserver.prototype.requestWillBeSent):
1001         Pass along a walltime. This new parameter shifts old parameters.
1002
1003         * UserInterface/Controllers/HARBuilder.js: Added.
1004         (WI.HARBuilder.async.buildArchive):
1005         (WI.HARBuilder.creator):
1006         (WI.HARBuilder.pages):
1007         (WI.HARBuilder.pageTimings):
1008         (WI.HARBuilder.entry):
1009         (WI.HARBuilder.request):
1010         (WI.HARBuilder.response):
1011         (WI.HARBuilder.cookies):
1012         (WI.HARBuilder.headers):
1013         (WI.HARBuilder.content):
1014         (WI.HARBuilder.postData):
1015         (WI.HARBuilder.cache):
1016         (WI.HARBuilder.timings):
1017         (WI.HARBuilder.ipAddress):
1018         (WI.HARBuilder.date):
1019         (WI.HARBuilder.fetchType):
1020         HAR construction and helpers.
1021
1022         * UserInterface/Models/Cookie.js:
1023         (WI.Cookie.prototype.expirationDate):
1024         * UserInterface/Models/Resource.js:
1025         (WI.Resource.prototype.get queryStringParameters):
1026         (WI.Resource.prototype.get requestFormParameters):
1027         (WI.Resource.prototype.get requestSentWalltime):
1028         (WI.Resource.prototype.get requestSentDate):
1029         (WI.Resource.prototype.hasRequestFormParameters):
1030         Helpers for HAR generation and sub-sets of data.
1031
1032         * UserInterface/Models/SourceCode.js:
1033         (WI.SourceCode.prototype._processContent):
1034         Capture the raw, unmodified, base64 encoded flag and content. This ends
1035         up getting used by HAR generation and is otherwise lost.
1036
1037         * UserInterface/Test/TestHarness.js:
1038         (TestHarness.prototype.json):
1039         Helper for just logging JSON data with a filter. This defaults to
1040         a reasonable 2 space indent for JSON logs in our test output.
1041
1042         * UserInterface/Views/DOMTreeContentView.js:
1043         (WI.DOMTreeContentView.prototype.get saveData):
1044         (WI.DOMTreeContentView.get saveData.saveHandler): Deleted.
1045         Drive-by simplify while looking at other save handlers.
1046
1047         * UserInterface/Views/NetworkTableContentView.js:
1048         (WI.NetworkTableContentView.prototype.get supportsSave):
1049         (WI.NetworkTableContentView.prototype.get saveData):
1050         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
1051         (WI.NetworkTableContentView.prototype._HARResources):
1052         (WI.NetworkTableContentView.prototype._exportHAR):
1053         Provide a context menu and save keyboard handler to export a HAR.
1054         This matches other browsers.
1055
1056         * UserInterface/Views/ResourceClusterContentView.js:
1057         (WI.ResourceClusterContentView.prototype._canShowRequestContentView):
1058         Use code that is now available in Resource.
1059
1060 2017-10-20  Matt Baker  <mattbaker@apple.com>
1061
1062         Web Inspector: scrolling the editor while debugging shouldn't trigger popovers
1063         https://bugs.webkit.org/show_bug.cgi?id=178325
1064
1065         Reviewed by Devin Rousso.
1066
1067         Ignore the next "mousemove" event immediately following a "mousewheel",
1068         when determining the hovered item for purposes of triggering a popover.
1069
1070         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
1071         (WI.CodeMirrorTokenTrackingController):
1072         (WI.CodeMirrorTokenTrackingController.prototype._startTracking):
1073         (WI.CodeMirrorTokenTrackingController.prototype._stopTracking):
1074         (WI.CodeMirrorTokenTrackingController.prototype.handleEvent):
1075         (WI.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
1076
1077 2017-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1078
1079         Web Inspector: preview content view for MIME type application/json should be a collapsible tree outline
1080         https://bugs.webkit.org/show_bug.cgi?id=158938
1081         <rdar://problem/26891128>
1082
1083         Reviewed by Brian Burg.
1084
1085         * Localizations/en.lproj/localizedStrings.js:
1086         * UserInterface/Main.html:
1087         New files and strings.
1088
1089         * UserInterface/Views/JSONResourceContentView.css: Added.
1090         (.content-view.resource.json):
1091         (.content-view.resource.json .object-tree .prototype-property):
1092         Some padding and scrolling for the JSON content view.
1093
1094         * UserInterface/Views/JSONResourceContentView.js: Added.
1095         (WI.JSONResourceContentView):
1096         (WI.JSONResourceContentView.customContentViewDisplayName):
1097         (WI.JSONResourceContentView.prototype.contentAvailable):
1098         (WI.JSONResourceContentView.prototype.closed):
1099         JSON view evaluates the JSON content on the page and shows an ObjectTree
1100         for the resulting object.
1101
1102         * UserInterface/Views/ResourceClusterContentView.js:
1103         (WI.ResourceClusterContentView):
1104         (WI.ResourceClusterContentView.prototype.get customResponseContentView):
1105         (WI.ResourceClusterContentView.prototype.get selectionPathComponents):
1106         (WI.ResourceClusterContentView.prototype.restoreFromCookie):
1107         (WI.ResourceClusterContentView.prototype.showResponse):
1108         (WI.ResourceClusterContentView.prototype._canShowRequestContentView):
1109         (WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
1110         (WI.ResourceClusterContentView.prototype._pathComponentForContentView):
1111         (WI.ResourceClusterContentView.prototype._identifierForContentView):
1112         (WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
1113         (WI.ResourceClusterContentView.prototype._resourceTypeDidChange):
1114         (WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
1115         (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
1116         (WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource):
1117         Allow a custom content view to be used for a resource based on the response.
1118         Currently the only custom content view is the JSON content view.
1119
1120 2017-10-20  Joseph Pecoraro  <pecoraro@apple.com>
1121
1122         Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy network tab
1123         https://bugs.webkit.org/show_bug.cgi?id=178559
1124         <rdar://problem/34985503>
1125
1126         Reviewed by Matt Baker.
1127
1128         * Localizations/en.lproj/localizedStrings.js:
1129         * UserInterface/Base/Main.js:
1130         (WI.contentLoaded):
1131         * UserInterface/Base/Setting.js:
1132         * UserInterface/Main.html:
1133         * UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed.
1134         * UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed.
1135         * UserInterface/Views/LegacyNetworkTabContentView.js: Removed.
1136         * UserInterface/Views/NetworkGridContentView.css: Removed.
1137         * UserInterface/Views/NetworkGridContentView.js: Removed.
1138         * UserInterface/Views/TabBrowser.js:
1139         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1140         Remove LegacyNetwork tab, its NetworkGridContentView, and associated content.
1141
1142         * UserInterface/Views/NetworkTabContentView.js:
1143         (WI.NetworkTabContentView.isTabAllowed):
1144         Simplify now that this is the only Network tab.
1145
1146         * UserInterface/Views/SettingsTabContentView.js:
1147         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1148         Remove experimental setting.
1149
1150
1151 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
1152
1153         Unreviewed localized strings update.
1154
1155         * Localizations/en.lproj/localizedStrings.js:
1156         Add missing string after r223735.
1157
1158 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
1159
1160         Web Inspector: Network Tab: Metrics Detail View
1161         https://bugs.webkit.org/show_bug.cgi?id=178323
1162         <rdar://problem/34071929>
1163
1164         Reviewed by Devin Rousso.
1165
1166         Provide a Metrics detail view for resources in the Network tab.
1167         This detail view shows:
1168         
1169           - Transfer Size information (Header + Body bytes)
1170           - Resource Size information (Compression, MIME)
1171           - Timing information (ResourceTiming, Waterfall breakdown)
1172
1173         The display of timing information isn't quite final. But this
1174         is a good starting point for all the information.
1175
1176         * Localizations/en.lproj/localizedStrings.js:
1177         * UserInterface/Main.html:
1178         New resources and strings.
1179
1180         * UserInterface/Base/MIMETypeUtilities.js:
1181         (WI.shouldTreatMIMETypeAsText):
1182         Helper for detecting text resources.
1183
1184         * UserInterface/Images/Receiving.svg: Added.
1185         * UserInterface/Images/Sending.svg: Added.
1186         * UserInterface/Images/gtk/Receiving.svg: Added.
1187         * UserInterface/Images/gtk/Sending.svg: Added.
1188         Same images for main and linux ports with different licenses.
1189
1190         * UserInterface/Views/NetworkResourceDetailView.js:
1191         (WI.NetworkResourceDetailView):
1192         (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToHeaders):
1193         (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToRequestBody):
1194         (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToResponseBody):
1195         (WI.NetworkResourceDetailView.prototype.initialLayout):
1196         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
1197         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
1198         Replace "Timing" and "Details" stubs with a single "Metrics" section.
1199         Handle delegate cases from the Metrics content view.
1200
1201         * UserInterface/Views/NetworkTableContentView.js:
1202         (WI.NetworkTableContentView.displayNameForResource):
1203         (WI.NetworkTableContentView.prototype._displayType): Deleted.
1204         (WI.NetworkTableContentView.prototype._entryForResource):
1205         Promote this to a static helper in case anyone else wants it.
1206
1207         (WI.NetworkTableContentView.prototype.closed):
1208         (WI.NetworkTableContentView.prototype.reset):
1209         (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
1210         Reorder code a bit to reduce work since hiding the detail view currently
1211         forces a layout.
1212
1213         * UserInterface/Views/ResourceHeadersContentView.js:
1214         (WI.ResourceHeadersContentView):
1215         (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
1216         (WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
1217         (WI.ResourceHeadersContentView.prototype._goToRequestDataClicked): Deleted.
1218         Simplify by making the delegate required.
1219
1220         * UserInterface/Views/ResourceMetricsContentView.css: Added.
1221         (.resource-metrics):
1222         (.resource-metrics > .content):
1223         (.resource-metrics > .content .label):
1224         General metrics styles.
1225
1226         (.resource-metrics > .content > section):
1227         (.resource-metrics > .content > section .subtitle):
1228         (.resource-metrics > .content > section:not(:last-of-type)):
1229         (.resource-metrics > .content > section.split):
1230         (.resource-metrics > .content > section.split > .subsection):
1231         (.resource-metrics > .content > section.split > .subsection > table):
1232         (.resource-metrics > .content > section.split > .divider):
1233         (.resource-metrics > .content > section.network > .subsection > .container):
1234         (.resource-metrics > .content > section.network .bytes-group):
1235         (.resource-metrics > .content > section.network .bytes):
1236         (body[dir=ltr] .resource-metrics > .content > section.network table > tr > td.label):
1237         (body[dir=rtl] .resource-metrics > .content > section.network table > tr > td.label):
1238         (.resource-metrics > .content > section.network .suffix):
1239         (.resource-metrics > .content > section.network img):
1240         (.resource-metrics > .content > section.network .go-to-arrow):
1241         (.resource-metrics > .content > section.network .warning):
1242         Styles for Sizes sections.
1243
1244         (.resource-metrics > .content > section.timing):
1245         (.resource-metrics > .content > section.timing .subtitle):
1246         (.resource-metrics > .content > section.timing > ul):
1247         (.resource-metrics > .content > section.timing > ul > li):
1248         (.resource-metrics > .content > section.timing > .waterfall):
1249         (.resource-metrics > .content > section.timing > .waterfall .block):
1250         (.resource-metrics > .content > section.timing > ul > li > .row-label):
1251         (body[dir=ltr] .resource-metrics > .content > section.timing > ul > li > .row-label):
1252         (body[dir=rtl] .resource-metrics > .content > section.timing > ul > li > .row-label):
1253         (.resource-metrics > .content > section.timing > ul > li > .time-label):
1254         (.resource-metrics > .content > section.timing > ul > li.total .block):
1255         (.resource-metrics > .content > section.timing > ul > li.total .time-label):
1256         (.resource-metrics > .content > section.timing .indeterminate-progress-spinner):
1257         (.resource-metrics > .content > section.timing .empty):
1258         Styles for Timing section.
1259
1260         * UserInterface/Views/ResourceMetricsContentView.js: Added.
1261         (WI.ResourceMetricsContentView):
1262         (WI.ResourceMetricsContentView.prototype.initialLayout.createSizeComponents):
1263         (WI.ResourceMetricsContentView.prototype.initialLayout):
1264         (WI.ResourceMetricsContentView.prototype.layout):
1265         (WI.ResourceMetricsContentView.prototype.closed):
1266         (WI.ResourceMetricsContentView.prototype._sizeComponents):
1267         (WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections.appendGoToArrow):
1268         (WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections):
1269         (WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection):
1270         (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createBlock):
1271         (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createTimeLabel):
1272         (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createRow):
1273         (WI.ResourceMetricsContentView.prototype._refreshTimingSection):
1274         (WI.ResourceMetricsContentView.prototype._resourceSizeDidChange):
1275         (WI.ResourceMetricsContentView.prototype._resourceTransferSizeDidChange):
1276         (WI.ResourceMetricsContentView.prototype._resourceMetricsDidChange):
1277         (WI.ResourceMetricsContentView.prototype._resourceTimestampsDidChange):
1278         Metrics content. This just creates all of the elements, and saves a
1279         few to get populated with data later on.
1280
1281 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
1282
1283         Web Inspector: Network Tab - Improve graphical representation of network waterfall
1284         https://bugs.webkit.org/show_bug.cgi?id=147897
1285         <rdar://problem/27482198>
1286
1287         Reviewed by Brian Burg.
1288
1289         * Localizations/en.lproj/localizedStrings.js:
1290         * UserInterface/Main.html:
1291         New strings and resources.
1292
1293         * UserInterface/Views/Variables.css:
1294         (:root):
1295         Global styles.
1296
1297         * UserInterface/Views/NetworkTableContentView.css:
1298         (.network-table .header .cell.waterfall):
1299         (.network-table .timeline-ruler):
1300         (.network-table .timeline-ruler > .header):
1301         Styles for having a TimelineRuler in the Waterfall's table header.
1302
1303         (.network-table :not(.header) .cell.waterfall):
1304         (.network-table :not(.header) .cell.waterfall .waterfall-container):
1305         (.waterfall .block):
1306         (.waterfall .block.request,):
1307         (.waterfall .block.mouse):
1308         (.waterfall .block.queue):
1309         (.waterfall .block.dns):
1310         (.waterfall .block.connect):
1311         (.waterfall .block.secure):
1312         (.waterfall .block.request):
1313         (.waterfall .block.response):
1314         Waterfall styles inside the Network Table.
1315
1316         * UserInterface/Views/NetworkTableContentView.js:
1317         (WI.NetworkTableContentView):
1318         (WI.NetworkTableContentView.prototype.reset):
1319         (WI.NetworkTableContentView.prototype.tablePopulateCell):
1320         (WI.NetworkTableContentView.prototype.initialLayout):
1321         (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
1322         (WI.NetworkTableContentView.prototype._updateEntryForResource):
1323         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
1324         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
1325         (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
1326         (WI.NetworkTableContentView.prototype._tableWaterfallColumnDidChangeWidth):
1327         Update the TimelineRuler and Waterfall column when the column's
1328         size changes or the time bounds change. The time bounds right now
1329         are the earliest and latest time of resources. Later we hope to
1330         bound this by a timeline selection.
1331
1332         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
1333         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
1334         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
1335         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
1336         (WI.NetworkTableContentView.prototype._hidePopover):
1337         Create and manage a popover for the waterfall column.
1338
1339         * UserInterface/Views/Popover.js:
1340         (WI.Popover):
1341         (WI.Popover.prototype.get element):
1342         (WI.Popover.prototype.get visible):
1343         (WI.Popover.prototype.get backgroundStyle):
1344         (WI.Popover.prototype.set backgroundStyle):
1345         (WI.Popover.prototype._drawBackground):
1346         Provide an option to have a white background popover.
1347
1348         * UserInterface/Views/ResourceTimingBreakdownView.css: Added.
1349         (.resource-timing-breakdown):
1350         (.resource-timing-breakdown .waterfall):
1351         (.resource-timing-breakdown .waterfall .block):
1352         (.resource-timing-breakdown .waterfall .block.request):
1353         (body[dir=ltr] .resource-timing-breakdown .waterfall .block.queue,):
1354         (body[dir=ltr] .resource-timing-breakdown .waterfall .block.response):
1355         (body[dir=rtl] .resource-timing-breakdown .waterfall .block.queue,):
1356         (body[dir=rtl] .resource-timing-breakdown .waterfall .block.response):
1357         (.resource-timing-breakdown .numbers):
1358         (body[dir=ltr] .resource-timing-breakdown .numbers):
1359         (body[dir=rtl] .resource-timing-breakdown .numbers):
1360         Waterfall styles and sizes in the popover's breakdown view.
1361
1362         (.resource-timing-breakdown .numbers > p):
1363         (.resource-timing-breakdown .numbers > p > .swatch):
1364         (.resource-timing-breakdown .numbers .swatch.queue):
1365         (.resource-timing-breakdown .numbers .swatch.dns):
1366         (.resource-timing-breakdown .numbers .swatch.connect):
1367         (.resource-timing-breakdown .numbers .swatch.secure):
1368         (.resource-timing-breakdown .numbers .swatch.request):
1369         (.resource-timing-breakdown .numbers .swatch.response):
1370         (.resource-timing-breakdown .numbers > p > .label):
1371         (.resource-timing-breakdown .numbers > p.total):
1372         Number and label styles in the popover's breakdown view.
1373
1374         * UserInterface/Views/ResourceTimingBreakdownView.js: Added.
1375         (WI.ResourceTimingBreakdownView):
1376         (WI.ResourceTimingBreakdownView.prototype.initialLayout):
1377         (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendBlock):
1378         (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendRow):
1379         Show a section for a waterfall visualization and a section for the numbers.
1380
1381         * UserInterface/Views/Table.js:
1382         (WI.Table.prototype.reloadVisibleColumnCells):
1383         (WI.Table.prototype.cellForRowAndColumn):
1384         (WI.Table.prototype.addColumn):
1385         (WI.Table.prototype.showColumn):
1386         (WI.Table.prototype.hideColumn):
1387         (WI.Table.prototype.resizerDragging):
1388         (WI.Table.prototype.resizerDragEnded):
1389         (WI.Table.prototype._resizeColumnsAndFiller):
1390         (WI.Table.prototype._applyColumnWidths):
1391         (WI.Table.prototype._positionHeaderViews):
1392         * UserInterface/Views/TableColumn.js:
1393         (WI.TableColumn.prototype.get headerView):
1394         Provide a way to include a WI.View with a TableColumn Header. This
1395         matches what we do with DataGrid, and ends up being pretty concise.
1396
1397         * UserInterface/Views/TimelineRuler.css:
1398         (.timeline-ruler > .header):
1399         Make the height a variable so that other code can work off of it.
1400
1401 2017-10-19  Ross Kirsling  <ross.kirsling@sony.com>
1402
1403         Web Inspector: Remove superfluous file External/.eslintrc
1404         https://bugs.webkit.org/show_bug.cgi?id=178474
1405
1406         Reviewed by Joseph Pecoraro.
1407
1408         * UserInterface/External/.eslintrc: Removed.
1409
1410 2017-10-19  Adrian Perez de Castro  <aperez@igalia.com>
1411
1412         [GTK] Inspector UI does not use system font despite -webkit-system-font being supported
1413         https://bugs.webkit.org/show_bug.cgi?id=178388
1414
1415         Reviewed by Joseph Pecoraro.
1416
1417         Change ocurrences of the "-apple-system" generic font name to
1418         "-webkit-system-font", which is also implemented by the GTK+ port.
1419
1420         * UserInterface/Views/CodeMirrorOverrides.css:
1421         (.CodeMirror .CodeMirror-linenumber):
1422         (.CodeMirror .CodeMirror-placeholder):
1423         * UserInterface/Views/ConsoleMessageView.css:
1424         (.console-user-command.special-user-log > .console-message-text):
1425         (.console-message .console-message-extra-parameters-container > li::before):
1426         (.console-message .console-message-location):
1427         * UserInterface/Views/DataGrid.css:
1428         (.data-grid td):
1429         * UserInterface/Views/DefaultDashboardView.css:
1430         (.toolbar .dashboard.default > .item):
1431         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
1432         (.heap-snapshot-instance-popover-content > .title):
1433         * UserInterface/Views/HierarchicalPathComponent.css:
1434         (.hierarchical-path-component):
1435         * UserInterface/Views/LogContentView.css:
1436         (.console-messages):
1437         * UserInterface/Views/Main.css:
1438         (body):
1439         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
1440         (.object-tree-array-index .index-name):
1441         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
1442         (.object-tree-property .property-name,):
1443         * UserInterface/Views/ObjectTreeView.css:
1444         (.tree-outline.object li .empty-message):
1445         * UserInterface/Views/RecordingActionTreeElement.css:
1446         (.item.action:not(.initial-state)::before):
1447         * UserInterface/Views/SourceCodeTextEditor.css:
1448         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
1449         (.popover .debugger-popover-content > .title):
1450         * UserInterface/Views/TypeTreeView.css:
1451         (.type-tree):
1452         * UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
1453
1454 2017-10-18  Ross Kirsling  <ross.kirsling@sony.com>
1455
1456         Web Inspector: Layers sidebar footer should not have white background with full-width quick console
1457         https://bugs.webkit.org/show_bug.cgi?id=178493
1458
1459         Reviewed by Matt Baker.
1460
1461         * UserInterface/Views/LayerDetailsSidebarPanel.css:
1462         Update CSS for new sidebar.
1463
1464         * UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
1465         Update CSS for legacy sidebar.
1466
1467 2017-10-18  Fujii Hironori  <Hironori.Fujii@sony.com>
1468
1469         [GTK] Web Inspector: Add Layers.svg
1470         https://bugs.webkit.org/show_bug.cgi?id=178430
1471
1472         Reviewed by Michael Catanzaro.
1473
1474         * UserInterface/Images/gtk/Layers.svg: Added.
1475
1476 2017-10-18  Commit Queue  <commit-queue@webkit.org>
1477
1478         Unreviewed, rolling out r223321.
1479         https://bugs.webkit.org/show_bug.cgi?id=178476
1480
1481         This protocol change broke some internal builds (Requested by
1482         brrian__ on #webkit).
1483
1484         Reverted changeset:
1485
1486         "Web Inspector: provide a way to enable/disable event
1487         listeners"
1488         https://bugs.webkit.org/show_bug.cgi?id=177451
1489         https://trac.webkit.org/changeset/223321
1490
1491 2017-10-17  Nikita Vasilyev  <nvasilyev@apple.com>
1492
1493         Web Inspector: [PARITY] Styles Redesign: Add color picker inline widget
1494         https://bugs.webkit.org/show_bug.cgi?id=178354
1495
1496         Reviewed by Joseph Pecoraro.
1497
1498         Show color picker using the existing WI.InlineSwatch.
1499
1500         * UserInterface/Models/Color.js:
1501         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1502         (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-comment):
1503         Syntax highlight comments in values.
1504
1505         * UserInterface/Views/SpreadsheetStyleProperty.js:
1506         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1507         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
1508         Find colors in CodeMirror tokens and replace them with color token elements.
1509
1510 2017-10-17  Nikita Vasilyev  <nvasilyev@apple.com>
1511
1512         Web Inspector: Styles: Command-click on a property name should jump to definition in Resources tab
1513         https://bugs.webkit.org/show_bug.cgi?id=174329
1514         <rdar://problem/33225564>
1515
1516         Reviewed by Joseph Pecoraro.
1517
1518         * UserInterface/Base/Main.js:
1519         Add "meta-key-pressed" class to <body> when Command key is pressed.
1520
1521         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1522         (.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover):
1523         Use the same styles as in CodeMirrorTokenTrackingController.css.
1524
1525         * UserInterface/Views/SpreadsheetStyleProperty.js:
1526         (WI.SpreadsheetStyleProperty.prototype._update):
1527         (WI.SpreadsheetStyleProperty.prototype._setupJumpToSymbol):
1528         This is very similar to WI.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked,
1529         except it doesn't include special cases for CSS variables and links yet.
1530
1531 2017-10-16  Nikita Vasilyev  <nvasilyev@apple.com>
1532
1533         Web Inspector: Styles Redesign: apply syntax highlighting to property values
1534         https://bugs.webkit.org/show_bug.cgi?id=178176
1535
1536         Reviewed by Matt Baker.
1537
1538         - Highlight links blue and CSS strings dark red.
1539         - Truncate URLs and strings over 150 characters.
1540
1541         * UserInterface/Views/CodeMirrorAdditions.js:
1542         Parse CSS values using CodeMirror.
1543
1544         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1545         (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link):
1546         (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string):
1547
1548         * UserInterface/Views/SpreadsheetStyleProperty.js:
1549         (WI.SpreadsheetStyleProperty.prototype._update):
1550         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldWillStartEditing):
1551         Replace trancated values with their full version.
1552
1553         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
1554         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
1555         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1556         Highlight links and CSS strings in values when not editing.
1557
1558         * UserInterface/Views/SpreadsheetTextField.js:
1559         (WI.SpreadsheetTextField.prototype.startEditing):
1560         Disabling of syntax highlighting moved to spreadsheetTextFieldWillStartEditing.
1561
1562         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
1563         (.syntax-highlighted a):
1564         * UserInterface/Views/Variables.css:
1565         (:root):
1566         Make link color a variable.
1567
1568 2017-10-16  Ross Kirsling  <ross.kirsling@sony.com>
1569
1570         Web Inspector: Layers tab mistakenly throws out the root element's layer.
1571         https://bugs.webkit.org/show_bug.cgi?id=178222
1572
1573         Reviewed by Brian Burg.
1574
1575         * UserInterface/Controllers/LayerTreeManager.js:
1576         (WI.LayerTreeManager.prototype.layersForNode):
1577         Fix the issue at the manager level.
1578
1579         * UserInterface/Views/Layers3DContentView.js:
1580         (WI.Layers3DContentView.prototype.layout):
1581         Update new sidebar based on simplified manager API.
1582
1583         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1584         (WI.LayerTreeDetailsSidebarPanel.prototype.layout):
1585         Move overtailored code from manager to legacy sidebar.
1586
1587 2017-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
1588
1589         Web Inspector: Modify CSS number values with up key and down key
1590         https://bugs.webkit.org/show_bug.cgi?id=170779
1591         <rdar://problem/33170633>
1592
1593         Reviewed by Matt Baker.
1594
1595         Up key increments a number, Down key decrements it.
1596
1597         Holding modifier keys changes the step value:
1598         - Option modifies the value by 0.1
1599         - Shift modifies the value by 10
1600         - Command modifies the value by 100
1601
1602         * UserInterface/Test.html:
1603         * UserInterface/Views/EditingSupport.js:
1604         (WI.incrementElementValue):
1605         Abstract away incrementElementValue into a public method.
1606
1607         * UserInterface/Views/SpreadsheetTextField.js:
1608         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1609
1610 2017-10-15  Devin Rousso  <webkit@devinrousso.com>
1611
1612         Web Inspector: show warning when recorded Canvas action caused no visual change
1613         https://bugs.webkit.org/show_bug.cgi?id=175282
1614
1615         Reviewed by Joseph Pecoraro.
1616
1617         * Localizations/en.lproj/localizedStrings.js:
1618
1619         * UserInterface/Models/RecordingAction.js:
1620         (WI.RecordingAction):
1621         (WI.RecordingAction.prototype.get valid):
1622         (WI.RecordingAction.prototype.get hasVisibleEffect):
1623         (WI.RecordingAction.prototype.markInvalid):
1624         (WI.RecordingAction.prototype.apply):
1625         (WI.RecordingAction.prototype.async._swizzle):
1626         If the selected action is visual, save a copy of the preview canvas' dataURL before
1627         applying the action and compare it to its dataURL after. If there is no difference, the
1628         action had no visual effect.
1629
1630         * UserInterface/Models/Recording.js:
1631         (WI.Recording):
1632
1633         * UserInterface/Views/RecordingActionTreeElement.js:
1634         (WI.RecordingActionTreeElement):
1635         (WI.RecordingActionTreeElement.prototype._handleValidityChanged):
1636         (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged):
1637         * UserInterface/Views/RecordingActionTreeElement.css:
1638         (.item.action.visual.no-visible-effect:not(.invalid) > .status > .warning):
1639
1640         * UserInterface/Views/RecordingContentView.js:
1641         (WI.RecordingContentView):
1642         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
1643         (WI.RecordingContentView.prototype._applyAction): Deleted.
1644
1645 2017-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
1646
1647         Web Inspector: [PARITY] Styles Redesign: clicking on the go-to arrow in Computed tab should work
1648         https://bugs.webkit.org/show_bug.cgi?id=178286
1649         <rdar://problem/34986379>
1650
1651         Reviewed by Joseph Pecoraro.
1652
1653         Highlight the matching property using a yellow background and focus on the property value
1654         if the property is editable (e.g., not a User Agent style).
1655
1656         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1657         (.spreadsheet-style-declaration-editor):
1658         (.spreadsheet-style-declaration-editor .property):
1659         Move left padding to the property element so there's no awkward gap on the left side
1660         when the property is highlighted.
1661
1662         (.spreadsheet-style-declaration-editor .property.highlighted):
1663         (@keyframes style-property-highlight):
1664         Use the same animation duration as we used in `.text-editor > .CodeMirror .highlighted`.
1665         The highlight color was changed from light blue to yellow.
1666
1667         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1668         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
1669         Use the same logic as in WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty
1670         to find matching style property to highlight.
1671
1672         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1673         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.highlightProperty):
1674         Use the same logic as in WI.CSSStyleDeclarationSection.prototype.highlightProperty.
1675
1676         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1677         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
1678         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
1679         Copied from WI.RulesStyleDetailsPanel.
1680
1681         * UserInterface/Views/SpreadsheetStyleProperty.js:
1682         (WI.SpreadsheetStyleProperty):
1683         (WI.SpreadsheetStyleProperty.prototype.detached):
1684         (WI.SpreadsheetStyleProperty.prototype.highlight):
1685
1686 2017-10-14  Nikita Vasilyev  <nvasilyev@apple.com>
1687
1688         REGRESSION (r223310): Web Inspector: Class list container is transparent and unreadable
1689         https://bugs.webkit.org/show_bug.cgi?id=178311
1690
1691         Reviewed by Devin Rousso.
1692
1693         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
1694         (.sidebar > .panel.details.css-style > .content ~ .class-list-container):
1695         Fix 1px hole below the class container.
1696
1697 2017-10-14  Matt Baker  <mattbaker@apple.com>
1698
1699         Web Inspector: Canvas tab: recordings should have a unique name
1700         https://bugs.webkit.org/show_bug.cgi?id=178188
1701         <rdar://problem/34943364>
1702
1703         Reviewed by Devin Rousso.
1704
1705         * Localizations/en.lproj/localizedStrings.js:
1706         New format string "Recording %d".
1707
1708         * UserInterface/Base/FileUtilities.js:
1709         (WI.loadDataFromFile):
1710         Pass chosen filename to callback.
1711
1712         * UserInterface/Controllers/CanvasManager.js:
1713         (WI.CanvasManager.prototype.recordingFinished):
1714         Create a unique name for the recording.
1715
1716         * UserInterface/Models/Recording.js:
1717         (WI.Recording):
1718         (WI.Recording.fromPayload):
1719         (WI.Recording.prototype.get displayName):
1720         (WI.Recording.prototype.createDisplayName):
1721
1722         * UserInterface/Views/RecordingContentView.js:
1723         (WI.RecordingContentView.prototype.get saveData):
1724         Use encodeURI so that special characters can be used in filenames, and
1725         to be consistent with other `saveData` implementations.
1726
1727         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
1728         (WI.RecordingNavigationSidebarPanel.prototype.set recording):
1729         (WI.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked):
1730         Drive-by fix: wait until actions are resolved before updating UI.
1731
1732         * UserInterface/Views/RecordingTabContentView.js:
1733         (WI.RecordingTabContentView.prototype._navigationSidebarImport):
1734         Try to use the imported filename as the recording name. If the name
1735         collides with that of another imported recording, append a unique suffix.
1736
1737 2017-10-14  Devin Rousso  <webkit@devinrousso.com>
1738
1739         Web Inspector: provide a way to enable/disable event listeners
1740         https://bugs.webkit.org/show_bug.cgi?id=177451
1741
1742         Reviewed by Joseph Pecoraro.
1743
1744         * Localizations/en.lproj/localizedStrings.js:
1745
1746         * UserInterface/Controllers/DOMTreeManager.js:
1747         (WI.DOMTreeManager.prototype.setEventListenerDisabled):
1748
1749         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1750         (WI.DOMNodeDetailsSidebarPanel.prototype.attached):
1751         (WI.DOMNodeDetailsSidebarPanel.prototype.detached):
1752         (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
1753         (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted.
1754         (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted.
1755         Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we
1756         will still want to refresh the event listeners section in the event that an event listener
1757         is removed from a parent node.
1758
1759         * UserInterface/Views/EventListenerSectionGroup.js:
1760         (WI.EventListenerSectionGroup):
1761         (WI.EventListenerSectionGroup.prototype._eventText):
1762         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink):
1763         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement):
1764         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle):
1765         * UserInterface/Views/EventListenerSectionGroup.css:
1766         (.event-listener-section > .content input[type="checkbox"]):
1767
1768         * UserInterface/Views/DetailsSectionSimpleRow.js:
1769         (WI.DetailsSectionSimpleRow.prototype.get label):
1770         (WI.DetailsSectionSimpleRow.prototype.set label):
1771
1772 2017-10-13  Devin Rousso  <webkit@devinrousso.com>
1773
1774         Web Inspector: make split console full width of view
1775         https://bugs.webkit.org/show_bug.cgi?id=176635
1776
1777         Reviewed by Timothy Hatcher.
1778
1779         * UserInterface/Main.html:
1780         * UserInterface/Views/Main.css:
1781         (#main):
1782         (#content):
1783         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
1784         (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
1785         (.sidebar > .panel.details.css-style > .content ~ .options-container):
1786
1787 2017-10-13  Devin Rousso  <webkit@devinrousso.com>
1788
1789         Web Inspector: fix ESLint errors
1790         https://bugs.webkit.org/show_bug.cgi?id=175065
1791
1792         Reviewed by Joseph Pecoraro.
1793
1794         Removed trailing whitespace, extra parenthesis, and some unnecessary escape characters.
1795         Added missing semicolons, spacing around default values for parameters, and changed `==` to
1796         `===` where applicable.
1797
1798         Specific changes to each file were removed for brevity.
1799
1800         * .eslintrc:
1801         Alphabetize each list of global variables and add some missing utility functions.
1802
1803         * UserInterface/Base/EventListener.js:
1804         * UserInterface/Base/EventListenerSet.js:
1805         * UserInterface/Base/Main.js:
1806         * UserInterface/Base/Setting.js:
1807         * UserInterface/Base/TextUtilities.js:
1808         * UserInterface/Base/URLUtilities.js:
1809         * UserInterface/Base/Utilities.js:
1810         * UserInterface/Base/YieldableTask.js:
1811         * UserInterface/Controllers/AppControllerBase.js:
1812         * UserInterface/Controllers/CanvasManager.js:
1813         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1814         * UserInterface/Controllers/DOMDebuggerManager.js:
1815         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1816         * UserInterface/Controllers/RuntimeManager.js:
1817         * UserInterface/Controllers/SourceMapManager.js:
1818         * UserInterface/Debug/DebugContentView.js:
1819         * UserInterface/Debug/UncaughtExceptionReporter.js:
1820         * UserInterface/Models/CSSKeywordCompletions.js:
1821         * UserInterface/Models/DOMNode.js:
1822         * UserInterface/Models/DOMNodeStyles.js:
1823         * UserInterface/Models/KeyboardShortcut.js:
1824         * UserInterface/Models/ProfileNode.js:
1825         * UserInterface/Models/Resource.js:
1826         * UserInterface/Models/ResourceCollection.js:
1827         * UserInterface/Models/Script.js:
1828         * UserInterface/Models/ScriptSyntaxTree.js:
1829         * UserInterface/Models/ScriptTimelineRecord.js:
1830         * UserInterface/Protocol/Connection.js:
1831         * UserInterface/Test/FrontendTestHarness.js:
1832         * UserInterface/Test/TestHarness.js:
1833         * UserInterface/Views/CSSStyleDeclarationSection.js:
1834         * UserInterface/Views/ChartDetailsSectionRow.js:
1835         * UserInterface/Views/CodeMirrorAdditions.js:
1836         * UserInterface/Views/CodeMirrorFormatters.js:
1837         * UserInterface/Views/CodeMirrorRegexMode.js:
1838         * UserInterface/Views/ContentBrowserTabContentView.js:
1839         * UserInterface/Views/DataGrid.js:
1840         * UserInterface/Views/DataGridNode.js:
1841         * UserInterface/Views/FindBanner.js:
1842         * UserInterface/Views/GroupNavigationItem.js:
1843         * UserInterface/Views/HierarchicalPathNavigationItem.js:
1844         * UserInterface/Views/NetworkTableContentView.js:
1845         * UserInterface/Views/NetworkTimelineView.js:
1846         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1847         * UserInterface/Views/ObjectTreeView.js:
1848         * UserInterface/Views/RecordingContentView.js:
1849         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1850         * UserInterface/Views/ResourceCookiesContentView.js:
1851         * UserInterface/Views/ResourceDetailsSection.js:
1852         * UserInterface/Views/ResourceHeadersContentView.js:
1853         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1854         * UserInterface/Views/SettingEditor.js:
1855         * UserInterface/Views/Sidebar.js:
1856         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1857         * UserInterface/Views/Table.js:
1858         * UserInterface/Views/TextEditor.js:
1859         * UserInterface/Views/TimelineDataGridNode.js:
1860         * UserInterface/Views/TreeElement.js:
1861         * UserInterface/Views/TreeOutline.js:
1862         * UserInterface/Views/WebSocketDataGridNode.js:
1863         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1864         * UserInterface/Workers/Formatter/FormatterWorker.js:
1865
1866 2017-10-13  Nikita Vasilyev  <nvasilyev@apple.com>
1867
1868         Web Inspector: Styles Redesign: hook up autocompletion to property names and values
1869         https://bugs.webkit.org/show_bug.cgi?id=177313
1870         <rdar://problem/34577057>
1871
1872         Reviewed by Joseph Pecoraro.
1873
1874         - Arrow Right accept the current completion item and places the text caret after it.
1875         - Arrow Left hides the completion popover.
1876         - Arrow Up selects the previous completion item.
1877         - Arrow Down selects the next completion item.
1878         - Enter and Tab accept the current completion item and navigate to the next focusable item.
1879         - Escape hides the completion popover, if there is one.
1880
1881         * UserInterface/Views/CompletionSuggestionsView.js:
1882         (WI.CompletionSuggestionsView):
1883         (WI.CompletionSuggestionsView.prototype._mouseDown):
1884         Add a preventBlur option so clicking on an completion item doesn't change the focus and
1885         doesn't cause "blur" event on the target text field.
1886
1887         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1888         (.spreadsheet-style-declaration-editor .completion-hint):
1889         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1890         (WI.SpreadsheetCSSStyleDeclarationEditor):
1891         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1892         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
1893         Call detached on every SpreadsheetTextField to hide CompletionSuggestionsView once
1894         SpreadsheetCSSStyleDeclarationEditor is removed from the DOM.
1895
1896         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty):
1897         Remove index argument since it is no longer used.
1898
1899         * UserInterface/Views/SpreadsheetStyleProperty.js:
1900         (WI.SpreadsheetStyleProperty):
1901         (WI.SpreadsheetStyleProperty.prototype.detached):
1902         (WI.SpreadsheetStyleProperty.prototype._remove):
1903         (WI.SpreadsheetStyleProperty.prototype._update):
1904         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1905         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1906         Add an extra parameter to SpreadsheetTextField to pass a completion data provider.
1907
1908         * UserInterface/Views/SpreadsheetTextField.js:
1909         (WI.SpreadsheetTextField):
1910         (WI.SpreadsheetTextField.prototype.get suggestionHint):
1911         (WI.SpreadsheetTextField.prototype.set suggestionHint):
1912         (WI.SpreadsheetTextField.prototype.startEditing):
1913         (WI.SpreadsheetTextField.prototype.stopEditing):
1914         (WI.SpreadsheetTextField.prototype.detached):
1915         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1916         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1917         (WI.SpreadsheetTextField.prototype._getPrefix):
1918         (WI.SpreadsheetTextField.prototype._handleBlur):
1919         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1920         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1921         (WI.SpreadsheetTextField.prototype._handleInput):
1922         (WI.SpreadsheetTextField.prototype._updateCompletions):
1923         (WI.SpreadsheetTextField.prototype._getCaretRect):
1924         (WI.SpreadsheetTextField.prototype._getCompletionPrefix):
1925         (WI.SpreadsheetTextField.prototype._applyCompletionHint):
1926         (WI.SpreadsheetTextField.prototype._hideCompletions):
1927         Provide text completion based on the existing CompletionSuggestionsView when completionProvider is passed to SpreadsheetTextField.
1928
1929 2017-10-12  Joseph Pecoraro  <pecoraro@apple.com>
1930
1931         Web Inspector: Switch Clear navigation item back to the Trash icon (Console, Timelines, Network)
1932         https://bugs.webkit.org/show_bug.cgi?id=178244
1933         <rdar://problem/34966525>
1934
1935         Reviewed by Brian Burg.
1936
1937         * UserInterface/Images/NavigationItemClear.svg: Removed.
1938         * UserInterface/Images/gtk/NavigationItemClear.svg: Removed.
1939         * UserInterface/Views/LogContentView.js:
1940         (WI.LogContentView):
1941         * UserInterface/Views/NetworkGridContentView.js:
1942         (WI.NetworkGridContentView):
1943         * UserInterface/Views/NetworkTableContentView.js:
1944         (WI.NetworkTableContentView):
1945         * UserInterface/Views/TimelineRecordingContentView.js:
1946         (WI.TimelineRecordingContentView):
1947         Many users found the new Clear icon confusing. Revert to the Trash icon.
1948
1949 2017-10-11  Ross Kirsling  <ross.kirsling@sony.com>
1950
1951         Web Inspector: Make 3D objects selectable in Layers visualization
1952         https://bugs.webkit.org/show_bug.cgi?id=178136
1953
1954         Reviewed by Devin Rousso.
1955
1956         * UserInterface/Views/Layers3DContentView.js:
1957         (WI.Layers3DContentView):
1958         (WI.Layers3DContentView.prototype.initialLayout):
1959         (WI.Layers3DContentView.prototype._canvasMouseDown):
1960         (WI.Layers3DContentView.prototype._updateLayerGroupSelection):
1961         Implement selection of 3D layer objects.
1962         
1963         (WI.Layers3DContentView.prototype._addLayerGroup): Renamed from _addLayer.
1964         (WI.Layers3DContentView.prototype._updateLayerGroupPosition):
1965         (WI.Layers3DContentView.prototype._createLayerMesh):
1966         Refactor -- one group per layer (visible plane and composited outline), not groups by shape.
1967
1968         (WI.Layers3DContentView.prototype.layout):
1969         (WI.Layers3DContentView.prototype._updateLayers):
1970         (WI.Layers3DContentView.prototype._clearLayers): Deleted.
1971         Don't destroy all 3D objects on every LayerTreeDidChange; make use of layerTreeMutations.
1972         (Not only a performance improvement, but also necessary to properly preserve highlighting.) 
1973         
1974         (WI.Layers3DContentView.prototype.selectLayerById):
1975         Allow selection to be updated from the outside.
1976
1977         * UserInterface/Views/LayerDetailsSidebarPanel.js:
1978         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
1979         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
1980         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
1981         Allow selection to be updated from the outside.
1982
1983         (WI.LayerDetailsSidebarPanel.prototype.inspect):
1984         (WI.LayerDetailsSidebarPanel.prototype._updateLayers): Renamed from _updateDisplayWithLayers.
1985         (WI.LayerDetailsSidebarPanel.prototype._updateDataGrid):
1986         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
1987         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover):
1988         (WI.LayerDetailsSidebarPanel.prototype._dataGridNodeForLayer): Deleted.
1989         Cleanup.
1990         
1991         * UserInterface/Views/LayersTabContentView.js:
1992         (WI.LayersTabContentView):
1993         (WI.LayersTabContentView.prototype._detailsSidebarSelectedLayerChanged):
1994         (WI.LayersTabContentView.prototype._contentViewSelectedLayerChanged):
1995         Orchestrate communication of selection state between visualization and sidebar.
1996
1997 2017-10-11  Joseph Pecoraro  <pecoraro@apple.com>
1998
1999         Web Inspector: Avoid "100.00ms" vs "100.0ms" jitter in TimelineRuler labels
2000         https://bugs.webkit.org/show_bug.cgi?id=178143
2001
2002         Reviewed by Brian Burg.
2003
2004         * UserInterface/Base/Utilities.js:
2005         Allow a small slop factor that wouldn't have changed the display value's
2006         significant figures anyways. This addresses cases where 100.0000000000001
2007         were being treated slightly differently from 100.0.
2008
2009 2017-10-11  Joseph Pecoraro  <pecoraro@apple.com>
2010
2011         Web Inspector: Network Tab - Show initially loaded resources even if network info not logged
2012         https://bugs.webkit.org/show_bug.cgi?id=178098
2013         <rdar://problem/34073529>
2014
2015         Reviewed by Devin Rousso.
2016
2017         * UserInterface/Models/Resource.js:
2018         (WI.Resource.prototype.hasResponse):
2019         Resources loaded by Page.getFrameTree have a response but no status code data.
2020         So include finished resources as having a resource.
2021
2022         * UserInterface/Views/NetworkTableContentView.js:
2023         (WI.NetworkTableContentView):
2024         (WI.NetworkTableContentView.prototype.closed):
2025         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
2026         (WI.NetworkTableContentView.prototype._mainFrameDidChange):
2027         Listen for the first main frame change to perform an initial population.
2028
2029         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
2030         This path is not currently taken when table is null, but change the code so
2031         that if it is reached without the table it would behave gracefully.
2032
2033         * UserInterface/Views/ResourceHeadersContentView.js:
2034         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2035         On first open none of the resources have a statusCode. Show an emDash.
2036
2037 2017-10-10  Brian Burg  <bburg@apple.com>
2038
2039         Web Inspector: Quick Open: source mapped files are not shown as search results
2040         https://bugs.webkit.org/show_bug.cgi?id=178151
2041         <rdar://problem/31561718>
2042
2043         Reviewed by Joseph Pecoraro.
2044
2045         * UserInterface/Views/OpenResourceDialog.js:
2046         (WI.OpenResourceDialog.prototype._addResource):
2047         Also consider matching the query string against SourceMapResources
2048         attached to a resource's source maps.
2049
2050 2017-10-10  Joseph Pecoraro  <pecoraro@apple.com>
2051
2052         Web Inspector: Network Tab - Set column initial widths to try allow waterfall column to expand more by default
2053         https://bugs.webkit.org/show_bug.cgi?id=178142
2054         <rdar://problem/34918233>
2055
2056         Reviewed by Brian Burg.
2057
2058         * UserInterface/Views/NetworkTableContentView.js:
2059         (WI.NetworkTableContentView.prototype.initialLayout):
2060         Provide initial widths for many columns where the max could fit
2061         but we'd prefer a smaller than max initial width in wide cases.
2062
2063         * UserInterface/Views/Table.js:
2064         (WI.Table.prototype._resizeColumnsAndFiller):
2065         When auto sizing all columns use the preferred initial widths.
2066
2067         * UserInterface/Views/TableColumn.js:
2068         (WI.TableColumn.prototype.get preferredInitialWidth):
2069         Save the initial width.
2070
2071 2017-10-10  Ross Kirsling  <ross.kirsling@sony.com>
2072
2073         Web Inspector: Views should explicitly remove event listeners from managers/Frame
2074         https://bugs.webkit.org/show_bug.cgi?id=175951
2075
2076         Reviewed by Brian Burg.
2077
2078         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
2079         (WI.ApplicationCacheDetailsSidebarPanel.prototype.closed):
2080         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
2081         (WI.DOMNodeDetailsSidebarPanel.prototype.closed):
2082         * UserInterface/Views/DebuggerDashboardView.js:
2083         (WI.DebuggerDashboardView.prototype.closed):
2084         * UserInterface/Views/LogContentView.js:
2085         (WI.LogContentView.prototype.closed):
2086         * UserInterface/Views/NetworkGridContentView.js:
2087         (WI.NetworkGridContentView.prototype.closed):
2088         * UserInterface/Views/ProbeDetailsSidebarPanel.js:
2089         (WI.ProbeDetailsSidebarPanel.prototype.closed):
2090         * UserInterface/Views/QuickConsole.js:
2091         (WI.QuickConsole.prototype.closed):
2092         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2093         (WI.ScopeChainDetailsSidebarPanel.prototype.closed):
2094         * UserInterface/Views/TimelineOverview.js:
2095         (WI.TimelineOverview.prototype.closed):
2096
2097 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
2098
2099         Web Inspector: Network Tab - Include remote address in the Headers view
2100         https://bugs.webkit.org/show_bug.cgi?id=178094
2101         <rdar://problem/34895221>
2102
2103         Reviewed by Devin Rousso.
2104
2105         * Localizations/en.lproj/localizedStrings.js:
2106         * UserInterface/Views/ResourceHeadersContentView.js:
2107         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2108         (WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):
2109
2110 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
2111
2112         Unreviewed, minified WebInspector opens blank.
2113         <rdar://problem/34892307>
2114
2115         * UserInterface/Views/ResourceHeadersContentView.js:
2116         (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
2117         Regression introduced in r223006. The minified build has a SyntaxError
2118         causing WebInspector top open blank. Add the missing semicolon.
2119
2120 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
2121
2122         Web Inspector: Network Tab - Filter resources based on URL / Text Content
2123         https://bugs.webkit.org/show_bug.cgi?id=178071
2124         <rdar://problem/34071562>
2125
2126         Reviewed by Brian Burg.
2127
2128         * Localizations/en.lproj/localizedStrings.js:
2129         New strings.
2130
2131         * UserInterface/Views/FilterBar.css:
2132         (.filter-bar.active > input[type="search"]::-webkit-search-decoration):
2133         (.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration):
2134         New icon for progress / active states.
2135
2136         * UserInterface/Views/FilterBar.js:
2137         (WI.FilterBar.prototype.get inputField):
2138         (WI.FilterBar.prototype.get placeholder):
2139         (WI.FilterBar.prototype.set placeholder):
2140         (WI.FilterBar.prototype.get incremental):
2141         (WI.FilterBar.prototype.set incremental):
2142         (WI.FilterBar.prototype.get indicatingProgress):
2143         (WI.FilterBar.prototype.set indicatingProgress):
2144         (WI.FilterBar.prototype.get indicatingActive):
2145         (WI.FilterBar.prototype.set indicatingActive):
2146         (WI.FilterBar.prototype._handleFilterInputEvent):
2147         When incremental is set to false on the FilterBar still dispatch an
2148         event when the textfield clears.
2149
2150         * UserInterface/Images/FilterFieldActiveGlyph.svg: Added.
2151         * UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Added.
2152         New blue icon for active state.
2153
2154         * UserInterface/Controllers/FrameResourceManager.js:
2155         (WI.FrameResourceManager.prototype.resourceForIdentifier):
2156         Accessor for arbitrary resource.
2157
2158         * UserInterface/Views/NetworkTableContentView.css:
2159         (.content-view.network .navigation-bar .filter-bar):
2160         (.content-view.network .warning-banner):
2161         (body[dir=ltr] .content-view.network .warning-banner):
2162         (body[dir=rtl] .content-view.network .warning-banner):
2163         (.content-view.network .warning-banner > a):
2164         Warning banner when the filter produces no results. This matches the
2165         warning in the Debugger tab when breakpoints are disabled.
2166
2167         * UserInterface/Views/ScopeBar.js:
2168         (WI.ScopeBar.prototype.resetToDefault):
2169         Provide a way to easily reset a scope bar to the default item.
2170
2171         * UserInterface/Views/RadioButtonNavigationItem.css:
2172         (.navigation-bar .item.radio.button.text-only:active):
2173         * UserInterface/Views/ScopeBar.css:
2174         (.scope-bar > li:active):
2175         Cleanup some styles that should be using a variable.
2176
2177         * UserInterface/Views/NetworkTableContentView.js:
2178         (WI.NetworkTableContentView):
2179         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
2180         (WI.NetworkTableContentView.prototype.layout):
2181         (WI.NetworkTableContentView.prototype._processPendingEntries):
2182         (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFinishedResource):
2183         (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFailedResource):
2184         (WI.NetworkTableContentView.prototype._updateTextFilterActiveIndicator):
2185         (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsWarning):
2186         (WI.NetworkTableContentView.prototype._showEmptyFilterResultsWarning):
2187         (WI.NetworkTableContentView.prototype._hideEmptyFilterResultsWarning):
2188         (WI.NetworkTableContentView.prototype._positionEmptyFilterMessage):
2189         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
2190         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
2191         (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
2192         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
2193         (WI.NetworkTableContentView.prototype._hasTypeFilter):
2194         (WI.NetworkTableContentView.prototype._hasTextFilter):
2195         (WI.NetworkTableContentView.prototype._hasActiveFilter):
2196         (WI.NetworkTableContentView.prototype._passTypeFilter):
2197         (WI.NetworkTableContentView.prototype._passTextFilter):
2198         (WI.NetworkTableContentView.prototype._passFilter):
2199         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
2200         (WI.NetworkTableContentView.prototype._resetFilters):
2201         (WI.NetworkTableContentView.prototype._textFilterDidChange):
2202         (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
2203         There are now two filters.
2204
2205           - FilterBar - Filters URL and Full Text Content
2206           - ScopeBar  - Filters Resource Type
2207
2208         The text content filter is asynchronous. We reuse the existing Search
2209         functionality when filtering on text. We need to defer text content
2210         filtering until the resource finishes loading.
2211
2212 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
2213
2214         Web Inspector: Network Tab: Row wrapping (waterfall displaying behind next row's name)
2215         https://bugs.webkit.org/show_bug.cgi?id=178015
2216         <rdar://problem/34858720>
2217
2218         Reviewed by Brian Burg.
2219
2220         * UserInterface/Views/Table.css:
2221         (.table > .header):
2222         (.table > .data-container > .data-list > li):
2223         Disallow wrapping.
2224
2225 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
2226
2227         Web Inspector: Network Tab - Cookies Detail View
2228         https://bugs.webkit.org/show_bug.cgi?id=177988
2229         <rdar://problem/34071927>
2230
2231         Reviewed by Brian Burg.
2232
2233         * Localizations/en.lproj/localizedStrings.js:
2234         * UserInterface/Main.html:
2235         * UserInterface/Test.html:
2236         New strings and resources.
2237
2238         * UserInterface/Models/Cookie.js: Added.
2239         (WI.Cookie):
2240         (WI.Cookie.parseCookieRequestHeader):
2241         (WI.Cookie.parseSetCookieResponseHeader):
2242         Encapsulation for Cookie attributes.
2243
2244         * UserInterface/Models/Resource.js:
2245         (WI.Resource.prototype.get requestCookies):
2246         (WI.Resource.prototype.get responseCookies):
2247         (WI.Resource.prototype.updateForRedirectResponse):
2248         (WI.Resource.prototype.updateForResponse):
2249         (WI.Resource.prototype.updateWithMetrics):
2250         New computed accessors for requestCookies and responseCookies.
2251
2252         * UserInterface/Views/NetworkResourceDetailView.js:
2253         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
2254         Show the new Cookie View.
2255
2256         * UserInterface/Views/NetworkTableContentView.css:
2257         (.content-view.network .network-table .icon):
2258         (.network-table li:not(.filler) .cell.name):
2259         (.network-table .cache-type):
2260         (.network-table .error):
2261         (body[dir=ltr] .network-table .cell.name > .status):
2262         (body[dir=rtl] .network-table .cell.name > .status):
2263         (.network-table .cell.name > .status .indeterminate-progress-spinner):
2264         (.showing-detail .network-table .cell:not(.name)):
2265         (.showing-detail .network-table .resizer:not(:first-of-type)):
2266         (.network-table :not(.header) .cell:first-of-type):
2267         Rework these styles to be specific to the .network-table.
2268
2269         * UserInterface/Views/Table.css:
2270         (.table :not(.header) .cell:first-of-type): Deleted.
2271         Move this to the network table styles, it shouldn't apply to all tables. 
2272
2273         * UserInterface/Views/ResourceCookiesContentView.css:
2274         (.resource-cookies > section > .details.has-table):
2275         (.resource-cookies .table):
2276         (.resource-cookies .table > .header):
2277         Styles for Cookies view and table.
2278
2279         * UserInterface/Views/ResourceCookiesContentView.js: Added.
2280         (WI.ResourceCookiesContentView):
2281         (WI.ResourceCookiesContentView.prototype.tableNumberOfRows):
2282         (WI.ResourceCookiesContentView.prototype.tableSortChanged):
2283         (WI.ResourceCookiesContentView.prototype.tablePopulateCell):
2284         (WI.ResourceCookiesContentView.prototype.initialLayout):
2285         (WI.ResourceCookiesContentView.prototype._incompleteSectionWithMessage):
2286         (WI.ResourceCookiesContentView.prototype._incompleteSectionWithLoadingIndicator):
2287         (WI.ResourceCookiesContentView.prototype._dataSourceForTable):
2288         (WI.ResourceCookiesContentView.prototype._generateSortComparator):
2289         (WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection):
2290         (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
2291         (WI.ResourceCookiesContentView.prototype._sizeForTable):
2292         (WI.ResourceCookiesContentView.prototype._resourceRequestHeadersDidChange):
2293         (WI.ResourceCookiesContentView.prototype._resourceResponseReceived):
2294         Tables for Request and Response cookies. They are simliar with slightly different columns.
2295         Handle simple display and sorting for the tables.
2296
2297         * UserInterface/Views/ResourceHeadersContentView.js:
2298         (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
2299         Break out Set-Cookie headers as multiple headers. THey should never be combined.
2300
2301         * UserInterface/Views/Table.js:
2302         (WI.Table.prototype.showColumn):
2303         (WI.Table.prototype.hideColumn):
2304         (WI.Table.prototype._handleHeaderContextMenu):
2305         * UserInterface/Views/TableColumn.js:
2306         (WI.TableColumn.prototype.get hideable):
2307         (WI.TableColumn.prototype.set hidden):
2308         (WI.TableColumn):
2309         (WI.TableColumn.prototype.setHidden): Deleted.
2310         Make it so some columns can not be hidden. For example the "value" column
2311         in the Cookie tables.
2312
2313 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
2314
2315         Web Inspector: Network Tab - Search Headers Detail View
2316         https://bugs.webkit.org/show_bug.cgi?id=177981
2317
2318         Reviewed by Brian Burg.
2319
2320         * UserInterface/Base/Main.js:
2321         * UserInterface/Views/LogContentView.js:
2322         (WI.LogContentView.prototype.performSearch):
2323         Rename "Dom" to "DOM" in utility function.
2324
2325         * UserInterface/Views/ResourceHeadersContentView.css:
2326         (.resource-headers.showing-find-banner .search-highlight):
2327         Search highlight styles.
2328
2329         * UserInterface/Views/ResourceHeadersContentView.js:
2330         (WI.ResourceHeadersContentView.prototype.get supportsSearch):
2331         (WI.ResourceHeadersContentView.prototype.get numberOfSearchResults):
2332         (WI.ResourceHeadersContentView.prototype.get hasPerformedSearch):
2333         (WI.ResourceHeadersContentView.prototype.set automaticallyRevealFirstSearchResult):
2334         (WI.ResourceHeadersContentView.prototype.performSearch):
2335         (WI.ResourceHeadersContentView.prototype.searchCleared):
2336         (WI.ResourceHeadersContentView.prototype.revealPreviousSearchResult):
2337         (WI.ResourceHeadersContentView.prototype.revealNextSearchResult):
2338         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
2339         (WI.ResourceHeadersContentView.prototype._revealSearchResult):
2340         Implement ContentView search behavior.
2341
2342 2017-10-08  Devin Rousso  <webkit@devinrousso.com>
2343
2344         Web Inspector: add autocompletion for min/max within a CSS calc
2345         https://bugs.webkit.org/show_bug.cgi?id=178068
2346
2347         Reviewed by Joseph Pecoraro.
2348
2349         * UserInterface/Models/CSSKeywordCompletions.js:
2350         (WI.CSSKeywordCompletions.forFunction):
2351
2352 2017-10-06  Matt Baker  <mattbaker@apple.com>
2353
2354         Web Inspector: Add Canvas tab and CanvasOverviewContentView
2355         https://bugs.webkit.org/show_bug.cgi?id=177604
2356         <rdar://problem/34714650>
2357
2358         Reviewed by Devin Rousso.
2359
2360         This patch adds experimental feature support for the Canvas tab. Initially
2361         the tab provides only an overview of the canvases in the page, and will
2362         exist side-by-side with the existing experimental Canvas UI.
2363
2364         * Localizations/en.lproj/localizedStrings.js:
2365         * UserInterface/Base/Main.js:
2366         (WI.contentLoaded):
2367         * UserInterface/Base/Setting.js:
2368
2369         * UserInterface/Images/Canvas.svg: Added.
2370         * UserInterface/Images/CanvasOverview.svg: Added.
2371         * UserInterface/Main.html:
2372         Add new art and canvas UI classes.
2373
2374         * UserInterface/Models/Canvas.js:
2375         (WI.Canvas.requestNode):
2376         (WI.Canvas.prototype.requestContent):
2377         (WI.Canvas.prototype.requestCSSCanvasClientNodes):
2378         (WI.Canvas.prototype.requestSize.calculateSize.getAttributeValue):
2379         (WI.Canvas.prototype.requestSize.calculateSize):
2380         (WI.Canvas.prototype.requestSize.getPropertyValue):
2381         (WI.Canvas.prototype.requestSize):
2382         Use promises to retrieve canvas data asynchronously.
2383
2384         * UserInterface/Models/CollectionTypes.js: Added.
2385         (WI.CanvasCollection):
2386         New location for concrete collection types. Having a class to type check
2387         makes using a collection as a represented object a bit simpler.
2388
2389         * UserInterface/Views/CanvasContentView.css:
2390         (.content-view.canvas:not(.tab)):
2391         (.content-view.canvas:not(.tab) > .preview):
2392         (.content-view.canvas:not(.tab) > .preview > img):
2393         (.content-view.canvas:not(.tab) > :matches(header, footer)):
2394         (.content-view.canvas): Deleted.
2395         (.content-view.canvas > .preview): Deleted.
2396         (.content-view.canvas > .preview > img): Deleted.
2397         During the transition to the new Canvas tab, CanvasContentView needs to
2398         support being shown as a full-size content view, and as an item in a
2399         CollectionContentView. Hide header and footer elements by default.
2400
2401         * UserInterface/Views/CanvasContentView.js:
2402         (WI.CanvasContentView):
2403         (WI.CanvasContentView.prototype.refresh):
2404         (WI.CanvasContentView.prototype.initialLayout):
2405         (WI.CanvasContentView.prototype.layout):
2406         (WI.CanvasContentView.prototype.shown):
2407         (WI.CanvasContentView.prototype.attached):
2408         (WI.CanvasContentView.prototype.detached):
2409         (WI.CanvasContentView.prototype._showError):
2410         (WI.CanvasContentView.prototype._refreshPixelSize):
2411         (WI.CanvasContentView.prototype._showGridButtonClicked):
2412         (WI.CanvasContentView.prototype._updateImageGrid):
2413         (WI.CanvasContentView.prototype._updateMemoryCost):
2414         (WI.CanvasContentView.prototype._updatePixelSize):
2415         (WI.CanvasContentView.prototype._updateRecordNavigationItem):
2416         (WI.CanvasContentView.prototype.hidden): Deleted.
2417         (WI.CanvasContentView.prototype.closed): Deleted.
2418         (WI.CanvasContentView.prototype._showPreview): Deleted.
2419         Added new UI for display in the Canvas overview. These elements are always
2420         created, but only appear when the canvas is viewed as a "card".
2421
2422         Canvas previews are no longer shown as soon as they are available from
2423         the backend. Instead, once the canvas content is ready a layout is scheduled.
2424         This guarantees that refreshing all canvases at once causes no flicker,
2425         and introduces no perceptible delay.
2426
2427         Finally, the "Cancel recording" tooltip has been renamed "Stop recording",
2428         to match the behavior of the command.
2429
2430         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
2431         (WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.): Deleted.
2432         Canvas.prototype.requestNode now returns a promise.
2433
2434         * UserInterface/Views/CanvasOverviewContentView.css: Added.
2435         (.content-view.canvas-overview):
2436         (.content-view.canvas-overview .content-view.canvas):
2437         (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)):
2438         (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
2439         (.content-view.canvas-overview .content-view.canvas > header):
2440         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
2441         (.content-view.canvas-overview .content-view.canvas > header > .titles,):
2442         (.content-view.canvas-overview .content-view.canvas > header > .titles > .title):
2443         (.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,):
2444         (.content-view.canvas-overview .content-view.canvas > header .subtitle::before):
2445         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .title):
2446         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle):
2447         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .navigation-bar > .item):
2448         (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
2449         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar):
2450         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop.disabled):
2451         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop):
2452         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):hover):
2453         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):active):
2454         (.content-view.canvas-overview .content-view.canvas > .preview):
2455         (.content-view.canvas-overview .content-view.canvas > .preview > img):
2456         (.content-view.canvas-overview .content-view.canvas > .preview > .message-text-view):
2457         (.content-view.canvas-overview .content-view.canvas > footer):
2458         (.content-view.canvas-overview .content-view.canvas > footer .memory-cost):
2459         Add header, navigation bar, and footer styles to CanvasContentView when
2460         it is being shown as an item in a CollectionContentView.
2461
2462         * UserInterface/Views/CanvasOverviewContentView.js: Added.
2463         (WI.CanvasOverviewContentView):
2464         (WI.CanvasOverviewContentView.prototype.get navigationItems):
2465         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents):
2466         (WI.CanvasOverviewContentView.prototype.hidden):
2467         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
2468         (WI.CanvasOverviewContentView.prototype.contentViewRemoved):
2469         (WI.CanvasOverviewContentView.prototype.attached):
2470         (WI.CanvasOverviewContentView.prototype.detached):
2471         (WI.CanvasOverviewContentView.prototype._refreshPreviews):
2472         (WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged):
2473         (WI.CanvasOverviewContentView.prototype._showGridButtonClicked):
2474         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent):
2475         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
2476         (WI.CanvasOverviewContentView.prototype._updateNavigationItems):
2477         (WI.CanvasOverviewContentView.prototype._updateShowImageGrid):
2478         (WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):
2479         (WI.CanvasOverviewContentView.prototype._contentViewMouseLeave):
2480         The overview extends CollectionContentView, adding buttons for global canvas actions
2481         (refresh all and show/hide grid for all), and maintains a non-visible
2482         outline of CanvasTreeElements to facilitate display of the hierarchical
2483         path in the navigation bar.
2484
2485         * UserInterface/Views/CanvasTabContentView.css: Added.
2486         (.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon):
2487         (.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon):
2488         (.content-view.tab.canvas .navigation-bar > .item .canvas .icon):
2489
2490         * UserInterface/Views/CanvasTabContentView.js: Added.
2491         (WI.CanvasTabContentView):
2492         (WI.CanvasTabContentView.tabInfo):
2493         (WI.CanvasTabContentView.isTabAllowed):
2494         (WI.CanvasTabContentView.prototype.get type):
2495         (WI.CanvasTabContentView.prototype.get supportsSplitContentBrowser):
2496         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
2497         (WI.CanvasTabContentView.prototype.shown):
2498         (WI.CanvasTabContentView.prototype.treeElementForRepresentedObject):
2499         (WI.CanvasTabContentView.prototype.restoreFromCookie):
2500         (WI.CanvasTabContentView.prototype.saveStateToCookie):
2501         (WI.CanvasTabContentView.prototype.attached):
2502         (WI.CanvasTabContentView.prototype.detached):
2503         (WI.CanvasTabContentView.prototype._canvasAdded):
2504         (WI.CanvasTabContentView.prototype._canvasRemoved):
2505         (WI.CanvasTabContentView.prototype._overviewPathComponentClicked):
2506         (WI.CanvasTabContentView.prototype._mainResourceDidChange):
2507
2508         * UserInterface/Views/CollectionContentView.js:
2509         (WI.CollectionContentView):
2510         (WI.CollectionContentView.prototype.setSelectedItem):
2511         (WI.CollectionContentView.prototype.addContentViewForItem):
2512         (WI.CollectionContentView.prototype.removeContentViewForItem):
2513         (WI.CollectionContentView.prototype.initialLayout):
2514         (WI.CollectionContentView.prototype._showContentPlaceholder):
2515         (WI.CollectionContentView.prototype._hideContentPlaceholder):
2516         Placeholder content should be created lazily, and shown after a slight delay
2517         to give represented objects a chance to load. Make sure to call the
2518         shown or hidden method after adding or removing a content view.
2519
2520         * UserInterface/Views/SettingsTabContentView.js:
2521         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2522
2523         * UserInterface/Views/Variables.css:
2524         (:root):
2525         (body.window-inactive *):
2526
2527         * UserInterface/Views/View.js:
2528         (WI.View.fromElement):
2529
2530 2017-10-06  Joseph Pecoraro  <pecoraro@apple.com>
2531
2532         Web Inspector: Network Tab - Headers Detail View
2533         https://bugs.webkit.org/show_bug.cgi?id=177896
2534         <rdar://problem/34071924>
2535
2536         Reviewed by Devin Rousso.
2537
2538         * Localizations/en.lproj/localizedStrings.js:
2539         * UserInterface/Main.html:
2540         New resources and strings.
2541
2542         * UserInterface/Base/URLUtilities.js:
2543         (parseURL):
2544         (WI.h2Authority):
2545         (WI.h2Path):
2546         Utility methods to get the :authority and :path pseudo-headers from a URL.
2547         This required adding user info (user:pass@) support to URL parsing.
2548
2549         * UserInterface/Views/NetworkTabContentView.js:
2550         (WI.NetworkTabContentView):
2551         * UserInterface/Views/NetworkTableContentView.js:
2552         (WI.NetworkTableContentView.prototype.get navigationItems):
2553         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
2554         Move the NetworkTab's filter controls to the left. Since these are not
2555         dynamic just vend them from the TableContentView and place them in the
2556         navigation bar.
2557
2558         * UserInterface/Models/Resource.js:
2559         (WI.Resource.prototype.updateWithMetrics):
2560         New event whenever metrics change. This is the first event that will allow
2561         a client to react to a resource.protocol change.
2562
2563         * UserInterface/Views/NetworkResourceDetailView.css:
2564         (.content-view.resource-details):
2565         Base styles for the sub detail views.
2566
2567         * UserInterface/Views/NetworkResourceDetailView.js:
2568         (WI.NetworkResourceDetailView):
2569         (WI.NetworkResourceDetailView.prototype.headersContentViewGoToRequestData):
2570         (WI.NetworkResourceDetailView.prototype.initialLayout):
2571         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
2572         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
2573         Create a Header view and provide a way to switch to a particular view. This wil
2574         be useful to jump from the Header's Request Data directly to the Preview's
2575         Request ContentView.
2576
2577         * UserInterface/Views/ResourceDetailsSection.css:
2578         (.resource-details > section):
2579         (.resource-details > section > .title):
2580         (.resource-details > section > .details):
2581         (.resource-details > section > .details > p):
2582         (.resource-details > section.incomplete > .details):
2583         * UserInterface/Views/ResourceDetailsSection.js:
2584         (WI.ResourceDetailsSection):
2585         (WI.ResourceDetailsSection.prototype.get element):
2586         (WI.ResourceDetailsSection.prototype.get titleElement):
2587         (WI.ResourceDetailsSection.prototype.get detailsElement):
2588         (WI.ResourceDetailsSection.prototype.toggleIncomplete):
2589         (WI.ResourceDetailsSection.prototype.toggleError):
2590         Simple sections with a title and details div with a border.
2591         It may be common to have an incomplete load / error so this
2592         provides some APIs and styles for sections marked incomplete
2593         or with errors.
2594
2595         * UserInterface/Views/ResourceHeadersContentView.css:
2596         (.resource-headers > section > .details):
2597         (.resource-headers > section.headers > .details):
2598         (.resource-headers > section.error > .details):
2599         (.resource-headers > section.error .key):
2600         Style the left border different colors for different sections or cases.
2601
2602         (.resource-headers .details):
2603         (.resource-headers .details .pair):
2604         (.resource-headers .details .key):
2605         (.resource-headers .value):
2606         (.resource-headers .header > .key):
2607         (.resource-headers .h1-status > .key):
2608         (.resource-headers .h2-pseudo-header > .key):
2609         Wrapped text for key/value pairs and different colors for different
2610         sections or cases.
2611
2612         (.resource-headers .go-to-arrow):
2613         Go-to arrow styles for a request data section.
2614
2615         * UserInterface/Views/ResourceHeadersContentView.js: Added.
2616         (WI.ResourceHeadersContentView):
2617         (WI.ResourceHeadersContentView.prototype.initialLayout):
2618         (WI.ResourceHeadersContentView.prototype.layout):
2619         (WI.ResourceHeadersContentView.prototype._incompleteSectionWithMessage):
2620         (WI.ResourceHeadersContentView.prototype._incompleteSectionWithLoadingIndicator):
2621         (WI.ResourceHeadersContentView.prototype._appendKeyValuePair):
2622         (WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
2623         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2624         (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
2625         (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
2626         (WI.ResourceHeadersContentView.prototype._refreshQueryStringSection):
2627         (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
2628         (WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):
2629         (WI.ResourceHeadersContentView.prototype._resourceRequestHeadersDidChange):
2630         (WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
2631         (WI.ResourceHeadersContentView.prototype._goToRequestDataClicked):
2632         Summary, Request, Response, Query String, and Request Data sections.
2633         The sections refresh as data becomes available.
2634
2635         * UserInterface/Views/Table.css:
2636         (.table):
2637         These variables are already defined globally.
2638
2639         * UserInterface/Views/Variables.css:
2640         (:root):
2641         New variables for the colors we use. They closely match, and are
2642         sometimes identical to ones used in Timelines / Memory views.
2643
2644 2017-10-06  Joseph Pecoraro  <pecoraro@apple.com>
2645
2646         Web Inspector: Network Tab - Make selection in the table more reliable (mousedown instead of click)
2647         https://bugs.webkit.org/show_bug.cgi?id=177990
2648
2649         Reviewed by Brian Burg.
2650
2651         * UserInterface/Views/NetworkTableContentView.js:
2652         (WI.NetworkTableContentView.prototype.tableCellClicked): Deleted.
2653         * UserInterface/Views/Table.js:
2654         (WI.Table.prototype._handleMouseDown):
2655         (WI.Table.prototype._handleClick): Deleted.
2656         Switch to mousedown.
2657
2658 2017-10-06  Joseph Pecoraro  <pecoraro@apple.com>
2659
2660         Web Inspector: Improve setting the default / initial sort of a Table
2661         https://bugs.webkit.org/show_bug.cgi?id=177989
2662
2663         Reviewed by Brian Burg.
2664
2665         * UserInterface/Views/NetworkTableContentView.js:
2666         (WI.NetworkTableContentView.prototype.initialLayout):
2667         Set the default / initial sort.
2668
2669         * UserInterface/Views/Table.js:
2670         (WI.Table):
2671         (WI.Table.prototype.set sortOrder):
2672         (WI.Table.prototype.set sortColumnIdentifier):
2673         During setup we should always update header views.
2674
2675 2017-10-05  Nikita Vasilyev  <nvasilyev@apple.com>
2676
2677         Web Inspector: Styles Redesign: Add support for keyboard navigation (Tab, Shift-Tab, Enter, Esc)
2678         https://bugs.webkit.org/show_bug.cgi?id=177711
2679
2680         Reviewed by Joseph Pecoraro.
2681
2682         Enter, Tab, Shift-Tab should commit changes.
2683         Escape should discard changes.
2684
2685         Tab and Enter should navigate forward (focus on the next field).
2686         Shift-Tab should navigate backward (focus on the previous field).
2687         Esc should not change the focus.
2688
2689         When navigating forward from:
2690
2691         - Selector: Focus on the first property name. If it doesn’t exist, create a blank property.
2692
2693         - Property name:
2694           - If property name is blank, discard the property and focus on the next editable field (property name or selector of the next rule).
2695           - If property is not blank, focus on the value.
2696
2697         - Property value:
2698           - If the last value in the rule, create a blank property and focus on its name.
2699           - If not the last value in the rule, focus on the next editable field (property name or selector of the next rule).
2700
2701         When navigating backward from:
2702
2703         - Selector: create a blank property on the previous editable rule and focus on its name.
2704
2705         - Property name:
2706           - Focus on the rule's selector.
2707
2708         - Property value:
2709           - Focus on the property name.
2710
2711         * UserInterface/Base/Utilities.js:
2712         (Event.prototype.stop):
2713         * UserInterface/Main.html:
2714         Add new files. Keep one class per file.
2715
2716         * UserInterface/Models/CSSProperty.js:
2717         (WI.CSSProperty.prototype.remove):
2718         (WI.CSSProperty.prototype.set name):
2719         (WI.CSSProperty.prototype.set rawValue):
2720         (WI.CSSProperty.prototype.get editable):
2721         (WI.CSSProperty.prototype._updateStyleText):
2722         (WI.CSSProperty.prototype._updateOwnerStyleText):
2723         Update indices and ranges of properties following the edited one to prevent data corruption.
2724
2725         * UserInterface/Models/CSSStyleDeclaration.js:
2726         (WI.CSSStyleDeclaration.prototype.get selectorEditable):
2727         (WI.CSSStyleDeclaration.prototype.set text):
2728         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
2729         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
2730         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
2731         Implement adding new blank properties.
2732
2733         * UserInterface/Models/TextRange.js:
2734         (WI.TextRange.prototype.cloneAndModify):
2735         Add an assert to catch negative number errors.
2736
2737         (WI.TextRange.prototype.collapseToEnd):
2738         Add a utility function akin Selection.prototype.collapseToEnd.
2739
2740         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2741         (WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
2742         (WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
2743         (WI.CSSStyleDeclarationTextEditor.prototype._formattedContent):
2744         Move PrefixWhitespace from a view to a model (WI.CSSStyleDeclaration.PrefixWhitespace),
2745         since it's already used in the model.
2746
2747         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2748         (.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
2749         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2750         (WI.SpreadsheetCSSStyleDeclarationEditor):
2751         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2752         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
2753         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
2754         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
2755         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2756         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender):
2757         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty):
2758         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused):
2759         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
2760         Give SpreadsheetCSSStyleDeclarationEditor a delegate so that it can move focus to a CSS selector, or previous and next CSS rules.
2761
2762         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2763         (WI.SpreadsheetCSSStyleDeclarationSection):
2764         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesEditor):
2765         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get editable):
2766         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2767         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
2768         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorStartEditingRuleSelector):
2769         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
2770         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule):
2771         Give SpreadsheetCSSStyleDeclarationSection a delegate so that it can move focus to previous and next CSS rules.
2772
2773         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2774         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
2775         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule):
2776         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule):
2777         (WI.SpreadsheetRulesStyleDetailsPanel):
2778         Implement focusing on the next and previous CSS rules.
2779
2780         * UserInterface/Views/SpreadsheetSelectorField.js: Added.
2781         (WI.SpreadsheetSelectorField):
2782         (WI.SpreadsheetSelectorField.prototype.get editing):
2783         (WI.SpreadsheetSelectorField.prototype.startEditing):
2784         (WI.SpreadsheetSelectorField.prototype.stopEditing):
2785         (WI.SpreadsheetSelectorField.prototype._selectText):
2786         (WI.SpreadsheetSelectorField.prototype._handleClick):
2787         (WI.SpreadsheetSelectorField.prototype._handleFocus):
2788         (WI.SpreadsheetSelectorField.prototype._handleBlur):
2789         (WI.SpreadsheetSelectorField.prototype._handleKeyDown):
2790         Move SpreadsheetSelectorField into its own file.
2791
2792         * UserInterface/Views/SpreadsheetStyleProperty.js: Added.
2793         (WI.SpreadsheetStyleProperty):
2794         (WI.SpreadsheetStyleProperty.prototype.get element):
2795         (WI.SpreadsheetStyleProperty.prototype.get nameTextField):
2796         (WI.SpreadsheetStyleProperty.prototype.get valueTextField):
2797         (WI.SpreadsheetStyleProperty.prototype._remove):
2798         (WI.SpreadsheetStyleProperty.prototype._update):
2799         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):
2800         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
2801         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
2802         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
2803         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
2804         Move SpreadsheetStyleProperty into its own file.
2805
2806         * UserInterface/Views/SpreadsheetTextField.js: Added.
2807         (WI.SpreadsheetTextField):
2808         (WI.SpreadsheetTextField.prototype.get element):
2809         (WI.SpreadsheetTextField.prototype.get editing):
2810         (WI.SpreadsheetTextField.prototype.get value):
2811         (WI.SpreadsheetTextField.prototype.set value):
2812         (WI.SpreadsheetTextField.prototype.startEditing):
2813         (WI.SpreadsheetTextField.prototype.stopEditing):
2814         (WI.SpreadsheetTextField.prototype._selectText):
2815         (WI.SpreadsheetTextField.prototype._discardChange):
2816         (WI.SpreadsheetTextField.prototype._handleFocus):
2817         (WI.SpreadsheetTextField.prototype._handleBlur):
2818         (WI.SpreadsheetTextField.prototype._handleKeyDown):
2819         (WI.SpreadsheetTextField.prototype._handleInput):
2820         Introduce SpreadsheetTextField that is used for editing CSS property names and values.
2821
2822 2017-10-05  Joseph Pecoraro  <pecoraro@apple.com>
2823
2824         REGRESSION(r222868): Web Inspector: Timeline ScopeBar Navigation Bar items too large
2825         https://bugs.webkit.org/show_bug.cgi?id=177979
2826
2827         Reviewed by Matt Baker.
2828
2829         * UserInterface/Views/ButtonNavigationItem.css:
2830         (.navigation-bar .item.button.text-only):
2831         Make the height of text-only items the size of the text, not 100%.
2832
2833 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
2834
2835         Web Inspector: When scrolled Network Table reduces the number of rows it may appear as blank
2836         https://bugs.webkit.org/show_bug.cgi?id=177914
2837         <rdar://problem/34827613>
2838
2839         Reviewed by Matt Baker.
2840
2841         * UserInterface/Views/Table.js:
2842         (WI.Table.prototype._updateVisibleRows):
2843         (WI.Table.prototype._updateFillerRowWithNewHeight):
2844         Reduce the scrollTop when the table was scrolled and was then reloaded with a
2845         smaller number of rows. This can happen in two ways. Either the number of rows
2846         was reduced so much that we enter non-scrollable mode with a non-zero filler
2847         row. This can always reset the scrollTop to 0. Or when a large number of rows
2848         is reduced to a smaller number than our current scrollTop but still more than
2849         fit on one screen. In that case we can reduce the scrollTop to whatever would
2850         scroll the table to its max position.
2851
2852 2017-10-04  Matt Baker  <mattbaker@apple.com>
2853
2854         Web Inspector: Improve CanvasManager recording events
2855         https://bugs.webkit.org/show_bug.cgi?id=177762
2856
2857         Reviewed by Devin Rousso.
2858
2859         * UserInterface/Controllers/CanvasManager.js:
2860         (WI.CanvasManager.prototype.startRecording):
2861         (WI.CanvasManager.prototype.stopRecording):
2862         (WI.CanvasManager.prototype.recordingFinished):
2863         Replace the RecordingFinished event with a pair of events. RecordingStarted
2864         is sent when CanvasAgent.startRecording succeeds. RecordingStopped is
2865         sent when a recordingFinished event is received from the backend, or
2866         when a call to CanvasAgent.stopRecording fails.
2867
2868         * UserInterface/Views/CanvasContentView.js:
2869         (WI.CanvasContentView.prototype.initialLayout):
2870         (WI.CanvasContentView.prototype._toggleRecording):
2871         (WI.CanvasContentView.prototype._recordingStarted):
2872         (WI.CanvasContentView.prototype._recordingFinished): Deleted.
2873         Update recording status when CanvasManager fires recording events,
2874         instead of immediately after clicking the record button.
2875
2876 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
2877
2878         Web Inspector: Detail Views for resources in Network Tab
2879         https://bugs.webkit.org/show_bug.cgi?id=177553
2880
2881         Reviewed by Devin Rousso.
2882
2883         * Localizations/en.lproj/localizedStrings.js:
2884         * UserInterface/Main.html:
2885         New strings and resources.
2886
2887         * UserInterface/Base/Main.js:
2888         (WI._focusedContentBrowser):
2889         Detect nested content browsers instead of only top level tab content browsers.
2890
2891         * UserInterface/Base/Setting.js:
2892         Add a new global setting for which Network Detail view is preferred.
2893
2894         * UserInterface/Views/ContentBrowser.css:
2895         (.content-browser > .navigation-bar .item):
2896         (.content-browser > .navigation-bar > .item): Deleted.
2897         Generalize a navigation item style so it works on items nested inside a group.
2898
2899         * UserInterface/Views/ContentBrowser.js:
2900         (WI.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
2901         (WI.ContentBrowser.prototype._updateContentViewNavigationItems):
2902         (WI.ContentBrowser.prototype._removeAllNavigationItems):
2903         Give ContentBrowser a way to group all ContentView specific navigation items
2904         inside a GroupNavigationItem. This lets the client decide what to do with
2905         those navigation items, instead of default behavior in the navigation bar.
2906
2907         * UserInterface/Views/ContentViewContainer.js:
2908         (WI.ContentViewContainer.prototype.showContentView):
2909         Avoid a flash when showContentView is called with the current content view.
2910
2911         * UserInterface/Views/FlexibleSpaceNavigationItem.css:
2912         (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-start > .item):
2913         (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-end > .item):
2914         When containing a navigation item decide where you want the items to align to.
2915
2916         * UserInterface/Views/FlexibleSpaceNavigationItem.js:
2917         (WI.FlexibleSpaceNavigationItem):
2918         (WI.FlexibleSpaceNavigationItem.prototype.updateLayout):
2919         Provide an option to embed a NavigationItem within a FlexibleSpace. Its behavior right
2920         now is rather simple. If the embedded Item fits in the current available space it is
2921         shown. If it doesn't fit, it is hidden and we have just a flexible space. This is used
2922         in the network detail view's navigation bar to keep the main navigation items centered
2923         while allowing for buttons to show up on the side without affecting the centering.
2924
2925         * UserInterface/Views/NavigationBar.js:
2926         (WI.NavigationBar):
2927         (WI.NavigationBar.prototype._mouseDown):
2928         (WI.NavigationBar.prototype._mouseUp):
2929         Simplify event registration. This would also help avoid cases where we
2930         might have registered multiple mousedown handlers.
2931
2932         * UserInterface/Views/GroupNavigationItem.js:
2933         (WI.GroupNavigationItem):
2934         (WI.GroupNavigationItem.prototype.get navigationItems):
2935         (WI.GroupNavigationItem.prototype.set navigationItems):
2936         (WI.GroupNavigationItem.prototype.get width):
2937         (WI.GroupNavigationItem.prototype.get minimumWidth):
2938         (WI.GroupNavigationItem.prototype._updateItems):
2939         * UserInterface/Views/HierarchicalPathNavigationItem.js:
2940         (WI.HierarchicalPathNavigationItem):
2941         (WI.HierarchicalPathNavigationItem.prototype.set components):
2942         (WI.HierarchicalPathNavigationItem.prototype.updateLayout):
2943         (WI.HierarchicalPathNavigationItem.prototype._updateComponentsIfNeeded):
2944         Defer DOM modifications until layout for NavigationItems container classes
2945         that change items/components dynamically. This reduces UI flashing in the
2946         bar when items/components change by coalescing all DOM updates at the same
2947         time; when the NavigationBar does its next layout.
2948
2949         * UserInterface/Views/NetworkResourceDetailView.css:
2950         (.network-resource-detail):
2951         (.network-resource-detail .navigation-bar):
2952         (.network-resource-detail .item.close > .glyph):
2953         (.network-resource-detail .item.close > .glyph:hover):
2954         (.network-resource-detail .item.close > .glyph:active):
2955         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only):
2956         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected):
2957         (.network-resource-detail > .content-browser):
2958         Styles for the detail view's navigation bar.
2959
2960         * UserInterface/Views/NetworkResourceDetailView.js: Added.
2961         (WI.NetworkResourceDetailView):
2962         (WI.NetworkResourceDetailView.prototype.get resource):
2963         (WI.NetworkResourceDetailView.prototype.shown):
2964         (WI.NetworkResourceDetailView.prototype.hidden):
2965         (WI.NetworkResourceDetailView.prototype.dispose):
2966         (WI.NetworkResourceDetailView.prototype.initialLayout):
2967         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
2968         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
2969         (WI.NetworkResourceDetailView.prototype._navigationItemSelected):
2970         (WI.NetworkResourceDetailView.prototype._handleCloseButton):
2971         ContentBrowser with customized navigation bar. This container has a fixed
2972         list of ContentViews all relating to the Resource. The detail view has
2973         a single delegate method for its close button. Since it maintains a
2974         ContentBrowser it needs to expose shown/hidden/dispose logic to ensure
2975         proper ContentView lifecycle events.
2976
2977         * UserInterface/Views/NetworkTableContentView.css:
2978         (.showing-detail .table .cell:not(.name)):
2979         (.showing-detail .table .resizer:not(:first-of-type)):
2980         * UserInterface/Views/NetworkTableContentView.js:
2981         (WI.NetworkTableContentView):
2982         (WI.NetworkTableContentView.prototype.shown):
2983         (WI.NetworkTableContentView.prototype.hidden):
2984         (WI.NetworkTableContentView.prototype.closed):
2985         (WI.NetworkTableContentView.prototype.reset):
2986         (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
2987         (WI.NetworkTableContentView.prototype.tableSortChanged):
2988         (WI.NetworkTableContentView.prototype.tableCellClicked):
2989         (WI.NetworkTableContentView.prototype.tableSelectedRowChanged):
2990         (WI.NetworkTableContentView.prototype.layout):
2991         (WI.NetworkTableContentView.prototype._hideResourceDetailView):
2992         (WI.NetworkTableContentView.prototype._showResourceDetailView):
2993         (WI.NetworkTableContentView.prototype._positionDetailView):
2994         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
2995         (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
2996         (WI.NetworkTableContentView.prototype._restoreSelectedRow):
2997         (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
2998         Behavior for selecting a row and showing / hiding the detail view.
2999         The detail view is positioned beside the Network Table's "name" column
3000         and resizes when that column resizes.
3001
3002         * UserInterface/Views/Resizer.css:
3003         (.resizer):
3004         * UserInterface/Views/Table.css:
3005         (.table > .resizers):
3006         * UserInterface/Views/Table.js:
3007         (WI.Table):
3008         (WI.Table.prototype.get scrollContainer):
3009         (WI.Table.prototype._positionResizerElements):
3010         To let clients customize the table a bit, put resizers into their own
3011         container and expose the scroll container.
3012
3013         * UserInterface/Views/Variables.css:
3014         (:root):
3015         Add a new button hover color, slightly lighter than the existing button active color.
3016
3017 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
3018
3019         Web Inspector: Fix Beacon and Ping folderization issues
3020         https://bugs.webkit.org/show_bug.cgi?id=177885
3021
3022         Reviewed by Matt Baker.
3023
3024         * Localizations/en.lproj/localizedStrings.js:
3025         * UserInterface/Views/NetworkTableContentView.js:
3026         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
3027         Use common capitalized UIString "Ping". It gets lowercased later.
3028
3029         * UserInterface/Models/ResourceCollection.js:
3030         Add missing verifier.
3031
3032 2017-10-04  Matt Baker  <mattbaker@apple.com>
3033
3034         Web Inspector: Remove unused `representedObject` parameter from GeneralTreeElementPathComponent constructor
3035         https://bugs.webkit.org/show_bug.cgi?id=177561
3036
3037         Reviewed by Joseph Pecoraro.
3038
3039         * UserInterface/Views/GeneralTreeElementPathComponent.js:
3040         (WI.GeneralTreeElementPathComponent):
3041         (WI.GeneralTreeElementPathComponent.prototype.get generalTreeElement):
3042         (WI.GeneralTreeElementPathComponent.prototype.get previousSibling):
3043         (WI.GeneralTreeElementPathComponent.prototype.get nextSibling):
3044
3045 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
3046
3047         Web Inspector: After enabling the new Network Tab in experimental settings, the network tab disappears
3048         https://bugs.webkit.org/show_bug.cgi?id=177774
3049         <rdar://problem/34771647>
3050
3051         Reviewed by Devin Rousso.
3052
3053         * UserInterface/Views/SettingsTabContentView.js:
3054         When enabling the new network tab, ensure it gets added to the list of open tabs.
3055         Place it where the old network tab was so the UI is as consistent as possible.
3056
3057 2017-10-03  Ross Kirsling  <ross.kirsling@sony.com>
3058
3059         Web Inspector: Layers tab sidebar's DOM highlight should be by row hover, not row selection
3060         https://bugs.webkit.org/show_bug.cgi?id=177690
3061
3062         Reviewed by Devin Rousso.
3063
3064         * UserInterface/Views/LayerDetailsSidebarPanel.js:
3065         (WI.LayerDetailsSidebarPanel):
3066         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
3067         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
3068         (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseMove):
3069         (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseLeave):
3070         (WI.LayerDetailsSidebarPanel.prototype._hideDOMNodeHighlight):
3071         (WI.LayerDetailsSidebarPanel.prototype._dataGridFocused): Deleted.
3072         (WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred): Deleted.
3073         (WI.LayerDetailsSidebarPanel.prototype._highlightSelectedNode): Deleted.
3074
3075 2017-10-03  Nikita Vasilyev  <nvasilyev@apple.com>
3076
3077         Web Inspector: Styles Redesign: support editing of rule selectors
3078         https://bugs.webkit.org/show_bug.cgi?id=177012
3079
3080         Reviewed by Matt Baker.
3081
3082         Clicking or focusing (by tabbing from another field) on a CSS selector should select the text and make the selector
3083         field editable.
3084
3085         Keyboard behavior while editing:
3086         - Enter should commit changes.
3087         - Escape should discard changes.
3088         - Tab should commit changes and navigate to the first property name.
3089         - Shift-Tab should commit changes and navigate to the last rule's property value, if there's one.
3090
3091         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3092         (WI.SpreadsheetStyleProperty.prototype._update):
3093         Add tabIndex so the keyboard navigation (Tab & Shift-Tab) to and from selectors works as expected.
3094
3095         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
3096         (.spreadsheet-css-declaration .selector:focus,):
3097         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
3098         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field.editing):
3099         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3100         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get selectorEditable):
3101         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3102         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
3103         Split layout into _renderOrigin and _renderSelector, so selector field can be updated separately
3104         from everything else.
3105
3106         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorFocused):
3107         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
3108         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidDiscard):
3109         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._discardSelectorChange):
3110         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
3111         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderOrigin):
3112
3113         (WI.SpreadsheetSelectorField):
3114         (WI.SpreadsheetSelectorField.prototype.get editing):
3115         (WI.SpreadsheetSelectorField.prototype.startEditing):
3116         (WI.SpreadsheetSelectorField.prototype.stopEditing):
3117         (WI.SpreadsheetSelectorField.prototype._handleClick):
3118         (WI.SpreadsheetSelectorField.prototype._handleFocus):
3119         (WI.SpreadsheetSelectorField.prototype._handleBlur):
3120         (WI.SpreadsheetSelectorField.prototype._handleKeyDown):
3121
3122 2017-10-03  Matt Baker  <mattbaker@apple.com>
3123
3124         Web Inspector: Add View layout tests, make views more testable
3125         https://bugs.webkit.org/show_bug.cgi?id=161274
3126         <rdar://problem/28038615>
3127
3128         Reviewed by Devin Rousso.
3129
3130         This patch adds support for View testing. Since view layouts are scheduled
3131         using requestAnimationFrame, FrontendTestHarness now provides a timer-based
3132         polyfill, to allow nonintrusive testing of the frontend View hierarchy.
3133
3134         * UserInterface/Test.html:
3135         Make WI.View available to tests.
3136
3137         * UserInterface/Test/FrontendTestHarness.js:
3138         (FrontendTestHarness.prototype.redirectRequestAnimationFrame):
3139
3140         * UserInterface/Views/View.js:
3141         (WI.View.rootView):
3142         (WI.View.prototype.replaceSubview):
3143         (WI.View.prototype._didMoveToWindow):
3144         (WI.View._cancelScheduledLayoutForView):
3145         Fixed issues caught while writing tests for the expected View behavior.
3146
3147 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
3148
3149         Web Inspector: Escape more characters in posix string conversion
3150         https://bugs.webkit.org/show_bug.cgi?id=177761
3151         <rdar://problem/34506832>
3152
3153         Reviewed by Brian Burg.
3154
3155         * UserInterface/Models/Resource.js:
3156         (WI.Resource.prototype.generateCURLCommand.escapeStringPosix):
3157         Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times.
3158
3159 2017-10-02  Ross Kirsling  <ross.kirsling@sony.com>
3160
3161         Web Inspector: Selecting child layers with keyboard causes Compositing Reason popover to become misaligned
3162         https://bugs.webkit.org/show_bug.cgi?id=150551
3163
3164         Reviewed by Matt Baker.
3165
3166         `content` setter should only be used when NOT repositioning the popover.
3167         `presentNewContentWithFrame` exists to update content and position at once.
3168
3169         * UserInterface/Views/LayerDetailsSidebarPanel.js:
3170         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
3171         (WI.LayerDetailsSidebarPanel.prototype._presentPopover):
3172         Fix new sidebar.
3173
3174         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3175         (WI.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
3176         Fix legacy sidebar.
3177
3178 2017-10-02  Ross Kirsling  <ross.kirsling@sony.com>
3179
3180         Web Inspector: Ensure popovers are not malformed on window resize.
3181         https://bugs.webkit.org/show_bug.cgi?id=177771
3182
3183         Reviewed by Joseph Pecoraro.
3184
3185         * UserInterface/Views/Popover.js:
3186         Ensure stale `arrow-*` CSS classes are removed on update, even if our content didn't change.
3187
3188 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
3189
3190         Web Inspector: Include Beacon and Ping requests in Network tab
3191         https://bugs.webkit.org/show_bug.cgi?id=177641
3192         <rdar://problem/33086839>
3193
3194         Reviewed by Chris Dumez.
3195
3196         * Localizations/en.lproj/localizedStrings.js:
3197         New strings for Beacon/Ping.
3198
3199         * UserInterface/Images/Beacon.svg: Added.
3200         * UserInterface/Views/ResourceIcons.css:
3201         (.resource-icon.resource-type-ping .icon,):
3202         (body:not(.mac-platform, .windows-platform) .resource-icon.resource-type-ping .icon,):
3203         (body:not(.mac-platform, .windows-platform) .large .resource-icon.resource-type-ping .icon,):
3204         New icon for Beacon/Ping. They share an icon since they are similiar in concept:
3205         a request that is sent and the page doesn't expect a response.
3206
3207         * UserInterface/Controllers/FrameResourceManager.js:
3208         (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
3209         When a sub-resource and a main-resource have the same URL we were not
3210         distinguishing them. Use the resource type to distinguish them better.
3211
3212         * UserInterface/Models/SourceCode.js:
3213         (WI.SourceCode.prototype._processContent):
3214         Safer handling if the body was base64 encoded but an empty string.
3215
3216         * UserInterface/Models/Resource.js:
3217         (WI.Resource.displayNameForType):
3218         * UserInterface/Models/ResourceCollection.js:
3219         (WI.ResourceCollection.verifierForType):
3220         * UserInterface/Views/NetworkTableContentView.js:
3221         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
3222         * UserInterface/Views/ResourceClusterContentView.js:
3223         (WI.ResourceClusterContentView.prototype.get responseContentView):
3224         New resource types.
3225
3226         * UserInterface/Views/ResourceContentView.js:
3227         (WI.ResourceContentView.prototype.showMessage):
3228         * UserInterface/Views/TextResourceContentView.js:
3229         (WI.TextResourceContentView.prototype._contentDidPopulate):
3230         Nicer display for empty content, which may be common for these requests.
3231
3232 2017-09-29  Nikita Vasilyev  <nvasilyev@apple.com>
3233
3234         Web Inspector: Styles Redesign: support undo/redo of manual edits
3235         https://bugs.webkit.org/show_bug.cgi?id=177314
3236
3237         Reviewed by Joseph Pecoraro.
3238
3239         Make sure Command-Z and Command-Shift-Z undo changes in the styles sidebar
3240         when not focused on a contentEditable field.
3241
3242         * UserInterface/Views/EditingSupport.js:
3243         (WI.isEventTargetAnEditableField):
3244         Make sure WI._undoKeyboardShortcut doesn't call WI.undo() when editing inside of a contentEditable element.
3245
3246         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3247         (WI.SpreadsheetCSSStyleDeclarationEditor):
3248         Call style setter to setup event listeners during instantiation.
3249
3250         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style):
3251         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
3252         Update style declaration section when it isn't focused.
3253         This is the same logic as in the old styles sidebar (CSSStyleDeclarationTextEditor style setter).
3254
3255 2017-09-29  Joseph Pecoraro  <pecoraro@apple.com>
3256
3257         Web Inspector: Open Resource Dialog icons are blurry (24x24 instead of 32x32)
3258         https://bugs.webkit.org/show_bug.cgi?id=177631
3259         <rdar://problem/34729636>
3260
3261         Reviewed by Matt Baker.
3262
3263         * UserInterface/Views/OpenResourceDialog.css:
3264         (.open-resource-dialog > .tree-outline.large .item):
3265         (.open-resource-dialog > .tree-outline.large .item .icon):
3266         (.open-resource-dialog .tree-outline.large .item .titles):
3267         Make the rows large enough to fit the full 32x32 icon instead of a blurry 24x24.
3268
3269 2017-09-29  Joseph Pecoraro  <pecoraro@apple.com>
3270
3271         Web Inspector: Uncaught exception with populate find keyboard shortcut
3272         https://bugs.webkit.org/show_bug.cgi?id=177672
3273
3274         Reviewed by Matt Baker.
3275
3276         * UserInterface/Base/Main.js:
3277         The focusedContentView can be null so bail if that is the case.
3278
3279 2017-09-28  Devin Rousso  <webkit@devinrousso.com>
3280
3281         WebInspector: Uncaught Exception: TypeError: this._delegate.completionControllerCSSFunctionValuesNeeded is not a function.
3282         https://bugs.webkit.org/show_bug.cgi?id=177619
3283
3284         Reviewed by Joseph Pecoraro.
3285
3286         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3287         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
3288         Remove accidental `typeof` keyword.
3289
3290 2017-09-28  Joseph Pecoraro  <pecoraro@apple.com>
3291
3292         Web Inspector: Remove Error icon in error message for resources it looks poor
3293         https://bugs.webkit.org/show_bug.cgi?id=177613
3294
3295         Reviewed by Matt Baker.
3296
3297         * UserInterface/Views/Main.css:
3298         (.message-text-view.error::before): Deleted.
3299
3300 2017-09-28  Tim Horton  <timothy_horton@apple.com>
3301
3302         Remove constant() in favor of env()
3303         https://bugs.webkit.org/show_bug.cgi?id=177581
3304         <rdar://problem/34701321>
3305
3306         Reviewed by Dean Jackson.
3307
3308         * UserInterface/Models/CSSCompletions.js:
3309         * UserInterface/Models/CSSKeywordCompletions.js:
3310         (WI.CSSKeywordCompletions.forProperty):
3311         (WI.CSSKeywordCompletions.forFunction):
3312
3313 2017-09-27  Joseph Pecoraro  <pecoraro@apple.com>
3314
3315         Uncaught Exception: Attempted to assign to readonly property (at ContentView.js:​206:​34)​
3316         https://bugs.webkit.org/show_bug.cgi?id=177587
3317
3318         Reviewed by Matt Baker.
3319
3320         We allow a representedObject to be a string. In strict mode attempting to set
3321         a property on a string results in a TypeError. So we should be careful not to
3322         do this in the rare cases where our representedObject is the a string.
3323
3324         * UserInterface/Views/ContentView.js:
3325         (WI.ContentView.contentViewForRepresentedObject):
3326         (WI.ContentView.closedContentViewForRepresentedObject):
3327         Avoid setting a property on strings. ContentViews backed by a String aren't typically
3328         shared anyways, so the property case would not be useful. If a client really wants
3329         to share they could use `new String(...)` as the representedObject.
3330
3331 2017-09-27  Matt Baker  <mattbaker@apple.com>
3332
3333         Web Inspector: Missing checks in DebuggerSidebarPanel for DOM debugging support
3334         https://bugs.webkit.org/show_bug.cgi?id=177574
3335
3336         Reviewed by Joseph Pecoraro.
3337
3338         Check before using class members that are conditionally constructed based
3339         on DOM debugging support.
3340
3341         * UserInterface/Views/DebuggerSidebarPanel.js:
3342         (WI.DebuggerSidebarPanel.prototype.closed):
3343         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
3344
3345 2017-09-27  Matt Baker  <mattbaker@apple.com>
3346
3347         Web Inspector: Create ResourceCollectionContentView and make CollectionContentView easier to extend
3348         https://bugs.webkit.org/show_bug.cgi?id=177419
3349
3350         Reviewed by Devin Rousso.
3351
3352         CollectionContentView should be generic, work with any represented object
3353         Collection, and not perform any type checking. It should just map items
3354         to ContentViews using the provided ContentView constructor.
3355
3356         The behavior when clicking a ContentView in the collection has been extended.
3357         If selection is enabled, clicking a ContentView will cause a "selected" class
3358         to be applied to its element, and a SupplementalRepresentedObjectsDidChange
3359         event is dispatched.
3360
3361         * Localizations/en.lproj/localizedStrings.js:
3362         * UserInterface/Main.html:
3363         New file, move CollectionContentView above subclasses.
3364
3365         * UserInterface/Models/ResourceCollection.js:
3366         (WI.ResourceCollection.prototype.get resourceType):
3367         Make resource type publicly available.
3368
3369         * UserInterface/Views/CollectionContentView.js:
3370         Move type checking of the collection out of the base class and assert
3371         that ContentViews are created when invoking `contentViewConstructor`.
3372         (WI.CollectionContentView):
3373         (WI.CollectionContentView.titleForCollection):
3374         (WI.CollectionContentView.prototype.get supplementalRepresentedObjects):
3375         (WI.CollectionContentView.prototype.get selectionEnabled):
3376         (WI.CollectionContentView.prototype.set selectionEnabled):
3377         (WI.CollectionContentView.prototype.addContentViewForItem):
3378         (WI.CollectionContentView.prototype.removeContentViewForItem):
3379         (WI.CollectionContentView.prototype.contentViewAdded):
3380         (WI.CollectionContentView.prototype.contentViewRemoved):
3381         (WI.CollectionContentView.prototype.initialLayout):
3382         (WI.CollectionContentView.prototype.attached):
3383         (WI.CollectionContentView.prototype.detached):
3384         (WI.CollectionContentView.prototype._handleItemAdded):
3385         (WI.CollectionContentView.prototype._handleItemRemoved):
3386         (WI.CollectionContentView.prototype._selectItem):
3387         (WI.CollectionContentView.prototype._addContentViewForItem): Deleted.
3388         (WI.CollectionContentView.prototype._removeContentViewForItem): Deleted.
3389
3390         * UserInterface/Views/ContentView.js:
3391         (WI.ContentView.createFromRepresentedObject):
3392         Create a ResourceCollectionContentView. In the future, additional
3393         Collection types can be mapped to their associated CollectionContentView.
3394
3395         * UserInterface/Views/ResourceCollectionContentView.js: Added.
3396         New class for resource-specific logic previously in CollectionContentView.
3397         (WI.ResourceCollectionContentView):
3398         (WI.ResourceCollectionContentView.prototype.contentViewAdded):
3399         (WI.ResourceCollectionContentView.prototype._handleContentError):
3400         Remove ContentView without removing the resource from its collection.
3401
3402 2017-09-27  Ross Kirsling  <ross.kirsling@sony.com>
3403
3404         Web Inspector: Fix Layers tab sidebar popover.
3405         https://bugs.webkit.org/show_bug.cgi?id=177477
3406
3407         Reviewed by Matt Baker.
3408
3409         * UserInterface/Views/LayerDetailsSidebarPanel.js:
3410         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Added.
3411         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
3412         (WI.LayerDetailsSidebarPanel.prototype._sortDataGrid):
3413         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
3414         (WI.LayerDetailsSidebarPanel.prototype._dataGridFocused):
3415         (WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred):
3416         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Refactored.
3417         (WI.LayerDetailsSidebarPanel.prototype._presentPopover):
3418         (WI.LayerDetailsSidebarPanel.prototype._dataGridClicked): Deleted -- not actually desired behavior.
3419         (WI.LayerDetailsSidebarPanel.prototype._updatePopoverForSelectedNode): Deleted -- code simplification.
3420         (WI.LayerDetailsSidebarPanel.prototype._hidePopover): Deleted -- no longer needed.
3421
3422 2017-09-27  Fujii Hironori  <Hironori.Fujii@sony.com>
3423
3424         [GTK] Web Inspector: Add Canvas2D.svg and Canvas3D.svg
3425         https://bugs.webkit.org/show_bug.cgi?id=175364
3426
3427         Reviewed by Carlos Garcia Campos.
3428
3429         Add more free icons.
3430
3431         * UserInterface/Images/gtk/Canvas2D.svg: Copied from Source/WebInspectorUI/UserInterface/Images/gtk/Canvas.svg.
3432         * UserInterface/Images/gtk/Canvas3D.svg: Added.
3433
3434 2017-09-26  Nikita Vasilyev  <nvasilyev@apple.com>
3435
3436         Web Inspector: Styles Redesign: Style unused, overridden, and invalid properties differently
3437         https://bugs.webkit.org/show_bug.cgi?id=177461
3438
3439         Reviewed by Matt Baker.
3440
3441         Style properties the same way as in the current styles sidebar with two minor changes:
3442         - Commented out properties are never strikethrough.
3443         - Non-inherited properties of inherited rules are no longer strikethrough (but still semi-transparent).
3444
3445         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3446         (.spreadsheet-style-declaration-editor .property:matches(.invalid, .other-vendor, .overridden):not(.disabled)):
3447         Use the same styles as in the old sidebar, with exception of `-webkit-text-stroke-width: 0.000000000000001px`
3448         hack, which was replaced by -webkit-text-decoration-color.
3449
3450         (.spreadsheet-style-declaration-editor .property.invalid:not(.disabled)):
3451         (.spreadsheet-style-declaration-editor .property.not-inherited):
3452         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3453         (WI.SpreadsheetStyleProperty):
3454         (WI.SpreadsheetStyleProperty.prototype._update):
3455
3456 2017-09-26  Joseph Pecoraro  <pecoraro@apple.com>
3457
3458         Web Inspector: Improve Table scrolling performance
3459         https://bugs.webkit.org/show_bug.cgi?id=177468
3460
3461         Reviewed by Brian Burg.
3462
3463         This reduces work during scrolling updates in two ways.
3464
3465         1. Avoid recalculating the width/height of the Table on scroll.
3466           - We only need to recalculate sizes if the view changes size.
3467         2. Avoid resetting sizes on all cells if the sizes did not change.
3468           - Enumerating and setting style.width values was showing up in profiles.
3469
3470         * UserInterface/Views/Table.js:
3471         (WI.Table):
3472         New member variables for a cached width/height of the scrollable region.
3473         _cachedWidth is the same as _cachedScrollableHeight but they could be
3474         different so I just kept them separate for now. Also switch to
3475         getBoundingClientRect which gets us a better value then
3476         offsetWidth/offsetHeight.
3477
3478         (WI.Table.prototype.resize):
3479         Clear cached size and relayout.
3480
3481         (WI.Table.prototype.layout):
3482         If we did not resize, layout without recalculating sizes.
3483
3484         (WI.Table.prototype.resizerDragging):
3485         (WI.Table.prototype._getOrCreateRow):
3486         When column widths change increment the width generation. This will let
3487         us quickly check if a row's cells are appropriately sized or not.
3488
3489         (WI.Table.prototype._resizeColumnsAndFiller):
3490         Cache width values after recalculating. Provide a fast path if values
3491         have not changed.
3492
3493         (WI.Table.prototype._updateVisibleRows):
3494         (WI.Table.prototype._updateFillerRowWithNewHeight):
3495         Factor out updating the filler row into a function.
3496         
3497         (WI.Table.prototype._applyColumnWidths):
3498         Always update the width generation of a row after setting its cell widths.
3499
3500         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
3501         Fast path only updates row cell widths if they need to change.
3502
3503 2017-09-25  Devin Rousso  <webkit@devinrousso.com>
3504
3505         Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
3506         https://bugs.webkit.org/show_bug.cgi?id=176827
3507
3508         Reviewed by Joseph Pecoraro.
3509
3510         * UserInterface/Controllers/DOMTreeManager.js:
3511         (WI.DOMTreeManager):
3512         (WI.DOMTreeManager.prototype.setInspectedNode):
3513
3514         * UserInterface/Views/DOMTreeContentView.js:
3515         (WI.DOMTreeContentView.prototype._selectedNodeDidChange):
3516
3517 2017-09-25  Joseph Pecoraro  <pecoraro@apple.com>
3518
3519         Web Inspector: Add loading indicator next to resources in the Network Tab
3520         https://bugs.webkit.org/show_bug.cgi?id=177469
3521
3522         Reviewed by Matt Baker.
3523
3524         * UserInterface/Models/Resource.js:
3525         (WI.Resource.prototype.isLoading):
3526         Provide a useful accessor to check if the Resource is considered loading or not.
3527
3528         * UserInterface/Views/NetworkGridContentView.js:
3529         (WI.NetworkGridContentView.prototype._networkTimelineRecordAdded):
3530         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3531         (WI.ResourceTimelineDataGridNode.prototype._updateStatus):
3532         * UserInterface/Views/ResourceTreeElement.js:
3533         (WI.ResourceTreeElement.prototype._updateStatus):
3534         Switch existing code to use the new isLoading() function and make the similiar
3535         code more consistent.
3536
3537         * UserInterface/Views/NetworkTableContentView.css:
3538         (body[dir=ltr] .content-view.network .table .cell.name > .status):
3539         (body[dir=rtl] .content-view.network .table .cell.name > .status):
3540         (.content-view.network .table .cell.name > .status .indeterminate-progress-spinner):
3541         * UserInterface/Views/NetworkTableContentView.js:
3542         (WI.NetworkTableContentView.prototype._populateNameCell):
3543         Add a loading indicator to the Name column in the Network tab.
3544         It is sized the same as the loading indicator in the Resource tab.
3545
3546 2017-09-25  Ross Kirsling  <ross.kirsling@sony.com>
3547
3548         Web Inspector: Elements tab's Layers sidebar should disappear when Layers tab is present.
3549         https://bugs.webkit.org/show_bug.cgi?id=177476
3550
3551         Reviewed by Devin Rousso.
3552
3553         * UserInterface/Views/ElementsTabContentView.js:
3554         (WI.ElementsTabContentView):
3555
3556 2017-09-25  Devin Rousso  <webkit@devinrousso.com>
3557
3558         Web Inspector: Add autocompletion suggestions for CSS attr based on the selected element's attributes
3559         https://bugs.webkit.org/show_bug.cgi?id=177346
3560
3561         Reviewed by Joseph Pecoraro.
3562
3563         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3564         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
3565         Provide a way for delegates to add completion items for CSS functions based on the name of
3566         the function.
3567
3568         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3569         (WI.CSSStyleDeclarationTextEditor.prototype.completionControllerCSSFunctionValuesNeeded):
3570         If the function name is "attr", also return a list of the names of all the selected node's
3571         attributes.
3572
3573 2017-09-25  Joseph Pecoraro  <pecoraro@apple.com>
3574
3575         Unreviewed follow-up to r222470.
3576
3577         * UserInterface/Main.html:
3578         Remove reference to css file that doesn't exist yet.
3579
3580 2017-09-22  Joseph Pecoraro  <pecoraro@apple.com>
3581
3582         Web Inspector: Include a table in New Network Tab
3583         https://bugs.webkit.org/show_bug.cgi?id=177206
3584
3585         Reviewed by Matt Baker and Brian Burg.
3586
3587         This includes an initial implementation of the NetworkTableContentView,
3588         and a generic Table / TableColumn implementation ported from DataGrid.
3589
3590         * Localizations/en.lproj/localizedStrings.js:
3591         * UserInterface/Main.html:
3592         New strings and files.
3593
3594         * UserInterface/Views/NetworkGridContentView.css:
3595         (.content-view:matches(.network, .network-grid) > .data-grid .cache-type):
3596         (.cache-type): Deleted.
3597         * UserInterface/Views/ResourceDetailsSidebarPanel.css:
3598         (.sidebar > .panel.resource-details .cache-type):
3599         Make the .cache-type selector more specific for the legacy cases.
3600
3601         * UserInterface/Views/NetworkTabContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css.
3602         (.content-view.network > .content-browser):
3603         * UserInterface/Views/NetworkTabContentView.js:
3604         (WI.NetworkTabContentView.prototype.shown):
3605         (WI.NetworkTabContentView.prototype.hidden):
3606         (WI.NetworkTabContentView.prototype.closed):
3607         NetworkTabContentView has a ContentBrowser so it should be passing
3608         ContentBrowser lifecycle events (shown, hidden, closed) through to
3609         the sub-content browser.
3610
3611         * UserInterface/Views/TableColumn.js: Added.
3612         (WI.TableColumn.prototype.get identifier):
3613         (WI.TableColumn.prototype.get name):
3614         (WI.TableColumn.prototype.get width):
3615         (WI.TableColumn.prototype.get minWidth):
3616         (WI.TableColumn.prototype.get maxWidth):
3617         (WI.TableColumn.prototype.get hidden):
3618         (WI.TableColumn.prototype.get defaultHidden):
3619         (WI.TableColumn.prototype.get sortable):
3620         (WI.TableColumn.prototype.get align):
3621         (WI.TableColumn.prototype.get locked):
3622         (WI.TableColumn.prototype.get flexible):
3623         (WI.TableColumn.prototype.setWidth):
3624         (WI.TableColumn.prototype.setHidden):
3625         Model object for a column. Values are getter only. Columns may express
3626         size constraints (min width / max width) that are respected as much as
3627         possible. When a column is resized it dispatches an event.
3628
3629         * UserInterface/Views/Table.js: Added.
3630         (WI.Table):
3631         (WI.Table.prototype.get element):
3632         (WI.Table.prototype.get identifier):
3633         (WI.Table.prototype.get dataSource):
3634         (WI.Table.prototype.get delegate):
3635         (WI.Table.prototype.get rowHeight):
3636         (WI.Table.prototype.get selectedRow):
3637         (WI.Table.prototype.get sortOrder):
3638         (WI.Table.prototype.set sortOrder):
3639         (WI.Table.prototype.get sortColumnIdentifier):
3640         (WI.Table.prototype.set sortColumnIdentifier):
3641         (WI.Table.prototype.resize):
3642         (WI.Table.prototype.reloadData):
3643         (WI.Table.prototype.reloadDataAddedToEndOnly):
3644         (WI.Table.prototype.reloadRow):
3645         (WI.Table.prototype.reloadCell):
3646         (WI.Table.prototype.selectRow):
3647         (WI.Table.prototype.clearSelectedRow):
3648         (WI.Table.prototype.columnWithIdentifier):
3649         (WI.Table.prototype.addColumn):
3650         (WI.Table.prototype.showColumn):
3651         (WI.Table.prototype.hideColumn):
3652         (WI.Table.prototype.restoreScrollPosition):
3653         (WI.Table.prototype.initialLayout):
3654         (WI.Table.prototype.layout):
3655         (WI.Table.prototype.resizerDragStarted):
3656         (WI.Table.prototype.resizerDragging.growableSize):
3657         (WI.Table.prototype.resizerDragging.shrinkableSize):
3658         (WI.Table.prototype.resizerDragging.canGrow):
3659         (WI.Table.prototype.resizerDragging.canShrink):
3660         (WI.Table.prototype.resizerDragging.columnToResize):
3661         (WI.Table.prototype.resizerDragging):
3662         (WI.Table.prototype.resizerDragEnded):
3663         (WI.Table.prototype._needsLayout):
3664         (WI.Table.prototype._createHeaderCell):
3665         (WI.Table.prototype._createFillerCell):
3666         (WI.Table.prototype._createCell):
3667         (WI.Table.prototype._getOrCreateRow):
3668         (WI.Table.prototype._populatedCellForColumnAndRow):
3669         (WI.Table.prototype._populateRow):
3670         (WI.Table.prototype._resizeColumnsAndFiller.distributeRemainingPixels):
3671         (WI.Table.prototype._resizeColumnsAndFiller.bestFit):
3672         (WI.Table.prototype._resizeColumnsAndFiller):
3673         (WI.Table.prototype._updateVisibleRows):
3674         (WI.Table.prototype._applyColumnWidths):
3675         (WI.Table.prototype._positionResizerElements):
3676         (WI.Table.prototype._isRowVisible):
3677         (WI.Table.prototype._indexToInsertColumn):
3678         (WI.Table.prototype._handleScroll):
3679         (WI.Table.prototype._handleKeyDown):
3680         (WI.Table.prototype._handleClick):
3681         (WI.Table.prototype._handleContextMenu):
3682         (WI.Table.prototype._handleHeaderCellClicked):
3683         (WI.Table.prototype._handleHeaderContextMenu):
3684         Table is mostly a re-implementation of DataGrid. Much of its functionality
3685         was a direct copy that was then modified and simplified for a smaller
3686         and simpler feature set.
3687         
3688         Table behaves more like Cocoa's NSTableView. A datasource supplies the
3689         number of rows, which Table uses to resize appropriately. A delegate is
3690         then called to populate cells in a row when they become visible. Table
3691         does minimal caching, and in the event of data source changes
3692         (resorting, adding rows, modifying rows, etc) the visible rows are
3693         simply recreated from scratch. Clients should therefore make generating
3694         a cell's contents as simple and performant as possible.
3695
3696         Unlike DataGrid, rows are just an <li> with a bunch of cells. Since the
3697         number of rows are limited to (roughly) those that are visible, most
3698         operations, like resizing, creates / modifies each of the visible cells.
3699
3700         Finally, Table's resizing operations behave more like flexible content
3701         than DataGrid's neighbor only approach. This makes resizing the table
3702         generally easier to do, but may need refinement to decide which columns
3703         we would prefer to distribute columns during resizing.
3704
3705         * UserInterface/Views/Table.css: Added.
3706         (.table):
3707         (.table > .header):
3708         (.table > .header > .sortable:active):
3709         (.table > .header > :matches(.sort-ascending, .sort-descending)):
3710         (.table > .header > :matches(.sort-ascending, .sort-descending)::after):
3711         (body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)):
3712         (body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)):
3713         (body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)::after):
3714         (body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)::after):
3715         (.table > .header > .sort-ascending::after):
3716         (.table > .header > .sort-descending::after):
3717         (.table > .data-container):
3718         (.table > .data-container.not-scrollable):
3719         (.table > .data-container > .data-list):
3720         (.table > .data-container > .data-list.odd-first-zebra-stripe):
3721         (.table > .data-container > .data-list > li):
3722         (.table > .data-container > .data-list > li.selected):
3723         (.table:focus > .data-container > .data-list li.selected):
3724         (.table .cell):
3725         (body[dir=ltr] .table .cell:not(:last-child)):
3726         (body[dir=rtl] .table .cell:not(:last-child)):
3727         (body[dir=ltr] .table .cell:first-child):
3728         (body[dir=rtl] .table .cell:first-child):
3729         (.table :not(.header) .cell:first-of-type):
3730         (.table .cell.align-right):
3731         (.table .cell.align-left):
3732         (.table .cell.align-center):
3733         Styles mostly taken from DataGrid with a few minor tweaks.
3734
3735         * UserInterface/Views/NetworkTableContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css.
3736         (.content-view.network .table .icon):
3737         (body[dir=ltr] .content-view.network .table .icon):
3738         (body[dir=rtl] .content-view.network .table .icon):
3739         (.content-view.network .table li:not(.filler) .cell.name):
3740         (.content-view.network .table .cache-type):
3741         (.content-view.network .table .error):
3742         * UserInterface/Views/NetworkTableContentView.js:
3743         (WI.NetworkTableContentView):
3744         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
3745         (WI.NetworkTableContentView.prototype.get navigationItems):
3746         (WI.NetworkTableContentView.prototype.shown):
3747         (WI.NetworkTableContentView.prototype.closed):
3748         (WI.NetworkTableContentView.prototype.reset):
3749         (WI.NetworkTableContentView.prototype.tableNumberOfRows):
3750         (WI.NetworkTableContentView.prototype.tableSortChanged):
3751         (WI.NetworkTableContentView.prototype.tableCellClicked):
3752         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
3753         (WI.NetworkTableContentView.prototype.tableSelectedRowChanged):
3754         (WI.NetworkTableContentView.prototype.tablePopulateCell):
3755         (WI.NetworkTableContentView.prototype._populateNameCell):
3756         (WI.NetworkTableContentView.prototype._populateTransferSizeCell):
3757         (WI.NetworkTableContentView.prototype._generateSortComparator):
3758         (WI.NetworkTableContentView.prototype.initialLayout):
3759         (WI.NetworkTableContentView.prototype.layout):
3760         (WI.NetworkTableContentView.prototype._processPendingEntries):
3761         (WI.NetworkTableContentView.prototype._rowIndexForResource):
3762         (WI.NetworkTableContentView.prototype._updateEntryForResource):
3763         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
3764         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
3765         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
3766         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
3767         (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
3768         (WI.NetworkTableContentView.prototype._isDefaultSort):
3769         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
3770         (WI.NetworkTableContentView.prototype._displayType):
3771         (WI.NetworkTableContentView.prototype._entryForResource):
3772         (WI.NetworkTableContentView.prototype._passFilter):
3773         (WI.NetworkTableContentView.prototype._updateSortAndFilteredEntries):
3774         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
3775         (WI.NetworkTableContentView.prototype._generateTypeFilter):
3776         (WI.NetworkTableContentView.prototype._areFilterListsIdentical):
3777         (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
3778         (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
3779         The NetworkTableContentView has a Table and it is the table's data source
3780         and delegate. It contains a complete list of entries, and a filtered list
3781         of entries, which is the backing list of rows for the table. As entries
3782         are created, updated, or filters modified, this generally modifies
3783         entries, sorts, filters, and reloads the table. As much as possible it
3784         batches operations in the usual layout loop.
3785
3786 2017-09-24  Joseph Pecoraro  <pecoraro@apple.com>
3787
3788         Web Inspector: Reduce work during resizing
3789         https://bugs.webkit.org/show_bug.cgi?id=177402
3790
3791         Reviewed by Matt Baker.
3792
3793         * UserInterface/Views/ConsolePrompt.js:
3794         (WI.ConsolePrompt.prototype.layout):
3795         In the most common case there is no text so avoid doing work in CodeMirror.
3796
3797 2017-09-22  Matt Baker  <mattbaker@apple.com>
3798
3799         Web Inspector: Remove SidebarPanel show/hide and added/removed
3800         https://bugs.webkit.org/show_bug.cgi?id=177387
3801
3802         Reviewed by Devin Rousso.
3803
3804         * UserInterface/Views/DebuggerTabContentView.js:
3805         (WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels):
3806         * UserInterface/Views/SearchSidebarPanel.js:
3807         (WI.SearchSidebarPanel.prototype.focusSearchField):
3808         * UserInterface/Views/Sidebar.js:
3809         (WI.Sidebar.prototype.insertSidebarPanel):
3810         (WI.Sidebar.prototype.removeSidebarPanel):
3811         * UserInterface/Views/SidebarPanel.js:
3812         (WI.SidebarPanel.prototype.show): Deleted.
3813         (WI.SidebarPanel.prototype.hide): Deleted.
3814         (WI.SidebarPanel.prototype.added): Deleted.
3815         (WI.SidebarPanel.prototype.removed): Deleted.
3816
3817 2017-09-22  Matt Baker  <mattbaker@apple.com>
3818
3819         Web Inspector: View should automatically layout when it becomes attached to the DOM
3820         https://bugs.webkit.org/show_bug.cgi?id=177189
3821
3822         Reviewed by Devin Rousso.
3823
3824         This guarantees that a layout is always scheduled as soon as a view is
3825         attached to the DOM. Now that nearly all views are created lazily, it
3826         is safe to make this change even without having a visibility concept in
3827         the View class that would prevent layouts for background views.
3828
3829         * UserInterface/Views/View.js:
3830         (WI.View):
3831         Remove `this._needsLayoutWhenAttachedToRoot` flag, which is now implicit.
3832         This was set if a layout was requested before the view had been attached
3833         to the DOM.
3834
3835         (WI.View.prototype.get element):
3836         (WI.View.prototype.get layoutPending):
3837         (WI.View.prototype.get parentView):
3838         (WI.View.prototype.get subviews):
3839         (WI.View.prototype.get isAttached):
3840         (WI.View.prototype.insertSubviewBefore):
3841         (WI.View.prototype.removeSubview):
3842         (WI.View.prototype.removeAllSubviews):
3843         (WI.View.prototype.attached):
3844         (WI.View.prototype.detached):
3845         Hooks for subclasses to define behavior added or removed from the DOM.
3846         (WI.View.prototype._didMoveToParent):
3847         (WI.View.prototype._didMoveToWindow):
3848         (WI.View._scheduleLayoutForView):
3849         (WI.View.prototype.didMoveToWindow): Deleted.
3850         (WI.View.prototype.didMoveToParent): Deleted.
3851         These were only used by View, and have been made private.
3852
3853 2017-09-22  Nikita Vasilyev  <nvasilyev@apple.com>
3854
3855         Web Inspector:&nb