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