d052d3f177850c51c8a6a666680702f9150aa2ae
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-04-26  Jer Noble  <jer.noble@apple.com>
2
3         WK_COCOA_TOUCH all the things.
4         https://bugs.webkit.org/show_bug.cgi?id=185006
5
6         Reviewed by Tim Horton.
7
8         * Configurations/WebInspectorUIFramework.xcconfig:
9
10 2018-04-21  Nikita Vasilyev  <nvasilyev@apple.com>
11
12         REGRESSION(r214076): Web Inspector: Timelines load and DOMContentLoaded markers aren't visible
13         https://bugs.webkit.org/show_bug.cgi?id=184858
14
15         Reviewed by Brian Burg.
16
17         r214076 changed the color of all markers to light gray.
18
19         * UserInterface/Views/TimelineRuler.css:
20         (.timeline-ruler > .markers > .marker):
21         (body[dir=ltr] .timeline-ruler > .markers > .marker):
22         (body[dir=rtl] .timeline-ruler > .markers > .marker):
23         (.timeline-ruler > .markers > .marker.current-time):
24         (.timeline-ruler > .markers > .marker.load-event):
25         (.timeline-ruler > .markers > .marker.dom-content-event):
26         (.timeline-ruler > .markers > .marker.timestamp):
27         (body[dir=ltr] .timeline-ruler > .markers > .marker.current-time): Deleted.
28         (body[dir=rtl] .timeline-ruler > .markers > .marker.current-time): Deleted.
29
30 2018-04-19  Chris Dumez  <cdumez@apple.com>
31
32         Rename JSDOMWindowProxy to JSWindowProxy
33         https://bugs.webkit.org/show_bug.cgi?id=184797
34
35         Reviewed by Sam Weinig.
36
37         Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
38
39         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
40         (HeapSnapshot.prototype._isNodeGlobalObject):
41
42 2018-04-19  David Kilzer  <ddkilzer@apple.com>
43
44         Enable Objective-C weak references
45         <https://webkit.org/b/184789>
46         <rdar://problem/39571716>
47
48         Reviewed by Dan Bernstein.
49
50         * Configurations/Base.xcconfig:
51         (CLANG_ENABLE_OBJC_WEAK): Enable.
52
53 2018-04-16  Nikita Vasilyev  <nvasilyev@apple.com>
54
55         Web Inspector: Can't select and copy text from Network tab popover
56         https://bugs.webkit.org/show_bug.cgi?id=184606
57
58         Reviewed by Matt Baker.
59
60         * UserInterface/Views/ResourceTimingBreakdownView.css:
61         (.waterfall-popover .resource-timing-breakdown):
62
63 2018-04-12  Nikita Vasilyev  <nvasilyev@apple.com>
64
65         Web Inspector: Refactoring: move popover styles from JS to CSS
66         https://bugs.webkit.org/show_bug.cgi?id=184558
67
68         Reviewed by Brian Burg.
69
70         Introduce several CSS variables to customize popover appearance in CSS
71         and not JavaScript.
72
73         * UserInterface/Views/NetworkTableContentView.js:
74         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
75         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
76         * UserInterface/Views/Popover.css:
77         (.popover):
78         * UserInterface/Views/Popover.js:
79         (WI.Popover):
80         (WI.Popover.prototype._drawBackground):
81         Replace `var` with `let`.
82
83         (WI.Popover.prototype.get backgroundStyle): Deleted.
84         (WI.Popover.prototype.set backgroundStyle): Deleted.
85         * UserInterface/Views/ResourceTimingBreakdownView.css:
86         (.popover.waterfall-popover):
87         (.waterfall-popover-content .resource-timing-breakdown):
88         (.waterfall-popover .resource-timing-breakdown): Deleted.
89
90         * UserInterface/Views/NetworkTableContentView.js:
91         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
92         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
93         * UserInterface/Views/Popover.css:
94         (.popover):
95         * UserInterface/Views/Popover.js:
96         (WI.Popover):
97         (WI.Popover.prototype._drawBackground):
98         * UserInterface/Views/ResourceTimingBreakdownView.css:
99         (.popover.waterfall-popover):
100         (.waterfall-popover-content .resource-timing-breakdown):
101
102 2018-04-07  Nikita Vasilyev  <nvasilyev@apple.com>
103
104         Web Inspector: Errors glyph doesn't fully change to blue when active
105         https://bugs.webkit.org/show_bug.cgi?id=184389
106
107         Reviewed by Joseph Pecoraro.
108
109         The dot of the exclamation mark was always black.
110
111         * UserInterface/Images/Errors.svg:
112
113 2018-04-03  Aaron Chu  <aaron_chu@apple.com>
114
115         AX: Add Experimental setting for Accessibility Audit
116         https://bugs.webkit.org/show_bug.cgi?id=183646
117         <rdar://problem/38478583>
118
119         Reviewed by Brian Burg.
120
121         Added experimental feature flag for Accessibility Audit work.
122
123         * Localizations/en.lproj/localizedStrings.js:
124         * UserInterface/Base/Setting.js:
125         * UserInterface/Views/SettingsTabContentView.js:
126         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
127
128 2018-04-01  Matt Baker  <mattbaker@apple.com>
129
130         Web Inspector: Remove dead TabBrowser/TabContentView code
131         https://bugs.webkit.org/show_bug.cgi?id=184104
132
133         Reviewed by Devin Rousso.
134
135         * UserInterface/Base/Main.js:
136         (WI._tryToRestorePendingTabs):
137         * UserInterface/Views/NewTabContentView.js:
138         (WI.NewTabContentView.prototype.shown):
139         (WI.NewTabContentView.prototype.hidden):
140         * UserInterface/Views/TabBrowser.js:
141         (WI.TabBrowser.prototype.addTabForContentView):
142         (WI.TabBrowser.prototype.showTabForContentView):
143         (WI.TabBrowser._tabBarItemRemoved):
144         * UserInterface/Views/TabContentView.js:
145         (WI.TabContentView.prototype.get parentTabBrowser): Deleted.
146         (WI.TabContentView.prototype.set parentTabBrowser): Deleted.
147
148 2018-03-30  Devin Rousso  <webkit@devinrousso.com>
149
150         Web Inspector: tint all pixels drawn by shader program when hovering ShaderProgramTreeElement
151         https://bugs.webkit.org/show_bug.cgi?id=175223
152
153         Reviewed by Matt Baker.
154
155         * UserInterface/Models/ShaderProgram.js:
156         (WI.ShaderProgram):
157         (WI.ShaderProgram.prototype.showHighlight):
158         (WI.ShaderProgram.prototype.hideHighlight):
159
160         * UserInterface/Views/ShaderProgramTreeElement.js:
161         (WI.ShaderProgramTreeElement.prototype.onattach):
162         (WI.ShaderProgramTreeElement.prototype._handleMouseOver):
163         (WI.ShaderProgramTreeElement.prototype._handleMouseOut):
164         Whenever a ShaderProgramTreeElement is hovered, highlight the corresponding shader program
165         by tinting the pixels it draws via a blend.
166
167 2018-03-27  Timothy Hatcher  <timothy@apple.com>
168
169         Web Inspector: Modernize some utility functions
170         https://bugs.webkit.org/show_bug.cgi?id=184047
171
172         Reviewed by Matt Baker.
173
174         * UserInterface/Base/Utilities.js:
175         (Node.prototype.enclosingNodeOrSelfWithClass): Use parentElement instead of parentNode, so we don't need to check for document.
176         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Ditto. Also just toUpperCase input, since nodeName is already upper case.
177         (String.prototype.escapeCharacters): Use Set and string iteration instead of indexOf and charAt.
178
179 2018-03-27  Nikita Vasilyev  <nvasilyev@apple.com>
180
181         Web Inspector: Command-Shift-left/right arrow keys should not switch tabs when focused on color picker text fields
182         https://bugs.webkit.org/show_bug.cgi?id=184028
183
184         Reviewed by Timothy Hatcher.
185
186         * UserInterface/Views/EditingSupport.js:
187         (WI.isEventTargetAnEditableField):
188         Detect <input type="number"> as an editable text field.
189
190 2018-03-23  Nikita Vasilyev  <nvasilyev@apple.com>
191
192         Web Inspector: Styles: don't show checkboxes for invalid properties
193         https://bugs.webkit.org/show_bug.cgi?id=183951
194         <rdar://problem/38807602>
195
196         Reviewed by Matt Baker.
197
198         Since toggling of invalid properties isn't supported by the backend, don't show checkboxes for invalid properties.
199
200         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
201         (.spreadsheet-css-declaration:matches(:hover, :focus) .property:not(:matches(.invalid-name, .invalid-value)) .property-toggle,):
202         (.spreadsheet-css-declaration:matches(:hover, :focus) .property-toggle,): Deleted.
203         Don't show checkboxes for invalid properties but still show them for duplicate properties.
204
205 2018-03-23  Brian Burg  <bburg@apple.com>
206
207         Web Inspector: add WebKitAdditions hooks for WebInspectorUI
208         https://bugs.webkit.org/show_bug.cgi?id=183940
209         <rdar://problem/38796310>
210
211         Reviewed by Timothy Hatcher.
212
213         * Scripts/combine-resources.pl:
214         (debugLog): Added. Leave in the logging I used to debug this.
215
216         (concatenateIncludedFilesMatchingPattern):
217         (stripIncludedFilesMatchingPattern):
218         (concatenateFiles): Deleted.
219         This function tried to do too many things. Split it into
220         two functions, one for stripping includes and one for concatenating
221         files referenced by includes.
222
223         Lastly, add a negative lookahead clause for 'WebKitAdditions' so includes
224         containing that string are not combined when no input directory is passed
225         to the script.
226
227         * Scripts/copy-user-interface-resources.pl:
228         WebKitAdditions is computed either from BUILT_PRODUCTS_DIR or SDKROOT,
229         depending on the build style. Just try them in order and use the first
230         one that exists. WebInspectorUI files are in their own directory, so
231         we can assume there are files to process if that directory exists.
232
233         Copy Main.html to derived sources before doing any processing on it.
234         This makes all combining phases have the same --input-html argument.
235
236         (debugLog): Added. Leave in the logging I used to debug this.
237
238         (combineOrStripResourcesForWebKitAdditions):
239         (stripResourcesForWebKitAdditions):
240         (combineResourcesForWebKitAdditions):
241         Determine if WebKitAdditions exists and whether there are any
242         resources for WebInspectorUI present that need to be processed.
243
244         * UserInterface/Main.html:
245         Add stub .js and .css WebKitAdditions files. We can add more later
246         if it makes sense but this is good enough to validate the build machinery.
247
248 2018-03-23  Nikita Vasilyev  <nvasilyev@apple.com>
249
250         Web Inspector: Styles Redesign: flashing when switching between nodes
251         https://bugs.webkit.org/show_bug.cgi?id=179291
252         <rdar://problem/35352660>
253
254         Reviewed by Matt Baker.
255
256         Flashing was happening because the layout was a two-step process:
257         1. Append empty sections.
258         2. Layout everything inside of the section on requestAnimationFrame.
259
260         SpreadsheetRulesStyleDetailsPanel was converted to use layout method,
261         so both steps happen on requestAnimationFrame.
262
263         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
264         (WI.SpreadsheetRulesStyleDetailsPanel):
265         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
266         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
267         The removed lines from the refresh method moved to the layout method without any changes.
268
269 2018-03-22  Nikita Vasilyev  <nvasilyev@apple.com>
270
271         Uncaught Exception: TypeError: this._textEditor.toggleUnexecutedCodeHighlights().then is not a function
272         https://bugs.webkit.org/show_bug.cgi?id=181912
273         <rdar://problem/36700022>
274
275         Reviewed by Matt Baker.
276
277         The uncaught exception was caused by returning `false` instead of a promise object.
278         This patch only fixes the exception. Further enhancements should be done in <https://webkit.org/b/183887>.
279
280         * UserInterface/Views/SourceCodeTextEditor.js:
281         (WI.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
282         (WI.SourceCodeTextEditor.prototype.toggleUnexecutedCodeHighlights):
283
284 2018-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
285
286         Web Inspector: Styles: Loses focus when editing a property while page is being loaded
287         https://bugs.webkit.org/show_bug.cgi?id=182619
288         <rdar://problem/37363185>
289
290         Reviewed by Matt Baker.
291
292         Adding or removing a stylesheet causes SpreadsheetRulesStyleDetailsPanel to refresh, triggering a layout
293         of all SpreadsheetCSSStyleDeclarationSection child views. This resets the focus, selection, and
294         auto-completion state.
295
296         This patch prevents SpreadsheetCSSStyleDeclarationSection from performing a layout when a property is being edited.
297
298         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
299         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
300         Allow re-layout after creating a blank CSS property and pasting CSS code.
301         - _pendingAddBlankPropertyIndexOffset is a number after pasting CSS rules.
302         - _propertyPendingStartEditing is a property model after creating a new property.
303
304 2018-03-20  Devin Rousso  <webkit@devinrousso.com>
305
306         Web Inspector: Session dividers are not added when Console tab is not visible
307         https://bugs.webkit.org/show_bug.cgi?id=168622
308
309         Reviewed by Matt Baker.
310
311         Restructure `_pendingMessages` to be a `Map [ConsoleSession, ConsoleMessageView]`. Instead
312         of rendering to the `_currentConsoleGroup`, we now render to the saved `ConsoleSession`.
313         Also ensure that `_pendingMessages` is cleared when navigating and "Preserve Log" is off.
314
315         * UserInterface/Controllers/JavaScriptLogViewController.js:
316         (WI.JavaScriptLogViewController):
317         (WI.JavaScriptLogViewController.prototype.startNewSession):
318         (WI.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
319         (WI.JavaScriptLogViewController.prototype._appendConsoleMessageView):
320         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
321         (WI.JavaScriptLogViewController.prototype.get prompt): Deleted.
322         (WI.JavaScriptLogViewController.prototype.get currentConsoleGroup): Deleted.
323
324 2018-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
325
326         Web Inspector: Can't add a new class by editing class attribute in DOM outline
327         https://bugs.webkit.org/show_bug.cgi?id=180890
328
329         Reviewed by Ryosuke Niwa.
330
331         Typing "my-foo my-bar" creates a single "my-foo\xA0my-bar" class name because
332         contentEditable-based attribute editor sometimes inserts non-breaking space characters (\xA0).
333
334         Replace all non-breaking space characters with the regular space characters when
335         commiting attribute change.
336
337         * UserInterface/Views/DOMTreeElement.js:
338
339 2018-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
340
341         Web Inspector: Elements: "Force Print Media Styles" should not persist across Web Inspector sessions
342         https://bugs.webkit.org/show_bug.cgi?id=183708
343         <rdar://problem/36452183>
344
345         Reviewed by Matt Baker.
346
347         * UserInterface/Base/Main.js:
348         (WI.loaded):
349         * UserInterface/Views/DOMTreeContentView.js:
350         (WI.DOMTreeContentView):
351         (WI.DOMTreeContentView.prototype._showPrintStylesChanged):
352         (WI.DOMTreeContentView.prototype._togglePrintStyles):
353         (WI.DOMTreeContentView.prototype._showPrintStylesSettingChanged): Deleted.
354         (WI.DOMTreeContentView.prototype._togglePrintStylesSetting): Deleted.
355
356 2018-03-14  Devin Rousso  <webkit@devinrousso.com>
357
358         Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion
359         https://bugs.webkit.org/show_bug.cgi?id=183647
360         <rdar://problem/38479187>
361
362         Reviewed by Matt Baker.
363
364         When recordings are initiated via `console.record`, we don't want to automatically show the
365         recording after it's payload is sent to the frontend. We determine whether a recording came
366         from the console by comparing the recording's associated canvas with the current value of
367         `_recordingCanvas`. Previously, when stopping a recording, we would always null the value,
368         which meant that all non-single-frame recordings (single-frame recordings are stopped by
369         the agent after the first paint or tick after an action is performed) would be categorized
370         as coming from the console, since `_recordingCanvas` would be null by the time the frontend
371         recieved the payload.
372
373         This patch changes it so that the nulling of `_recordingCanvas` in `stopRecording` is only
374         done if the agent command errors. It was already the case that `_recordingCanvas` was nulled
375         in `stopRecording`, so this patch just prevents it from being nulled too early.
376
377         * UserInterface/Controllers/CanvasManager.js:
378         (WI.CanvasManager.prototype.stopRecording):
379
380 2018-03-12  Jon Davis  <jond@apple.com>
381
382         Web Inspector: Remove redundant tooltips
383         https://bugs.webkit.org/show_bug.cgi?id=183099
384
385         Reviewed by Matt Baker.
386
387         * Localizations/en.lproj/localizedStrings.js:
388         * UserInterface/Base/Main.js:
389         (WI.contentLoaded):
390         Instantiate ConsoleDrawer so the keyboard shortcuts for FindBanner are available.
391
392         * UserInterface/Views/BreakpointTreeElement.js:
393         (WI.BreakpointTreeElement):
394         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
395
396         * UserInterface/Views/ButtonNavigationItem.js:
397         (WI.ButtonNavigationItem):
398         Only show tooltips when the button style is an image.
399
400         * UserInterface/Views/ConsoleDrawer.js:
401         (WI.ConsoleDrawer):
402         (WI.ConsoleDrawer.prototype.toggleButtonShortcutTooltip):
403         Added helper to set the toggle button keyboard shortcut tooltip.
404
405         * UserInterface/Views/DOMBreakpointTreeElement.js:
406         (WI.DOMBreakpointTreeElement):
407         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
408
409         * UserInterface/Views/DOMNodeTreeElement.js:
410         (WI.DOMNodeTreeElement):
411         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
412
413         * UserInterface/Views/FindBanner.js:
414         (WI.FindBanner):
415         * UserInterface/Views/HierarchicalPathComponent.js:
416         (WI.HierarchicalPathComponent):
417         (WI.HierarchicalPathComponent.prototype.get tooltip):
418         (WI.HierarchicalPathComponent.prototype.set tooltip):
419         (WI.HierarchicalPathComponent.prototype.get hideTooltip):
420         (WI.HierarchicalPathComponent.prototype.set hideTooltip):
421         (WI.HierarchicalPathComponent.prototype._updateElementTitleAndText):
422         Add tooltip management features to manage tooltips separately of the displayName,
423         and provide a behavior to hide tooltips while retaining the tooltip data.
424
425         * UserInterface/Views/HierarchicalPathNavigationItem.js:
426         (WI.HierarchicalPathNavigationItem.prototype.updateLayout):
427         Hide tooltips when fully visible, show tooltips for collapsed items.
428
429         * UserInterface/Views/PinnedTabBarItem.js:
430         (WI.PinnedTabBarItem.prototype.titleDidChange):
431         Set tooltips for pinned tab bar items.
432
433         * UserInterface/Views/QuickConsole.js:
434         (WI.QuickConsole):
435         Set the ConsoleDrawer toggle button tooltip after the keyboard shortcut is registered.
436
437         * UserInterface/Views/StorageTreeElement.js:
438         (WI.StorageTreeElement):
439         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
440
441         * UserInterface/Views/TabBarItem.js:
442         (WI.TabBarItem.prototype.get title):
443         (WI.TabBarItem.prototype.set title):
444         (WI.TabBarItem.prototype.titleDidChange):
445         (WI.TabBarItem):
446         Add title property management with an overridable titleDidChange handler for
447         setting tooltips when needed.
448
449         * UserInterface/Views/TimelineTreeElement.js:
450         (WI.TimelineTreeElement):
451         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
452
453         * UserInterface/Views/ToggleButtonNavigationItem.js:
454         (WI.ToggleButtonNavigationItem.prototype.set defaultToolTip):
455         Added a setter for manging the default tooltip of a toggle button.
456
457         * UserInterface/Views/XHRBreakpointTreeElement.js:
458         (WI.XHRBreakpointTreeElement):
459         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
460
461 2018-03-09  Nikita Vasilyev  <nvasilyev@apple.com>
462
463         Web Inspector: Sources: Open all resources in Sources tab instead of Resources/Debugger
464         https://bugs.webkit.org/show_bug.cgi?id=183317
465         <rdar://problem/38108455>
466
467         Reviewed by Matt Baker.
468
469         * Localizations/en.lproj/localizedStrings.js:
470         * UserInterface/Base/Main.js:
471         * UserInterface/Views/ContextMenuUtilities.js:
472         (WI.appendContextMenuItemsForURL):
473         Introduce preferredTabType option instead of listing ignoreResourcesTab, ignoreDebuggerTab, ignoreSearchTab, and ignoreNetworkTab.
474         The only correct outcome of selecting "Reveal in Sources Tab" context menu is to open Sources tab, not any other tab.
475
476         * UserInterface/Views/SourceCodeTextEditor.js:
477         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
478         * UserInterface/Views/TabBrowser.js:
479         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
480
481 2018-03-08  Nikita Vasilyev  <nvasilyev@apple.com>
482
483         Web Inspector: Sources: add SourcesTabContentView and SourceSidebarPanel classes
484         https://bugs.webkit.org/show_bug.cgi?id=183316
485         <rdar://problem/38107639>
486
487         Reviewed by Matt Baker.
488
489         Add Sources tab and sidebar panel, which are copies of the corresponding Resources classes.
490         The Sources tab is shown when it's enabled in the experimental settings. This patch doesn't
491         remove existing Resources and Debugger tabs.
492
493         * UserInterface/Base/Main.js:
494         (WI.contentLoaded):
495         * UserInterface/Main.html:
496         * UserInterface/Views/SourcesSidebarPanel.css: Added.
497         (.sidebar > .panel.navigation.sources > .content):
498         (.sidebar > .panel.navigation.sources > .navigation-bar):
499         * UserInterface/Views/SourcesSidebarPanel.js: Added.
500         (WI.SourcesSidebarPanel):
501         (WI.SourcesSidebarPanel.shouldPlaceResourcesAtTopLevel):
502         (WI.SourcesSidebarPanel.prototype.get minimumWidth):
503         (WI.SourcesSidebarPanel.prototype.closed):
504         (WI.SourcesSidebarPanel.prototype.showDefaultContentView):
505         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
506         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
507         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject):
508         (WI.SourcesSidebarPanel.prototype.initialLayout):
509         (WI.SourcesSidebarPanel.prototype.hasCustomFilters):
510         (WI.SourcesSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
511         (WI.SourcesSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
512         (WI.SourcesSidebarPanel.prototype._mainResourceDidChange):
513         (WI.SourcesSidebarPanel.prototype._mainFrameDidChange):
514         (WI.SourcesSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
515         (WI.SourcesSidebarPanel.prototype._mainFrameMainResourceDidChange):
516         (WI.SourcesSidebarPanel.prototype._scriptWasAdded):
517         (WI.SourcesSidebarPanel.prototype._addScript):
518         (WI.SourcesSidebarPanel.prototype._scriptWasRemoved):
519         (WI.SourcesSidebarPanel.prototype._scriptsCleared):
520         (WI.SourcesSidebarPanel.prototype._styleSheetAdded):
521         (WI.SourcesSidebarPanel.prototype._addTargetWithMainResource):
522         (WI.SourcesSidebarPanel.prototype._targetRemoved):
523         (WI.SourcesSidebarPanel.prototype._treeSelectionDidChange):
524         (WI.SourcesSidebarPanel.prototype._compareTreeElements):
525         (WI.SourcesSidebarPanel.prototype._extraDomainsActivated):
526         (WI.SourcesSidebarPanel.prototype._scopeBarSelectionDidChange):
527         * UserInterface/Views/SourcesTabContentView.js: Added.
528         (WI.SourcesTabContentView):
529         (WI.SourcesTabContentView.tabInfo):
530         (WI.SourcesTabContentView.isTabAllowed):
531         (WI.SourcesTabContentView.prototype.get type):
532         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
533         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
534
535 2018-03-07  Devin Rousso  <webkit@devinrousso.com>
536
537         Web Inspector: Canvas tab: ensure that the Recording TreeOutline has a specified height for virtualization
538         https://bugs.webkit.org/show_bug.cgi?id=183015
539
540         Reviewed by Matt Baker.
541
542         * UserInterface/Views/CanvasSidebarPanel.js:
543         (WI.CanvasSidebarPanel):
544
545         * UserInterface/Views/CanvasSidebarPanel.css:
546         (.sidebar > .panel.navigation.canvas > .content):
547         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
548         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
549         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
550         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar): Deleted.
551         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas): Deleted.
552
553         * UserInterface/Views/TreeElement.js:
554         (WI.TreeElement.prototype._detach):
555
556 2018-02-26  Devin Rousso  <webkit@devinrousso.com>
557
558         Web Inspector: Canvas Tab: Scroll into view / Inspect element if Canvas has DOM node
559         https://bugs.webkit.org/show_bug.cgi?id=181769
560
561         Reviewed by Matt Baker.
562
563         * Localizations/en.lproj/localizedStrings.js:
564
565         * UserInterface/Images/Markup.svg: Added.
566
567         * UserInterface/Views/CanvasContentView.js:
568         (WI.CanvasContentView):
569         (WI.CanvasContentView.prototype.initialLayout):
570         (WI.CanvasContentView.prototype._canvasElementButtonClicked):
571
572 2018-02-19  Matt Baker  <mattbaker@apple.com>
573
574         Web Inspector: Canvas tab: hide navigation sidebar when viewing the overview
575         https://bugs.webkit.org/show_bug.cgi?id=182597
576         <rdar://problem/37341564>
577
578         Reviewed by Devin Rousso.
579
580         Support showing/hiding the navigation sidebar panel based on the current
581         represented object. Individual TabContentViews can opt-in to this behavior,
582         by overriding TabContentView.prototype.managesNavigationSidebarPanel.
583
584         * UserInterface/Views/CanvasSidebarPanel.js:
585         (WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
586         * UserInterface/Views/CanvasTabContentView.js:
587         (WI.CanvasTabContentView.prototype.get managesNavigationSidebarPanel):
588         Hide the Canvas navigation sidebar when viewing the overview.
589
590         * UserInterface/Views/ContentBrowserTabContentView.js:
591         (WI.ContentBrowserTabContentView):
592         (WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
593         (WI.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
594         (WI.ContentBrowserTabContentView.prototype._contentBrowserCurrentRepresentedObjectsDidChange):
595
596         * UserInterface/Views/NavigationSidebarPanel.js:
597         (WI.NavigationSidebarPanel.prototype.canShowRepresentedObject):
598         Provide default implementation that just defers to the TabContentView.
599         This exists so that a NavigationSidebarPanel that implements canShowRepresentedObject
600         will have a meaningful default to fall back on.
601
602         * UserInterface/Views/TabBrowser.js:
603         (WI.TabBrowser.prototype._sidebarCollapsedStateDidChange):
604         (WI.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
605
606         * UserInterface/Views/TabContentView.js:
607         (WI.TabContentView.prototype.get managesNavigationSidebarPanel):
608
609 2018-02-16  Matt Baker  <mattbaker@apple.com>
610
611         Web Inspector: TabBar redesign: remove top-level search field and pin the Search tab
612         https://bugs.webkit.org/show_bug.cgi?id=182353
613         <rdar://problem/37088644>
614
615         Reviewed by Devin Rousso.
616
617         * Localizations/en.lproj/localizedStrings.js:
618
619         * UserInterface/Base/Main.js:
620         (WI.contentLoaded):
621         Create Search UI based on experimental setting. When the new TabBar is
622         enabled, the Search tab is a pinned tab. Since it is also saveable, it
623         needs to be added to the TabBrowser (the browser adds the item to the bar).
624
625         When restoring saved tabs, make an additional check to prevent a tab
626         from being added twice. This can occur now that the Search tab is pinned.
627
628         * UserInterface/Images/Search.svg:
629         Update art to better match Safari/macOS. Slightly increase the radius of
630         the lens, and shorten the length of the handle.
631
632         * UserInterface/Views/GoToLineDialog.css:
633         (.go-to-line-dialog > div::before):
634         Update styles for new Search icon.
635
636         * UserInterface/Views/LegacyTabBar.js:
637         (WI.LegacyTabBar.prototype.get saveableTabCount):
638         Backported new TabBar method which is called by TabBrowser.
639
640         * UserInterface/Views/OpenResourceDialog.css:
641         (.open-resource-dialog > .field::before):
642         Update styles for new Search icon.
643
644         * UserInterface/Views/PinnedTabBarItem.js:
645         (WI.PinnedTabBarItem.prototype.fromTabInfo):
646         Match GeneralTabBarItem.fromTabInfo.
647
648         * UserInterface/Views/SearchTabContentView.js:
649         (WI.SearchTabContentView):
650         (WI.SearchTabContentView.tabInfo):
651         New image (magnifying glass without border) when new TabBar is enabled.
652
653         * UserInterface/Views/SettingsTabContentView.js:
654         (WI.SettingsTabContentView):
655
656         * UserInterface/Views/TabBar.js:
657         (WI.TabBar):
658         Move creation of the Settings item out of TabBar. The TabBar should
659         only be concerned with managing tabs.
660
661         (WI.TabBar.prototype.get saveableTabCount):
662         (WI.TabBar.prototype._handleContextMenu):
663         (WI.TabBar.prototype.get normalNonEphemeralTabCount): Deleted.
664         Now that the Search tab is pinned, there aren't any normal tabs that
665         are also ephemeral. For the LegacyTabBar, both the Search and New Tab
666         tabs are still in this category.
667
668         * UserInterface/Views/TabBrowser.js:
669         (WI.TabBrowser.prototype.addTabForContentView):
670         (WI.TabBrowser.prototype.closeTabForContentView):
671         (WI.TabBrowser.prototype._tabBarItemSelected):
672         (WI.TabBrowser._tabBarItemRemoved):
673         Recent tab list should be validated against the list of saveable tabs,
674         since the Search tab is no longer a normal tab (a GeneralTabBarItem),
675         but is still persisted across Inspector sessions.
676
677 2018-02-16  Matt Baker  <mattbaker@apple.com>
678
679         Web Inspector: TabBar redesign: TabBarItem close button is incorrectly positioned
680         https://bugs.webkit.org/show_bug.cgi?id=182844
681         <rdar://problem/37586749>
682
683         Reviewed by Timothy Hatcher.
684
685         * UserInterface/Views/GeneralTabBarItem.js:
686         (WI.GeneralTabBarItem.prototype.set title):
687         Insert the title before the last flexible space item.
688
689         * UserInterface/Views/TabBar.css:
690         (.tab-bar > .item):
691         (.tab-bar > .item > .close):
692         (.tab-bar > .item > .flex-space):
693         (.tab-bar > .item.ephemeral > .flex-space:last-child):
694         (.tab-bar.collapsed > .item):
695         (.tab-bar.collapsed > .item > .flex-space):
696         (.tab-bar.collapsed > .item > .close):
697         (.tab-bar.collapsed > .item:hover > .close):
698         (.tab-bar.collapsed > .item.ephemeral:hover > .icon):
699         (.tab-bar > .item:hover > .close): Deleted.
700         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon): Deleted.
701
702         * UserInterface/Views/TabBarItem.js:
703         (WI.TabBarItem):
704         Restore flexible space items before and after the icon.
705
706 2018-02-14  Nikita Vasilyev  <nvasilyev@apple.com>
707
708         Web Inspector: Styles: completion popover doesn't hide when switching panels
709         https://bugs.webkit.org/show_bug.cgi?id=182464
710         <rdar://problem/37202763>
711
712         Reviewed by Timothy Hatcher.
713
714         Save the position of the anchor, an element the popover is shown for, and hide the completion popover
715         when the position changes.
716
717         * UserInterface/Views/CompletionSuggestionsView.js:
718         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves):
719         When the popover is visible, check every 200ms if the anchor moved.
720
721         (WI.CompletionSuggestionsView.prototype.hide):
722         * UserInterface/Views/SpreadsheetTextField.js:
723         (WI.SpreadsheetTextField.prototype._updateCompletions):
724         (WI.SpreadsheetTextField.prototype._getCaretRect):
725         getBoundingClientRect returns {x: 0, y: 0} when it can't determine node's position.
726         This happens when a node isn't attached to DOM, attached to DOM but not visible, and
727         a number of odd cases.
728
729 2018-02-14  Matt Baker  <mattbaker@apple.com>
730
731         Web Inspector: TabBar redesign: only show allowed tabs in the available tabs context menu
732         https://bugs.webkit.org/show_bug.cgi?id=182721
733         <rdar://problem/37479019>
734
735         Reviewed by Timothy Hatcher.
736
737         In addition to only including allowed tabs in the TabBar context menu,
738         perform a sanity check when setting the selected tab item, since the
739         serialized selection index could refer to a tab that is no longer allowed.
740
741         * UserInterface/Views/LegacyTabBar.js:
742         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
743         (WI.LegacyTabBar.prototype._handleContextMenu):
744
745         * UserInterface/Views/TabBar.js:
746         (WI.TabBar.prototype.set selectedTabBarItem):
747         (WI.TabBar.prototype._handleContextMenu):
748
749 2018-02-09  Matt Baker  <mattbaker@apple.com>
750
751         Web Inspector: Canvas tab: tree selection abruptly changes when selecting a recording frame
752         https://bugs.webkit.org/show_bug.cgi?id=182667
753         <rdar://problem/37412639>
754
755         Reviewed by Devin Rousso.
756
757         * UserInterface/Views/CanvasSidebarPanel.css:
758         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar):
759         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
760         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.recording > .icon):
761         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .icon):
762         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .status):
763         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar): Deleted.
764         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon): Deleted.
765         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon): Deleted.
766         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status): Deleted.
767         Style changes for the additional DOM element required to virtualize the recording tree outline.
768
769         * UserInterface/Views/CanvasSidebarPanel.js:
770         (WI.CanvasSidebarPanel):
771         In order to be virtualized, the tree must be the only child of its parent.
772
773         (WI.CanvasSidebarPanel.prototype.set action):
774         Ensure that a frame tree element isn't deselected when the last action
775         in the frame becomes selected in the RecordingContentView.
776
777         (WI.CanvasSidebarPanel.prototype.shown):
778         Refresh the sidebar, as represented objects may have changed while hidden.
779
780         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
781         Unset the recording when no valid represented objects are found, to
782         prevent a stale recording tree from being shown when viewing the overview.
783
784         (WI.CanvasSidebarPanel.prototype._canvasChanged):
785         (WI.CanvasSidebarPanel.prototype._recordingChanged):
786         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
787         Moved toggling of the "has-recordings" style to _canvasChanged, since
788         the navigation bar should be hidden when no canvas exists.
789
790         * UserInterface/Views/CollectionContentView.js:
791         (WI.CollectionContentView.prototype.addContentViewForItem):
792         (WI.CollectionContentView.prototype.removeContentViewForItem):
793         Drive by fixes for child view visible state.
794
795         * UserInterface/Views/TreeOutline.css:
796         (.tree-outline:not(.large):matches(:focus, .force-focus) .item.selected .status .indeterminate-progress-spinner):
797         Make spinner easier to see against the selection background color.
798
799 2018-02-09  Matt Baker  <mattbaker@apple.com>
800
801         Web Inspector: Object.shallowEqual always fails when comparing array property values
802         https://bugs.webkit.org/show_bug.cgi?id=182634
803         <rdar://problem/37374639>
804
805         Reviewed by Devin Rousso.
806
807         Object.shallowEqual should use Array.shallowEqual when comparing property
808         values, since strictly comparing objects/arrays is only true if both
809         operands reference the same Object.
810
811         * UserInterface/Base/Utilities.js:
812         (value):
813
814 2018-02-08  Matt Baker  <mattbaker@apple.com>
815
816         Web Inspector: add listing of Canvases/Programs/Recordings to the NavigationSidebar
817         https://bugs.webkit.org/show_bug.cgi?id=178744
818         <rdar://problem/35374379>
819
820         Reviewed by Devin Rousso.
821
822         * Localizations/en.lproj/localizedStrings.js:
823
824         * UserInterface/Images/Canvas2D.svg:
825         * UserInterface/Images/Canvas3D.svg:
826         * UserInterface/Images/Recording.svg:
827         Update canvas icons to be monochrome. Simplified the recording icon.
828
829         * UserInterface/Main.html:
830
831         * UserInterface/Models/RecordingAction.js:
832         (WI.RecordingAction.prototype.get state):
833         (WI.RecordingAction.prototype.set state):
834         Allow (2D) snapshot state to be associated with the action. Used by
835         RecordingActionDetailsSidebarPanel to retrieve the snapshot state.
836
837         * UserInterface/Views/CanvasContentView.css:
838         (.content-view.canvas:not(.tab)):
839         (.content-view.canvas:not(.tab) > .progress): Deleted.
840         (.content-view.canvas:not(.tab) > .progress > .frame-count): Deleted.
841
842         * UserInterface/Views/CanvasContentView.js:
843         (WI.CanvasContentView):
844         (WI.CanvasContentView.prototype.get navigationItems):
845         (WI.CanvasContentView.prototype.layout):
846         (WI.CanvasContentView.prototype.shown):
847         (WI.CanvasContentView.prototype._recordingStarted):
848         (WI.CanvasContentView.prototype._recordingProgress):
849         (WI.CanvasContentView.prototype._recordingStopped):
850         (WI.CanvasContentView.prototype._updateRecordNavigationItem):
851         (WI.CanvasContentView.prototype._updateProgressView):
852         Replace progress UI with a reusable ProgressView class.
853         When in the overview, clicking the CanvasContentView shows a dedicated
854         CanvasContentView for inspecting shaders and recordings. This behavior
855         is controlled by CollectionContentView, so we need to prevent it when
856         clicking inside the header and footer elements, which contain clickable UI.
857
858         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
859         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
860
861         * UserInterface/Views/CanvasOverviewContentView.css:
862         (.content-view.canvas-overview .content-view.canvas):
863         (.content-view.canvas-overview .content-view.canvas.is-recording):
864         (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
865         (.content-view.canvas-overview .content-view.canvas > header):
866         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
867         (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
868         (.content-view.canvas-overview .content-view.canvas:matches(:hover, .is-recording) > header > .navigation-bar):
869         (.content-view.canvas-overview .content-view.canvas.is-recording > .progress-view,):
870         (.content-view.canvas-overview .content-view.canvas.is-recording > .preview):
871         (.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)): Deleted.
872         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),): Deleted.
873         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar): Deleted.
874         (.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)): Deleted.
875         (.content-view.canvas-overview .content-view.canvas > .preview): Deleted.
876         (.content-view.canvas-overview .content-view.canvas > .progress ~ .preview): Deleted.
877         Clean up styles, and remove selection styles as canvases are no longer selectable in the overview.
878
879         * UserInterface/Views/CanvasOverviewContentView.js:
880         (WI.CanvasOverviewContentView):
881         (WI.CanvasOverviewContentView.prototype.get navigationItems):
882         (WI.CanvasOverviewContentView.prototype.attached):
883         (WI.CanvasOverviewContentView.prototype.detached):
884         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents): Deleted.
885         (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically): Deleted.
886         (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally): Deleted.
887         (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged): Deleted.
888         (WI.CanvasOverviewContentView.prototype._handleUp): Deleted.
889         (WI.CanvasOverviewContentView.prototype._handleRight): Deleted.
890         (WI.CanvasOverviewContentView.prototype._handleDown): Deleted.
891         (WI.CanvasOverviewContentView.prototype._handleLeft): Deleted.
892         (WI.CanvasOverviewContentView.prototype._handleSpace): Deleted.
893         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): Deleted.
894         Disable canvas selection. Remove logic for supplemental represented objects,
895         path components, and selection keyboard shortcuts.
896
897         * UserInterface/Views/CanvasSidebarPanel.css: Added.
898         (.sidebar > .panel.navigation.canvas > .content):
899         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled):
900         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon):
901         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.webgl .icon):
902         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
903         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas):
904         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
905         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon):
906         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.shader-program > .icon):
907         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon):
908         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status):
909
910         * UserInterface/Views/CanvasSidebarPanel.js: Added.
911         (WI.CanvasSidebarPanel):
912         (WI.CanvasSidebarPanel.prototype.get canvas):
913         (WI.CanvasSidebarPanel.prototype.set canvas):
914         (WI.CanvasSidebarPanel.prototype.set recording):
915         (WI.CanvasSidebarPanel.prototype.set action):
916         (WI.CanvasSidebarPanel.prototype.shown):
917         (WI.CanvasSidebarPanel.prototype.hidden):
918         (WI.CanvasSidebarPanel.prototype.hasCustomFilters):
919         (WI.CanvasSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
920         (WI.CanvasSidebarPanel.prototype.initialLayout):
921         (WI.CanvasSidebarPanel.prototype._recordingAdded):
922         (WI.CanvasSidebarPanel.prototype._recordingRemoved):
923         (WI.CanvasSidebarPanel.prototype._scopeBarSelectionChanged):
924         (WI.CanvasSidebarPanel.prototype._toggleRecording):
925         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
926         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
927         (WI.CanvasSidebarPanel.prototype._canvasChanged):
928         (WI.CanvasSidebarPanel.prototype._recordingChanged):
929         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
930         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
931         Add new navigation sidebar, split into two sections. The upper section
932         contains a tree with a single element for the current canvas, and child
933         elements for any shader programs. The maximum height of this section is 50%
934         of the sidebar's height. The lower section contains a tree for the selected
935         recording, and a scope bar for choosing between recordings.
936
937         * UserInterface/Views/CanvasTabContentView.css:
938         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
939         (.content-view.tab.canvas .navigation-bar > .item .canvas.canvas-2d .icon):
940         (.content-view.tab.canvas .navigation-bar > .item .canvas.webgl .icon):
941         (.content-view.tab.canvas .navigation-bar > .item .shader-program > .icon):
942         (.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon): Deleted.
943         (.content-view.tab.canvas .navigation-bar > .item .canvas .icon): Deleted.
944
945         * UserInterface/Views/CanvasTabContentView.js:
946         (WI.CanvasTabContentView):
947         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
948         (WI.CanvasTabContentView.prototype.attached):
949         (WI.CanvasTabContentView.prototype._addCanvas):
950         (WI.CanvasTabContentView.prototype._removeCanvas):
951         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
952         (WI.CanvasTabContentView.prototype._recordingAdded):
953         (WI.CanvasTabContentView.prototype._handleSpace):
954         (WI.CanvasTabContentView.prototype.showRepresentedObject): Deleted.
955         (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): Deleted.
956         (WI.CanvasTabContentView.prototype._recordingActionIndexChanged): Deleted.
957         (WI.CanvasTabContentView.prototype._updateActionIndex): Deleted.
958         The canvas tab now maintains a tree outline of all canvases, with an
959         "Overview" element as the root. The Overview element is always the first
960         item of content browser's hierarchical path.
961
962         * UserInterface/Views/CanvasTreeElement.js:
963         (WI.CanvasTreeElement.createRecordingTreeElement):
964         (WI.CanvasTreeElement):
965         (WI.CanvasTreeElement.prototype.onattach):
966         (WI.CanvasTreeElement.prototype.onpopulate):
967         (WI.CanvasTreeElement.prototype._updateStatus):
968         (WI.CanvasTreeElement.prototype.ondetach): Deleted.
969         Make it possible to not show recordings under the Canvas element.
970         Create `isRecording` status element (spinner).
971
972         * UserInterface/Views/CollectionContentView.js:
973         (WI.CollectionContentView.prototype.shown):
974         (WI.CollectionContentView.prototype.hidden):
975         Child ContentViews need to be updated when the collection's visibility changes.
976
977         * UserInterface/Views/ContentView.js:
978         (WI.ContentView.isViewable):
979
980         * UserInterface/Views/ProgressView.css: Added.
981         (.progress-view):
982         (.progress-view > .titles):
983         (.progress-view > .titles > .title):
984         (.progress-view > .titles > .subtitle):
985         (.progress-view > .titles > .subtitle::before):
986         (.progress-view > .indeterminate-progress-spinner):
987
988         * UserInterface/Views/ProgressView.js: Added.
989         (WI.ProgressView):
990         (WI.ProgressView.prototype.get title):
991         (WI.ProgressView.prototype.set title):
992         (WI.ProgressView.prototype.get subtitle):
993         (WI.ProgressView.prototype.set subtitle):
994         (WI.ProgressView.prototype.get visible):
995         (WI.ProgressView.prototype.set visible):
996         (WI.ProgressView.prototype.initialLayout):
997         (WI.ProgressView.prototype._updateTitles):
998         New view class (not a ContentView) for showing a generic progress message,
999         with a title, subtitle, and progress spinner.
1000
1001         * UserInterface/Views/RecordingContentView.css:
1002         (.content-view:not(.tab).recording > .preview-container):
1003         Remove unnecessary styles.
1004
1005         * UserInterface/Views/RecordingContentView.js:
1006         (WI.RecordingContentView):
1007         (WI.RecordingContentView.prototype.get navigationItems):
1008         (WI.RecordingContentView.prototype.get supplementalRepresentedObjects):
1009         (WI.RecordingContentView.prototype.updateActionIndex):
1010         (WI.RecordingContentView.prototype.get saveData):
1011         (WI.RecordingContentView.prototype._exportRecording):
1012         Relocate the recording export logic and UI.
1013         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
1014         (WI.RecordingContentView.prototype.async._generateContentCanvasWebGL):
1015         (WI.RecordingContentView.prototype._sliderChanged):
1016         Refactor logic for notifying the rest of the UI of changes to the action slider.
1017         The selected action is now exposed as a supplemental represented object, and a
1018         corresponding SupplementalRepresentedObjectsDidChange event.
1019
1020         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
1021         (WI.RecordingStateDetailsSidebarPanel.prototype.inspect):
1022         (WI.RecordingStateDetailsSidebarPanel.prototype.set action):
1023         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
1024         (WI.RecordingStateDetailsSidebarPanel):
1025         (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): Deleted.
1026
1027         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
1028         (WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
1029         (WI.RecordingTraceDetailsSidebarPanel.prototype.set action):
1030         (WI.RecordingTraceDetailsSidebarPanel):
1031         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): Deleted.
1032         Now that the selected action is exposed to the UI as a supplemental
1033         represented object, details sidebars can be more decoupled from the
1034         canvas tab, and be notified of changes to the selection via `inspect()`.
1035
1036         * UserInterface/Views/ResourceIcons.css:
1037         (.canvas > .icon): Deleted.
1038         (.shader-program .icon): Deleted.
1039
1040 2018-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
1041
1042         Web Inspector: Styles: Typing value and quickly moving focus away may display outdated value in UI
1043         https://bugs.webkit.org/show_bug.cgi?id=182588
1044         <rdar://problem/37332161>
1045
1046         Reviewed by Matt Baker.
1047
1048         CSSProperty models were updated with a 250ms delay. Quickly adding a blank property after modifying
1049         an existing property could result in outdated values being shown.
1050
1051         This patch removes the 250ms delay.
1052
1053         * UserInterface/Views/SpreadsheetStyleProperty.js:
1054         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):
1055
1056 2018-02-07  Matt Baker  <mattbaker@apple.com>
1057
1058         Web Inspector: replace isAncestor with Node.contains() in LegacyTabBar
1059         https://bugs.webkit.org/show_bug.cgi?id=182586
1060
1061         Reviewed by Timothy Hatcher.
1062
1063         * UserInterface/Views/LegacyTabBar.js:
1064
1065 2018-02-07  Nikita Vasilyev  <nvasilyev@apple.com>
1066
1067         Web Inspector: Styles: completion popover doesn't hide when switching panels
1068         https://bugs.webkit.org/show_bug.cgi?id=182464
1069         <rdar://problem/37202763>
1070
1071         Reviewed by Timothy Hatcher.
1072
1073         Hide completion popover by triggering blur event on the focused text field.
1074         Removing text fields from the DOM tree would hide the completion popovers as well,
1075         but switching sidebar panels doesn't remove them from the DOM.
1076
1077         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1078         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
1079         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1080         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
1081         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1082         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
1083         * UserInterface/Views/SpreadsheetStyleProperty.js:
1084         (WI.SpreadsheetStyleProperty.prototype.hidden):
1085
1086 2018-02-06  Devin Rousso  <webkit@devinrousso.com>
1087
1088         Web Inspector: Replace isAncestor and isDescendant with native DOM contains method
1089         https://bugs.webkit.org/show_bug.cgi?id=182069
1090
1091         Reviewed by Brian Burg.
1092
1093         * UserInterface/Base/Main.js:
1094         (WI.restoreFocusFromElement):
1095         (WI._mouseDown):
1096         (WI._focusedContentBrowser):
1097         (WI._focusedContentView):
1098         * UserInterface/Base/Utilities.js:
1099         (Node.prototype.traverseNextNode):
1100         (Node.prototype.isAncestor): Deleted.
1101         (Node.prototype.isDescendant): Deleted.
1102         (Node.prototype.isSelfOrAncestor): Deleted.
1103         (Node.prototype.isSelfOrDescendant): Deleted.
1104         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1105         (WI.BoxModelDetailsSectionRow.prototype._handleKeyDown):
1106         * UserInterface/Views/CSSStyleDeclarationSection.js:
1107         (WI.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
1108         * UserInterface/Views/DOMTreeOutline.js:
1109         (WI.DOMTreeOutline.prototype._onmouseout):
1110         * UserInterface/Views/DetailsSection.js:
1111         (WI.DetailsSection.prototype._headerElementClicked):
1112         * UserInterface/Views/EditingSupport.js:
1113         (WI.incrementElementValue):
1114         * UserInterface/Views/LogContentView.js:
1115         (WI.LogContentView.prototype._handleContextMenuEvent):
1116         * UserInterface/Views/ShaderProgramTreeElement.js:
1117         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown):
1118         * UserInterface/Views/SoftContextMenu.js:
1119         (WI.SoftContextMenu.prototype._menuItemMouseOut):
1120         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1121         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
1122         * UserInterface/Views/TabBar.js:
1123         (WI.TabBar.prototype.insertTabBarItem):
1124
1125 2018-02-06  Devin Rousso  <webkit@devinrousso.com>
1126
1127         Web Inspector: Elements tab should have "Jump to Layer" functionality
1128         https://bugs.webkit.org/show_bug.cgi?id=181800
1129
1130         Reviewed by Joseph Pecoraro.
1131
1132         * Localizations/en.lproj/localizedStrings.js:
1133
1134         * UserInterface/Base/Main.js:
1135         (WI.isShowingElementsTab):
1136         (WI.showLayersTab):
1137         (WI.isShowingLayersTab):
1138
1139         * UserInterface/Views/ContextMenuUtilities.js:
1140         (WI.appendContextMenuItemsForDOMNode):
1141
1142         * UserInterface/Views/LayersTabContentView.js:
1143         (WI.LayersTabContentView.prototype.selectLayerForNode):
1144
1145         * UserInterface/Views/Layers3DContentView.js:
1146         (WI.Layers3DContentView):
1147         (WI.Layers3DContentView.prototype.selectLayerForNode):
1148         (WI.Layers3DContentView.prototype.layout):
1149
1150         * UserInterface/Views/LayerDetailsSidebarPanel.js:
1151         (WI.LayerDetailsSidebarPanel):
1152         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
1153         (WI.LayerDetailsSidebarPanel.prototype._updateDataGrid):
1154
1155 2018-02-06  Nikita Vasilyev  <nvasilyev@apple.com>
1156
1157         Web Inspector: Rename String.prototype.trimEnd to avoid conflicts with native trimEnd
1158         https://bugs.webkit.org/show_bug.cgi?id=182545
1159
1160         Reviewed by Brian Burg.
1161
1162         Rename:
1163         - trimEnd to truncateEnd
1164         - trimMiddle to truncateMiddle
1165
1166         * UserInterface/Base/Utilities.js:
1167         (String.prototype.trimMiddle): Deleted.
1168         (String.prototype.trimEnd): Deleted.
1169         (String.prototype.truncateMiddle): Added.
1170         (String.prototype.truncateEnd): Added.
1171         Use strict mode. Scrict mode allows `this` to be a primitive (a string, in our case).
1172         In non-strict mode, `this` is always an object. Without the strict mode,
1173         "a".truncateEnd(42) !== "a", because truncateEnd returns a string object.
1174
1175         * UserInterface/Views/DOMTreeElement.js:
1176         (WI.DOMTreeElement.prototype._buildAttributeDOM):
1177         * UserInterface/Views/DOMTreeElementPathComponent.js:
1178         (WI.DOMTreeElementPathComponent):
1179         * UserInterface/Views/SearchResultTreeElement.js:
1180         Remove an obvious comment.
1181
1182         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
1183         * UserInterface/Views/SpreadsheetStyleProperty.js:
1184         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1185
1186 2018-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
1187
1188         Web Inspector: Add an experimental setting to enable Sources tab
1189         https://bugs.webkit.org/show_bug.cgi?id=182461
1190
1191         Reviewed by Brian Burg.
1192
1193         This patch only adds a setting. It doesn't add the Sources tab.
1194
1195         * Localizations/en.lproj/localizedStrings.js:
1196         * UserInterface/Base/Setting.js:
1197         * UserInterface/Views/SettingsTabContentView.js:
1198
1199 2018-02-02  Devin Rousso  <webkit@devinrousso.com>
1200
1201         Web Inspector: Styles Redesign: Pasting multiple properties should create properties instead of a bad property
1202         https://bugs.webkit.org/show_bug.cgi?id=179622
1203         <rdar://problem/35511170>
1204
1205         Reviewed by Matt Baker.
1206
1207         * UserInterface/Views/SpreadsheetStyleProperty.js:
1208         (WI.SpreadsheetStyleProperty.prototype._remove):
1209         (WI.SpreadsheetStyleProperty.prototype._update):
1210         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
1211         (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
1212         When the user pastes into the name field, parse the text for a list of name-value pairs and
1213         replace the property being edited with the text of those pairs.
1214
1215         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1216         (WI.SpreadsheetCSSStyleDeclarationEditor):
1217         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1218         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
1219         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
1220         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyAddBlankPropertySoon):
1221         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
1222         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
1223         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): Deleted.
1224         Calling `addBlankProperty` will trigger a layout on the next frame, but that might be before
1225         the CSSAgent has had a chance to finish refreshing, so we need a way to defer the creation
1226         of a new property until after we have finished the next layout (which is after the refresh).
1227         Drive-by: fix naming of some delegate functions.
1228
1229         * UserInterface/Models/CSSProperty.js:
1230         (WI.CSSProperty.prototype.replaceWithText):
1231         Provide a way for replacing the property with new text.
1232
1233 2018-02-02  Matt Baker  <mattbaker@apple.com>
1234
1235         Web Inspector: TabBar redesign: remove New Tab button and add experimental feature flag
1236         https://bugs.webkit.org/show_bug.cgi?id=182342
1237         <rdar://problem/37078662>
1238
1239         Reviewed by Devin Rousso.
1240
1241         This patch adds a new experimental setting group, "User Interface", with
1242         a single setting, "Enable New TabBar". When enabled, the New Tab button is
1243         no longer available in the top-level TabBar. The 'open tabs' context menu
1244         no longer allows the last non-ephemeral open tab to be closed (unchecked).
1245
1246         * Localizations/en.lproj/localizedStrings.js:
1247
1248         * UserInterface/Base/Main.js:
1249         (WI.contentLoaded):
1250         (WI._tryToRestorePendingTabs):
1251         Retain legacy behavior behind experimental feature setting.
1252         (WI.isNewTabWithTypeAllowed):
1253
1254         * UserInterface/Base/Setting.js:
1255         * UserInterface/Main.html:
1256
1257         * UserInterface/Views/CanvasTabContentView.js:
1258         (WI.CanvasTabContentView):
1259         * UserInterface/Views/ConsoleTabContentView.js:
1260         (WI.ConsoleTabContentView):
1261         * UserInterface/Views/DebuggerTabContentView.js:
1262         (WI.DebuggerTabContentView):
1263         * UserInterface/Views/ElementsTabContentView.js:
1264         (WI.ElementsTabContentView):
1265
1266         * UserInterface/Views/GeneralTabBarItem.js:
1267         (WI.GeneralTabBarItem):
1268         (WI.GeneralTabBarItem.prototype.fromTabInfo):
1269         (WI.GeneralTabBarItem.prototype.get isEphemeral):
1270         (WI.GeneralTabBarItem.fromTabContentViewConstructor): Deleted.
1271
1272         * UserInterface/Views/LayersTabContentView.js:
1273         (WI.LayersTabContentView):
1274
1275         * UserInterface/Views/LegacyTabBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/TabBar.js.
1276         (WI.LegacyTabBar):
1277         (WI.LegacyTabBar.prototype.get newTabTabBarItem):
1278         (WI.LegacyTabBar.prototype.updateNewTabTabBarItemState):
1279         (WI.LegacyTabBar.prototype.addTabBarItem):
1280         (WI.LegacyTabBar.prototype.insertTabBarItem.animateTabs):
1281         (WI.LegacyTabBar.prototype.insertTabBarItem.removeStyles):
1282         (WI.LegacyTabBar.prototype.insertTabBarItem):
1283         (WI.LegacyTabBar.prototype.removeTabBarItem.animateTabs):
1284         (WI.LegacyTabBar.prototype.removeTabBarItem.removeStyles):
1285         (WI.LegacyTabBar.prototype.removeTabBarItem):
1286         (WI.LegacyTabBar.prototype.selectPreviousTab):
1287         (WI.LegacyTabBar.prototype.selectNextTab):
1288         (WI.LegacyTabBar.prototype.get selectedTabBarItem):
1289         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
1290         (WI.LegacyTabBar.prototype.get tabBarItems):
1291         (WI.LegacyTabBar.prototype.get normalTabCount):
1292         (WI.LegacyTabBar.prototype.layout.forceItemHidden):
1293         (WI.LegacyTabBar.prototype.layout):
1294         (WI.LegacyTabBar.prototype._tabBarItemsFromLeftToRight):
1295         (WI.LegacyTabBar.prototype._findTabBarItem):
1296         (WI.LegacyTabBar.prototype._hasMoreThanOneNormalTab):
1297         (WI.LegacyTabBar.prototype._openDefaultTab):
1298         (WI.LegacyTabBar.prototype._recordTabBarItemSizesAndPositions):
1299         (WI.LegacyTabBar.prototype._applyTabBarItemSizesAndPositions):
1300         (WI.LegacyTabBar.prototype._clearTabBarItemSizesAndPositions):
1301         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose.):
1302         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose):
1303         (WI.LegacyTabBar.prototype._handleMouseDown):
1304         (WI.LegacyTabBar.prototype._handleClick):
1305         (WI.LegacyTabBar.prototype._handleMouseMoved):
1306         (WI.LegacyTabBar.prototype._handleMouseUp):
1307         (WI.LegacyTabBar.prototype._handleMouseLeave):
1308         (WI.LegacyTabBar.prototype._handleContextMenu):
1309         (WI.LegacyTabBar.prototype._handleNewTabClick):
1310         (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu):
1311         (WI.LegacyTabBar.prototype._handleNewTabMouseEnter):
1312
1313         * UserInterface/Views/NetworkTabContentView.js:
1314         (WI.NetworkTabContentView):
1315         * UserInterface/Views/NewTabContentView.js:
1316         (WI.NewTabContentView):
1317         (WI.NewTabContentView.tabInfo):
1318         (WI.NewTabContentView.isEphemeral): Deleted.
1319         * UserInterface/Views/ResourcesTabContentView.js:
1320         (WI.ResourcesTabContentView):
1321         * UserInterface/Views/SearchTabContentView.js:
1322         (WI.SearchTabContentView):
1323         (WI.SearchTabContentView.tabInfo):
1324         (WI.SearchTabContentView.isEphemeral): Deleted.
1325
1326         * UserInterface/Views/SettingsTabContentView.js:
1327         (WI.SettingsTabContentView.tabInfo):
1328         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1329         (WI.SettingsTabContentView.isEphemeral): Deleted.
1330
1331         * UserInterface/Views/StorageTabContentView.js:
1332         (WI.StorageTabContentView):
1333
1334         * UserInterface/Views/TabBar.css:
1335         * UserInterface/Views/TabBar.js:
1336         (WI.TabBar):
1337         (WI.TabBar.prototype.insertTabBarItem):
1338         (WI.TabBar.prototype.removeTabBarItem):
1339         (WI.TabBar.prototype.set selectedTabBarItem):
1340         (WI.TabBar.prototype.get normalNonEphemeralTabCount):
1341         (WI.TabBar.prototype._handleMouseDown):
1342         (WI.TabBar.prototype._handleClick):
1343         (WI.TabBar.prototype._handleMouseMoved):
1344         (WI.TabBar.prototype._handleMouseLeave):
1345         (WI.TabBar.prototype._handleContextMenu):
1346         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
1347         (WI.TabBar.prototype.get newTabTabBarItem): Deleted.
1348         (WI.TabBar.prototype.updateNewTabTabBarItemState): Deleted.
1349         (WI.TabBar.prototype._openDefaultTab): Deleted.
1350         (WI.TabBar.prototype._handleNewTabClick): Deleted.
1351         (WI.TabBar.prototype._handleNewTabMouseEnter): Deleted.
1352         Remove support for the New Tab button and default tab. Without a default
1353         tab, there is nothing to display when no tabs are open, so prevent the
1354         last non-pinned tab from being removed.
1355
1356         * UserInterface/Views/TabBrowser.js:
1357         (WI.TabBrowser._tabBarItemRemoved):
1358         * UserInterface/Views/TabContentView.js:
1359         (WI.TabContentView.isEphemeral): Deleted.
1360         * UserInterface/Views/TimelineTabContentView.js:
1361         (WI.TimelineTabContentView):
1362
1363 2018-01-30  Devin Rousso  <webkit@devinrousso.com>
1364
1365         Web Inspector: Replace Object.shallowMerge with ES2018 spread operator
1366         https://bugs.webkit.org/show_bug.cgi?id=182219
1367
1368         Reviewed by Brian Burg.
1369
1370         * UserInterface/Base/Utilities.js:
1371         (Object.shallowMerge): Deleted.
1372         * UserInterface/Base/DOMUtilities.js:
1373         (WI.linkifyNodeReference):
1374         * UserInterface/Base/Main.js:
1375         (WI.handlePossibleLinkClick):
1376         (WI.openURL):
1377         (WI.showSourceCodeLocation):
1378         (WI.showOriginalUnformattedSourceCodeLocation):
1379         (WI.showOriginalOrFormattedSourceCodeLocation):
1380         (WI.showOriginalOrFormattedSourceCodeTextRange):
1381         (WI.linkifyLocation):
1382         * UserInterface/Views/DOMTreeElement.js:
1383         (WI.DOMTreeElement.prototype._insertAdjacentHTML):
1384         * UserInterface/Views/WebSocketContentView.js:
1385         (WI.WebSocketContentView.prototype._addRow):
1386
1387 2018-01-26  Matt Baker  <mattbaker@apple.com>
1388
1389         Web Inspector: Timelines content browser NavigationBar is squashed at narrow heights
1390         https://bugs.webkit.org/show_bug.cgi?id=182196
1391         <rdar://problem/36929899>
1392
1393         Reviewed by Joseph Pecoraro.
1394
1395         * UserInterface/Views/NavigationBar.css:
1396         (.navigation-bar):
1397
1398 2018-01-26  Matt Baker  <mattbaker@apple.com>
1399
1400         Web Inspector: TabBar redesign: improvements to tab layout and resize behavior
1401         https://bugs.webkit.org/show_bug.cgi?id=181468
1402         <rdar://problem/36395439>
1403
1404         Reviewed by Devin Rousso.
1405
1406         * Localizations/en.lproj/localizedStrings.js:
1407
1408         * UserInterface/Images/TabPicker.svg: Added.
1409         New ">>" icon for the tab picker button.
1410
1411         * UserInterface/Views/CanvasTabContentView.js:
1412         (WI.CanvasTabContentView):
1413         * UserInterface/Views/ConsoleTabContentView.js:
1414         (WI.ConsoleTabContentView):
1415         * UserInterface/Views/DebuggerTabContentView.js:
1416         (WI.DebuggerTabContentView):
1417         * UserInterface/Views/ElementsTabContentView.js:
1418         (WI.ElementsTabContentView):
1419
1420         * UserInterface/Views/GeneralTabBarItem.js:
1421         (WI.GeneralTabBarItem):
1422         (WI.GeneralTabBarItem.fromTabContentViewConstructor):
1423         (WI.GeneralTabBarItem.prototype.get title):
1424         Add missing override for getter/setter pair.
1425         (WI.GeneralTabBarItem.prototype.set title):
1426         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent):
1427         Show the close button on ephemeral tabs only (Search, New Tab).
1428         Replace unused `representedObject` parameter with `isEphemeral`, which
1429         determines whether to show a close button for the tab.
1430
1431         * UserInterface/Views/LayersTabContentView.js:
1432         (WI.LayersTabContentView):
1433
1434         * UserInterface/Views/NavigationBar.js:
1435         Remove unused symbol.
1436
1437         * UserInterface/Views/NetworkTabContentView.js:
1438         (WI.NetworkTabContentView):
1439         * UserInterface/Views/NewTabContentView.js:
1440         (WI.NewTabContentView):
1441
1442         * UserInterface/Views/PinnedTabBarItem.js:
1443         (WI.PinnedTabBarItem):
1444         Remove unused parameter.
1445
1446         * UserInterface/Views/ResourcesTabContentView.js:
1447         (WI.ResourcesTabContentView):
1448         * UserInterface/Views/SearchTabContentView.js:
1449         (WI.SearchTabContentView):
1450         * UserInterface/Views/StorageTabContentView.js:
1451         (WI.StorageTabContentView):
1452
1453         * UserInterface/Views/TabBar.css:
1454         (.tab-bar > .item):
1455         (.tab-bar.calculate-width > .item):
1456         (.tab-bar > .item.pinned.tab-picker):
1457         (.tab-bar > .item > .close):
1458         (.tab-bar > .item > .title):
1459         (.tab-bar:not(.collapsed) > .item > .title):
1460         (.tab-bar.collapsed > .item:not(.pinned) > .icon):
1461         (.tab-bar > .item:hover > .close):
1462         (.tab-bar.collapsed > .item:hover > .close):
1463         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon):
1464         (.tab-bar.collapsed > .item.ephemeral:hover > .title):
1465         (body[dir=ltr] .tab-bar > .item > .close): Deleted.
1466         (body[dir=rtl] .tab-bar > .item > .close): Deleted.
1467         (.tab-bar > .item > .flex-space): Deleted.
1468         (.tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
1469         (body[dir=ltr] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
1470         (body[dir=rtl] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
1471         (body[dir=ltr] .tab-bar > .item > .title): Deleted.
1472         (body[dir=rtl] .tab-bar > .item > .title): Deleted.
1473         (.tab-bar.collapsed > .item): Deleted.
1474         (.tab-bar.collapsed > .item > .flex-space): Deleted.
1475         (.tab-bar.collapsed > .item > .close): Deleted.
1476         (body[dir=ltr] .tab-bar.collapsed > .item > .close): Deleted.
1477         (body[dir=rtl] .tab-bar.collapsed > .item > .close): Deleted.
1478         (.tab-bar.hide-titles > .item > .title): Deleted.
1479         (.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned):hover > .icon,): Deleted.
1480         (.tab-bar.collapsed:not(.hide-titles) > .item:hover > .close,): Deleted.
1481         Clean up tab styles and prevent tabs from shrinking during flex layout.
1482         Added new `calculate-width` class, to disable flex layout when measuring
1483         the minimum width of the TabBar required to fit all tab items.
1484
1485         * UserInterface/Views/TabBar.js:
1486         (WI.TabBar):
1487         (WI.TabBar.prototype.set selectedTabBarItem):
1488         (WI.TabBar.prototype.layout.forceItemHidden):
1489         (WI.TabBar.prototype.layout):
1490         Perform two layout passes, similar to NavigationBar. The first pass disables
1491         flex layout and measures tab items at full size. If the bar isn't wide enough
1492         to show all the tabs, hide their icons and measure again. If there still isn't
1493         room, hide tabs starting from the end of the bar and display the tab picker.
1494
1495         (WI.TabBar.prototype._handleMouseDown):
1496         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
1497
1498         * UserInterface/Views/TabBarItem.js:
1499         (WI.TabBarItem):
1500
1501         * UserInterface/Views/TimelineTabContentView.js:
1502         (WI.TimelineTabContentView):
1503
1504 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
1505
1506         Web Inspector: Network Table: Sort indicator is not displayed when sorted column is hidden and re-shown
1507         https://bugs.webkit.org/show_bug.cgi?id=182164
1508         <rdar://problem/36892619>
1509
1510         Reviewed by Brian Burg.
1511
1512         * UserInterface/Views/Table.js:
1513         (WI.Table.prototype.showColumn):
1514         Re-add the sort classes if the column being shown is the active sort column.
1515
1516 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
1517
1518         Web Inspector: Network - Cookies view should behave better at narrow widths, all data is hidden
1519         https://bugs.webkit.org/show_bug.cgi?id=182163
1520         <rdar://problem/36893241>
1521
1522         Reviewed by Brian Burg.
1523
1524         * UserInterface/Views/ResourceCookiesContentView.css:
1525         (.resource-cookies .table):
1526         Give these tables a reasonable minimum size so that if the inspector
1527         is narrow, the content view can still be scrolled to see all of
1528         the table data.
1529
1530         * UserInterface/Views/Table.css:
1531         (.table > .header):
1532         Match the data-container and mark overflow as hidden, otherwise
1533         super narrow widths show header content beyond the edge.
1534
1535 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
1536
1537         Web Inspector: "Displayed Columns" should not be displayed in context menu if all columns are required columns
1538         https://bugs.webkit.org/show_bug.cgi?id=182162
1539         <rdar://problem/36893758>
1540
1541         Reviewed by Matt Baker.
1542
1543         * UserInterface/Views/Table.js:
1544         (WI.Table.prototype._handleHeaderContextMenu):
1545         Only add the header column when we know there are hideable columns.
1546
1547 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
1548
1549         Web Inspector: Simplify update-LegacyInspectorBackendCommands.rb
1550         https://bugs.webkit.org/show_bug.cgi?id=182067
1551
1552         Reviewed by Brian Burg.
1553
1554         * Scripts/update-LegacyInspectorBackendCommands.rb:
1555         Remove stale dependency_json, it has always been empty for a while now.
1556         Switch to framework WebInspectorUI to generate only the backend commands
1557         and not spend time generating a bunch of cpp files.
1558
1559 2018-01-24  Nikita Vasilyev  <nvasilyev@apple.com>
1560
1561         REGRESSION (r226994): Web Inspector: Styles: Suggestions popover floats in top-left corner of Web Inspector after tabbing
1562         https://bugs.webkit.org/show_bug.cgi?id=182027
1563
1564         Reviewed by Matt Baker.
1565
1566         r226994 added a layout of all properties on property removal. Layout caused
1567         a property element to be removed from DOM right before dislaying the suggestion
1568         popover, resulting in the popover being displayed at the top left corner.
1569
1570         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1571         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1572         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
1573         Only update property view indices when a property is removed.
1574
1575         * UserInterface/Views/SpreadsheetStyleProperty.js:
1576         (WI.SpreadsheetStyleProperty):
1577         (WI.SpreadsheetStyleProperty.prototype.set index):
1578
1579         * UserInterface/Views/SpreadsheetTextField.js:
1580         (WI.SpreadsheetTextField.prototype._updateCompletions):
1581         Checking this._element.parentNode to see if the element is attached to the DOM tree is unreliable,
1582         since the element may have a non-null parent node that is detached from the DOM tree. To fix that,
1583         we could traverse element's ancestors, but I used a concise isConnected property instead.
1584
1585 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
1586
1587         ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
1588         https://bugs.webkit.org/show_bug.cgi?id=182059
1589
1590         Reviewed by Matt Baker.
1591
1592         * UserInterface/Models/ScriptSyntaxTree.js:
1593         (WI.ScriptSyntaxTree.functionReturnDivot):
1594         DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
1595         a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
1596         back to the latest path (non-iOS 9) target.
1597
1598 2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1599
1600         Web Inspector: Network's columns shake when scrolling at non-default zoom level
1601         https://bugs.webkit.org/show_bug.cgi?id=181998
1602         <rdar://problem/36449808>
1603
1604         Reviewed by Matt Baker.
1605
1606         * UserInterface/Views/Table.js:
1607         When zoomed the bounding client rect values were fractional, which was
1608         unexpected by this area of code. Floor the values to get a value we expect
1609         to be able to evenly distribute.
1610
1611 2018-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
1612
1613         Web Inspector: Styles Redesign: data corruption when updating values quickly
1614         https://bugs.webkit.org/show_bug.cgi?id=179461
1615         <rdar://problem/35431882>
1616
1617         Reviewed by Joseph Pecoraro.
1618
1619         Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
1620         update synchronously. Making two or more quick changes resulted in corrupted data.
1621
1622         Imagine we modify a CSS value 3 times:
1623
1624         Front-end:  (1)-(2)---(3)
1625         Back-end:          (1)-----(2)-(3)
1626
1627         The first response from the backend could happen after the 2nd edit. In this patch,
1628         CSSStyleDeclaration is locked when its view is being edited.
1629
1630         To correctly display invalid and overridden properties, the backend is allowed to update
1631         CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
1632         matches the model's text. This should happen when the backend is caught up with the
1633         front-end changes.
1634
1635         * UserInterface/Models/CSSProperty.js:
1636         (WI.CSSProperty.prototype.update):
1637         * UserInterface/Models/CSSStyleDeclaration.js:
1638         (WI.CSSStyleDeclaration):
1639         (WI.CSSStyleDeclaration.prototype.get locked):
1640         (WI.CSSStyleDeclaration.prototype.set locked):
1641         (WI.CSSStyleDeclaration.prototype.set text):
1642
1643         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1644         (WI.SpreadsheetCSSStyleDeclarationEditor):
1645         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
1646         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
1647         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
1648         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
1649         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
1650         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
1651         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
1652         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
1653         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
1654         Lock CSSStyleDeclaration when a CSS property name or value is focused or
1655         an inline widget is active.
1656
1657         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1658         (WI.SpreadsheetCSSStyleDeclarationSection):
1659         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
1660         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
1661         * UserInterface/Views/SpreadsheetStyleProperty.js:
1662         (WI.SpreadsheetStyleProperty):
1663         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
1664         When selector is focused, clicking on the white-space should not add a new blank property.
1665
1666 2018-01-19  Ross Kirsling  <ross.kirsling@sony.com>
1667
1668         Web Inspector: Layers tab should do away with popovers (if possible)
1669         https://bugs.webkit.org/show_bug.cgi?id=181805
1670
1671         Reviewed by Matt Baker.
1672
1673         * Localizations/en.lproj/localizedStrings.js:
1674         Remove superfluous colon from a string.
1675
1676         * UserInterface/Main.html:
1677         * UserInterface/Views/LayerDetailsSidebarPanel.css:
1678         * UserInterface/Views/Layers3DContentView.css: Added.
1679         Remove popover styling from sidebar, add new file with similar styling for canvas overlay.
1680
1681         * UserInterface/Views/LayerDetailsSidebarPanel.js:
1682         (WI.LayerDetailsSidebarPanel):
1683         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
1684         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
1685         (WI.LayerDetailsSidebarPanel.prototype._updateLayers):
1686         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
1687         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
1688         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
1689         (WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
1690         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
1691         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
1692         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.
1693         * UserInterface/Views/Layers3DContentView.js:
1694         (WI.Layers3DContentView):
1695         (WI.Layers3DContentView.prototype.shown):
1696         (WI.Layers3DContentView.prototype.selectLayerById):
1697         (WI.Layers3DContentView.prototype._canvasMouseDown):
1698         (WI.Layers3DContentView.prototype._buildLayerInfoElement):
1699         (WI.Layers3DContentView.prototype._updateLayerInfoElement):
1700         (WI.Layers3DContentView.prototype._updateReasonsList):
1701         Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
1702         Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!
1703
1704 2018-01-19  Matt Baker  <mattbaker@apple.com>
1705
1706         Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
1707         https://bugs.webkit.org/show_bug.cgi?id=181865
1708         <rdar://problem/36664737>
1709
1710         Reviewed by Devin Rousso.
1711
1712         * UserInterface/Views/CanvasContentView.js:
1713         (WI.CanvasContentView.prototype._recordingStarted):
1714         (WI.CanvasContentView.prototype._recordingStopped):
1715
1716 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
1717
1718         Web Inspector: Styles Redesign: tabbing on commented out property throws exception
1719         https://bugs.webkit.org/show_bug.cgi?id=180676
1720         <rdar://problem/35981058>
1721
1722         Reviewed by Joseph Pecoraro.
1723
1724         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1725         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
1726         Tabbing from the selector field should focus on the first editable property.
1727         When no editable properties are present, a new blank property should be added after the commented out ones.
1728
1729         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
1730         Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
1731         When no editable properties are present, a new blank property should be added after the commented out ones.
1732
1733         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
1734         When navigating between properties skip the commented out ones.
1735
1736         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
1737         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):
1738         * UserInterface/Views/SpreadsheetStyleProperty.js:
1739         (WI.SpreadsheetStyleProperty.prototype.get enabled):
1740         (WI.SpreadsheetStyleProperty.prototype._update):
1741
1742 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
1743
1744         Web Inspector: Make styles sidebar always LTR
1745         https://bugs.webkit.org/show_bug.cgi?id=175357
1746         <rdar://problem/33787988>
1747
1748         Reviewed by Joseph Pecoraro.
1749
1750         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1751         (WI.SpreadsheetRulesStyleDetailsPanel):
1752
1753 2018-01-19  Keith Miller  <keith_miller@apple.com>
1754
1755         HaveInternalSDK includes should be "#include?"
1756         https://bugs.webkit.org/show_bug.cgi?id=179670
1757
1758         Reviewed by Dan Bernstein.
1759
1760         * Configurations/Base.xcconfig:
1761
1762 2018-01-18  Dan Bernstein  <mitz@apple.com>
1763
1764         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
1765         https://bugs.webkit.org/show_bug.cgi?id=181803
1766
1767         Reviewed by Tim Horton.
1768
1769         * Configurations/Base.xcconfig: Updated.
1770         * Configurations/DebugRelease.xcconfig: Ditto.
1771         * Configurations/Version.xcconfig: Ditto.
1772
1773 2018-01-18  Devin Rousso  <webkit@devinrousso.com>
1774
1775         Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
1776         https://bugs.webkit.org/show_bug.cgi?id=179183
1777
1778         Reviewed by Joseph Pecoraro.
1779
1780         * UserInterface/Views/CanvasOverviewContentView.css:
1781         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.
1782
1783 2018-01-17  Devin Rousso  <webkit@devinrousso.com>
1784
1785         Web Inspector: clicking on a path component that has no siblings should select it
1786         https://bugs.webkit.org/show_bug.cgi?id=181772
1787
1788         Reviewed by Joseph Pecoraro.
1789
1790         * UserInterface/Views/HierarchicalPathComponent.js:
1791         (WI.HierarchicalPathComponent.prototype._updateSelectElement):
1792         (WI.HierarchicalPathComponent.prototype._selectElementMouseDown):
1793
1794 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
1795
1796         Web Inspector: Add back localized strings for Styles sidebar panels
1797         https://bugs.webkit.org/show_bug.cgi?id=181748
1798         <rdar://problem/36583184>
1799
1800         Reviewed by Brian Burg.
1801
1802         * Localizations/en.lproj/localizedStrings.js:
1803         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
1804         (WI.ComputedStyleDetailsSidebarPanel):
1805         * UserInterface/Views/RulesStyleDetailsSidebarPanel.js:
1806         (WI.RulesStyleDetailsSidebarPanel):
1807         * UserInterface/Views/VisualStyleDetailsSidebarPanel.js:
1808         (WI.VisualStyleDetailsSidebarPanel):
1809         Add back localized strings for panel titles lost in r225547.
1810
1811 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
1812
1813         Web Inspector: Super long URL string causes bad wrapping in Resources detail sidebar
1814         https://bugs.webkit.org/show_bug.cgi?id=181617
1815
1816         Reviewed by Brian Burg.
1817
1818         * UserInterface/Views/DetailsSection.css:
1819         (.details-section > .content > .group > .row.simple > .value):
1820         Set the break to all characters.
1821
1822 2018-01-16  Matt Baker  <mattbaker@apple.com>
1823
1824         Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
1825         https://bugs.webkit.org/show_bug.cgi?id=181706
1826         <rdar://problem/36558221>
1827
1828         Reviewed by Joseph Pecoraro.
1829
1830         * UserInterface/Views/CanvasOverviewContentView.js:
1831         (WI.CanvasOverviewContentView):
1832         (WI.CanvasOverviewContentView.prototype._handleSpace):
1833
1834 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
1835
1836         Web Inspector: Make Console's Execution Context picker stand out when it is non-default
1837         https://bugs.webkit.org/show_bug.cgi?id=181628
1838         <rdar://problem/36492044>
1839
1840         Reviewed by Matt Baker.
1841
1842         * UserInterface/Views/HierarchicalPathComponent.css:
1843         (.hierarchical-path-component > .selector-arrows):
1844         * UserInterface/Views/HierarchicalPathComponent.js:
1845         (WI.HierarchicalPathComponent.prototype.set selectorArrows):
1846         Switch to SVG element so we can style the arrows.
1847
1848         * UserInterface/Views/QuickConsole.css:
1849         (.quick-console > .navigation-bar > .hierarchical-path .execution-context):
1850         (.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator):
1851         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context):
1852         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows):
1853         Styles for the execution context picker. We hide the unused separator
1854         and instead use margin so that the selected background and border don't
1855         have an extra 7px on the right/end side.
1856
1857         * UserInterface/Views/QuickConsole.js:
1858         (WI.QuickConsole.prototype._activeExecutionContextChanged):
1859         Toggle the non-default class name on the path.
1860
1861 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
1862
1863         Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value
1864         https://bugs.webkit.org/show_bug.cgi?id=181633
1865         <rdar://problem/36501797>
1866
1867         Reviewed by Joseph Pecoraro.
1868
1869         * UserInterface/Views/SpreadsheetTextField.js:
1870         (WI.SpreadsheetTextField.prototype._updateCompletions):
1871
1872 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
1873
1874         Web Inspector: Styles Redesign: Long value causes bad wrapping
1875         https://bugs.webkit.org/show_bug.cgi?id=181618
1876         <rdar://problem/36485175>
1877
1878         Reviewed by Joseph Pecoraro.
1879
1880         Wrap long values only when editing.
1881
1882         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1883         (.spreadsheet-style-declaration-editor .value.editing):
1884
1885 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
1886
1887         Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index
1888         https://bugs.webkit.org/show_bug.cgi?id=179585
1889         <rdar://problem/35490780>
1890
1891         Reviewed by Joseph Pecoraro.
1892
1893         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1894         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
1895         Layout call is needed to update data-property-index attributes on the property views.
1896
1897 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
1898
1899         Web Inspector: Network Tab - Export HAR Context Menu not working
1900         https://bugs.webkit.org/show_bug.cgi?id=181694
1901         <rdar://problem/36479197>
1902
1903         Reviewed by Brian Burg.
1904
1905         * UserInterface/Views/NetworkTableContentView.js:
1906         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
1907         Ensure `this` works in the handler.
1908
1909 2018-01-15  Matt Baker  <mattbaker@apple.com>
1910
1911         Web Inspector: TabBar redesign: add context menu to TabBar for toggling available tabs
1912         https://bugs.webkit.org/show_bug.cgi?id=181448
1913         <rdar://problem/36383298>
1914
1915         Reviewed by Devin Rousso.
1916
1917         * UserInterface/Base/Main.js:
1918         (WI.loaded):
1919         (WI.contentLoaded):
1920         Reorder production tab classes and default (open) tabs.
1921         (WI.registerTabClass): Removed.
1922         Not used.
1923
1924         * UserInterface/Base/Object.js:
1925         Remove notification that is no longer used.
1926
1927         * UserInterface/Views/GeneralTabBarItem.js:
1928         (WI.GeneralTabBarItem):
1929         (WI.GeneralTabBarItem.prototype.set title):
1930         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent): Deleted.
1931         Remove per-tab context menu (provided Close Tab and Close Other Tabs).
1932
1933         * UserInterface/Views/NewTabContentView.js:
1934         (WI.NewTabContentView):
1935
1936         * UserInterface/Views/TabBar.js:
1937         (WI.TabBar):
1938         (WI.TabBar.prototype._handleContextMenu):
1939
1940         * UserInterface/Views/TabBrowser.js:
1941         (WI.TabBrowser):
1942         (WI.TabBrowser._handleNewTabContextMenu): Deleted.
1943         No longer needed.
1944
1945 2018-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
1946
1947         Web Inspector: Styles Redesign: properties should never be semitransparent or crossed out while editing
1948         https://bugs.webkit.org/show_bug.cgi?id=180793
1949         <rdar://problem/36038813>
1950
1951         Reviewed by Devin Rousso.
1952
1953         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1954         (.spreadsheet-style-declaration-editor .value.editing):
1955         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
1956         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled) .content > *):
1957         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .content .value):
1958         (.spreadsheet-style-declaration-editor .property.not-inherited .content > *):
1959         * UserInterface/Views/SpreadsheetStyleProperty.js:
1960         (WI.SpreadsheetStyleProperty.prototype._update):
1961
1962 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
1963
1964         Web Inspector: Drop support for iOS 7 targets
1965         https://bugs.webkit.org/show_bug.cgi?id=181549
1966         <rdar://problem/36444813>
1967
1968         Reviewed by Brian Burg.
1969
1970         * Versions/Inspector-iOS-7.0.json: Removed.
1971         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Removed.
1972         Remove protocol snapshot and generated commands for iOS 7.
1973
1974         * UserInterface/Base/Main.js:
1975         * UserInterface/Controllers/BreakpointPopoverController.js:
1976         (WI.BreakpointPopoverController.prototype._createPopoverContent):
1977         * UserInterface/Controllers/DebuggerManager.js:
1978         (WI.DebuggerManager.prototype._setBreakpoint):
1979         * UserInterface/Controllers/SourceMapManager.js:
1980         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
1981         * UserInterface/Models/Instrument.js:
1982         (WI.Instrument.startLegacyTimelineAgent):
1983         * UserInterface/Models/ResourceTimingData.js:
1984         * UserInterface/Models/ScriptTimelineRecord.js:
1985         (WI.ScriptTimelineRecord.EventType.displayName):
1986         * UserInterface/Models/SourceMapResource.js:
1987         (WI.SourceMapResource.prototype.requestContentFromBackend):
1988         * UserInterface/Protocol/CSSObserver.js:
1989         (WI.CSSObserver.prototype.regionLayoutUpdated): Deleted.
1990         * UserInterface/Protocol/RemoteObject.js:
1991         (WI.RemoteObject.fromPayload):
1992         Remove code that was only necessary to support iOS 7.
1993
1994 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
1995
1996         Web Inspector: Support JSX (React) syntax highlighting
1997         https://bugs.webkit.org/show_bug.cgi?id=181607
1998         <rdar://problem/36442564>
1999
2000         Reviewed by Brian Burg.
2001
2002         * UserInterface/Base/MIMETypeUtilities.js:
2003         (WI.mimeTypeForFileExtension):
2004         (WI.fileExtensionForMIMEType):
2005         * UserInterface/Models/Resource.js:
2006         Support the jsx extension and mime types.
2007
2008         * UserInterface/Main.html:
2009         * Scripts/update-codemirror-resources.rb:
2010         * UserInterface/External/CodeMirror/jsx.js: Added.
2011         Include new mode from CodeMirror@d8926768.
2012
2013 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
2014
2015         Web Inspector: Rename "Query String" section as "Query String Parameters" for clarity
2016         https://bugs.webkit.org/show_bug.cgi?id=181464
2017
2018         Reviewed by Darin Adler.
2019
2020         * Localizations/en.lproj/localizedStrings.js:
2021         * UserInterface/Views/ResourceHeadersContentView.js:
2022         (WI.ResourceHeadersContentView.prototype.initialLayout):
2023
2024 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
2025
2026         Web Inspector: Remove unused variable in WI.DebuggerSidebarPanel
2027         https://bugs.webkit.org/show_bug.cgi?id=181517
2028
2029         Reviewed by Matt Baker.
2030
2031         * UserInterface/Views/DebuggerSidebarPanel.js:
2032
2033 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
2034
2035         REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)
2036         https://bugs.webkit.org/show_bug.cgi?id=181518
2037         <rdar://problem/36427197>
2038
2039         Reviewed by Matt Baker.
2040
2041         * UserInterface/Views/NavigationSidebarPanel.css:
2042         (.sidebar > .panel.navigation > .overflow-shadow.top):
2043         * UserInterface/Views/NavigationSidebarPanel.js:
2044         (WI.NavigationSidebarPanel):
2045         Add back the initialization parameter still used by SearchSidebarPanel
2046         and add back its implementation. There were still references to
2047         dynamically update _topOverflowShadowElement in NavigationSidebarPanel.
2048
2049 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
2050
2051         Web Inspector: Incorrect check with WI.debuggableType
2052         https://bugs.webkit.org/show_bug.cgi?id=181515
2053         <rdar://problem/36425509>
2054
2055         Reviewed by Brian Burg.
2056
2057         * UserInterface/Base/Main.js:
2058         (WI.contentLoaded):
2059         This moved to WI.sharedApp a while ago.
2060
2061 2018-01-10  Matt Baker  <mattbaker@apple.com>
2062
2063         Web Inspector: Canvas tab: throttle recording slider updates
2064         https://bugs.webkit.org/show_bug.cgi?id=180839
2065         <rdar://problem/36057849>
2066
2067         Reviewed by Joseph Pecoraro
2068
2069         * UserInterface/Base/Utilities.js:
2070         Add Object.throttle and Function.cancelThrottle. Repeated calls to a
2071         function on a throttled object are delayed, so that the function isn't
2072         invoked more frequently than the specified delay value.
2073
2074         For a description of throttling behavior see:
2075           - http://www.chrislondon.co/throttling-vs-debouncing
2076           - http://benalman.com/projects/jquery-throttle-debounce-plugin
2077
2078         * UserInterface/Views/RecordingContentView.js:
2079         (WI.RecordingContentView.prototype.updateActionIndex):
2080         Throttle frequency of canvas snapshot creation to 200ms.
2081         (WI.RecordingContentView.prototype.hidden):
2082         Prevent trailing edge call after hiding the view.
2083
2084 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
2085
2086         Web Inspector: Should not try to autocomplete subsections of a string
2087         https://bugs.webkit.org/show_bug.cgi?id=181461
2088         <rdar://problem/36369421>
2089
2090         Reviewed by Brian Burg.
2091
2092         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2093         (WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
2094         Disable autocompletion within strings.
2095
2096 2018-01-09  Joseph Pecoraro  <pecoraro@apple.com>
2097
2098         REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal
2099         https://bugs.webkit.org/show_bug.cgi?id=181462
2100         <rdar://problem/36390699>
2101
2102         Reviewed by Matt Baker.
2103
2104         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
2105         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
2106         This is code that runs on the inspected target, which may have an old version of
2107         WebKit/JavaScriptCore, so don't use new syntax like this.
2108
2109         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
2110         We intended to return the result by as a JSON value instead of a RemoteObject.
2111
2112 2018-01-09  Ross Kirsling  <ross.kirsling@sony.com>
2113
2114         Web Inspector: Layers sidebar shows popover on selection even when collapsed
2115         https://bugs.webkit.org/show_bug.cgi?id=181465
2116
2117         Reviewed by Matt Baker.
2118
2119         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2120         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
2121         Have sidebar show itself if necessary before displaying popover.
2122
2123 2018-01-08  Joseph Pecoraro  <pecoraro@apple.com>
2124
2125         Web Inspector: Find next / previous within a resource content view does not have bouncy highlight when editor scrolls
2126         https://bugs.webkit.org/show_bug.cgi?id=181279
2127         <rdar://problem/36291097>
2128
2129         Reviewed by Brian Burg.
2130
2131         * UserInterface/Views/TextEditor.js:
2132         (WI.TextEditor.prototype._revealSearchResult):
2133         Reposition the bouncy highlight on scroll based on the CodeMirror
2134         line/ch position of the search result.
2135
2136         (WI.TextEditor.prototype._removeBouncyHighlightElementIfNeeded):
2137         Track the bouncy highlight scroll handler in a member variable so that
2138         we always remember to remove it and don't leak scroll handlers.
2139
2140 2018-01-07  David Kilzer  <ddkilzer@apple.com>
2141
2142         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
2143         <https://webkit.org/b/181256>
2144         <rdar://problem/36281730>
2145
2146         Reviewed by Darin Adler.
2147
2148         * Configurations/Base.xcconfig:
2149         (WARNING_CFLAGS): Add -Wcast-qual.
2150
2151 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
2152
2153         Web Inspector: Add another Protocol Version
2154         https://bugs.webkit.org/show_bug.cgi?id=181354
2155         <rdar://problem/35432817>
2156
2157         Reviewed by Matt Baker.
2158
2159         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js: Added.
2160         * Versions/Inspector-iOS-11.3.json: Added.
2161
2162 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
2163
2164         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
2165         https://bugs.webkit.org/show_bug.cgi?id=180770
2166
2167         Reviewed by Joseph Pecoraro.
2168
2169         * UserInterface/Models/Canvas.js:
2170         (WI.Canvas.fromPayload):
2171         (WI.Canvas.prototype.get contextType):
2172         (WI.Canvas.prototype.saveIdentityToCookie):
2173         (WI.Canvas.prototype.get frame): Deleted.
2174
2175 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2176
2177         REGRESSION (r225709): Web Inspector: CSS Source maps not loading
2178         https://bugs.webkit.org/show_bug.cgi?id=181314
2179         <rdar://problem/36177620>
2180
2181         Reviewed by Brian Burg.
2182
2183         * UserInterface/Controllers/SourceMapManager.js:
2184         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
2185         * UserInterface/Models/SourceMapResource.js:
2186         (WI.SourceMapResource.prototype.requestContentFromBackend):
2187         Correct this so that we only fall back to a reasonable frame id
2188         if we couldn't determine a frame id from earlier. Previously this
2189         was incorrectly clearing the frame id if we had gotten it earlier.
2190
2191         * UserInterface/Test.html:
2192         * UserInterface/Test/Test.js:
2193         (WI.loaded):
2194         Add SourceMap related files for tests.
2195
2196 2018-01-04  Brian Burg  <bburg@apple.com>
2197
2198         Web Inspector: Capture Element Screenshot looks fuzzy
2199         https://bugs.webkit.org/show_bug.cgi?id=175734
2200         <rdar://problem/33803377>
2201
2202         Reviewed by Joseph Pecoraro and Simon Fraser.
2203
2204         Spruce up these functions a bit. They now optionally return a promise
2205         if no callback is supplied. They now can take either a WI.DOMNode or a node id.
2206
2207         * UserInterface/Controllers/DOMTreeManager.js:
2208         (WI.DOMTreeManager.prototype.querySelector):
2209         (WI.DOMTreeManager.prototype.querySelectorAll):
2210
2211 2018-01-04  Brian Burg  <bburg@apple.com>
2212
2213         Web Inspector: add RemoteObject.fetchProperties and some basic tests for RemoteObject API
2214         https://bugs.webkit.org/show_bug.cgi?id=180945
2215
2216         Reviewed by Joseph Pecoraro.
2217
2218         Add a new method, fetchProperties, which async fetches an arbitrary list of properties
2219         from a RemoteObject. This is intended for writing tests and other quick evaluations,
2220         so it has some behaviors that are suitable in these situations:
2221         - If the evaluation throws an exception, the result will reject with that exception.
2222         - If there is a protocol error for some reason, the result will reject with an exception.
2223         - Non-string and non-number keys cause an exception, as this is probably not intended.
2224         - Does not accept a callback, returns a promise only. New code should use async.
2225
2226         For full fidelity introspection of property descriptors, clients should use the existing
2227         getOwnPropertyDescriptor[s] class of methods.
2228
2229         * UserInterface/Protocol/RemoteObject.js:
2230         (WI.RemoteObject.prototype.async.fetchProperties): Added.
2231         - Validate specified keys and remove duplicates.
2232         - Request properties one-by-one to avoid fetching all descriptors and dealing with previews.
2233         - Unwrap returned primitive values to avoid unnecessary munging in tests.
2234
2235         (WI.RemoteObject.prototype.getProperty):
2236         - Rework this to return a promise if no callback was supplied.
2237         - Introduce stricter property type checking to avoid unintended mistakes.
2238
2239         (WI.RemoteObject.prototype.callFunction):
2240         - Rework this to return a promise if no callback was supplied.
2241         - Turn thrown exceptions and protocol errors into rejected promises.
2242
2243 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2244
2245         Web Inspector: ⌘G / ⇧⌘G text search does not working after closing find banner
2246         https://bugs.webkit.org/show_bug.cgi?id=181280
2247         <rdar://problem/36291175>
2248
2249         Reviewed by Matt Baker.
2250
2251         * UserInterface/Views/ContentBrowser.js:
2252         (WI.ContentBrowser.prototype._findBannerDidHide):
2253         When the find banner is hidden trigger a new ContentView method,
2254         searchHidden instead of the destructive searchCleared. This allows
2255         most content views (text editors, DOM tree, Network Headers view)
2256         to keep their populated search results.
2257
2258         * UserInterface/Views/ContentView.js:
2259         (WI.ContentView.prototype.searchHidden):
2260         * UserInterface/Views/LogContentView.js:
2261         (WI.LogContentView.prototype.searchHidden):
2262         By default searchHidden does nothing. The Console's LogContentView
2263         treats the find banner differently and clears its search results.
2264
2265         * UserInterface/Views/TextEditor.js:
2266         (WI.TextEditor.prototype.searchCleared):
2267         Modernize some code while working in this area.
2268
2269         * UserInterface/Views/Main.css:
2270         (.bouncy-highlight):
2271         Ensure black text on yellow background in the bouncy highlight. In the
2272         DOM Tree it could have been white if the find banner was closed.
2273
2274 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
2275
2276         Replace hard-coded paths in shebangs with #!/usr/bin/env
2277         https://bugs.webkit.org/show_bug.cgi?id=181040
2278
2279         Reviewed by Alex Christensen.
2280
2281         * Scripts/combine-resources.pl:
2282         * Scripts/copy-user-interface-resources-dryrun.rb:
2283         * Scripts/copy-user-interface-resources.pl:
2284         * Scripts/fix-worker-imports-for-optimized-builds.pl:
2285         * Scripts/remove-console-asserts-dryrun.rb:
2286         * Scripts/remove-console-asserts.pl:
2287         * Scripts/update-LegacyInspectorBackendCommands.rb:
2288         * Scripts/update-codemirror-resources.rb:
2289         * WebInspectorUI.vcxproj/build-webinspectorui.pl:
2290
2291 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
2292
2293         Web Inspector: "Log Value" context menu is sometimes unavailable
2294         https://bugs.webkit.org/show_bug.cgi?id=181278
2295         <rdar://problem/36281649>
2296
2297         Reviewed by Devin Rousso.
2298
2299         * UserInterface/Views/ObjectPreviewView.css:
2300         (.object-preview > .title):
2301         * UserInterface/Views/ObjectTreeView.css:
2302         (.object-tree.expanded > .title):
2303         Make the expanded object title information 16px tall to match ObjectTree
2304         tree element row heights. This eliminates the floating console message
2305         location from overlapping the first ObjectTree's TreeElement and causing
2306         truncation and other behavior issues (like Context Menu identification).
2307
2308 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
2309
2310         Web Inspector: RTL - DOM Tree Element selection doesn't work
2311         https://bugs.webkit.org/show_bug.cgi?id=181275
2312         <rdar://problem/36290450>
2313
2314         Reviewed by Devin Rousso.
2315
2316         * UserInterface/Views/TreeOutline.js:
2317         (WI.TreeOutline.prototype.treeElementFromEvent):
2318         Provide a better explanation for why we are making the `x` adjustment here,
2319         to detect the inner most tree element along the horizontal. Fix the algorithm
2320         for RTL, since the intent is to adjust to the trailing edge of the container
2321         which is on the opposite side in RTL.
2322
2323 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
2324
2325         Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)
2326         https://bugs.webkit.org/show_bug.cgi?id=181255
2327         <rdar://problem/36248855>
2328
2329         Reviewed by Matt Baker.
2330
2331         * UserInterface/Views/TextEditor.js:
2332         (WI.TextEditor.prototype.set string):
2333         Defer any early searches until the initial content of a TextEditor has been set.
2334         Such searches can happen when the FindBanner already has content when a
2335         ContentView is first opened and needs to load its content from the backend.
2336         Further, even though the content may be loaded from the backend before the
2337         search results, microtask hops might cause the content to get to the TextEditor
2338         after the search results.
2339
2340 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
2341
2342         REGRESSION: Web Inspector: Debugger tab doesn't restore selected resource on reload
2343         https://bugs.webkit.org/show_bug.cgi?id=181253
2344         <rdar://problem/36280564>
2345
2346         Reviewed by Matt Baker.
2347
2348         * UserInterface/Views/DebuggerSidebarPanel.js:
2349         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
2350         Add braces to ensure the trailing else is actually trailing the outer
2351         chain as it was intended to be.
2352
2353 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
2354
2355         Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab
2356         https://bugs.webkit.org/show_bug.cgi?id=181229
2357         <rdar://problem/36075219>
2358
2359         Reviewed by Matt Baker.
2360
2361         * UserInterface/Base/Main.js:
2362         Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick
2363         when not already in the Search tab.
2364
2365         * UserInterface/Views/CallFrameView.js:
2366         (WI.CallFrameView):
2367         Ignore Search and Network tab in CallFrame links.
2368
2369         * UserInterface/Views/TabBrowser.js:
2370         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
2371         Improve style.
2372
2373 == Rolled over to ChangeLog-2018-01-01 ==