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