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