Web Inspector: Provide a way to clear an IndexedDB object store
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-08-25  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: Provide a way to clear an IndexedDB object store
4         https://bugs.webkit.org/show_bug.cgi?id=161167
5         <rdar://problem/27996932>
6
7         Reviewed by Brian Burg.
8
9         * Localizations/en.lproj/localizedStrings.js:
10         "Clear object store".
11
12         * UserInterface/Controllers/StorageManager.js:
13         (WebInspector.StorageManager.prototype.clearObjectStore):
14         Provide a wrapper for clearing an object store.
15
16         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
17         (WebInspector.IndexedDatabaseObjectStoreContentView):
18         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get navigationItems):
19         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._clearButtonClicked):
20         Add a navigation button on ObjectStore content views to clear the object store.
21
22 2016-08-26  Devin Rousso  <dcrousso+webkit@gmail.com>
23
24         Web Inspector: Some CSS selectors in the UI aren't escaped
25         https://bugs.webkit.org/show_bug.cgi?id=151378
26
27         Reviewed by Joseph Pecoraro.
28
29         * UserInterface/Base/DOMUtilities.js:
30         (WebInspector.displayNameForNode): Deleted.
31         (WebInspector.linkifyNodeReference):
32         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
33
34         * UserInterface/Models/DOMNode.js:
35         (WebInspector.DOMNode.prototype.get escapedIdSelector):
36         (WebInspector.DOMNode.prototype.get escapedClassSelector):
37         (WebInspector.DOMNode.prototype.get displayName):
38         (WebInspector.DOMNode.prototype.appropriateSelectorFor):
39         Rework escaping of ids and class names into separate public functions using CSS.escape.
40
41         * UserInterface/Views/CSSStyleDeclarationSection.js:
42         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
43         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
44
45         * UserInterface/Views/DOMTreeDataGridNode.js:
46         (WebInspector.DOMTreeDataGridNode.prototype._createNameCellDocumentFragment):
47         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
48
49         * UserInterface/Views/DOMTreeElementPathComponent.js:
50         (WebInspector.DOMTreeElementPathComponent):
51         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
52
53         * UserInterface/Views/LayerTreeDataGridNode.js:
54         (WebInspector.LayerTreeDataGridNode.prototype.set layer):
55         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
56
57         * UserInterface/Views/VisualStyleSelectorSection.js:
58         (WebInspector.VisualStyleSelectorSection.prototype.update):
59         Use DOMNode.prototype.displayName instead of WebInspector.displayNameForNode.
60
61 2016-08-24  Matt Baker  <mattbaker@apple.com>
62
63         Web Inspector: unexpected cursor changes while dragging ruler handle in rendering frames timeline
64         https://bugs.webkit.org/show_bug.cgi?id=161101
65         <rdar://problem/27974117>
66
67         Reviewed by Brian Burg.
68
69         -webkit-grab(bing) cursor styles shouldn't be applied to the selection
70         drag element when resizing.
71
72         * UserInterface/Views/TimelineRuler.css:
73         (.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag):
74         (.timeline-ruler:not(.disabled, .resizing-selection) > .selection-drag:active):
75         (.timeline-ruler:not(.disabled) > .selection-drag): Deleted.
76         (.timeline-ruler:not(.disabled) > .selection-drag:active): Deleted.
77
78 2016-08-24  Devin Rousso  <dcrousso+webkit@gmail.com>
79
80         Web Inspector: Shift-Tab should unindent selected line
81         https://bugs.webkit.org/show_bug.cgi?id=159316
82
83         Reviewed by Joseph Pecoraro.
84
85         * UserInterface/Views/CodeMirrorAdditions.js:
86         (CodeMirror.keyMap["default"]):
87         Changed "Shift-Tab" mapping to "indentLess".
88
89 2016-08-23  Devin Rousso  <dcrousso+webkit@gmail.com>
90
91         Web Inspector: resource tree elements should provide "Download File" context menu items
92         https://bugs.webkit.org/show_bug.cgi?id=158035
93
94         Reviewed by Joseph Pecoraro.
95
96         Add a context menu item to elements representing resources that
97         initiates a download of that resource.
98
99         * Localizations/en.lproj/localizedStrings.js:
100
101         * UserInterface/Base/Main.js:
102         (WebInspector.saveDataToFile):
103         Add support for saving base64 objects.
104
105         * UserInterface/Base/MIMETypeUtilities.js:
106         (WebInspector.fileExtensionForMIMEType):
107         Returns a file extension for the given MIME type if able.
108
109         * UserInterface/Views/FrameTreeElement.js:
110         (WebInspector.FrameTreeElement.prototype.onattach):
111         Add contextmenu event listener since superclass onattach call is explicitly not used.
112
113         * UserInterface/Views/ResourceTimelineDataGridNode.js:
114         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
115         Add Save File context menu item.
116
117         * UserInterface/Views/ResourceTreeElement.js:
118         (WebInspector.ResourceTreeElement.prototype.onattach):
119         (WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent):
120         Add contextmenu event listener and Save File context menu item.
121
122 2016-08-23  Devin Rousso  <dcrousso+webkit@gmail.com>
123
124         Web Inspector: No open/copy src resource in context menu
125         https://bugs.webkit.org/show_bug.cgi?id=159028
126
127         Reviewed by Joseph Pecoraro.
128
129         * Localizations/en.lproj/localizedStrings.js:
130
131         * UserInterface/Views/DOMTreeElement.js:
132         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
133         Add options in the context menu of link attributes of DOM nodes to
134          - Open in New Tab
135          - Reveal in Resources Tab
136          - Copy Link Address
137
138 2016-08-23  Devin Rousso  <dcrousso+webkit@gmail.com>
139
140         Web Inspector: Add visual editor for spring() timing-function
141         https://bugs.webkit.org/show_bug.cgi?id=159315
142
143         Reviewed by Joseph Pecoraro.
144
145         * Localizations/en.lproj/localizedStrings.js:
146         * UserInterface/Main.html:
147
148         * UserInterface/Base/Utilities.js:
149         (Number.prototype.maxDecimals):
150         Limits the number of decimals for the number object via rounding.
151
152         * UserInterface/Controllers/CodeMirrorSpringEditingController.js:
153         (WebInspector.CodeMirrorSpringEditingController.prototype.get initialValue):
154         (WebInspector.CodeMirrorSpringEditingController.prototype.get cssClassName):
155         (WebInspector.CodeMirrorSpringEditingController.prototype.popoverWillPresent):
156         (WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidPresent):
157         (WebInspector.CodeMirrorSpringEditingController.prototype.popoverDidDismiss):
158         (WebInspector.CodeMirrorSpringEditingController.prototype._springEditorSpringChanged):
159         Controller for Spring editors inside CodeMirror instances.
160
161         * UserInterface/Models/Geometry.js:
162         (WebInspector.Spring):
163         (WebInspector.Spring.fromValues):
164         (WebInspector.Spring.fromString):
165         (WebInspector.Spring.prototype.copy):
166         (WebInspector.Spring.prototype.toString):
167         (WebInspector.Spring.prototype.solve):
168         (WebInspector.Spring.prototype.calculateDuration):
169         Spring data class based on <https://webkit.org/demos/spring/>.
170
171         * UserInterface/Models/TextMarker.js:
172         (WebInspector.TextMarker.Type):
173         Added Spring marker type.
174
175         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
176         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches):
177         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createInlineSwatches.update):
178         (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged):
179         (WebInspector.CSSStyleDeclarationTextEditor.prototype._inlineSwatchValueChanged.update):
180
181         * UserInterface/Views/CodeMirrorTextMarkers.js:
182         (createCodeMirrorSpringTextMarkers):
183
184         * UserInterface/Views/InlineSwatch.css:
185         (.inline-swatch:matches(.bezier, .spring)):
186         (.inline-swatch:matches(.bezier, .spring):hover):
187         (.inline-swatch:matches(.bezier, .spring):active):
188         (.inline-swatch:matches(.bezier, .spring) > span):
189         (.inline-swatch.bezier): Deleted.
190         (.inline-swatch.bezier:hover): Deleted.
191         (.inline-swatch.bezier:active): Deleted.
192         (.inline-swatch.bezier > span): Deleted.
193
194         * UserInterface/Views/InlineSwatch.js:
195         (WebInspector.InlineSwatch):
196         (WebInspector.InlineSwatch.prototype._fallbackValue):
197         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
198         (WebInspector.InlineSwatch.prototype._valueEditorValueDidChange):
199         (WebInspector.InlineSwatch.Type):
200         Added support for Spring editor Inline Swatches.
201
202         * UserInterface/Views/SourceCodeTextEditor.js:
203         (WebInspector.SourceCodeTextEditor.prototype._updateEditableMarkers):
204         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
205
206         * UserInterface/Views/SpringEditor.css:
207         (.spring-editor):
208         (.spring-editor > .spring-preview):
209         (.spring-editor > .spring-preview > div):
210         (.spring-editor > .spring-timing):
211         (.spring-editor > .spring-timing > div):
212         (.spring-editor > .spring-timing:matches(::before, ::after)):
213         (.spring-editor > .spring-timing::before):
214         (.spring-editor > .spring-timing::after):
215         (.spring-editor > :matches(.spring-preview, .spring-timing) > div):
216         (.spring-editor > .animate:matches(.spring-preview, .spring-timing) > div):
217         (.spring-editor > .number-input-container > .number-input-row):
218         (.spring-editor > .number-input-container > .number-input-row > .number-input-row-title):
219         (.spring-editor > .number-input-container > .number-input-row > input):
220         (.spring-editor > .number-input-container > .number-input-row > input[type="range"]):
221
222         * UserInterface/Views/SpringEditor.js:
223         (WebInspector.SpringEditor):
224         (WebInspector.SpringEditor.prototype.get element):
225         (WebInspector.SpringEditor.prototype.set spring):
226         (WebInspector.SpringEditor.prototype.get spring):
227         (WebInspector.SpringEditor.prototype._handleNumberInputInput):
228         (WebInspector.SpringEditor.prototype._handleNumberInputKeydown):
229         (WebInspector.SpringEditor.prototype._handleNumberSliderInput):
230         (WebInspector.SpringEditor.prototype._handleNumberSliderMousedown):
231         (WebInspector.SpringEditor.prototype._handleNumberSliderMouseup):
232         (WebInspector.SpringEditor.prototype._changeSpringForInput):
233         (WebInspector.SpringEditor.prototype._resetPreviewAnimation):
234         (WebInspector.SpringEditor.prototype._updatePreviewAnimation):
235         (WebInspector.SpringEditor.Event):
236         Visual editor for CSS Spring timing function values.  Organized into 5 rows:
237          - Preview: shows movement of spring and total duration
238          - Mass: slider and input for "mass" parameter
239          - Stiffness: slider and input for "stiffness" parameter
240          - Damping: slider and input for "damping" parameter
241          - Initial Velocity: slider and input for "initial velocity" parameter
242         The preview animation will loop indefinitely until the user clicks the animation row
243         or changes the value of one of the parameters, at which point the duration will also
244         be recalculated.
245
246         * UserInterface/Views/TextEditor.js:
247         (WebInspector.TextEditor.prototype.createSpringMarkers):
248         (WebInspector.TextEditor.prototype.editingControllerForMarker):
249
250         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
251         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
252         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._generateTextFromLonghandProperties):
253         Add support for CSS spring timing functions by allowing parenthesis in comma separated
254         values so long as there are no commas inside the parenthesis.
255
256         * UserInterface/Views/VisualStyleTimingEditor.css:
257         (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch:matches(.bezier, .spring)):
258         (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.spring-value) > .inline-swatch.spring):
259         (.visual-style-property-container.timing-editor > .visual-style-property-value-container > .inline-swatch.bezier): Deleted.
260         (.visual-style-property-container.timing-editor > .visual-style-property-value-container:not(.bezier-value) > .inline-swatch.bezier): Deleted.
261
262         * UserInterface/Views/VisualStyleTimingEditor.js:
263         (WebInspector.VisualStyleTimingEditor):
264         (WebInspector.VisualStyleTimingEditor.prototype.get value):
265         (WebInspector.VisualStyleTimingEditor.prototype.set value):
266         (WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
267         (WebInspector.VisualStyleTimingEditor.prototype.parseValue):
268         (WebInspector.VisualStyleTimingEditor.prototype.get _bezierValue):
269         (WebInspector.VisualStyleTimingEditor.prototype.set _bezierValue):
270         (WebInspector.VisualStyleTimingEditor.prototype.get _springValue):
271         (WebInspector.VisualStyleTimingEditor.prototype.set _springValue):
272         (WebInspector.VisualStyleTimingEditor.prototype._handleKeywordChanged):
273         (WebInspector.VisualStyleTimingEditor.prototype._springSwatchValueChanged):
274         (WebInspector.VisualStyleTimingEditor.prototype.get bezierValue): Renamed.
275         (WebInspector.VisualStyleTimingEditor.prototype.set bezierValue): Renamed.
276         Duplicate Bezier custom timing function logic for Spring timing functions.
277
278 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
279
280         Web Inspector: Styles -> Computed -> Box Model shows NaN x NaN for invisible elements
281         https://bugs.webkit.org/show_bug.cgi?id=161038
282
283         Reviewed by Joseph Pecoraro.
284
285         * UserInterface/Base/Utilities.js:
286         Add figureDash variable.
287
288         * UserInterface/Views/BoxModelDetailsSectionRow.js:
289         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement):
290         (WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
291         Moved isNaN check of value to common createElement.
292
293 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
294
295         Web Inspector: Visual styles sidebar should do something sane for SVG elements
296         https://bugs.webkit.org/show_bug.cgi?id=148269
297
298         Reviewed by Joseph Pecoraro.
299
300         * Localizations/en.lproj/localizedStrings.js:
301
302         * UserInterface/Models/DOMNode.js:
303         (WebInspector.DOMNode.prototype.get ownerSVGElement):
304         (WebInspector.DOMNode.prototype.isSVGElement):
305         Climbs ancestor tree to determine if node is an SVG node.
306
307         * UserInterface/Views/VisualStyleDetailsPanel.js:
308         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
309         (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
310         (WebInspector.VisualStyleDetailsPanel.prototype._populatePositionSection):
311         (WebInspector.VisualStyleDetailsPanel.prototype._populateDimensionsSection):
312         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
313         (WebInspector.VisualStyleDetailsPanel.prototype._populateFillSection):
314         (WebInspector.VisualStyleDetailsPanel.prototype._populateStrokeSection):
315
316         * UserInterface/Views/VisualStylePropertyEditor.css:
317         (.visual-style-property-container.inactive):
318         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)):
319
320         * UserInterface/Views/VisualStyleRelativeNumberSlider.css:
321         (.visual-style-property-container.number-input-box.relative-number-slider > .relative-slider):
322
323         * UserInterface/Views/VisualStyleUnitSlider.css:
324         (.visual-style-property-container.unit-slider > .visual-style-property-value-container > .slider):
325         (.visual-style-property-container.unit-slider.opacity > .visual-style-property-value-container > .slider): Deleted.
326
327 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
328
329         Web Inspector: Visual Styles: "Text -> Content" section should only be visible for pseudo-element
330         https://bugs.webkit.org/show_bug.cgi?id=158272
331
332         Reviewed by Joseph Pecoraro.
333
334         * Localizations/en.lproj/localizedStrings.js:
335
336         * UserInterface/Views/VisualStyleDetailsPanel.css:
337         (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive):
338         (.sidebar > .panel.details.css-style .visual > .details-section :matches(.details-section, .group).inactive > *):
339         (.visual-style-property-container.transition): Deleted.
340         (.visual-style-property-container.animation): Deleted.
341
342         * UserInterface/Views/VisualStyleDetailsPanel.js:
343         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
344         (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
345         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection):
346
347 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
348
349         Web Inspector: Entering ":n" in Open Resource Dialog, where n > number of lines, should jump to the last line
350         https://bugs.webkit.org/show_bug.cgi?id=160840
351
352         Reviewed by Joseph Pecoraro.
353
354         * UserInterface/Views/TextEditor.js:
355         (TextEditor.prototype.revealPosition):
356         Limit the given line and column to the maximum number of lines and the column count on the
357         resulting line.
358
359 2016-08-22  Devin Rousso  <dcrousso+webkit@gmail.com>
360
361         Web Inspector: Add indicator to matched selector being a pseudo-element
362         https://bugs.webkit.org/show_bug.cgi?id=160893
363
364         Reviewed by Joseph Pecoraro.
365
366         Instead of using "{}" icons for CSS rules, use a "P" icon with the same coloring to identify
367         that the rule contains a pseudo-selector that is currently being applied to the selected element.
368
369         * UserInterface/Base/Utilities.js:
370         (Array.prototype.toggleIncludes):
371         Toggles whether or not to include the given value in the array based on its existence or a
372         "force" flag parameter.
373
374         * UserInterface/Images/StyleRuleAuthorPseudo.svg:
375         * UserInterface/Images/StyleRuleInspectorPseudo.svg:
376         * UserInterface/Images/StyleRuleUserAgentPseudo.svg:
377         * UserInterface/Images/StyleRuleUserPseudo.svg:
378
379         * UserInterface/Models/CSSRule.js:
380         (WebInspector.CSSRule.prototype.hasMatchedPseudoElementSelector):
381
382         * UserInterface/Models/CSSSelector.js:
383         (WebInspector.CSSSelector.prototype.isPseudoElementSelector):
384
385         * UserInterface/Views/CSSStyleDeclarationSection.js:
386         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
387
388         * UserInterface/Views/StyleRuleIcons.css:
389         (.author-style-rule-icon.pseudo-element-selector .icon):
390         (.user-style-rule-icon.pseudo-element-selector .icon):
391         (.user-agent-style-rule-icon.pseudo-element-selector .icon):
392         (.inspector-style-rule-icon.pseudo-element-selector .icon):
393
394          * UserInterface/Views/VisualStyleSelectorTreeItem.js:
395         (WebInspector.VisualStyleSelectorTreeItem):
396         (WebInspector.VisualStyleSelectorTreeItem.prototype.get iconClassName):
397         (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
398
399 2016-08-19  Nikita Vasilyev  <nvasilyev@apple.com>
400
401         Web Inspector: Make an icon for Code Coverage Profiler
402         https://bugs.webkit.org/show_bug.cgi?id=160872
403         <rdar://problem/27855650>
404
405         Reviewed by Joseph Pecoraro.
406
407         Add a "C" icon, similar to the existing "T" (Type Profiler) icon.
408         "C" can stand for Code Coverage or Control Flow.
409
410         * UserInterface/Images/NavigationItemCodeCoverage.svg: Added.
411
412 2016-08-19  Devin Rousso  <dcrousso+webkit@gmail.com>
413
414         Web Inspector: Console log counter on the dashboard should be better at displaying large numbers
415         https://bugs.webkit.org/show_bug.cgi?id=160054
416
417         Reviewed by Matt Baker.
418
419         * Localizations/en.lproj/localizedStrings.js:
420
421         * UserInterface/Base/Utilities.js:
422         (Number.abbreviate):
423         Add logic for formatting a number as "#K", "#M", and "#B" when it is very large.
424
425         * UserInterface/Views/DefaultDashboardView.js:
426         (WebInspector.DefaultDashboardView.prototype._updateDisplay):
427         (WebInspector.DefaultDashboardView.prototype._formatPossibleLargeNumber): Deleted.
428         (WebInspector.DefaultDashboardView.prototype._setConsoleItemValue):
429
430 2016-08-17  Matt Baker  <mattbaker@apple.com>
431
432         Web Inspector: Network Tab should not layout if not visible
433         https://bugs.webkit.org/show_bug.cgi?id=160920
434         <rdar://problem/27876629>
435
436         Reviewed by Timothy Hatcher.
437
438         Avoid updating the current time when the Network tab is hidden.
439         The timer, and any debounced timer cancellations, need to be stopped
440         as soon as the view is hidden.
441
442         * UserInterface/Views/NetworkGridContentView.js:
443         (WebInspector.NetworkGridContentView.prototype.hidden):
444         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
445         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
446         (WebInspector.NetworkGridContentView):
447
448 2016-08-17  Devin Rousso  <dcrousso+webkit@gmail.com>
449
450         Web Inspector: Select elements in DOM hierarchy are misaligned
451         https://bugs.webkit.org/show_bug.cgi?id=160885
452
453         Reviewed by Timothy Hatcher.
454
455         * UserInterface/Views/HierarchicalPathComponent.css:
456         (.hierarchical-path-component > select):
457
458 2016-08-17  Devin Rousso  <dcrousso+webkit@gmail.com>
459
460         Web Inspector: rapid updates to status icons in Visual Styles sidebar causes flicker
461         https://bugs.webkit.org/show_bug.cgi?id=160887
462
463         Reviewed by Timothy Hatcher.
464
465         * UserInterface/Views/VisualStyleBasicInput.js:
466         (WebInspector.VisualStyleBasicInput):
467
468         * UserInterface/Views/VisualStyleColorPicker.js:
469         (WebInspector.VisualStyleColorPicker):
470
471         * UserInterface/Views/VisualStyleNumberInputBox.js:
472         (WebInspector.VisualStyleNumberInputBox):
473         (WebInspector.VisualStyleNumberInputBox.prototype._valueNumberInputKeyDown):
474
475         * UserInterface/Views/VisualStylePropertyNameInput.js:
476         (WebInspector.VisualStylePropertyNameInput):
477
478 2016-08-16  Nikita Vasilyev  <nvasilyev@apple.com>
479
480         Web Inspector: DOM nodes shift when hovering over them in Console
481         https://bugs.webkit.org/show_bug.cgi?id=160789
482         <rdar://problem/27815600>
483
484         Reviewed by Matt Baker.
485
486         * UserInterface/Views/FormattedValue.css:
487         (.formatted-node > .tree-outline.dom ol): Deleted.
488
489 2016-08-16  Nikita Vasilyev  <nvasilyev@apple.com>
490
491         Web Inspector: Data grid has a double left border when the first column is hidden
492         https://bugs.webkit.org/show_bug.cgi?id=160723
493         <rdar://problem/27778081>
494
495         Reviewed by Timothy Hatcher.
496
497         This patch exploits the fact hiding columns that aren't first in DataGrid don't create double
498         borders.
499
500         * UserInterface/Views/DataGrid.css:
501         (.data-grid table.header,):
502         (.data-grid :matches(th, td):first-child):
503         (@media (-webkit-min-device-pixel-ratio: 2)):
504         * UserInterface/Views/SourceCodeTextEditor.js:
505         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
506
507 2016-08-16  Joseph Pecoraro  <pecoraro@apple.com>
508
509         Web Inspector: Do not request Scope Chain lists if section is collapsed (mainly Global Variables)
510         https://bugs.webkit.org/show_bug.cgi?id=140567
511         <rdar://problem/19504745>
512
513         Reviewed by Timothy Hatcher.
514
515         * UserInterface/Main.html:
516         New file name.
517
518         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
519         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.fillSection):
520         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshProperties):
521         Avoid fetching object properties until the user expands the section.
522
523         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
524         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
525         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
526         Avoid fetching scope variable properties until the user expands the section.
527
528         * UserInterface/Views/ObjectPropertiesDetailSectionRow.js: Renamed from Source/WebInspectorUI/UserInterface/Views/DetailsSectionPropertiesRow.js.
529         (WebInspector.ObjectPropertiesDetailSectionRow):
530         (WebInspector.ObjectPropertiesDetailSectionRow.prototype.get objectTree):
531         (WebInspector.ObjectPropertiesDetailSectionRow.prototype._detailsSectionCollapsedStateChanged):
532         Rename and simplify the class since it always has an ObjectTreeView.
533         By default the section will auto-expand the ObjectTreeView, however
534         if provided a details section group, it will defer expanion until
535         the group expands.
536
537 2016-08-16  Devin Rousso  <dcrousso+webkit@gmail.com>
538
539         Web Inspector: add "Copy Selected" context menu item to Console
540         https://bugs.webkit.org/show_bug.cgi?id=151836
541
542         Reviewed by Timothy Hatcher.
543
544         * Localizations/en.lproj/localizedStrings.js:
545         * UserInterface/Views/LogContentView.js:
546         (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
547         (WebInspector.LogContentView.prototype._handleContextMenuEvent):
548         (WebInspector.LogContentView.prototype._mousedown):
549
550 2016-08-16  Devin Rousso  <dcrousso+webkit@gmail.com>
551
552         Web Inspector: Visual Styles: "Text -> Content" isn't escaped
553         https://bugs.webkit.org/show_bug.cgi?id=158271
554
555         Reviewed by Timothy Hatcher.
556
557         * UserInterface/Base/Utilities.js:
558         (String.prototype.hasMatchingEscapedQuotes):
559         Checks that the given string has property escaped quotes (single or double).
560
561         * UserInterface/Views/VisualStyleBasicInput.js:
562         (WebInspector.VisualStyleBasicInput):
563         (WebInspector.VisualStyleBasicInput.prototype._handleInputElementInput):
564
565 2016-08-16  Joseph Pecoraro  <pecoraro@apple.com>
566
567         Modernize model objects simple getters
568         https://bugs.webkit.org/show_bug.cgi?id=160863
569
570         Reviewed by Timothy Hatcher.
571
572         Simplify the style of many Model objects with basic accessors.
573         We reduce them to a single line and group them together so
574         that they can be more easily read at a glance.
575
576         * UserInterface/Models/AnalyzerMessage.js:
577         * UserInterface/Models/ApplicationCacheFrame.js:
578         * UserInterface/Models/ApplicationCacheManifest.js:
579         * UserInterface/Models/BreakpointAction.js:
580         * UserInterface/Models/CSSMedia.js:
581         * UserInterface/Models/CSSSelector.js:
582         * UserInterface/Models/CollectionEntry.js:
583         * UserInterface/Models/CollectionEntryPreview.js:
584         * UserInterface/Models/DOMStorageObject.js:
585         * UserInterface/Models/DatabaseObject.js:
586         * UserInterface/Models/DatabaseTableObject.js:
587         * UserInterface/Models/ExecutionContext.js:
588         * UserInterface/Models/GarbageCollection.js:
589         * UserInterface/Models/IndexedDatabase.js:
590         * UserInterface/Models/IndexedDatabaseObjectStore.js:
591         * UserInterface/Models/IndexedDatabaseObjectStoreIndex.js:
592         * UserInterface/Models/ObjectPreview.js:
593         * UserInterface/Models/ProbeSet.js:
594         * UserInterface/Models/PropertyDescriptor.js:
595         * UserInterface/Models/PropertyPath.js:
596         * UserInterface/Models/PropertyPreview.js:
597         * UserInterface/Models/SourceCodePosition.js:
598         * UserInterface/Models/SourceCodeSearchMatchObject.js:
599         * UserInterface/Models/SourceCodeTimeline.js:
600         * UserInterface/Models/StructureDescription.js:
601         * UserInterface/Models/TextRange.js:
602         * UserInterface/Models/Timeline.js:
603         * UserInterface/Models/TimelineRecording.js:
604         * UserInterface/Models/TypeDescription.js:
605
606 2016-08-15  Devin Rousso  <dcrousso+webkit@gmail.com>
607
608         Web Inspector: Large class lists are not easily discoverable with "Classes" quick-toggle
609         https://bugs.webkit.org/show_bug.cgi?id=160856
610
611         Reviewed by Joseph Pecoraro.
612
613         * UserInterface/Base/DOMUtilities.js:
614         (WebInspector.linkifyNodeReference):
615         Add option to truncate the text of the linkified node.
616
617         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
618         (.sidebar > .panel.details.css-style > .content ~ .class-list-container):
619         Increase the max-height to partially show additional classes if many are set.
620
621         * UserInterface/Views/RulesStyleDetailsPanel.js:
622         (WebInspector.RulesStyleDetailsPanel.prototype.refresh.insertMediaOrInheritanceLabel):
623         Trucate the name of inherited nodes so they don't take up as much space in the sidebar.
624
625         * UserInterface/Views/VisualStyleSelectorSection.css:
626         (.details-section.visual-style-selector-section > .header > .current-selector): Deleted.
627         (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider > .titles): Deleted.
628         Removed since they are already inherited.
629
630 2016-08-15  Devin Rousso  <dcrousso+webkit@gmail.com>
631
632         Web Inspector: Close button on selected item in Network tab is misaligned
633         https://bugs.webkit.org/show_bug.cgi?id=160884
634
635         Reviewed by Matt Baker.
636
637         * UserInterface/Views/NetworkSidebarPanel.css:
638         (.sidebar > .panel.navigation.network .status .close.status-button):
639
640 2016-08-15  Devin Rousso  <dcrousso+webkit@gmail.com>
641
642         Web Inspector: Error/Warning icons are misplaced in the Visual sidebar
643         https://bugs.webkit.org/show_bug.cgi?id=160875
644
645         Reviewed by Matt Baker.
646
647         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
648         (.visual-style-property-container.comma-separated-keyword-editor > .visual-style-property-value-container > .visual-style-special-property-placeholder): Deleted.
649         Reworked to apply more generally to editors without titles.
650
651         * UserInterface/Views/VisualStylePropertyEditor.css:
652         (.visual-style-property-container.missing-dependency > .visual-style-property-editor-warning):
653         (.visual-style-property-container.invalid-value > .visual-style-property-editor-warning):
654         (.visual-style-property-container:matches(.missing-dependency, .invalid-value) > *:first-child:matches(.visual-style-property-value-container)):
655         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container) > .visual-style-special-property-placeholder):
656         (.visual-style-property-container > .visual-style-property-editor-warning.missing-dependency): Deleted.
657         (.visual-style-property-container > .visual-style-property-editor-warning.invalid-value): Deleted.
658         Reworked class names to be on the element container instead of the icon.
659
660         * UserInterface/Views/VisualStylePropertyEditor.js:
661         (WebInspector.VisualStylePropertyEditor.prototype.update):
662         (WebInspector.VisualStylePropertyEditor.prototype.updateEditorValues):
663         (WebInspector.VisualStylePropertyEditor.prototype._valueDidChange):
664         (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
665
666 2016-08-15  Saam Barati  <sbarati@apple.com>
667
668         Web Inspector: Introduce a method to enable code coverage profiler without enabling type profiler
669         https://bugs.webkit.org/show_bug.cgi?id=160750
670         <rdar://problem/27793469>
671
672         Reviewed by Joseph Pecoraro.
673
674         * UserInterface/Base/Main.js:
675         (WebInspector.loaded):
676         * UserInterface/Views/SourceCodeTextEditor.js:
677         (WebInspector.SourceCodeTextEditor.prototype._setTypeTokenAnnotatorEnabledState):
678
679 2016-08-12  Timothy Hatcher  <timothy@apple.com>
680
681         Web Inspector: Add application/vnd.api+json as a valid JSON MIME-type
682         https://bugs.webkit.org/show_bug.cgi?id=160834
683         rdar://problem/27608536
684
685         Reviewed by Joseph Pecoraro.
686
687         * UserInterface/Views/CodeMirrorAdditions.js: Add Add application/vnd.api+json to extraJSONTypes.
688
689 2016-08-12  Nikita Vasilyev  <nvasilyev@apple.com>
690
691         Web Inspector: Command-Shift-O causes infinite loop if web page has frames
692         https://bugs.webkit.org/show_bug.cgi?id=160810
693
694         Reviewed by Joseph Pecoraro.
695
696         * UserInterface/Views/OpenResourceDialog.js:
697         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
698         "frame" doesn't change inside the loop.
699
700 2016-08-12  Joseph Pecoraro  <pecoraro@apple.com>
701
702         Web Inspector: Support for :lineNumber syntax in Open Resource Dialog
703         https://bugs.webkit.org/show_bug.cgi?id=159732
704         <rdar://problem/27684491>
705
706         Reviewed by Matt Baker.
707
708         Allow the Open Resource Dialog to support line/column syntax.
709         Other tools allow "<name>:<line>:<column>" syntax, where the
710         location data at the end is optional. If the <name> portion
711         is missing, the location can be used for the active content
712         view, assuming it has text data and has lines.
713
714         * UserInterface/Base/Main.js:
715         (WebInspector.focusedOrVisibleContentView):
716         Expose a function to access the current focused / visible content view.
717
718         (WebInspector.dialogWasDismissed):
719         Include passing on cookie data when showing a represented object.
720
721         * UserInterface/Views/Dialog.js:
722         (WebInspector.Dialog):
723         (WebInspector.Dialog.prototype.get visible):
724         (WebInspector.Dialog.prototype.get delegate):
725         (WebInspector.Dialog.prototype.get representedObject):
726         (WebInspector.Dialog.prototype.get cookie):
727         (WebInspector.Dialog.prototype.dismiss):
728         * UserInterface/Models/ResourceQueryResult.js:
729         (WebInspector.ResourceQueryResult):
730         (WebInspector.ResourceQueryResult.prototype.get cookie):
731         Include cookie data along with the represented object in matches
732         and dialog results.
733
734         * UserInterface/Controllers/ResourceQueryController.js:
735         (WebInspector.ResourceQueryController.prototype.executeQuery):
736         Cut off location data from a query, and stash it on the query result.
737         A query can be "<name>:<line>:<column>", and the line/column data
738         becomes cookie data for the resource.
739
740         * UserInterface/Views/OpenResourceDialog.js:
741         (WebInspector.OpenResourceDialog.prototype._populateResourceTreeOutline):
742         If the query is just ":<line>:<column>" have it jump to a location
743         in the current content view if applicable.
744
745         (WebInspector.OpenResourceDialog.prototype._handleKeydownEvent):
746         (WebInspector.OpenResourceDialog.prototype._treeSelectionDidChange):
747         When dismissing, include cookie data.
748
749 2016-08-11  Nikita Vasilyev  <nvasilyev@apple.com>
750
751         REGRESSION (r204264): Web Inspector: Uncaught Exception in Network tab when reloading a web page
752         https://bugs.webkit.org/show_bug.cgi?id=160781
753         <rdar://problem/27810452>
754
755         Reviewed by Matt Baker.
756
757         WebInspector.TimelineDataGrid.prototype.closed was removed in r204264.
758         Define a stub method on DataGrid so it's available to all its subclasses.
759
760         * UserInterface/Views/DataGrid.js:
761         this._dataGrid.closed()
762
763 2016-08-10  Joseph Pecoraro  <pecoraro@apple.com>
764
765         Web Inspector: Should be able to Edit Node Attributes and Styles for non-UserAgent Shadow DOM nodes
766         https://bugs.webkit.org/show_bug.cgi?id=160762
767         <rdar://problem/27798271>
768
769         Reviewed by Ryosuke Niwa.
770
771         * UserInterface/Models/DOMNode.js:
772         (WebInspector.DOMNode.prototype.isInUserAgentShadowTree):
773         (WebInspector.DOMNode.prototype.isShadowRoot):
774         (WebInspector.DOMNode.prototype.isUserAgentShadowRoot):
775         (WebInspector.DOMNode.prototype.ancestorShadowRoot):
776         (WebInspector.DOMNode.prototype.ancestorShadowHost):
777         Add methods for determining the shadow root, host, and easily
778         checking the type of shadow tree a node is in.
779
780         * UserInterface/Models/CSSStyleDeclaration.js:
781         (WebInspector.CSSStyleDeclaration.prototype.get editable):
782         * UserInterface/Views/DOMTreeElement.js:
783         (WebInspector.DOMTreeElement.prototype.get editable):
784         (WebInspector.DOMTreeElement.prototype._startEditingTarget):
785         (WebInspector.DOMTreeElement.prototype._populateTagContextMenu):
786         * UserInterface/Views/RulesStyleDetailsPanel.js:
787         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
788         * UserInterface/Views/VisualStyleSelectorSection.js:
789         (WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
790         Allow editing shadow DOM nodes as long as they are not in a UserAgent shadow tree.
791
792         * UserInterface/Views/DOMTreeOutline.js:
793         (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
794         Disallow "Log Element" on UserAgent shadow tree nodes.
795
796 2016-08-10  Nikita Vasilyev  <nvasilyev@apple.com>
797
798         Web Inspector: Can't click on the lower half of "S" icon in JavaScript Allocations timeline
799         https://bugs.webkit.org/show_bug.cgi?id=160743
800         <rdar://problem/27790098>
801
802         Reviewed by Timothy Hatcher.
803
804         "S" icons are covered by .scroll-container, which has `z-index: calc(var(--z-index-resizer) + 1)`.
805         Set larger z-index on the "S" icons.
806
807         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
808         (.timeline-overview-graph.heap-allocations > img.snapshot):
809
810 2016-08-08  Joseph Pecoraro  <pecoraro@apple.com>
811
812         Web Inspector: Popover for Color Picker should update position when window resizes
813         https://bugs.webkit.org/show_bug.cgi?id=160321
814
815         Reviewed by Brian Burg.
816
817         * UserInterface/Views/Popover.js:
818         (WebInspector.Popover):
819         (WebInspector.Popover.prototype.set windowResizeHandler):
820         (WebInspector.Popover.prototype.dismiss):
821         (WebInspector.Popover.prototype.handleEvent):
822         (WebInspector.Popover.prototype._addListenersIfNeeded):
823         The popover already has a set of window listeners, add "resize" to
824         the list. If there is a resize, invoke a resize handler. The resize
825         handler will only be called while the popover is visible.
826
827         * UserInterface/Views/HeapSnapshotDataGridTree.js:
828         (WebInspector.HeapSnapshotDataGridTree):
829         (WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
830         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
831         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
832         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverTargetElement):
833         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverTargetElement):
834         (WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
835         (WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
836         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
837         Update heap snapshot popovers to reposition on window resize.
838         Set a target to reposition around, since the popover is shared.
839
840         * UserInterface/Views/ProbeSetDetailsSection.js:
841         (WebInspector.ProbeSetDetailsSection.prototype._addProbeButtonClicked):
842         Update probe expression popover to respect window resizes.
843
844         * UserInterface/Views/VisualStylePropertyEditor.js:
845         (WebInspector.VisualStylePropertyEditor.prototype._showPropertyInfoPopover):
846         Though not yet visible, update this to respect window resizes.
847
848         * UserInterface/Views/InlineSwatch.js:
849         (WebInspector.InlineSwatch.prototype._swatchElementClicked):
850         Add a window resize handler to reposition over the swatch element.
851
852         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
853         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
854         (WebInspector.LayerTreeDetailsSidebarPanel): Deleted.
855         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._windowResized): Deleted.
856         * UserInterface/Views/TimelineDataGrid.js:
857         (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
858         (WebInspector.TimelineDataGrid): Deleted.
859         (WebInspector.TimelineDataGrid.prototype.closed): Deleted.
860         (WebInspector.TimelineDataGrid.prototype.handleEvent): Deleted.
861         (WebInspector.TimelineDataGrid.prototype._windowResized): Deleted.
862         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
863         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
864         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
865         Replace custom popover repositioning with standard Popover handling.
866
867 2016-08-07  Matt Baker  <mattbaker@apple.com>
868
869         REGRESSION (r201245): switching between Computed and Visual Styles panels causes internal error
870         https://bugs.webkit.org/show_bug.cgi?id=160604
871         <rdar://problem/27723416>
872
873         Reviewed by Timothy Hatcher.
874
875         * UserInterface/Views/StyleDetailsPanel.js:
876         (WebInspector.StyleDetailsPanel.prototype.shown):
877         Only perform a layout if needed. Subclasses access node style
878         data during layout, which may not exist yet.
879
880 2016-08-06  Matt Baker  <mattbaker@apple.com>
881
882         REGRESSION (r203253): Node details sidebar flickers while resizing
883         https://bugs.webkit.org/show_bug.cgi?id=160631
884         <rdar://problem/27733024>
885
886         Reviewed by Timothy Hatcher.
887
888         Sidebar panel layouts can be expensive, and should be performed only
889         when necessary (i.e., when the panel is shown for the first time, or
890         model data changed while the panel was hidden).
891
892         * UserInterface/Views/Sidebar.js:
893         (WebInspector.Sidebar.prototype._recalculateWidth):
894
895         * UserInterface/Views/SidebarPanel.js:
896         (WebInspector.SidebarPanel.prototype.shown):
897
898         * UserInterface/Views/View.js:
899         (WebInspector.View.prototype.updateLayoutIfNeeded):
900         Update the layout if an initial layout was never performed.
901
902 2016-08-04  Matt Baker  <mattbaker@apple.com>
903
904         Web Inspector: UI polish for Edit Breakpoint dialog
905         https://bugs.webkit.org/show_bug.cgi?id=160566
906         <rdar://problem/27706378>
907
908         Reviewed by Timothy Hatcher.
909
910         * UserInterface/Images/BreakpointActionAdd.svg: Removed.
911         * UserInterface/Images/BreakpointActionRemove.svg: Removed.
912         Use Plus13.svg and Minus.svg instead.
913
914         * UserInterface/Views/BreakpointActionView.css:
915         (.breakpoint-action-button-container):
916         (.breakpoint-action-append-button,):
917         (.breakpoint-action-append-button):
918         (.breakpoint-action-remove-button):
919         Button styles should match Xcode.
920         (.breakpoint-action-append-button:active,): Deleted.
921         Brightness on activation no longer needed.
922
923         * UserInterface/Views/BreakpointActionView.js:
924         (WebInspector.BreakpointActionView):
925         Add a button container so buttons can float together.
926
927         * UserInterface/Views/BreakpointPopoverController.css:
928         (.wide .edit-breakpoint-popover-condition > .CodeMirror):
929         Increase condition field width by the same amount as the popover.
930
931 2016-08-04  Matt Baker  <mattbaker@apple.com>
932
933         Web Inspector: Popover's arrow is misplaced
934         https://bugs.webkit.org/show_bug.cgi?id=151236
935         <rdar://problem/23527296>
936
937         Reviewed by Brian Burg.
938
939         * UserInterface/Views/Popover.js:
940         (WebInspector.Popover.prototype._setAnchorPoint):
941         Drive-by style fix.
942         (WebInspector.Popover.prototype._drawFrame):
943         Position the arrow so that the arrow head doesn't overlap the
944         rounded corners of its edge.
945
946 2016-08-04  Matt Baker  <mattbaker@apple.com>
947
948         Web Inspector: Add placeholder graphs to TimelineOverview while editing
949         https://bugs.webkit.org/show_bug.cgi?id=160485
950         <rdar://problem/27670755>
951
952         Reviewed by Brian Burg.
953
954         Insert placeholder elements in TimelineOverview's graph container
955         when editing instruments. This allows alternating overview graph styles
956         to be shown for disabled instruments, and ensures that every tree element
957         has a corresponding element in the overview during dragging/reordering
958         of instruments (see https://webkit.org/b/157957).
959
960         * UserInterface/Views/TimelineOverview.js:
961         (WebInspector.TimelineOverview.prototype._startEditingInstruments):
962         (WebInspector.TimelineOverview.prototype._stopEditingInstruments):
963
964 2016-08-04  Matt Baker  <mattbaker@apple.com>
965
966         Web Inspector: UI polish for Open Quickly and Goto Line dialogs
967         https://bugs.webkit.org/show_bug.cgi?id=159849
968         <rdar://problem/27383068>
969
970         Reviewed by Brian Burg.
971
972         * UserInterface/Images/Search.svg: Added.
973         Magnifying glass icon.
974
975         * UserInterface/Views/GoToLineDialog.css:
976         (.go-to-line-dialog):
977         (.go-to-line-dialog > div):
978         (.go-to-line-dialog > div::before):
979         * UserInterface/Views/OpenResourceDialog.css:
980         (.open-resource-dialog > .field):
981         (.open-resource-dialog > .field::before):
982         (.open-resource-dialog.has-results > .tree-outline):
983         (.open-resource-dialog > .tree-outline .item):
984         Add search icon to left of the input field in both dialogs,
985         and adjust styles to better match Xcode 8.
986
987         * UserInterface/Views/OpenResourceDialog.js:
988         (WebInspector.OpenResourceDialog):
989         Remove "input" event listener, as styles are now toggled in _updateFilter.
990         (WebInspector.OpenResourceDialog.prototype._updateFilter):
991         Toggle "has-results" and "non-empty" class names.
992         (WebInspector.OpenResourceDialog.prototype._handleInputEvent): Deleted.
993         (WebInspector.OpenResourceDialog.prototype._clear): Deleted.
994         Moved class toggle to _updateFilter.
995
996 2016-08-03  Chris Dumez  <cdumez@apple.com>
997
998         Drop DocumentType.internalSubset attribute
999         https://bugs.webkit.org/show_bug.cgi?id=160530
1000
1001         Reviewed by Alex Christensen.
1002
1003         Drop DocumentType.internalSubset attribute.
1004
1005         * UserInterface/Models/DOMNode.js:
1006         (WebInspector.DOMNode): Deleted.
1007         * UserInterface/Models/DOMSearchMatchObject.js:
1008         (WebInspector.DOMSearchMatchObject.titleForDOMNode): Deleted.
1009         * UserInterface/Views/DOMTreeElement.js:
1010         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo): Deleted.
1011
1012 2016-08-03  Matt Baker  <mattbaker@apple.com>
1013
1014         Web Inspector: Cmd-L shortcut for Jump to Line conflicts with selecting URL of inspected page
1015         https://bugs.webkit.org/show_bug.cgi?id=158028
1016         <rdar://problem/26516663>
1017
1018         Reviewed by Timothy Hatcher.
1019
1020         Remove Command-L shortcut for opening the Line Number dialog, since
1021         we already support Control-G.
1022
1023         * UserInterface/Views/SourceCodeTextEditor.js:
1024         (WebInspector.SourceCodeTextEditor): Deleted.
1025
1026 2016-08-01  Nikita Vasilyev  <nvasilyev@apple.com>
1027
1028         Web Inspector: Don't set `width:calc(100% - 0px); left:0px` on console messages
1029         https://bugs.webkit.org/show_bug.cgi?id=160428
1030         <rdar://problem/27646033>
1031
1032         Reviewed by Timothy Hatcher.
1033
1034         Console messages inside console.group() are indented. Console messages outside of
1035         console.group() aren't and there is no reason to set inline styles that do nothing
1036         on each one of them.
1037
1038         * UserInterface/Views/LogContentView.js:
1039         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
1040
1041 2016-08-01  Matt Baker  <mattbaker@apple.com>
1042
1043         Web Inspector: Grid column resizer elements positioned incorrectly
1044         https://bugs.webkit.org/show_bug.cgi?id=160311
1045         <rdar://problem/27595586>
1046
1047         Reviewed by Brian Burg.
1048
1049         Perform a resize layout on a newly shown tab content view if the tab
1050         browser was resized before showing the tab.
1051
1052         * UserInterface/Views/TabBrowser.js:
1053         (WebInspector.TabBrowser):
1054         (WebInspector.TabBrowser.prototype.layout):
1055         Mark all recent tab content views (except for the current view)
1056         as needing a resize layout.
1057
1058         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
1059         If the tab browser was resized while the view was hidden, update the
1060         view's layout for the new content view container size.
1061
1062 2016-08-01  Matt Baker  <mattbaker@apple.com>
1063
1064         Web Inspector: Waterfall graph in Network tab shows too much whitespace/dead time
1065         https://bugs.webkit.org/show_bug.cgi?id=160373
1066
1067         Reviewed by Timothy Hatcher.
1068
1069         Track the start and end time separate from the ruler to remove
1070         leading/trailing whitespace in the graph. Also prevent network
1071         record bars from being clipped.
1072
1073         * UserInterface/Views/NetworkGridContentView.js:
1074         (WebInspector.NetworkGridContentView):
1075         (WebInspector.NetworkGridContentView.prototype.get zeroTime):
1076         Set equal to the ruler start time.
1077         (WebInspector.NetworkGridContentView.prototype.reset):
1078         Reset start and end time.
1079         (WebInspector.NetworkGridContentView.prototype.layout):
1080         Set the initial values for ruler start/zero time if needed.
1081         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
1082         Set the start time if needed.
1083         Reduce debounce from 250ms to 150ms. This prevents the current time from
1084         exceeding the end time by as wide a margin, while keeping the current
1085         time "timer" from being restarted too frequently.
1086
1087         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
1088         Update the ruler end time and schedule a layout.
1089         Add padding equal to the time needed to draw a network bar at minimum width
1090         to prevent bars from being clipped.
1091
1092 2016-07-29  Matt Baker  <mattbaker@apple.com>
1093
1094         Web Inspector: Inactive/active network bar segments overlap when latency is zero
1095         https://bugs.webkit.org/show_bug.cgi?id=160147
1096         <rdar://problem/27516007>
1097
1098         Reviewed by Joseph Pecoraro.
1099
1100         TimelineRecordBar should hide the inactive segment when its duration
1101         is less than the minimum displayable size. The active segment can
1102         assume the whole width of the bar.
1103
1104         * UserInterface/Views/TimelineOverviewGraph.js:
1105         (WebInspector.TimelineOverviewGraph.prototype.get secondsPerPixel):
1106         Make secondsPerPixel available during TimelineRecordBars.refresh.
1107
1108         * UserInterface/Views/TimelineRecordBar.js:
1109         (WebInspector.TimelineRecordBar.prototype.refresh):
1110         Check inactive duration against the minimum display size,
1111         and add/remove DOM nodes and bar styles as needed.
1112
1113 2016-07-29  Nikita Vasilyev  <nvasilyev@apple.com>
1114
1115         REGRESSION (r195456): Web Inspector: Changing tabs in Styles sidebar shouldn't change sidebar's width
1116         https://bugs.webkit.org/show_bug.cgi?id=159646
1117         <rdar://problem/27286338>
1118
1119         Reviewed by Brian Burg.
1120
1121         Remember sidebar width on per tab basis. For example, Node, Styles, and Layers sidebar panels in
1122         Elements tab should all have the same width, but Resource sidebar panel in Debugger tab should NOT
1123         share its width Element tab's sidebar.
1124
1125         TabContentView stores the width but TabBrowser manages saving and restoring it.
1126         The same way collapsed sidebar state is handled.
1127
1128         * UserInterface/Views/Sidebar.js:
1129         (WebInspector.Sidebar.prototype.set collapsed):
1130         Don't change sidebar's width when sidebar panels change.
1131
1132         (WebInspector.Sidebar.prototype._recalculateWidth):
1133         (WebInspector.Sidebar.prototype.set selectedSidebarPanel): Deleted.
1134         Pass newWidth as an argument so it can be saved in TabBrowser.
1135
1136         * UserInterface/Views/SidebarPanel.js:
1137         (WebInspector.SidebarPanel): Deleted.
1138         (WebInspector.SidebarPanel.prototype.get savedWidth): Deleted.
1139         (WebInspector.SidebarPanel.prototype.sizeDidChange): Deleted.
1140         Remove the per sidebar panel width setting that was added in r195456.
1141
1142         * UserInterface/Views/TabBrowser.js:
1143         (WebInspector.TabBrowser):
1144         (WebInspector.TabBrowser.prototype._detailsSidebarWidthDidChange):
1145         (WebInspector.TabBrowser.prototype._showDetailsSidebarPanelsForTabContentView):
1146         * UserInterface/Views/TabContentView.js:
1147         (WebInspector.TabContentView):
1148         (WebInspector.TabContentView.prototype.get detailsSidebarWidthSetting):
1149         Store details sidebar width on TabContentView.
1150
1151 2016-07-29  Matt Baker  <mattbaker@apple.com>
1152
1153         Web Inspector: Assertion in NetworkGridContentView when updating data grid for the first time
1154         https://bugs.webkit.org/show_bug.cgi?id=160330
1155         <rdar://problem/27600905>
1156
1157         Reviewed by Brian Burg.
1158
1159         When the first grid node is added, a view layout and current time update
1160         are scheduled. A view layout occurring before the current time is updated
1161         should be skipped, since the ruler end time hasn't been set.
1162
1163         * UserInterface/Views/NetworkGridContentView.js:
1164         (WebInspector.NetworkGridContentView.prototype.layout):
1165         Skip layout until current time is updated.
1166         (WebInspector.NetworkGridContentView.prototype._update):
1167         Remove unused variables `startTime` and `endTime`. Don't force a layout
1168         if the elapsed time is zero.
1169
1170 2016-07-28  Chris Dumez  <cdumez@apple.com>
1171
1172         Parameters to Event.initEvent() should be mandatory
1173         https://bugs.webkit.org/show_bug.cgi?id=160320
1174
1175         Reviewed by Darin Adler.
1176
1177         Update WebInspector accordingly.
1178
1179         * UserInterface/Models/NativeFunctionParameters.js:
1180
1181 2016-07-28  Chris Dumez  <cdumez@apple.com>
1182
1183         First parameter to canvas.getContext() / probablySupportsContext() should be mandatory
1184         https://bugs.webkit.org/show_bug.cgi?id=160312
1185
1186         Reviewed by Darin Adler.
1187
1188         Update WebInspector accordingly.
1189
1190         * UserInterface/Models/NativeFunctionParameters.js:
1191
1192 2016-07-28  Matt Baker  <mattbaker@apple.com>
1193
1194         Web Inspector: Hiding a column which contains a TimelineRuler as the headerview, doesn't hide the headerView
1195         https://bugs.webkit.org/show_bug.cgi?id=160093
1196         <rdar://problem/27499300>
1197
1198         Reviewed by Joseph Pecoraro.
1199
1200         * UserInterface/Views/DataGrid.js:
1201         (WebInspector.DataGrid.prototype._positionHeaderViews):
1202         Remove early return so that a header view in a hidden column will have
1203         its width resized to zero, matching the column.
1204
1205 2016-07-28  Johan K. Jensen  <johan_jensen@apple.com>
1206
1207         Web Inspector: Waterfall view should be visible in Network tab and Network Timeline
1208         https://bugs.webkit.org/show_bug.cgi?id=160061
1209
1210         Reviewed by Joseph Pecoraro.
1211
1212         Adds a Timeline-column (waterfall) to the Network tab and Network Timeline.
1213
1214         * Localizations/en.lproj/localizedStrings.js:
1215         Add "Timeline" localized string.
1216
1217         * UserInterface/Views/NetworkGridContentView.js:
1218         (WebInspector.NetworkGridContentView):
1219         Add the Timeline-column with a TimelineRuler as the headerview,
1220         and properties for updating current time.
1221
1222         (WebInspector.NetworkGridContentView.prototype.get secondsPerPixel):
1223         (WebInspector.NetworkGridContentView.prototype.get startTime):
1224         (WebInspector.NetworkGridContentView.prototype.get currentTime):
1225         (WebInspector.NetworkGridContentView.prototype.get endTime):
1226         Acting as a graphDataSource used by TimelineDataGridNode.
1227
1228         (WebInspector.NetworkGridContentView.prototype.shown):
1229         (WebInspector.NetworkGridContentView.prototype.reset):
1230         (WebInspector.NetworkGridContentView.prototype.layout):
1231         Refresh graphs and update the TimelineRuler on layout changes.
1232
1233         (WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
1234         Add listeners for when resources are finished to stop the timer.
1235
1236         (WebInspector.NetworkGridContentView.prototype._update):
1237         (WebInspector.NetworkGridContentView.prototype._startUpdatingCurrentTime):
1238         (WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
1239         Adding a timer which updates the TimelineRuler and the layout
1240         if any non-finished requests are running.
1241
1242         * UserInterface/Views/NetworkTimelineView.js:
1243         (WebInspector.NetworkTimelineView):
1244         Add the Timeline-column with a TimelineRuler as the headerview.
1245
1246         (WebInspector.NetworkTimelineView.prototype.get secondsPerPixel):
1247         (WebInspector.NetworkTimelineView.prototype.layout):
1248         Refresh graphs on layout changes.
1249
1250         * UserInterface/Views/TimelineDataGrid.css:
1251         (.tree-outline.timeline-data-grid .item:hover .subtitle):
1252         (.data-grid.timeline th):
1253         (.data-grid.timeline th.graph-column > .timeline-ruler):
1254         (.data-grid.timeline td.graph-column):
1255         (.data-grid.timeline td.graph-column > .cell-content):
1256         (.data-grid.timeline td.graph-column .timeline-record-bar):
1257
1258 2016-07-28  Chris Dumez  <cdumez@apple.com>
1259
1260         Parameter to table.deleteRow() / body.deleteRow() should be mandatory
1261         https://bugs.webkit.org/show_bug.cgi?id=160307
1262
1263         Reviewed by Ryosuke Niwa.
1264
1265         Update WebInspector accordingly.
1266
1267         * UserInterface/Models/NativeFunctionParameters.js:
1268
1269 2016-07-28  Chris Dumez  <cdumez@apple.com>
1270
1271         2 first parameters to input.setSelectionRange() should be mandatory
1272         https://bugs.webkit.org/show_bug.cgi?id=160310
1273
1274         Reviewed by Alex Christensen.
1275
1276         Update WebInspector accordingly.
1277
1278         * UserInterface/Models/NativeFunctionParameters.js:
1279
1280 2016-07-28  Chris Dumez  <cdumez@apple.com>
1281
1282         Parameter to tr.deleteCell() should be mandatory
1283         https://bugs.webkit.org/show_bug.cgi?id=160308
1284
1285         Reviewed by Ryosuke Niwa.
1286
1287         Report tr.deleteCell() parameter as mandatory.
1288
1289         * UserInterface/Models/NativeFunctionParameters.js:
1290
1291 2016-07-27  Nikita Vasilyev  <nvasilyev@apple.com>
1292
1293         Web Inspector: Visual Styles Sidebar should have only one column when it's narrow
1294         https://bugs.webkit.org/show_bug.cgi?id=159905
1295         <rdar://problem/27413248>
1296
1297         Reviewed by Joseph Pecoraro.
1298
1299         Many CSS values often get clipped in the two colunm layout. Change the layout to one colunm
1300         when visual style rows get too narrow.
1301
1302         * UserInterface/Views/VisualStyleDetailsPanel.css:
1303         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row):
1304         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .metric-section-row):
1305         Wrap all rows except for position/padding/margin controls.
1306
1307         (.sidebar > .panel.details.css-style .visual > .details-section .details-section > .content .group > .row > .visual-style-property-container:not(.layout-reversed):last-child): Deleted.
1308         Margin between the first and the second column doesn't make sense one column layout.
1309         Set the margin in .visual-style-property-container instead.
1310
1311         * UserInterface/Views/VisualStyleDetailsPanel.js:
1312         (WebInspector.VisualStyleDetailsPanel.prototype._generateMetricSectionRows):
1313         * UserInterface/Views/VisualStylePropertyEditor.css:
1314         (.visual-style-property-container):
1315
1316 2016-07-27  Joseph Pecoraro  <pecoraro@apple.com>
1317
1318         [Mac] Web Inspector: CodeMirror-based editor bindings for Home and End don't match system behavior
1319         https://bugs.webkit.org/show_bug.cgi?id=160267
1320         <rdar://problem/27575553>
1321
1322         Reviewed by Brian Burg.
1323
1324         * UserInterface/Views/CodeMirrorEditor.js:
1325         (WebInspector.CodeMirrorEditor.create):
1326         (WebInspector.CodeMirrorEditor):
1327         Add some key map overrides for Home and End to better match system Mac
1328         behavior. This scrolls to the start or end of a document and does not
1329         change the cursor position.
1330
1331 2016-07-27  Brian Burg  <bburg@apple.com>
1332
1333         Regression(r203535): Uncaught Exception: TypeError: Not enough arguments at LayerTreeDataGridNode.js:47
1334         https://bugs.webkit.org/show_bug.cgi?id=160187
1335         <rdar://problem/27540435>
1336
1337         Reviewed by Eric Carlson.
1338
1339         After r203535, document.createTextNode() requires an argument.
1340
1341         * UserInterface/Views/LayerTreeDataGridNode.js:
1342         (WebInspector.LayerTreeDataGridNode.prototype.createCellContent):
1343         Since this use-site is for creating a cell in an unknown column,
1344         initialize it to '–'. Previously it would have been the string
1345         "undefined" or empty.
1346
1347 2016-07-24  Matt Baker  <mattbaker@apple.com>
1348
1349         Web Inspector: Filtering is broken in the Overview timeline view
1350         https://bugs.webkit.org/show_bug.cgi?id=160152
1351         <rdar://problem/27517481>
1352
1353         Reviewed by Joseph Pecoraro.
1354
1355         * UserInterface/Views/SourceCodeTimelineTimelineDataGridNode.js:
1356         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.filterableDataForColumn):
1357         Non-resource nodes should be filtered based on their display name.
1358
1359 2016-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
1360
1361         REGRESSION (r202876): Web Inspector: Switching away from Console tab with a lot of messages is slow
1362         https://bugs.webkit.org/show_bug.cgi?id=160112
1363
1364         Reviewed by Joseph Pecoraro.
1365
1366         Showing NavigationSidebar before removing previous TabContentView can be very slow when
1367         TabContentView is ConsoleTabContentView with a lot of messages. The order of operations
1368         (show sidebar, change content view, show sidebar) caused more forced layouts. This patch
1369         reduces the number of forced layouts by changes the order to: show content view, show sidebar,
1370         show sidebar.
1371
1372         * UserInterface/Views/TabBrowser.js:
1373         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
1374
1375 2016-07-20  Joseph Pecoraro  <pecoraro@apple.com>
1376
1377         Web Inspector: Pausing when Debugger tab is closed opens tab in wrong state
1378         https://bugs.webkit.org/show_bug.cgi?id=159946
1379         <rdar://problem/27429886>
1380
1381         Reviewed by Timothy Hatcher.
1382
1383         * UserInterface/Views/DebuggerSidebarPanel.js:
1384         (WebInspector.DebuggerSidebarPanel):
1385         At the end of construction, update the UI to match the current state
1386         of the world. Such as updating the UI if we are paused, or if the
1387         Timeline is capturing and we are temporarily disabling breakpoints.
1388
1389 2016-07-15  Timothy Hatcher  <timothy@apple.com>
1390
1391         Web Inspector: Make Open Quickly and Goto Line dialogs match Xcode 8
1392         https://bugs.webkit.org/show_bug.cgi?id=159823
1393         rdar://problem/27376501
1394
1395         Reviewed by Brian Burg.
1396
1397         * UserInterface/Views/GoToLineDialog.css:
1398         (.go-to-line-dialog):
1399         (.go-to-line-dialog > div > input):
1400         (.go-to-line-dialog > div > input::placeholder):
1401         (.go-to-line-dialog > div > img):
1402         (.go-to-line-dialog > div): Deleted.
1403         * UserInterface/Views/OpenResourceDialog.css:
1404         (.open-resource-dialog):
1405         (.open-resource-dialog > .field):
1406         (.open-resource-dialog > .field > input):
1407         (.open-resource-dialog > .field > input::placeholder):
1408         (.open-resource-dialog > .field > img):
1409         (.open-resource-dialog > .tree-outline .item): Deleted.
1410         (.open-resource-dialog > .tree-outline .item:first-child): Deleted.
1411
1412 2016-07-14  Joseph Pecoraro  <pecoraro@apple.com>
1413
1414         Web Inspector: Rename CCTNode to CallingContextTreeNode
1415         https://bugs.webkit.org/show_bug.cgi?id=159782
1416
1417         Reviewed by Timothy Hatcher.
1418
1419         * UserInterface/Models/CallingContextTree.js:
1420         * UserInterface/Models/CallingContextTreeNode.js:
1421         Extra to its own file and rename.
1422
1423         * UserInterface/Main.html:
1424         * UserInterface/Test.html:
1425         * UserInterface/TestStub.html:
1426         Include the new file.
1427
1428         * UserInterface/Views/ProfileDataGridNode.js:
1429         (WebInspector.ProfileDataGridNode):
1430         * UserInterface/Views/ProfileDataGridTree.js:
1431         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
1432         Rename shorthand "cctnode".
1433
1434 2016-07-14  Matt Baker  <mattbaker@apple.com>
1435
1436         Web Inspector: SidebarPanel classes should use View.layout instead of "refresh"
1437         https://bugs.webkit.org/show_bug.cgi?id=159745
1438         <rdar://problem/27335252>
1439
1440         Reviewed by Timothy Hatcher.
1441
1442         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
1443         (WebInspector.ApplicationCacheDetailsSidebarPanel.prototype.set applicationCacheFrame):
1444         Use needsLayout.
1445
1446         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
1447         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.layout):
1448         Move refresh logic to layout.
1449         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
1450         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._styleSheetAddedOrRemoved):
1451         Defer layout to coalesce updates.
1452         (WebInspector.CSSStyleDetailsSidebarPanel):
1453         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh): Deleted.
1454
1455         * UserInterface/Views/DOMDetailsSidebarPanel.js:
1456         (WebInspector.DOMDetailsSidebarPanel.prototype.set domNode):
1457         Use needsLayout.
1458
1459         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1460         Move refresh logic to layout.
1461
1462         * UserInterface/Views/DetailsSidebarPanel.js:
1463         (WebInspector.DetailsSidebarPanel.prototype.shown): Deleted.
1464         Base class already forces a layout when shown.
1465         (WebInspector.DetailsSidebarPanel.prototype.needsRefresh): Deleted.
1466         No longer needed.
1467         (WebInspector.DetailsSidebarPanel.prototype.refresh): Deleted.
1468         Renamed layout.
1469         (WebInspector.DetailsSidebarPanel): Deleted.
1470
1471         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1472         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.supportsDOMNode):
1473         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._layerTreeDidChange):
1474         Use needsLayout.
1475         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.shown):
1476         Base class already forces a layout when shown.
1477
1478         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
1479         (WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
1480         Use needsLayout.
1481
1482         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1483         (WebInspector.ScopeChainDetailsSidebarPanel):
1484         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.set callFrame):
1485         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpression):
1486         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._removeWatchExpression):
1487         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._clearAllWatchExpressions):
1488         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._refreshAllWatchExpressionsButtonClicked):
1489         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._didEvaluateExpression):
1490         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._mainResourceDidChange):
1491         Use needsLayout.
1492
1493 2016-07-14  Joseph Pecoraro  <pecoraro@apple.com>
1494
1495         Web Inspector: Maintain selected function when switching between different profile representations
1496         https://bugs.webkit.org/show_bug.cgi?id=159778
1497         <rdar://problem/27355913>
1498
1499         Reviewed by Timothy Hatcher.
1500
1501         * UserInterface/Models/CallingContextTree.js:
1502         (WebInspector.CCTNode):
1503         (WebInspector.CCTNode.prototype.get hash):
1504         (WebInspector.CCTNode.prototype.findOrMakeChild):
1505         (WebInspector.CCTNode.prototype.equals):
1506         Expose the hash so two nodes can be compared cheaply.
1507
1508         * UserInterface/Views/ProfileView.js:
1509         (WebInspector.ProfileView.prototype._repopulateDataGridFromTree):
1510         (WebInspector.ProfileView.prototype._restoreSharedState):
1511         (WebInspector.ProfileView.prototype._dataGridNodeSelected):
1512         Share data between multiple ProfileViews. Currently just remembering
1513         and restoring the selected function.
1514
1515         * UserInterface/Views/ScriptProfileTimelineView.js:
1516         (WebInspector.ScriptProfileTimelineView):
1517         (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
1518         Include the shared data when constructing new ProfileViews.
1519
1520 2016-07-13  Matt Baker  <mattbaker@apple.com>
1521
1522         Uncaught Exception: TypeError: null is not an object (evaluating 'this._contentViewContainer.currentContentView.showsFilterBar')
1523         https://bugs.webkit.org/show_bug.cgi?id=159696
1524         <rdar://problem/27312356>
1525
1526         Reviewed by Joseph Pecoraro.
1527
1528         * UserInterface/Views/TimelineRecordingContentView.js:
1529         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
1530         Early return if content view not visible, since the event is sent during
1531         tab teardown and the current TimelineView may be invalid.
1532
1533 2016-07-12  Joseph Pecoraro  <pecoraro@apple.com>
1534
1535         REGRESSION(r192789): Web Inspector: Log Value context menu appears twice
1536         https://bugs.webkit.org/show_bug.cgi?id=159681
1537         <rdar://problem/27304804>
1538
1539         Reviewed by Brian Burg.
1540
1541         In r192789 contextmenu events may bubble up so that multiple handlers
1542         may append ContextMenuItems. In nested ObjectTrees / ObjectPreviews
1543         this could result in duplicate items. Add a flag on the bubbling event
1544         so that we only include Object Tree context menu items for the deepest
1545         part of the Object Tree, but still allow bubbling up to the root.
1546
1547         * UserInterface/Views/ObjectPreviewView.js:
1548         (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
1549         (WebInspector.ObjectPreviewView):
1550         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1551         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
1552
1553 2016-07-12  Johan K. Jensen  <johan_jensen@apple.com>
1554
1555         Web Inspector: ER: Copy as cURL
1556         https://bugs.webkit.org/show_bug.cgi?id=159380
1557
1558         Reviewed by Joseph Pecoraro.
1559
1560         Inspired by https://chromium.googlesource.com/chromium/src/+/b7c1115dbae65030ad96e773d9a270465a05f5c4/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
1561
1562         This "Copy as cURL" feature only approximates the original request as only some parts of
1563         that request is known to the frontend.
1564
1565         * UserInterface/Models/Resource.js:
1566         (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix.escapeCharacter):
1567         (WebInspector.Resource.prototype.generateCURLCommand.escapeStringPosix):
1568         (WebInspector.Resource.prototype.generateCURLCommand):
1569         (WebInspector.Resource):
1570         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1571         (WebInspector.ResourceTimelineDataGridNode.prototype.appendContextMenuItems):
1572
1573 2016-07-12  Joseph Pecoraro  <pecoraro@apple.com>
1574
1575         Web Inspector: Use separate files for TreeOutline/TreeElement and DataGrid/DataGridNode
1576         https://bugs.webkit.org/show_bug.cgi?id=159659
1577
1578         Reviewed by Timothy Hatcher.
1579
1580         * UserInterface/Main.html:
1581         * UserInterface/Views/DataGrid.js:
1582         * UserInterface/Views/DataGridNode.js: Added.
1583         * UserInterface/Views/TreeElement.js: Added.
1584         * UserInterface/Views/TreeOutline.js:
1585         Extra the component classes to their own file.
1586
1587 2016-07-11  Joseph Pecoraro  <pecoraro@apple.com>
1588
1589         Web Inspector: ProfileView sometimes shows Top Functions data despite Top Functions being disabled
1590         https://bugs.webkit.org/show_bug.cgi?id=159660
1591         <rdar://problem/27291647>
1592
1593         Reviewed by Timothy Hatcher.
1594
1595         * UserInterface/Views/ScriptProfileTimelineView.js:
1596         (WebInspector.ScriptProfileTimelineView.prototype._profileOrientationButtonClicked):
1597         Pass the value of the setting, not the setting itself.
1598
1599 2016-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
1600
1601         Web Inspector: Transition and Animation sections in Visual Styles sidebar should have more spacing to their left
1602         https://bugs.webkit.org/show_bug.cgi?id=159633
1603         <rdar://problem/27281805>
1604
1605         Reviewed by Timothy Hatcher.
1606
1607         * UserInterface/Views/VisualStyleDetailsPanel.css:
1608         (.visual-style-property-container.animation):
1609
1610 2016-07-08  Nikita Vasilyev  <nvasilyev@apple.com>
1611
1612         Web Inspector: Command-Shift-S in the Styles sidebar should always show the save dialog
1613         https://bugs.webkit.org/show_bug.cgi?id=156858
1614         <rdar://problem/25859098>
1615
1616         Reviewed by Timothy Hatcher.
1617
1618         * UserInterface/Views/CSSStyleDeclarationSection.js:
1619         (WebInspector.CSSStyleDeclarationSection):
1620
1621 2016-07-07  Joseph Pecoraro  <pecoraro@apple.com>
1622
1623         Web Inspector, regression: JS/JSON pretty-printing sporadically broken in STP8
1624         https://bugs.webkit.org/show_bug.cgi?id=159511
1625         <rdar://problem/27218435>
1626
1627         Reviewed by Timothy Hatcher.
1628
1629         * UserInterface/Workers/Formatter/FormatterWorker.js:
1630         (FormatterWorker.prototype.formatJavaScript):
1631         Attempt to format invalid JSON that can be evaluated to an object.
1632
1633 2016-07-07  Timothy Hatcher  <timothy@apple.com>
1634
1635         Web Inspector: scrolled Snapshot list is reset to top and drawn blank after switching back from Snapshot Comparison view
1636         https://bugs.webkit.org/show_bug.cgi?id=158218
1637         rdar://problem/26545000
1638
1639         Reviewed by Brian Burg.
1640
1641         * UserInterface/Views/ClusterContentView.js:
1642         (WebInspector.ClusterContentView.prototype.get scrollableElements): Added.
1643         A default implementation for all cluster views.
1644
1645         * UserInterface/Views/DOMStorageContentView.js:
1646         (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Deleted.
1647         This was duplicated in the class, removed one.
1648
1649         * UserInterface/Views/HeapAllocationsTimelineView.js:
1650         (WebInspector.HeapAllocationsTimelineView): Initialize _snapshotListScrollTop.
1651         (WebInspector.HeapAllocationsTimelineView.prototype.get scrollableElements): Added. Return elements
1652         based on what is showing.
1653
1654         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList): Restore the scroll position
1655         of the DataGrid after it is added to the view.
1656
1657         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord): Save the scroll position
1658         of the DataGrid before it is removed from the view.
1659
1660         * UserInterface/Views/ScriptClusterTimelineView.js:
1661         (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Deleted. Handled by the base class now.
1662
1663 2016-07-06  Timothy Hatcher  <timothy@apple.com>
1664
1665         Web Inspector: REGRESSION: Hitting ⌘T in Web Inspector no longer opens in new tab in Safari
1666         https://bugs.webkit.org/show_bug.cgi?id=159487
1667         rdar://problem/27188047
1668
1669         Change Command-T to Command-Option-T to open a new tab.
1670
1671         I also changed Command-1, etc. to Command-Option-1, etc. to switch tabs. The number commands
1672         conflicted similarly with Safari and didn't work for me as a Web Inspector shortcut at all.
1673         We can't use Command-Shift because of Command-Shift-3 and Command-Shift-4 for screenshots.
1674
1675         Reviewed by Joseph Pecoraro.
1676
1677         * UserInterface/Base/Main.js:
1678         (WebInspector.contentLoaded):
1679
1680 2016-07-06  Joseph Pecoraro  <pecoraro@apple.com>
1681
1682         Web Inspector: sometimes reloading a page with main resource selected will show an empty content view
1683         https://bugs.webkit.org/show_bug.cgi?id=158069
1684         <rdar://problem/26516710>
1685
1686         Reviewed by Timothy Hatcher.
1687
1688         * UserInterface/Views/DebuggerSidebarPanel.js:
1689         (WebInspector.DebuggerSidebarPanel.prototype.showDefaultContentView):
1690         Continue until we get one that works.
1691
1692         * UserInterface/Views/NavigationSidebarPanel.js:
1693         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
1694         Avoid showing a content view for a background tab if it could steal
1695         the content view from a foreground tab. This is a targeted fix for
1696         reload + tab content view loading behavior. A more general fix would
1697         be reducing the work done by non-foreground tabs.
1698
1699         * UserInterface/Views/TabBrowser.js:
1700         (WebInspector.TabBrowser.prototype._tabBarItemSelected):
1701         Update navigation sidebar first so it is set when showing the TabContentView.
1702
1703 2016-07-06  Brian Burg  <bburg@apple.com>
1704
1705         Web Inspector: Uncaught Exception reporter should include the currently dispatching protocol event or request/response if applicable
1706         https://bugs.webkit.org/show_bug.cgi?id=159320
1707         <rdar://problem/27117754>
1708
1709         Reviewed by Timothy Hatcher and Joseph Pecoraro.
1710
1711         Keep track of the currently dispatched protocol response or protocol event and make
1712         them available to the uncaught exception reporter. If an internal exception is reported
1713         while dispatching an event or response, dump the protocol message(s) into the pre-filled
1714         bug report.
1715
1716         * UserInterface/Debug/UncaughtExceptionReporter.js:
1717         (stringifyAndTruncateObject): Added.
1718         Rearrange the code that generates the pre-filled report so it's easier to add optional sections.
1719
1720         * UserInterface/Protocol/InspectorBackend.js:
1721         (InspectorBackendClass):
1722         (InspectorBackendClass.prototype.get currentDispatchState): Expose the dispatching state.
1723         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
1724         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
1725         Store the originating command request with the pendingResponse data so that we can examine
1726         the originating request if the response causes an error. This will cause request message objects
1727         to be garbage-collected after their responses are dispatched rather than when the request is sent.
1728         But, I don't forsee this being a performance problem since we should always get a command response
1729         and pending command responses do not typically accumulate except when the inspector first loads.
1730
1731         (InspectorBackendClass.prototype._dispatchResponse): Save the response being dispatched.
1732         (InspectorBackendClass.prototype._dispatchResponseToCallback): Simplify exception reporting.
1733         (InspectorBackendClass.prototype._dispatchEvent): Save the event being dispatched.
1734
1735 2016-07-05  Timothy Hatcher  <timothy@apple.com>
1736
1737         Web Inspector: Switch last uses of -webkit-linear-gradient() to linear-gradient()
1738         https://bugs.webkit.org/show_bug.cgi?id=159438
1739         rdar://problem/27183417
1740
1741         Reviewed by Joseph Pecoraro.
1742
1743         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.css:
1744         (.timeline-overview-graph.rendering-frame > .frame-marker):
1745         (body.window-inactive .timeline-overview-graph.rendering-frame > .frame-marker):
1746         * UserInterface/Views/TimelineRecordFrame.css:
1747         (.timeline-record-frame.tall):
1748         (.timeline-record-frame.selected):
1749         (body.window-inactive .timeline-record-frame.selected):
1750
1751 2016-07-05  Timothy Hatcher  <timothy@apple.com>
1752
1753         Web Inspector: Drop -webkit-calc() in completions and a single use
1754         https://bugs.webkit.org/show_bug.cgi?id=159435
1755         rdar://problem/27179340
1756
1757         Reviewed by Dean Jackson.
1758
1759         * UserInterface/Models/CSSKeywordCompletions.js:
1760         * UserInterface/Views/VisualStylePropertyEditorLink.css:
1761         (.visual-style-property-editor-link > .visual-style-property-editor-link-border):
1762
1763 2016-07-05  Timothy Hatcher  <timothy@apple.com>
1764
1765         Web Inspector: Drop the prefix from -webkit-image-set()
1766         https://bugs.webkit.org/show_bug.cgi?id=159433
1767         rdar://problem/27178887
1768
1769         Reviewed by Dean Jackson.
1770
1771         * UserInterface/Models/CSSKeywordCompletions.js:
1772         * UserInterface/Views/ApplicationCacheIcons.css:
1773         (.application-cache-manifest .icon):
1774         (.application-cache-frame .icon):
1775         * UserInterface/Views/CookieIcon.css:
1776         (.cookie-icon .icon):
1777         * UserInterface/Views/DOMStorageIcons.css:
1778         (.local-storage-icon .icon):
1779         (.session-storage-icon .icon):
1780         * UserInterface/Views/DatabaseIcon.css:
1781         (.database-icon .icon):
1782         * UserInterface/Views/DatabaseTableIcon.css:
1783         (.database-table-icon .icon):
1784         * UserInterface/Views/FolderIcon.css:
1785         (.folder-icon .icon):
1786         * UserInterface/Views/GradientSlider.css:
1787         (.gradient-slider-knob):
1788         (.gradient-slider-knob.selected):
1789         * UserInterface/Views/HoverMenu.css:
1790         (.hover-menu > img):
1791         * UserInterface/Views/ResourceIcons.css:
1792         (.resource-icon .icon):
1793         (.resource-icon.resource-type-document .icon):
1794         (.resource-icon.resource-type-image .icon):
1795         (.resource-icon.resource-type-font .icon):
1796         (.resource-icon.resource-type-stylesheet .icon):
1797         (.resource-icon.resource-type-script .icon):
1798         (.anonymous-script-icon .icon):
1799         (.source-map-resource.resource-icon .icon):
1800         (.source-map-resource.resource-icon.resource-type-stylesheet .icon):
1801         (.source-map-resource.resource-icon.resource-type-script .icon):
1802         (.large .resource-icon .icon):
1803         (.large .resource-icon.resource-type-document .icon):
1804         (.large .resource-icon.resource-type-image .icon):
1805         (.large .resource-icon.resource-type-font .icon):
1806         (.large .resource-icon.resource-type-stylesheet .icon):
1807         (.large .resource-icon.resource-type-script .icon):
1808         (.large .anonymous-script-icon .icon):
1809         (.large .source-map-resource.resource-icon .icon):
1810         (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon):
1811         (.large .source-map-resource.resource-icon.resource-type-script .icon):
1812         * UserInterface/Views/Slider.css:
1813         (.slider > img):
1814         (.slider > img.dragging):
1815         * UserInterface/Views/SourceCodeTextEditor.css:
1816         (.hover-menu.color > img):
1817         * UserInterface/Views/TextEditor.css:
1818         (.text-editor > .CodeMirror .has-breakpoint .CodeMirror-linenumber::before):
1819         (.text-editor > .CodeMirror .breakpoint-resolved .CodeMirror-linenumber::before):
1820         (.text-editor > .CodeMirror .execution-line .CodeMirror-linenumber::after):
1821         * UserInterface/Views/TimelineIcons.css:
1822         (body:not(.mac-platform, .windows-platform) .network-icon .icon):
1823         (body:not(.mac-platform, .windows-platform) .network-icon.large .icon):
1824         (body:not(.mac-platform, .windows-platform) .layout-icon .icon):
1825         (body:not(.mac-platform, .windows-platform) .layout-icon.large .icon):
1826         (body:not(.mac-platform, .windows-platform) .script-icon .icon):
1827         (body:not(.mac-platform, .windows-platform) .script-icon.large .icon):
1828         (body:not(.mac-platform, .windows-platform) .rendering-frame-icon .icon):
1829         (body:not(.mac-platform, .windows-platform) .memory-icon .icon):
1830         (body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
1831         (body:not(.mac-platform, .windows-platform) .stopwatch-icon .icon):
1832
1833 2016-07-02  Joseph Pecoraro  <pecoraro@apple.com>
1834
1835         Web Inspector: CallFrame console.assert seen in tests (sourceCodeLocation instanceof SourceCodeLocation)
1836         https://bugs.webkit.org/show_bug.cgi?id=159368
1837
1838         Reviewed by Timothy Hatcher.
1839
1840         * UserInterface/Test.html:
1841         SourceCodeLocation was already included earlier. This redefines it and
1842         thereby breaks some things.
1843
1844 2016-07-02  Joseph Pecoraro  <pecoraro@apple.com>
1845
1846         inspector/debugger/command-line-api-exception.html flakily times out on mac
1847         https://bugs.webkit.org/show_bug.cgi?id=152029
1848         <rdar://problem/23813812>
1849
1850         Reviewed by Timothy Hatcher.
1851
1852         * UserInterface/Base/Object.js:
1853         (WebInspector.Object.addEventListener):
1854         Return the listener, this makes it cleaner to write tests.
1855
1856 2016-07-01  Joseph Pecoraro  <pecoraro@apple.com>
1857
1858         Web Inspector: Make enabling protocol logging in inspector tests easy to remember
1859         https://bugs.webkit.org/show_bug.cgi?id=159323
1860
1861         Reviewed by Brian Burg.
1862
1863         Now you just need to type InspectorTest.debug() or
1864         ProtocolTest.debug() and it will include stderr logging.
1865
1866         * UserInterface/Test/FrontendTestHarness.js:
1867         (FrontendTestHarness.prototype.debug):
1868         * UserInterface/Test/ProtocolTestHarness.js:
1869         (ProtocolTestHarness.prototype.debug):
1870         (ProtocolTestHarness):
1871         * UserInterface/Test/TestHarness.js:
1872         (TestHarness.prototype.debug):
1873
1874 2016-06-30  Matt Baker  <mattbaker@apple.com>
1875
1876         Unreviewed build fix.
1877
1878         * Localizations/en.lproj/localizedStrings.js:
1879         Add "Area" localized string.
1880
1881 2016-06-30  Joseph Pecoraro  <pecoraro@apple.com>
1882
1883         Web Inspector: Wrong function name next to scope
1884         https://bugs.webkit.org/show_bug.cgi?id=158210
1885         <rdar://problem/26543093>
1886
1887         Reviewed by Timothy Hatcher.
1888
1889         * UserInterface/Controllers/DebuggerManager.js:
1890         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1891         Include new payload data in the construction call.
1892         All the new data is optional, so we gracefully handle
1893         legacy backends.
1894
1895         * UserInterface/Models/ScopeChainNode.js:
1896         (WebInspector.ScopeChainNode):
1897         (WebInspector.ScopeChainNode.prototype.get type):
1898         (WebInspector.ScopeChainNode.prototype.get objects):
1899         (WebInspector.ScopeChainNode.prototype.get name):
1900         (WebInspector.ScopeChainNode.prototype.get location):
1901         (WebInspector.ScopeChainNode.prototype.get hash):
1902         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
1903
1904         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
1905         Make this an action you take on a scope, to avoid having to
1906         do it at construction time, or making it a generic setting.
1907
1908         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1909         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1910         This was wrong before. Move the work to CallFrame
1911         and change it to be correct.
1912
1913         * UserInterface/CallFrame.js:
1914         (WebInspector.CallFrame.prototype.mergedScopeChain):
1915
1916         This transforms the scope chain for a call frame from:
1917         
1918              scope1  scope2  scope3  scope4  scope5  scope6  scope7
1919               foo     foo     foo     bar     bar      -       -
1920              Block  Closure Closure Closure Closure   GLE     GBL
1921
1922         To:
1923              scope1  scope2&3   scope4&5  scope6  scope7
1924               foo      foo*       bar*      -       -
1925              Block    Local     Closure    GLE     GBL
1926
1927         Doing a few things:
1928
1929             - Merge the first two Closure scopes sharing a location.
1930               These are the "var" and "let" Closure scopes in a function,
1931               and it is better to present these together in the UI.
1932
1933             - Mark the first Closure scope within a function (*). When
1934               this is displayed in the UI, we can provide the name of
1935               the function: "Closure Scope (name)", and we even have
1936               location information that we can use to display a goto
1937               arrow if needed.
1938
1939             - Make the first Closure scope the Local scope if it
1940               matches the Call Frame's function name. This lets us
1941               display the section as "Local Variables".
1942
1943 2016-06-30  Matt Baker  <mattbaker@apple.com>
1944
1945         Web Inspector: add pixel area column to layout timeline view
1946         https://bugs.webkit.org/show_bug.cgi?id=148677
1947         <rdar://problem/22518762>
1948
1949         Reviewed by Timothy Hatcher.
1950
1951         The view can simply add the column. LayoutTimelineDataGridNode
1952         already includes area data and cell formatting.
1953
1954         * UserInterface/Views/LayoutTimelineView.js:
1955         (WebInspector.LayoutTimelineView):
1956
1957 2016-06-30  Brian Burg  <bburg@apple.com>
1958
1959         Web Inspector: the last normal tab cannot be closed with "Close Tab" context menu item
1960         https://bugs.webkit.org/show_bug.cgi?id=159317
1961         <rdar://problem/27042491>
1962
1963         Reviewed by Timothy Hatcher.
1964
1965         * UserInterface/Views/TabBarItem.js:
1966         (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
1967         (WebInspector.TabBarItem): fix the expression that controls whether the item is disabled.
1968
1969 2016-06-30  Nikita Vasilyev  <nvasilyev@apple.com>
1970
1971         Web Inspector: Add "spring" to transition-timing-function value autocompletion
1972         https://bugs.webkit.org/show_bug.cgi?id=159313
1973         <rdar://problem/27114269>
1974
1975         Reviewed by Timothy Hatcher.
1976
1977         * UserInterface/Models/CSSKeywordCompletions.js:
1978
1979 2016-06-30  Commit Queue  <commit-queue@webkit.org>
1980
1981         Unreviewed, rolling out r202659.
1982         https://bugs.webkit.org/show_bug.cgi?id=159305
1983
1984         The test for this change times out on mac-wk2 debug and caused
1985         an existing test to crash. (Requested by ryanhaddad on
1986         #webkit).
1987
1988         Reverted changeset:
1989
1990         "Web Inspector: Wrong function name next to scope"
1991         https://bugs.webkit.org/show_bug.cgi?id=158210
1992         http://trac.webkit.org/changeset/202659
1993
1994 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
1995
1996         Web Inspector: Wrong function name next to scope
1997         https://bugs.webkit.org/show_bug.cgi?id=158210
1998         <rdar://problem/26543093>
1999
2000         Reviewed by Brian Burg.
2001
2002         * UserInterface/Controllers/DebuggerManager.js:
2003         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
2004         Include new payload data in the construction call.
2005         All the new data is optional, so we gracefully handle
2006         legacy backends.
2007
2008         * UserInterface/Models/ScopeChainNode.js:
2009         (WebInspector.ScopeChainNode):
2010         (WebInspector.ScopeChainNode.prototype.get type):
2011         (WebInspector.ScopeChainNode.prototype.get objects):
2012         (WebInspector.ScopeChainNode.prototype.get name):
2013         (WebInspector.ScopeChainNode.prototype.get location):
2014         (WebInspector.ScopeChainNode.prototype.get hash):
2015         Hash is a rough (name:sourceId:line:column) string for quick comparisons.
2016
2017         (WebInspector.ScopeChainNode.prototype.makeLocalScope):
2018         Make this an action you take on a scope, to avoid having to
2019         do it at construction time, or making it a generic setting.
2020
2021         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2022         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
2023         This was wrong before. Move the work to CallFrame
2024         and change it to be correct.
2025
2026         * UserInterface/CallFrame.js:
2027         (WebInspector.CallFrame.prototype.mergedScopeChain):
2028
2029         This transforms the scope chain for a call frame from:
2030         
2031              scope1  scope2  scope3  scope4  scope5  scope6  scope7
2032               foo     foo     foo     bar     bar      -       -
2033              Block  Closure Closure Closure Closure   GLE     GBL
2034
2035         To:
2036              scope1  scope2&3   scope4&5  scope6  scope7
2037               foo      foo*       bar*      -       -
2038              Block    Local     Closure    GLE     GBL
2039
2040         Doing a few things:
2041
2042             - Merge the first two Closure scopes sharing a location.
2043               These are the "var" and "let" Closure scopes in a function,
2044               and it is better to present these together in the UI.
2045
2046             - Mark the first Closure scope within a function (*). When
2047               this is displayed in the UI, we can provide the name of
2048               the function: "Closure Scope (name)", and we even have
2049               location information that we can use to display a goto
2050               arrow if needed.
2051
2052             - Make the first Closure scope the Local scope if it
2053               matches the Call Frame's function name. This lets us
2054               display the section as "Local Variables".
2055
2056 2016-06-29  Brian Burg  <bburg@apple.com>
2057
2058         Web Inspector: Uncaught Exception page never shows if exception is thrown while processing a protocol event
2059         https://bugs.webkit.org/show_bug.cgi?id=159182
2060
2061         Reviewed by Joseph Pecoraro.
2062
2063         Since we catch exceptions raised during the handling of protocol responses and events, there
2064         is no way for these exceptions to trigger the global exception handler that shows the Uncaught
2065         Exception Reporter sheet. We should show these in the sheet because it makes them get fixed faster.
2066
2067         Add a new entry point, WebInspector.reportInternalError, that takes an error or string and
2068         a free-form map of strings to strings for storing additional information such as message data.
2069         Pass the error and any other relevant details to this entry point, which decides whether to
2070         show the uncaught exception reporter or quietly log the error to Inspector^2 console.
2071
2072         In future patches, I would like to do the following once the common errors are fixed:
2073          - enable reporting via Uncaught Exception Reporter for all engineering builds
2074          - move internal console.error call sites to use WebInspector.reportInternalError
2075
2076         * UserInterface/Base/Main.js: Add reportInternalError, which redirects to the uncaught
2077         exception reporter sheet or does console.error. It also adds a console.assert that could
2078         cause the debugger to pause if desired.
2079
2080         * UserInterface/Debug/UncaughtExceptionReporter.css:
2081         (.sheet-container): Make the report scrollable now that we could potentially show a lot of text.
2082
2083         * UserInterface/Debug/UncaughtExceptionReporter.js:
2084         (handleError): Also pass along the 'details' poperty.
2085         (formattedEntry): Refactor the code so it additionally prints out the keys and values of
2086         the 'details' property. It does not do any coercions, so callers must convert values to strings.
2087
2088         * UserInterface/Protocol/InspectorBackend.js:
2089         (InspectorBackendClass.prototype._dispatchResponse): Inlined a function.
2090         (InspectorBackendClass.prototype._dispatchResponseToCallback):
2091         (InspectorBackendClass.prototype._dispatchEvent):
2092         Report uncaught exceptions via WebInspector.reportInternalError.
2093
2094         (InspectorBackendClass.prototype._reportProtocolError): Deleted, inlined into the single use site.
2095
2096 2016-06-29  Joseph Pecoraro  <pecoraro@apple.com>
2097
2098         Web Inspector: Show Shadow Root type in DOM Tree
2099         https://bugs.webkit.org/show_bug.cgi?id=159236
2100         <rdar://problem/27068521>
2101
2102         Reviewed by Timothy Hatcher.
2103
2104         * Localizations/en.lproj/localizedStrings.js:
2105         "Shadow Content (type)" string.
2106
2107         * UserInterface/Models/DOMNode.js:
2108         (WebInspector.DOMNode):
2109         (WebInspector.DOMNode.prototype.shadowRoots):
2110         (WebInspector.DOMNode.prototype.shadowRootType):
2111         Initialize state and add accessors.
2112
2113         * UserInterface/Views/DOMTreeElement.js:
2114         (WebInspector.DOMTreeElement.shadowRootTypeDisplayName):
2115         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
2116         Better string when an element is a Shadow Root.
2117
2118         * UserInterface/Views/DOMTreeElementPathComponent.js:
2119         (WebInspector.DOMTreeElementPathComponent):
2120         Better to check the Shadow Root type.
2121
2122         * UserInterface/Views/DOMTreeOutline.css:
2123         (.tree-outline.dom .html-fragment.shadow):
2124         Opacity looks poor when there is a selection. Switch to gray.
2125
2126 2016-06-28  Nikita Vasilyev  <nvasilyev@apple.com>
2127
2128         REGRESSION (r188730): Web Inspector: Warning icons incorrectly positioned in CSS Rules sidebar
2129         https://bugs.webkit.org/show_bug.cgi?id=157869
2130         <rdar://problem/26356520>
2131
2132         Reviewed by Timothy Hatcher.
2133
2134         Before r188730, CSS text always had a line break as a prefix. r188730 started trimming text.
2135         This patch keeps trimming unnecessary whitespace but brings back required line break prefix.
2136
2137         * UserInterface/Models/CSSStyleDeclaration.js:
2138         (WebInspector.CSSStyleDeclaration.prototype.set text):
2139         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2140         Make PrefixWhitespace and SuffixWhitespace public.
2141
2142         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContent):
2143         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
2144         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
2145         Remove an if conditional as it's always true.
2146
2147 2016-06-28  Brian Burg  <bburg@apple.com>
2148
2149         Web Inspector: QuickConsole should update its selection when RuntimeManager.defaultExecutionContextIdentifier changes
2150         https://bugs.webkit.org/show_bug.cgi?id=159183
2151
2152         Reviewed by Timothy Hatcher.
2153
2154         Currently, the UI listens for state changes in the Frame tree to decide when to reset
2155         the selected execution context back to its default value. This is no good, because this
2156         should happen even if we have no UI (i.e., testing models only). The UI should simply
2157         display changes to the model rather than driving them based on other model changes.
2158
2159         Move the logic to reset the execution context into RuntimeManager. When the selected
2160         context changes, an event is fired which causes the QuickConsole to rebuild its path components.
2161
2162         * UserInterface/Controllers/RuntimeManager.js:
2163         (WebInspector.RuntimeManager):
2164         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
2165         Fire an event when the execution context actually changes.
2166
2167         (WebInspector.RuntimeManager.prototype._frameExecutionContextsCleared):
2168         Added. If the selected context was cleared, reset back to default.
2169
2170         * UserInterface/Models/Frame.js:
2171         (WebInspector.Frame.prototype.clearExecutionContexts):
2172         Include the contexts that were cleared so clients can match against them.
2173
2174         * UserInterface/Views/QuickConsole.js:
2175         (WebInspector.QuickConsole):
2176         Use the proper constant name. Both the old and new names evaluated to `undefined`.
2177         No need to keep track of the selected path component, it will always match the
2178         defaultExecutionContextIdentifier in RuntimeManager.
2179
2180         (WebInspector.QuickConsole.prototype.get selectedExecutionContextIdentifier):
2181         (WebInspector.QuickConsole.prototype.set selectedExecutionContextIdentifier):
2182         Forward to RuntimeManager. This name is less awkward for the UI code that manages selections.
2183
2184         (WebInspector.QuickConsole.prototype._executionContextPathComponentsToDisplay):
2185         Special-case for the main frame execution context.
2186
2187         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
2188         Remove indirection.
2189
2190         (WebInspector.QuickConsole.prototype._frameExecutionContextsCleared):
2191         Fix the guard to handle undefined execution contexts in the case where it represents the main frame (undefined).
2192
2193         (WebInspector.QuickConsole.prototype._defaultExecutionContextChanged):
2194         Rebuild when the model changes.
2195
2196         (WebInspector.QuickConsole.prototype._pathComponentSelected): Simplify.
2197         (WebInspector.QuickConsole.prototype.get executionContextIdentifier):
2198         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
2199         Move the fallback selection behavior into RuntimeManager.
2200
2201         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame): Deleted.
2202         This has been dead code ever since we removed iOS 6 legacy support.
2203
2204 2016-06-27  Joseph Pecoraro  <pecoraro@apple.com>
2205
2206         Web Inspector: When modifying sessionStorage, localStorage gets updated
2207         https://bugs.webkit.org/show_bug.cgi?id=159181
2208         <rdar://problem/27043447>
2209
2210         Reviewed by Timothy Hatcher.
2211
2212         * UserInterface/Test/Test.js:
2213         (WebInspector.loaded):
2214         Add registration for StorageManager and StorageObserver.
2215
2216 2016-06-27  Brian Burg  <bburg@apple.com>
2217
2218         Web Inspector: RuntimeManager should not use view object WebInspector.quickConsole
2219         https://bugs.webkit.org/show_bug.cgi?id=128092
2220         <rdar://problem/15966526>
2221
2222         Reviewed by Timothy Hatcher.
2223
2224         This is a layering violation which makes it harder to use RuntimeManager.evaluateInInspectedWindow
2225         from a testing context where the QuickConsole view does not exist.
2226
2227         Store the selected execution context identifier on RuntimeManager and use it
2228         when doing subsequent evaluations that act on the currently selected frame.
2229
2230         * UserInterface/Controllers/RuntimeManager.js:
2231         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
2232         (WebInspector.RuntimeManager.prototype.saveResult):
2233         Use local state.
2234
2235         (WebInspector.RuntimeManager.prototype.get defaultExecutionContextIdentifier):
2236         (WebInspector.RuntimeManager.prototype.set defaultExecutionContextIdentifier):
2237         Added.
2238
2239         (WebInspector.RuntimeManager):
2240         * UserInterface/Models/ExecutionContext.js:
2241         (WebInspector.ExecutionContext):
2242         Move the symbolic name for the top level execution context to RuntimeManager.
2243
2244         * UserInterface/Test/Test.js:
2245         (WebInspector.loaded): No need to stub out WebInspector.QuickConsole any more.
2246
2247         * UserInterface/Views/QuickConsole.js:
2248         (WebInspector.QuickConsole.prototype._framePageExecutionContextsChanged):
2249         (WebInspector.QuickConsole.prototype._removeExecutionContextPathComponentForFrame):
2250         (WebInspector.QuickConsole.prototype._updateExecutionContextPathComponentForFrame):
2251         (WebInspector.QuickConsole.prototype._pathComponentSelected):
2252         For now, set RuntimeManager's selected execution context whenever we set the
2253         selected path component. In a future patch, we should invert the dependency and have
2254         the selected component change whenever RuntimeManager.defaultExecutionContext changes.
2255
2256 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
2257
2258         Web Inspector: first heap snapshot taken when a page is reloaded happens before the reload navigation
2259         https://bugs.webkit.org/show_bug.cgi?id=158995
2260         <rdar://problem/26923778>
2261
2262         Reviewed by Brian Burg.
2263
2264         Let instruments decide to do work or not based on programmatic
2265         (backend initiated) starts and stop.
2266
2267         Programmatic start can happen due to Auto Capture or console.profile.
2268         Programmatic stop can happen due to console.profileEnd.
2269
2270         For example, this allows the frontend to avoid sending agents start/stop
2271         messages when the backend would have already started/stopped the agents.
2272
2273         * UserInterface/Controllers/TimelineManager.js:
2274         (WebInspector.TimelineManager):
2275         (WebInspector.TimelineManager.prototype.startCapturing):
2276         (WebInspector.TimelineManager.prototype.capturingStopped):
2277         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
2278         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
2279         Call Recording.start/stop with a programmatic flag so the frontend
2280         instruments can perform a more informed start/stop.
2281
2282         * UserInterface/Models/TimelineRecording.js:
2283         (WebInspector.TimelineRecording.prototype.start):
2284         (WebInspector.TimelineRecording.prototype.stop):
2285         Let the instruments decide to do work based on the start/stop
2286         being initiated by the backend or not.
2287
2288         * UserInterface/Models/HeapAllocationsInstrument.js:
2289         (WebInspector.HeapAllocationsInstrument.prototype.startInstrumentation):
2290         (WebInspector.HeapAllocationsInstrument.prototype.stopInstrumentation):
2291         * UserInterface/Models/Instrument.js:
2292         (WebInspector.Instrument.startLegacyTimelineAgent):
2293         (WebInspector.Instrument.prototype.startInstrumentation):
2294         (WebInspector.Instrument.prototype.stopInstrumentation):
2295         (WebInspector.Instrument):
2296         * UserInterface/Models/MemoryInstrument.js:
2297         (WebInspector.MemoryInstrument.prototype.startInstrumentation):
2298         (WebInspector.MemoryInstrument.prototype.stopInstrumentation):
2299         (WebInspector.MemoryInstrument):
2300         * UserInterface/Models/NetworkInstrument.js:
2301         * UserInterface/Models/ScriptInstrument.js:
2302         (WebInspector.ScriptInstrument.prototype.startInstrumentation):
2303         (WebInspector.ScriptInstrument.prototype.stopInstrumentation):
2304         (WebInspector.ScriptInstrument):
2305         Avoid sending start/stop tracking messages when programmatic.
2306         This still allows the instruments to do their own frontend tracking,
2307         such as the Heap agent triggering periodic snapshots.
2308
2309 2016-06-23  Joseph Pecoraro  <pecoraro@apple.com>
2310
2311         Web Inspector: Snapshots should be cleared at some point
2312         https://bugs.webkit.org/show_bug.cgi?id=157907
2313         <rdar://problem/26373610>
2314
2315         Reviewed by Timothy Hatcher.
2316
2317         Invalidate HeapSnapshotProxy objects when the page navigates.
2318         This allows us to clear our frontend data for the snapshots.
2319         When a snapshot is invalidated, it is disabled in the UI.
2320         This means you cannot select the snapshot or see content
2321         views for the snapshot. If you are in a snapshot when it is
2322         invalidated, you are taken out to the snapshot list.
2323
2324         * UserInterface/Main.html:
2325         New files.
2326
2327         * UserInterface/Proxies/HeapSnapshotProxy.js:
2328         (WebInspector.HeapSnapshotProxy):
2329         (WebInspector.HeapSnapshotProxy.invalidateSnapshotProxies):
2330         (WebInspector.HeapSnapshotProxy.prototype.get invalid):
2331         (WebInspector.HeapSnapshotProxy.prototype._invalidate):
2332         Keep track of valid snapshots, and provide a static method to invalidate them.
2333
2334         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
2335         (WebInspector.HeapSnapshotProxy.prototype.allocationBucketCounts):
2336         (WebInspector.HeapSnapshotProxy.prototype.instancesWithClassName):
2337         (WebInspector.HeapSnapshotProxy.prototype.update):
2338         (WebInspector.HeapSnapshotProxy.prototype.nodeWithIdentifier):
2339         UI should only act on valid snapshots.
2340
2341         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
2342         (WebInspector.HeapSnapshotDiffProxy.prototype.get invalid):
2343         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
2344         (WebInspector.HeapSnapshotDiffProxy.prototype.allocationBucketCounts):
2345         (WebInspector.HeapSnapshotDiffProxy.prototype.instancesWithClassName):
2346         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
2347         (WebInspector.HeapSnapshotDiffProxy.prototype.nodeWithIdentifier):
2348         UI should only act on valid snapshots.
2349
2350         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
2351         (WebInspector.HeapSnapshotWorkerProxy.prototype._mainResourceDidChange):
2352         Invalidate and discard snapshots when the main frame navigates.
2353
2354         (WebInspector.HeapSnapshotWorkerProxy.prototype._handleMessage):
2355         (WebInspector.HeapSnapshotWorkerProxy):
2356         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
2357         (HeapSnapshotWorker.prototype.clearSnapshots):
2358         (HeapSnapshotWorker.prototype._handleMessage):
2359         (HeapSnapshotWorker):
2360         A message may come in for a snapshot before it has been cleared.
2361         If that is the case, the object may not exist. Return an error so
2362         that the callback can be deleted on the calling side.
2363
2364         * UserInterface/Views/HeapAllocationsTimelineDataGridNodePathComponent.js:
2365         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get previousSibling):
2366         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent.prototype.get nextSibling):
2367         (WebInspector.HeapAllocationsTimelineDataGridNodePathComponent):
2368         Don't show invalid snapshots in page component picker.
2369
2370         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
2371         (.timeline-overview-graph.heap-allocations > img.snapshot.invalid):
2372         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
2373         (WebInspector.HeapAllocationsTimelineDataGridNode):
2374         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
2375         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCells):
2376         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotInvalidated):
2377         Give invalid snapshots an invalidated appearance in the snapshot list.
2378
2379         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2380         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
2381         * UserInterface/Views/HeapAllocationsTimelineView.css:
2382         (.timeline-view.heap-allocations > .data-grid tr.invalid):
2383         (.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid):
2384         Give invalid snapshots an invalidated appearance in the overview graph.
2385
2386         * UserInterface/Views/HeapAllocationsTimelineView.js:
2387         (WebInspector.HeapAllocationsTimelineView):
2388         (WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
2389         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
2390         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent.updateHeapSnapshotForEvent):
2391         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotCollectionEvent):
2392         (WebInspector.HeapAllocationsTimelineView.prototype._heapSnapshotInvalidated):
2393         (WebInspector.HeapAllocationsTimelineView.prototype._updateCompareHeapSnapshotButton):
2394         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
2395         Handle interactions when snapshots in the list are invalidated.
2396
2397 2016-06-22  Brian Burg  <bburg@apple.com>
2398
2399         Web Inspector: don't start auto capturing if the Inspector window is not visible
2400         https://bugs.webkit.org/show_bug.cgi?id=159014
2401
2402         Reviewed by Joseph Pecoraro.
2403         <rdar://problem/26931269>
2404
2405         Followup, add a missing super.closed() call mentioned in review comments.
2406
2407         * UserInterface/Views/TimelineTabContentView.js:
2408         (WebInspector.TimelineTabContentView.prototype.closed):
2409
2410 2016-06-22  Brian Burg  <bburg@apple.com>
2411
2412         Web Inspector: don't start auto capturing if the Inspector window is not visible
2413         https://bugs.webkit.org/show_bug.cgi?id=159014
2414         <rdar://problem/26931269>
2415
2416         Reviewed by Joseph Pecoraro.
2417
2418         TimelineTabContentView should not tell the timeline manager to enable
2419         auto-capturing unless the Web Inspector UI is visible. If it is preloaded
2420         but not shown to the user, then auto-capturing may inadvertently disable
2421         the debugger, causing it to miss `debugger` statements and not bring the
2422         inspector to front.
2423
2424         * UserInterface/Controllers/TimelineManager.js:
2425         (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
2426         Bail out if nothing changed. Coerce to a boolean since the backend requires a boolean.
2427
2428         * UserInterface/Views/TimelineTabContentView.js:
2429         (WebInspector.TimelineTabContentView): Listen for UI visibility changes.
2430         (WebInspector.TimelineTabContentView.prototype.shown):
2431         Enable auto-capturing if the UI is visible.
2432
2433         (WebInspector.TimelineTabContentView.prototype.closed): Added.
2434         Remove listeners on global objects so this tab doesn't leak.
2435
2436         (WebInspector.TimelineTabContentView.prototype._inspectorVisibilityChanged):
2437         Update the auto-capturing setting if the UI became visible or not visible.
2438
2439 2016-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
2440
2441         Web Inspector: Simplify CSS rule for ContentBrowser navigation bar items
2442         https://bugs.webkit.org/show_bug.cgi?id=159000
2443
2444         Reviewed by Timothy Hatcher.
2445
2446         * UserInterface/Views/ContentBrowser.css:
2447         (.content-browser > .navigation-bar > .item):
2448         Both these values result in 28px, but `100%` is simplier.
2449
2450 2016-06-21  Nikita Vasilyev  <nvasilyev@apple.com>
2451
2452         REGRESSION(r201177): Web Inspector: ContentBrowser navigation bar should fit on a single line
2453         https://bugs.webkit.org/show_bug.cgi?id=158700
2454         <rdar://problem/26772058>
2455
2456         Reviewed by Joseph Pecoraro.
2457
2458         * UserInterface/Views/ContentBrowser.css:
2459         (.content-browser > .navigation-bar > .item):
2460         Set the height to 28px, as it was before r201177.
2461         Make it one pixel shorter than the navigation bar for better vertical alignment.
2462
2463 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
2464
2465         Web Inspector: UncaughtExceptionReporter should handle null event.error
2466         https://bugs.webkit.org/show_bug.cgi?id=158971
2467
2468         Reviewed by Brian Burg.
2469
2470         * UserInterface/Debug/UncaughtExceptionReporter.js:
2471         Since `typeof null === "object"` handle uncaught exceptions where the
2472         Error object itself is null.
2473
2474 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
2475
2476         Web Inspector: Snapshot List should show the total size and the total live size
2477         https://bugs.webkit.org/show_bug.cgi?id=157904
2478         <rdar://problem/26372833>
2479
2480         Reviewed by Brian Burg.
2481
2482         Include the live size of a snapshot in the snapshot list.
2483
2484         * Localizations/en.lproj/localizedStrings.js:
2485         New "Live Size" string.
2486
2487         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2488         (HeapSnapshot):
2489         (HeapSnapshot.updateCategoriesAndMetadata):
2490         (HeapSnapshot.prototype.update):
2491         (HeapSnapshot.prototype.serialize):
2492         (HeapSnapshotDiff):
2493         (HeapSnapshotDiff.prototype.update):
2494         (HeapSnapshot.buildCategories): Deleted.
2495         (HeapSnapshot.prototype.updateCategories): Deleted.
2496         (HeapSnapshotDiff.prototype.updateCategories): Deleted.
2497         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
2498         (WebInspector.HeapSnapshotDiffProxy.prototype.updateForCollectionEvent):
2499         (WebInspector.HeapSnapshotDiffProxy.prototype.update):
2500         (WebInspector.HeapSnapshotDiffProxy.prototype.updateCategories): Deleted.
2501         * UserInterface/Proxies/HeapSnapshotProxy.js:
2502         (WebInspector.HeapSnapshotProxy):
2503         (WebInspector.HeapSnapshotProxy.deserialize):
2504         (WebInspector.HeapSnapshotProxy.prototype.get liveSize):
2505         (WebInspector.HeapSnapshotProxy.prototype.updateForCollectionEvent):
2506         (WebInspector.HeapSnapshotProxy.prototype.update):
2507         (WebInspector.HeapSnapshotProxy.prototype.updateCategories): Deleted.
2508         Rename "updateCategories" to "update" and update both categories
2509         and metadata, like the liveSize.
2510
2511         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
2512         (WebInspector.HeapAllocationsTimelineDataGridNode):
2513         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
2514         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype._heapSnapshotCollectedNodes):
2515         Update live size after collection.
2516
2517         * UserInterface/Views/HeapAllocationsTimelineView.js:
2518         (WebInspector.HeapAllocationsTimelineView):
2519         Include a live size column in the DataGrid.
2520         (WebInspector.HeapAllocationsTimelineView.prototype.closed):
2521         Cleanup listeners appropriately.
2522
2523 2016-06-20  Joseph Pecoraro  <pecoraro@apple.com>
2524
2525         Web Inspector: console.profile should use the new Sampling Profiler
2526         https://bugs.webkit.org/show_bug.cgi?id=153499
2527         <rdar://problem/24352431>
2528
2529         Reviewed by Timothy Hatcher.
2530
2531         * UserInterface/Controllers/TimelineManager.js:
2532         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
2533         (WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
2534         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
2535         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
2536         For programmatic captures, automatically show the Script Timeline, since
2537         that is guarenteed to have been started by the backend. Start capturing
2538         without creating a new recording.
2539
2540         * UserInterface/Models/TimelineRecording.js:
2541         (WebInspector.TimelineRecording.prototype.stop):
2542         (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
2543         When stopping for programmatic capture we don't need to disable
2544         instruments, the backend would have already done this.
2545
2546         * UserInterface/Protocol/ScriptProfilerObserver.js:
2547         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
2548         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
2549         (WebInspector.ScriptProfilerObserver):
2550         * UserInterface/Protocol/TimelineObserver.js:
2551         (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
2552         (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
2553         (WebInspector.TimelineObserver):
2554         Pass through Web and JSContext programmatic capture events.
2555
2556 2016-06-19  Nikita Vasilyev  <nvasilyev@apple.com>
2557
2558         Web Inspector: Remove Sidebar z-index:0 workaround for scrollbars and position:sticky section headers
2559         https://bugs.webkit.org/show_bug.cgi?id=158882
2560
2561         Reviewed by Darin Adler.
2562
2563         The z-index:0 workaround is no longer needed as it doesn't change anything.
2564
2565         * UserInterface/Views/Sidebar.css:
2566         (.sidebar > .panel): Deleted.
2567
2568 2016-06-17  Commit Queue  <commit-queue@webkit.org>
2569
2570         Unreviewed, rolling out r202152.
2571         https://bugs.webkit.org/show_bug.cgi?id=158897
2572
2573         The new test is very unstable, timing out frequently
2574         (Requested by ap on #webkit).
2575
2576         Reverted changeset:
2577
2578         "Web Inspector: console.profile should use the new Sampling
2579         Profiler"
2580         https://bugs.webkit.org/show_bug.cgi?id=153499
2581         http://trac.webkit.org/changeset/202152
2582
2583 2016-06-16  Joseph Pecoraro  <pecoraro@apple.com>
2584
2585         Web Inspector: console.profile should use the new Sampling Profiler
2586         https://bugs.webkit.org/show_bug.cgi?id=153499
2587         <rdar://problem/24352431>
2588
2589         Reviewed by Timothy Hatcher.
2590
2591         * UserInterface/Controllers/TimelineManager.js:
2592         (WebInspector.TimelineManager.prototype.programmaticCaptureStarted):
2593         (WebInspector.TimelineManager.prototype.programmaticCaptureStopped):
2594         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
2595         (WebInspector.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
2596         For programmatic captures, automatically show the Script Timeline, since
2597         that is guarenteed to have been started by the backend. Start capturing
2598         without creating a new recording.
2599
2600         * UserInterface/Models/TimelineRecording.js:
2601         (WebInspector.TimelineRecording.prototype.stop):
2602         (WebInspector.TimelineRecording.prototype.addScriptInstrumentForProgrammaticCapture):
2603         When stopping for programmatic capture we don't need to disable
2604         instruments, the backend would have already done this.
2605
2606         * UserInterface/Protocol/ScriptProfilerObserver.js:
2607         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStarted):
2608         (WebInspector.ScriptProfilerObserver.prototype.programmaticCaptureStopped):
2609         (WebInspector.ScriptProfilerObserver):
2610         * UserInterface/Protocol/TimelineObserver.js:
2611         (WebInspector.TimelineObserver.prototype.programmaticCaptureStarted):
2612         (WebInspector.TimelineObserver.prototype.programmaticCaptureStopped):
2613         (WebInspector.TimelineObserver):
2614         Pass through Web and JSContext programmatic capture events.
2615
2616 2016-06-16  Joseph Pecoraro  <pecoraro@apple.com>
2617
2618         REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
2619         https://bugs.webkit.org/show_bug.cgi?id=158846
2620
2621         Reviewed by Timothy Hatcher.
2622
2623         * UserInterface/Views/HeapAllocationsTimelineView.css:
2624         (.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted.
2625
2626 2016-06-16  Matt Baker  <mattbaker@apple.com>
2627
2628         Unreviewed build fix.
2629
2630         * UserInterface/Views/DataGrid.js:
2631         (WebInspector.DataGrid.prototype.createSettings):
2632         "showColumn" -> "setColumnVisible".
2633
2634 2016-06-16  Matt Baker  <mattbaker@apple.com>
2635
2636         Web Inspector: DataGrid should manage its own settings
2637         https://bugs.webkit.org/show_bug.cgi?id=158675
2638         <rdar://problem/26761338>
2639
2640         Reviewed by Timothy Hatcher.
2641
2642         Move grid sorting settings (sort order, column identifier) into DataGrid,
2643         removing duplicated code from various views. A new grid method, "createSettings",
2644         takes an identifier which is used as a prefix for naming the grid's settings.
2645
2646         So that the new behavior is easy to use and hard to misuse, default values
2647         for each setting are set to the current value of the associated property.
2648         The result is that:
2649
2650             grid.sortColumnIdentifier = "columnA";
2651             grid.createSettings("myGrid");
2652
2653         will use "columnA" as the default value the first time the setting is created.
2654
2655         * UserInterface/Views/ApplicationCacheFrameContentView.js:
2656         (WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
2657         * UserInterface/Views/CookieStorageContentView.js:
2658         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
2659         * UserInterface/Views/DOMStorageContentView.js:
2660         (WebInspector.DOMStorageContentView):
2661         * UserInterface/Views/DataGrid.js:
2662         (WebInspector.DataGrid):
2663         (WebInspector.DataGrid.prototype.createSettings):
2664         (WebInspector.DataGrid.prototype.get identifier): Deleted.
2665         (WebInspector.DataGrid.prototype.set identifier): Deleted.
2666         (WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
2667         (WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
2668         * UserInterface/Views/HeapAllocationsTimelineView.js:
2669         (WebInspector.HeapAllocationsTimelineView):
2670         * UserInterface/Views/HeapSnapshotContentView.js:
2671         (WebInspector.HeapSnapshotContentView):
2672         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
2673         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
2674         * UserInterface/Views/LayoutTimelineView.js:
2675         (WebInspector.LayoutTimelineView):
2676         * UserInterface/Views/NetworkGridContentView.js:
2677         (WebInspector.NetworkGridContentView):
2678         * UserInterface/Views/NetworkTimelineView.js:
2679         (WebInspector.NetworkTimelineView):
2680         * UserInterface/Views/ProfileView.js:
2681         (WebInspector.ProfileView):
2682         * UserInterface/Views/RenderingFrameTimelineView.js:
2683         (WebInspector.RenderingFrameTimelineView):
2684         * UserInterface/Views/ScriptDetailsTimelineView.js:
2685         (WebInspector.ScriptDetailsTimelineView):
2686
2687 2016-06-15  Joseph Pecoraro  <pecoraro@apple.com>
2688
2689         Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
2690         https://bugs.webkit.org/show_bug.cgi?id=158808
2691         <rdar://problem/26821034>
2692
2693         Reviewed by Brian Burg.
2694
2695         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
2696         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
2697         If the record is out of the layout bounds of the overview graph, the overview graph
2698         may not have created an image element yet, so bail. Later, when the image element
2699         is created, it would get the appropriate style if the record is selected.
2700
2701 2016-06-14  Matt Baker  <mattbaker@apple.com>
2702
2703         Web Inspector: Rename DataGrid.showColumn to setColumnVisible
2704         https://bugs.webkit.org/show_bug.cgi?id=158764
2705         <rdar://problem/26801448>
2706
2707         Reviewed by Joseph Pecoraro.
2708
2709         * UserInterface/Views/DataGrid.js:
2710         (WebInspector.DataGrid):
2711         Drive-by update to initialize "this._columnChooserEnabled".
2712
2713         (WebInspector.DataGrid.prototype.set identifier):
2714         (WebInspector.DataGrid.prototype.insertColumn):
2715         (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
2716         Use new method name.
2717
2718         (WebInspector.DataGrid.prototype._contextMenuInHeader):
2719         Drive-by style update.
2720
2721 2016-06-14  Matt Baker  <mattbaker@apple.com>
2722
2723         Web Inspector: Storage tab should allow hiding columns in the cookies grid
2724         https://bugs.webkit.org/show_bug.cgi?id=158767
2725         <rdar://problem/26803568>
2726
2727         Reviewed by Joseph Pecoraro.
2728
2729         * UserInterface/Views/CookieStorageContentView.js:
2730         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
2731         Enable column chooser, exclude Name and Value columns.
2732
2733 2016-06-14  Nikita Vasilyev  <nvasilyev@apple.com>
2734
2735         Web Inspector: Visual Sidebar: Remove "Text -> Content" subsection
2736         https://bugs.webkit.org/show_bug.cgi?id=158758
2737         <rdar://problem/26799628>
2738
2739         Reviewed by Timothy Hatcher.
2740
2741         "content" CSS property only works with pseudo elements ::before and ::after.
2742         It doesn't do anything for regular (non pseudo) elements. Remove it to
2743         reduce UI clutter.
2744
2745         * UserInterface/Views/VisualStyleDetailsPanel.js:
2746         (WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
2747         (WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Deleted.
2748         * UserInterface/Views/VisualStylePropertyEditor.css:
2749         (.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Deleted.
2750
2751 2016-06-14  Joseph Pecoraro  <pecoraro@apple.com>
2752
2753         Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
2754         https://bugs.webkit.org/show_bug.cgi?id=158762
2755
2756         Reviewed by Timothy Hatcher.
2757
2758         * UserInterface/Controllers/TimelineManager.js:
2759         (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
2760         (WebInspector.TimelineManager):
2761
2762 2016-06-14  Benjamin Poulain  <bpoulain@apple.com>
2763
2764         Add the unprefixed version of the pseudo element ::placeholder
2765         https://bugs.webkit.org/show_bug.cgi?id=158653
2766
2767         Reviewed by Dean Jackson.
2768
2769         * UserInterface/Views/FilterBar.css:
2770         (.filter-bar > input[type="search"]::placeholder):
2771         (.filter-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
2772         * UserInterface/Views/FindBanner.css:
2773         (.find-banner.console-find-banner > input[type="search"]::placeholder):
2774         (.find-banner.console-find-banner > input[type="search"]::-webkit-input-placeholder): Deleted.
2775         * UserInterface/Views/GoToLineDialog.css:
2776         (.go-to-line-dialog > div > input::placeholder):
2777         (.go-to-line-dialog > div > input::-webkit-input-placeholder): Deleted.
2778         * UserInterface/Views/OpenResourceDialog.css:
2779         (.open-resource-dialog > .field > input::placeholder):
2780         (.open-resource-dialog > .field > input::-webkit-input-placeholder): Deleted.
2781         * UserInterface/Views/SearchBar.css:
2782         (.search-bar > input[type="search"]::placeholder):
2783         (.search-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
2784         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:
2785
2786 2016-06-14  Nikita Vasilyev  <nvasilyev@apple.com>
2787
2788         Web Inspector: Introduce --navigation-bar-height CSS variable
2789         https://bugs.webkit.org/show_bug.cgi?id=158752
2790
2791         Reviewed by Timothy Hatcher.
2792
2793         Abstract a commonly repeated height value (29px) into a variable.
2794
2795         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
2796         (.sidebar > .panel.details.css-style > .content.has-filter-bar):
2797         * UserInterface/Views/DebuggerSidebarPanel.css:
2798         (.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
2799         * UserInterface/Views/FilterBar.css:
2800         (.filter-bar):
2801         * UserInterface/Views/NavigationBar.css:
2802         (.navigation-bar):
2803         * UserInterface/Views/NavigationSidebarPanel.css:
2804         (.sidebar > .panel.navigation > .content):
2805         (.sidebar > .panel.navigation > .overflow-shadow.top):
2806         * UserInterface/Views/NetworkSidebarPanel.css:
2807         (.sidebar > .panel.navigation.network > .title-bar):
2808         * UserInterface/Views/ResourceSidebarPanel.css:
2809         (.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
2810         * UserInterface/Views/SearchSidebarPanel.css:
2811         (.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
2812         (.sidebar > .panel.navigation.search > .search-bar):
2813         * UserInterface/Views/Sidebar.css:
2814         (.sidebar.has-navigation-bar > .panel):
2815         * UserInterface/Views/StorageSidebarPanel.css:
2816         (.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)):
2817         * UserInterface/Views/TimelineRecordingContentView.css:
2818         (.content-view.timeline-recording > .content-browser .recording-progress):
2819         * UserInterface/Views/Variables.css:
2820         (:root):
2821
2822 2016-06-14  Saam Barati  <sbarati@apple.com>
2823
2824         Follow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode
2825         https://bugs.webkit.org/show_bug.cgi?id=158555
2826         <rdar://problem/26712544>
2827
2828         Unreviewed follow up patch.
2829
2830         - Move a long if-else sequence to a switch statement.
2831         - Fix a copy-paste typo in a Symbol(.) enum.
2832
2833         * UserInterface/Models/CallingContextTree.js:
2834         (WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):
2835
2836 2016-06-13  Joseph Pecoraro  <pecoraro@apple.com>
2837
2838         Web Inspector: Show Exception Stack in UncaughtExceptionReporter view
2839         https://bugs.webkit.org/show_bug.cgi?id=158657
2840         <rdar://problem/26754441>
2841
2842         Reviewed by Darin Adler.
2843
2844         * UserInterface/Debug/UncaughtExceptionReporter.css:
2845         (.uncaught-exception-sheet li):
2846         Make newlines significant.
2847
2848         * UserInterface/Debug/UncaughtExceptionReporter.js:
2849         (unblockEventHandlers):
2850         (handleError):
2851         (handleLinkClick):
2852         (formattedEntry):
2853         Format the exception and a possible stack with a bit of sanitizing.
2854
2855 2016-06-13  Matt Baker  <mattbaker@apple.com>
2856
2857         Web Inspector: Filter Records not applying to new records
2858         https://bugs.webkit.org/show_bug.cgi?id=158213
2859         <rdar://problem/26543912>
2860
2861         Reviewed by Timothy Hatcher.
2862
2863         This patch makes the following improvements to timeline grid filtering:
2864
2865             - Records are filtered as they are added to the grid.
2866             - Timeline view no longer triggers a filter refresh while the
2867               current time changes while recording.
2868             - Filters are refreshed whenever the current timeline view changes.
2869
2870         * UserInterface/Views/DataGrid.js:
2871         (WebInspector.DataGrid.prototype.hasFilters):
2872         Helper function to check for custom and text filters.
2873
2874         (WebInspector.DataGrid.prototype._applyFiltersToNodeAndDispatchEvent):
2875         Encapsulate node state change and event dispatch, which was previously
2876         done in multiple places.
2877
2878         (WebInspector.DataGrid.prototype.insertChild):
2879         Filter incoming node if needed.
2880
2881         (WebInspector.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
2882         (WebInspector.DataGrid.prototype._updateFilter):
2883         (WebInspector.DataGrid.prototype.yieldableTaskWillProcessItem):
2884         Use new convenience functions.
2885
2886         (WebInspector.DataGrid.prototype.hasCustomFilters): Deleted.
2887         Renamed `hasFilters`.
2888
2889         * UserInterface/Views/TimelineRecordingContentView.js:
2890         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
2891         Refresh grid filters on view change.
2892
2893         * UserInterface/Views/TimelineView.js:
2894         (WebInspector.TimelineView.prototype.set startTime):
2895         (WebInspector.TimelineView.prototype.set endTime):
2896         Schedule filter change notification when selection bounds changes.
2897
2898         (WebInspector.TimelineView.prototype._timesDidChange):
2899         (WebInspector.TimelineView.prototype._scheduleFilterDidChange):
2900         (WebInspector.TimelineView):
2901
2902 2016-06-13  Saam Barati  <sbarati@apple.com>
2903
2904         Web Inspector: Call Trees view should have a 'Top Functions'-like mode
2905         https://bugs.webkit.org/show_bug.cgi?id=158555
2906         <rdar://problem/26712544>
2907
2908         Reviewed by Timothy Hatcher.
2909
2910         This patch adds a Top Functions view that is similar to Instruments'
2911         Top Functions view. I really wanted to add this view because I've
2912         been doing a lot of performance debugging and I've exclusively 
2913         used the Top Functions view and I want the Inspector to also have
2914         this view. I like to think of it as a more sophisticated version of the bottom-up view.
2915         
2916         Top Functions works by treating every frame as a root in the tree.
2917         Top functions view then presents a list of "roots". This is the same
2918         as all other views, which also present a list of roots, but in this case,
2919         every frame is a root. Bottom Up is great for nailing in specific performance
2920         problems in exactly one frame. But Bottom Up doesn't give you good context about where
2921         a specific frame is in the call tree and how frames are related by having
2922         a caller or some path of shared callers. For example, consider this call tree:
2923                  (program)
2924                  /        \
2925                 /          \
2926            (many nodes...)  
2927               / 
2928              /
2929             (parent)
2930             /   \
2931            /     \
2932          (leaf1)  (leaf2)
2933         
2934         Suppose that 'leaf1' is super hot, and 'leaf2' is moderately hot.
2935         If we look at this through Bottom Up view, we will see 'leaf1'
2936         is super hot, but it will take more scrolling to see that 'leaf2'
2937         is moderately hot. Lets say that 'parent' is also moderately hot,
2938         but that the majority of its time isn't self time. With Bottom Up view,
2939         there is no good way to see that 'leaf1' and 'leaf2' are both nodes under 'parent'.
2940         With Top Down, you can find this information, but it requires a ton of drilling down into
2941         the tree (i.e, you must expand past the 'many nodes...' I drew above). It's inconvenient to
2942         use Top Down here for indentation alone. Bottom up will tell you that 'leaf1' is super hot,
2943         and that 'leaf2' and 'parent' are moderately hot, but it doesn't show how they're related
2944         in the original tree. It's important to see that 'parent's total time is very high
2945         because it itself is moderately hot, and it has a child node that is super hot, and
2946         another child that's moderately 'hot'. For the sake of this example, let's pretend
2947         that 85% of the program's time is spent inside 'parent'. Seeing this information through
2948         'Top Functions' is easy because this information filters to the top of the list. Specifically,
2949         when using 'Top Functions' sorted by Total Time. Because every node is a root, there will be
2950         a top-level entry for every frame in the program. Specifically, there will be a top-level node
2951         for 'parent' in my above example. Because I've sorted this view by Total Time, I will see '(program)'
2952         first. That's because 100% of execution time is under the '(program)' frame. Then, I might see
2953         a few other nodes that also run the entire time because '(program)' calls them, and they eventually
2954         call into other things that never leave the stack. These will also have time ranges near 100%.
2955         But, only a few nodes after that, I'll see 'parent' in the list because it accounts for 85% of
2956         execution time. Immediately, I will see that it has some self time, and that it has two child
2957         nodes that have self time. This is really helpful.
2958         
2959         Let's consider another example where it's not easy in Top Down to get the full picture of 'parent':
2960                    (program)
2961                     /  |  \
2962                  (... many nodes...)
2963                   /           \
2964             (many nodes...)   (many nodes...)
2965                  /             \
2966                parent         parent
2967                  |              |
2968                 leaf1          leaf2
2969         
2970         
2971         If we viewed this program in Top Down, we don't get a full picture of 'parent'
2972         because it has its time distributed in two different subsections of the tree.
2973         Specifically, lets say it has 70% of time in the leaf1 path, and 30% of the
2974         time in the leaf2 path. We want a way to see these things together. It's impossible
2975         to do this in Top Down or Bottom Up. But, in Top Functions view, we get the view that
2976         we want to see because we treat 'parent' as a root of the tree. Because we do this,
2977         we will create the following sub tree in the Top Functions view:
2978                 parent
2979                /      \
2980              leaf1   leaf2
2981         This happens naturally because when 'parent' is a root, we add all its children
2982         to its subtree.
2983         
2984         Constructing this tree is really easy. What we do is take any arbitrary stack
2985         trace of length n, and treat is as n separate stack traces. Specifically, we
2986         perform the following operation for any stack trace S.
2987         
2988         S = [A, B, C, D]
2989         (A is the entry frame, and D is the top of the stack).
2990         We will transform this into a list of stack traces S' like so:
2991         S' = [[A, B, C, D], [B, C, D], [C, D], [D]]
2992         
2993         If we then run the normal top down tree algorithm on this set of stack
2994         traces, all nodes get treated as roots, and voila, we get the Top Functions view.
2995
2996         * Localizations/en.lproj/localizedStrings.js:
2997         * UserInterface/Controllers/TimelineManager.js:
2998         * UserInterface/Main.html:
2999         * UserInterface/Models/CallingContextTree.js:
3000         * UserInterface/Models/TimelineRecording.js:
3001         * UserInterface/Views/ScriptProfileTimelineView.js:
3002         * UserInterface/Views/TextToggleButtonNavigationItem.css: Added.
3003         * UserInterface/Views/TextToggleButtonNavigationItem.js: Added.
3004
3005 2016-06-13  Matt Baker  <mattbaker@apple.com>
3006
3007         Web Inspector: Add ability to show/hide DataGird columns
3008         https://bugs.webkit.org/show_bug.cgi?id=158676
3009         <rdar://problem/26761573>
3010
3011         Reviewed by Timothy Hatcher.
3012
3013         Make it possible to show/hide grid columns using the grid header
3014         context menu. This patch enables the new behavior for most of the
3015         timeline grids.
3016
3017         * UserInterface/Views/DataGrid.js:
3018         (WebInspector.DataGrid):
3019         (WebInspector.DataGrid.prototype.get identifier):
3020         (WebInspector.DataGrid.prototype.set identifier):
3021         An identifier for the grid instance, for managing per-grid settings.
3022         Setting the id causes settings to be created, and their values to be
3023         applied to the grid.
3024
3025         (WebInspector.DataGrid.prototype.get columnChooserEnabled):
3026         (WebInspector.DataGrid.prototype.set columnChooserEnabled):
3027         Enable showing/hiding columns via the grid header.
3028
3029         (WebInspector.DataGrid.prototype.insertColumn):
3030         (WebInspector.DataGrid.prototype.showColumn):
3031         Set column visibility and hidden column setting, then perform layout.
3032
3033         (WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
3034         (WebInspector.DataGrid.prototype._contextMenuInHeader):
3035         Create column chooser menu items if necessary.
3036
3037         (WebInspector.DataGrid.prototype._showColumn): Deleted.
3038         (WebInspector.DataGrid.prototype._hideColumn): Deleted.
3039         Replaced by `showColumn`.
3040
3041         * UserInterface/Views/LayoutTimelineView.js:
3042         (WebInspector.LayoutTimelineView):
3043         Always show "type" and "name" columns.
3044
3045         * UserInterface/Views/NetworkTimelineView.js:
3046         (WebInspector.NetworkTimelineView):
3047         * UserInterface/Views/RenderingFrameTimelineView.js:
3048         (WebInspector.RenderingFrameTimelineView):
3049         * UserInterface/Views/ScriptDetailsTimelineView.js:
3050         (WebInspector.ScriptDetailsTimelineView):
3051         Always show "name" column.
3052
3053         * UserInterface/Views/TimelineDataGrid.js:
3054         (WebInspector.TimelineDataGrid):
3055         Enable column chooser.
3056
3057 2016-06-10  Joseph Pecoraro  <pecoraro@apple.com>
3058
3059         Web Inspector: <template> content should not be hidden as Shadow Content
3060         https://bugs.webkit.org/show_bug.cgi?id=158654
3061
3062         Reviewed by Ryosuke Niwa.
3063
3064         * Localizations/en.lproj/localizedStrings.js:
3065         New "Template Content" string.
3066
3067         * UserInterface/Models/DOMNode.js:
3068         (WebInspector.DOMNode):
3069         Don't treat template content as shadow content.
3070
3071         * UserInterface/Views/DOMTreeElement.js:
3072         (WebInspector.DOMTreeElement.prototype._nodeTitleInfo):
3073         Custom string for template content fragment.
3074
3075 2016-06-10  Matt Baker  <mattbaker@apple.com>
3076
3077         Web Inspector: heap snapshot comparison view shows nothing if later snapshot is chosen first
3078         https://bugs.webkit.org/show_bug.cgi?id=158584
3079         <rdar://problem/26727849>
3080
3081         Reviewed by Timothy Hatcher.
3082
3083         ALways compare the the later snapshot to the earlier snapshot,
3084         regardless of selection order.
3085
3086         * UserInterface/Views/HeapAllocationsTimelineView.js:
3087         (WebInspector.HeapAllocationsTimelineView):
3088         (WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
3089         Swap shapshots if the first has a greater identifier than the second.
3090         Drive-by cleanup: null out `_baselineDataGridNode` since it isn't used
3091         after the comparison completes.
3092
3093 2016-06-10  Matt Baker  <mattbaker@apple.com>
3094
3095         Web Inspector: rendering frames timeline "60fps" horizontal guide is mispositioned after switching timeline modes
3096         https://bugs.webkit.org/show_bug.cgi?id=158587
3097         <rdar://problem/26728174>
3098
3099         Reviewed by Timothy Hatcher.
3100
3101         When the view mode changes we iterate over all overview graphs, updating
3102         their visibility as needed. Graphs being shown perform layout, even though
3103         the overview's state is in transition: its offset height may still change.
3104
3105         A simple fix is to use TimelineOverviewGraph.height instead of the graph
3106         element's offset height when performing layout.
3107
3108         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
3109         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype.layout):
3110
3111 2016-06-10  Matt Baker  <mattbaker@apple.com>
3112
3113         REGRESSION (r201538): Web Inspector: 1px gap above timeline progress view
3114         https://bugs.webkit.org/show_bug.cgi?id=158626
3115
3116         Reviewed by Joseph Pecoraro.
3117
3118         Adjust progress view top position to account for grid border changes.
3119
3120         * UserInterface/Views/TimelineRecordingContentView.css:
3121         (.content-view.timeline-recording > .content-browser .recording-progress):
3122
3123 2016-06-10  Matt Baker  <mattbaker@apple.com>
3124
3125         Web Inspector: REGRESSION (r201538): Web Inspector: Border under JS Call Trees content view is too thick
3126         https://bugs.webkit.org/show_bug.cgi?id=158624
3127         <rdar://problem/26743633>
3128
3129         Reviewed by Joseph Pecoraro.
3130
3131         Remove top border from <th> elements.
3132
3133         * UserInterface/Views/ProfileView.css:
3134         (.profile > .data-grid th): Deleted.
3135
3136 2016-06-09  Joseph Pecoraro  <pecoraro@apple.com>
3137
3138         REGRESSION: Web Inspector: IndexedDB does not show ObjectStore data
3139         https://bugs.webkit.org/show_bug.cgi?id=158592
3140         <rdar://problem/26730696>
3141
3142         Reviewed by Timothy Hatcher.
3143
3144         * UserInterface/Views/DataGrid.js:
3145         (WebInspector.DataGrid.prototype._noteRowRemoved):
3146         (WebInspector.DataGridNode.prototype._detach):
3147         When rows are removed in the non-Virtual DataGrids, we should
3148         actually remove the row.
3149
3150         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
3151         (WebInspector.IndexedDatabaseObjectStoreContentView):
3152         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData.processEntries):
3153         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype._fetchMoreData):
3154         Don't use the delete operator. Use a boolean.
3155
3156 2016-06-09  Nikita Vasilyev  <nvasilyev@apple.com>
3157
3158         Web Inspector: Support Command-P for quick open
3159         https://bugs.webkit.org/show_bug.cgi?id=158579
3160         <rdar://problem/26726751>
3161
3162         Reviewed by Timothy Hatcher.
3163
3164         * UserInterface/Base/Main.js:
3165         (WebInspector.contentLoaded):
3166
3167 2016-06-09  Nikita Vasilyev  <nvasilyev@apple.com>
3168
3169         REGRESSION (r194717): Web Inspector: Elements tab: an element loses focus when selected by Up/Down key
3170         https://bugs.webkit.org/show_bug.cgi?id=157768
3171         <rdar://problem/26311155>
3172
3173         Reviewed by Timothy Hatcher.
3174
3175         Remove _previousFocusedSection and _newInspectorRuleSelector since it was used only
3176         to focus on a newly created section (added by clicking on "+" button).
3177
3178         Introduce _inspectorSection and _isInspectorSectionPendingFocus.
3179
3180         * UserInterface/Views/CSSStyleDeclarationSection.js:
3181         (WebInspector.CSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorBlurActiveEditor): Deleted.
3182         (WebInspector.CSSStyleDeclarationSection.prototype._handleSelectorPaste): Deleted.
3183         No longer needed, it was only used by _previousFocusedSection and _newInspectorRuleSelector.
3184
3185         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3186         (WebInspector.CSSStyleDeclarationTextEditor.): Deleted.
3187         No londer needed, it was only used by _previousFocusedSection.
3188
3189         * UserInterface/Views/RulesStyleDetailsPanel.js:
3190         (WebInspector.RulesStyleDetailsPanel):
3191         (WebInspector.RulesStyleDetailsPanel.prototype.refresh.appendStyleSection):
3192         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
3193         (WebInspector.RulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
3194         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionEditorFocused): Deleted.
3195         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionBlurActiveEditor): Deleted.
3196         (WebInspector.RulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionFocusNewInspectorRuleWithSelector): Deleted.
3197
3198 2016-06-08  Joseph Pecoraro  <pecoraro@apple.com>
3199
3200         REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
3201         https://bugs.webkit.org/show_bug.cgi?id=158548
3202         <rdar://problem/26708513>
3203
3204         Reviewed by Timothy Hatcher.
3205
3206         * UserInterface/Controllers/RuntimeManager.js:
3207         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
3208         Switch the many parameters to an options dictionary.
3209         Include a new option for sourceURL appender, so that
3210         Console evaluations can have its own append.
3211
3212         * UserInterface/Controllers/JavaScriptLogViewController.js:
3213         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
3214         Use the appendWebInspectorConsoleEvaluationSourceURL appender.
3215
3216         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3217         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
3218         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3219         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection.):
3220         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
3221         Use the new options dictionary.
3222
3223 2016-06-08  Brian Burg  <bburg@apple.com>
3224
3225         Web Inspector: an error is encountered when trying to delete nodes that have children
3226         https://bugs.webkit.org/show_bug.cgi?id=158541
3227         <rdar://problem/26705901>
3228
3229         Reviewed by Timothy Hatcher.
3230
3231         * UserInterface/Views/DOMTreeElement.js:
3232         (WebInspector.DOMTreeElement.prototype.adjustCollapsedRange):
3233         Offset into the array variable instead of a variable holding its length.
3234
3235 2016-06-08  Brian Burg  <bburg@apple.com>
3236
3237         Web Inspector: DOMTreeOutline selection areas should be created and updated lazily
3238         https://bugs.webkit.org/show_bug.cgi?id=158513
3239         <rdar://problem/26689646>
3240
3241         Reviewed by Timothy Hatcher.
3242
3243         Selection areas for DOMTreeElements are used for several things: drag markers,
3244         element hover styles, element selection styles, and showing forced pseudo states
3245         for an element. Fortunately it's easy to tell when any of these things is necessary.
3246
3247         Change DOMTreeOutline and DOMTreeElement so they don't create selection areas
3248         unless they are needed for one of these tasks. This significantly reduces
3249         forced layouts that are required to update the selection area height in case the
3250         element has new attributes that cause the tag to become more or less wrapped.
3251
3252         * UserInterface/Views/DOMTreeElement.js:
3253         (WebInspector.DOMTreeElement.prototype.set hovered):
3254         Modernize this method a bit.
3255
3256         (WebInspector.DOMTreeElement.prototype.updateSelectionArea):
3257         If a selection area is not necessary, don't create one.
3258         If one exists and it's not needed, then remove it.
3259
3260         (WebInspector.DOMTreeElement.prototype.onattach):
3261         Remove redundant calls to updateSelection(). This is already called in
3262         updateTitle().
3263
3264         (WebInspector.DOMTreeElement.prototype.onselect):
3265         Ask the DOMTreeOutline to update the selection rather than forcing the
3266         element to do it. This is consistent with other updates to user selection.
3267
3268         (WebInspector.DOMTreeElement.prototype._insertInLastAttributePosition):
3269         (WebInspector.DOMTreeElement.prototype._startEditingAsHTML.dispose):
3270         (WebInspector.DOMTreeElement.prototype._startEditingAsHTML):
3271         Use renamed method.
3272
3273         (WebInspector.DOMTreeElement.prototype.updateTitle):
3274         Add a comment to explain why the selection area is nulled out here.
3275
3276         (WebInspector.DOMTreeElement.prototype.get pseudoClassesEnabled):
3277         (WebInspector.DOMTreeElement.prototype._nodePseudoClassesDidChange):
3278         Update the selection area in case one does not exist for this tree element.
3279         The indicator for forced pseudo classes is a pseudo element of the selection area.
3280
3281         (WebInspector.DOMTreeElement.prototype.updateSelection): Renamed.
3282         (WebInspector.DOMTreeElement.prototype.onexpand):
3283         (WebInspector.DOMTreeElement.prototype.oncollapse):
3284         Remove redundant calls to updateSelection(). This is already called in
3285         updateTitle().
3286
3287         * UserInterface/Views/DOMTreeOutline.css:
3288         (.tree-outline.dom):
3289         (.tree-outline.dom li.hovered:not(.selected) .selection-area):
3290         (.tree-outline.dom li .selection-area):
3291         (.tree-outline.dom li.selected .selection-area):
3292         (.tree-outline.dom li.elements-drag-over .selection-area):
3293         (.tree-outline.dom:focus li.selected .selection-area):
3294         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before):
3295         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before):
3296         (.tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
3297         (.tree-outline.dom li .selection): Deleted.
3298         (.tree-outline.dom li.selected .selection): Deleted.
3299         (.tree-outline.dom li.elements-drag-over .selection): Deleted.
3300         (.tree-outline.dom:focus li.selected .selection): Deleted.
3301         (.tree-outline.dom li.pseudo-class-enabled > .selection::before): Deleted.
3302         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection::before): Deleted.
3303         Rename the selector to be less ambiguous.
3304
3305         * UserInterface/Views/DOMTreeOutline.js:
3306         (WebInspector.DOMTreeOutline.prototype.updateSelection): Simplify. The call
3307         to update the selection area will bail out if there is nothing to be done.
3308
3309         (WebInspector.DOMTreeOutline.prototype.findTreeElement):
3310         (WebInspector.DOMTreeOutline.prototype._onmousemove):
3311         (WebInspector.DOMTreeOutline.prototype._onmouseout):
3312         Clean up and use let and arrow functions.
3313
3314         (WebInspector.DOMTreeOutline.prototype._ondragover):
3315         (WebInspector.DOMTreeOutline.prototype._clearDragOverTreeElementMarker):
3316         Clear the dragging element before updating the selection area since it looks at
3317         the dragging element to determine whether anything needs to be done.
3318
3319         * UserInterface/Views/FormattedValue.css:
3320         (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection-area):
3321         (.formatted-node > .tree-outline.dom li.hovered:not(.selected) .selection): Deleted.
3322         Rename the selector to be less ambiguous.
3323
3324 2016-06-08  Brian Burg  <bburg@apple.com>
3325
3326         Uncaught Exception in TimelineDataGrid._updatePopoverForSelectedNode()
3327         https://bugs.webkit.org/show_bug.cgi?id=158502
3328         <rdar://problem/26687038>
3329
3330         Reviewed by Joseph Pecoraro.
3331
3332         * UserInterface/Views/TimelineDataGrid.js:
3333         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
3334         It appears that this expression was moved around since it accesses
3335         targetFrame before it's initialized. Check rect.size.height directly.
3336
3337 2016-06-08  Brian Burg  <bburg@apple.com>
3338
3339         Web Inspector: reduce redundant attribute modification updates in DOMTreeUpdater and DOMTreeElement
3340         https://bugs.webkit.org/show_bug.cgi?id=158504
3341         <rdar://problem/25561452>
3342
3343         Reviewed by Timothy Hatcher.
3344
3345         When the frontend gets lots of DOM.attributeModified events, it forwards these on to
3346         DOMTreeUpdater, which pushes a record for every single modification. It then updates
3347         the DOM elements with the attibute changes on an animation frame. However, since it
3348         doesn't do any deduplication of the modification records, a lot of time is wasted
3349         on updating DOMTreeElements with intermediate (non-final) attribute values.
3350
3351         This patch rewrites DOMTreeUpdater to precisely track which nodes and attributes
3352         of each node need to be updated on the next animation frame. This is done using
3353         Sets and Maps that only hold onto the most recent attribute values rather than
3354         pushing a record object for every single mutation.
3355
3356         This improves the performance of the Elements tab on an SVG particle simulator
3357         dramatically so that the Inspector will not immediately hang. It still only achieves
3358         a few updates per second in this case, so there is still optimization to be done on
3359         the frontend and throttling to be done on the backend.
3360
3361         * UserInterface/Views/DOMTreeElement.js:
3362         (WebInspector.DOMTreeElement):
3363         (WebInspector.DOMTreeElement.prototype.attributeDidChange):
3364         (WebInspector.DOMTreeElement.prototype._buildAttributeDOM):
3365         (WebInspector.DOMTreeElement.prototype._markNodeChanged):
3366         (WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
3367         (WebInspector.DOMTreeElement.prototype._fireDidChange):
3368         (WebInspector.DOMTreeElement.prototype.nodeStateChanged): Deleted.
3369         Simplify the list of modified attributes a little bit. This still uses a worklist
3370         approach, so it's possible that duplicate updates for the same attribute could accumulate
3371         if DOMTreeUpdater pushes updates faster than DOMTreeElement can render them.
3372
3373         * UserInterface/Views/DOMTreeUpdater.js:
3374         (WebInspector.DOMTreeUpdater):
3375         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
3376         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
3377         (WebInspector.DOMTreeUpdater.prototype._nodeAttributeModified):
3378         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
3379         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
3380         (WebInspector.DOMTreeUpdater.prototype._childNodeCountUpdated):
3381         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
3382         (WebInspector.DOMTreeUpdater.prototype._reset):
3383         Rewrite this class to separately track insertions, deletions, and modifications. Use
3384         Sets and Maps so redundant entries are not kept around. Split the main work loop
3385         and use fewer enum-like properties to control how each DOM element change is handled.
3386
3387         Attempt to update all inserted children before modifying their attributes. This
3388         wasn't done previously, but enough duplicate attribute modifications occurred that
3389         usually some of them would be processed after being added to the tree. There is only
3390         one chance to do this now.
3391
3392 2016-06-08  Nikita Vasilyev  <nvasilyev@apple.com>
3393
3394         REGRESSION (r158219): Web Inspector: Border under the default Timeline content view is too thick
3395         https://bugs.webkit.org/show_bug.cgi?id=158533
3396
3397         Reviewed by Timothy Hatcher.
3398
3399         * UserInterface/Views/OverviewTimelineView.css:
3400         (.timeline-view.overview > .data-grid th): Deleted.
3401
3402 2016-06-08  Timothy Hatcher  <timothy@apple.com>
3403
3404         Web Inspector: Command-W should not close Web Inspector tabs; it should close the window
3405         https://bugs.webkit.org/show_bug.cgi?id=158538
3406         rdar://problem/26699215
3407
3408         Reviewed by Brian Burg.
3409
3410         * UserInterface/Views/TabBrowser.js:
3411         (WebInspector.TabBrowser): Change shortcut to Command-Shift-W.
3412
3413 2016-06-07  Brian Burg  <bburg@apple.com>
3414
3415         Web Inspector: reduce timer churn when processing many DOM.attributeModified messages
3416         https://bugs.webkit.org/show_bug.cgi?id=158491
3417         <rdar://problem/25561452>
3418
3419         Reviewed by Timothy Hatcher.
3420
3421         When the backend sends thousands of DOM.attributeModified events to the frontend, it
3422         slows to a crawl. This is partly because redundant messages are being sent, and
3423         because the frontend is taking too long to render attribute updates in the elements tab.
3424
3425         This patch is a first step to improve performance by reducing unnecessary work. It
3426         coalesces all attribute state updates to only happen once per animation frame. This
3427         reduces timer churn because we previously used a debouncing timer with interval of 0ms,
3428         and that had to be cleared and restarted on every call. This change also eliminates
3429         forced layouts when updating the selection highlights, since the DOM tree outline has
3430         been reflowed by the time we start updating selections in a requestAnimationFrame callback.
3431
3432         There is still a lot of optimization to be done here, but this reduces the problem
3433         considerably by keeping the event loop clear and making it obvious which selection
3434         update operations are still too expensive.
3435
3436         * UserInterface/Base/Utilities.js:
3437         Add a 'onNextFrame' proxy to Object. It works like debounce, except it coalesces calls
3438         up until the next animation frame rather than a fixed timeout. It also does not extend
3439         the timeout interval for each call.
3440
3441         * UserInterface/Views/DOMTreeUpdater.js:
3442         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
3443         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
3444         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
3445         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
3446         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
3447         Update on the next frame rather than on a zero delay timeout.
3448
3449         * UserInterface/Views/TreeOutline.js:
3450         (WebInspector.TreeOutline.WebInspector.TreeElement.prototype.didChange):
3451         (WebInspector.TreeOutline.WebInspector.TreeElement.prototype._fireDidChange):
3452         Update on the next frame rather than on a zero delay timeout.
3453
3454 2016-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
3455
3456         REGRESSION (r158219): Web Inspector: Border under Memory content view is too thick
3457         https://bugs.webkit.org/show_bug.cgi?id=158495
3458         <rdar://problem/26683428>
3459
3460         Reviewed by Timothy Hatcher.
3461
3462         * UserInterface/Views/MemoryTimelineView.css:
3463         (.timeline-view.memory): Deleted.
3464
3465 2016-06-07  Brian Burg  <bburg@apple.com>
3466
3467         Web Inspector: add a keyboard shortcut to open the new tab tab
3468         https://bugs.webkit.org/show_bug.cgi?id=158365
3469         <rdar://problem/26631897>
3470
3471         Unreviewed, fix a typo introduced in r201692.
3472         This caused the new tab button to stop working.
3473
3474         * UserInterface/Base/Main.js:
3475         (WebInspector._updateNewTabButtonState):
3476
3477 2016-06-05  Matt Baker  <mattbaker@apple.com>
3478
3479         REGRESSION (r201686): Web Inspector: Fix typo causing an internal error
3480         https://bugs.webkit.org/show_bug.cgi?id=158392
3481         <rdar://problem/26640467>
3482
3483         Reviewed by Joseph Pecoraro.
3484
3485         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
3486         Fixed typo.
3487
3488 2016-06-04  Brian Burg  <bburg@apple.com>
3489
3490         Web Inspector: add a keyboard shortcut to open the new tab tab
3491         https://bugs.webkit.org/show_bug.cgi?id=158365
3492         <rdar://problem/26631897>
3493
3494         Reviewed by Timothy Hatcher.
3495
3496         Make Cmd-t show the new tab tab if it's not already open and
3497         there is at least one tab type that's not currently in the tab bar.
3498
3499         * UserInterface/Base/Main.js:
3500         (WebInspector.contentLoaded):
3501         (WebInspector._updateNewTabButtonState):
3502         (WebInspector.showNewTabTab):
3503         (WebInspector.isNewTabWithTypeAllowed):
3504         Clean up the code that decides whether we can show the new tab tab.
3505         It is now a special case inside WebInspector.isNewTabWithTypeAllowed.
3506
3507         * UserInterface/Views/NewTabContentView.js:
3508         (WebInspector.NewTabContentView.prototype._updateShownTabs):
3509         Use Array.from.
3510
3511 2016-06-04  Matt Baker  <mattbaker@apple.com>
3512
3513         Web Inspector: discontinuous recordings should have discontinuities in the timeline memory graph
3514         https://bugs.webkit.org/show_bug.cgi?id=158052
3515         <rdar://problem/26516695>
3516
3517         Reviewed by Joseph Pecoraro.
3518
3519         Add gaps to the overview and category line charts where discontinuities
3520         exist in the timeline recording.
3521
3522         * UserInterface/Models/Timeline.js:
3523         (WebInspector.Timeline.prototype.recordsInTimeRange):
3524         Replaces `_visibleRecords` methods found in various views.
3525
3526         * UserInterface/Models/TimelineRecording.js:
3527         (WebInspector.TimelineRecording.prototype.reset):
3528         (WebInspector.TimelineRecording.prototype.addDiscontinuity):
3529         (WebInspector.TimelineRecording.prototype.discontinuitiesInTimeRange):
3530         Allow discontinuities to be added to the recording, and have a means to
3531         look up gaps within a time range.
3532
3533         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
3534         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._visibleRecords): Deleted.
3535         Replaced by Timeline helper method.
3536
3537         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
3538         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout.insertDiscontinuity):
3539         (WebInspector.MemoryTimelineOverviewGraph.prototype.layout):
3540         Insert zero-points into the chart at discontinuity boundaries to create
3541         gaps. Data points for records immediately before or after a gap are extended
3542         to the edge of the discontinuity.
3543
3544         (WebInspector.MemoryTimelineOverviewGraph.prototype._visibleRecords): Deleted.
3545         Replaced by Timeline helper method.
3546
3547         * UserInterface/Views/MemoryTimelineView.js:
3548         (WebInspector.MemoryTimelineView.prototype.layout):
3549         Insert zero-points into each category chart at discontinuity boundaries
3550         to create gaps.
3551
3552         Insert zero-points into the chart to create gaps.
3553         (WebInspector.MemoryTimelineView.prototype._visibleRecords): Deleted.
3554         Replaced by Timeline helper method.
3555
3556         * UserInterface/Views/TimelineOverview.js:
3557         (WebInspector.TimelineOverview.prototype.discontinuitiesInTimeRange):
3558         Forward to the TimelineRecording, which isn't exposed to clients.
3559
3560         * UserInterface/Views/TimelineRecordingContentView.js:
3561         (WebInspector.TimelineRecordingContentView):
3562         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
3563         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
3564         (WebInspector.TimelineRecordingContentView.prototype._recordingReset):
3565         Track discontinuities (recording stop followed by a start) and add them
3566         to the current recording.
3567
3568 2016-06-03  Brian Burg  <bburg@apple.com>
3569
3570         Web Inspector: add a keyboard shortcut to close the current tab bar item
3571         https://bugs.webkit.org/show_bug.cgi?id=158363
3572         <rdar://problem/22677254>
3573
3574         Reviewed by Timothy Hatcher.
3575
3576         Make Cmd-w close the current tab. This matches Safari's keyboard shortcut.
3577
3578         * UserInterface/Views/TabBrowser.js:
3579         (WebInspector.TabBrowser):
3580         Don't do anything if the New Tab tab is the only tab bar item besides the
3581         pinned "new tab" button.
3582
3583 2016-06-03  Brian Burg  <bburg@apple.com>
3584
3585         Web Inspector: setter for debugging flag InspectorBackend.dumpInspectorTimeStats does not work
3586         https://bugs.webkit.org/show_bug.cgi?id=158366
3587
3588         Reviewed by Timothy Hatcher.
3589
3590         * UserInterface/Protocol/InspectorBackend.js:
3591         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
3592         Actually update the backing member when the setter is called.
3593
3594 2016-06-03  Nikita Vasilyev  <nvasilyev@apple.com>
3595
3596         Web Inspector: Remove unused WebInspector.CSSCompletions methods
3597         https://bugs.webkit.org/show_bug.cgi?id=158352
3598
3599         Reviewed by Joseph Pecoraro.
3600
3601         * UserInterface/Models/CSSCompletions.js:
3602         (WebInspector.CSSCompletions.prototype.firstStartsWith): Deleted.
3603         (WebInspector.CSSCompletions.prototype.isLonghandPropertyName): Deleted.
3604         (WebInspector.CSSCompletions.prototype.longhandsForShorthand): Deleted.
3605
3606 2016-06-03  Joseph Pecoraro  <pecoraro@apple.com>
3607
3608         Web Inspector: Update NativeFunctionParameters (FontFaceSet, HTMLSlotElement, EventTarget)
3609         https://bugs.webkit.org/show_bug.cgi?id=158333
3610
3611         Reviewed by Brian Burg.
3612
3613         * UserInterface/Models/NativeFunctionParameters.js:
3614         Replace FontLoader with FontFaceSet. Add HTMLSlotElement API.
3615         EventTarget is now actually in the prototype chain, so add it as
3616         a first class citizen and keep mixing it in for legacy backends.
3617
3618 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
3619
3620         Web Inspector: Modernize Array.prototype.every/some callsites to arrow functions
3621         https://bugs.webkit.org/show_bug.cgi?id=158330
3622
3623         Reviewed by Brian Burg.
3624
3625         * UserInterface/Controllers/DOMTreeManager.js:
3626         (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
3627         * UserInterface/Models/ProfileNode.js:
3628         (WebInspector.ProfileNode):
3629         * UserInterface/Models/ScopeChainNode.js:
3630         (WebInspector.ScopeChainNode):
3631         * UserInterface/Models/StackTrace.js:
3632         (WebInspector.StackTrace):
3633         * UserInterface/Models/StructureDescription.js:
3634         (WebInspector.StructureDescription):
3635         * UserInterface/Models/TypeDescription.js:
3636         (WebInspector.TypeDescription):
3637         * UserInterface/Protocol/InspectorBackend.js:
3638         (InspectorBackend.Command.prototype.supports):
3639         * UserInterface/Views/ContentViewContainer.js:
3640         (WebInspector.ContentViewContainer.prototype.showContentView):
3641         * UserInterface/Views/NavigationSidebarPanel.js:
3642         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie.treeElementMatchesCookie):
3643         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
3644         * UserInterface/Views/ScopeBar.js:
3645         (WebInspector.ScopeBar.prototype.get selectedItems):
3646         (WebInspector.ScopeBar.prototype.hasNonDefaultItemSelected):
3647         * UserInterface/Views/TabContentView.js:
3648         (WebInspector.TabContentView):
3649         (WebInspector.TabContentView.console.assert): Deleted.
3650
3651 2016-06-02  Joseph Pecoraro  <pecoraro@apple.com>
3652
3653         Web Inspector: Modernize some function expressions that bind(this) to arrow functions
3654         https://bugs.webkit.org/show_bug.cgi?id=158315
3655
3656         Reviewed by Brian Burg.
3657
3658         Convert a common "function(x) { ... }.bind(this)" pattern to use arrow
3659         functions "(x) => { ... }", which lexically binds `this`, slightly faster,
3660         and uses less memory.
3661
3662         * UserInterface/Base/Main.js:
3663         (WebInspector._updateNewTabButtonState):
3664         * UserInterface/Controllers/BreakpointPopoverController.js:
3665         (WebInspector.BreakpointPopoverController.prototype._createPopoverContent):
3666         * UserInterface/Controllers/TypeTokenAnnotator.js:
3667         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations):
3668         (WebInspector.TypeTokenAnnotator.prototype.insertAnnotations.): Deleted.
3669         * UserInterface/Models/RenderingFrameTimelineRecord.js:
3670         (WebInspector.RenderingFrameTimelineRecord.prototype._calculateDurationRemainder):
3671         (WebInspector.RenderingFrameTimelineRecord):
3672         * UserInterface/Models/Resource.js:
3673         (WebInspector.Resource.prototype.requestContent):
3674         * UserInterface/Models/Script.js:
3675         (WebInspector.Script.prototype.requestScriptSyntaxTree):
3676         (WebInspector.Script.prototype.requestScriptSyntaxTree.makeSyntaxTreeAndCallCallback): Deleted.
3677         * UserInterface/Models/SourceCodeLocation.js:
3678         (WebInspector.SourceCodeLocation.prototype.populateLiveDisplayLocationString):
3679         * UserInterface/Models/WrappedPromise.js:
3680         (WebInspector.WrappedPromise):
3681         * UserInterface/Views/BreakpointActionView.js:
3682         (WebInspector.BreakpointActionView.prototype._updateBody):
3683         * UserInterface/Views/BreakpointTreeElement.js:
3684         (WebInspector.BreakpointTreeElement.prototype._dataUpdated):
3685         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3686         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers.update):
3687         (WebInspector.CSSStyleDeclarationTextEditor.prototype._updateTextMarkers):
3688         * UserInterface/Views/DefaultDashboardView.js:
3689         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.set item):
3690         (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
3691         * UserInterface/Views/ErrorObjectView.js:
3692         (WebInspector.ErrorObjectView.prototype.update):
3693         * UserInterface/Views/GeneralTreeElement.js:
3694         (WebInspector.GeneralTreeElement.prototype.onattach):
3695         (WebInspector.GeneralTreeElement.prototype.onattach.this._boundContextMenuEventHandler): Deleted.
3696         * UserInterface/Views/InlineSwatch.js:
3697         (WebInspector.InlineSwatch.prototype._getNextValidHEXFormat):
3698         (WebInspector.InlineSwatch):
3699         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3700         (WebInspector.LayerTreeDetailsSidebarPanel.prototype.refresh):
3701         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
3702         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._contentForPopover):
3703         * UserInterface/Views/LogContentView.js:
3704         (WebInspector.LogContentView.prototype._mouseup):
3705         * UserInterface/Views/NavigationSidebarPanel.js:
3706         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
3707         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
3708         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement):
3709         (WebInspector.ObjectTreeBaseTreeElement.prototype.createGetterElement.): Deleted.
3710         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
3711         (WebInspector.ObjectTreePropertyTreeElement.prototype._updateEntries):
3712         * UserInterface/Views/ObjectTreeView.js:
3713         (WebInspector.ObjectTreeView.prototype._updateEntries):
3714         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3715         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
3716         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3717         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
3718         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeElementAddContextMenuItems):
3719         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked.this._codeMirror.addKeyMap): Deleted.
3720         * UserInterface/Views/TabBar.js:
3721         * UserInterface/Views/VisualStylePropertyEditor.js:
3722         (WebInspector.VisualStylePropertyEditor.prototype._checkDependencies):
3723
3724 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
3725
3726         Web Inspector: Storage DataGrids have a half-pixel transparent/white border below the header
3727         https://bugs.webkit.org/show_bug.cgi?id=156699
3728         <rdar://problem/25778260>
3729
3730         Reviewed by Timothy Hatcher.
3731
3732         Increase the width of the border below the DataGrid's header to match the border in the left sidebar.
3733
3734         * UserInterface/Views/DataGrid.css:
3735         (.data-grid > .header-wrapper):
3736
3737 2016-05-31  Nikita Vasilyev  <nvasilyev@apple.com>
3738
3739         Web Inspector: Snapshot List scroll bar occludes border of containing view in top-right
3740         https://bugs.webkit.org/show_bug.cgi?id=158219
3741         <rdar://problem/26545018>
3742
3743         Reviewed by Timothy Hatcher.
3744
3745         * UserInterface/Views/TimelineDataGrid.css:
3746         (.data-grid.timeline th): Deleted.
3747         * UserInterface/Views/TimelineRecordingContentView.css:
3748         (.content-view.timeline-recording > .content-browser > .navigation-bar):
3749         Make the border line span across the whole navigation bar, not just its table cells.
3750
3751 2016-05-30  Brian Burg  <bburg@apple.com>
3752
3753         Web Inspector: Timelines: "-0.000ms" in Self Time
3754         https://bugs.webkit.org/show_bug.cgi?id=158162
3755         <rdar://problem/26523350>
3756
3757         Reviewed by Darin Adler.
3758
3759         Values such as -0.0000 and +0.00001 seem to indicate there is
3760         some floating point error accumulating in profile node data.
3761         Since the sampling profiler isn't accurate to that precision,
3762         let's clean up the data so near-zero numbers are simply zero.
3763
3764         * UserInterface/Models/ProfileNode.js:
3765         Round selfTime down to zero if it's less than the
3766         smallest value we would show in the user interface.
3767
3768 2016-05-30  Brian Burg  <bburg@apple.com>
3769
3770         Web Inspector: Uncaught exception page should pre-populate the bug's URL with the inspected page URL
3771         https://bugs.webkit.org/show_bug.cgi?id=158055
3772         <rdar://problem/26516693>
3773
3774         Reviewed by Saam Barati.
3775
3776         * UserInterface/Debug/UncaughtExceptionReporter.js:
3777         Include the encoded URL in the query string if it is not empty.
3778
3779 2016-05-30  Matt Baker  <mattbaker@apple.com>
3780
3781         Web Inspector: Right-clicking in Snapshot's DataGrid throws an exception
3782         https://bugs.webkit.org/show_bug.cgi?id=157934
3783         <rdar://problem/26380910>
3784
3785         Reviewed by Brian Burg.
3786
3787         Check that click event target is actually a cell, as it can be a row
3788         when focusing the table after dismissing a popup menu.
3789
3790         * UserInterface/Views/DataGrid.js:
3791         (WebInspector.DataGridNode.prototype.isEventWithinDisclosureTriangle):
3792
3793 2016-05-27  Joseph Pecoraro  <pecoraro@apple.com>
3794
3795         Web Inspector: Not all transitively dominated nodes display their retained size
3796         https://bugs.webkit.org/show_bug.cgi?id=158174
3797
3798         Reviewed by Timothy Hatcher.
3799
3800         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
3801         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
3802         Use the parent reference changing in the loop instead of always using the same parent.
3803
3804 2016-05-27  Devin Rousso  <dcrousso+webkit@gmail.com>
3805
3806         Web Inspector: Add indicators to show nesting levels inside DOM Tree
3807         https://bugs.webkit.org/show_bug.cgi?id=157468
3808         <rdar://problem/26162640>
3809
3810         Reviewed by Timothy Hatcher.
3811
3812         Add CSS rules to give all expanded node children lists a small line on the
3813         left border indicating that all items under the line are descendants.
3814
3815         * UserInterface/Views/DOMTreeOutline.css:
3816         (.tree-outline.dom li .selection):
3817         (.tree-outline.dom li > span):
3818         (.tree-outline.dom ol):
3819         (.tree-outline.dom .tree-outline.dom li:matches(.hovered, .selected) + ol.children.expanded):
3820         (.tree-outline.dom li.selected + ol.children.expanded):
3821         (.tree-outline.dom li.parent::before):
3822
3823 2016-05-26  Matt Baker  <mattbaker@apple.com>
3824
3825         Uncaught Exception: TypeError: undefined is not an object (evaluating 'records[endIndex].endTime')
3826         https://bugs.webkit.org/show_bug.cgi?id=158057
3827
3828         Reviewed by Timothy Hatcher.
3829
3830         * UserInterface/Views/TimelineRecordingContentView.js:
3831         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
3832         When the entire recording is selected, rendering frames should use the
3833         record count as its end time instead of the recording's end time.
3834
3835 2016-05-25  Joseph Pecoraro  <pecoraro@apple.com>
3836
3837         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'collectionData.affectedSnapshots')
3838         https://bugs.webkit.org/show_bug.cgi?id=158051
3839
3840         Reviewed by Brian Burg.
3841
3842         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
3843         (HeapSnapshot.prototype.updateDeadNodesAndGatherCollectionData):
3844         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
3845         (HeapSnapshotWorker.prototype.createSnapshot):
3846         If by the time the timeout fires we had cleared our snapshot list, then
3847         updateDeadNodesAndGatherCollectionData could bail. Handle gracefully.
3848
3849 2016-05-23  Nikita Vasilyev  <nvasilyev@apple.com>
3850
3851         Web Inspector: Split console navigation bar doesn't wrap as expected
3852         https://bugs.webkit.org/show_bug.cgi?id=157950
3853         <rdar://problem/26395573>
3854
3855         Reviewed by Timothy Hatcher.
3856
3857         * UserInterface/Views/Main.css:
3858         (#split-content-browser > .navigation-bar .item):
3859         Fix the split console and don't touch any other navigation bars.
3860
3861 2016-05-22  Brady Eidson  <beidson@apple.com>
3862
3863         Move to C++14.
3864         https://bugs.webkit.org/show_bug.cgi?id=157948
3865
3866         Reviewed by Michael Catanzaro.
3867
3868         * Configurations/Base.xcconfig:
3869
3870 2016-05-21  Matt Baker  <mattbaker@apple.com>
3871
3872         Web Inspector: Creating the CSSStyleDetailsSidebarPanel takes about 50ms (20%) of main load