Web Inspector: Styles Redesign: Pasting multiple properties should create properties...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-02-02  Devin Rousso  <webkit@devinrousso.com>
2
3         Web Inspector: Styles Redesign: Pasting multiple properties should create properties instead of a bad property
4         https://bugs.webkit.org/show_bug.cgi?id=179622
5         <rdar://problem/35511170>
6
7         Reviewed by Matt Baker.
8
9         * UserInterface/Views/SpreadsheetStyleProperty.js:
10         (WI.SpreadsheetStyleProperty.prototype._remove):
11         (WI.SpreadsheetStyleProperty.prototype._update):
12         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
13         (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
14         When the user pastes into the name field, parse the text for a list of name-value pairs and
15         replace the property being edited with the text of those pairs.
16
17         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
18         (WI.SpreadsheetCSSStyleDeclarationEditor):
19         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
20         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
21         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
22         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyAddBlankPropertySoon):
23         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
24         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
25         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): Deleted.
26         Calling `addBlankProperty` will trigger a layout on the next frame, but that might be before
27         the CSSAgent has had a chance to finish refreshing, so we need a way to defer the creation
28         of a new property until after we have finished the next layout (which is after the refresh).
29         Drive-by: fix naming of some delegate functions.
30
31         * UserInterface/Models/CSSProperty.js:
32         (WI.CSSProperty.prototype.replaceWithText):
33         Provide a way for replacing the property with new text.
34
35 2018-02-02  Matt Baker  <mattbaker@apple.com>
36
37         Web Inspector: TabBar redesign: remove New Tab button and add experimental feature flag
38         https://bugs.webkit.org/show_bug.cgi?id=182342
39         <rdar://problem/37078662>
40
41         Reviewed by Devin Rousso.
42
43         This patch adds a new experimental setting group, "User Interface", with
44         a single setting, "Enable New TabBar". When enabled, the New Tab button is
45         no longer available in the top-level TabBar. The 'open tabs' context menu
46         no longer allows the last non-ephemeral open tab to be closed (unchecked).
47
48         * Localizations/en.lproj/localizedStrings.js:
49
50         * UserInterface/Base/Main.js:
51         (WI.contentLoaded):
52         (WI._tryToRestorePendingTabs):
53         Retain legacy behavior behind experimental feature setting.
54         (WI.isNewTabWithTypeAllowed):
55
56         * UserInterface/Base/Setting.js:
57         * UserInterface/Main.html:
58
59         * UserInterface/Views/CanvasTabContentView.js:
60         (WI.CanvasTabContentView):
61         * UserInterface/Views/ConsoleTabContentView.js:
62         (WI.ConsoleTabContentView):
63         * UserInterface/Views/DebuggerTabContentView.js:
64         (WI.DebuggerTabContentView):
65         * UserInterface/Views/ElementsTabContentView.js:
66         (WI.ElementsTabContentView):
67
68         * UserInterface/Views/GeneralTabBarItem.js:
69         (WI.GeneralTabBarItem):
70         (WI.GeneralTabBarItem.prototype.fromTabInfo):
71         (WI.GeneralTabBarItem.prototype.get isEphemeral):
72         (WI.GeneralTabBarItem.fromTabContentViewConstructor): Deleted.
73
74         * UserInterface/Views/LayersTabContentView.js:
75         (WI.LayersTabContentView):
76
77         * UserInterface/Views/LegacyTabBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/TabBar.js.
78         (WI.LegacyTabBar):
79         (WI.LegacyTabBar.prototype.get newTabTabBarItem):
80         (WI.LegacyTabBar.prototype.updateNewTabTabBarItemState):
81         (WI.LegacyTabBar.prototype.addTabBarItem):
82         (WI.LegacyTabBar.prototype.insertTabBarItem.animateTabs):
83         (WI.LegacyTabBar.prototype.insertTabBarItem.removeStyles):
84         (WI.LegacyTabBar.prototype.insertTabBarItem):
85         (WI.LegacyTabBar.prototype.removeTabBarItem.animateTabs):
86         (WI.LegacyTabBar.prototype.removeTabBarItem.removeStyles):
87         (WI.LegacyTabBar.prototype.removeTabBarItem):
88         (WI.LegacyTabBar.prototype.selectPreviousTab):
89         (WI.LegacyTabBar.prototype.selectNextTab):
90         (WI.LegacyTabBar.prototype.get selectedTabBarItem):
91         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
92         (WI.LegacyTabBar.prototype.get tabBarItems):
93         (WI.LegacyTabBar.prototype.get normalTabCount):
94         (WI.LegacyTabBar.prototype.layout.forceItemHidden):
95         (WI.LegacyTabBar.prototype.layout):
96         (WI.LegacyTabBar.prototype._tabBarItemsFromLeftToRight):
97         (WI.LegacyTabBar.prototype._findTabBarItem):
98         (WI.LegacyTabBar.prototype._hasMoreThanOneNormalTab):
99         (WI.LegacyTabBar.prototype._openDefaultTab):
100         (WI.LegacyTabBar.prototype._recordTabBarItemSizesAndPositions):
101         (WI.LegacyTabBar.prototype._applyTabBarItemSizesAndPositions):
102         (WI.LegacyTabBar.prototype._clearTabBarItemSizesAndPositions):
103         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose.):
104         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose):
105         (WI.LegacyTabBar.prototype._handleMouseDown):
106         (WI.LegacyTabBar.prototype._handleClick):
107         (WI.LegacyTabBar.prototype._handleMouseMoved):
108         (WI.LegacyTabBar.prototype._handleMouseUp):
109         (WI.LegacyTabBar.prototype._handleMouseLeave):
110         (WI.LegacyTabBar.prototype._handleContextMenu):
111         (WI.LegacyTabBar.prototype._handleNewTabClick):
112         (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu):
113         (WI.LegacyTabBar.prototype._handleNewTabMouseEnter):
114
115         * UserInterface/Views/NetworkTabContentView.js:
116         (WI.NetworkTabContentView):
117         * UserInterface/Views/NewTabContentView.js:
118         (WI.NewTabContentView):
119         (WI.NewTabContentView.tabInfo):
120         (WI.NewTabContentView.isEphemeral): Deleted.
121         * UserInterface/Views/ResourcesTabContentView.js:
122         (WI.ResourcesTabContentView):
123         * UserInterface/Views/SearchTabContentView.js:
124         (WI.SearchTabContentView):
125         (WI.SearchTabContentView.tabInfo):
126         (WI.SearchTabContentView.isEphemeral): Deleted.
127
128         * UserInterface/Views/SettingsTabContentView.js:
129         (WI.SettingsTabContentView.tabInfo):
130         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
131         (WI.SettingsTabContentView.isEphemeral): Deleted.
132
133         * UserInterface/Views/StorageTabContentView.js:
134         (WI.StorageTabContentView):
135
136         * UserInterface/Views/TabBar.css:
137         * UserInterface/Views/TabBar.js:
138         (WI.TabBar):
139         (WI.TabBar.prototype.insertTabBarItem):
140         (WI.TabBar.prototype.removeTabBarItem):
141         (WI.TabBar.prototype.set selectedTabBarItem):
142         (WI.TabBar.prototype.get normalNonEphemeralTabCount):
143         (WI.TabBar.prototype._handleMouseDown):
144         (WI.TabBar.prototype._handleClick):
145         (WI.TabBar.prototype._handleMouseMoved):
146         (WI.TabBar.prototype._handleMouseLeave):
147         (WI.TabBar.prototype._handleContextMenu):
148         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
149         (WI.TabBar.prototype.get newTabTabBarItem): Deleted.
150         (WI.TabBar.prototype.updateNewTabTabBarItemState): Deleted.
151         (WI.TabBar.prototype._openDefaultTab): Deleted.
152         (WI.TabBar.prototype._handleNewTabClick): Deleted.
153         (WI.TabBar.prototype._handleNewTabMouseEnter): Deleted.
154         Remove support for the New Tab button and default tab. Without a default
155         tab, there is nothing to display when no tabs are open, so prevent the
156         last non-pinned tab from being removed.
157
158         * UserInterface/Views/TabBrowser.js:
159         (WI.TabBrowser._tabBarItemRemoved):
160         * UserInterface/Views/TabContentView.js:
161         (WI.TabContentView.isEphemeral): Deleted.
162         * UserInterface/Views/TimelineTabContentView.js:
163         (WI.TimelineTabContentView):
164
165 2018-01-30  Devin Rousso  <webkit@devinrousso.com>
166
167         Web Inspector: Replace Object.shallowMerge with ES2018 spread operator
168         https://bugs.webkit.org/show_bug.cgi?id=182219
169
170         Reviewed by Brian Burg.
171
172         * UserInterface/Base/Utilities.js:
173         (Object.shallowMerge): Deleted.
174         * UserInterface/Base/DOMUtilities.js:
175         (WI.linkifyNodeReference):
176         * UserInterface/Base/Main.js:
177         (WI.handlePossibleLinkClick):
178         (WI.openURL):
179         (WI.showSourceCodeLocation):
180         (WI.showOriginalUnformattedSourceCodeLocation):
181         (WI.showOriginalOrFormattedSourceCodeLocation):
182         (WI.showOriginalOrFormattedSourceCodeTextRange):
183         (WI.linkifyLocation):
184         * UserInterface/Views/DOMTreeElement.js:
185         (WI.DOMTreeElement.prototype._insertAdjacentHTML):
186         * UserInterface/Views/WebSocketContentView.js:
187         (WI.WebSocketContentView.prototype._addRow):
188
189 2018-01-26  Matt Baker  <mattbaker@apple.com>
190
191         Web Inspector: Timelines content browser NavigationBar is squashed at narrow heights
192         https://bugs.webkit.org/show_bug.cgi?id=182196
193         <rdar://problem/36929899>
194
195         Reviewed by Joseph Pecoraro.
196
197         * UserInterface/Views/NavigationBar.css:
198         (.navigation-bar):
199
200 2018-01-26  Matt Baker  <mattbaker@apple.com>
201
202         Web Inspector: TabBar redesign: improvements to tab layout and resize behavior
203         https://bugs.webkit.org/show_bug.cgi?id=181468
204         <rdar://problem/36395439>
205
206         Reviewed by Devin Rousso.
207
208         * Localizations/en.lproj/localizedStrings.js:
209
210         * UserInterface/Images/TabPicker.svg: Added.
211         New ">>" icon for the tab picker button.
212
213         * UserInterface/Views/CanvasTabContentView.js:
214         (WI.CanvasTabContentView):
215         * UserInterface/Views/ConsoleTabContentView.js:
216         (WI.ConsoleTabContentView):
217         * UserInterface/Views/DebuggerTabContentView.js:
218         (WI.DebuggerTabContentView):
219         * UserInterface/Views/ElementsTabContentView.js:
220         (WI.ElementsTabContentView):
221
222         * UserInterface/Views/GeneralTabBarItem.js:
223         (WI.GeneralTabBarItem):
224         (WI.GeneralTabBarItem.fromTabContentViewConstructor):
225         (WI.GeneralTabBarItem.prototype.get title):
226         Add missing override for getter/setter pair.
227         (WI.GeneralTabBarItem.prototype.set title):
228         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent):
229         Show the close button on ephemeral tabs only (Search, New Tab).
230         Replace unused `representedObject` parameter with `isEphemeral`, which
231         determines whether to show a close button for the tab.
232
233         * UserInterface/Views/LayersTabContentView.js:
234         (WI.LayersTabContentView):
235
236         * UserInterface/Views/NavigationBar.js:
237         Remove unused symbol.
238
239         * UserInterface/Views/NetworkTabContentView.js:
240         (WI.NetworkTabContentView):
241         * UserInterface/Views/NewTabContentView.js:
242         (WI.NewTabContentView):
243
244         * UserInterface/Views/PinnedTabBarItem.js:
245         (WI.PinnedTabBarItem):
246         Remove unused parameter.
247
248         * UserInterface/Views/ResourcesTabContentView.js:
249         (WI.ResourcesTabContentView):
250         * UserInterface/Views/SearchTabContentView.js:
251         (WI.SearchTabContentView):
252         * UserInterface/Views/StorageTabContentView.js:
253         (WI.StorageTabContentView):
254
255         * UserInterface/Views/TabBar.css:
256         (.tab-bar > .item):
257         (.tab-bar.calculate-width > .item):
258         (.tab-bar > .item.pinned.tab-picker):
259         (.tab-bar > .item > .close):
260         (.tab-bar > .item > .title):
261         (.tab-bar:not(.collapsed) > .item > .title):
262         (.tab-bar.collapsed > .item:not(.pinned) > .icon):
263         (.tab-bar > .item:hover > .close):
264         (.tab-bar.collapsed > .item:hover > .close):
265         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon):
266         (.tab-bar.collapsed > .item.ephemeral:hover > .title):
267         (body[dir=ltr] .tab-bar > .item > .close): Deleted.
268         (body[dir=rtl] .tab-bar > .item > .close): Deleted.
269         (.tab-bar > .item > .flex-space): Deleted.
270         (.tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
271         (body[dir=ltr] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
272         (body[dir=rtl] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
273         (body[dir=ltr] .tab-bar > .item > .title): Deleted.
274         (body[dir=rtl] .tab-bar > .item > .title): Deleted.
275         (.tab-bar.collapsed > .item): Deleted.
276         (.tab-bar.collapsed > .item > .flex-space): Deleted.
277         (.tab-bar.collapsed > .item > .close): Deleted.
278         (body[dir=ltr] .tab-bar.collapsed > .item > .close): Deleted.
279         (body[dir=rtl] .tab-bar.collapsed > .item > .close): Deleted.
280         (.tab-bar.hide-titles > .item > .title): Deleted.
281         (.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned):hover > .icon,): Deleted.
282         (.tab-bar.collapsed:not(.hide-titles) > .item:hover > .close,): Deleted.
283         Clean up tab styles and prevent tabs from shrinking during flex layout.
284         Added new `calculate-width` class, to disable flex layout when measuring
285         the minimum width of the TabBar required to fit all tab items.
286
287         * UserInterface/Views/TabBar.js:
288         (WI.TabBar):
289         (WI.TabBar.prototype.set selectedTabBarItem):
290         (WI.TabBar.prototype.layout.forceItemHidden):
291         (WI.TabBar.prototype.layout):
292         Perform two layout passes, similar to NavigationBar. The first pass disables
293         flex layout and measures tab items at full size. If the bar isn't wide enough
294         to show all the tabs, hide their icons and measure again. If there still isn't
295         room, hide tabs starting from the end of the bar and display the tab picker.
296
297         (WI.TabBar.prototype._handleMouseDown):
298         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
299
300         * UserInterface/Views/TabBarItem.js:
301         (WI.TabBarItem):
302
303         * UserInterface/Views/TimelineTabContentView.js:
304         (WI.TimelineTabContentView):
305
306 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
307
308         Web Inspector: Network Table: Sort indicator is not displayed when sorted column is hidden and re-shown
309         https://bugs.webkit.org/show_bug.cgi?id=182164
310         <rdar://problem/36892619>
311
312         Reviewed by Brian Burg.
313
314         * UserInterface/Views/Table.js:
315         (WI.Table.prototype.showColumn):
316         Re-add the sort classes if the column being shown is the active sort column.
317
318 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
319
320         Web Inspector: Network - Cookies view should behave better at narrow widths, all data is hidden
321         https://bugs.webkit.org/show_bug.cgi?id=182163
322         <rdar://problem/36893241>
323
324         Reviewed by Brian Burg.
325
326         * UserInterface/Views/ResourceCookiesContentView.css:
327         (.resource-cookies .table):
328         Give these tables a reasonable minimum size so that if the inspector
329         is narrow, the content view can still be scrolled to see all of
330         the table data.
331
332         * UserInterface/Views/Table.css:
333         (.table > .header):
334         Match the data-container and mark overflow as hidden, otherwise
335         super narrow widths show header content beyond the edge.
336
337 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
338
339         Web Inspector: "Displayed Columns" should not be displayed in context menu if all columns are required columns
340         https://bugs.webkit.org/show_bug.cgi?id=182162
341         <rdar://problem/36893758>
342
343         Reviewed by Matt Baker.
344
345         * UserInterface/Views/Table.js:
346         (WI.Table.prototype._handleHeaderContextMenu):
347         Only add the header column when we know there are hideable columns.
348
349 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
350
351         Web Inspector: Simplify update-LegacyInspectorBackendCommands.rb
352         https://bugs.webkit.org/show_bug.cgi?id=182067
353
354         Reviewed by Brian Burg.
355
356         * Scripts/update-LegacyInspectorBackendCommands.rb:
357         Remove stale dependency_json, it has always been empty for a while now.
358         Switch to framework WebInspectorUI to generate only the backend commands
359         and not spend time generating a bunch of cpp files.
360
361 2018-01-24  Nikita Vasilyev  <nvasilyev@apple.com>
362
363         REGRESSION (r226994): Web Inspector: Styles: Suggestions popover floats in top-left corner of Web Inspector after tabbing
364         https://bugs.webkit.org/show_bug.cgi?id=182027
365
366         Reviewed by Matt Baker.
367
368         r226994 added a layout of all properties on property removal. Layout caused
369         a property element to be removed from DOM right before dislaying the suggestion
370         popover, resulting in the popover being displayed at the top left corner.
371
372         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
373         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
374         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
375         Only update property view indices when a property is removed.
376
377         * UserInterface/Views/SpreadsheetStyleProperty.js:
378         (WI.SpreadsheetStyleProperty):
379         (WI.SpreadsheetStyleProperty.prototype.set index):
380
381         * UserInterface/Views/SpreadsheetTextField.js:
382         (WI.SpreadsheetTextField.prototype._updateCompletions):
383         Checking this._element.parentNode to see if the element is attached to the DOM tree is unreliable,
384         since the element may have a non-null parent node that is detached from the DOM tree. To fix that,
385         we could traverse element's ancestors, but I used a concise isConnected property instead.
386
387 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
388
389         ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
390         https://bugs.webkit.org/show_bug.cgi?id=182059
391
392         Reviewed by Matt Baker.
393
394         * UserInterface/Models/ScriptSyntaxTree.js:
395         (WI.ScriptSyntaxTree.functionReturnDivot):
396         DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
397         a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
398         back to the latest path (non-iOS 9) target.
399
400 2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
401
402         Web Inspector: Network's columns shake when scrolling at non-default zoom level
403         https://bugs.webkit.org/show_bug.cgi?id=181998
404         <rdar://problem/36449808>
405
406         Reviewed by Matt Baker.
407
408         * UserInterface/Views/Table.js:
409         When zoomed the bounding client rect values were fractional, which was
410         unexpected by this area of code. Floor the values to get a value we expect
411         to be able to evenly distribute.
412
413 2018-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
414
415         Web Inspector: Styles Redesign: data corruption when updating values quickly
416         https://bugs.webkit.org/show_bug.cgi?id=179461
417         <rdar://problem/35431882>
418
419         Reviewed by Joseph Pecoraro.
420
421         Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
422         update synchronously. Making two or more quick changes resulted in corrupted data.
423
424         Imagine we modify a CSS value 3 times:
425
426         Front-end:  (1)-(2)---(3)
427         Back-end:          (1)-----(2)-(3)
428
429         The first response from the backend could happen after the 2nd edit. In this patch,
430         CSSStyleDeclaration is locked when its view is being edited.
431
432         To correctly display invalid and overridden properties, the backend is allowed to update
433         CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
434         matches the model's text. This should happen when the backend is caught up with the
435         front-end changes.
436
437         * UserInterface/Models/CSSProperty.js:
438         (WI.CSSProperty.prototype.update):
439         * UserInterface/Models/CSSStyleDeclaration.js:
440         (WI.CSSStyleDeclaration):
441         (WI.CSSStyleDeclaration.prototype.get locked):
442         (WI.CSSStyleDeclaration.prototype.set locked):
443         (WI.CSSStyleDeclaration.prototype.set text):
444
445         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
446         (WI.SpreadsheetCSSStyleDeclarationEditor):
447         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
448         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
449         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
450         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
451         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
452         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
453         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
454         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
455         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
456         Lock CSSStyleDeclaration when a CSS property name or value is focused or
457         an inline widget is active.
458
459         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
460         (WI.SpreadsheetCSSStyleDeclarationSection):
461         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
462         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
463         * UserInterface/Views/SpreadsheetStyleProperty.js:
464         (WI.SpreadsheetStyleProperty):
465         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
466         When selector is focused, clicking on the white-space should not add a new blank property.
467
468 2018-01-19  Ross Kirsling  <ross.kirsling@sony.com>
469
470         Web Inspector: Layers tab should do away with popovers (if possible)
471         https://bugs.webkit.org/show_bug.cgi?id=181805
472
473         Reviewed by Matt Baker.
474
475         * Localizations/en.lproj/localizedStrings.js:
476         Remove superfluous colon from a string.
477
478         * UserInterface/Main.html:
479         * UserInterface/Views/LayerDetailsSidebarPanel.css:
480         * UserInterface/Views/Layers3DContentView.css: Added.
481         Remove popover styling from sidebar, add new file with similar styling for canvas overlay.
482
483         * UserInterface/Views/LayerDetailsSidebarPanel.js:
484         (WI.LayerDetailsSidebarPanel):
485         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
486         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
487         (WI.LayerDetailsSidebarPanel.prototype._updateLayers):
488         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
489         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
490         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
491         (WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
492         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
493         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
494         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.
495         * UserInterface/Views/Layers3DContentView.js:
496         (WI.Layers3DContentView):
497         (WI.Layers3DContentView.prototype.shown):
498         (WI.Layers3DContentView.prototype.selectLayerById):
499         (WI.Layers3DContentView.prototype._canvasMouseDown):
500         (WI.Layers3DContentView.prototype._buildLayerInfoElement):
501         (WI.Layers3DContentView.prototype._updateLayerInfoElement):
502         (WI.Layers3DContentView.prototype._updateReasonsList):
503         Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
504         Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!
505
506 2018-01-19  Matt Baker  <mattbaker@apple.com>
507
508         Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
509         https://bugs.webkit.org/show_bug.cgi?id=181865
510         <rdar://problem/36664737>
511
512         Reviewed by Devin Rousso.
513
514         * UserInterface/Views/CanvasContentView.js:
515         (WI.CanvasContentView.prototype._recordingStarted):
516         (WI.CanvasContentView.prototype._recordingStopped):
517
518 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
519
520         Web Inspector: Styles Redesign: tabbing on commented out property throws exception
521         https://bugs.webkit.org/show_bug.cgi?id=180676
522         <rdar://problem/35981058>
523
524         Reviewed by Joseph Pecoraro.
525
526         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
527         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
528         Tabbing from the selector field should focus on the first editable property.
529         When no editable properties are present, a new blank property should be added after the commented out ones.
530
531         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
532         Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
533         When no editable properties are present, a new blank property should be added after the commented out ones.
534
535         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
536         When navigating between properties skip the commented out ones.
537
538         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
539         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):
540         * UserInterface/Views/SpreadsheetStyleProperty.js:
541         (WI.SpreadsheetStyleProperty.prototype.get enabled):
542         (WI.SpreadsheetStyleProperty.prototype._update):
543
544 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
545
546         Web Inspector: Make styles sidebar always LTR
547         https://bugs.webkit.org/show_bug.cgi?id=175357
548         <rdar://problem/33787988>
549
550         Reviewed by Joseph Pecoraro.
551
552         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
553         (WI.SpreadsheetRulesStyleDetailsPanel):
554
555 2018-01-19  Keith Miller  <keith_miller@apple.com>
556
557         HaveInternalSDK includes should be "#include?"
558         https://bugs.webkit.org/show_bug.cgi?id=179670
559
560         Reviewed by Dan Bernstein.
561
562         * Configurations/Base.xcconfig:
563
564 2018-01-18  Dan Bernstein  <mitz@apple.com>
565
566         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
567         https://bugs.webkit.org/show_bug.cgi?id=181803
568
569         Reviewed by Tim Horton.
570
571         * Configurations/Base.xcconfig: Updated.
572         * Configurations/DebugRelease.xcconfig: Ditto.
573         * Configurations/Version.xcconfig: Ditto.
574
575 2018-01-18  Devin Rousso  <webkit@devinrousso.com>
576
577         Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
578         https://bugs.webkit.org/show_bug.cgi?id=179183
579
580         Reviewed by Joseph Pecoraro.
581
582         * UserInterface/Views/CanvasOverviewContentView.css:
583         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.
584
585 2018-01-17  Devin Rousso  <webkit@devinrousso.com>
586
587         Web Inspector: clicking on a path component that has no siblings should select it
588         https://bugs.webkit.org/show_bug.cgi?id=181772
589
590         Reviewed by Joseph Pecoraro.
591
592         * UserInterface/Views/HierarchicalPathComponent.js:
593         (WI.HierarchicalPathComponent.prototype._updateSelectElement):
594         (WI.HierarchicalPathComponent.prototype._selectElementMouseDown):
595
596 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
597
598         Web Inspector: Add back localized strings for Styles sidebar panels
599         https://bugs.webkit.org/show_bug.cgi?id=181748
600         <rdar://problem/36583184>
601
602         Reviewed by Brian Burg.
603
604         * Localizations/en.lproj/localizedStrings.js:
605         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
606         (WI.ComputedStyleDetailsSidebarPanel):
607         * UserInterface/Views/RulesStyleDetailsSidebarPanel.js:
608         (WI.RulesStyleDetailsSidebarPanel):
609         * UserInterface/Views/VisualStyleDetailsSidebarPanel.js:
610         (WI.VisualStyleDetailsSidebarPanel):
611         Add back localized strings for panel titles lost in r225547.
612
613 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
614
615         Web Inspector: Super long URL string causes bad wrapping in Resources detail sidebar
616         https://bugs.webkit.org/show_bug.cgi?id=181617
617
618         Reviewed by Brian Burg.
619
620         * UserInterface/Views/DetailsSection.css:
621         (.details-section > .content > .group > .row.simple > .value):
622         Set the break to all characters.
623
624 2018-01-16  Matt Baker  <mattbaker@apple.com>
625
626         Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
627         https://bugs.webkit.org/show_bug.cgi?id=181706
628         <rdar://problem/36558221>
629
630         Reviewed by Joseph Pecoraro.
631
632         * UserInterface/Views/CanvasOverviewContentView.js:
633         (WI.CanvasOverviewContentView):
634         (WI.CanvasOverviewContentView.prototype._handleSpace):
635
636 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
637
638         Web Inspector: Make Console's Execution Context picker stand out when it is non-default
639         https://bugs.webkit.org/show_bug.cgi?id=181628
640         <rdar://problem/36492044>
641
642         Reviewed by Matt Baker.
643
644         * UserInterface/Views/HierarchicalPathComponent.css:
645         (.hierarchical-path-component > .selector-arrows):
646         * UserInterface/Views/HierarchicalPathComponent.js:
647         (WI.HierarchicalPathComponent.prototype.set selectorArrows):
648         Switch to SVG element so we can style the arrows.
649
650         * UserInterface/Views/QuickConsole.css:
651         (.quick-console > .navigation-bar > .hierarchical-path .execution-context):
652         (.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator):
653         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context):
654         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows):
655         Styles for the execution context picker. We hide the unused separator
656         and instead use margin so that the selected background and border don't
657         have an extra 7px on the right/end side.
658
659         * UserInterface/Views/QuickConsole.js:
660         (WI.QuickConsole.prototype._activeExecutionContextChanged):
661         Toggle the non-default class name on the path.
662
663 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
664
665         Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value
666         https://bugs.webkit.org/show_bug.cgi?id=181633
667         <rdar://problem/36501797>
668
669         Reviewed by Joseph Pecoraro.
670
671         * UserInterface/Views/SpreadsheetTextField.js:
672         (WI.SpreadsheetTextField.prototype._updateCompletions):
673
674 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
675
676         Web Inspector: Styles Redesign: Long value causes bad wrapping
677         https://bugs.webkit.org/show_bug.cgi?id=181618
678         <rdar://problem/36485175>
679
680         Reviewed by Joseph Pecoraro.
681
682         Wrap long values only when editing.
683
684         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
685         (.spreadsheet-style-declaration-editor .value.editing):
686
687 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
688
689         Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index
690         https://bugs.webkit.org/show_bug.cgi?id=179585
691         <rdar://problem/35490780>
692
693         Reviewed by Joseph Pecoraro.
694
695         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
696         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
697         Layout call is needed to update data-property-index attributes on the property views.
698
699 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
700
701         Web Inspector: Network Tab - Export HAR Context Menu not working
702         https://bugs.webkit.org/show_bug.cgi?id=181694
703         <rdar://problem/36479197>
704
705         Reviewed by Brian Burg.
706
707         * UserInterface/Views/NetworkTableContentView.js:
708         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
709         Ensure `this` works in the handler.
710
711 2018-01-15  Matt Baker  <mattbaker@apple.com>
712
713         Web Inspector: TabBar redesign: add context menu to TabBar for toggling available tabs
714         https://bugs.webkit.org/show_bug.cgi?id=181448
715         <rdar://problem/36383298>
716
717         Reviewed by Devin Rousso.
718
719         * UserInterface/Base/Main.js:
720         (WI.loaded):
721         (WI.contentLoaded):
722         Reorder production tab classes and default (open) tabs.
723         (WI.registerTabClass): Removed.
724         Not used.
725
726         * UserInterface/Base/Object.js:
727         Remove notification that is no longer used.
728
729         * UserInterface/Views/GeneralTabBarItem.js:
730         (WI.GeneralTabBarItem):
731         (WI.GeneralTabBarItem.prototype.set title):
732         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent): Deleted.
733         Remove per-tab context menu (provided Close Tab and Close Other Tabs).
734
735         * UserInterface/Views/NewTabContentView.js:
736         (WI.NewTabContentView):
737
738         * UserInterface/Views/TabBar.js:
739         (WI.TabBar):
740         (WI.TabBar.prototype._handleContextMenu):
741
742         * UserInterface/Views/TabBrowser.js:
743         (WI.TabBrowser):
744         (WI.TabBrowser._handleNewTabContextMenu): Deleted.
745         No longer needed.
746
747 2018-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
748
749         Web Inspector: Styles Redesign: properties should never be semitransparent or crossed out while editing
750         https://bugs.webkit.org/show_bug.cgi?id=180793
751         <rdar://problem/36038813>
752
753         Reviewed by Devin Rousso.
754
755         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
756         (.spreadsheet-style-declaration-editor .value.editing):
757         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
758         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled) .content > *):
759         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .content .value):
760         (.spreadsheet-style-declaration-editor .property.not-inherited .content > *):
761         * UserInterface/Views/SpreadsheetStyleProperty.js:
762         (WI.SpreadsheetStyleProperty.prototype._update):
763
764 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
765
766         Web Inspector: Drop support for iOS 7 targets
767         https://bugs.webkit.org/show_bug.cgi?id=181549
768         <rdar://problem/36444813>
769
770         Reviewed by Brian Burg.
771
772         * Versions/Inspector-iOS-7.0.json: Removed.
773         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Removed.
774         Remove protocol snapshot and generated commands for iOS 7.
775
776         * UserInterface/Base/Main.js:
777         * UserInterface/Controllers/BreakpointPopoverController.js:
778         (WI.BreakpointPopoverController.prototype._createPopoverContent):
779         * UserInterface/Controllers/DebuggerManager.js:
780         (WI.DebuggerManager.prototype._setBreakpoint):
781         * UserInterface/Controllers/SourceMapManager.js:
782         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
783         * UserInterface/Models/Instrument.js:
784         (WI.Instrument.startLegacyTimelineAgent):
785         * UserInterface/Models/ResourceTimingData.js:
786         * UserInterface/Models/ScriptTimelineRecord.js:
787         (WI.ScriptTimelineRecord.EventType.displayName):
788         * UserInterface/Models/SourceMapResource.js:
789         (WI.SourceMapResource.prototype.requestContentFromBackend):
790         * UserInterface/Protocol/CSSObserver.js:
791         (WI.CSSObserver.prototype.regionLayoutUpdated): Deleted.
792         * UserInterface/Protocol/RemoteObject.js:
793         (WI.RemoteObject.fromPayload):
794         Remove code that was only necessary to support iOS 7.
795
796 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
797
798         Web Inspector: Support JSX (React) syntax highlighting
799         https://bugs.webkit.org/show_bug.cgi?id=181607
800         <rdar://problem/36442564>
801
802         Reviewed by Brian Burg.
803
804         * UserInterface/Base/MIMETypeUtilities.js:
805         (WI.mimeTypeForFileExtension):
806         (WI.fileExtensionForMIMEType):
807         * UserInterface/Models/Resource.js:
808         Support the jsx extension and mime types.
809
810         * UserInterface/Main.html:
811         * Scripts/update-codemirror-resources.rb:
812         * UserInterface/External/CodeMirror/jsx.js: Added.
813         Include new mode from CodeMirror@d8926768.
814
815 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
816
817         Web Inspector: Rename "Query String" section as "Query String Parameters" for clarity
818         https://bugs.webkit.org/show_bug.cgi?id=181464
819
820         Reviewed by Darin Adler.
821
822         * Localizations/en.lproj/localizedStrings.js:
823         * UserInterface/Views/ResourceHeadersContentView.js:
824         (WI.ResourceHeadersContentView.prototype.initialLayout):
825
826 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
827
828         Web Inspector: Remove unused variable in WI.DebuggerSidebarPanel
829         https://bugs.webkit.org/show_bug.cgi?id=181517
830
831         Reviewed by Matt Baker.
832
833         * UserInterface/Views/DebuggerSidebarPanel.js:
834
835 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
836
837         REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)
838         https://bugs.webkit.org/show_bug.cgi?id=181518
839         <rdar://problem/36427197>
840
841         Reviewed by Matt Baker.
842
843         * UserInterface/Views/NavigationSidebarPanel.css:
844         (.sidebar > .panel.navigation > .overflow-shadow.top):
845         * UserInterface/Views/NavigationSidebarPanel.js:
846         (WI.NavigationSidebarPanel):
847         Add back the initialization parameter still used by SearchSidebarPanel
848         and add back its implementation. There were still references to
849         dynamically update _topOverflowShadowElement in NavigationSidebarPanel.
850
851 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
852
853         Web Inspector: Incorrect check with WI.debuggableType
854         https://bugs.webkit.org/show_bug.cgi?id=181515
855         <rdar://problem/36425509>
856
857         Reviewed by Brian Burg.
858
859         * UserInterface/Base/Main.js:
860         (WI.contentLoaded):
861         This moved to WI.sharedApp a while ago.
862
863 2018-01-10  Matt Baker  <mattbaker@apple.com>
864
865         Web Inspector: Canvas tab: throttle recording slider updates
866         https://bugs.webkit.org/show_bug.cgi?id=180839
867         <rdar://problem/36057849>
868
869         Reviewed by Joseph Pecoraro
870
871         * UserInterface/Base/Utilities.js:
872         Add Object.throttle and Function.cancelThrottle. Repeated calls to a
873         function on a throttled object are delayed, so that the function isn't
874         invoked more frequently than the specified delay value.
875
876         For a description of throttling behavior see:
877           - http://www.chrislondon.co/throttling-vs-debouncing
878           - http://benalman.com/projects/jquery-throttle-debounce-plugin
879
880         * UserInterface/Views/RecordingContentView.js:
881         (WI.RecordingContentView.prototype.updateActionIndex):
882         Throttle frequency of canvas snapshot creation to 200ms.
883         (WI.RecordingContentView.prototype.hidden):
884         Prevent trailing edge call after hiding the view.
885
886 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
887
888         Web Inspector: Should not try to autocomplete subsections of a string
889         https://bugs.webkit.org/show_bug.cgi?id=181461
890         <rdar://problem/36369421>
891
892         Reviewed by Brian Burg.
893
894         * UserInterface/Controllers/CodeMirrorCompletionController.js:
895         (WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
896         Disable autocompletion within strings.
897
898 2018-01-09  Joseph Pecoraro  <pecoraro@apple.com>
899
900         REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal
901         https://bugs.webkit.org/show_bug.cgi?id=181462
902         <rdar://problem/36390699>
903
904         Reviewed by Matt Baker.
905
906         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
907         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
908         This is code that runs on the inspected target, which may have an old version of
909         WebKit/JavaScriptCore, so don't use new syntax like this.
910
911         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
912         We intended to return the result by as a JSON value instead of a RemoteObject.
913
914 2018-01-09  Ross Kirsling  <ross.kirsling@sony.com>
915
916         Web Inspector: Layers sidebar shows popover on selection even when collapsed
917         https://bugs.webkit.org/show_bug.cgi?id=181465
918
919         Reviewed by Matt Baker.
920
921         * UserInterface/Views/LayerDetailsSidebarPanel.js:
922         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
923         Have sidebar show itself if necessary before displaying popover.
924
925 2018-01-08  Joseph Pecoraro  <pecoraro@apple.com>
926
927         Web Inspector: Find next / previous within a resource content view does not have bouncy highlight when editor scrolls
928         https://bugs.webkit.org/show_bug.cgi?id=181279
929         <rdar://problem/36291097>
930
931         Reviewed by Brian Burg.
932
933         * UserInterface/Views/TextEditor.js:
934         (WI.TextEditor.prototype._revealSearchResult):
935         Reposition the bouncy highlight on scroll based on the CodeMirror
936         line/ch position of the search result.
937
938         (WI.TextEditor.prototype._removeBouncyHighlightElementIfNeeded):
939         Track the bouncy highlight scroll handler in a member variable so that
940         we always remember to remove it and don't leak scroll handlers.
941
942 2018-01-07  David Kilzer  <ddkilzer@apple.com>
943
944         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
945         <https://webkit.org/b/181256>
946         <rdar://problem/36281730>
947
948         Reviewed by Darin Adler.
949
950         * Configurations/Base.xcconfig:
951         (WARNING_CFLAGS): Add -Wcast-qual.
952
953 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
954
955         Web Inspector: Add another Protocol Version
956         https://bugs.webkit.org/show_bug.cgi?id=181354
957         <rdar://problem/35432817>
958
959         Reviewed by Matt Baker.
960
961         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js: Added.
962         * Versions/Inspector-iOS-11.3.json: Added.
963
964 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
965
966         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
967         https://bugs.webkit.org/show_bug.cgi?id=180770
968
969         Reviewed by Joseph Pecoraro.
970
971         * UserInterface/Models/Canvas.js:
972         (WI.Canvas.fromPayload):
973         (WI.Canvas.prototype.get contextType):
974         (WI.Canvas.prototype.saveIdentityToCookie):
975         (WI.Canvas.prototype.get frame): Deleted.
976
977 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
978
979         REGRESSION (r225709): Web Inspector: CSS Source maps not loading
980         https://bugs.webkit.org/show_bug.cgi?id=181314
981         <rdar://problem/36177620>
982
983         Reviewed by Brian Burg.
984
985         * UserInterface/Controllers/SourceMapManager.js:
986         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
987         * UserInterface/Models/SourceMapResource.js:
988         (WI.SourceMapResource.prototype.requestContentFromBackend):
989         Correct this so that we only fall back to a reasonable frame id
990         if we couldn't determine a frame id from earlier. Previously this
991         was incorrectly clearing the frame id if we had gotten it earlier.
992
993         * UserInterface/Test.html:
994         * UserInterface/Test/Test.js:
995         (WI.loaded):
996         Add SourceMap related files for tests.
997
998 2018-01-04  Brian Burg  <bburg@apple.com>
999
1000         Web Inspector: Capture Element Screenshot looks fuzzy
1001         https://bugs.webkit.org/show_bug.cgi?id=175734
1002         <rdar://problem/33803377>
1003
1004         Reviewed by Joseph Pecoraro and Simon Fraser.
1005
1006         Spruce up these functions a bit. They now optionally return a promise
1007         if no callback is supplied. They now can take either a WI.DOMNode or a node id.
1008
1009         * UserInterface/Controllers/DOMTreeManager.js:
1010         (WI.DOMTreeManager.prototype.querySelector):
1011         (WI.DOMTreeManager.prototype.querySelectorAll):
1012
1013 2018-01-04  Brian Burg  <bburg@apple.com>
1014
1015         Web Inspector: add RemoteObject.fetchProperties and some basic tests for RemoteObject API
1016         https://bugs.webkit.org/show_bug.cgi?id=180945
1017
1018         Reviewed by Joseph Pecoraro.
1019
1020         Add a new method, fetchProperties, which async fetches an arbitrary list of properties
1021         from a RemoteObject. This is intended for writing tests and other quick evaluations,
1022         so it has some behaviors that are suitable in these situations:
1023         - If the evaluation throws an exception, the result will reject with that exception.
1024         - If there is a protocol error for some reason, the result will reject with an exception.
1025         - Non-string and non-number keys cause an exception, as this is probably not intended.
1026         - Does not accept a callback, returns a promise only. New code should use async.
1027
1028         For full fidelity introspection of property descriptors, clients should use the existing
1029         getOwnPropertyDescriptor[s] class of methods.
1030
1031         * UserInterface/Protocol/RemoteObject.js:
1032         (WI.RemoteObject.prototype.async.fetchProperties): Added.
1033         - Validate specified keys and remove duplicates.
1034         - Request properties one-by-one to avoid fetching all descriptors and dealing with previews.
1035         - Unwrap returned primitive values to avoid unnecessary munging in tests.
1036
1037         (WI.RemoteObject.prototype.getProperty):
1038         - Rework this to return a promise if no callback was supplied.
1039         - Introduce stricter property type checking to avoid unintended mistakes.
1040
1041         (WI.RemoteObject.prototype.callFunction):
1042         - Rework this to return a promise if no callback was supplied.
1043         - Turn thrown exceptions and protocol errors into rejected promises.
1044
1045 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
1046
1047         Web Inspector: ⌘G / ⇧⌘G text search does not working after closing find banner
1048         https://bugs.webkit.org/show_bug.cgi?id=181280
1049         <rdar://problem/36291175>
1050
1051         Reviewed by Matt Baker.
1052
1053         * UserInterface/Views/ContentBrowser.js:
1054         (WI.ContentBrowser.prototype._findBannerDidHide):
1055         When the find banner is hidden trigger a new ContentView method,
1056         searchHidden instead of the destructive searchCleared. This allows
1057         most content views (text editors, DOM tree, Network Headers view)
1058         to keep their populated search results.
1059
1060         * UserInterface/Views/ContentView.js:
1061         (WI.ContentView.prototype.searchHidden):
1062         * UserInterface/Views/LogContentView.js:
1063         (WI.LogContentView.prototype.searchHidden):
1064         By default searchHidden does nothing. The Console's LogContentView
1065         treats the find banner differently and clears its search results.
1066
1067         * UserInterface/Views/TextEditor.js:
1068         (WI.TextEditor.prototype.searchCleared):
1069         Modernize some code while working in this area.
1070
1071         * UserInterface/Views/Main.css:
1072         (.bouncy-highlight):
1073         Ensure black text on yellow background in the bouncy highlight. In the
1074         DOM Tree it could have been white if the find banner was closed.
1075
1076 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
1077
1078         Replace hard-coded paths in shebangs with #!/usr/bin/env
1079         https://bugs.webkit.org/show_bug.cgi?id=181040
1080
1081         Reviewed by Alex Christensen.
1082
1083         * Scripts/combine-resources.pl:
1084         * Scripts/copy-user-interface-resources-dryrun.rb:
1085         * Scripts/copy-user-interface-resources.pl:
1086         * Scripts/fix-worker-imports-for-optimized-builds.pl:
1087         * Scripts/remove-console-asserts-dryrun.rb:
1088         * Scripts/remove-console-asserts.pl:
1089         * Scripts/update-LegacyInspectorBackendCommands.rb:
1090         * Scripts/update-codemirror-resources.rb:
1091         * WebInspectorUI.vcxproj/build-webinspectorui.pl:
1092
1093 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1094
1095         Web Inspector: "Log Value" context menu is sometimes unavailable
1096         https://bugs.webkit.org/show_bug.cgi?id=181278
1097         <rdar://problem/36281649>
1098
1099         Reviewed by Devin Rousso.
1100
1101         * UserInterface/Views/ObjectPreviewView.css:
1102         (.object-preview > .title):
1103         * UserInterface/Views/ObjectTreeView.css:
1104         (.object-tree.expanded > .title):
1105         Make the expanded object title information 16px tall to match ObjectTree
1106         tree element row heights. This eliminates the floating console message
1107         location from overlapping the first ObjectTree's TreeElement and causing
1108         truncation and other behavior issues (like Context Menu identification).
1109
1110 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1111
1112         Web Inspector: RTL - DOM Tree Element selection doesn't work
1113         https://bugs.webkit.org/show_bug.cgi?id=181275
1114         <rdar://problem/36290450>
1115
1116         Reviewed by Devin Rousso.
1117
1118         * UserInterface/Views/TreeOutline.js:
1119         (WI.TreeOutline.prototype.treeElementFromEvent):
1120         Provide a better explanation for why we are making the `x` adjustment here,
1121         to detect the inner most tree element along the horizontal. Fix the algorithm
1122         for RTL, since the intent is to adjust to the trailing edge of the container
1123         which is on the opposite side in RTL.
1124
1125 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1126
1127         Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)
1128         https://bugs.webkit.org/show_bug.cgi?id=181255
1129         <rdar://problem/36248855>
1130
1131         Reviewed by Matt Baker.
1132
1133         * UserInterface/Views/TextEditor.js:
1134         (WI.TextEditor.prototype.set string):
1135         Defer any early searches until the initial content of a TextEditor has been set.
1136         Such searches can happen when the FindBanner already has content when a
1137         ContentView is first opened and needs to load its content from the backend.
1138         Further, even though the content may be loaded from the backend before the
1139         search results, microtask hops might cause the content to get to the TextEditor
1140         after the search results.
1141
1142 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1143
1144         REGRESSION: Web Inspector: Debugger tab doesn't restore selected resource on reload
1145         https://bugs.webkit.org/show_bug.cgi?id=181253
1146         <rdar://problem/36280564>
1147
1148         Reviewed by Matt Baker.
1149
1150         * UserInterface/Views/DebuggerSidebarPanel.js:
1151         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
1152         Add braces to ensure the trailing else is actually trailing the outer
1153         chain as it was intended to be.
1154
1155 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
1156
1157         Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab
1158         https://bugs.webkit.org/show_bug.cgi?id=181229
1159         <rdar://problem/36075219>
1160
1161         Reviewed by Matt Baker.
1162
1163         * UserInterface/Base/Main.js:
1164         Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick
1165         when not already in the Search tab.
1166
1167         * UserInterface/Views/CallFrameView.js:
1168         (WI.CallFrameView):
1169         Ignore Search and Network tab in CallFrame links.
1170
1171         * UserInterface/Views/TabBrowser.js:
1172         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1173         Improve style.
1174
1175 == Rolled over to ChangeLog-2018-01-01 ==