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