Web Inspector: RTL: add support for Error page
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2017-02-24  Devin Rousso  <dcrousso+webkit@gmail.com>
2
3         Web Inspector: RTL: add support for Error page
4         https://bugs.webkit.org/show_bug.cgi?id=168855
5
6         Reviewed by Brian Burg.
7
8         * UserInterface/Debug/UncaughtExceptionReporter.css:
9         (.uncaught-exception-sheet):
10         (body[dir=ltr] .uncaught-exception-sheet):
11         (body[dir=rtl] .uncaught-exception-sheet):
12         (.uncaught-exception-sheet h1 > img):
13         (body[dir=ltr] .uncaught-exception-sheet h1 > img):
14         (body[dir=rtl] .uncaught-exception-sheet h1 > img):
15         (.uncaught-exception-sheet h2 > img):
16         (body[dir=ltr] .uncaught-exception-sheet h2 > img):
17         (body[dir=rtl] .uncaught-exception-sheet h2 > img):
18         (.uncaught-exception-sheet dd):
19         (body[dir=ltr] .uncaught-exception-sheet dd):
20         (body[dir=rtl] .uncaught-exception-sheet dd):
21         (.uncaught-exception-sheet ul):
22         (body[dir=ltr] .uncaught-exception-sheet ul):
23         (body[dir=rtl] .uncaught-exception-sheet ul):
24
25 2017-02-24  Devin Rousso  <dcrousso+webkit@gmail.com>
26
27         Web Inspector: Uncaught Exception: Unknown angle units "undefined"
28         https://bugs.webkit.org/show_bug.cgi?id=168851
29
30         Reviewed by Brian Burg.
31
32         * UserInterface/Views/GradientEditor.js:
33         (WebInspector.GradientEditor.prototype._gradientTypeChanged):
34
35 2017-02-24  Jon Lee  <jonlee@apple.com>
36
37         Alias "system-ui" for the System font name
38         https://bugs.webkit.org/show_bug.cgi?id=151493
39
40         Reviewed by Tim Horton and Joseph Pecoraro.
41
42         * UserInterface/Models/CSSKeywordCompletions.js: Ditto.
43
44 2017-02-23  Devin Rousso  <dcrousso+webkit@gmail.com>
45
46         Web Inspector: RTL: DOM Tree spacing is wrong
47         https://bugs.webkit.org/show_bug.cgi?id=168744
48
49         Reviewed by Brian Burg.
50
51         * UserInterface/Base/Utilities.js:
52         (Element.prototype.totalOffsetRight):
53
54         * UserInterface/Views/DOMTreeOutline.css:
55         (.tree-outline.dom):
56         (.tree-outline.dom ol):
57         (body[dir=ltr] .tree-outline.dom ol):
58         (body[dir=rtl] .tree-outline.dom ol):
59         (.tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
60         (body[dir=ltr] .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
61         (body[dir=rtl] .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
62         (.tree-outline.dom li.selected + ol.children.expanded):
63         (.tree-outline.dom li):
64         (body[dir=ltr] .tree-outline.dom li):
65         (body[dir=rtl] .tree-outline.dom li):
66         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
67         (body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
68         (body[dir=ltr] .tree-outline.dom.single-node li):
69         (body[dir=rtl] .tree-outline.dom.single-node li):
70         (.tree-outline.dom li.parent):
71         (body[dir=ltr] .tree-outline.dom li.parent):
72         (body[dir=rtl] .tree-outline.dom li.parent):
73         (body[dir=ltr] .tree-outline.dom li .html-tag.close):
74         (body[dir=rtl] .tree-outline.dom li .html-tag.close):
75         (.tree-outline.dom li.parent::before):
76         (body[dir=rtl] .tree-outline.dom li.parent::before):
77         (body[dir=ltr] .tree-outline.dom li.parent::before):
78         (.tree-outline.dom li.parent.shadow::after):
79         (body[dir=ltr] .tree-outline.dom li.parent.shadow::after):
80         (body[dir=rtl] .tree-outline.dom li.parent.shadow::after):
81         (.tree-outline.dom.single-node li): Deleted.
82         (.tree-outline.dom li .html-tag.close): Deleted.
83
84         * UserInterface/Views/TreeElement.js:
85         (WebInspector.TreeElement.prototype.isEventWithinDisclosureTriangle):
86         Calculate the position of the ::before triangle based on the layout direction.
87
88 2017-02-23  Devin Rousso  <dcrousso+webkit@gmail.com>
89
90         Web Inspector: RTL: navigation sidebar section disclosure triangles and tree element icons should be aligned right
91         https://bugs.webkit.org/show_bug.cgi?id=168284
92
93         Reviewed by Brian Burg.
94
95         * UserInterface/Views/TreeOutline.css:
96         (.tree-outline,):
97         (.tree-outline.large .item):
98         (body[dir=ltr] .tree-outline .item :matches(.disclosure-button, .icon)):
99         (body[dir=rtl] .tree-outline .item :matches(.disclosure-button, .icon)):
100         (body[dir=ltr] .tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
101         (body[dir=rtl] .tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon):
102         (.tree-outline .item .disclosure-button):
103         (body[dir=rtl] .tree-outline .item .disclosure-button):
104         (.tree-outline .item .icon):
105         (body[dir=ltr] .tree-outline .item .icon):
106         (body[dir=rtl] .tree-outline .item .icon):
107         (.tree-outline.large .item .icon):
108         (.tree-outline .item .status):
109         (body[dir=ltr] .tree-outline .item .status):
110         (body[dir=rtl] .tree-outline .item .status):
111         (.tree-outline:not(.hide-disclosure-buttons) .item:not(.parent) > .icon): Deleted.
112
113         * UserInterface/Views/TreeOutline.js:
114         (WebInspector.TreeOutline._generateStyleRulesIfNeeded):
115
116 2017-02-22  Devin Rousso  <dcrousso+webkit@gmail.com>
117
118         Web Inspector: RTL: Sidebar borders are on the wrong side
119         https://bugs.webkit.org/show_bug.cgi?id=168743
120
121         Reviewed by Matt Baker.
122
123         * UserInterface/Views/Sidebar.css:
124         (body[dir=ltr] .sidebar.right > .resizer, body[dir=rtl] .sidebar.left > .resizer):
125         (body[dir=ltr] .sidebar.left > .resizer, body[dir=rtl] .sidebar.right > .resizer):
126         (body[dir=ltr] .sidebar.left, body[dir=rtl] .sidebar.right):
127         (body[dir=ltr] .sidebar.right, body[dir=rtl] .sidebar.left):
128         (.sidebar.right > .resizer): Deleted.
129         (.sidebar.left > .resizer): Deleted.
130         (.sidebar.left): Deleted.
131         (.sidebar.right): Deleted.
132
133         * UserInterface/Views/Sidebar.js:
134         (WebInspector.Sidebar.prototype.resizerDragging):
135         Reverse the change if the direction is RTL.
136
137 2017-02-22  Brian Burg  <bburg@apple.com>
138
139         Web Inspector: RTL: Settings tab labels need adjustment
140         https://bugs.webkit.org/show_bug.cgi?id=168497
141
142         Reviewed by Matt Baker.
143
144         Flip margins. Use 'text-align: end' instead of manually choosing
145         right and left based on body[dir].
146
147         * UserInterface/Views/SettingsTabContentView.css:
148         (.content-view.settings > .setting-container > .setting-name):
149         (body[dir=ltr] .content-view.settings > .setting-container > .setting-name):
150         (body[dir=rtl] .content-view.settings > .setting-container > .setting-name):
151         (.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
152         (body[dir=ltr] .content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
153         (body[dir=rtl] .content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
154         (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
155         (body[dir=ltr] .content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
156         (body[dir=rtl] .content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
157
158 2017-02-21  Devin Rousso  <dcrousso+webkit@gmail.com>
159
160         Web Inspector: Prefer Resources tab over Network tab when showing files
161         https://bugs.webkit.org/show_bug.cgi?id=168021
162
163         Reviewed by Timothy Hatcher.
164
165         * UserInterface/Base/Main.js:
166         (WebInspector.handlePossibleLinkClick):
167         (WebInspector.openURL):
168         Add `options` parameter to provide greater customization.
169
170         * UserInterface/Views/TabBrowser.js:
171         (WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
172         Add logic for `ignoreNetworkTab` option that will ignore instances of NetworkTabContentView.
173
174         * UserInterface/Controllers/BreakpointPopoverController.js:
175         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
176         * UserInterface/Protocol/InspectorFrontendAPI.js:
177         (InspectorFrontendAPI.showMainResourceForFrame):
178         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
179         (WebInspector.CSSStyleDeclarationTextEditor.tokenTrackingControllerHighlightedRangeWasClicked.showRangeInSourceCode):
180         * UserInterface/Views/ComputedStyleDetailsPanel.js:
181         (WebInspector.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorShowProperty):
182         * UserInterface/Views/ContextMenuUtilities.js:
183         (WebInspector.appendContextMenuItemsForSourceCode):
184         * UserInterface/Views/DOMTreeContentView.js:
185         (WebInspector.DOMTreeContentView.prototype._mouseWasClicked.followLink):
186         * UserInterface/Views/DOMTreeElement.js:
187         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
188         (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition):
189         * UserInterface/Views/DebuggerSidebarPanel.js:
190         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
191         * UserInterface/Views/NetworkTimelineView.js:
192         (WebInspector.NetworkTimelineView.prototype.showContentViewForTreeElement):
193         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
194         (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
195         * UserInterface/Views/ResourceSidebarPanel.js:
196         (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
197         * UserInterface/Views/ResourceTimelineDataGridNode.js:
198         (WebInspector.ResourceTimelineDataGridNode.prototype._dataGridNodeGoToArrowClicked):
199         * UserInterface/Views/SearchSidebarPanel.js:
200         (WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange):
201         (WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):
202         * UserInterface/Views/SourceCodeTextEditor.js:
203         (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
204         * UserInterface/Views/TimelineDataGrid.js:
205         (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
206         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
207         (WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu):
208         Change arguments of functions to change content views to ignore the Network tab.
209
210         * UserInterface/Views/NetworkGridContentView.js:
211         (WebInspector.NetworkGridContentView.prototype.hasRepresentedObject):
212         * UserInterface/Views/NetworkSidebarPanel.js:
213         (WebInspector.NetworkSidebarPanel.prototype.hasRepresentedObject):
214         * UserInterface/Views/NetworkTabContentView.js:
215         (WebInspector.NetworkTabContentView.prototype.canShowRepresentedObject):
216         Ensure that the Network tab can only display resources that it has entries for in its view.
217
218 2017-02-21  Brian Burg  <bburg@apple.com>
219
220         Web Inspector: RTL: console scope bar's unread message indicator is misaligned
221         https://bugs.webkit.org/show_bug.cgi?id=168625
222
223         Reviewed by Matt Baker.
224
225         * UserInterface/Views/LogContentView.css:
226         (.log-scope-bar > li.unread::before):
227         (body[dir=ltr] .log-scope-bar > li.unread::before):
228         (body[dir=rtl] .log-scope-bar > li.unread::before):
229
230 2017-02-20  Joseph Pecoraro  <pecoraro@apple.com>
231
232         Web Inspector: Tooltip for "Show console tab" should read "Show Console tab"
233         https://bugs.webkit.org/show_bug.cgi?id=168630
234         <rdar://problem/30621662>
235
236         Reviewed by Brian Burg.
237
238         * Localizations/en.lproj/localizedStrings.js:
239         * UserInterface/Views/LogContentView.js:
240         (WebInspector.LogContentView):
241
242 2017-02-20  Brian Burg  <bburg@apple.com>
243
244         Web Inspector: RTL: back/forward navigation buttons should not be flipped
245         https://bugs.webkit.org/show_bug.cgi?id=168275
246         <rdar://problem/30506897>
247
248         Reviewed by Matt Baker.
249
250         The leading button is always "back" and the trailing button is always "forward", but
251         in RTL the icons are swapped so that it still looks like '< >' from left-to-right.
252
253         Rename the two arrows in the SVG to "left" and "right" arrows, and use them appropriately
254         in ContentBrowser for back-forward icons based on the layout direction.
255
256         * UserInterface/Images/BackForwardArrows.svg:
257         * UserInterface/Views/ContentBrowser.js:
258         (WebInspector.ContentBrowser):
259         * UserInterface/Views/FindBanner.css:
260         (.find-banner > button.segmented.left > .glyph):
261         (.find-banner > button.segmented.left:active:not(:disabled) > .glyph):
262         (.find-banner > button.segmented.right > .glyph):
263         (.find-banner > button.segmented.right:active:not(:disabled) > .glyph):
264
265 2017-02-20  Brian Burg  <bburg@apple.com>
266
267         Web Inspector: RTL: hierarchical path components need spacing and icon adjustments
268         https://bugs.webkit.org/show_bug.cgi?id=168581
269
270         Reviewed by Matt Baker.
271
272         Flip a bunch of padding, margin, and offsets. Flip the chevron using a CSS transform.
273
274         * UserInterface/Views/HierarchicalPathComponent.css:
275         (.hierarchical-path-component):
276         (.hierarchical-path-component > .icon):
277         (.hierarchical-path-component > :matches(.icon, .selector-arrows)):
278         (body[dir=ltr] .hierarchical-path-component > :matches(.icon, .selector-arrows)):
279         (body[dir=rtl] .hierarchical-path-component > :matches(.icon, .selector-arrows)):
280         (.hierarchical-path-component > .selector-arrows):
281         (.hierarchical-path-component > select):
282         (body[dir=ltr] .hierarchical-path-component > select):
283         (body[dir=rtl] .hierarchical-path-component > select):
284         (.hierarchical-path-component > .separator):
285         (body[dir=ltr] .hierarchical-path-component > .separator):
286         (body[dir=rtl] .hierarchical-path-component > .separator):
287         (.hierarchical-path-component.text-only):
288         (body[dir=ltr] .hierarchical-path-component.text-only):
289         (body[dir=rtl] .hierarchical-path-component.text-only):
290         (body[dir=ltr] .hierarchical-path-component.text-only > select):
291         (body[dir=rtl] .hierarchical-path-component.text-only > select):
292
293 2017-02-20  Brian Burg  <bburg@apple.com>
294
295         Web Inspector: RTL: adjust positioning of scope bar items with multiple values
296         https://bugs.webkit.org/show_bug.cgi?id=168575
297
298         Reviewed by Matt Baker.
299
300         Mirror the leading margin as necessary. Adjust the <select> positioning
301         so that the popup is really close to the scope bar item's position.
302
303         * UserInterface/Views/ScopeBar.css:
304         (body[dir=ltr] .scope-bar > li.multiple > select):
305         (body[dir=rtl] .scope-bar > li.multiple > select):
306         (.scope-bar > li.multiple > .arrows):
307         (body[dir=ltr] .scope-bar > li.multiple > .arrows):
308         (body[dir=rtl] .scope-bar > li.multiple > .arrows):
309
310 2017-02-20  Brian Burg  <bburg@apple.com>
311
312         Web Inspector: RTL: sidebar expand/collapse icons need to be flipped
313         https://bugs.webkit.org/show_bug.cgi?id=168276
314         <rdar://problem/30506999>
315
316         Reviewed by Matt Baker.
317
318         The sidebars themselves are already flipped due to the layout direction change, but the
319         icons have a directional design and need to be manually flipped based on the layout direction.
320
321         * UserInterface/Views/ContentBrowserTabContentView.js:
322         (WebInspector.ContentBrowserTabContentView):
323
324 2017-02-17  Nikita Vasilyev  <nvasilyev@apple.com>
325
326         Web Inspector: Use Maps in FrameResourceManager instead of objects
327         https://bugs.webkit.org/show_bug.cgi?id=168549
328         <rdar://problem/30590110>
329
330         Reviewed by Joseph Pecoraro.
331
332         Use Map for _frameIdentifierMap and _resourceRequestIdentifierMap.
333
334         * UserInterface/Controllers/FrameResourceManager.js:
335         (WebInspector.FrameResourceManager.prototype.initialize):
336         (WebInspector.FrameResourceManager.prototype.get frames):
337         (WebInspector.FrameResourceManager.prototype.frameForIdentifier):
338         (WebInspector.FrameResourceManager.prototype.frameDidDetach):
339         (WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
340         (WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache):
341         (WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
342         (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
343         (WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData):
344         (WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
345         (WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading):
346         (WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
347         (WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
348         (WebInspector.FrameResourceManager.prototype._createFrame):
349
350 2017-02-17  Brian Burg  <bburg@apple.com>
351
352         Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
353         https://bugs.webkit.org/show_bug.cgi?id=168273
354         <rdar://problem/29949325>
355
356         Reviewed by Matt Baker.
357
358         Add the ability to dock Web Inspector to the left of the inspected view.
359         The frontend decides whether the Dock to Side button docks left or right
360         based on the current layout direction.
361
362         * Localizations/en.lproj/localizedStrings.js:
363         * UserInterface/Base/Main.js:
364         (WebInspector.contentLoaded):
365         Rename the "Dock to Right" button to "Dock to Side" instead. It's easier to just
366         have one button than to try and conditionally hide one or the other based on
367         the layout direction. Change the dock callback and the icon used for the button
368         depending on layout direction.
369
370         (WebInspector.resolvedLayoutDirection):
371         Refactor getLayoutDirection() to resolvedLayoutDirection() so callers get back
372         either "ltr" or "rtl".
373
374         Flip the dock side if layout direction changes while docked to the side.
375
376         Adjust various code paths to account for the existing of left docking. In particular,
377         resize rejection needs special-casing for resizing leftward from beyond the right side
378         of the Inspector view when it is docked to the left. Improve related comments since it
379         took me an unbelievable amount of time to understand what this code is supposed to do.
380
381         * UserInterface/Views/Main.css:
382         (body.docked.right):
383         (body.docked.left #docked-resizer):
384         (body.docked:matches(.right, .left) #navigation-sidebar.collapsed > .resizer):
385         (body.docked.right #navigation-sidebar.collapsed > .resizer): Deleted.
386         Add .docked.left analogues to rules for .docked.right.
387
388 2017-02-17  Brian Burg  <bburg@apple.com>
389
390         Web Inspector: RTL: add TabBar support for RTL layout
391         https://bugs.webkit.org/show_bug.cgi?id=168446
392
393         Reviewed by Matt Baker.
394
395         There are two types of changes needed:
396          - Flip leading and trailing borders and margins for the tab items.
397          - Enumerate tabs in reverse order when performing manual layout.
398
399         Along the way, I added some color variables local to TabBar.css to
400         reduce the number of redundant border-style and color declarations.
401
402         * UserInterface/Base/Main.js:
403         Change this to resolvedLayoutDirection(), and resolve "System" to "ltr" or "rtl".
404         This makes it suitable for use in manual layout without worrying about "System".
405         Fix the one existing use-site to not do its own resolution of "System".
406
407         * UserInterface/Views/TabBar.css:
408         Define commonly used colors and border styles and adopt var() usages.
409         Flip borders that should vary in RTL vs LTR, but not all of them. In
410         many cases, the border is not direction-dependent and looks the same
411         on both sides. Also, no need to swap animated properties as all manual
412         layout is done from the left edge.
413
414         (.tab-bar):
415         (body.window-inactive .tab-bar):
416         (.tab-bar > .top-border):
417         (body.window-inactive .tab-bar > .top-border):
418         (.tab-bar > .item):
419         (body[dir=ltr] .tab-bar > :nth-child(n + 2 of .item),):
420         (body[dir=rtl] .tab-bar > :nth-child(n + 2 of .item),):
421         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
422         (body[dir=ltr] .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,):
423         (body[dir=rtl] .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,):
424         (body.window-inactive .tab-bar > .item):
425         (body[dir=ltr].window-inactive .tab-bar > .item):
426         (body[dir=rtl].window-inactive .tab-bar > .item):
427         (.tab-bar > .item > .close):
428         (body[dir=ltr] .tab-bar > .item > .close):
429         (body[dir=rtl] .tab-bar > .item > .close):
430         (.tab-bar > .item:not(.pinned) > .flex-space:last-child):
431         (body[dir=ltr] .tab-bar > .item:not(.pinned) > .flex-space:last-child):
432         (body[dir=rtl] .tab-bar > .item:not(.pinned) > .flex-space:last-child):
433         (.tab-bar > .item > .title):
434         (body[dir=ltr] .tab-bar > .item > .title):
435         (body[dir=rtl] .tab-bar > .item > .title):
436         (.tab-bar.collapsed > .item > .close):
437         (body[dir=ltr] .tab-bar.collapsed > .item > .close):
438         (body[dir=rtl] .tab-bar.collapsed > .item > .close):
439
440         * UserInterface/Views/TabBar.js:
441         When doing manual layout, keep doing calculations with respect to the left edge
442         and keep the list of tab items in logical (LTR) order, as in the DOM. But, when
443         manually positioning tab items for RTL layout direction, reverse the tab items
444         so that it matches the screen/layout order of the flipped flexbox items.
445
446         (WebInspector.TabBar.prototype.insertTabBarItem):
447         (WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
448         In RTL, put extra space after closing a tab to the left of normal tabs. This
449         matches the behavior of LTR, but requires some additional measurement since we
450         still position tabs using `left` and can't simply infer the leftover space.
451
452         (WebInspector.TabBar.prototype._tabBarItemsFromLeftToRight): Added.
453         (WebInspector.TabBar.prototype._handleMouseMoved):
454         (WebInspector.TabBar.prototype._handleMouseUp):
455
456 2017-02-17  Devin Rousso  <dcrousso+webkit@gmail.com>
457
458         Web Inspector: Zoom level UI out of sync with setting value
459         https://bugs.webkit.org/show_bug.cgi?id=168522
460
461         Reviewed by Brian Burg.
462
463         * UserInterface/Views/SettingsTabContentView.js:
464         (WebInspector.SettingsTabContentView):
465         Trigger a layout whenever the zoomFactor setting is changed. This is needed since the
466         zoomFactor setting can also be modified by global keyboard shortcuts.
467
468 2017-02-17  Brian Burg  <bburg@apple.com>
469
470         Web Inspector: Loc: Zoom level in Settings tab needs to use localized formatting
471         https://bugs.webkit.org/show_bug.cgi?id=168465
472
473         Reviewed by Matt Baker.
474
475         * UserInterface/Views/SettingsTabContentView.js:
476         (WebInspector.SettingsTabContentView.prototype.layout):
477         (WebInspector.SettingsTabContentView):
478
479 2017-02-17  Brian Burg  <bburg@apple.com>
480
481         Web Inspector: RTL: CodeMirror text editor instances have scrollbars on left and right
482         https://bugs.webkit.org/show_bug.cgi?id=168274
483
484         Reviewed by Matt Baker.
485
486         CodeMirror doesn't draw its own scrollbar correctly when content is in RTL,
487         so it draws an extra scrollbar on the right side. And, for the majority of
488         cases, we don't want to view CSS / JS content aligned to the right.
489
490         Manually set the "dir" attribute for all CodeMirror editor instances to "ltr".
491         Clients can override this if custom RTL layout is available in a particular case.
492
493         * UserInterface/Views/CodeMirrorEditor.js:
494         (WebInspector.CodeMirrorEditor.create):
495         (WebInspector.CodeMirrorEditor):
496
497 2017-02-17  Joseph Pecoraro  <pecoraro@apple.com>
498
499         Web Inspector: Timeline DataGridNodes are lacking detail in title
500         https://bugs.webkit.org/show_bug.cgi?id=168529
501         <rdar://problem/30579959>
502
503         Reviewed by Brian Burg.
504
505         * UserInterface/Views/TimelineDataGridNode.js:
506         (WebInspector.TimelineDataGridNode.prototype.displayName):
507         Include detailed information for DataGridNode display names, since we
508         want to show maximum detail for records in the DataGrid.
509
510 2017-02-16  Brian Burg  <bburg@apple.com>
511
512         Web Inspector: add DebugUI setting to manually override UI layout direction
513         https://bugs.webkit.org/show_bug.cgi?id=168222
514
515         Reviewed by Joseph Pecoraro.
516
517         Expose three layout direction settings:
518          - System (inherit system UI layout direction)
519          - LTR (the default regardless of system language)
520          - RTL (under development, only accessible via this menu)
521
522         * UserInterface/Base/Main.js:
523         The UI layout direction is normally only set once per frontend load.
524         There is no expectation on macOS that applications can switch dynamically.
525         But, for DebugUI purposes we need to switch the layout direction quickly.
526         Store the new setting and trigger a hard reload of the frontend page.
527         If the 'system' setting is specified, fall back to the system layout
528         direction as provided by InspectorFrontendHost.
529
530         * UserInterface/Base/Setting.js:
531         Add an application-level setting for (user interface) layout direction.
532
533         * UserInterface/Views/SettingsTabContentView.js:
534         (WebInspector.SettingsTabContentView):
535         (WebInspector.SettingsTabContentView.prototype.layout):
536         (WebInspector.SettingsTabContentView.prototype.initialLayout): Deleted.
537         Make this a normal layout() method so that we can dirty the view
538         when DebugUI is turned on or off.
539
540 2017-02-16  Devin Rousso  <dcrousso+webkit@gmail.com>
541
542         Web Inspector: popovers shouldn't be dismissed when Web Inspector window is dragged
543         https://bugs.webkit.org/show_bug.cgi?id=166935
544
545         Reviewed by Joseph Pecoraro.
546
547         * UserInterface/Base/Main.js:
548         (WebInspector.contentLoaded):
549         (WebInspector._mouseDown): Created.
550         (WebInspector._dockedResizerMouseDown):
551         (WebInspector._moveWindowMouseDown):
552         Applies Popover.EventPreventDismissSymbol whenever a mousedown event is fired for an element
553         that controls the positioning or size of the WebInspector window.
554
555         * UserInterface/Views/Popover.js:
556         (WebInspector.Popover.prototype._handleEvent):
557         (WebInspector.Popover.EventPreventDismissSymbol):
558         Do not dismiss the popover if Popover.EventPreventDismissSymbol is applied to the event.
559
560 2017-02-15  Devin Rousso  <dcrousso+webkit@gmail.com>
561
562         Web Inspector: Request headers when copied & pasted should follow HTTP format, colon instead of tab
563         https://bugs.webkit.org/show_bug.cgi?id=168155
564
565         Reviewed by Matt Baker.
566
567         * UserInterface/Views/DataGrid.js:
568         (WebInspector.DataGrid):
569         (WebInspector.DataGrid.prototype.set copyTextDelimiter):
570         (WebInspector.DataGrid.prototype._copyTextForDataGridNode):
571         (WebInspector.DataGrid.prototype._copyTextForDataGridHeaders):
572         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
573         (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
574         Allow instances of DataGrid to change the delimiter between items when copying rows.
575
576 2017-02-15  Devin Rousso  <dcrousso+webkit@gmail.com>
577
578         Web Inspector: Split console should be allowed when docked bottom on Elements/Resources/Debugger/Storage tabs
579         https://bugs.webkit.org/show_bug.cgi?id=168385
580
581         Reviewed by Timothy Hatcher.
582
583         * UserInterface/Base/Main.js:
584         (WebInspector.updateDockedState):
585         If the new docked configuration does not support the split console, hide it.
586
587         * UserInterface/Views/DebuggerTabContentView.js:
588         (WebInspector.DebuggerTabContentView.prototype.get supportsSplitContentBrowser):
589         * UserInterface/Views/ElementsTabContentView.js:
590         (WebInspector.ElementsTabContentView.prototype.get supportsSplitContentBrowser):
591         * UserInterface/Views/ResourcesTabContentView.js:
592         (WebInspector.ResourcesTabContentView.prototype.get supportsSplitContentBrowser):
593         * UserInterface/Views/StorageTabContentView.js:
594         (WebInspector.StorageTabContentView.prototype.get supportsSplitContentBrowser):
595
596 2017-02-14  Brian Burg  <bburg@apple.com>
597
598         Web Inspector: RTL: adjust padding of dashboard icons
599         https://bugs.webkit.org/show_bug.cgi?id=168340
600
601         Reviewed by Matt Baker.
602
603         Extract the direction-dependent padding into a "local" variable.
604         Use two rules to apply it to whichever is the leading side.
605
606         While we tend to use leading/trailing in Apple layout technologies,
607         I think the CSS logical properties specification sticks to using
608         -start and -end, so let's use that nomenclature where we can.
609
610         * UserInterface/Views/DefaultDashboardView.css:
611         (.toolbar .dashboard.default > .item > div):
612         (body[dir=ltr] .toolbar .dashboard.default > .item > div):
613         (body[dir=rtl] .toolbar .dashboard.default > .item > div):
614
615 2017-02-14  Eric Carlson  <eric.carlson@apple.com>
616
617         [MediaStream] add navigator.getUserMedia for compatibility with legacy content
618         https://bugs.webkit.org/show_bug.cgi?id=168324
619         <rdar://problem/30513125>
620
621         Reviewed by Youenn Fablet.
622
623         * UserInterface/Models/NativeFunctionParameters.js:
624
625 2017-02-13  Devin Rousso  <dcrousso+webkit@gmail.com>
626
627         Web Inspector: provide a way to show current value of CSS variables in style rules
628         https://bugs.webkit.org/show_bug.cgi?id=168172
629
630         Reviewed by Timothy Hatcher.
631
632         * Localizations/en.lproj/localizedStrings.js:
633         * UserInterface/Images/CSSVariable.svg: Added.
634
635         * UserInterface/Models/TextMarker.js:
636         (WebInspector.TextMarker.Type):
637
638         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
639         (WebInspector.CSSStyleDeclarationTextEditor._createInlineSwatches.update):
640
641         * UserInterface/Views/CodeMirrorTextMarkers.js:
642         (createCodeMirrorTextMarkers):
643         (createCodeMirrorVariableTextMarkers):
644
645         * UserInterface/Views/InlineSwatch.css:
646         (.inline-swatch.variable):
647         (.inline-swatch:matches(.bezier, .spring, .variable)):
648         (.inline-swatch:matches(.bezier, .spring, .variable):hover):
649         (.inline-swatch:matches(.bezier, .spring, .variable):active):
650         (.inline-swatch-variable-popover):
651         (.inline-swatch-variable-popover .CodeMirror):
652         (.inline-swatch-variable-popover .CodeMirror pre):
653         (.inline-swatch:matches(.bezier, .spring):hover): Deleted.
654         (.inline-swatch:matches(.bezier, .spring):active): Deleted.
655
656         * UserInterface/Views/InlineSwatch.js:
657         (WebInspector.InlineSwatch):
658         (WebInspector.InlineSwatch.prototype._fallbackValue):
659         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
660         (WebInspector.InlineSwatch.prototype._valueEditorValueDidChange):
661         (WebInspector.InlineSwatch.Type):
662
663 2017-02-13  Matt Baker  <mattbaker@apple.com>
664
665         REGRESSION(r188138): Web Inspector: cannot edit next/previous DOM attribute by using tab/shift-tab
666         https://bugs.webkit.org/show_bug.cgi?id=168120
667         <rdar://problem/30466065>
668
669         Reviewed by Joseph Pecoraro.
670
671         DOMTreeElement's attribute editing committed handler shouldn't early return
672         when a `moveDirection` has been specified.
673
674         * UserInterface/Views/DOMTreeElement.js:
675
676 2017-02-12  Brian Burg  <bburg@apple.com>
677
678         Web Inspector: Assertion failed: !this._items.has(item) (at Collection.js:50)
679         https://bugs.webkit.org/show_bug.cgi?id=168212
680
681         Reviewed by Joseph Pecoraro.
682
683         When turning on DebugUI, WebKit-internal scripts were being added to the
684         Collection that is the represented object for the Extra Scripts folder.
685         This was not balanced out by removing the scripts when DebugUI is turned
686         off, so switching DebugUI on and off several times hit a multiple-add assertion.
687
688         * UserInterface/Views/ResourceSidebarPanel.js:
689         (WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
690         Remove the script from its Collection if applicable.
691
692 2017-02-10  Matt Baker  <mattbaker@apple.com>
693
694         Web Inspector: Debugger sidebar panel should not have multiple tree selections
695         https://bugs.webkit.org/show_bug.cgi?id=166000
696         <rdar://problem/29721988>
697
698         Reviewed by Timothy Hatcher.
699
700         The method for synchronizing tree element selection across a sidebar's
701         tree outlines fails for selections made during startup, because it depends
702         on events which are being suppressed.
703
704         This adds a new class, TreeOutlineGroup, which restricts tree element selection
705         inside a group of tree outlines by receiving messages directly from TreeElement.
706
707         * UserInterface/Main.html:
708         Add file for TreeOutlineGroup class.
709
710         * UserInterface/Views/ContentBrowserTabContentView.js:
711         (WebInspector.ContentBrowserTabContentView.prototype._revealAndSelectRepresentedObject):
712         (WebInspector.ContentBrowserTabContentView):
713         * UserInterface/Views/DebuggerSidebarPanel.js:
714         (WebInspector.DebuggerSidebarPanel):
715         (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
716         Update `createContentTreeOutline` calls for new signature.
717
718         * UserInterface/Views/NavigationSidebarPanel.js:
719         (WebInspector.NavigationSidebarPanel):
720         Replace _visibleContentTreeOutlines with a TreeOutlineGroup, which
721         contains the single-selection behavior previously handled by the sidebar.
722
723         (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlines):
724         (WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement):
725         Implement using the sidebar's tree outline group.
726         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
727         Remove first parameter, which is always true.
728         (WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject):
729         (WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
730         (WebInspector.NavigationSidebarPanel.prototype.pruneStaleResourceTreeElements):
731         (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
732         (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
733         (WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
734         (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline): Deleted.
735         Remove unused setter.
736         (WebInspector.NavigationSidebarPanel.prototype.get visibleContentTreeOutlines): Deleted.
737         Renamed to contentTreeOutlines.
738         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineDidFocus): Deleted.
739         No longer needed.
740         (WebInspector.NavigationSidebarPanel.prototype._contentTreeOutlineTreeSelectionDidChange): Deleted.
741         Selection across trees handled by the tree outline group.
742
743         * UserInterface/Views/TreeElement.js:
744         (WebInspector.TreeElement.prototype.select):
745         Inform the element's tree outline group (if any), of the selection changed.
746
747         * UserInterface/Views/TreeOutlineGroup.js: Added.
748         (WebInspector.TreeOutlineGroup):
749         (WebInspector.TreeOutlineGroup.groupForTreeOutline):
750         (WebInspector.TreeOutlineGroup.prototype.get selectedTreeElement):
751         (WebInspector.TreeOutlineGroup.prototype.itemAdded):
752         Associate tree outline with the group and wrap tree elements. If the
753         incoming tree outline has a selection, deselect the group's currently
754         selected tree element.
755
756         (WebInspector.TreeOutlineGroup.prototype.itemRemoved):
757         Disassociate the tree outline from the group.
758         (WebInspector.TreeOutlineGroup.prototype.didSelectTreeElement):
759         Called by TreeElement when it becomes selected.
760         (WebInspector.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
761         Deselect any selected items in all tree outlines belonging to the group,
762         except for the specified item.
763
764 2017-02-10  Matt Baker  <mattbaker@apple.com>
765
766         Web Inspector: ContentViewContainer can have redundant back-forward entries after ContentView close
767         https://bugs.webkit.org/show_bug.cgi?id=168105
768
769         Reviewed by Joseph Pecoraro.
770
771         * UserInterface/Models/BackForwardEntry.js:
772         (WebInspector.BackForwardEntry.prototype.isEqual):
773         Make check for equal ContentView/cookie reusable.
774
775         * UserInterface/Views/ContentViewContainer.js:
776         (WebInspector.ContentViewContainer.prototype.showContentView):
777         Use BackForwardEntry.prototype.isEqual.
778         (WebInspector.ContentViewContainer.prototype.replaceContentView):
779         (WebInspector.ContentViewContainer.prototype.closeContentView):
780         Clean-up the BackForwardEntry list after changes that can cause
781         identical entries to become adjacent.
782
783         (WebInspector.ContentViewContainer.prototype._removeIdenticalAdjacentBackForwardEntries):
784         Remove consecutive entries with the same ContentView and cookie.
785         (WebInspector.ContentViewContainer):
786         (WebInspector.ContentViewContainer.closeAllContentViewsOfPrototype): Deleted.
787         Drive-by cleanup: removed dead code.
788
789 2017-02-10  Matt Baker  <mattbaker@apple.com>
790
791         REGRESSION (r211829): Web Inspector: Elements tab is blank when added after page load
792         https://bugs.webkit.org/show_bug.cgi?id=168142
793
794         Reviewed by Brian Burg.
795
796         The Elements tab can be shown in two ways: by adding the Elements tab
797         from the "New Tab" tab, or via Inspect Element. In both cases we should
798         be checking that the ContentView exists, and create it if needed.
799
800         * UserInterface/Views/ElementsTabContentView.js:
801         (WebInspector.ElementsTabContentView.prototype.showRepresentedObject):
802         (WebInspector.ElementsTabContentView.prototype.shown):
803
804 2017-02-09  Devin Rousso  <dcrousso+webkit@gmail.com>
805
806         Web Inspector: changing dock side from windowed to bottom should cause split console to collapse on Timeline and Network tabs
807         https://bugs.webkit.org/show_bug.cgi?id=167841
808
809         Reviewed by Matt Baker.
810
811         * UserInterface/Base/Main.js:
812         (WebInspector.updateDockedState):
813
814 2017-02-09  Devin Rousso  <dcrousso+webkit@gmail.com>
815
816         Web Inspector: Option+hover on -webkit-transform in Styles sidebar underlines only half the property
817         https://bugs.webkit.org/show_bug.cgi?id=167949
818
819         Reviewed by Joseph Pecoraro.
820
821         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
822         (WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
823         Attempt to merge tokens (specifically the `text` and `start` values) if the either the 
824         previous or next token is of the type "meta".
825
826 2017-02-09  Eric Carlson  <eric.carlson@apple.com>
827
828         [MediaStream] Remove legacy Navigator.webkitGetUserMedia
829         https://bugs.webkit.org/show_bug.cgi?id=168016
830
831         Reviewed by Youenn Fablet.
832
833         * UserInterface/Models/NativeFunctionParameters.js:
834
835 2017-02-08  Commit Queue  <commit-queue@webkit.org>
836
837         Unreviewed, rolling out r211912.
838         https://bugs.webkit.org/show_bug.cgi?id=168034
839
840         http/tests/media/media-stream/disconnected-frame-permission-
841         denied.html should be updated (Requested by youenn on
842         #webkit).
843
844         Reverted changeset:
845
846         "[MediaStream] Remove legacy Navigator.webkitGetUserMedia"
847         https://bugs.webkit.org/show_bug.cgi?id=168016
848         http://trac.webkit.org/changeset/211912
849
850 2017-02-08  Eric Carlson  <eric.carlson@apple.com>
851
852         [MediaStream] Remove legacy Navigator.webkitGetUserMedia
853         https://bugs.webkit.org/show_bug.cgi?id=168016
854
855         Reviewed by Youenn Fablet.
856
857         * UserInterface/Models/NativeFunctionParameters.js:
858
859 2017-02-08  Chris Dumez  <cdumez@apple.com>
860
861         Unreviewed, rolling out r211907.
862
863         Broke the build
864
865         Reverted changeset:
866
867         "[MediaStream] Remove legacy Navigator.webkitGetUserMedia"
868         https://bugs.webkit.org/show_bug.cgi?id=168016
869         http://trac.webkit.org/changeset/211907
870
871 2017-02-08  Eric Carlson  <eric.carlson@apple.com>
872
873         [MediaStream] Remove legacy Navigator.webkitGetUserMedia
874         https://bugs.webkit.org/show_bug.cgi?id=168016
875
876         Reviewed by Youenn Fablet.
877
878         * UserInterface/Models/NativeFunctionParameters.js:
879
880 2017-02-07  Devin Rousso  <dcrousso+webkit@gmail.com>
881
882         Web Inspector: gradient editor should allow switching the units of the 'angle' parameter
883         https://bugs.webkit.org/show_bug.cgi?id=166938
884
885         Reviewed by Brian Burg.
886
887         * UserInterface/Test.html:
888         Add WebInspector.Gradient for new model object tests.
889
890         * UserInterface/Models/Gradient.js:
891         (WebInspector.Gradient.fromString):
892         (WebInspector.LinearGradient):
893         (WebInspector.LinearGradient.fromComponents):
894         (WebInspector.LinearGradient.prototype.set angleValue):
895         (WebInspector.LinearGradient.prototype.get angleValue):
896         (WebInspector.LinearGradient.prototype.set angleUnits):
897         (WebInspector.LinearGradient.prototype.get angleUnits):
898         (WebInspector.LinearGradient.prototype.copy):
899         (WebInspector.LinearGradient.prototype.toString):
900         (WebInspector.LinearGradient.prototype._angleValueForUnits):
901         Rework part of WebInspector.LinearGradient to support units other than "deg".
902
903         * UserInterface/Views/GradientEditor.css:
904         (.gradient-editor > .gradient-angle > input[type="range"]):
905         (.gradient-editor > .gradient-angle > input[type="number"]):
906
907         * UserInterface/Views/GradientEditor.js:
908         (WebInspector.GradientEditor):
909         (WebInspector.GradientEditor.prototype.set gradient):
910         (WebInspector.GradientEditor.prototype._gradientTypeChanged):
911         (WebInspector.GradientEditor.prototype._angleValueChanged):
912         (WebInspector.GradientEditor.prototype._angleUnitsChanged):
913         (WebInspector.GradientEditor.prototype._angleChanged): Deleted.
914         Add <select> for each unit type that will change the units of the gradient.
915
916 2017-02-07  Matt Baker  <mattbaker@apple.com>
917
918         Web Inspector: DOMTreeOutline becomes collapsed after switching back to Elements tab
919         https://bugs.webkit.org/show_bug.cgi?id=167924
920
921         Reviewed by Brian Burg.
922
923         * UserInterface/Views/DOMTreeOutline.js:
924         (WebInspector.DOMTreeOutline.prototype.update):
925         Drive-by fix: move variable initialization below the early return.
926
927         * UserInterface/Views/ElementsTabContentView.js:
928         (WebInspector.ElementsTabContentView.prototype.shown): Deleted.
929         Calling this._showDOMTreeContentView isn't necessary. The base class
930         implementation will call `shown` on the content view.
931
932 2017-02-06  Fujii Hironori  <Hironori.Fujii@sony.com>
933
934         Web Inspector: sibling elements's disclosure triangles aren't vertically aligned in DOM tree outline in certain ports
935         https://bugs.webkit.org/show_bug.cgi?id=167568
936
937         Reviewed by Brian Burg.
938
939         The triangle has 13px height and has float:left. If the line-height
940         is smaller than 13px, the sibling element's triangles aren't
941         vertically aligned.
942
943         * UserInterface/Views/DOMTreeOutline.css:
944         (.tree-outline.dom li.parent): Set line-height 13px explicitly.
945
946 2017-02-03  Matt Baker  <mattbaker@apple.com>
947
948         Web Inspector: Add stroke-linecap property values to CSS autocompletion
949         https://bugs.webkit.org/show_bug.cgi?id=167778
950
951         Reviewed by Joseph Pecoraro.
952
953         * UserInterface/Models/CSSKeywordCompletions.js:
954         Add autocompletion values for fill-rule and stroke-linecap.
955
956 2017-02-02  Devin Rousso  <dcrousso+webkit@gmail.com>
957
958         Web Inspector: can't jump from Search Tab result to see resource in other tabs (Resource, Debugger, Network)
959         https://bugs.webkit.org/show_bug.cgi?id=167072
960
961         Reviewed by Timothy Hatcher.
962
963         * UserInterface/Base/Main.js:
964         (WebInspector.tabContentViewForRepresentedObject):
965         (WebInspector.showRepresentedObject):
966         (WebInspector.showMainFrameDOMTree):
967         (WebInspector.showSourceCodeForFrame):
968         (WebInspector.showSourceCode):
969         (WebInspector.showSourceCodeLocation):
970         (WebInspector.showOriginalUnformattedSourceCodeLocation):
971         (WebInspector.showOriginalOrFormattedSourceCodeLocation):
972         (WebInspector.showOriginalOrFormattedSourceCodeTextRange):
973         (WebInspector.showResourceRequest):
974         Rework parameters to add optional `options` dictionary that can be used to indicate
975         additional functionality.
976
977         * UserInterface/Views/TabBrowser.js:
978         (WebInspector.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
979         Ignore instances of SearchTabContentView as it can display content views for all types of
980         searchable data.  Determined by a newly added optional `options` parameter.
981
982         * UserInterface/Base/Utilities.js:
983         (Object.shallowMerge):
984         Merges the keys of two objects into a new one.
985
986         * UserInterface/Views/ComputedStyleDetailsPanel.js:
987         (WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
988         (WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
989
990         * UserInterface/Views/SearchSidebarPanel.js:
991         (WebInspector.SearchSidebarPanel.prototype.performSearch.createTreeElementForMatchObject):
992         (WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
993         (WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
994         (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts.scriptCallback):
995         (WebInspector.SearchSidebarPanel.prototype.performSearch.searchScripts):
996         (WebInspector.SearchSidebarPanel.prototype.performSearch.domSearchResults):
997         (WebInspector.SearchSidebarPanel.prototype.performSearch.domCallback):
998         (WebInspector.SearchSidebarPanel.prototype.performSearch):
999         (WebInspector.SearchSidebarPanel.prototype._treeElementDoubleClick):
1000         * UserInterface/Views/TreeElement.js:
1001         (WebInspector.TreeElement.treeElementDoubleClicked):
1002         Add an event dispatch whenever a TreeElement is double clicked via the `dblclick` event.
1003
1004 2017-02-01  Yusuke Suzuki  <utatane.tea@gmail.com>
1005
1006         Web Inspector: Upgrade Esprima to the latest one to support dynamic import
1007         https://bugs.webkit.org/show_bug.cgi?id=167698
1008
1009         Reviewed by Joseph Pecoraro.
1010
1011         * UserInterface/External/Esprima/esprima.js:
1012         Update to Esprima@5307e30 (4.0.0-dev).
1013
1014         * UserInterface/Models/ScriptSyntaxTree.js:
1015         (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration.gatherIdentifiers):
1016         (WebInspector.ScriptSyntaxTree.prototype._gatherIdentifiersInDeclaration):
1017         (WebInspector.ScriptSyntaxTree.prototype._recurse):
1018         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
1019         (WebInspector.ScriptSyntaxTree):
1020         * UserInterface/Workers/Formatter/ESTreeWalker.js:
1021         (ESTreeWalker.prototype._walkChildren):
1022         (ESTreeWalker):
1023         Add new nodes, SpreadProperty, RestProperty, and Import.
1024         SpreadProperty and RestProperty are the part of ES2018 rest and spread properties.
1025         https://github.com/sebmarkbage/ecmascript-rest-spread
1026         Import is dynamic import node. The syntax is similar to Super.
1027         https://github.com/tc39/proposal-dynamic-import
1028
1029         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1030         (EsprimaFormatter.prototype._handleTokenAtNode):
1031
1032 2017-02-01  Joseph Pecoraro  <pecoraro@apple.com>
1033
1034         Web Inspector: Remove keyboard shortcut to close tab - does not match expectations
1035         https://bugs.webkit.org/show_bug.cgi?id=167672
1036
1037         Reviewed by Timothy Hatcher.
1038
1039         * UserInterface/Views/TabBrowser.js:
1040         (WebInspector.TabBrowser):
1041
1042 2017-01-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1043
1044         Web Inspector: Tooltip text should not end in a period
1045         https://bugs.webkit.org/show_bug.cgi?id=167130
1046
1047         Reviewed by Brian Burg.
1048
1049         * Localizations/en.lproj/localizedStrings.js:
1050         * UserInterface/Views/BezierEditor.js:
1051         (WebInspector.BezierEditor):
1052         * UserInterface/Views/CSSStyleDeclarationSection.js:
1053         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
1054         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1055         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
1056         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1057         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
1058         * UserInterface/Views/DebuggerSidebarPanel.js:
1059         (WebInspector.DebuggerSidebarPanel):
1060         * UserInterface/Views/GeneralTabBarItem.js:
1061         (WebInspector.GeneralTabBarItem):
1062         * UserInterface/Views/HeapSnapshotContentView.js:
1063         (WebInspector.HeapSnapshotInstancesContentView):
1064         (WebInspector.HeapSnapshotObjectGraphContentView):
1065         * UserInterface/Views/InlineSwatch.js:
1066         (WebInspector.InlineSwatch):
1067         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1068         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
1069         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateProperties):
1070         * UserInterface/Views/ObjectTreeView.js:
1071         (WebInspector.ObjectTreeView.prototype._updateEntries):
1072         (WebInspector.ObjectTreeView.prototype._updateProperties):
1073         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1074         (WebInspector.ResourceTimelineDataGridNode.prototype._mouseoverRecordBar):
1075         * UserInterface/Views/SpringEditor.js:
1076         (WebInspector.SpringEditor):
1077         * UserInterface/Views/TypeTreeElement.js:
1078         (WebInspector.TypeTreeElement.prototype.onpopulate):
1079         * UserInterface/Views/TypeTreeView.js:
1080         (WebInspector.TypeTreeView.prototype._populate):
1081         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
1082         (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
1083         * UserInterface/Views/VisualStyleDetailsPanel.js:
1084         (WebInspector.VisualStyleDetailsPanel.prototype._generateSection.createOptionsElement):
1085         * UserInterface/Views/VisualStylePropertyEditorLink.js:
1086         (WebInspector.VisualStylePropertyEditorLink.prototype.set linked):
1087         * UserInterface/Views/VisualStylePropertyNameInput.js:
1088         (WebInspector.VisualStylePropertyNameInput):
1089         * UserInterface/Views/VisualStyleSelectorSection.js:
1090         (WebInspector.VisualStyleSelectorSection):
1091         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
1092         (WebInspector.VisualStyleSelectorTreeItem.prototype._updateCheckboxTitle):
1093         (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
1094
1095 2017-01-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1096
1097         Web Inspector: add CSS color keyword entries for all grey/gray variations
1098         https://bugs.webkit.org/show_bug.cgi?id=167668
1099
1100         Reviewed by Matt Baker.
1101
1102         * UserInterface/Models/Color.js:
1103         (WebInspector.Color.Keywords):
1104
1105 2017-01-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1106
1107         Web Inspector: Network tab: provide a way to preserve log on navigation
1108         https://bugs.webkit.org/show_bug.cgi?id=166908
1109
1110         Reviewed by Matt Baker.
1111
1112         * Localizations/en.lproj/localizedStrings.js:
1113
1114         * UserInterface/Base/Setting.js:
1115         (WebInspector.settings):
1116         Add clearNetworkOnNavigate global setting.
1117
1118         * UserInterface/Views/NetworkGridContentView.css:
1119         (.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content):
1120         (.content-view.network-grid > .data-grid .preserved:not(.selected) .cell-content .timeline-record-bar > .segment):
1121         * UserInterface/Views/NetworkGridContentView.js:
1122         (WebInspector.NetworkGridContentView):
1123         (WebInspector.NetworkGridContentView.prototype._mainResourceDidChange):
1124         * UserInterface/Views/NetworkSidebarPanel.css:
1125         (.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > :not(.status)):
1126         (.sidebar > .panel.navigation.network .tree-outline > .preserved:not(.selected) > .icon):
1127         * UserInterface/Views/NetworkSidebarPanel.js:
1128         (WebInspector.NetworkSidebarPanel):
1129         (WebInspector.NetworkSidebarPanel.prototype._mainResourceDidChange):
1130         Add styling to preserved network records.
1131
1132         * UserInterface/Controllers/TimelineManager.js:
1133         (WebInspector.TimelineManager.prototype._mainResourceDidChange):
1134         Only reset the persistent network timeline if the clearNetworkOnNavigate setting is true.
1135
1136         * UserInterface/Views/SettingsTabContentView.js:
1137         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1138         (WebInspector.SettingsTabContentView):
1139         Add checkbox and spacers for new setting.
1140
1141 2017-01-31  Devin Rousso  <dcrousso+webkit@gmail.com>
1142
1143         Web Inspector: User Settings: Secondary-clicking the New Tab and Settings tabs should not produce a context menu
1144         https://bugs.webkit.org/show_bug.cgi?id=167651
1145
1146         Reviewed by Joseph Pecoraro.
1147
1148         * UserInterface/Views/PinnedTabBarItem.js:
1149         (WebInspector.PinnedTabBarItem):
1150         (WebInspector.PinnedTabBarItem.prototype._handleContextMenuEvent):
1151         Always preventDefault() to ensure that the system context menu is never shown.
1152
1153         * UserInterface/Views/TabBar.js:
1154         (WebInspector.TabBar):
1155         (WebInspector.TabBar.prototype.get newTabTabBarItem):
1156         (WebInspector.TabBar.prototype._handleNewTabContextMenu): Deleted.
1157         Move the event dispatch to WebInspector.PinnedTabBarItem to give all instances a contextmenu
1158         event handler.
1159
1160         * UserInterface/Views/TabBrowser.js:
1161         (WebInspector.TabBrowser):
1162
1163 2017-01-31  Joseph Pecoraro  <pecoraro@apple.com>
1164
1165         Web Inspector: Address some ESLint warnings
1166         https://bugs.webkit.org/show_bug.cgi?id=167634
1167
1168         Reviewed by Brian Burg.
1169
1170         * UserInterface/Base/DOMUtilities.js:
1171         (WebInspector.linkifyNodeReference):
1172         (isSimiliarNode):
1173         (WebInspector.xpathIndex):
1174         These empty statements were supposed to be returns!
1175
1176         * UserInterface/Base/Main.js:
1177         * UserInterface/Models/CSSProperty.js:
1178         (WebInspector.CSSProperty.prototype.get relatedLonghandProperties):
1179         * UserInterface/Models/DOMNode.js:
1180         * UserInterface/Protocol/Connection.js:
1181         (InspectorBackend.Connection):
1182         (InspectorBackend.MainConnection):
1183         (InspectorBackend.WorkerConnection):
1184         * UserInterface/Protocol/MainTarget.js:
1185         (WebInspector.MainTarget):
1186         * UserInterface/Protocol/WorkerTarget.js:
1187         (WebInspector.WorkerTarget):
1188         * UserInterface/Test/Test.js:
1189         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1190         * UserInterface/Views/ConsoleSession.js:
1191         (WebInspector.ConsoleSession):
1192         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1193         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility.accessibilityPropertiesCallback):
1194         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAccessibility):
1195         * UserInterface/Views/ResourceSidebarPanel.js:
1196         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1197         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1198         (WebInspector.ScopeChainDetailsSidebarPanel):
1199         * UserInterface/Views/ScriptContentView.js:
1200         (WebInspector.ScriptContentView.prototype._toggleTypeAnnotations):
1201         * UserInterface/Views/SourceCodeTextEditor.js:
1202         (WebInspector.SourceCodeTextEditor.prototype._createControlFlowScrollEventHandler):
1203         * UserInterface/Views/TextResourceContentView.js:
1204         (WebInspector.TextResourceContentView.prototype._toggleTypeAnnotations):
1205         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1206         (EsprimaFormatter.prototype._handleTokenAtNode):
1207         Address pedantic warnings for consistent style.
1208
1209 2017-01-30  Devin Rousso  <dcrousso+webkit@gmail.com>
1210
1211         Web Inspector: "bouncy highlight" element in TextEditor/DOMTreeOutline should update or dismiss when user scrolls
1212         https://bugs.webkit.org/show_bug.cgi?id=167146
1213
1214         Reviewed by Timothy Hatcher.
1215
1216         * UserInterface/Views/TextEditor.js:
1217         (WebInspector.TextEditor.prototype._revealSearchResult.scrollHandler):
1218         (WebInspector.TextEditor.prototype._revealSearchResult.animationEnded):
1219         (WebInspector.TextEditor.prototype._revealSearchResult):
1220
1221 2017-01-30  Joseph Pecoraro  <pecoraro@apple.com>
1222
1223         Implement PerformanceObserver
1224         https://bugs.webkit.org/show_bug.cgi?id=167546
1225         <rdar://problem/30247959>
1226
1227         Reviewed by Ryosuke Niwa.
1228
1229         * UserInterface/Models/NativeFunctionParameters.js:
1230         Improve API view display of built-in performance methods.
1231
1232 2017-01-30  Matt Baker  <mattbaker@apple.com>
1233
1234         Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
1235         https://bugs.webkit.org/show_bug.cgi?id=165633
1236         <rdar://problem/29738502>
1237
1238         Reviewed by Joseph Pecoraro.
1239
1240         * Localizations/en.lproj/localizedStrings.js:
1241         Text for "Truncated" marker tree element.
1242
1243         * UserInterface/Models/StackTrace.js:
1244         (WebInspector.StackTrace):
1245         (WebInspector.StackTrace.fromPayload):
1246         (WebInspector.StackTrace.prototype.get truncated):
1247         Plumbing for new Console.StackTrace property `truncated`.
1248
1249         * UserInterface/Views/ThreadTreeElement.css:
1250         (.tree-outline > .item.thread + ol > .item.truncated-call-frames):
1251         (.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
1252         Styles for "Truncated" marker tree element.
1253
1254         * UserInterface/Views/ThreadTreeElement.js:
1255         (WebInspector.ThreadTreeElement.prototype.refresh):
1256         Append "Truncated" marker tree element if necessary.
1257
1258         * Versions/Inspector-iOS-10.3.json:
1259
1260 2017-01-30  Ryan Haddad  <ryanhaddad@apple.com>
1261
1262         Unreviewed, rolling out r211345.
1263
1264         The LayoutTest for this change is failing an assertion.
1265
1266         Reverted changeset:
1267
1268         "Web Inspector: Need some limit on Async Call Stacks for async
1269         loops (rAF loops)"
1270         https://bugs.webkit.org/show_bug.cgi?id=165633
1271         http://trac.webkit.org/changeset/211345
1272
1273 2017-01-28  Matt Baker  <mattbaker@apple.com>
1274
1275         Web Inspector: Need some limit on Async Call Stacks for async loops (rAF loops)
1276         https://bugs.webkit.org/show_bug.cgi?id=165633
1277         <rdar://problem/29738502>
1278
1279         Reviewed by Joseph Pecoraro.
1280
1281         * Localizations/en.lproj/localizedStrings.js:
1282         Text for "Truncated" marker tree element.
1283
1284         * UserInterface/Models/StackTrace.js:
1285         (WebInspector.StackTrace):
1286         (WebInspector.StackTrace.fromPayload):
1287         (WebInspector.StackTrace.prototype.get truncated):
1288         Plumbing for new Console.StackTrace property `truncated`.
1289
1290         * UserInterface/Views/ThreadTreeElement.css:
1291         (.tree-outline > .item.thread + ol > .item.truncated-call-frames):
1292         (.tree-outline > .item.thread + ol > .item.truncated-call-frames .icon):
1293         Styles for "Truncated" marker tree element.
1294
1295         * UserInterface/Views/ThreadTreeElement.js:
1296         (WebInspector.ThreadTreeElement.prototype.refresh):
1297         Append "Truncated" marker tree element if necessary.
1298
1299         * Versions/Inspector-iOS-10.3.json:
1300
1301 2017-01-27  Devin Rousso  <dcrousso+webkit@gmail.com>
1302
1303         Web Inspector: gradient editor should provide horizontal slider for 'angle' value where applicable
1304         https://bugs.webkit.org/show_bug.cgi?id=166937
1305
1306         Reviewed by Joseph Pecoraro.
1307
1308         * UserInterface/Views/GradientEditor.css:
1309         (.gradient-editor):
1310         (.gradient-editor > .gradient-angle):
1311         (.gradient-editor > .gradient-angle > input[type="range"]):
1312         (.gradient-editor > .gradient-angle > input[type="number"]):
1313         (.gradient-editor > .gradient-angle > input::-webkit-inner-spin-button):
1314         (.gradient-editor > .gradient-angle > input): Deleted.
1315
1316         * UserInterface/Views/GradientEditor.js:
1317         (WebInspector.GradientEditor):
1318         (WebInspector.GradientEditor.prototype.set gradient):
1319         (WebInspector.GradientEditor.prototype.gradientSliderStopWasSelected):
1320         (WebInspector.GradientEditor.prototype._gradientTypeChanged):
1321         (WebInspector.GradientEditor.prototype._angleChanged):
1322         (WebInspector.GradientEditor.prototype.dragToAdjustControllerWasAdjustedByAmount): Deleted.
1323         (WebInspector.GradientEditor.prototype._angleInputValueDidChange): Deleted.
1324         Remove the DragToAdjustController and replace with an <input type="range">.
1325
1326 2017-01-23  Joseph Pecoraro  <pecoraro@apple.com>
1327
1328         Web Inspector: Provide a way to trigger a Garbage Collection
1329         https://bugs.webkit.org/show_bug.cgi?id=167345
1330         <rdar://problem/30102853>
1331
1332         Reviewed by Timothy Hatcher.
1333
1334         * Localizations/en.lproj/localizedStrings.js:
1335         New "Garbage collect" tooltip.
1336
1337         * Versions/Inspector-iOS-10.3.json:
1338         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
1339         Update 10.3 so it generates its list of supported domains for workers.
1340         Note that the Heap domain is not be available in this backend but it is now.
1341
1342         * UserInterface/Protocol/Connection.js:
1343         (InspectorBackend.WorkerConnection):
1344         * UserInterface/Protocol/HeapObserver.js:
1345         (WebInspector.HeapObserver.prototype.garbageCollected):
1346         * UserInterface/Protocol/InspectorBackend.js:
1347         (InspectorBackendClass):
1348         (InspectorBackendClass.prototype.get workerSupportedDomains):
1349         (InspectorBackendClass.prototype.workerSupportedDomain):
1350
1351         * UserInterface/Images/NavigationItemClear.svg: Added.
1352         * UserInterface/Images/NavigationItemGarbageCollect.svg: Added.
1353         New image for Garbage Collection. Better image for clearing.
1354         
1355         * UserInterface/Images/gtk/NavigationItemClear.svg: Added.
1356         Copy the Trash icon for Clear for gtk.
1357
1358         * UserInterface/Protocol/Target.js:
1359         (WebInspector.Target.prototype.get HeapAgent):
1360         * UserInterface/Protocol/WorkerTarget.js:
1361         (WebInspector.WorkerTarget):
1362         Include Heap agent for Workers.
1363
1364         * UserInterface/Views/LogContentView.js:
1365         (WebInspector.LogContentView):
1366         (WebInspector.LogContentView.prototype.get navigationItems):
1367         (WebInspector.LogContentView.prototype._garbageCollect):
1368         Add garbage collect button which triggers gc on all capable targets.
1369
1370         * UserInterface/Views/NetworkGridContentView.js:
1371         (WebInspector.NetworkGridContentView):
1372         * UserInterface/Views/TimelineRecordingContentView.js:
1373         (WebInspector.TimelineRecordingContentView):
1374         Update the Clear icon to an improved icon.
1375
1376         * UserInterface/Controllers/HeapManager.js:
1377         (WebInspector.HeapManager.prototype.garbageCollected):
1378         Timelines only shows Main Target events, do not show GC events for Workers.
1379
1380 2017-01-23  Devin Rousso  <dcrousso+webkit@gmail.com>
1381
1382         Web Inspector: long press on New Tab Tab Item should show context menu with recently closed tabs that are still closed
1383         https://bugs.webkit.org/show_bug.cgi?id=166901
1384
1385         Reviewed by Joseph Pecoraro.
1386
1387         * Localizations/en.lproj/localizedStrings.js:
1388         * UserInterface/Views/TabBar.js:
1389         (WebInspector.TabBar.Event):
1390         (WebInspector.TabBar.prototype._handleNewTabContextMenu):
1391         Add listener dispatch for contextmenu event on New Tab tab item.
1392
1393         (WebInspector.TabBar.prototype.get newTabTabBarItem): Deleted.
1394         Unused.
1395
1396         * UserInterface/Views/TabBrowser.js:
1397         (WebInspector.TabBrowser):
1398         (WebInspector.TabBrowser.prototype._tabBarItemAdded):
1399         (WebInspector.TabBrowser.prototype._tabBarItemRemoved):
1400         (WebInspector.TabBrowser.prototype._handleNewTabContextMenu): Added.
1401         Create an array that keeps track of tabs as they are closed, and populate the contextmenu
1402         of the New Tab tab item with entries for each of these tabs.
1403
1404 2017-01-23  Devin Rousso  <dcrousso+webkit@gmail.com>
1405
1406         Web Inspector: tree elements with depth > 1 should have context menu "expand all"/"collapse all" commands
1407         https://bugs.webkit.org/show_bug.cgi?id=135590
1408
1409         Reviewed by Timothy Hatcher.
1410
1411         Rework the context menu event handlers for all TreeOutline and TreeElement instances such
1412         that the TreeOutline handles the event listener and creates the context menu object and the
1413         TreeElement populates the list with items.  This is necessary due to the way in which
1414         children are laid out, as there is padding on either side of the element that would not
1415         trigger a context menu event.
1416
1417         * Localizations/en.lproj/localizedStrings.js:
1418         * UserInterface/Views/BreakpointTreeElement.js:
1419         (WebInspector.BreakpointTreeElement.prototype.ondetach):
1420         (WebInspector.BreakpointTreeElement.prototype.populateContextMenu):
1421         (WebInspector.BreakpointTreeElement.prototype.oncontextmenu): Deleted.
1422         * UserInterface/Views/ContextMenuUtilities.js:
1423         (WebInspector.appendContextMenuItemsForSourceCode):
1424         * UserInterface/Views/DOMTreeElement.js:
1425         (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
1426         * UserInterface/Views/DOMTreeOutline.js:
1427         (WebInspector.DOMTreeOutline):
1428         (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
1429         (WebInspector.DOMTreeOutline.prototype._onmousedown):
1430         (WebInspector.DOMTreeOutline.prototype._onmousemove):
1431         (WebInspector.DOMTreeOutline.prototype._ondragstart):
1432         (WebInspector.DOMTreeOutline.prototype._ondragover):
1433         (WebInspector.DOMTreeOutline.prototype._ondrop):
1434         (WebInspector.DOMTreeOutline.prototype._treeElementFromEvent): Deleted.
1435         (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Deleted.
1436         * UserInterface/Views/DebuggerSidebarPanel.js:
1437         (WebInspector.DebuggerSidebarPanel):
1438         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
1439         * UserInterface/Views/FrameTreeElement.js:
1440         (WebInspector.FrameTreeElement.prototype.onattach):
1441         * UserInterface/Views/GeneralTreeElement.js:
1442         (WebInspector.GeneralTreeElement.prototype.onattach):
1443         (WebInspector.GeneralTreeElement.prototype.ondetach): Deleted.
1444         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1445         (WebInspector.ObjectTreeBaseTreeElement.prototype.populateContextMenu):
1446         (WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
1447         (WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):
1448         (WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu): Deleted.
1449         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): Deleted.
1450         * UserInterface/Views/ResourceTreeElement.js:
1451         (WebInspector.ResourceTreeElement.prototype.populateContextMenu):
1452         (WebInspector.ResourceTreeElement.prototype.onattach): Deleted.
1453         (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Deleted.
1454         * UserInterface/Views/ThreadTreeElement.js:
1455         (WebInspector.ThreadTreeElement.prototype.populateContextMenu):
1456         (WebInspector.ThreadTreeElement.prototype.oncontextmenu): Deleted.
1457         * UserInterface/Views/TreeElement.js:
1458         (WebInspector.TreeElement.prototype.populateContextMenu):
1459         (WebInspector.TreeElement):
1460         * UserInterface/Views/TreeOutline.js:
1461         (WebInspector.TreeOutline):
1462         (WebInspector.TreeOutline.prototype.treeElementFromEvent):
1463         (WebInspector.TreeOutline.prototype.populateContextMenu):
1464         (WebInspector.TreeOutline._generateStyleRulesIfNeeded):
1465         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
1466         (WebInspector.VisualStyleSelectorTreeItem.prototype.onattach):
1467         (WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu):
1468         (WebInspector.VisualStyleSelectorTreeItem.prototype._highlightNodesWithSelector):
1469         (WebInspector.VisualStyleSelectorTreeItem.prototype._hideDOMNodeHighlight):
1470         (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): Deleted.
1471         * UserInterface/Views/WorkerTreeElement.js:
1472         (WebInspector.WorkerTreeElement.prototype.populateContextMenu):
1473         (WebInspector.WorkerTreeElement.prototype.onattach):
1474         (WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent): Deleted.
1475
1476         * UserInterface/Views/DataGrid.js:
1477         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
1478         Add "Expand All"/"Collapse All" context menu items.
1479
1480 2017-01-23  Devin Rousso  <dcrousso+webkit@gmail.com>
1481
1482         Web Inspector: color picker should feature an editable CSS value
1483         https://bugs.webkit.org/show_bug.cgi?id=124356
1484
1485         Reviewed by Timothy Hatcher.
1486
1487         * UserInterface/Views/ColorPicker.css:
1488         (.color-picker):
1489         (.color-picker.hide-inputs):
1490         (.color-picker > .color-inputs):
1491         (.color-picker > .color-inputs > div):
1492         (.color-picker > .color-inputs > div[hidden]):
1493         (.color-picker > .color-inputs input):
1494
1495         * UserInterface/Views/ColorPicker.js:
1496         (WebInspector.ColorPicker.createColorInput):
1497         (WebInspector.ColorPicker):
1498         (WebInspector.ColorPicker.prototype.set color):
1499         (WebInspector.ColorPicker.prototype.set enableColorComponentInputs):
1500         (WebInspector.ColorPicker.prototype._updateColor):
1501         (WebInspector.ColorPicker.prototype._handleFormatChange):
1502         (WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput):
1503         (WebInspector.ColorPicker.prototype._showColorComponentInputs):
1504         (WebInspector.ColorPicker.prototype._handleColorInputInput):
1505         Add an input element (with a label for the component name and its units) for each component
1506         as part of the current color format (e.g. R, G, B, A).  If any of these inputs are changed
1507         then the color is also changed and the "ColorChanged" event is fired.
1508
1509         * UserInterface/Controllers/CodeMirrorColorEditingController.js:
1510         (WebInspector.CodeMirrorColorEditingController.prototype.popoverWillPresent):
1511         * UserInterface/Views/InlineSwatch.js:
1512         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
1513         Add FormatChanged event that fires whenever a new color is set with a different format or 
1514         the color value is set for the first time (there is no old format to compare to).  This is
1515         needed because if the format becomes RGB, RGBA, HSL, or HSLA from something not in that list
1516         then the size of the containing popover needs to change since the newly added color inputs
1517         will be displayed.
1518
1519         * UserInterface/Views/GradientEditor.js:
1520         (WebInspector.GradientEditor):
1521         Prevent the color inputs from displaying at all, since there aren't individual swatches for
1522         each color in a gradient.
1523
1524 2017-01-20  Devin Rousso  <dcrousso+webkit@gmail.com>
1525
1526         Web Inspector: Search Tab should display search results immediately when closing and reopening Inspector
1527         https://bugs.webkit.org/show_bug.cgi?id=167073
1528
1529         Reviewed by Timothy Hatcher.
1530
1531         * UserInterface/Views/SearchSidebarPanel.js:
1532         (WebInspector.SearchSidebarPanel.prototype.focusSearchField):
1533         Add parameter that will trigger a search with the current input value when true.
1534
1535         * UserInterface/Views/SearchTabContentView.js:
1536         (WebInspector.SearchTabContentView):
1537         (WebInspector.SearchTabContentView.prototype.focusSearchField):
1538         (WebInspector.SearchTabContentView.prototype.initialLayout):
1539
1540 2017-01-19  Devin Rousso  <dcrousso+webkit@gmail.com>
1541
1542         Web Inspector: Network Tab's "Clear Network Items" button should have keyboard shortcuts
1543         https://bugs.webkit.org/show_bug.cgi?id=166943
1544
1545         Reviewed by Timothy Hatcher.
1546
1547         * Localizations/en.lproj/localizedStrings.js:
1548
1549         * UserInterface/Base/Main.js:
1550         (WebInspector.contentLoaded):
1551         (WebInspector._clear):
1552         Move clear keyboard shortcut to main object and call _handleClearShortcut on the visible
1553         content view if able.
1554
1555         * UserInterface/Controllers/JavaScriptLogViewController.js:
1556         (WebInspector.JavaScriptLogViewController):
1557         (WebInspector.JavaScriptLogViewController.prototype.requestClearMessages):
1558         (WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut): Deleted.
1559         * UserInterface/Views/LogContentView.js:
1560         (WebInspector.LogContentView):
1561         (WebInspector.LogContentView.prototype.handleClearShortcut):
1562         Move logic for requesting to clear messages from the LogManager to a better named function.
1563
1564         * UserInterface/Views/NetworkGridContentView.js:
1565         (WebInspector.NetworkGridContentView):
1566         (WebInspector.NetworkGridContentView.prototype.handleClearShortcut):
1567
1568 2017-01-19  Devin Rousso  <dcrousso+webkit@gmail.com>
1569
1570         Web Inspector: Dashboard's log/error/warning help tag says "click to show the Console" even when clicking does nothing
1571         https://bugs.webkit.org/show_bug.cgi?id=167102
1572
1573         Reviewed by Brian Burg.
1574
1575         * UserInterface/Base/Main.js:
1576         (WebInspector.showConsoleTab):
1577         Don't revert to the All scopes if the requested scope is already selected.
1578
1579         * Localizations/en.lproj/localizedStrings.js:
1580         * UserInterface/Views/DefaultDashboardView.js:
1581         (WebInspector.DefaultDashboardView):
1582         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
1583         (WebInspector.DefaultDashboardView.prototype._setItemEnabled):
1584         Only apply a title to the element when it is enabled.
1585
1586 2017-01-18  Devin Rousso  <dcrousso+webkit@gmail.com>
1587
1588         Web Inspector: split console should be allowed for Network and Timeline tabs when Inspector is not docked
1589         https://bugs.webkit.org/show_bug.cgi?id=167075
1590
1591         Reviewed by Timothy Hatcher.
1592
1593         * UserInterface/Base/Main.js:
1594         (WebInspector.dockedConfigurationSupportsSplitContentBrowser):
1595         Helper function to determine if the current docked state supports having the content view
1596         and split console at the same time.  Currently set to be true if not docked bottom.
1597
1598         * UserInterface/Views/ClusterContentView.js:
1599         (WebInspector.ClusterContentView.prototype.get supportsSplitContentBrowser):
1600         * UserInterface/Views/ContentView.js:
1601         (WebInspector.ContentView.prototype.get supportsSplitContentBrowser):
1602         * UserInterface/Views/NetworkTabContentView.js:
1603         (WebInspector.NetworkTabContentView.prototype.get supportsSplitContentBrowser):
1604         * UserInterface/Views/TimelineTabContentView.js:
1605         (WebInspector.TimelineTabContentView.prototype.get supportsSplitContentBrowser): Deleted.
1606         Update supportsSplitContentBrowser functions to only be true/false based on the return value
1607         of WebInspector.dockedConfigurationSupportsSplitContentBrowser.
1608
1609 2017-01-18  Joseph Pecoraro  <pecoraro@apple.com>
1610
1611         Web Inspector: console.table only works for the first 5 properties
1612         https://bugs.webkit.org/show_bug.cgi?id=167175
1613
1614         Reviewed by Timothy Hatcher.
1615
1616         * UserInterface/Views/ConsoleMessageView.js:
1617         (WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
1618         Allow a max of 15 columns instead of 10.
1619
1620 2017-01-16  Devin Rousso  <dcrousso+webkit@gmail.com>
1621
1622         Web Inspector: add "Persist Logs on Navigation" to settings screen
1623         https://bugs.webkit.org/show_bug.cgi?id=166992
1624
1625         Reviewed by Brian Burg.
1626
1627         * Localizations/en.lproj/localizedStrings.js:
1628
1629         * UserInterface/Base/Setting.js:
1630         * UserInterface/Controllers/LogManager.js:
1631         (WebInspector.LogManager):
1632         (WebInspector.LogManager.prototype._delayedMessagesCleared):
1633         * UserInterface/Views/LogContentView.js:
1634         (WebInspector.LogContentView.prototype._sessionStarted):
1635         (WebInspector.LogContentView.prototype._handleContextMenuEvent):
1636         (WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
1637         Move setting and UI toggle for "Keep Log on Navigation" to the global settings dictionary
1638         and content view.
1639
1640         * UserInterface/Views/SettingsTabContentView.js:
1641         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1642         (WebInspector.SettingsTabContentView):
1643         Add checkbox for new setting and spacer between text settings and log settings.
1644
1645 2017-01-16  Devin Rousso  <dcrousso+webkit@gmail.com>
1646
1647         Web Inspector: add UI Zoom level to Settings screen
1648         https://bugs.webkit.org/show_bug.cgi?id=166991
1649
1650         Reviewed by Brian Burg.
1651
1652         * Localizations/en.lproj/localizedStrings.js:
1653
1654         * UserInterface/Base/Main.js:
1655         (WebInspector.loaded):
1656         (WebInspector._dockedResizerMouseDown):
1657         (WebInspector._increaseZoom):
1658         (WebInspector._decreaseZoom):
1659         (WebInspector._resetZoom):
1660         (WebInspector.getZoomFactor): Renamed from _zoomFactor.
1661         (WebInspector.setZoomFactor): Renamed from _setZoomFactor.
1662         * UserInterface/Base/Setting.js:
1663         (WebInspector.settings):
1664         Moved zoomFactor setting to global dictionary.
1665
1666         * UserInterface/Views/SettingsTabContentView.css:
1667         (.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
1668         * UserInterface/Views/SettingsTabContentView.js:
1669         (WebInspector.SettingsTabContentView.prototype.initialLayout):
1670         Add UI input for changing zoomFactor.
1671
1672 2017-01-14  Devin Rousso  <dcrousso+webkit@gmail.com>
1673
1674         Web Inspector: Cmd-, should open Settings tab
1675         https://bugs.webkit.org/show_bug.cgi?id=167028
1676
1677         Reviewed by Timothy Hatcher.
1678
1679         * UserInterface/Base/Main.js:
1680         (WebInspector.contentLoaded):
1681         (WebInspector._showSettingsTab): Added.
1682
1683 2017-01-13  Devin Rousso  <dcrousso+webkit@gmail.com>
1684
1685         Web Inspector: Settings tab is restored when reopening inspector
1686         https://bugs.webkit.org/show_bug.cgi?id=167025
1687
1688         Reviewed by Matt Baker.
1689
1690         * UserInterface/Base/Main.js:
1691         (WebInspector._tabBrowserSelectedTabContentViewDidChange):
1692         Only save the selectedTabIndex if the current tab should be saved and reloaded upon opening
1693         the WebInspector window.
1694
1695 2017-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
1696
1697         Web Inspector: Resources disappear from the network tab when iframe gets removed from DOM
1698         https://bugs.webkit.org/show_bug.cgi?id=166776
1699         <rdar://problem/29909640>
1700
1701         Reviewed by Matt Baker.
1702
1703         * UserInterface/Views/NetworkSidebarPanel.js:
1704         (WebInspector.NetworkSidebarPanel):
1705         Don't remove resource tree elements from Network tab when iframe gets detached from the DOM.
1706
1707 2017-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
1708
1709         Web Inspector: the 'lock' icon for non-editable rules in the Style Rules sidebar lacks a tooltip
1710         https://bugs.webkit.org/show_bug.cgi?id=166909
1711         <rdar://problem/29959406>
1712
1713         Reviewed by Matt Baker.
1714
1715         Convert the lock icon from a pseudo-element to an 'img' element and add a title attribute.
1716
1717         * Localizations/en.lproj/localizedStrings.js:
1718         * UserInterface/Views/CSSStyleDeclarationSection.css:
1719         (.style-declaration-section.locked > .header > .locked-icon):
1720         (.style-declaration-section.locked > .header::before): Deleted.
1721         * UserInterface/Views/CSSStyleDeclarationSection.js:
1722         (WebInspector.CSSStyleDeclarationSection):
1723
1724 2017-01-12  Nikita Vasilyev  <nvasilyev@apple.com>
1725
1726         REGRESSION (r209711): Web Inspector: in Elements Tab, selecting a deeply nested DOM element causes navigation bar buttons to be pushed off the leading edge
1727         https://bugs.webkit.org/show_bug.cgi?id=166898
1728         <rdar://problem/29951737>
1729
1730         Reviewed by Timothy Hatcher.
1731
1732         * UserInterface/Views/HierarchicalPathComponent.js:
1733         (WebInspector.HierarchicalPathComponent.prototype.set selectorArrows):
1734         The following operations do NOT produce the same result:
1735
1736             classList.toogle(aString, undefined)
1737             classList.toogle(aString, false)
1738
1739         The former is an equivalent of classList.toogle(aString), e.g. it set a class if it wasn't set before.
1740
1741 2017-01-12  Devin Rousso  <dcrousso+webkit@gmail.com>
1742
1743         Web Inspector: cubic-bezier editor behaves poorly for invalid inputs in component fields
1744         https://bugs.webkit.org/show_bug.cgi?id=166928
1745
1746         Reviewed by Brian Burg.
1747
1748         * UserInterface/Views/BezierEditor.css:
1749         (.bezier-editor):
1750         (.bezier-editor > .number-input-container > input):
1751
1752         * UserInterface/Views/BezierEditor.js:
1753         (WebInspector.BezierEditor.createBezierInput):
1754         (WebInspector.BezierEditor):
1755         Add type, step, min, and max to the bezier component inputs to better control user input.
1756
1757 2017-01-11  Joseph Pecoraro  <pecoraro@apple.com>
1758
1759         Web Inspector: Add another Protocol Version
1760         https://bugs.webkit.org/show_bug.cgi?id=166953
1761         <rdar://problem/29980631>
1762
1763         Reviewed by Timothy Hatcher.
1764
1765         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Added.
1766         * Versions/Inspector-iOS-10.3.json: Added.
1767
1768 2017-01-11  Devin Rousso  <dcrousso+webkit@gmail.com>
1769
1770         Web Inspector: spring function editor has unusual layout, should have left-aligned labels and slider tracks
1771         https://bugs.webkit.org/show_bug.cgi?id=166933
1772
1773         Reviewed by Brian Burg.
1774
1775         * UserInterface/Views/Main.css:
1776         (input[type=range]::-webkit-slider-thumb):
1777         (input[type=range]::-webkit-slider-runnable-track):
1778         (input[type=range]::-webkit-slider-runnable-track::before): Deleted.
1779         Fix slider styles.
1780
1781         * UserInterface/Views/SpringEditor.css:
1782         (.spring-editor):
1783         (.spring-editor > .spring-preview):
1784         (.spring-editor > .spring-timing):
1785         (.spring-editor > .number-input-container > .number-input-row > .number-input-row-title):
1786         (.spring-editor > .number-input-container > .number-input-row > input):
1787         (.spring-editor > .number-input-container > .number-input-row > input::-webkit-inner-spin-button):
1788         (.spring-editor > .number-input-container > .number-input-row > input[type="range"]):
1789         Decrease spacing and left-align text.
1790
1791         * UserInterface/Views/SpringEditor.js:
1792         (WebInspector.SpringEditor.prototype._handleNumberInputKeydown):
1793         (WebInspector.SpringEditor.prototype._changeSpringForInput):
1794         Only update editor values when the new value of any input has changed.  This allows users to
1795         enter decimal values ("." was being stripped by `parseFloat`).
1796
1797 2017-01-11  Devin Rousso  <dcrousso+webkit@gmail.com>
1798
1799         Web Inspector: color, gradient, cubic-bezier, spring editors should be dismissable using ESC
1800         https://bugs.webkit.org/show_bug.cgi?id=166934
1801
1802         Reviewed by Brian Burg.
1803
1804         * UserInterface/Views/Popover.js:
1805         (WebInspector.Popover):
1806         (WebInspector.Popover.prototype.dismiss):
1807         (WebInspector.Popover.prototype.handleEvent):
1808         (WebInspector.Popover.prototype._addListenersIfNeeded):
1809         Adds a keydown listener while visible for the Escape key that dismisses the popover.
1810
1811         * UserInterface/Views/QuickConsole.js:
1812         (WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled):
1813         Expose the ability to disable the global keyboard shortcut.  This allows the Popover to have
1814         its own Escape keyboard shortcut to take precedence.
1815
1816 2017-01-11  Devin Rousso  <dcrousso+webkit@gmail.com>
1817
1818         Web Inspector: fix UIString for Print Styles button
1819         https://bugs.webkit.org/show_bug.cgi?id=166892
1820
1821         Reviewed by Brian Burg.
1822
1823         * Localizations/en.lproj/localizedStrings.js:
1824         * UserInterface/Views/DOMTreeContentView.js:
1825         (WebInspector.DOMTreeContentView):
1826         Changed UIString to better match documentation.
1827
1828 2017-01-09  Commit Queue  <commit-queue@webkit.org>
1829
1830         Unreviewed, rolling out r210260.
1831         https://bugs.webkit.org/show_bug.cgi?id=166860
1832
1833         new colorpicker UI doesn't seem to work in trunk,
1834         investigating offline (Requested by brrian on #webkit).
1835
1836         Reverted changeset:
1837
1838         "Web Inspector: color picker should feature an editable CSS
1839         value"
1840         https://bugs.webkit.org/show_bug.cgi?id=124356
1841         http://trac.webkit.org/changeset/210260
1842
1843 2017-01-06  Commit Queue  <commit-queue@webkit.org>
1844
1845         Unreviewed, rolling out r210110.
1846         https://bugs.webkit.org/show_bug.cgi?id=166783
1847
1848         Introduced a regression commenting out individual properties
1849         (Requested by JoePeck on #webkit).
1850
1851         Reverted changeset:
1852
1853         "Web Inspector: Styles sidebar: Uncommenting CSS rules of
1854         pseudo-elements doesn't work"
1855         https://bugs.webkit.org/show_bug.cgi?id=165831
1856         http://trac.webkit.org/changeset/210110
1857
1858 2017-01-05  Joseph Pecoraro  <pecoraro@apple.com>
1859
1860         Web Inspector: Remove unused delegate from VisualStyleSelectorSection
1861         https://bugs.webkit.org/show_bug.cgi?id=166744
1862
1863         Reviewed by Alex Christensen.
1864
1865         * UserInterface/Views/VisualStyleDetailsPanel.js:
1866         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
1867         * UserInterface/Views/VisualStyleSelectorSection.js:
1868         (WebInspector.VisualStyleSelectorSection):
1869
1870 2017-01-04  Brian Burg  <bburg@apple.com>
1871
1872         Web Inspector: Test.html should support globals reportInternalError, reportUnhandledRejection, reportUncaughtException
1873         https://bugs.webkit.org/show_bug.cgi?id=161358
1874         <rdar://problem/28066446>
1875
1876         Reviewed by Joseph Pecoraro.
1877
1878         We have a hodgepodge of redundant code that reports uncaught exceptions in the inspector page.
1879         There is better handling of uncaught exceptions in the inspected page, such as including stack traces.
1880
1881         This patch consolidates a lot of this code and makes it possible to report
1882         unhandled promise rejections, top-level uncaught exceptions, and exceptions
1883         caught in a try-catch block. The formatting and sanitization code for all of
1884         these things is shared and consistent. Finally, some tests have been added to
1885         catch regressions in unhandled rejection/uncaught exception reporting.
1886
1887         * UserInterface/Test/FrontendTestHarness.js:
1888         (FrontendTestHarness): Explicitly set initial flag state here so it's easy to find all flags.
1889
1890         (FrontendTestHarness.prototype.redirectConsoleToTestOutput):
1891         Extract this code to sanitize stack frames and put it in TestHarness. It is used
1892         by other methods that need to print stack frames.
1893
1894         (FrontendTestHarness.prototype.reportUnhandledRejection):
1895         (FrontendTestHarness.prototype.reportUncaughtException):
1896         Added. Sanitize stack trace data so it is deterministic. Log the message to the
1897         original window.console but don't exit early. Sometimes the test page is not
1898         fully loaded if we throw an exception quite early in the test() method, and there's
1899         no harm in not early returning. If we do early return in this case, then a test that
1900         uses reportUncaughtException on purpose may not complete because the call to completeTest()
1901         would be skipped by returning early.
1902
1903         (FrontendTestHarness.prototype.reportUncaughtExceptionFromEvent):
1904         Renamed from reportUncaughtException since the signature of that method suggests
1905         it should have a single exception argument rather than lots of data arguments.
1906
1907         * UserInterface/Test/Test.js: Add globals.
1908
1909         * UserInterface/Test/TestHarness.js:
1910         (TestHarness): Document class flags.
1911         (TestHarness.sanitizeURL):
1912         (TestHarness.sanitizeStackFrame):
1913         (TestHarness.prototype.sanitizeStack):
1914         Extract this code from other parts of the test harness. Make sanitizeStack
1915         an instance method so that there is only one place that needs to check the
1916         'suppressStackTraces' flag.
1917
1918         * UserInterface/Test/TestSuite.js:
1919         (TestSuite.prototype.logThrownObject):
1920         (TestSuite):
1921         (AsyncTestSuite.prototype.runTestCases):
1922         (AsyncTestSuite):
1923         (SyncTestSuite.prototype.runTestCases):
1924         (SyncTestSuite):
1925         (TestSuite.messageFromThrownObject): Deleted.
1926         Inline some helpers with only one use-site and consolidate redundant code
1927         for adding an exception and message to the test results.
1928
1929 2017-01-04  Nikita Vasilyev  <nvasilyev@apple.com>
1930
1931         Web Inspector: application cache details not shown in Storage Tab
1932         https://bugs.webkit.org/show_bug.cgi?id=166699
1933         <rdar://problem/29871716>
1934
1935         Reviewed by Brian Burg.
1936
1937         Fix a ternary operator precedence. The following expression throws an exception:
1938
1939             true || false ? i.dont.exist : false
1940
1941         * UserInterface/Views/ApplicationCacheFrameTreeElement.js:
1942         (WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles):
1943
1944 2017-01-03  Brian Burg  <bburg@apple.com>
1945
1946         Web Inspector: WrappedPromise constructor should behave like the Promise constructor
1947         https://bugs.webkit.org/show_bug.cgi?id=166523
1948
1949         Reviewed by Joseph Pecoraro.
1950
1951         * UserInterface/Models/WrappedPromise.js:
1952         (WebInspector.WrappedPromise):
1953         - Return the result of 'work' from the inner promise
1954         so WrappedPromise.promise can be chained.
1955         - Provide shim resolve, reject callbacks as parameters.
1956
1957         (WebInspector.WrappedPromise.prototype.get settled): Added.
1958         Tells whether we already resolved or rejected the promise.
1959
1960         (WebInspector.WrappedPromise.prototype.resolve):
1961         (WebInspector.WrappedPromise.prototype.reject):
1962         Throw an error if already settled and update the flag.
1963
1964 2017-01-03  Devin Rousso  <dcrousso+webkit@gmail.com>
1965
1966         Web Inspector: color picker should feature an editable CSS value
1967         https://bugs.webkit.org/show_bug.cgi?id=124356
1968
1969         Reviewed by Brian Burg.
1970
1971         * UserInterface/Views/ColorPicker.css:
1972         (.color-picker):
1973         (.color-picker > .color-inputs):
1974         (.color-picker > .color-inputs > div):
1975         (.color-picker > .color-inputs > div[hidden]):
1976         (.color-picker > .color-inputs input):
1977
1978         * UserInterface/Views/ColorPicker.js:
1979         (WebInspector.ColorPicker.createColorInput):
1980         (WebInspector.ColorPicker):
1981         (WebInspector.ColorPicker.prototype.set color):
1982         (WebInspector.ColorPicker.prototype.sliderValueDidChange):
1983         (WebInspector.ColorPicker.prototype._updateColor):
1984         (WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput):
1985         (WebInspector.ColorPicker.prototype._showColorComponentInputs):
1986         (WebInspector.ColorPicker.prototype._handleColorInputInput):
1987         Add an input element (with a label for the component name and its units) for each component
1988         as part of the current color format (e.g. R, G, B, A).  If any of these inputs are changed
1989         then the color is also changed and the "ColorChanged" event is fired.
1990
1991 2017-01-03  Joseph Pecoraro  <pecoraro@apple.com>
1992
1993         Web Inspector: "Invalid Characters" setting does the opposite of the checkbox
1994         https://bugs.webkit.org/show_bug.cgi?id=166664
1995
1996         Reviewed by Brian Burg.
1997
1998         * UserInterface/Views/CodeMirrorOverrides.css:
1999         (.CodeMirror .cm-invalidchar):
2000         (.show-invalid-characters .CodeMirror .cm-invalidchar):
2001         Hide invalid characters by default, and show them with the show class.
2002
2003 2017-01-03  Joseph Pecoraro  <pecoraro@apple.com>
2004
2005         Web Inspector: Fix Content Flow Container Regions Computed Style section
2006         https://bugs.webkit.org/show_bug.cgi?id=166294
2007
2008         Reviewed by Brian Burg.
2009
2010         * UserInterface/Controllers/DOMTreeManager.js:
2011         (WebInspector.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes):
2012         (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved):
2013         (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable):
2014         (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo):
2015         (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getComputedProperty): Deleted.
2016         (WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getContentFlowName): Deleted.
2017         Update this to use Array.from() to convert the NodeList to an Array, and then
2018         use the already available RemoteObject's size property instead of getting the
2019         "length" property from the Array.
2020
2021 2017-01-03  Brian Burg  <bburg@apple.com>
2022
2023         Web Inspector: opening Test.html in a normal browser window doesn't log errors to console
2024         https://bugs.webkit.org/show_bug.cgi?id=166570
2025
2026         Reviewed by Joseph Pecoraro.
2027
2028         Early syntax errors in the test harness should be logged to the page console since they are easier to
2029         debug in a normal browser using Web Inspector. But, the checks to revert to normal console don't work.
2030
2031         * UserInterface/Test/FrontendTestHarness.js:
2032         (FrontendTestHarness.prototype.reportUncaughtException):
2033         Add a helper to encapsulate the meaning of checking this._shouldResendResults.
2034         This flag is always true until the test page injects its initializers into the
2035         inspector page, which will never happen when we view Test.html outside of the test harness.
2036
2037 2016-12-22  Commit Queue  <commit-queue@webkit.org>
2038
2039         Unreviewed, rolling out r210069.
2040         https://bugs.webkit.org/show_bug.cgi?id=166439
2041
2042         This patch makes all properties in Computed Styles strike-
2043         through when switching from the Rules panel. (Requested by NVI
2044         on #webkit).
2045
2046         Reverted changeset:
2047
2048         "Web Inspector: Uncommenting CSS properties doesn't work for
2049         inline styles"
2050         https://bugs.webkit.org/show_bug.cgi?id=166297
2051         http://trac.webkit.org/changeset/210069
2052
2053 2016-12-22  Nikita Vasilyev  <nvasilyev@apple.com>
2054
2055         Web Inspector: Styles sidebar: Uncommenting CSS rules of pseudo-elements doesn't work
2056         https://bugs.webkit.org/show_bug.cgi?id=165831
2057         <rdar://problem/29652688>
2058
2059         Reviewed by Matt Baker.
2060
2061         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2062         (WebInspector.CSSStyleDeclarationTextEditor.prototype.uncommentAllProperties):
2063         Call _resetContent() when toggling all properties to ensure properties have text markers.
2064
2065         (WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged):
2066         (WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentProperty): Added.
2067         This method is the opposite of _commentProperty. Introduce it to minimize code duplication.
2068
2069 2016-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
2070
2071         Web Inspector: Uncommenting CSS properties doesn't work for inline styles
2072         https://bugs.webkit.org/show_bug.cgi?id=166297
2073
2074         Reviewed by Brian Burg.
2075
2076         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2077         Update checkboxes for inline styles, too.
2078
2079 2016-12-20  Matt Baker  <mattbaker@apple.com>
2080
2081         Web Inspector: Window resize causes TimelineOverview graph elements to be repositioned
2082         https://bugs.webkit.org/show_bug.cgi?id=160207
2083         <rdar://problem/27553228>
2084
2085         Reviewed by Brian Burg.
2086
2087         TimelineRuler does not always update its divider positions when the start
2088         time changes while the end time remains the same. The check that determines
2089         whether the first or last divider positions have changed before doing a
2090         layout uses the ruler end time instead of calculating the last divider's
2091         position, and would falsely determine no change was needed.
2092
2093         * UserInterface/Views/TimelineRuler.js:
2094         (WebInspector.TimelineRuler.prototype.set startTime):
2095         (WebInspector.TimelineRuler.prototype.set secondsPerPixel):
2096         Clear cached divider data on zoom or scroll, forcing dividers to be recalculated.
2097         (WebInspector.TimelineRuler.prototype.layout):
2098         Calculate accurate divider count and last divider time.
2099
2100 2016-12-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2101
2102         Update keyword completions in the inspector for the new scroll snapping CSS properties
2103         https://bugs.webkit.org/show_bug.cgi?id=166235
2104
2105         Reviewed by Joseph Pecoraro.
2106
2107         The CSS keyword completions for the scroll snapping properties need to be updated for the latest version of the spec.
2108
2109         * UserInterface/Models/CSSKeywordCompletions.js:
2110
2111 2016-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2112
2113         Web Inspector: Console could be made useful for very simple await expressions
2114         https://bugs.webkit.org/show_bug.cgi?id=165681
2115         <rdar://problem/29755339>
2116
2117         Reviewed by Brian Burg.
2118
2119         Normally await expressions are only allowed inside of async functions.
2120         They make dealing with async operations easy, but can't be used directly
2121         in Web Inspector's console without making your own async function wrapper.
2122
2123         This change allows simple await expressions to be run in the console.
2124         The supported syntaxes are (simple expression with optional assignment):
2125
2126             await <expr>
2127             x = await <expr>
2128             let x = await <expr>
2129
2130         Web Inspector's console will automatically wrap this in an async
2131         function and report the resulting value or exception. For instance
2132         in the last example above:
2133
2134             let x;
2135             (async function() {
2136                 try {
2137                     x = await <expr>;
2138                     console.info("%o", x);
2139                 } catch (e) {
2140                     console.error(e);
2141                 }
2142             })();
2143             undefined
2144
2145         This way users can get the convenience of await in the Console.
2146         This also gives users a nice way of extracting a value out of
2147         a Promise without writing their own handlers.
2148
2149         * UserInterface/Controllers/RuntimeManager.js:
2150         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
2151         (WebInspector.RuntimeManager.prototype._tryApplyAwaitConvenience):
2152         Wrap simple await expressions into a function that will log the result.
2153
2154 2016-12-20  Joseph Pecoraro  <pecoraro@apple.com>
2155
2156         Web Inspector: Update CodeMirror to support async/await keyword and other ES2017 features
2157         https://bugs.webkit.org/show_bug.cgi?id=165677
2158
2159         Rubber-stamped by Brian Burg.
2160
2161         Update CodeMirror from version 5.5.1 to 5.21.1. Highlights include:
2162
2163           - Syntax highlighting for ES2017 features (async/await)
2164           - Syntax highlighting improvements for some ES6 features (new.target)
2165           - Syntax highlighting for CSS4 #rrggbbaa and #rgba colors
2166
2167         As well as a number of smaller bug fixes.
2168
2169         Had to add a few semicolons to codemirror.js so that our minifier
2170         didn't choke in a few places due to ASI behavior.
2171
2172         * Scripts/update-codemirror-resources.rb:
2173         * UserInterface/External/CodeMirror/LICENSE:
2174         * UserInterface/External/CodeMirror/clojure.js:
2175         * UserInterface/External/CodeMirror/closebrackets.js:
2176         * UserInterface/External/CodeMirror/codemirror.css:
2177         * UserInterface/External/CodeMirror/codemirror.js:
2178         * UserInterface/External/CodeMirror/coffeescript.js:
2179         * UserInterface/External/CodeMirror/comment.js:
2180         * UserInterface/External/CodeMirror/css.js:
2181         * UserInterface/External/CodeMirror/htmlmixed.js:
2182         * UserInterface/External/CodeMirror/javascript.js:
2183         * UserInterface/External/CodeMirror/livescript.js:
2184         * UserInterface/External/CodeMirror/matchbrackets.js:
2185         * UserInterface/External/CodeMirror/overlay.js:
2186         * UserInterface/External/CodeMirror/placeholder.js:
2187         * UserInterface/External/CodeMirror/runmode.js:
2188         * UserInterface/External/CodeMirror/sql.js:
2189         * UserInterface/External/CodeMirror/sublime.js:
2190         * UserInterface/External/CodeMirror/xml.js:
2191
2192 2016-12-19  Joseph Pecoraro  <pecoraro@apple.com>
2193
2194         Web Inspector: Address some assertions and uncaught exceptions seen using Inspector
2195         https://bugs.webkit.org/show_bug.cgi?id=166048
2196
2197         Reviewed by Matt Baker.
2198
2199         * UserInterface/Controllers/CodeMirrorEditingController.js:
2200         (WebInspector.CodeMirrorEditingController.prototype.presentHoverMenu):
2201         (WebInspector.CodeMirrorEditingController.prototype.dismissHoverMenu):
2202         classList throws an exception when given an empty string. Avoid those cases.
2203
2204         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
2205         (WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking):
2206         (WebInspector.CodeMirrorTokenTrackingController.prototype._stopTracking):
2207         Seen this assert frequently for a while, existing code handles it gracefully.
2208
2209         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
2210         (EsprimaFormatter.prototype._handleTokenAtNode):
2211         We correctly handle these tokens but they were not in the list of expected tokens.
2212
2213 2016-12-16  Joseph Pecoraro  <pecoraro@apple.com>
2214
2215         JSContext Inspector: Avoid some possible exceptions inspecting a JSContext
2216         https://bugs.webkit.org/show_bug.cgi?id=165986
2217         <rdar://problem/29551379>
2218
2219         Reviewed by Matt Baker.
2220
2221         * UserInterface/Base/Main.js:
2222         There will not be a main frame if we are debugging a JSContext.
2223         In those cases do not change the title.
2224
2225         * UserInterface/Views/ResourceSidebarPanel.js:
2226         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
2227         There may not be a parent folder in JavaScript inspection. In that case
2228         ScriptTreeElements are added to the Top Level, not folders.
2229
2230 2016-12-16  Matt Baker  <mattbaker@apple.com>
2231
2232         Web Inspector: REGRESSION (r209882): Opening find banner in editor causes UI to hang
2233         https://bugs.webkit.org/show_bug.cgi?id=165967
2234
2235         Reviewed by Timothy Hatcher.
2236
2237         * UserInterface/Views/ContentBrowser.js:
2238         (WebInspector.ContentBrowser.prototype._findBannerDidShow):
2239         Showing the find banner should cause search results to be refreshed only
2240         if it contains query text.
2241
2242 2016-12-16  Matt Baker  <mattbaker@apple.com>
2243
2244         Web Inspector: Modernize find banner UI
2245         https://bugs.webkit.org/show_bug.cgi?id=165939
2246
2247         Reviewed by Timothy Hatcher.
2248
2249         The find banner should have a modern appearance, matching Xcode.
2250
2251         * UserInterface/Views/FindBanner.css:
2252         (.find-banner > input[type="search"]):
2253         (.find-banner > button):
2254         Use standard border colors.
2255         (.find-banner > button:disabled > .glyph):
2256         Disabled previous / next glyphs should be lighter.
2257         (.find-banner > button:active:not(:disabled)):
2258         Update depressed button style: flat colors, no text color change.
2259         (.find-banner > button.segmented):
2260         (.find-banner > button.segmented.left):
2261         (.find-banner > button:not(:active).segmented.right:before):
2262         (.find-banner > button.segmented.left:active + button.segmented.right,):
2263         (.find-banner > button.segmented.left:active + button.segmented.right:before):
2264         (.find-banner > button.segmented.right):
2265         (.find-banner.console-find-banner > input[type="search"]):
2266         (.find-banner.console-find-banner > :matches(input[type="search"], button)):
2267         (.find-banner > button:disabled): Deleted.
2268         (.find-banner > button.segmented:active): Deleted.
2269         Overlapping button borders are no longer an issue.
2270
2271         * UserInterface/Views/FindBanner.js:
2272         (WebInspector.FindBanner):
2273         Insert previous / next buttons after the input field in the DOM.
2274         (WebInspector.FindBanner.prototype.get delegate):
2275         (WebInspector.FindBanner.prototype.set delegate):
2276         (WebInspector.FindBanner.prototype.get inputField):
2277         (WebInspector.FindBanner.prototype.get searchQuery):
2278         (WebInspector.FindBanner.prototype.set searchQuery):
2279         (WebInspector.FindBanner.prototype.get numberOfResults):
2280         Inline simple getters and setters.
2281
2282         * UserInterface/Views/Variables.css:
2283         (:root):
2284         Add button colors.
2285
2286 2016-12-15  Matt Baker  <mattbaker@apple.com>
2287
2288         Web Inspector: console search bar jumps, behaves poorly at narrow widths
2289         https://bugs.webkit.org/show_bug.cgi?id=164047
2290         <rdar://problem/29055582>
2291
2292         Reviewed by Timothy Hatcher.
2293
2294         At narrow widths the find banner behaves poorly in the split console
2295         toolbar. It should work like the main content browser, appearing below
2296         the toolbar when Command-F is pressed and either the split console or
2297         quick console prompt has the focus.
2298
2299         * UserInterface/Base/Main.js:
2300         (WebInspector.contentLoaded):
2301         Enable split content browser find banner.
2302
2303         * UserInterface/Views/ContentBrowser.js:
2304         (WebInspector.ContentBrowser.prototype.showFindBanner):
2305         Check for custom find banner support at runtime.
2306         (WebInspector.ContentBrowser.prototype._findBannerDidShow):
2307         (WebInspector.ContentBrowser.prototype._findBannerDidHide):
2308         Refresh search results when banner is shown/hidden, instead of relying
2309         on toggling the "showing-find-banner" class name for everything.
2310
2311         (WebInspector.ContentBrowser.prototype.handleFindEvent): Deleted.
2312         Renamed `showFindBanner`.
2313
2314         * UserInterface/Views/ContentView.js:
2315         (WebInspector.ContentView.prototype.get supportsCustomFindBanner):
2316         (WebInspector.ContentView.prototype.showCustomFindBanner):
2317         Custom find banner support (used by LogContentView).
2318
2319         * UserInterface/Views/LogContentView.js:
2320         (WebInspector.LogContentView):
2321         (WebInspector.LogContentView.prototype.get supportsSearch):
2322         (WebInspector.LogContentView.prototype.get numberOfSearchResults):
2323         (WebInspector.LogContentView.prototype.get hasPerformedSearch):
2324         Cleanup.
2325         (WebInspector.LogContentView.prototype.get supportsCustomFindBanner):
2326         Use toolbar item find banner when showing Console tab.
2327         (WebInspector.LogContentView.prototype.findBannerRevealPreviousResult):
2328         (WebInspector.LogContentView.prototype.findBannerRevealNextResult):
2329         (WebInspector.LogContentView.prototype._isMessageVisible):
2330         (WebInspector.LogContentView.prototype._visibleMessageElements):
2331         (WebInspector.LogContentView.prototype._logCleared):
2332         (WebInspector.LogContentView.prototype._filterMessageElements):
2333         (WebInspector.LogContentView.prototype.findBannerPerformSearch):
2334         (WebInspector.LogContentView.prototype.findBannerSearchCleared):
2335         (WebInspector.LogContentView.prototype.performSearch):
2336         Support both the standard and custom (toolbar item) find banners.
2337         (WebInspector.LogContentView.prototype.searchCleared):
2338         Refresh search results.
2339         (WebInspector.LogContentView.prototype._highlightRanges):
2340         Correct spelling: _selectedSearchMathIsValid -> _selectedSearchMatchIsValid.
2341         (WebInspector.LogContentView.prototype.get searchInProgress): Deleted.
2342         Override ContentView.prototype.hasPerformedSearch instead.
2343         (WebInspector.LogContentView.prototype.handleFindEvent): Deleted.
2344         Replaced by `showCustomFindBanner`.
2345         (WebInspector.LogContentView.prototype.highlightPreviousSearchMatch): Deleted.
2346         Absorbed by findBannerRevealPreviousResult.
2347         (WebInspector.LogContentView.prototype.highlightNextSearchMatch): Deleted.
2348         Absorbed by findBannerRevealNextResult.
2349         (WebInspector.LogContentView.prototype._performSearch): Deleted.
2350         Override ContentView.prototype.performSearch instead.
2351
2352         * UserInterface/Views/Main.css:
2353         (#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)):
2354         Hide the toolbar banner and divider.
2355
2356 2016-12-14  Ryosuke Niwa  <rniwa@webkit.org>
2357
2358         Web Inspector: Jumping to the definition of a custom elements is broken
2359         https://bugs.webkit.org/show_bug.cgi?id=165890
2360
2361         Reviewed by Joseph Pecoraro.
2362
2363         Fix the regression from https://trac.webkit.org/changeset/208304.
2364
2365         * UserInterface/Views/DOMTreeElement.js:
2366         (WebInspector.DOMTreeElement.prototype._showCustomElementDefinition): Use the main target
2367         since a custom element definition can never come from a worker.
2368
2369 2016-12-14  Matt Baker  <mattbaker@apple.com>
2370
2371         Web Inspector: Zooming in on the Timeline should always zoom right where the cursor is
2372         https://bugs.webkit.org/show_bug.cgi?id=151118
2373         <rdar://problem/23487912>
2374
2375         Reviewed by Timothy Hatcher.
2376
2377         Use correct left edge for timeline overview graph elements.
2378
2379         * UserInterface/Views/TimelineOverview.js:
2380         (WebInspector.TimelineOverview.prototype._handleWheelEvent):
2381         (WebInspector.TimelineOverview._handleGestureStart):
2382         (WebInspector.TimelineOverview.prototype._handleGestureChange):
2383
2384 2016-12-12  Nikita Vasilyev  <nvasilyev@apple.com>
2385
2386         [GTK] Web Inspector: Add NavigationItemCodeCoverage.svg icon
2387         https://bugs.webkit.org/show_bug.cgi?id=165698
2388
2389         Reviewed by Joseph Pecoraro.
2390
2391         * UserInterface/Images/gtk/NavigationItemCodeCoverage.svg: Added.
2392         Match in style the existing NavigationItemTypes.svg icon.
2393
2394 2016-12-12  Matt Baker  <mattbaker@apple.com>
2395
2396         Web Inspector: Cleanup HierarchicalPathComponent
2397         https://bugs.webkit.org/show_bug.cgi?id=165745
2398
2399         Reviewed by Brian Burg.
2400
2401         Prefer toggle for style class names, remove single use CSS class name
2402         constants, and back all properties by the model not the DOM.
2403
2404         * UserInterface/Views/HierarchicalPathComponent.js:
2405         (WebInspector.HierarchicalPathComponent):
2406         (WebInspector.HierarchicalPathComponent.prototype.get element):
2407         (WebInspector.HierarchicalPathComponent.prototype.get representedObject):
2408         (WebInspector.HierarchicalPathComponent.prototype.get minimumWidth):
2409         (WebInspector.HierarchicalPathComponent.prototype.get forcedWidth):
2410         (WebInspector.HierarchicalPathComponent.prototype.set forcedWidth):
2411         (WebInspector.HierarchicalPathComponent.prototype.get hidden):
2412         (WebInspector.HierarchicalPathComponent.prototype.set hidden):
2413         (WebInspector.HierarchicalPathComponent.prototype.get collapsed):
2414         (WebInspector.HierarchicalPathComponent.prototype.set collapsed):
2415         (WebInspector.HierarchicalPathComponent.prototype.get selectorArrows):
2416         (WebInspector.HierarchicalPathComponent.prototype.set selectorArrows):
2417         (WebInspector.HierarchicalPathComponent.prototype.get previousSibling):
2418         (WebInspector.HierarchicalPathComponent.prototype.set previousSibling):
2419         (WebInspector.HierarchicalPathComponent.prototype.get nextSibling):
2420         (WebInspector.HierarchicalPathComponent.prototype.set nextSibling):
2421         (WebInspector.HierarchicalPathComponent.prototype._updateElementTitleAndText):
2422         (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement.createOption):
2423         (WebInspector.HierarchicalPathComponent.prototype._updateSelectElement):
2424
2425 2016-12-12  Matt Baker  <mattbaker@apple.com>
2426
2427         Web Inspector: Allow keyboard navigation in Heap Snapshot data grids
2428         https://bugs.webkit.org/show_bug.cgi?id=165752
2429
2430         Reviewed by Brian Burg.
2431
2432         * UserInterface/Views/DOMTreeOutline.css:
2433         (.tree-outline.dom:focus li.selected > span::after):
2434         Use new color variable.
2435
2436         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2437         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get selectable): Deleted.
2438         Should be selectable.
2439
2440         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2441         (.heap-snapshot > .data-grid:focus tr.selected > td .sub-retained):
2442         (.heap-snapshot > .data-grid:focus tr.selected .object-id,):
2443         (.heap-snapshot > .data-grid:focus tr.selected .formatted-string,):
2444         (.heap-snapshot > .data-grid:focus tr.selected td .location):
2445         Selected row text should just be white, except for values that are usually
2446         gray (object ID, object size, and sub-retained size values). These should
2447         be styled like the "= $0" marker in the DOM tree outline.
2448
2449         (.heap-snapshot > .data-grid:matches(:focus, .force-focus) tr.selected td .location): Deleted.
2450         Removed forced-focus reference. Only used by TreeOutlineDataGridSynchronizer.
2451
2452         * UserInterface/Views/Variables.css:
2453         (:root):
2454         Added --selected-secondary-text-color.
2455
2456 2016-12-12  Matt Baker  <mattbaker@apple.com>
2457
2458         Web Inspector: Breakpoint Log action should support template literals
2459         https://bugs.webkit.org/show_bug.cgi?id=165116
2460         <rdar://problem/29464765>
2461
2462         Reviewed by Joseph Pecoraro.
2463
2464         * Localizations/en.lproj/localizedStrings.js:
2465         New string "${expr} = expression" for breakpoint popover.
2466
2467         * UserInterface/Controllers/BreakpointLogMessageLexer.js: Added.
2468         To support template literal placeholders in message text, it is necessary
2469         to distinguish plain text parts of the message from placeholders, since
2470         plain text must be escaped.
2471
2472         (WebInspector.BreakpointLogMessageLexer):
2473         (WebInspector.BreakpointLogMessageLexer.prototype.tokenize):
2474         (WebInspector.BreakpointLogMessageLexer.prototype.reset):
2475         (WebInspector.BreakpointLogMessageLexer.prototype._finishPlainText):
2476         (WebInspector.BreakpointLogMessageLexer.prototype._finishExpression):
2477         (WebInspector.BreakpointLogMessageLexer.prototype._appendToken):
2478         (WebInspector.BreakpointLogMessageLexer.prototype._consume):
2479         (WebInspector.BreakpointLogMessageLexer.prototype._peek):
2480         (WebInspector.BreakpointLogMessageLexer.prototype._expression):
2481         (WebInspector.BreakpointLogMessageLexer.prototype._plainText):
2482         (WebInspector.BreakpointLogMessageLexer.prototype._possiblePlaceholder):
2483         (WebInspector.BreakpointLogMessageLexer.prototype._regExpOrStringLiteral):
2484
2485         * UserInterface/Controllers/DebuggerManager.js:
2486         (WebInspector.DebuggerManager.prototype._debuggerBreakpointOptions):
2487         Build breakpoint "options" object for DebuggerAgent. If a Log action
2488         contains template literal placeholders it is changed to an Evaluate
2489         action, which calls console.log with a template literal.
2490
2491         (WebInspector.DebuggerManager.prototype._setBreakpoint):
2492         Use converted breakpoint options.
2493
2494         * UserInterface/Main.html:
2495         * UserInterface/Test.html:
2496         New file.
2497
2498         * UserInterface/Views/BreakpointActionView.css:
2499         (.breakpoint-action-block-body > .description):
2500         Styles for breakpoint Log action hint text.
2501
2502         * UserInterface/Views/BreakpointActionView.js:
2503         (WebInspector.BreakpointActionView.prototype._updateBody):
2504         Add Log action hint text element.
2505
2506 2016-12-11  Matt Baker  <mattbaker@apple.com>
2507
2508         Web Inspector: ThreadTreeElement should have a "Resume" status button when paused
2509         https://bugs.webkit.org/show_bug.cgi?id=165581
2510
2511         Reviewed by Joseph Pecoraro.
2512
2513         * UserInterface/Images/Resume.svg:
2514         Fill/stroke should be unspecified so that both can be styled in CSS.
2515
2516         * UserInterface/Views/DebuggerDashboardView.css:
2517         (.dashboard.debugger .navigation-bar .item.debugger-dashboard-pause.activated):
2518         * UserInterface/Views/DebuggerSidebarPanel.css:
2519         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume):
2520         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-pause-resume.activated):
2521         Recreate original style which relied on 'fill="none"' being specified in the SVG.
2522
2523         * UserInterface/Views/ThreadTreeElement.css:
2524         (.tree-outline > .item.thread .icon):
2525         (.tree-outline > .item.thread .status-button.resume):
2526         (.tree-outline > .item.thread .status-button.resume:active):
2527         (.tree-outline:matches(:focus, .force-focus) > .item.thread.selected .status-button.resume):
2528         (.tree-outline > .item.thread.selected .status-button.resume,):
2529         (.details-section.call-stack .thread .icon): Deleted.
2530         Status button styles. Colors match those of the goto-arrow button.
2531
2532         * UserInterface/Views/ThreadTreeElement.js:
2533         (WebInspector.ThreadTreeElement.prototype.refresh):
2534         Update status icon.
2535         (WebInspector.ThreadTreeElement.prototype.oncontextmenu):
2536         (WebInspector.ThreadTreeElement.prototype._updateStatus):
2537         Add/remove status button based on paused state.
2538         Stop propagation of "mousedown" events on the status button, to
2539         prevent button press from selecting the tree element.
2540         (WebInspector.ThreadTreeElement):
2541
2542 2016-12-11  Joseph Pecoraro  <pecoraro@apple.com>
2543
2544         Web Inspector: Move MainTarget and WorkerTarget to their own files
2545         https://bugs.webkit.org/show_bug.cgi?id=165701
2546
2547         Reviewed by Brian Burg.
2548
2549         * UserInterface/Controllers/DebuggerManager.js:
2550         (WebInspector.DebuggerManager.prototype.scriptDidParse):
2551         * UserInterface/Main.html:
2552         * UserInterface/Protocol/MainTarget.js: Added.
2553         (WebInspector.MainTarget):
2554         (WebInspector.MainTarget.prototype.get displayName):
2555         (WebInspector.MainTarget.prototype.get mainResource):
2556         * UserInterface/Protocol/Target.js:
2557         (WebInspector.Target):
2558         (WebInspector.MainTarget): Deleted.
2559         (WebInspector.MainTarget.prototype.get displayName): Deleted.
2560         (WebInspector.MainTarget.prototype.get mainResource): Deleted.
2561         (WebInspector.MainTarget.prototype.initialize): Deleted.
2562         (WebInspector.WorkerTarget): Deleted.
2563         (WebInspector.WorkerTarget.prototype.get displayName): Deleted.
2564         (WebInspector.WorkerTarget.prototype.initialize): Deleted.
2565         * UserInterface/Protocol/WorkerTarget.js: Added.
2566         (WebInspector.WorkerTarget):
2567         (WebInspector.WorkerTarget.prototype.get displayName):
2568         * UserInterface/Test.html:
2569
2570 2016-12-09  Joseph Pecoraro  <pecoraro@apple.com>
2571
2572         Web Inspector: Frontend should not be resetting TypeProfiler state when switching between ContentViews
2573         https://bugs.webkit.org/show_bug.cgi?id=165648
2574
2575         Reviewed by Brian Burg.
2576
2577         * UserInterface/Base/Main.js:
2578         (WebInspector.loaded):
2579         Update all backends when the state changes.
2580
2581         * UserInterface/Views/SourceCodeTextEditor.js:
2582         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
2583         (WebInspector.SourceCodeTextEditor.prototype.set _basicBlockAnnotatorEnabled):
2584         Moved this code to when the global Setting (which affects all editors) changes.
2585
2586 2016-12-09  Joseph Pecoraro  <pecoraro@apple.com>
2587
2588         Web Inspector: Some resources fetched via Fetch API do not have data
2589         https://bugs.webkit.org/show_bug.cgi?id=165230
2590         <rdar://problem/29449220>
2591
2592         Reviewed by Alex Christensen.
2593
2594         * Localizations/en.lproj/localizedStrings.js:
2595         New "Fetch" and "Fetches" localized strings.
2596
2597         * UserInterface/Models/Resource.js:
2598         (WebInspector.Resource.displayNameForType):
2599         * UserInterface/Models/ResourceCollection.js:
2600         (WebInspector.ResourceCollection.verifierForType):
2601         * UserInterface/Views/CollectionContentView.js:
2602         (WebInspector.CollectionContentView):
2603         * UserInterface/Views/ResourceClusterContentView.js:
2604         (WebInspector.ResourceClusterContentView.prototype.get responseContentView):
2605         * UserInterface/Views/ResourceTreeElement.js:
2606         (WebInspector.ResourceTreeElement.compareResourceTreeElements):
2607         New ResourceType.Fetch. Behave like XHR in most places.
2608
2609 2016-12-08  Joseph Pecoraro  <pecoraro@apple.com>
2610
2611         Web Inspector: Unable to delete breakpoint from worker script
2612         https://bugs.webkit.org/show_bug.cgi?id=165578
2613
2614         Reviewed by Matt Baker.
2615
2616         * UserInterface/Controllers/DebuggerManager.js:
2617         (WebInspector.DebuggerManager.prototype._removeBreakpoint):
2618         Match setting breakpoints. If this is a "URL breakpoint", affect
2619         all targets. If this is a "Script breakpoint", affect just the
2620         single target containing that Script.
2621
2622 2016-12-07  Devin Rousso  <dcrousso+webkit@gmail.com>
2623
2624         REGRESSION(r203912): Web Inspector: Navigation sidebar widths are not saved
2625         https://bugs.webkit.org/show_bug.cgi?id=165496
2626
2627         Reviewed by Matt Baker.
2628
2629         * UserInterface/Views/TabBrowser.js:
2630         (WebInspector.TabBrowser):
2631         (WebInspector.TabBrowser.prototype._sidebarWidthDidChange):
2632         (WebInspector.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
2633         (WebInspector.TabBrowser.prototype._sidebarWidthDidChange): Renamed from _detailsSidebarWidthDidChange.
2634         Add event listener for when the navigation sidebar's width is changed.
2635
2636         * UserInterface/Views/TabContentView.js:
2637         (WebInspector.TabContentView):
2638         (WebInspector.TabContentView.prototype.get navigationSidebarPanel):
2639         (WebInspector.TabContentView.prototype.get navigationSidebarCollapsedSetting):
2640         (WebInspector.TabContentView.prototype.get navigationSidebarWidthSetting):
2641         (WebInspector.TabContentView.prototype.get detailsSidebarPanels):
2642         (WebInspector.TabContentView.prototype.get detailsSidebarCollapsedSetting):
2643         (WebInspector.TabContentView.prototype.get detailsSidebarSelectedPanelSetting):
2644         (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
2645         Add WebInspector.Setting object for the navigation sidebar's width.
2646
2647 2016-12-07  Nikita Vasilyev  <nvasilyev@apple.com>
2648
2649         Web Inspector: Control Flow Profiler's event handlers aren't getting removed when ContentView closes
2650         https://bugs.webkit.org/show_bug.cgi?id=165556
2651
2652         Reviewed by Joseph Pecoraro.
2653
2654         * UserInterface/Views/ScriptContentView.js:
2655         (WebInspector.ScriptContentView.prototype.closed):
2656         * UserInterface/Views/TextResourceContentView.js:
2657         (WebInspector.TextResourceContentView.prototype.closed):
2658
2659 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
2660
2661         Web Inspector: Add ability to distinguish if a Script was parsed as a module
2662         https://bugs.webkit.org/show_bug.cgi?id=164900
2663         <rdar://problem/29323817>
2664
2665         Reviewed by Timothy Hatcher.
2666
2667         * UserInterface/Models/Script.js:
2668         (WebInspector.Script.prototype.get sourceType):
2669         New property of Scripts. SourceType is either Program or Module.
2670
2671         * UserInterface/Controllers/DebuggerManager.js:
2672         (WebInspector.DebuggerManager.prototype.scriptDidParse):
2673         * UserInterface/Protocol/DebuggerObserver.js:
2674         (WebInspector.DebuggerObserver.prototype.scriptParsed):
2675         Convert incoming module boolean into SourceType when creating new Scripts.
2676
2677         * UserInterface/Models/ScriptSyntaxTree.js:
2678         (WebInspector.ScriptSyntaxTree):
2679         (WebInspector.ScriptSyntaxTree.prototype._recurse):
2680         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
2681         Update the generic AST for new module specific Esprima types.
2682
2683         * UserInterface/Views/SourceCodeTextEditor.js:
2684         (WebInspector.SourceCodeTextEditor.prototype.textEditorScriptSourceType):
2685         * UserInterface/Views/TextEditor.js:
2686         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
2687         For pretty printing correctly state if this is a module or not for Esprima.
2688
2689 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
2690
2691         Web Inspector: Update Esprima to support new features / syntax (**, async/await, trailing comma)
2692         https://bugs.webkit.org/show_bug.cgi?id=164830
2693         <rdar://problem/29293814>
2694
2695         Reviewed by Timothy Hatcher.
2696
2697         * UserInterface/External/Esprima/LICENSE:
2698         * UserInterface/External/Esprima/esprima.js:
2699         Updated to Esprima@7219731 (4.0.0-dev).
2700
2701         * UserInterface/Models/ScriptSyntaxTree.js:
2702         (WebInspector.ScriptSyntaxTree.prototype._recurse):
2703         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
2704         * UserInterface/Workers/Formatter/ESTreeWalker.js:
2705         (ESTreeWalker.prototype._walkChildren):
2706         Add new nodes (AwaitExpression).
2707         Add new states (async boolean property on Functions).
2708         Remove stale properties (defaults is no longer needed, as parameters
2709         with default values are now AssignmentPatterns).
2710         Update MetaProperty where meta/property are now Identifiers not strings.
2711
2712         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
2713         (EsprimaFormatter.prototype._handleTokenAtNode):
2714         Handle pretty printing of new nodes and identifiers.
2715
2716         * Controllers/FrameResourceManager.js
2717         Address a console.assert warning for stripping assertions in Production.
2718
2719 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
2720
2721         Web Inspector: Remove unused and mostly untested Page domain commands and events
2722         https://bugs.webkit.org/show_bug.cgi?id=165507
2723
2724         Reviewed by Brian Burg.
2725
2726         * UserInterface/Protocol/PageObserver.js:
2727         (WebInspector.PageObserver.prototype.javascriptDialogOpening):
2728         (WebInspector.PageObserver.prototype.javascriptDialogClosed):
2729         (WebInspector.PageObserver.prototype.scriptsEnabled):
2730         Keep stub in case legacy backends dispatch the event to the frontend.
2731
2732         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
2733         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
2734         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
2735         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
2736         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
2737         * Versions/Inspector-iOS-10.0.json:
2738         * Versions/Inspector-iOS-7.0.json:
2739         * Versions/Inspector-iOS-8.0.json:
2740         * Versions/Inspector-iOS-9.0.json:
2741         * Versions/Inspector-iOS-9.3.json:
2742         Remove handleJavaScriptDialog command from legacy backends because it
2743         doesn't appear as if the iOS backend handled it at all.
2744
2745 2016-12-06  Alexey Proskuryakov  <ap@apple.com>
2746
2747         Correct SDKROOT values in xcconfig files
2748         https://bugs.webkit.org/show_bug.cgi?id=165487
2749         rdar://problem/29539209
2750
2751         Reviewed by Dan Bernstein.
2752
2753         Fix suggested by Dan Bernstein.
2754
2755         * Configurations/DebugRelease.xcconfig:
2756
2757 2016-12-05  Matt Baker  <mattbaker@apple.com>
2758
2759         Web Inspector: Object.shallowEqual([{}], [{}]) should return true
2760         https://bugs.webkit.org/show_bug.cgi?id=165397
2761
2762         Reviewed by Brian Burg.
2763
2764         * UserInterface/Base/Utilities.js:
2765         (value):
2766         Array.shallowEqual should compare array items using strict equivalence,
2767         and on failure defer to Object.shallowEqual.
2768
2769 2016-12-05  Joseph Pecoraro  <pecoraro@apple.com>
2770
2771         Web Inspector: Remove legacy styles
2772         https://bugs.webkit.org/show_bug.cgi?id=165389
2773
2774         Reviewed by Matt Baker.
2775
2776         Remove styles for platforms we don't build on anymore (Mavericks
2777         and Mountain Lion). There are also no "unknown-mac" styles to
2778         upgrade to a named platform.
2779
2780         * UserInterface/Base/Platform.js:
2781         Add sierra and remove older unsupported platforms.
2782
2783         * UserInterface/Views/Main.css:
2784         (body):
2785         (body:not(.mavericks)): Deleted.
2786         * UserInterface/Views/TabBar.css:
2787         (body.mavericks .tab-bar > .item:not(.disabled).selected): Deleted.
2788         * UserInterface/Views/Toolbar.css:
2789         (body .toolbar):
2790         (body.window-inactive .toolbar):
2791         (body.mac-platform:not(.docked) .toolbar):
2792         (body.mac-platform:not(.docked)):
2793         (body:not(.mavericks) .toolbar,): Deleted.
2794         (body.window-inactive:not(.mavericks) .toolbar): Deleted.
2795         (body.mac-platform:not(.docked, .mavericks) .toolbar): Deleted.
2796         (body.mac-platform:not(.docked, .mavericks)): Deleted.
2797         Remove mavericks specific styles.
2798
2799 2016-12-02  Andy Estes  <aestes@apple.com>
2800
2801         [Cocoa] Adopt the PRODUCT_BUNDLE_IDENTIFIER build setting
2802         https://bugs.webkit.org/show_bug.cgi?id=164492
2803
2804         Reviewed by Dan Bernstein.
2805
2806         * Configurations/WebInspectorUIFramework.xcconfig: Set PRODUCT_BUNDLE_IDENTIFIER to
2807         com.apple.$(PRODUCT_NAME:rfc1034identifier).
2808         * Info.plist: Changed CFBundleIdentifier's value from
2809         com.apple.${PRODUCT_NAME:rfc1034identifier} to ${PRODUCT_BUNDLE_IDENTIFIER}.
2810
2811 2016-12-02  Nikita Vasilyev  <nvasilyev@apple.com>
2812
2813         REGRESSION (r192344): Web Inspector: Turning off Code Coverage or Type Profiler logs an error
2814         https://bugs.webkit.org/show_bug.cgi?id=164804
2815         <rdar://problem/29278028>
2816
2817         Reviewed by Matt Baker.
2818
2819         BasicBlockAnnotator and TypeTokenAnnotator were instanciated for a resource in an inactive Debugger tab.
2820
2821         * UserInterface/Views/NavigationSidebarPanel.js:
2822         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
2823         Don't show any content view if we are not in a selected tab.
2824
2825 2016-12-01  Matt Baker  <mattbaker@apple.com>
2826
2827         Web Inspector: Show async stack traces for workers
2828         https://bugs.webkit.org/show_bug.cgi?id=165235
2829         <rdar://problem/29450172>
2830
2831         Reviewed by Joseph Pecoraro.
2832
2833         * UserInterface/Views/CallFrameTreeElement.css:
2834         (.tree-outline > .children > .item.call-frame.async-boundary):
2835         (.tree-outline:not(.single-thread) > .children > .item.call-frame.async-boundary):
2836         (.tree-outline .item.call-frame.async-boundary::before):
2837         (.tree-outline.single-thread .item.call-frame.async-boundary::before):
2838         (.tree-outline .item.call-frame.async-boundary): Deleted.
2839         Style changes for single/multiple-thread call stacks.
2840         Padding changes to account for Thread tree element.
2841         Make selectors more specific where needed.
2842
2843         * UserInterface/Views/DebuggerSidebarPanel.css:
2844         (.sidebar > .panel.navigation.debugger .tree-outline.single-thread > .item.thread):
2845         (.sidebar > .panel.navigation.debugger .tree-outline.single-thread):
2846         Style changes for single/multiple-thread call stacks.
2847
2848         * UserInterface/Views/DebuggerSidebarPanel.js:
2849         (WebInspector.DebuggerSidebarPanel):
2850         Use a single tree outline for showing a single thread or multiple threads.
2851         For single-threaded, hide Thread tree element and un-indent children.
2852
2853         (WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
2854         (WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
2855         (WebInspector.DebuggerSidebarPanel.prototype._updateCallStackTreeOutline):
2856         Update tree style and whether Thread tree element is selectable.
2857         (WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
2858         Remove support for second tree outline.
2859
2860         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks): Deleted.
2861         (WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement): Deleted.
2862         (WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks): Deleted.
2863         (WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks): Deleted.
2864         No longer needed after unifying tree outlines.
2865
2866         * UserInterface/Views/ThreadTreeElement.js:
2867         (WebInspector.ThreadTreeElement.prototype.refresh):
2868         Append call frames from the async stack trace.
2869
2870 2016-11-30  Joseph Pecoraro  <pecoraro@apple.com>
2871
2872         Web Inspector: Clicking on link in Web Inspector can cause UIProcess to crash
2873         https://bugs.webkit.org/show_bug.cgi?id=165157
2874         <rdar://problem/27896562>
2875
2876         Reviewed by Brian Burg.
2877
2878         By correctly disallowing slashes in the scheme Web Inspector resolves
2879         the correct absolute URL and doesn't end up trying to navigate to an
2880         incorrect file URL.
2881
2882         * UserInterface/Base/URLUtilities.js:
2883         (parseURL):
2884         Disallow "/" characters in the scheme portion. (/http://example.com)
2885         Allow path to be optional before a fragment portion. (http://example.com#frag)
2886
2887 2016-11-29  Joseph Pecoraro  <pecoraro@apple.com>
2888
2889         Web Inspector: Improve name sorting in HeapSnapshot data grids
2890         https://bugs.webkit.org/show_bug.cgi?id=165170
2891         <rdar://problem/28784421>
2892
2893         Reviewed by Matt Baker.
2894
2895         When sorting the Name column, group named properties and unnamed
2896         properties and sort them each individually:
2897
2898           - Sort named properties by their property name (property names will be unique if they exist)
2899           - Sort unnamed properties by their class name (guaranteed)
2900           - Sort any tied class names by their object id
2901
2902         This makes using the Object Graph with Name sort easier to follow.
2903         In the ascending sort you see all the named properties first,
2904         followed by the unnamed (internal) properties.
2905
2906         * UserInterface/Views/HeapSnapshotContentView.js:
2907         (WebInspector.HeapSnapshotObjectGraphContentView):
2908         Since this data grid column now sorts on more than just the "Class Name"
2909         rename it to "Name".
2910
2911         * UserInterface/Views/HeapSnapshotDataGridTree.js:
2912         (WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
2913         Make the sort of the `className` column more general to handle sorting
2914         by property names, class names, and object identifiers.
2915
2916         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2917         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get propertyName):
2918         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2919         Provide a lazy `propertyName` accessor where we compute it once and stash
2920         it on the DataGridNode to avoid extra work when resorting.
2921
2922         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate.propertyName):
2923         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
2924         In the initial populated sort, provide the necessary property name property
2925         the sort comparator expects.
2926
2927 2016-11-29  Matt Baker  <mattbaker@apple.com>
2928
2929         Web Inspector: Breakpoints button enabled state is too subtle
2930         https://bugs.webkit.org/show_bug.cgi?id=165153
2931
2932         Reviewed by Joseph Pecoraro.
2933
2934         * UserInterface/Images/Breakpoints.svg:
2935         Change to path so stroke and fill can be styled.
2936
2937         * UserInterface/Views/DebuggerSidebarPanel.css:
2938         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints):
2939         (.sidebar > .panel.navigation.debugger > .navigation-bar .debugger-breakpoints.activated):
2940         Fill and stroke styles for the active and inactive breakpoint button.
2941
2942 2016-11-28  Matt Baker  <mattbaker@apple.com>
2943
2944         Web Inspector: Debugger should have an option for showing asynchronous call stacks
2945         https://bugs.webkit.org/show_bug.cgi?id=163230
2946         <rdar://problem/28698683>
2947
2948         Reviewed by Joseph Pecoraro.
2949
2950         * Localizations/en.lproj/localizedStrings.js:
2951         New string for generic async call stack boundary label: "(async)".
2952
2953         * UserInterface/Controllers/DebuggerManager.js:
2954         Create async stack depth setting and set default depth.
2955         (WebInspector.DebuggerManager.prototype.get asyncStackTraceDepth):
2956         (WebInspector.DebuggerManager.prototype.set asyncStackTraceDepth):
2957         Make async stack depth setting accessible to the frontend.
2958         (WebInspector.DebuggerManager.prototype.initializeTarget):
2959         Set async stack depth value on the target.
2960         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
2961         Plumbing for the async stack trace payload.
2962
2963         * UserInterface/Models/ConsoleMessage.js:
2964         (WebInspector.ConsoleMessage):
2965         Updated for new StackTrace.fromPayload use.
2966
2967         * UserInterface/Models/DebuggerData.js:
2968         (WebInspector.DebuggerData):
2969         (WebInspector.DebuggerData.prototype.get asyncStackTrace):
2970         (WebInspector.DebuggerData.prototype.updateForPause):
2971         (WebInspector.DebuggerData.prototype.updateForResume):
2972         More plumbing.
2973
2974         * UserInterface/Models/StackTrace.js:
2975         Update frontend model for use as new protocol object Console.StackTrace,
2976         which was previously an alias for a simple array of Console.CallFrames.
2977
2978         (WebInspector.StackTrace):
2979         (WebInspector.StackTrace.fromPayload):
2980         (WebInspector.StackTrace.fromString):
2981         (WebInspector.StackTrace.prototype.get topCallFrameIsBoundary):
2982         (WebInspector.StackTrace.prototype.get parentStackTrace):
2983
2984         * UserInterface/Protocol/DebuggerObserver.js:
2985         (WebInspector.DebuggerObserver.prototype.paused):
2986         More plumbing.
2987
2988         * UserInterface/Views/CallFrameTreeElement.css:
2989         (.tree-outline .item.call-frame.async-boundary):
2990         Use default cursor since boundary element is not selectable.
2991         (.tree-outline .item.call-frame.async-boundary .icon):
2992         (.tree-outline .item.call-frame.async-boundary::before,):
2993         (.tree-outline .item.call-frame.async-boundary::after):
2994         (.tree-outline .item.call-frame.async-boundary::before):
2995         Dimmed text and divider line styles for boundary element.
2996
2997         * UserInterface/Views/CallFrameTreeElement.js:
2998         (WebInspector.CallFrameTreeElement):
2999         Add a flag denoting whether the call frame is an async call trace
3000         boundary, and set styles accordingly.
3001
3002         * UserInterface/Views/DebuggerSidebarPanel.js:
3003         Set async stack trace depth, if supported.
3004         (WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
3005         Add call frames for async stack traces to the call stack TreeOutline.
3006         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
3007         Ensure that async call frames cannot become the active call frame.
3008
3009         * UserInterface/Views/Variables.css:
3010         (:root):
3011         Add --text-color-gray-medium, for dimmed text in async boundary element.
3012
3013 2016-11-18  Matt Baker  <mattbaker@apple.com>
3014
3015         Web Inspector: TimelineDataGridNode assertions when refreshing page
3016         https://bugs.webkit.org/show_bug.cgi?id=162642
3017         <rdar://problem/28505898>
3018
3019         Reviewed by Timothy Hatcher.
3020
3021         This patch fixes a number of deficiencies in the Network tab that caused
3022         TimelineDataGridNode graphs to refresh before the tab became visible.
3023
3024         * UserInterface/Views/ElementsTabContentView.js:
3025         (WebInspector.ElementsTabContentView):
3026         (WebInspector.ElementsTabContentView.prototype.shown):
3027         Drive-by fix: defer showing the DOM content view until the tab is shown.
3028
3029         * UserInterface/Views/NetworkGridContentView.js:
3030         (WebInspector.NetworkGridContentView):
3031         Drive-by event listener cleanup.
3032         (WebInspector.NetworkGridContentView.prototype.get startTime):
3033         (WebInspector.NetworkGridContentView.prototype.get endTime):
3034         Back endTime with a variable, instead of using the ruler value which
3035         isn't valid before the tab is shown for the first time.
3036
3037         (WebInspector.NetworkGridContentView.prototype.shown):
3038         Force the grid to update its layout, and that of the Timeline column ruler.
3039         During layout the ruler's secondsPerPixel value is used, which isn't
3040         valid until the ruler does an initial layout.
3041
3042         (WebInspector.NetworkGridContentView.prototype.reset):
3043         Clear pending records. This was causing duplicates to appear when the
3044         inspected page was refreshed multiple times prior to showing the Network
3045         tab for the first time.
3046
3047         (WebInspector.NetworkGridContentView.prototype.layout):
3048         Should more closely match behavior in NetworkTimelineView.prototype.layout.
3049         Graph end time padding is added if no longer updating the current time.
3050
3051         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
3052         Track endTime of the last record added, so that the graph end time can
3053         be padded once the current time is no longer being updated.
3054
3055         (WebInspector.NetworkGridContentView.prototype._update):
3056         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
3057         Graph end time padding shouldn't be applied here, since this isn't called
3058         if the inspected page finishes loading before the view is shown.
3059
3060         (WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted.
3061         Replaced by an arrow function.
3062
3063         * UserInterface/Views/NetworkSidebarPanel.js:
3064         (WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
3065         Don't show the content view if the tab is hidden.
3066
3067 2016-11-17  Devin Rousso  <dcrousso+webkit@gmail.com>
3068
3069         Web Inspector: Shift clicking on named color value only shows its hex form
3070         https://bugs.webkit.org/show_bug.cgi?id=162758
3071
3072         Reviewed by Timothy Hatcher.
3073
3074         * UserInterface/Models/Color.js:
3075         (WebInspector.Color.prototype.nextFormat):
3076         Reworked the logic for the formatting order to be the following:
3077          - Long HEX and Long HEXAlpha
3078          - RGB and RGBA
3079          - HSL and HSLA
3080          - Keyword (if applicable)
3081          - Short HEX (if applicable)
3082          - Short HEXAlpha (if applicable)
3083         It will only show formats with alpha values if the color value has an alpha that is not 1.
3084         If the alpha is not 1, it will not show formats with non-alpha values.
3085
3086         The changes to this function have no effect on the context menu items of InlineSwatch
3087         elements.  The purpose of each of those items is to allow the user to change the format to
3088         a specified type, whereas WebInspector.Color.prototype.nextFormat is used to cycle through
3089         all of the relevant formats.
3090
3091         (WebInspector.Color.prototype._toRGBString):
3092         (WebInspector.Color.prototype._toRGBAString):
3093         (WebInspector.Color.prototype._toHSLString):
3094         (WebInspector.Color.prototype._toHSLAString):
3095         Unrelated fix of extra decimals when converting from HEX to RGB and HSL.
3096
3097         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3098         (WebInspector.CSSStyleDeclarationTextEditor._inlineSwatchValueChanged):
3099         Removed assertion for `_hasActiveInlineSwatchEditor` since the value may change from
3100         switching the format of a color swatch (Shift-Click).
3101
3102 2016-11-16  Joseph Pecoraro  <pecoraro@apple.com>
3103
3104         Web Inspector: Background tabs are often updating non-stop because they think they are visible
3105         https://bugs.webkit.org/show_bug.cgi?id=164841
3106         <rdar://problem/29298658>
3107
3108         Reviewed by Matt Baker.
3109
3110         * UserInterface/Views/NetworkGridContentView.js:
3111         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
3112         * UserInterface/Views/TimelineRecordingContentView.js:
3113         (WebInspector.TimelineRecordingContentView.prototype._update):
3114         Don't constantly update when this tab is not in the foreground.
3115
3116 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
3117
3118         Web Inspector: SourceCodeTextEditor should display execution lines for background threads
3119         https://bugs.webkit.org/show_bug.cgi?id=164679
3120         <rdar://problem/29233026>
3121
3122         Reviewed by Timothy Hatcher.
3123
3124         There may be multiple threads paused in the same content view. With
3125         this change we should a thread indicator for each primary line a
3126         thread is paused on. It uses the same inline line indicator that
3127         inline errors/warnings (issues) use.
3128
3129         When there is a single thread (just the Page) we don't show thread
3130         indicators. But as soon as there are multiple threads we start
3131         managing and showing them. The line indicator contains the name of
3132         the thread on the side.
3133
3134         Note that SourceCodeTextEditor maintains the thread indicators, but
3135         it still always handles the ActiveCallFrame as it used to, pushing
3136         values down into TextEditor. The ActiveCallFrame styles override
3137         the thread line indicators (albeit with the same styles). The reason
3138         these are still separate is that TextEditor has some special styles
3139         regarding its gutter for the active execution line. Eventually we
3140         may want to find a way to push this up into SourceCodeTextEditor.
3141
3142         * Localizations/en.lproj/localizedStrings.js:
3143         New string "%d Threads" when multiple threads are on the same line.
3144
3145         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3146         (WebInspector.ScopeChainDetailsSidebarPanel):
3147         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._activeCallFrameDidChange):
3148         Update Watch Expressions when the active call frame changes.
3149
3150         * UserInterface/Views/SourceCodeTextEditor.css:
3151         (.source-code.text-editor > .CodeMirror .line-indicator-widget):
3152         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline):
3153         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .arrow):
3154         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .arrow):
3155         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .icon):
3156         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
3157         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .text):
3158         Share line indicator widget styles between issue widgets and thread widgets.
3159
3160         (.source-code.text-editor > .CodeMirror .thread-indicator):
3161         (.source-code.text-editor > .CodeMirror .thread-widget):
3162         (.source-code.text-editor > .CodeMirror .thread-widget.inline):
3163         (.source-code.text-editor > .CodeMirror .thread-widget.inline > .arrow):
3164         Colors for the thread-widget line-indicators.
3165
3166         * UserInterface/Views/SourceCodeTextEditor.js:
3167         (WebInspector.SourceCodeTextEditor):
3168         (WebInspector.SourceCodeTextEditor.prototype.close):
3169         New event listeners handling for Target added / removed events.
3170
3171         (WebInspector.SourceCodeTextEditor.prototype._targetAdded):
3172         (WebInspector.SourceCodeTextEditor.prototype._targetRemoved):
3173         Update thread indicators as needed.
3174
3175         (WebInspector.SourceCodeTextEditor.prototype._looselyMatchesSourceCodeLocation):
3176         More generic match based just on the URLs. Even if the exact script comes
3177         from a different target, if they share the same URL that is fine.
3178
3179         (WebInspector.SourceCodeTextEditor.prototype._callFramesDidChange):
3180         (WebInspector.SourceCodeTextEditor.prototype._addThreadIndicatorForTarget):
3181         (WebInspector.SourceCodeTextEditor.prototype._removeThreadIndicatorForTarget):
3182         (WebInspector.SourceCodeTextEditor.prototype._threadIndicatorWidgetForLine):
3183         (WebInspector.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
3184         (WebInspector.SourceCodeTextEditor.prototype._handleThreadIndicatorWidgetClick):
3185         Manage thread line indicator widgets. There are 3 maps we maintain.
3186
3187           1. line -> [threads]
3188               List of threads paused on a line, needed for the UI text.
3189           2. line -> widget
3190               Gets the widget on a line so we can modify and eventually remove it.
3191           3. target -> line
3192               If a target is removed, we need to know what line it had an indicator on.
3193
3194         (WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable):
3195         Generalize for all of our different line indicator widgets.
3196
3197         (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
3198         (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):        
3199         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators):
3200         When first populated, or reformatted, clear and reinsert all widgets.
3201
3202         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
3203         (WebInspector.SourceCodeTextEditor.prototype._logCleared):
3204         (WebInspector.SourceCodeTextEditor.prototype._clearIssueWidgets): Renamed.
3205         Rename _clearWidgets to _clearIssueWidgets.
3206
3207 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
3208
3209         Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
3210         https://bugs.webkit.org/show_bug.cgi?id=164793
3211
3212         Reviewed by Timothy Hatcher.
3213
3214         * Localizations/en.lproj/localizedStrings.js:
3215         Tooltips for new button.
3216
3217         * UserInterface/Base/Main.js:
3218         (WebInspector.loaded):
3219         New global setting.
3220
3221         * UserInterface/Views/DOMTreeContentView.js:
3222         (WebInspector.DOMTreeContentView):
3223         (WebInspector.DOMTreeContentView.prototype.get navigationItems):
3224         (WebInspector.DOMTreeContentView.prototype._showPrintStylesSettingChanged):
3225         (WebInspector.DOMTreeContentView.prototype._togglePrintStylesSetting):
3226         New navigation bar button to toggle print styles.
3227
3228         * UserInterface/Controllers/CSSStyleManager.js:
3229         (WebInspector.CSSStyleManager.prototype.mediaTypeChanged):
3230         After toggling styles we will need to refresh styles, so provide
3231         a meaningful way to trigger refreshing styles from the frontend.
3232
3233         * UserInterface/Images/Printer.svg: Added.
3234         * UserInterface/Images/gtk/Printer.svg: Added.
3235         New Printer icon for enabling / disabling print styles.
3236
3237         * UserInterface/Images/gtk/Crosshair.svg:
3238         * UserInterface/Images/gtk/LayerBorders.svg:
3239         * UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:
3240         * UserInterface/Images/gtk/NavigationItemTypes.svg:
3241         * UserInterface/Images/gtk/PaintFlashing.svg:
3242         * UserInterface/Images/gtk/ShadowDOM.svg:
3243         * UserInterface/Images/gtk/ToggleLeftSidebar.svg:
3244         * UserInterface/Images/gtk/ToggleRightSidebar.svg:
3245         * UserInterface/Images/gtk/UpDownArrows.svg:
3246         Fix a number of existing GTK images to have activated styles.
3247
3248 2016-11-15  Nikita Vasilyev  <nvasilyev@apple.com>
3249
3250         REGRESSION (r208248): Web Inspector: Pressing Left Arrow breaks autocomplete
3251         https://bugs.webkit.org/show_bug.cgi?id=164391
3252         <rdar://problem/29102408>
3253
3254         Reviewed by Matt Baker.
3255
3256         Unroll r208248.
3257
3258         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3259         (WebInspector.CodeMirrorCompletionController):
3260         (WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
3261         (WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
3262         (WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
3263         (WebInspector.CodeMirrorCompletionController.prototype.close):
3264         (WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
3265         (WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
3266         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
3267         (WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
3268         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
3269         (WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
3270         (WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory):
3271         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker):
3272         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
3273         (WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
3274         (WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
3275         (WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):
3276
3277 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
3278
3279         Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
3280         https://bugs.webkit.org/show_bug.cgi?id=164793
3281
3282         Reviewed by Matt Baker.
3283
3284         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
3285         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
3286         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3287         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
3288         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
3289         * Versions/Inspector-iOS-10.0.json:
3290         * Versions/Inspector-iOS-7.0.json:
3291         * Versions/Inspector-iOS-8.0.json:
3292         * Versions/Inspector-iOS-9.0.json:
3293         * Versions/Inspector-iOS-9.3.json:
3294
3295 2016-11-15  Joseph Pecoraro  <pecoraro@apple.com>
3296
3297         Web Inspector: URL Breakpoints that resolve in multiple workers should only appear in the UI once
3298         https://bugs.webkit.org/show_bug.cgi?id=164334
3299         <rdar://problem/29073523>
3300
3301         Reviewed by Matt Baker.
3302
3303         * UserInterface/Views/DebuggerSidebarPanel.js:
3304         (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
3305         Don't add a duplicate BreakpointTreeElements for the same Breakpoint.
3306
3307 2016-11-14  Joseph Pecoraro  <pecoraro@apple.com>
3308
3309         Web Inspector: Worker debugging should pause all targets and view call frames in all targets
3310         https://bugs.webkit.org/show_bug.cgi?id=164305
3311         <rdar://problem/29056192>
3312
3313         Reviewed by Timothy Hatcher.
3314
3315         This implements a policy where, when one Target ("Thread") pauses
3316         the frontend triggers a pause in all other Targets. The intended
3317         user experience is "all threads pause" whenever the frontend shows
3318         the debugger paused UI.
3319
3320         DebuggerManager has a few straight forward changes:
3321
3322             - The paused state reflects if any target is paused.
3323             - The Paused Event is fired when going from !paused -> paused.
3324               This means when the first target pauses.
3325             - The Resumed Event is fired when going from paused -> !paused.
3326               This means only after all targets have resumed.
3327             - The CallFrameDidChange Event now includes the Target that updated.
3328
3329         When a Target first pauses the frontend then immediately pauses all
3330         other Targets. This puts them into a "pausing" state (we display as
3331         Idle) and they will pause as soon as they start executing JavaScript.
3332
3333         When a Target steps the "paused" state isn't changing. So this is
3334         just a CallFramesDidChange update.
3335
3336         When clicking Resume we resume all targets. This is will be the normal,
3337         expected way users resume execution. Note that one of the threads may
3338         then hit a breakpoint and re-pause all threads.
3339
3340         Sometimes when multiple threads are paused you may want to run an