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