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