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