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