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