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