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