Hook up ShadowChicken to the debugger to show tail deleted frames
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-05-16  Saam barati  <sbarati@apple.com>
2
3         Hook up ShadowChicken to the debugger to show tail deleted frames
4         https://bugs.webkit.org/show_bug.cgi?id=156685
5         <rdar://problem/25770521>
6
7         Reviewed by Filip Pizlo and Mark Lam and Joseph Pecoraro.
8
9         This patch makes the WebInspector display tail deleted frames.
10         We show tail deleted frames with a gray [f] instead of a green
11         [f]. We also put text in the tooltip to indicate that the frame
12         is tail deleted. Other than that, tail deleted frames behave like
13         normal frames. You can evaluate in them, inspect their scope, etc.
14
15         * Localizations/en.lproj/localizedStrings.js:
16         * UserInterface/Images/TailDeletedFunction.svg: Added.
17         * UserInterface/Images/gtk/TailDeletedFunction.svg: Added.
18         * UserInterface/Models/CallFrame.js:
19         * UserInterface/Views/CallFrameIcons.css:
20         * UserInterface/Views/CallFrameTreeElement.js:
21         * UserInterface/Views/CallFrameView.js:
22
23 2016-05-16  Nikita Vasilyev  <nvasilyev@apple.com>
24
25         Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
26         https://bugs.webkit.org/show_bug.cgi?id=157590
27
28         Reviewed by Timothy Hatcher.
29
30         Set the right padding of the DataGrid header to match the scrollbar width.
31
32         * UserInterface/Views/DataGrid.css:
33         (.data-grid .data-container):
34         (.data-grid.inline .data-container):
35         Don't show scrollbars for inline data grids.
36
37         (.data-grid > .header-wrapper):
38         (.data-grid.no-header > .header-wrapper > table.header):
39         (.data-grid.no-header > table.header): Deleted.
40         (.data-grid th): Deleted.
41         * UserInterface/Views/DataGrid.js:
42         (WebInspector.DataGrid):
43         We can't add padding-rigth to a table. Wrap the table in div.header-wrapper.
44
45         (WebInspector.DataGrid.prototype._updateScrollbarPadding):
46         (WebInspector.DataGrid.prototype.layout):
47
48 2016-05-16  Nikita Vasilyev  <nvasilyev@apple.com>
49
50         Web Inspector: Background stripes don't span the width of Network sidebar
51         https://bugs.webkit.org/show_bug.cgi?id=157744
52
53         Reviewed by Timothy Hatcher.
54
55         * UserInterface/Views/NetworkSidebarPanel.css:
56         (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content):
57
58 2016-05-16  Antoine Quint  <graouts@apple.com>
59
60         Web Inspector: Computed style shows both prefixed and unprefixed variants of properties
61         https://bugs.webkit.org/show_bug.cgi?id=157674
62         <rdar://problem/24339756>
63
64         Reviewed by Timothy Hatcher.
65
66         We make the CSSProperty `implicit` property read-write, and in the case where a computed style
67         has a property marked as explicit, we also check that it's found in matching rules to consider
68         it non-implicit. This correctly filters out variants of properties set explicitly.
69
70         * UserInterface/Models/CSSProperty.js:
71         (WebInspector.CSSProperty.prototype.set implicit):
72         * UserInterface/Models/DOMNodeStyles.js:
73         (WebInspector.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
74         (WebInspector.DOMNodeStyles.prototype.refresh):
75         (WebInspector.DOMNodeStyles.prototype._isPropertyFoundInMatchingRules):
76         (WebInspector.DOMNodeStyles):
77
78 2016-05-14  Timothy Hatcher  <timothy@apple.com>
79
80         Web Inspector: DataGrid _updateVisibleRows dominates profiles of timeline recordings when data grid (Overview or TimelineDataGrids) is showing
81         https://bugs.webkit.org/show_bug.cgi?id=157664
82         rdar://problem/26262219
83
84         Reviewed by Joseph Pecoraro.
85
86         * UserInterface/Views/DataGrid.js:
87         (WebInspector.DataGrid): Added new members.
88         (WebInspector.DataGrid.prototype.layout): Reset _cachedScrollTop and _cachedScrollHeight on resize.
89         (WebInspector.DataGrid.prototype._noteScrollPositionChanged): Added.
90         (WebInspector.DataGrid.prototype._updateVisibleRows): Cache sizes and positions when possible.
91         (WebInspector.DataGridNode.prototype.set hidden): Added call to _noteRowsChanged.
92         (WebInspector.DataGridNode.prototype.collapse): Call _noteRowsChanged instead of needsLayout.
93         (WebInspector.DataGridNode.prototype.expand): Call _noteRowsChanged instead of needsLayout.
94         (WebInspector.DataGrid.prototype._updateFilter): Removed direct call to _updateVisibleRows, this is
95         better handled by DataGridNode's hidden setter.
96
97 2016-05-14  Timothy Hatcher  <timothy@apple.com>
98
99         Web Inspector: Many DataGrid instances do not save/restore their scroll position
100         https://bugs.webkit.org/show_bug.cgi?id=157709
101         rdar://problem/26286090
102
103         Reviewed by Brian Burg.
104
105         * UserInterface/Models/BackForwardEntry.js:
106         (WebInspector.BackForwardEntry.prototype.makeCopy): Added.
107         * UserInterface/Views/ContentViewContainer.js:
108         (WebInspector.ContentViewContainer.prototype.showContentView): Copy the last entry for the view.
109         * UserInterface/Views/DOMStorageContentView.js:
110         (WebInspector.DOMStorageContentView.prototype.get scrollableElements): Added.
111         * UserInterface/Views/HeapSnapshotContentView.js:
112         (WebInspector.HeapSnapshotContentView.prototype.get scrollableElements): Added.
113         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
114         (WebInspector.IndexedDatabaseObjectStoreContentView.prototype.get scrollableElements): Added.
115         * UserInterface/Views/MemoryTimelineView.js:
116         (WebInspector.MemoryTimelineView.prototype.get scrollableElements): Added.
117         * UserInterface/Views/ProfileView.js:
118         (WebInspector.ProfileView.prototype.get scrollableElements): Added.
119         (WebInspector.ProfileView.prototype._repopulateDataGridFromTree): Removed unused skipRefresh argument.
120         * UserInterface/Views/ScriptClusterTimelineView.js:
121         (WebInspector.ScriptClusterTimelineView.prototype.get scrollableElements): Added.
122         * UserInterface/Views/ScriptProfileTimelineView.js:
123         (WebInspector.ScriptProfileTimelineView.prototype.get scrollableElements): Added.
124         * UserInterface/Views/TimelineView.js:
125         (WebInspector.TimelineView.prototype.get scrollableElements): Added.
126
127 2016-05-14  Nikita Vasilyev  <nvasilyev@apple.com>
128
129         Web Inspector: Empty line shows arrow when hovering over Animation Frame Requested in timeline recording
130         https://bugs.webkit.org/show_bug.cgi?id=157707
131
132         Reviewed by Timothy Hatcher.
133
134         * UserInterface/Views/DataGrid.css:
135         (.data-grid:not(.variable-height-rows) > .data-container > table.data > tbody > tr > td > div):
136
137 2016-05-13  Simon Fraser  <simon.fraser@apple.com>
138
139         Unprefix -webkit-cross-fade()
140         https://bugs.webkit.org/show_bug.cgi?id=157632
141
142         Reviewed by Darin Adler.
143
144         * UserInterface/Models/CSSKeywordCompletions.js:
145
146 2016-05-13  Matt Baker  <mattbaker@apple.com>
147
148         Web Inspector: Typing "layout" in filter for Layout and Rendering Timeline matches everything
149         https://bugs.webkit.org/show_bug.cgi?id=157684
150         <rdar://problem/26276588>
151
152         Reviewed by Joseph Pecoraro.
153
154         Hidden columns should not participate in built-in grid filtering
155         using DataGrid.filterText. Hidden columns can still be custom filtered,
156         which is how TimelineDataGrid filters scopebar columns.
157
158         * UserInterface/Views/DataGrid.js:
159         (WebInspector.DataGridNode.prototype.get filterableData):
160         Skip hidden columns.
161
162 2016-05-13  Matt Baker  <mattbaker@apple.com>
163
164         Web Inspector: Script ProfileViews should be searchable
165         https://bugs.webkit.org/show_bug.cgi?id=157581
166         <rdar://problem/26228530>
167
168         Reviewed by Joseph Pecoraro.
169
170         * UserInterface/Views/DataGrid.js:
171         (WebInspector.DataGrid.prototype.get filterText):
172         Make filterText readable.
173
174         * UserInterface/Views/ProfileDataGridNode.js:
175         (WebInspector.ProfileDataGridNode.prototype.get callingContextTreeNode):
176         (WebInspector.ProfileDataGridNode.prototype.filterableDataForColumn):
177         Add filterable data for the "function" column.
178         (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
179         (WebInspector.ProfileDataGridNode.prototype.get node): Deleted.
180         Renamed callingContextTreeNode to be less ambiguous.
181
182         * UserInterface/Views/ProfileDataGridTree.js:
183         (WebInspector.ProfileDataGridTree.prototype._updateCurrentFocusDetails):
184
185         * UserInterface/Views/ProfileView.js:
186         (WebInspector.ProfileView.prototype.get dataGrid):
187         Expose data grid for use in parent view.
188
189         * UserInterface/Views/ScriptClusterTimelineView.js:
190         (WebInspector.ScriptClusterTimelineView.prototype.selectRecord):
191         Drive-by fix: forward property to current child TimelineView.
192
193         * UserInterface/Views/ScriptProfileTimelineView.js:
194         (WebInspector.ScriptProfileTimelineView):
195         (WebInspector.ScriptProfileTimelineView.prototype._scopeBarSelectionDidChange):
196         (WebInspector.ScriptProfileTimelineView.prototype._showProfileViewForOrientation):
197         Helper function to switch profile views. Persist filter text when
198         switching to the new profile view.
199
200         (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar): Deleted.
201         Remove FIXME and show filter bar.
202
203         * UserInterface/Views/TimelineView.js:
204         (WebInspector.TimelineView.prototype.setupDataGrid):
205         Support switching to a new data grid.
206         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
207         Hooking up filtering causes data grid nodes to be filtered based on the
208         ruler selection. Although ScriptProfileTimelineView performs its own
209         time-based filtering, this is necessary to prevent an assert.
210
211         (WebInspector.TimelineView.prototype._timelineDataGridSelectedNodeChanged):
212         (WebInspector.TimelineView.prototype._timelineDataGridNodeWasFiltered):
213         Converted arrow functions to member functions to allow unregistering
214         event listeners on outgoing data grid when swapping grids.
215
216 2016-05-12  Matt Baker  <mattbaker@apple.com>
217
218         Web Inspector: Remove "Extra Scripts" folder from Resources sidebar if all children removed
219         https://bugs.webkit.org/show_bug.cgi?id=157656
220
221         Reviewed by Timothy Hatcher.
222
223         * UserInterface/Views/ResourceSidebarPanel.js:
224         (WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
225         Remove parent folder after last script tree element removed.
226
227 2016-05-12  Matt Baker  <mattbaker@apple.com>
228
229         Web Inspector: Can't filter Rendering Frames by duration
230         https://bugs.webkit.org/show_bug.cgi?id=157654
231
232         Reviewed by Timothy Hatcher.
233
234         * UserInterface/Views/RenderingFrameTimelineView.js:
235         (WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
236         Call filterDidChange on the grid, not the base class.
237         TimelineView.filterDidChange exists to let TimelineViews perform
238         additional work when the grid filter changes (see LayoutTimelineView).
239         (WebInspector.RenderingFrameTimelineView):
240
241 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
242
243         Web Inspector: Deleting nodes in DOM Tree sometimes changes selection to parent instead of sibling
244         https://bugs.webkit.org/show_bug.cgi?id=157649
245
246         Reviewed by Timothy Hatcher.
247
248         * UserInterface/Views/DOMTreeElement.js:
249         (WebInspector.DOMTreeElement.prototype._updateChildren): Deleted.
250         When pressing delete, we remove the node via DOM.removeNode()
251         and remove the DOMTreeElement when we receive a successful response.
252         However, the backend could send a DOM.childNodeRemoved event before
253         the response from DOM.removeNode, and the frontend would have a race
254         between DOMTreeUpdater's timeout and the removeNode callback.
255
256         In DOMTreeUpdater's path, DOMTreeElement updateChildren would notice
257         a removed node and set the selection to the parent node.
258
259         In the DOM.removeNode path, TreeOutline would update the selection
260         based on availability of a previousSibling/nextSibling/parent.
261
262         Remove the custom code in DOMTreeElement updateChildren, so that it
263         can just do the normal TreeOutline behavior via removeChildAtIndex.
264
265 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
266
267         REGRESSION: Web Inspector: Fails to load sourceMappingURL with relative URL
268         https://bugs.webkit.org/show_bug.cgi?id=157650
269         <rdar://problem/26133763>
270
271         Reviewed by Timothy Hatcher.
272
273         * UserInterface/Controllers/SourceMapManager.js:
274         Wrong order of arguments. The intent was to pass the incoming
275         baseURL as the partialURL, because if it was not absolute by
276         that point we could make it relative to the main resource.
277         However we accidentally put the main resource as the partial
278         portion, which would just always return the main resource url.
279         Swap the order, so that if the incoming base is absolute
280         (such as a resource.url) that will be used, but if the
281         incoming base is relative (e.g. an incomplete sourceURL) we
282         can make it absolute with the main resource.
283
284 2016-05-12  Matt Baker  <mattbaker@apple.com>
285
286         Web Inspector: Uncaught exception when removing selected Timeline instrument
287         https://bugs.webkit.org/show_bug.cgi?id=157639
288         <rdar://problem/26252938>
289
290         Reviewed by Timothy Hatcher.
291
292         * UserInterface/Views/TimelineOverview.js:
293         (WebInspector.TimelineOverview.prototype._instrumentRemoved):
294         Remove timeline tree element before modifying state. Removing the tree
295         element triggers a SelectionDidChange event, which can have side effects.
296
297 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
298
299         Web Inspector: Timeline Reset button only resets the one active Script TimelineView
300         https://bugs.webkit.org/show_bug.cgi?id=157638
301
302         Reviewed by Timothy Hatcher.
303
304         * UserInterface/Views/ScriptClusterTimelineView.js:
305         (WebInspector.ScriptClusterTimelineView.prototype.reset):
306         Reset should reset all the views.
307
308         (WebInspector.ScriptClusterTimelineView.prototype.get navigationSidebarTreeOutline): Deleted.
309         * UserInterface/Views/NetworkGridContentView.js:
310         (WebInspector.NetworkGridContentView.prototype.get navigationSidebarTreeOutline): Deleted.
311         * UserInterface/Views/TimelineView.js:
312         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineScopeBar): Deleted.
313         Remove dead code. Nobody calls these getters.
314
315 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
316
317         Web Inspector: Layout timeline popovers are inconsistently shown
318         https://bugs.webkit.org/show_bug.cgi?id=157640
319         <rdar://problem/26253394>
320
321         Reviewed by Timothy Hatcher.
322
323         * UserInterface/Views/TimelineDataGrid.js:
324         (WebInspector.TimelineDataGrid.prototype._showPopoverForSelectedNodeSoon):
325         Fix the bug by clearing _showPopoverTimeout when we show the popover.
326
327         (WebInspector.TimelineDataGrid.prototype._hidePopover):
328         Modernize the code to use arrow functions and avoid binds.
329
330         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
331         Updating with presentNewContentWithFrame animates the popover to the correct
332         position instead of jumping and ending up at the wrong location.
333
334 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
335
336         Web Inspector: Remove forced layouts caused by DOMTreeElement during Timeline recording
337         https://bugs.webkit.org/show_bug.cgi?id=157641
338
339         Reviewed by Timothy Hatcher.
340
341         * UserInterface/Views/DOMTreeElement.js:
342         (WebInspector.DOMTreeElement.prototype.updateSelection): Deleted.
343         This triggers forced layout and I could never actually get it to trigger anyways.
344         Its history is from the original import, so I don't know why it was added to begin with.
345         Just remove it.
346
347 2016-05-12  Commit Queue  <commit-queue@webkit.org>
348
349         Unreviewed, rolling out r200718.
350         https://bugs.webkit.org/show_bug.cgi?id=157637
351
352         Data grid column dividers are misaligned (Requested by NVI on
353         #webkit).
354
355         Reverted changeset:
356
357         "Web Inspector: Contents of Duration column are covered by
358         always on (legacy) scroll bars"
359         https://bugs.webkit.org/show_bug.cgi?id=157590
360         http://trac.webkit.org/changeset/200718
361
362 2016-05-12  Matt Baker  <mattbaker@apple.com>
363
364         Web Inspector: 11% of time in TimelineRecording spent updating DataGrid that is not visible
365         https://bugs.webkit.org/show_bug.cgi?id=157612
366         <rdar://problem/26239051>
367
368         Reviewed by Timothy Hatcher.
369
370         During recording, a timeline view is constantly having its cached time
371         values updated. These updates should only trigger forced layouts if the
372         view supports live data.
373
374         * UserInterface/Views/TimelineView.js:
375         (WebInspector.TimelineView.prototype.set zeroTime):
376         Drive-by fix, add call to _filterTimesDidChange.
377         (WebInspector.TimelineView.prototype.set startTime):
378         (WebInspector.TimelineView.prototype.set endTime):
379         (WebInspector.TimelineView.prototype.set currentTime):
380         Don't update layout directly.
381         (WebInspector.TimelineView.prototype._timesDidChange):
382         Force a layout if the view supports live data. When not recording,
383         a layout is always performed.
384         (WebInspector.TimelineView):
385         (WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork): Deleted.
386         Changed to an arrow function.
387         (WebInspector.TimelineView.prototype._filterTimesDidChange): Deleted.
388         Renamed _timesDidChange, since the method now does more than throttle
389         a filterDidChange call.
390
391 2016-05-12  Fujii Hironori  <Hironori.Fujii@sony.com>
392
393         Web Inspector: Windows Perl fails to run copy-user-interface-resources.pl
394         https://bugs.webkit.org/show_bug.cgi?id=157620
395         <rdar://problem/26241548>
396
397         Reviewed by Timothy Hatcher.
398
399         There are two problems on Windows platform. 'cat' command is
400         missing and can not execute shebang.
401
402         * Scripts/copy-user-interface-resources.pl: Invoke Perl scripts
403         with explicitly specifying Perl command instead of relying on
404         shebang.  Add a new subroutine 'appendFile' to concatenate files
405         instread of 'cat' command.
406
407 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
408
409         Web Inspector: 3.8% of timeline recording spent in NavigationSidebarPanel _updateContentOverflowShadowVisibility for background tab
410         https://bugs.webkit.org/show_bug.cgi?id=157616
411
412         Reviewed by Timothy Hatcher.
413
414         * UserInterface/Views/NavigationSidebarPanel.js:
415         (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
416         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
417         Don't update or schedule and update if we aren't visible.
418         When we are shown we will force an update.
419
420 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
421
422         Web Inspector: Reduce rAF churn in DefaultDashboardView on pages with lots of resources
423         https://bugs.webkit.org/show_bug.cgi?id=157618
424
425         Reviewed by Timothy Hatcher.
426
427         * UserInterface/Views/DefaultDashboardView.js:
428         (WebInspector.DefaultDashboardView):
429         (WebInspector.DefaultDashboardView.prototype._updateDisplaySoon):
430         (WebInspector.DefaultDashboardView.prototype._updateDisplay):
431         Previously we were scheduling multiple rAFs that would all fire with
432         the same data, each time a resource was added. Coalesce into one.
433
434 2016-05-12  Matt Baker  <mattbaker@apple.com>
435
436         Web Inspector: Improve snapshot selection in heap allocations overview graph
437         https://bugs.webkit.org/show_bug.cgi?id=157588
438         <rdar://problem/26231245>
439
440         Reviewed by Joseph Pecoraro.
441
442         Heap snapshot icon selection now uses the built-in record selection
443         behavior provided by TimelineOverview/TimelineOverviewGraph. The marker
444         representing the selected heap snapshot now has a "selected" style, and
445         clicking an icon when the HeapAllocationsTimeline is not selected causes
446         the timeline to become selected.
447
448         * UserInterface/Images/HeapSnapshotSelected.svg: Added.
449         New art for selected snapshot icon.
450
451         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.css:
452         (.timeline-overview-graph.heap-allocations > img.snapshot.selected):
453         (.timeline-overview-graph.heap-allocations:not(.selected) > img.snapshot.selected):
454         Selected icon styles for selected/unselected overview graph.
455
456         * UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
457         (WebInspector.HeapAllocationsTimelineOverviewGraph):
458         Track selected image element.
459
460         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.layout):
461         Associate image elements with their snapshot record, and reuse image
462         elements between layouts. Image element click handler can just set the
463         selectedRecord in the TimelineOverviewGraph base class.
464
465         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype.updateSelectedRecord):
466         (WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
467         Refresh snapshot icon styles when selected record changes.
468
469         * UserInterface/Views/HeapAllocationsTimelineView.js:
470         (WebInspector.HeapAllocationsTimelineView.prototype.selectRecord):
471         Show snapshot list if no record selected.
472         (WebInspector.HeapAllocationsTimelineView.prototype.userSelectedRecordFromOverview): Deleted.
473         No longer needed.
474
475         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
476         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._updateFrameMarker):
477         No need to call dispatchSelectedRecordChangedEvent manually anymore,
478         method has been removed from base class.
479
480         * UserInterface/Views/TimelineOverviewGraph.js:
481         (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
482         (WebInspector.TimelineOverviewGraph):
483         (WebInspector.TimelineOverviewGraph.prototype.dispatchSelectedRecordChangedEvent): Deleted.
484         No longer needed. Event dispatched automatically by the rAF callback.
485
486         * UserInterface/Views/TimelineRecordingContentView.js:
487         (WebInspector.TimelineRecordingContentView.prototype._recordSelected):
488         Allow switching to another timeline, if the selected record does not
489         belong to the current timeline.
490
491 2016-05-12  Joseph Pecoraro  <pecoraro@apple.com>
492
493         Web Inspector: 3.5% of time in toFixed in TimelineRecordBar updating element positions
494         https://bugs.webkit.org/show_bug.cgi?id=157608
495
496         Reviewed by Timothy Hatcher.
497
498         Avoid using toFixed to do an approximation comparison of two floating point numbers.
499         Instead keep in Numbers by just doing the approximation with Math.round(num * 100).
500         Since toFixed was doing stringification it was very expensive.
501
502         * UserInterface/Views/TimelineRecordBar.js:
503         (WebInspector.TimelineRecordBar.prototype._updateElementPosition):
504         (WebInspector.TimelineRecordBar):
505         * UserInterface/Views/TimelineRecordFrame.js:
506         (WebInspector.TimelineRecordFrame.prototype._updateElementPosition):
507         (WebInspector.TimelineRecordFrame):
508         * UserInterface/Views/TimelineRuler.js:
509         (WebInspector.TimelineRuler.prototype._updatePositionOfElement):
510
511 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
512
513         Web Inspector: 4% of time in TimelineOverviewGraph adding/removing classList styles on TimelineRecordBar
514         https://bugs.webkit.org/show_bug.cgi?id=157607
515
516         Reviewed by Brian Burg.
517
518         This gets us down to about 0.5% of time.
519
520         * UserInterface/Views/TimelineRecordBar.js:
521         (WebInspector.TimelineRecordBar.prototype.set records):
522         Only modify the classLists when the record changes.
523
524         (WebInspector.TimelineRecordBar.prototype.refresh):
525         Set unfinished once for either the uses active or not uses active cases.
526
527 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
528
529         Web Inspector: Unexpected unread notification icon next to Log after clearing via clear()
530         https://bugs.webkit.org/show_bug.cgi?id=157598
531
532         Reviewed by Timothy Hatcher.
533
534         We always show ConsoleCommand and ConsoleCommandResult messages no matter
535         what the filter is. So it doesn't make sense to mark the "log" filter
536         as having an unread notification for a ConsoleCommandResult when we can
537         see the result.
538
539         * UserInterface/Views/LogContentView.js:
540         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
541         (WebInspector.LogContentView.prototype._markScopeBarItemUnread):
542
543 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
544
545         Web Inspector: Console unread indicators should be cleared however the console clears
546         https://bugs.webkit.org/show_bug.cgi?id=157594
547
548         Reviewed by Timothy Hatcher.
549
550         * UserInterface/Views/LogContentView.js:
551         (WebInspector.LogContentView.prototype._logCleared):
552         (WebInspector.LogContentView.prototype._clearLog):
553         Move code that clears unread indicators from clearLog to logCleared
554         to handle all possible clear cases.
555
556 2016-05-11  Nikita Vasilyev  <nvasilyev@apple.com>
557
558         Web Inspector: Contents of Duration column are covered by always on (legacy) scroll bars
559         https://bugs.webkit.org/show_bug.cgi?id=157590
560
561         Reviewed by Timothy Hatcher.
562
563         * UserInterface/Views/DataGrid.css:
564         (.data-grid .data-container):
565         Always show vertical scrollbars.
566
567         (.data-grid > .header-wrapper):
568         (.data-grid > .header-wrapper::-webkit-scrollbar):
569         Show invisible scrollbar for DataGrid's header to align the header table with the content.
570
571         (.data-grid.no-header > .header-wrapper > table.header):
572         (.data-grid.no-header > table.header): Deleted.
573         (.data-grid th): Deleted.
574         * UserInterface/Views/DataGrid.js:
575         (WebInspector.DataGrid):
576         `overflow-y: scroll` doesn't work on a table element. Wrap table in a div.
577
578 2016-05-11  Matt Baker  <mattbaker@apple.com>
579
580         Web Inspector: Make it possible to do special styling on selected TimelineOverviewGraphs
581         https://bugs.webkit.org/show_bug.cgi?id=157593
582         <rdar://problem/26232886>
583
584         Reviewed by Timothy Hatcher.
585
586         * UserInterface/Views/TimelineOverview.js:
587         (WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange.updateGraphSelectedState):
588         (WebInspector.TimelineOverview.prototype._timelinesTreeSelectionDidChange):
589         Select the new overview graph and deselect the old one.
590
591         * UserInterface/Views/TimelineOverviewGraph.js:
592         (WebInspector.TimelineOverviewGraph):
593         (WebInspector.TimelineOverviewGraph.prototype.get selected):
594         (WebInspector.TimelineOverviewGraph.prototype.set selected):
595         New property, toggles "selected" class on the graph element.
596
597 2016-05-11  Nikita Vasilyev  <nvasilyev@apple.com>
598
599         Web Inspector: "Selected Element" is hard to read when searching for "Element"
600         https://bugs.webkit.org/show_bug.cgi?id=157542
601         <rdar://problem/26207464>
602
603         Reviewed by Timothy Hatcher.
604
605         Change the style of highlighted text to match Xcode.
606
607         * UserInterface/Views/LogContentView.css:
608         (.search-in-progress .console-item:not(.filtered-out-by-search).special-user-log .console-message-text .highlighted):
609         * UserInterface/Views/OpenResourceDialog.css:
610         (.open-resource-dialog > .tree-outline .item.selected .highlighted):
611         * UserInterface/Views/Variables.css:
612         (:root):
613
614 2016-05-11  Joseph Pecoraro  <pecoraro@apple.com>
615
616         Web Inspector: Hide filter bar in TimelineViews where it is not needed or not yet working
617         https://bugs.webkit.org/show_bug.cgi?id=157583
618
619         Reviewed by Timothy Hatcher.
620
621         * UserInterface/Views/HeapAllocationsTimelineView.js:
622         (WebInspector.HeapAllocationsTimelineView.prototype.get showsFilterBar):
623         (WebInspector.HeapAllocationsTimelineView.prototype.layout):
624         (WebInspector.HeapAllocationsTimelineView.prototype.updateFilter):
625         Filter bar not yet hooked up for HeapSnapshot views.
626         Make filtering work for the main timeline grid.
627         It doesn't use the normal TimelineView filter based on selected range.
628         This is intentional because it may be the case that a snapshot happens
629         outside the selected time range (via the navigation bar button) and
630         we want to show it. Otherwise a user might be confused why it is not
631         showing up in the list.
632
633         * UserInterface/Views/MemoryTimelineView.js:
634         (WebInspector.MemoryTimelineView.prototype.get showsFilterBar):
635         Filter bar not needed in the Memory timeline view.
636
637         * UserInterface/Views/ScriptClusterTimelineView.js:
638         (WebInspector.ScriptClusterTimelineView.prototype.get showsFilterBar):
639         Filter bar works for the Events timeline view.
640
641         * UserInterface/Views/ScriptProfileTimelineView.js:
642         (WebInspector.ScriptProfileTimelineView.prototype.get showsFilterBar):
643         Filter bar not yet hooked up for Profile views.
644
645         * UserInterface/Views/TimelineRecordingContentView.js:
646         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
647         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
648         (WebInspector.TimelineRecordingContentView.prototype._updateFilterBar):
649         Update the filter bar when the selection path components change, since
650         that triggers when arbitrarily deep sub-content-views change.
651
652         * UserInterface/Views/TimelineView.js:
653         (WebInspector.TimelineView.prototype.get showsFilterBar):
654         Default is yes.
655
656 2016-05-10  Joseph Pecoraro  <pecoraro@apple.com>
657
658         Web Inspector: Avoid unnecessary timeout identifier churn in TimelineManager
659         https://bugs.webkit.org/show_bug.cgi?id=157535
660
661         Reviewed by Timothy Hatcher.
662
663         * UserInterface/Controllers/TimelineManager.js:
664         (WebInspector.TimelineManager):
665         (WebInspector.TimelineManager.prototype.capturingStarted):
666         (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
667         Don't re-tickle if we tickled in the last 10ms.
668
669 2016-05-10  Matt Baker  <mattbaker@apple.com>
670
671         Web Inspector: Can't select record bar in Frames timeline
672         https://bugs.webkit.org/show_bug.cgi?id=156963
673         <rdar://problem/25898256>
674
675         Reviewed by Timothy Hatcher.
676
677         Sync record selection between the Rendering Frames grid and overview graph.
678
679         * UserInterface/Views/DataGrid.js:
680         (WebInspector.DataGridNode.prototype.hasAncestor):
681         Add helper function needed by TimelineView.
682
683         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
684         (WebInspector.RenderingFrameTimelineOverviewGraph.prototype._mouseClicked):
685         Don't deselect the selected record when clicked. Initially this seemed
686         like a good idea but it complicates the UI for no added value.
687
688         * UserInterface/Views/TimelineRecordingContentView.js:
689         (WebInspector.TimelineRecordingContentView.prototype._contentViewSelectionPathComponentDidChange):
690         Get path components from the current TimelineView instead of the
691         TimelineRecordingContentView, now that the selected record appears
692         in the bottom ContentBrowser's navigation bar.
693
694 2016-05-10  Joseph Pecoraro  <pecoraro@apple.com>
695
696         Web Inspector: Backend should initiate timeline recordings on page navigations to ensure nothing is missed
697         https://bugs.webkit.org/show_bug.cgi?id=157504
698         <rdar://problem/26188642>
699
700         Reviewed by Brian Burg.
701
702         * UserInterface/Controllers/TimelineManager.js:
703         (WebInspector.TimelineManager):
704         (WebInspector.TimelineManager.prototype.set autoCaptureOnPageLoad):
705         (WebInspector.TimelineManager.prototype.set enabledTimelineTypes):
706         (WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
707         For backends that support it, enable/disable auto capture and the instruments to use.
708
709         (WebInspector.TimelineManager.prototype.autoCaptureStarted):
710         New event, stop and start a new recording. Set a flag that we should
711         detect the auto capturing resource so we know when the stop the
712         auto capture.
713
714         (WebInspector.TimelineManager.prototype._loadNewRecording):
715         (WebInspector.TimelineManager.prototype._addRecord):
716         (WebInspector.TimelineManager.prototype._startAutoCapturing): Renamed.
717         (WebInspector.TimelineManager.prototype._attemptAutoCapturingForFrame):
718         (WebInspector.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
719         (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon):
720         (WebInspector.TimelineManager.prototype._resetAutoRecordingMaxTimeTimeout):
721         (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout):
722         (WebInspector.TimelineManager.prototype._mainResourceDidChange):
723         (WebInspector.TimelineManager.prototype._mergeScriptProfileRecords):
724         Factor out the new path, old path, and shared code for auto capturing.
725         Renamed _startAutoCapturing to _attemptAutoCapturingForFrame which
726         better matches what it tries to do.
727
728         * UserInterface/Protocol/TimelineObserver.js:
729         (WebInspector.TimelineObserver.prototype.autoCaptureStarted):
730         Inform TimelineManager.
731
732 2016-05-10  Matt Baker  <mattbaker@apple.com>
733
734         Web Inspector: Debugger sidebar should refresh when Debug UI enabled/disabled
735         https://bugs.webkit.org/show_bug.cgi?id=157540
736         <rdar://problem/26207064>
737
738         Reviewed by Timothy Hatcher.
739
740         * UserInterface/Views/DebuggerSidebarPanel.js:
741         (WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved.removeScript):
742         (WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
743         Remove element from both tree outlines, if it exists.
744
745 2016-05-10  Matt Baker  <mattbaker@apple.com>
746
747         Web Inspector: TimelineOverview assertion failed: Missing overview graph for timeline type undefined
748         https://bugs.webkit.org/show_bug.cgi?id=157533
749         <rdar://problem/26204033>
750
751         Reviewed by Timothy Hatcher.
752
753         * UserInterface/Views/TimelineRecordingContentView.js:
754         (WebInspector.TimelineRecordingContentView.prototype._recordWasFiltered):
755         The OverviewTimelineView's represented object is the entire recording,
756         and TimelineOverview.recordWasFiltered expects a timeline. Return early
757         since no graph in the overview needs updating.
758
759 2016-05-10  Matt Baker  <mattbaker@apple.com>
760
761         Web Inspector: Call Trees and Memory view blank
762         https://bugs.webkit.org/show_bug.cgi?id=157486
763         <rdar://problem/26178404>
764
765         Reviewed by Timothy Hatcher.
766
767         * UserInterface/Views/TimelineRecordingContentView.js:
768         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
769         (WebInspector.TimelineRecordingContentView.prototype._updateTimes):
770         Setting current time now handled by _updateTimelineViewTimes.
771         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
772         Update times for the current TimelineView when the recording ends.
773         This ensures that views that don't call TimelineView.setupDataGrid are
774         able to update state that depends on the ruler selection.
775
776         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):
777         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
778         Renamed from _updateTimelineViewSelection. Sets start, end, and current times.
779
780 2016-05-10  Devin Rousso  <dcrousso+webkit@gmail.com>
781
782         Web Inspector: Cleanup super getter/setter now that underlying issue is fixed
783         https://bugs.webkit.org/show_bug.cgi?id=157488
784         <rdar://problem/26179120>
785
786         Reviewed by Brian Burg.
787
788         Addressed FIXMEs for bug 147064:
789         <https://webkit.org/b/147064> Getter and setter on super are called with wrong "this" object
790
791         * UserInterface/Views/VisualStyleKeywordPicker.js:
792         (WebInspector.VisualStyleKeywordPicker.prototype.get value):
793         (WebInspector.VisualStyleKeywordPicker.prototype.set value):
794         (WebInspector.VisualStyleKeywordPicker.prototype.get synthesizedValue):
795         (WebInspector.VisualStyleKeywordPicker.prototype._getValue): Deleted.
796         (WebInspector.VisualStyleKeywordPicker.prototype._setValue): Deleted.
797         (WebInspector.VisualStyleKeywordPicker.prototype._generateSynthesizedValue): Deleted.
798
799         * UserInterface/Views/VisualStyleNumberInputBox.js:
800         (WebInspector.VisualStyleNumberInputBox.prototype.set specialPropertyPlaceholderElementText):
801
802         * UserInterface/Views/VisualStyleTimingEditor.js:
803         (WebInspector.VisualStyleTimingEditor.prototype.get value):
804         (WebInspector.VisualStyleTimingEditor.prototype.set value):
805         (WebInspector.VisualStyleTimingEditor.prototype.get synthesizedValue):
806         (WebInspector.VisualStyleTimingEditor.prototype._getValue): Deleted.
807         (WebInspector.VisualStyleTimingEditor.prototype._setValue): Deleted.
808         (WebInspector.VisualStyleTimingEditor.prototype._generateSynthesizedValue): Deleted.
809
810 2016-05-09  Matt Baker  <mattbaker@apple.com>
811
812         Web Inspector: Filtering by Errors/Warnings should not filter Breakpoints list
813         https://bugs.webkit.org/show_bug.cgi?id=157481
814         <rdar://problem/26177346>
815
816         Reviewed by Timothy Hatcher.
817
818         * Localizations/en.lproj/localizedStrings.js:
819         New UI strings.
820
821         * UserInterface/Views/DebuggerSidebarPanel.js:
822         (WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
823         Only filter tree elements belonging to the scripts tree outline.
824         (WebInspector.DebuggerSidebarPanel):
825         Drive-by cleanup of Issues filter button tooltips.
826
827 2016-05-09  Nikita Vasilyev  <nvasilyev@apple.com>
828
829         REGRESSION: Web Inspector: DOM path bar blinks when modifying inline styles
830         https://bugs.webkit.org/show_bug.cgi?id=149258
831         <rdar://problem/22737843>
832
833         Reviewed by Timothy Hatcher.
834
835         * UserInterface/Base/Utilities.js:
836         (Array.shallowEqual):
837         * UserInterface/Views/ContentBrowser.js:
838         (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
839         (WebInspector.ContentBrowser.prototype._removeAllNavigationItems):
840         Don't re-render the navigation bar when all new navigation items match the previous ones.
841
842         * UserInterface/Views/HierarchicalPathNavigationItem.js:
843         (WebInspector.HierarchicalPathNavigationItem.set components.let.componentsEqual):
844         (WebInspector.HierarchicalPathNavigationItem.prototype.set components):
845         Don't re-render HierarchicalPathComponent when all new path components match the previous ones.
846
847 2016-05-09  Matt Baker  <mattbaker@apple.com>
848
849         Web Inspector: Remove Global Breakpoints folder
850         https://bugs.webkit.org/show_bug.cgi?id=157478
851         <rdar://problem/26176524>
852
853         Reviewed by Timothy Hatcher.
854
855         * Localizations/en.lproj/localizedStrings.js:
856         Remove UI string.
857
858         * UserInterface/Views/DebuggerSidebarPanel.js:
859         (WebInspector.DebuggerSidebarPanel):
860         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
861         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
862         Remove references to folder tree element.
863
864         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements.isSpecialBreakpoint):
865         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
866         Top level comparison should check for "special" breakpoints.
867
868 2016-05-09  Matt Baker  <mattbaker@apple.com>
869
870         Web Inspector: Heap Snapshot Timeline view can be live
871         https://bugs.webkit.org/show_bug.cgi?id=157487
872         <rdar://problem/26178439>
873
874         Reviewed by Joseph Pecoraro.
875
876         * UserInterface/Views/HeapAllocationsTimelineView.js:
877         (WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData): Deleted.
878         Don't override, should return true.
879
880 2016-05-09  Manuel Rego Casasnovas  <rego@igalia.com>
881
882         [css-grid] Update Grid Layout properties in CSSKeywordCompletions.js
883         https://bugs.webkit.org/show_bug.cgi?id=157166
884
885         Reviewed by Timothy Hatcher.
886
887         The CSS Grid Layout properties have been changing on the spec,
888         however they haven't been updated in CSSKeywordCompletions for a long time.
889         Update them using the last spec draft:
890         https://drafts.csswg.org/css-grid/#property-index
891
892         * UserInterface/Models/CSSKeywordCompletions.js:
893
894 2016-05-09  Matt Baker  <mattbaker@apple.com>
895
896         Web Inspector: Cleanup issue tree elements in the Debugger sidebar
897         https://bugs.webkit.org/show_bug.cgi?id=157469
898         <rdar://problem/26162999>
899
900         Reviewed by Timothy Hatcher.
901
902         * UserInterface/Views/DebuggerSidebarPanel.js:
903         (WebInspector.DebuggerSidebarPanel):
904         (WebInspector.DebuggerSidebarPanel.prototype._addIssue):
905         Don't add duplicate issue tree elements.
906         (WebInspector.DebuggerSidebarPanel.prototype._handleIssuesCleared):
907         Remove issues from the correct tree outline.
908
909         * UserInterface/Views/IssueTreeElement.css:
910         (.issue .icon):
911         (.issue.warning .icon):
912         (.issue.error .icon):
913         Match dashboard icons.
914
915 2016-05-09  Matt Baker  <mattbaker@apple.com>
916
917         Web Inspector: Show in progress message in Timeline views that do not show data until the recording finishes
918         https://bugs.webkit.org/show_bug.cgi?id=156761
919         <rdar://problem/25970771>
920
921         Reviewed by Timothy Hatcher.
922
923         * Localizations/en.lproj/localizedStrings.js:
924         New UI strings.
925
926         * UserInterface/Main.html:
927         New view class.
928
929         * UserInterface/Views/HeapAllocationsTimelineView.js:
930         (WebInspector.HeapAllocationsTimelineView.prototype.get showsLiveRecordingData):
931         * UserInterface/Views/RenderingFrameTimelineView.js:
932         (WebInspector.RenderingFrameTimelineView.prototype.get showsLiveRecordingData):
933         * UserInterface/Views/ScriptDetailsTimelineView.js:
934         (WebInspector.ScriptDetailsTimelineView.prototype.get showsLiveRecordingData):
935         * UserInterface/Views/ScriptProfileTimelineView.js:
936         (WebInspector.ScriptProfileTimelineView.prototype.get showsLiveRecordingData):
937         Don't show live recording data.
938
939         * UserInterface/Views/ScriptClusterTimelineView.js:
940         (WebInspector.ScriptClusterTimelineView.prototype.get showsLiveRecordingData):
941         Forward property to current child TimelineView.
942
943         * UserInterface/Views/TimelineRecordingContentView.css:
944         (.content-view.timeline-recording > .content-browser .recording-progress):
945         (.content-view.timeline-recording > .content-browser .recording-progress > .status):
946         (.content-view.timeline-recording > .content-browser .recording-progress > .status > .indeterminate-progress-spinner):
947         New progress view styles.
948
949         * UserInterface/Views/TimelineRecordingContentView.js:
950         (WebInspector.TimelineRecordingContentView):
951         (WebInspector.TimelineRecordingContentView.prototype._currentContentViewDidChange):
952         (WebInspector.TimelineRecordingContentView.prototype._capturingStarted):
953         (WebInspector.TimelineRecordingContentView.prototype._capturingStopped):
954         Refresh progress view visibility.
955
956         (WebInspector.TimelineRecordingContentView.prototype._updateProgressView):
957         Show the progress view if we're currently capturing, and showing a view
958         that doesn't support showing live data.
959
960         * UserInterface/Views/TimelineRecordingProgressView.js:
961         (WebInspector.TimelineRecordingProgressView):
962         (WebInspector.TimelineRecordingProgressView.prototype.get visible):
963         (WebInspector.TimelineRecordingProgressView.prototype.set visible):
964         Show a status message, indeterminate progress spinner, and Stop Recording
965         button while timeline data is being recorded.
966
967         * UserInterface/Views/TimelineView.js:
968         (WebInspector.TimelineView.prototype.get showsLiveRecordingData):
969         Implemented by TimelineViews that don't support showing data while recording.
970
971         * UserInterface/Views/Variables.css:
972         (:root):
973         Add --panel-background-color-light for the progress view.
974
975 2016-05-08  Matt Baker  <mattbaker@apple.com>
976
977         Web Inspector: Add Breakpoints and Scripts folders to Debugger sidebar
978         https://bugs.webkit.org/show_bug.cgi?id=151119
979         <rdar://problem/23488916>
980
981         Reviewed by Timothy Hatcher.
982
983         Add a collapsible Sources section to the Debugger beneath the existing
984         Breakpoints section.
985
986         * UserInterface/Views/DebuggerSidebarPanel.css:
987         Remove unused CSS class names.
988
989         (.sidebar > .panel.navigation.debugger .details-section.scripts:not(.collapsed)):
990         Hide scripts section bottom border when expanded. As the last
991         section, a border only adds visual clutter.
992
993         (.sidebar > .panel.navigation.debugger .details-section.scripts): Deleted.
994         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts): Deleted.
995         (.sidebar > .panel.navigation.debugger .details-section.scripts .header): Deleted.
996         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts .header): Deleted.
997         (.sidebar > .panel.navigation.debugger .details-section.scripts.collapsed > .content): Deleted.
998         (.sidebar > .panel.navigation.debugger.paused .details-section.scripts.collapsed > .content): Deleted.
999         No longer needed.
1000
1001         * UserInterface/Views/DebuggerSidebarPanel.js:
1002         (WebInspector.DebuggerSidebarPanel):
1003         Create separate "Breakpoints" and "Sources" sections, and make filter
1004         placeholder text generic. Remove unused class from breakpoints tree.
1005
1006         (WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject):
1007         Check both breakpoint and scripts tree outlines.
1008
1009         (WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
1010         (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToTreeOutline):
1011         Make helper function generic.
1012
1013         (WebInspector.DebuggerSidebarPanel.prototype._addResource):
1014         (WebInspector.DebuggerSidebarPanel.prototype._mainResourceDidChange):
1015         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
1016         Add resources to the scripts tree.
1017
1018         (WebInspector.DebuggerSidebarPanel.prototype._scriptsCleared):
1019         Clear the scripts tree.
1020
1021         (WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
1022         Remove script element when last breakpoint is removed.
1023
1024         (WebInspector.DebuggerSidebarPanel.prototype._addIssue):
1025         (WebInspector.DebuggerSidebarPanel.prototype._addTreeElementForSourceCodeToContentTreeOutline): Deleted.
1026         Renamed _addTreeElementForSourceCodeToTreeOutline.
1027
1028 2016-05-08  Matt Baker  <mattbaker@apple.com>
1029
1030         Web Inspector: SourceCodeTextEditor issue widgets/line styles should reset when log is cleared
1031         https://bugs.webkit.org/show_bug.cgi?id=157460
1032         <rdar://problem/26159633>
1033
1034         Reviewed by Timothy Hatcher.
1035
1036         * UserInterface/Views/SourceCodeTextEditor.js:
1037         (WebInspector.SourceCodeTextEditor):
1038         (WebInspector.SourceCodeTextEditor.prototype._logCleared):
1039         Clear issue widgets and CodeMirror line class names when log cleared.
1040
1041 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
1042
1043         Web Inspector: Inspect Element and Element Selection searching should work with Shadow DOM Nodes
1044         https://bugs.webkit.org/show_bug.cgi?id=157446
1045         <rdar://problem/24688447>
1046
1047         Reviewed by Ryosuke Niwa.
1048
1049         * UserInterface/Models/DOMNode.js:
1050         (WebInspector.DOMNode):
1051         Shadow DOM nodes did not have a parent, and so when attempting
1052         to create DOM Tree elements up the chain, we were failing at
1053         shadow boundaries. Create the parent relationship, the parent
1054         already treats it as a child.
1055
1056         * UserInterface/Views/DOMTreeOutline.js:
1057         (WebInspector.DOMTreeOutline.prototype._revealAndSelectNode):
1058         Whenever we try to reveal and select an element in a shadow tree
1059         but the setting to show shadow DOM is disabled, walk up until
1060         we are out of the shadow tree.
1061
1062 2016-05-06  Nikita Vasilyev  <nvasilyev@apple.com>
1063
1064         Web Inspector: Unexpected white border at the bottom of Debugger filter bar
1065         https://bugs.webkit.org/show_bug.cgi?id=157430
1066         <rdar://problem/26146602>
1067
1068         Reviewed by Timothy Hatcher.
1069
1070         Remove the semi-transparent white borders.
1071
1072         * UserInterface/Views/NavigationBar.css:
1073         (.navigation-bar): Deleted.
1074         * UserInterface/Views/SearchSidebarPanel.css:
1075         (.sidebar > .panel.navigation.search > .search-bar): Deleted.
1076
1077 2016-05-06  Joseph Pecoraro  <pecoraro@apple.com>
1078
1079         Web Inspector: Remove HeapSnapshot Summary View
1080         https://bugs.webkit.org/show_bug.cgi?id=157385
1081
1082         Reviewed by Timothy Hatcher.
1083
1084         * Localizations/en.lproj/localizedStrings.js:
1085         * UserInterface/Main.html:
1086         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1087         (WebInspector.HeapSnapshotClusterContentView):
1088         (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView): Deleted.
1089         (WebInspector.HeapSnapshotClusterContentView.prototype.showSummary): Deleted.
1090         (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
1091         (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
1092         (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
1093         * UserInterface/Views/HeapSnapshotSummaryContentView.css: Removed.
1094         * UserInterface/Views/HeapSnapshotSummaryContentView.js: Removed.
1095         * UserInterface/Views/Variables.css:
1096         (:root):
1097
1098 2016-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
1099
1100         [css-grid] Unprefix CSS Grid Layout properties
1101         https://bugs.webkit.org/show_bug.cgi?id=157137
1102
1103         Reviewed by Simon Fraser.
1104
1105         Remove "-webkit" prefix from all the grid layout properties,
1106         including the display value.
1107         Update the source code to remove the prefix where it was used too.
1108
1109         * UserInterface/Models/CSSKeywordCompletions.js:
1110
1111 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
1112
1113         REGRESSION(r200474): Exception in autocompletion - `getCompletions` not found
1114         https://bugs.webkit.org/show_bug.cgi?id=157408
1115
1116         Reviewed by Timothy Hatcher.
1117
1118         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1119         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
1120         This function was renamed, but this instance was missed.
1121
1122 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
1123
1124         Web Inspector: Provide go-to links next to Functions in GC Root Path popover
1125         https://bugs.webkit.org/show_bug.cgi?id=157381
1126         <rdar://problem/26122531>
1127
1128         Reviewed by Timothy Hatcher.
1129
1130         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1131         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
1132         For functions, create a go-to-link. Insert a placeholder to replace
1133         so that the popover sizes itself with a potential go-to arrow, as
1134         it won't resize when the go-to arrows get inserted.
1135
1136         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
1137         (.heap-snapshot-instance-popover-content .node .go-to-link):
1138         Move down 1px to align better with the text.
1139
1140 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
1141
1142         Web Inspector: HeapSnapshot should exploratory Object Graph view
1143         https://bugs.webkit.org/show_bug.cgi?id=157371
1144         <rdar://problem/26107304>
1145
1146         Reviewed by Timothy Hatcher.
1147
1148         HeapSnapshots now have two ContentViews for viewing the graph.
1149
1150         HeapSnapshotInstancesContentView:
1151           - top level are Class Categories nodes
1152           - categories expand to Instances
1153           - instances expand to show what they retain
1154           - retained sizes only shown for dominated nodes of the instance
1155
1156         HeapSnapshotObjectGraphContentView:
1157           - top level are GlobalObject or Window nodes
1158           - expand to show what they retain
1159           - retained sizes are shown for all nodes, everything is shown
1160
1161         This also provides a custom preview for Window instances. Instead of
1162         showing an ObjectPreview, it just shows the `window.location.href`
1163         for that instance, which is useful when there are multiple Window
1164         instances for different frames.
1165
1166         * Localizations/en.lproj/localizedStrings.js:
1167         * UserInterface/Main.html:
1168         New "Object Graph" string and new files.
1169
1170         * UserInterface/Images/HeapSnapshotObjectGraph.svg: Added.
1171         * UserInterface/Images/gtk/HeapSnapshotObjectGraph.svg: Added.
1172         * UserInterface/Views/PathComponentIcons.css:
1173         (.heap-snapshot-object-graph-icon .icon):
1174         Copy the red [{}] icon from Style Rules.
1175
1176         * UserInterface/Views/HeapSnapshotClusterContentView.js:
1177         (WebInspector.HeapSnapshotClusterContentView):
1178         (WebInspector.HeapSnapshotClusterContentView.prototype.get objectGraphContentView):
1179         (WebInspector.HeapSnapshotClusterContentView.prototype.showObjectGraph):
1180         (WebInspector.HeapSnapshotClusterContentView.prototype._supportsObjectGraph):
1181         (WebInspector.HeapSnapshotClusterContentView.prototype._pathComponentForContentView):
1182         (WebInspector.HeapSnapshotClusterContentView.prototype._identifierForContentView):
1183         (WebInspector.HeapSnapshotClusterContentView.prototype._showContentViewForIdentifier):
1184         Include an "Object Graph" content view. This is unavailable in Diff views
1185         but is available for individual HeapSnapshots.
1186
1187         * UserInterface/Views/HeapSnapshotContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesContentView.js.
1188         (WebInspector.HeapSnapshotContentView):
1189         (WebInspector.HeapSnapshotContentView.prototype.shown):
1190         (WebInspector.HeapSnapshotContentView.prototype.hidden):
1191         (WebInspector.HeapSnapshotContentView.prototype._sortDataGrid):
1192         (WebInspector.HeapSnapshotContentView.prototype._heapSnapshotDataGridTreeDidPopulate):
1193         (WebInspector.HeapSnapshotInstancesContentView):
1194         (WebInspector.HeapSnapshotObjectGraphContentView):
1195         Share and generalize a HeapSnapshot ContentView. The only differences are
1196         the DataGrid columns, DataGridTree class, and identifier prefix for settings.
1197
1198         * UserInterface/Views/HeapSnapshotDataGridTree.js: Renamed from Source/WebInspectorUI/UserInterface/Views/HeapSnapshotInstancesDataGridTree.js.
1199         (WebInspector.HeapSnapshotDataGridTree):
1200         (WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
1201         (WebInspector.HeapSnapshotDataGridTree.prototype.get heapSnapshot):
1202         (WebInspector.HeapSnapshotDataGridTree.prototype.get visible):
1203         (WebInspector.HeapSnapshotDataGridTree.prototype.get popover):
1204         (WebInspector.HeapSnapshotDataGridTree.prototype.get popoverNode):
1205         (WebInspector.HeapSnapshotDataGridTree.prototype.set popoverNode):
1206         (WebInspector.HeapSnapshotDataGridTree.prototype.get children):
1207         (WebInspector.HeapSnapshotDataGridTree.prototype.appendChild):
1208         (WebInspector.HeapSnapshotDataGridTree.prototype.insertChild):
1209         (WebInspector.HeapSnapshotDataGridTree.prototype.removeChildren):
1210         (WebInspector.HeapSnapshotDataGridTree.prototype.set sortComparator):
1211         (WebInspector.HeapSnapshotDataGridTree.prototype.sort):
1212         (WebInspector.HeapSnapshotDataGridTree.prototype.shown):
1213         (WebInspector.HeapSnapshotDataGridTree.prototype.hidden):
1214         (WebInspector.HeapSnapshotDataGridTree.prototype.willDismissPopover):
1215         (WebInspector.HeapSnapshotDataGridTree.prototype.get alwaysShowRetainedSize):
1216         (WebInspector.HeapSnapshotDataGridTree.prototype.populateTopLevel):
1217         (WebInspector.HeapSnapshotDataGridTree.prototype.didPopulate):
1218         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get alwaysShowRetainedSize):
1219         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
1220         (WebInspector.HeapSnapshotInstancesDataGridTree):
1221         (WebInspector.HeapSnapshotObjectGraphDataGridTree.prototype.get alwaysShowRetainedSize):
1222         (WebInspector.HeapSnapshotObjectGraphDataGridTree.prototype.populateTopLevel):
1223         (WebInspector.HeapSnapshotObjectGraphDataGridTree):
1224
1225         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1226         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1227         Start using different previews based on instance type.
1228
1229         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateError):
1230         Common preview error logic. Also, don't output "Internal object" next to things
1231         like Structure, InferredType, etc. Just don't output anything. Eventually, if
1232         we provide preview data, something will show, but for now nothing is fine.
1233
1234         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview.inspectedPage_window_getLocationHref):
1235         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populateWindowPreview):
1236         Custom preview logic for Window's gets `window.location.href` on the instance if it is alive.
1237
1238         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
1239         Normal preview logic.
1240
1241         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
1242         (.heap-snapshot > .data-grid tr:not(.selected) td .preview-error): Deleted.
1243         The red text for errors was standing out too much. Make it the default black.
1244
1245         * UserInterface/Views/HeapAllocationsTimelineView.js:
1246         (WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
1247         Better variable name.
1248
1249         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1250         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getArrayCompletions):
1251         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
1252         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getArrayCompletions): Deleted.
1253         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.getCompletions): Deleted.
1254         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.evaluated):
1255         Try to be clearer about functions that run on the inspected page
1256         by using the pattern with inspectedPage_<thisObject>_functionName.
1257
1258 2016-05-05  Nikita Vasilyev  <nvasilyev@apple.com>
1259
1260         Web Inspector: Console is unresponsive for >10 seconds when it tries to render 10,000 messages
1261         https://bugs.webkit.org/show_bug.cgi?id=157368
1262         <rdar://problem/26103657>
1263
1264         Reviewed by Timothy Hatcher.
1265
1266         Render only up to 100 messages per animation frame to keep the Inspector's UI responsive.
1267
1268         * UserInterface/Controllers/JavaScriptLogViewController.js:
1269         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
1270
1271 2016-05-05  Joseph Pecoraro  <pecoraro@apple.com>
1272
1273         Crash if you type "debugger" in the console and continue
1274         https://bugs.webkit.org/show_bug.cgi?id=156924
1275         <rdar://problem/25884189>
1276
1277         Reviewed by Mark Lam.
1278
1279         * UserInterface/Test/InspectorProtocol.js:
1280         (InspectorProtocol.sendCommand):
1281         Simplify sending a command with no parameters.
1282
1283 2016-05-04  Nikita Vasilyev  <nvasilyev@apple.com>
1284
1285         REGRESSION (r200401): Web Inspector: TypeError: undefined is not an object (evaluating 'messageElement.classList')
1286         https://bugs.webkit.org/show_bug.cgi?id=157356
1287         <rdar://problem/26097424>
1288
1289         Reviewed by Timothy Hatcher.
1290
1291         * UserInterface/Views/LogContentView.js:
1292         (WebInspector.LogContentView.prototype._reappendProvisionalMessages):
1293         Don't filter messages since we already do that in didAppendConsoleMessageView.
1294
1295 2016-05-04  Joseph Pecoraro  <pecoraro@apple.com>
1296
1297         Web Inspector: GC Root Path sometimes does not go up to Window
1298         https://bugs.webkit.org/show_bug.cgi?id=156768
1299         <rdar://problem/25816131>
1300
1301         Reviewed by Geoffrey Garen.
1302
1303         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1304         (WebInspector.HeapSnapshotNodeProxy.prototype.retainers):
1305         Include paths for debugging.
1306
1307         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1308         (HeapSnapshot.prototype.shortestGCRootPath):
1309         (HeapSnapshot.prototype._isNodeGlobalObject):
1310         Prefer the shortest GC Root Path that contains a known
1311         global object, otherwise fallback to the shortest.
1312
1313         (HeapSnapshot.prototype.retainers):
1314         Include paths for debugging.
1315
1316 2016-05-03  Nikita Vasilyev  <nvasilyev@apple.com>
1317
1318         Web Inspector: Adding a new console message shouldn't modify DOM when the console log is hidden
1319         https://bugs.webkit.org/show_bug.cgi?id=155629
1320         <rdar://problem/25235470>
1321
1322         Reviewed by Timothy Hatcher.
1323
1324         Instead of rendering console messages right away, store them (in _pendingMessages)
1325         and render only when the console tab or the split console is visible.
1326         Also, batch rendering operations using requestAnimationFrame.
1327
1328         * UserInterface/Controllers/JavaScriptLogViewController.js:
1329         (WebInspector.JavaScriptLogViewController):
1330         Store console message views in _pendingMessages.
1331
1332         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
1333         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
1334         Use requestAnimationFrame batching. Run isScrolledToBottom() at most only once
1335         per batch.
1336
1337         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessagesSoon):
1338         (WebInspector.JavaScriptLogViewController.prototype._didRenderConsoleMessageView):
1339         There is no need to run scrollToBottom again.
1340
1341         * UserInterface/Views/ConsoleCommandView.js:
1342         (WebInspector.ConsoleCommandView):
1343         Move all DOM operations to a new render method.
1344
1345         (WebInspector.ConsoleCommandView.prototype.render):
1346         * UserInterface/Views/ConsoleMessageView.js:
1347         (WebInspector.ConsoleMessageView):
1348         (WebInspector.ConsoleMessageView.prototype.render):
1349         (WebInspector.ConsoleMessageView.prototype.set repeatCount):
1350         (WebInspector.ConsoleMessageView.prototype._renderRepeatCount):
1351         * UserInterface/Views/LogContentView.js:
1352         (WebInspector.LogContentView.prototype.shown):
1353         When the console tab or the split console is opened render all pending messages.
1354
1355         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
1356         Don't call needsLayout on every added console message. Call it only once per
1357         requestAnimationFrame. Also, no need to scrollToBottom once again.
1358
1359         (WebInspector.LogContentView.prototype._messageAdded):
1360         (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
1361         (WebInspector.LogContentView.prototype._scopeFromMessageLevel): Deleted.
1362         (WebInspector.LogContentView.prototype._markScopeBarItemUnread): Added.
1363         Rename _pulseScopeBarItemBorder. In the very first version the border was pulsing,
1364         but now we use small colored circles instead.
1365
1366 2016-05-03  Joseph Pecoraro  <pecoraro@apple.com>
1367
1368         Web Inspector: Give console.time/timeEnd a default label and warnings
1369         https://bugs.webkit.org/show_bug.cgi?id=157325
1370         <rdar://problem/26073290>
1371
1372         Reviewed by Timothy Hatcher.
1373
1374         * UserInterface/Models/NativeFunctionParameters.js:
1375         Update the convenience signature.
1376
1377 2016-05-03  Joseph Pecoraro  <pecoraro@apple.com>
1378
1379         Web Inspector: Update window.console function API description strings in Console
1380         https://bugs.webkit.org/show_bug.cgi?id=157298
1381
1382         Reviewed by Timothy Hatcher.
1383
1384         * UserInterface/Models/NativeFunctionParameters.js:
1385         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1386         (WebInspector.ObjectTreePropertyTreeElement.prototype._functionParameterString):
1387         The Console object changed how it works. Work with the new
1388         structure, and the older structure for legacy backends.
1389
1390 2016-05-03  Joseph Pecoraro  <pecoraro@apple.com>
1391
1392         Web Inspector: Allow format specifiers in console.assert and console.trace
1393         https://bugs.webkit.org/show_bug.cgi?id=157295
1394         <rdar://problem/26056039>
1395
1396         Reviewed by Timothy Hatcher.
1397
1398         * UserInterface/Views/ConsoleMessageView.js:
1399         (WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
1400         Treat the first argument as a format specifier.
1401
1402 2016-05-02  Commit Queue  <commit-queue@webkit.org>
1403
1404         Unreviewed, rolling out r200337.
1405         https://bugs.webkit.org/show_bug.cgi?id=157294
1406
1407         Console hangs when evaluating expresisons (Requested by
1408         JoePeck on #webkit).
1409
1410         Reverted changeset:
1411
1412         "Web Inspector: Adding a new console message shouldn't modify
1413         DOM when the console log is hidden"
1414         https://bugs.webkit.org/show_bug.cgi?id=155629
1415         http://trac.webkit.org/changeset/200337
1416
1417 2016-05-02  Joseph Pecoraro  <pecoraro@apple.com>
1418
1419         Web Inspector: Unexpected "Script Element #" resources in Debugger Sidebar
1420         https://bugs.webkit.org/show_bug.cgi?id=157280
1421
1422         Reviewed by Timothy Hatcher.
1423
1424         * UserInterface/Views/DebuggerSidebarPanel.js:
1425         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
1426         Don't include Script Element resources in the debugger sidebar by default.
1427
1428 2016-05-02  Joseph Pecoraro  <pecoraro@apple.com>
1429
1430         Web Inspector: Prefer "Console Evaluation" to "Eval Code" if we know it was a console evaluation
1431         https://bugs.webkit.org/show_bug.cgi?id=157278
1432
1433         Reviewed by Timothy Hatcher.
1434
1435         * Localizations/en.lproj/localizedStrings.js:
1436         "Console Evaluation" string.
1437
1438         * UserInterface/Controllers/DebuggerManager.js:
1439         (WebInspector.DebuggerManager.prototype._sourceCodeLocationFromPayload): Deleted.
1440         Delete an assert that would throw when the location is noSourceID:-1:-1.
1441
1442         * UserInterface/Models/CallFrame.js:
1443         (WebInspector.CallFrame.fromDebuggerPayload):
1444         (WebInspector.CallFrame.fromPayload):
1445         (WebInspector.CallFrame):
1446         When this is in a Console Evalution provide better values.
1447
1448         * UserInterface/Models/GarbageCollection.js:
1449         (WebInspector.GarbageCollection):
1450         Drive-by address a common assertions seen while paused.
1451
1452 2016-05-02  Nikita Vasilyev  <nvasilyev@apple.com>
1453
1454         Web Inspector: Adding a new console message shouldn't modify DOM when the console log is hidden
1455         https://bugs.webkit.org/show_bug.cgi?id=155629
1456         <rdar://problem/25235470>
1457
1458         Reviewed by Timothy Hatcher.
1459
1460         Instead of rendering console messages right away, store them (in _pendingMessages)
1461         and render only when the console tab or the split console is visible.
1462         Also, batch rendering operations using requestAnimationFrame.
1463
1464         * UserInterface/Controllers/JavaScriptLogViewController.js:
1465         (WebInspector.JavaScriptLogViewController):
1466         Store console message views in _pendingMessages.
1467
1468         (WebInspector.JavaScriptLogViewController.prototype._appendConsoleMessageView):
1469         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessages):
1470         Use requestAnimationFrame batching. Run isScrolledToBottom() at most only once
1471         per batch.
1472
1473         (WebInspector.JavaScriptLogViewController.prototype.renderPendingMessagesSoon):
1474         (WebInspector.JavaScriptLogViewController.prototype._didRenderConsoleMessageView):
1475         There is no need to run scrollToBottom again.
1476
1477         * UserInterface/Views/ConsoleCommandView.js:
1478         (WebInspector.ConsoleCommandView):
1479         Move all DOM operations to a new render method.
1480
1481         (WebInspector.ConsoleCommandView.prototype.render):
1482         * UserInterface/Views/ConsoleMessageView.js:
1483         (WebInspector.ConsoleMessageView):
1484         (WebInspector.ConsoleMessageView.prototype.render):
1485         (WebInspector.ConsoleMessageView.prototype.set repeatCount):
1486         (WebInspector.ConsoleMessageView.prototype._renderRepeatCount):
1487         * UserInterface/Views/LogContentView.js:
1488         (WebInspector.LogContentView.prototype.shown):
1489         When the console tab or the split console is opened render all pending messages.
1490
1491         (WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
1492         No need to scrollToBottom once again.
1493
1494         (WebInspector.LogContentView.prototype._messageAdded):
1495         (WebInspector.LogContentView.prototype._previousMessageRepeatCountUpdated):
1496         (WebInspector.LogContentView.prototype._scopeFromMessageLevel): Deleted.
1497         (WebInspector.LogContentView.prototype._markScopeBarItemUnread): Added.
1498         Rename _pulseScopeBarItemBorder. In the very first version the border was pulsing,
1499         but now we use small colored circles instead.
1500
1501 2016-05-02  Joseph Pecoraro  <pecoraro@apple.com>
1502
1503         Uncaught Exception: TypeError: null is not an object (evaluating 'sourceCodeLocation.formattedLineNumber')
1504         https://bugs.webkit.org/show_bug.cgi?id=157239
1505         <rdar://problem/26030791>
1506
1507         Reviewed by Timothy Hatcher.
1508
1509         * UserInterface/Controllers/IssueManager.js:
1510         (WebInspector.IssueManager.issueMatchSourceCode):
1511         Require a sourceCodeLocation for Script errors.
1512
1513         * UserInterface/Views/SourceCodeTextEditor.js:
1514         (WebInspector.SourceCodeTextEditor.prototype._addIssue):
1515         Be safe against a missing sourceCodeLocation.
1516
1517         * UserInterface/Views/SourceCodeTextEditor.css:
1518         (.source-code.text-editor > .CodeMirror .issue-widget.inline > .arrow):
1519         (@media (-webkit-min-device-pixel-ratio: 2)):
1520         Adjust the style, on non-Retina the inline message arrow would sometimes
1521         be detached from the warning message.
1522
1523 2016-05-02  Timothy Hatcher  <timothy@apple.com>
1524
1525         Web Inspector: Zooming of docked Web Inspector affects the webpage, but reset to 0 does not
1526         https://bugs.webkit.org/show_bug.cgi?id=157234
1527         rdar://problem/26027177
1528
1529         Always prevent default for the zoom keyboard shortcuts to avoid passing the event back to
1530         Safari to handle and add explicit beeps when max/min is hit.
1531
1532         Reviewed by Brian Burg.
1533
1534         * UserInterface/Base/Main.js:
1535         (WebInspector.contentLoaded): Removed setting implicitlyPreventsDefault on zoom keyboard shortcuts.
1536         (WebInspector._increaseZoom): Add explicit beep and remove preventDefault call.
1537         (WebInspector._decreaseZoom): Ditto.
1538
1539 2016-05-01  Dan Bernstein  <mitz@apple.com>
1540
1541         WebInspectorUI.framework/Versions/A/Resources/Images/Legacy is empty
1542         https://bugs.webkit.org/show_bug.cgi?id=157248
1543
1544         Reviewed by Timothy Hatcher.
1545
1546         * UserInterface/Images/Legacy: Removed.
1547
1548 2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>
1549
1550         Web Inspector: Issues inspecting the inspector, pausing on breakpoints causes content to not load
1551         https://bugs.webkit.org/show_bug.cgi?id=157198
1552         <rdar://problem/26011049>
1553
1554         Reviewed by Timothy Hatcher.
1555
1556         * UserInterface/Protocol/InspectorBackend.js:
1557         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
1558         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
1559         While auditing, use simpler check.
1560
1561         * UserInterface/Proxies/FormatterWorkerProxy.js:
1562         (WebInspector.FormatterWorkerProxy.canFormat): Deleted.
1563         While auditing, remove dead code.
1564
1565 2016-04-29  Timothy Hatcher  <timothy@apple.com>
1566
1567         Web Inspector: Scrolling in Timelines causes flashing of the DataGrid
1568         https://bugs.webkit.org/show_bug.cgi?id=157212
1569         rdar://problem/25994717
1570
1571         Listen for mousewheel events too so we can update the visible rows sooner.
1572
1573         Reviewed by Joseph Pecoraro.
1574
1575         * UserInterface/Views/DataGrid.js:
1576         (WebInspector.DataGrid): Call _updateScrollListeners.
1577         (WebInspector.DataGrid.prototype.set inline): Use _updateScrollListeners.
1578         (WebInspector.DataGrid.prototype.set variableHeightRows): Use _updateScrollListeners.
1579         (WebInspector.DataGrid.prototype._updateScrollListeners): Added. Listen for mousewheel too.
1580
1581 2016-04-29  Joseph Pecoraro  <pecoraro@apple.com>
1582
1583         Web Inspector: Jump to Line in auto formatted JavaScript does not work the first time
1584         https://bugs.webkit.org/show_bug.cgi?id=157194
1585         <rdar://problem/26008471>
1586
1587         Reviewed by Timothy Hatcher.
1588
1589         When doing asynchronous formatting we set the content of the editor
1590         twice. First to prime the editors back/foward list with the original
1591         content, and then again after we get the formatted content from the
1592         Worker, and then display the content.
1593
1594         The TextEditor attempts to reveal a position when the initial string
1595         has been set. Back when autoformatting was synchronous this was fine.
1596         Asynchronously however, this ends up happening between the original
1597         and formatted value. Also, the TextEditor has no idea that the
1598         SourceCodeTextEditor is going to format / defer displaying the
1599         contents. Add a "defer" property to the TextEditor that the
1600         SourceCodeTextEditor can use in this circumstance.
1601
1602         * UserInterface/Views/SourceCodeTextEditor.js:
1603         (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
1604         Avoid revealing a position when setting the original content. We will
1605         be formatting and we will want to reveal the position afterwards.
1606
1607         * UserInterface/Views/TextEditor.js:
1608         (WebInspector.TextEditor):
1609         (WebInspector.TextEditor.prototype.set deferReveal):
1610         Provide another reason to defer revealing.
1611
1612 2016-04-28  Joseph Pecoraro  <pecoraro@apple.com>
1613
1614         Web Inspector: FormatterWorker fails to find "External/Esprima.js" in Production builds
1615         https://bugs.webkit.org/show_bug.cgi?id=157162
1616         <rdar://problem/25996556>
1617
1618         Reviewed by Timothy Hatcher.
1619
1620         Workers have relative include paths. FormatterWorker has an includes
1621         that looks like:
1622
1623             importScripts(...[
1624                 "../../External/Esprima/esprima.js",
1625                 ...
1626             ]);
1627
1628         In optimized builds (Production) the esprima resources are combined
1629         and moved out of an External directory to "Esprima.js". We need to
1630         update the path of this include in optimized builds.
1631
1632         This adds a script to do some basic rewrites of paths. It will also
1633         produce a build error if there are any other External paths that
1634         may have been unhandled.
1635
1636         * Scripts/copy-user-interface-resources.pl:
1637         Run a new script to fix up the Worker imports for new pathes.
1638
1639         * Scripts/fix-worker-imports-for-optimized-builds.pl: Added.
1640         (fixWorkerImportsInFile):
1641         (fixWorkerImportsInDirectory):
1642         Replace "/External/Esprima/esprima.js" with "/Esprima.js" in imports.
1643         Fatal error for any unhandled "/External" lines that were not replaced.
1644
1645 2016-04-27  Joseph Pecoraro  <pecoraro@apple.com>
1646
1647         Web Inspector: Missing CSS autocompletion suggestions for -webkit-user-select
1648         https://bugs.webkit.org/show_bug.cgi?id=157104
1649
1650         Reviewed by Timothy Hatcher.
1651
1652         * UserInterface/Models/CSSKeywordCompletions.js:
1653
1654 2016-04-26  Joseph Pecoraro  <pecoraro@apple.com>
1655
1656         Web Inspector: Clarify Heap Snapshot instance Retained Size by hiding retained size of non-dominated children
1657         https://bugs.webkit.org/show_bug.cgi?id=157018
1658
1659         Reviewed by Timothy Hatcher.
1660
1661         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
1662         (WebInspector.HeapSnapshotNodeProxy):
1663         (WebInspector.HeapSnapshotNodeProxy.deserialize):
1664         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1665         (HeapSnapshot.prototype.serializeNode):
1666         Include dominatorNodeIdentifier in the default proxy properties.
1667
1668         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
1669         (WebInspector.HeapSnapshotInstanceDataGridNode):
1670         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.get node):
1671         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
1672         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByBase):
1673         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._isDominatedByNonBaseParent):
1674         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
1675         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
1676         (.heap-snapshot > .data-grid td .sub-retained):
1677         Save the base HeapSnapshotInstanceDataGridNode so that it can be referenced by
1678         children. When expanding an instance, hide the retained size for children
1679         that are not dominated by the base object. Show the retained size for children
1680         for children that are dominated. If dominated directly, show the size in the
1681         normal black. If dominated transitively, show the size in a dimmed gray.
1682
1683 2016-04-25  Matt Baker  <mattbaker@apple.com>
1684
1685         Web Inspector: hook up grid row filtering in the new Timelines UI
1686         https://bugs.webkit.org/show_bug.cgi?id=154924
1687         <rdar://problem/24934607>
1688
1689         Reviewed by Timothy Hatcher.
1690
1691         Re-implement timeline data grid filtering that previously existed in the
1692         navigation sidebar. This patch adds support for filter text, scope bars,
1693         and filtering based on ruler selection.
1694
1695         Multi-column filter support is now part of DataGrid. The grid checks compares
1696         filter text against cell data of type string. DataGridNode subclasses may
1697         provide custom string data for columns that format complex objects (such
1698         as SourceCodeLocations). Cells containing data of type number are not
1699         considered for filtering at this time.
1700
1701         * UserInterface/Views/DataGrid.js:
1702         (WebInspector.DataGrid):
1703         (WebInspector.DataGrid.prototype.set filterText):
1704         (WebInspector.DataGrid.prototype.get filterDelegate):
1705         (WebInspector.DataGrid.prototype.set filterDelegate):
1706         (WebInspector.DataGrid.prototype.filterDidChange):
1707         Called internally by the grid whenever the filter text or delegate changes.
1708         Also called by clients that implement a filter delegate, to inform the
1709         grid that a custom filter has changed.
1710
1711         (WebInspector.DataGrid.prototype.hasCustomFilters):
1712         (WebInspector.DataGrid.prototype.matchNodeAgainstCustomFilters):
1713         Calls the filter delegate, if it exists, and provides a hook for
1714         subclasses to provide custom filtering.
1715
1716         (WebInspector.DataGrid.prototype._applyFiltersToNode.matchTextFilter):
1717         (WebInspector.DataGrid.prototype._applyFiltersToNode.makeVisible):
1718         (WebInspector.DataGrid.prototype._applyFiltersToNode):
1719         Filters data grid nodes and fires filter events as needed.
1720         (WebInspector.DataGrid.prototype._hasFilterDelegate):
1721         Helper function.
1722         (WebInspector.DataGrid.prototype._updateVisibleRows):
1723         Exclude hidden nodes from revealed rows.
1724         (WebInspector.DataGrid.prototype._updateFilter):
1725         Filtering entry point, called on an animation frame. Updates visible
1726         rows if any node was filtered/unfiltered.
1727
1728         (WebInspector.DataGridNode):
1729         (WebInspector.DataGridNode.prototype.get filterableData):
1730         Gets an array of filterable strings for the node.
1731         (WebInspector.DataGridNode.prototype.refresh):
1732         Resets cached filterable strings.
1733         (WebInspector.DataGridNode.prototype.filterableDataForColumn):
1734         Can be overridden by subclasses to provide filterable text for complex
1735         cell data, like as objects formatted as document fragments.
1736
1737         * UserInterface/Views/LayoutTimelineDataGridNode.js:
1738         (WebInspector.LayoutTimelineDataGridNode.prototype.get data):
1739
1740         * UserInterface/Views/LayoutTimelineView.js:
1741         (WebInspector.LayoutTimelineView):
1742         Register grid and remove logic that has been moved to the base class.
1743         (WebInspector.LayoutTimelineView.prototype.filterDidChange):
1744         Update highlight after grid filter change.
1745         (WebInspector.LayoutTimelineView.prototype._dataGridSelectedNodeChanged):
1746         Update highlight when selection changes.
1747         (WebInspector.LayoutTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
1748         (WebInspector.LayoutTimelineView.prototype.treeElementDeselected): Deleted.
1749         (WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange): Deleted.
1750         (WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected): Deleted.
1751         No longer needed.
1752
1753         * UserInterface/Views/NetworkTimelineView.js:
1754         (WebInspector.NetworkTimelineView):
1755         Register grid and remove logic that has been moved to the base class.
1756         (WebInspector.NetworkTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
1757         (WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange): Deleted.
1758         (WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected): Deleted.
1759         No longer needed.
1760
1761         * UserInterface/Views/OverviewTimelineView.js:
1762         (WebInspector.OverviewTimelineView):
1763         Register grid and remove logic that has been moved to the base class.
1764         (WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected): Deleted.
1765         No longer needed.
1766
1767         * UserInterface/Views/RenderingFrameTimelineView.js:
1768         (WebInspector.RenderingFrameTimelineView):
1769         Register grid and remove logic that has been moved to the base class.
1770         (WebInspector.RenderingFrameTimelineView.prototype.get filterStartTime):
1771         (WebInspector.RenderingFrameTimelineView.prototype.get filterEndTime):
1772         Convert selection indices into filter start and end times.
1773         (WebInspector.RenderingFrameTimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
1774         Perform custom filtering on rendering frame duration.
1775         (WebInspector.RenderingFrameTimelineView.prototype._scopeBarSelectionDidChange):
1776         Inform grid of custom filter change.
1777         (WebInspector.RenderingFrameTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
1778         (WebInspector.RenderingFrameTimelineView.prototype._dataGridNodeSelected): Deleted.
1779         No longer needed.
1780
1781         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1782         (WebInspector.ResourceTimelineDataGridNode.prototype.filterableDataForColumn):
1783         Use URL string for filtering "name" column.
1784
1785         * UserInterface/Views/ScriptClusterTimelineView.js:
1786         (WebInspector.ScriptClusterTimelineView.prototype.updateFilter):
1787         Forwarding for TimelineView API.
1788         (WebInspector.ScriptClusterTimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
1789         (WebInspector.ScriptClusterTimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
1790         Renamed to matchDataGridNodeAgainstCustomFilters.
1791         (WebInspector.ScriptClusterTimelineView.prototype._scriptClusterViewCurrentContentViewDidChange): Deleted.
1792         Removed FIXME comment. Updating TimelineView times is sufficient to trigger filtering.
1793
1794         * UserInterface/Views/ScriptDetailsTimelineView.js:
1795         (WebInspector.ScriptDetailsTimelineView):
1796         Register grid and remove logic that has been moved to the base class.
1797         (WebInspector.ScriptDetailsTimelineView.prototype._dataGridFiltersDidChange): Deleted.
1798         (WebInspector.ScriptDetailsTimelineView.prototype._dataGridNodeSelected): Deleted.
1799         No longer needed.
1800
1801         * UserInterface/Views/ScriptTimelineDataGridNode.js:
1802         (WebInspector.ScriptTimelineDataGridNode.prototype.filterableDataForColumn):
1803         Use main title and subtitle strings for filtering "name" column.
1804         (WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
1805         (WebInspector.ScriptTimelineDataGridNode.prototype._subtitle):
1806         Break out for use in filterableDataForColumn.
1807
1808         * UserInterface/Views/TimelineDataGrid.js:
1809         (WebInspector.TimelineDataGrid):
1810         Cleanup variable names.
1811         (WebInspector.TimelineDataGrid.prototype.hasCustomFilters):
1812         Always true because filtering on ruler selection always occurs.
1813         (WebInspector.TimelineDataGrid.prototype.matchNodeAgainstCustomFilters):
1814         Match nodes against scope bar filters.
1815         (WebInspector.TimelineDataGrid.prototype._scopeBarSelectedItemsDidChange):
1816         Inform grid of custom filter change.
1817         (WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters): Deleted.
1818         Re-implemented as _nodeMatchesActiveScopeFilters.
1819         (WebInspector.TimelineDataGrid.prototype._updateScopeBarForcedVisibility): Deleted.
1820         Old UI. No longer needed.
1821
1822         * UserInterface/Views/TimelineDataGridNode.js:
1823         (WebInspector.TimelineDataGridNode.prototype.filterableDataForColumn):
1824         Filter strings for SourceCodeLocation and CallFrame objects.
1825
1826         * UserInterface/Views/TimelineRecordingContentView.js:
1827         (WebInspector.TimelineRecordingContentView):
1828         Listen for FilterBar changes and TimelineView record filtering.
1829         (WebInspector.TimelineRecordingContentView.prototype._filterDidChange):
1830         Update grid filters when filter bar changes.
1831         (WebInspector.TimelineRecordingContentView.prototype._recordWasFiltered):
1832         Update overview when records are filtered/unfiltered.
1833         (WebInspector.TimelineRecordingContentView.prototype.filterDidChange): Deleted.
1834         (WebInspector.TimelineRecordingContentView.prototype.recordWasFiltered): Deleted.
1835         (WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters.checkTimeBounds): Deleted.
1836         (WebInspector.TimelineRecordingContentView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
1837         Re-implemented in DataGrid.
1838         (WebInspector.TimelineRecordingContentView.prototype._updateTimes): Deleted.
1839         FIXME comment removed. Filtering occurs when TimelineView times are updated.
1840         (WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged): Deleted.
1841
1842         * UserInterface/Views/TimelineView.js:
1843         (WebInspector.TimelineView):
1844         (WebInspector.TimelineView.prototype.get navigationItems):
1845         Used by TimelineRecordingContentView to add scope bar items to the
1846         lower content browser's navigation bar.
1847
1848         (WebInspector.TimelineView.prototype.set startTime):
1849         (WebInspector.TimelineView.prototype.set endTime):
1850         (WebInspector.TimelineView.prototype.set currentTime):
1851         Update grid filter when recording times change.
1852         (WebInspector.TimelineView.prototype.get filterStartTime):
1853         (WebInspector.TimelineView.prototype.get filterEndTime):
1854         Let subclasses (RenderingFrameTimelineView) provide filter start/end times.
1855         (WebInspector.TimelineView.prototype.setupDataGrid):
1856         Register the grid used by the TimelineView subclass, allowing the base
1857         class to hook into common event listeners and provide boilerplate functionality.
1858
1859         (WebInspector.TimelineView.prototype.updateFilter):
1860         For data grid views, updates grid filters and sets new filter text.
1861         (WebInspector.TimelineView.prototype.matchDataGridNodeAgainstCustomFilters):
1862         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters.checkTimeBounds):
1863         (WebInspector.TimelineView.prototype.dataGridMatchNodeAgainstCustomFilters):
1864         DataGrid filter delegate. Lets subclasses apply custom filters first,
1865         then filters based on ruler selection if needed.
1866
1867         (WebInspector.TimelineView.prototype.filterDidChange):
1868         Hook for subclasses to respond to filter changes.
1869         (WebInspector.TimelineView.prototype._filterTimesDidChange.delayedWork):
1870         (WebInspector.TimelineView.prototype._filterTimesDidChange):
1871         Helper function for coalescing ruler selection updates into a single
1872         filter update.
1873
1874         (WebInspector.TimelineView.prototype.matchTreeElementAgainstCustomFilters): Deleted.
1875         (WebInspector.TimelineView.prototype.filterUpdated): Deleted.
1876         No longer needed.
1877
1878 2016-04-25  Joseph Pecoraro  <pecoraro@apple.com>
1879
1880         Web Inspector: React.js JSXTransformer produces bogus error locations
1881         https://bugs.webkit.org/show_bug.cgi?id=150010
1882         <rdar://problem/23062233>
1883
1884         Reviewed by Timothy Hatcher.
1885
1886         Show dynamically added <script> elements added to a frame as resources.
1887         For cases where the scripts had source map resources or error messages
1888         we have a root from which to associate them to.
1889
1890         * Localizations/en.lproj/localizedStrings.js:
1891         "Script Element %d" tree element title.
1892
1893         * UserInterface/Models/Frame.js:
1894         (WebInspector.Frame.prototype.commitProvisionalLoad):
1895         (WebInspector.Frame.prototype.get extraScripts):
1896         (WebInspector.Frame.prototype.addExtraScript):
1897         Have a frame keep a list of its extra scripts.
1898
1899         * UserInterface/Models/Script.js:
1900         (WebInspector.Script):
1901         (WebInspector.Script.prototype.get displayName):
1902         (WebInspector.Script.prototype.get dynamicallyAddedScriptElement):
1903         Identify dynamically added script elements and associate them
1904         with the frame, instead of the frame's main resource.
1905
1906         * UserInterface/Views/FrameTreeElement.js:
1907         (WebInspector.FrameTreeElement.prototype.onpopulate):
1908         (WebInspector.FrameTreeElement.prototype._extraScriptAdded):
1909         Show named / source mapped dynamic script elements under a frame.
1910
1911         * UserInterface/Views/ResourceSidebarPanel.js:
1912         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
1913         Dynamically added script element Scripts will be added by the frame that
1914         owns them.
1915
1916         * UserInterface/Views/ScriptTreeElement.js:
1917         (WebInspector.ScriptTreeElement):
1918         Don't include a subtitle for dynamicallyAddedScriptElement, details match
1919         the frame that owns them.
1920
1921 2016-04-25  Joseph Pecoraro  <pecoraro@apple.com>
1922
1923         Web Inspector: Line error widget showed in the wrong resource
1924         https://bugs.webkit.org/show_bug.cgi?id=150009
1925         <rdar://problem/23062199>
1926
1927         Reviewed by Timothy Hatcher.
1928
1929         This addresses a few long standing issues:
1930
1931             - IssueMessage and ConsoleMessage should not fight eachother
1932             - Displayed issue messages now correctly have format string formatting, e.g. console.error("Foo %s", str)
1933             - IssueMessage wraps a ConsoleMessage, so we don't duplicate everything
1934             - Gives ConsoleMessage a sourceCodeLocation (lazy)
1935                 - Since a sourceCodeLocation can have the exact SourceCode, if it was a Script
1936                   without a Resource, we can only show the error in the Script's editor.            
1937
1938         * UserInterface/Models/CallFrame.js:
1939         (WebInspector.CallFrame.fromPayload):
1940         Prefer the script identifier lookup first. And from the Script go
1941         to a resource if possible. This allows us to distinguish a location
1942         that should be in a Script that doesn't have a Resource when there
1943         exists a Resource with the same URL. This will soon be the case
1944         for dyanamic <script> elements append to a document.
1945
1946         * UserInterface/Controllers/IssueManager.js:
1947         (WebInspector.IssueManager.issueMatchSourceCode):
1948         Consolidate all the different checks to this one function.
1949
1950         (WebInspector.IssueManager.prototype.issueWasAdded):
1951         Create IssueMessages with ConsoleMessages.
1952
1953         (WebInspector.IssueManager.prototype.issuesForSourceCode):
1954         Simplify now that we have the better check.
1955
1956         * UserInterface/Controllers/LogManager.js:
1957         (WebInspector.LogManager.prototype.messageWasAdded):
1958         Once a ConsoleMessage has been created (and modified `parameters` for us)
1959         create the IssueMessage if it was an issue.
1960
1961         * UserInterface/Models/ConsoleMessage.js:
1962         (WebInspector.ConsoleMessage.prototype.get sourceCodeLocation):
1963         Lazily create a source code from the best possible location. This can
1964         be the top call frame or the url/line/column combination.
1965
1966         * UserInterface/Models/IssueMessage.js:
1967         (WebInspector.IssueMessage):
1968         Creation and most properties just call through to a ConsoleMessage.
1969         The `type` and `text` are Issue specific. Anything that uses location
1970         data should use the sourceCodeLocation.
1971         
1972         (WebInspector.IssueMessage.prototype.saveIdentityToCookie):
1973         Fix implementation that didn't account for a null sourceCodeLocation.
1974
1975         (WebInspector.IssueMessage.prototype._formatTextIfNecessary):
1976         Basic text format message formatting.
1977
1978         * UserInterface/Protocol/ConsoleObserver.js:
1979         (WebInspector.ConsoleObserver.prototype.messageAdded):
1980         No longer call IssueMessage from the observer. Let LogManager trigger issues.
1981
1982         * UserInterface/Views/ContentView.js:
1983         (WebInspector.ContentView.createFromRepresentedObject):
1984         (WebInspector.ContentView.resolvedRepresentedObjectForRepresentedObject):
1985         (WebInspector.ContentView.isViewable):
1986         An IssueMessage represented object for an IssueMessageTreeElement should be
1987         restorable by just going to the sourceCodeLocation it references. This is
1988         identical to a Breakpoint.
1989
1990         * UserInterface/Views/IssueTreeElement.js:
1991         (WebInspector.IssueTreeElement.prototype._updateTitles):
1992         (WebInspector.IssueTreeElement):
1993         * UserInterface/Views/ResourceContentView.js:
1994         (WebInspector.ResourceContentView.prototype._issueWasAdded):
1995         * UserInterface/Views/SourceCodeTextEditor.js:
1996         (WebInspector.SourceCodeTextEditor.prototype._issueWasAdded):
1997         (WebInspector.SourceCodeTextEditor.prototype._addIssue):
1998         (WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
1999         (WebInspector.SourceCodeTextEditor.prototype._matchesIssue): Deleted.
2000         Update to use Issue's sourceCodeLocation or IssueManager's new APIs.
2001
2002 2016-04-24  Matt Baker  <mattbaker@apple.com>
2003
2004         Web Inspector: Can't sort by name/source code location columns in Timeline data grids
2005         https://bugs.webkit.org/show_bug.cgi?id=156965
2006         <rdar://problem/25898716>
2007
2008         Reviewed by Timothy Hatcher.
2009
2010         Add support for sorting SourceCodeLocation objects to TimelineDataGrid,
2011         and include a grid delegate so that views can extend sorting logic for
2012         other document fragment columns.
2013
2014         * UserInterface/Views/NetworkTimelineView.js:
2015         (WebInspector.NetworkTimelineView):
2016         (WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
2017         Sort "name" column by display name first, then resource URL.
2018
2019         * UserInterface/Views/ScriptDetailsTimelineView.js:
2020         (WebInspector.ScriptDetailsTimelineView):
2021         (WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator):
2022         Sort "name" column by display name first, then subtitle.
2023
2024         * UserInterface/Views/ScriptTimelineDataGridNode.js:
2025         (WebInspector.ScriptTimelineDataGridNode.prototype.get subtitle):
2026         Make subtitle accessible externally for sorting.
2027         (WebInspector.ScriptTimelineDataGridNode.prototype._createNameCellDocumentFragment):
2028         (WebInspector.ScriptTimelineDataGridNode):
2029
2030         * UserInterface/Views/TimelineDataGrid.js:
2031         (WebInspector.TimelineDataGrid):
2032         (WebInspector.TimelineDataGrid.prototype.get sortDelegate):
2033         (WebInspector.TimelineDataGrid.prototype.set sortDelegate):
2034         Fire a SortChanged event if the delegate changed and the grid is sorted.
2035         (WebInspector.TimelineDataGrid.prototype._sort):
2036         If a sort delegate exists, and it returns a numeric value, skip the
2037         default compare.
2038
2039         (WebInspector.TimelineDataGrid.prototype._sortComparator):
2040         Add support for sorting SourceCodeLocation columns.
2041
2042 2016-04-24  Matt Baker  <mattbaker@apple.com>
2043
2044         Web Inspector: Error when selecting a bar in the Frames timeline
2045         https://bugs.webkit.org/show_bug.cgi?id=156960
2046         <rdar://problem/25897955>
2047
2048         Reviewed by Timothy Hatcher.
2049
2050         Fixes timeline grid node selection when record selected in the overview.
2051         Adds general purpose `findNode` method to DataGrid.
2052
2053         * UserInterface/Views/DataGrid.js:
2054         (WebInspector.DataGrid.prototype.findNode):
2055         Basic find function for locating a grid node in linear time.
2056
2057         * UserInterface/Views/TimelineRecordingContentView.js:
2058         (WebInspector.TimelineRecordingContentView.prototype._recordSelected):
2059         Remove tree outline references, call generic select method.
2060
2061         * UserInterface/Views/TimelineView.js:
2062         (WebInspector.TimelineView.prototype.selectRecord):
2063         If a data grid was set, deselect current selection and select the node
2064         associated with the timeline record.
2065
2066 2016-04-24  Matt Baker  <mattbaker@apple.com>
2067
2068         Web Inspector: Events in JavaScript & Events timeline have no profile children
2069         https://bugs.webkit.org/show_bug.cgi?id=156627
2070         <rdar://problem/25749740>
2071
2072         Reviewed by Timothy Hatcher.
2073
2074         ProfileNodeDataGridNode should handle `populate` events when expanded.
2075         This was previously done by ProfileNodeTreeElement, which is no longer
2076         used in the Timelines tab.
2077
2078         * UserInterface/Views/ProfileDataGridNode.js:
2079         (WebInspector.ProfileDataGridNode.prototype._updateChildrenForModifiers):
2080         (WebInspector.ProfileDataGridNode.prototype._populate):
2081         (WebInspector.ProfileDataGridNode):
2082         DataGridNode sets `shouldRefreshChildren` to false after populating
2083         child nodes. No need to track with a separate flag.
2084
2085         * UserInterface/Views/ProfileNodeDataGridNode.js:
2086         (WebInspector.ProfileNodeDataGridNode):
2087         (WebInspector.ProfileNodeDataGridNode.prototype._populate):
2088
2089 2016-04-22  Matt Baker  <mattbaker@apple.com>
2090
2091         Web Inspector: HeapAllocationsTimeline grid should use built-in grid column icons
2092         https://bugs.webkit.org/show_bug.cgi?id=156934
2093
2094         Reviewed by Timothy Hatcher.
2095
2096         * UserInterface/Views/HeapAllocationsTimelineDataGridNode.js:
2097         (WebInspector.HeapAllocationsTimelineDataGridNode):
2098         Use existing base class helper function to create main title text.
2099         (WebInspector.HeapAllocationsTimelineDataGridNode.prototype.createCellContent):
2100         Add icon class names to cell, remove icon element.
2101
2102         * UserInterface/Views/HeapAllocationsTimelineView.js:
2103         (WebInspector.HeapAllocationsTimelineView):
2104         Turn on icons for the column.
2105
2106 2016-04-22  Timothy Hatcher  <timothy@apple.com>
2107
2108         Change an assert to a warn based on post review feedback.
2109
2110         https://bugs.webkit.org/show_bug.cgi?id=156919
2111         rdar://problem/25857118
2112
2113         Rubber-stamped by Joseph Pecoraro.
2114
2115         * UserInterface/Controllers/DebuggerManager.js:
2116         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
2117
2118 2016-04-22  Timothy Hatcher  <timothy@apple.com>
2119
2120         Web Inspector: Debugger statement in console does not provide any call frames and debugger UI is confused
2121
2122         https://bugs.webkit.org/show_bug.cgi?id=156919
2123         rdar://problem/25857118
2124
2125         This makes console expressions show up in the Debugger tab sidebar if a ScriptContentView is shown for them.
2126         We now also show call frames that originate from a console expression, so the call frames in the sidebar is not empty.
2127         Also fix a bug where when there are no call frames we auto resume the debugger and don't leave it in a broken state.
2128
2129         Reviewed by Joseph Pecoraro.
2130
2131         * Localizations/en.lproj/localizedStrings.js: Updated.
2132
2133         * UserInterface/Base/Utilities.js:
2134         (appendWebInspectorSourceURL): Don't append if another sourceURL is already added.
2135         (appendWebInspectorConsoleEvaluationSourceURL): Added.
2136         (isWebInspectorConsoleEvaluationScript): Added.
2137         (isWebKitInternalScript): Return false for isWebInspectorConsoleEvaluationScript().
2138
2139         * UserInterface/Controllers/DebuggerManager.js:
2140         (WebInspector.DebuggerManager.prototype.debuggerDidPause): Resume if call frames is empty. This is not as common now
2141         since console expression call frames are not skipped.
2142         (WebInspector.DebuggerManager.prototype.scriptDidParse): Change an early return for isWebInspectorInternalScript() that
2143         was skipping adding internal scripts to the known script lists, but it should only do that when the debug UI is disabled.
2144
2145         * UserInterface/Controllers/JavaScriptLogViewController.js:
2146         (WebInspector.JavaScriptLogViewController.prototype.consolePromptTextCommitted):
2147         Call appendWebInspectorConsoleEvaluationSourceURL so the console expressions are tagged before evaluateInInspectedWindow
2148         added the internal sourceURL name.
2149
2150         * UserInterface/Models/Script.js:
2151         (WebInspector.Script): Assign unique identifiers to console scripts so they are named correctly.
2152         (WebInspector.Script.resetUniqueDisplayNameNumbers): Reset _nextUniqueConsoleDisplayNameNumber.
2153         (WebInspector.Script.prototype.get displayName): Special case console expressions with a better name.
2154
2155         * UserInterface/Views/DebuggerSidebarPanel.js:
2156         (WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject): Add a script tree element on demand
2157         like the ResourceSidebarPanel does for anonymous scripts.
2158         (WebInspector.DebuggerSidebarPanel.prototype._addScript): Return treeElement so treeElementForRepresentedObject can use it.
2159
2160 2016-04-21  Joseph Pecoraro  <pecoraro@apple.com>
2161
2162         Web Inspector: sourceMappingURL not loaded in generated script
2163         https://bugs.webkit.org/show_bug.cgi?id=156022
2164         <rdar://problem/25438595>
2165
2166         Reviewed by Geoffrey Garen.
2167
2168         * UserInterface/Controllers/SourceMapManager.js:
2169         (WebInspector.SourceMapManager.prototype.downloadSourceMap):
2170         If the sourceMapURL is a dataURL at this point, we can just pass it on,
2171         otherwise we would have returned and skipped it.
2172         
2173         * UserInterface/Models/CallFrame.js:
2174         (WebInspector.CallFrame.fromPayload):
2175         Add handling for "scriptId" if it is available in the Console.CallFrame.
2176         Don't automatically mark CallFrames that didn't have a "url" as native,
2177         instead try to get a SourceCode.
2178
2179         * UserInterface/Models/Script.js:
2180         (WebInspector.Script.prototype.get displayURL):
2181         Used by SourceCodeLocation formatting, so behave more like Resources
2182         when we have only have a sourceURL name. This produces output like:
2183         "foo.js:#:#" instead of "foo.js (line #:#)"
2184
2185         (WebInspector.Script.prototype.get anonymous):
2186         Easy accessor to see if this would be treated as anonymous or not.
2187
2188         * UserInterface/Models/SourceMap.js:
2189         (WebInspector.SourceMap.prototype.get sourceMappingBasePathURLComponents):
2190         Gracefully handle no path.
2191
2192         * UserInterface/Models/StackTrace.js:
2193         (WebInspector.StackTrace.prototype.get firstNonNativeCallFrame):
2194         (WebInspector.StackTrace.prototype.get firstNonNativeNonAnonymousCallFrame):
2195         * UserInterface/Views/ConsoleMessageView.js:
2196         (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
2197         Now that "Eval Code" with a sourceURL is no longer native, we still don't
2198         want to show it in the Web Inspector if it is anonymous. So include a stricter
2199         version that skips native and anonymous call frames.
2200
2201 2016-04-21  Joseph Pecoraro  <pecoraro@apple.com>
2202
2203         Web Inspector: Debugger statement gets a space after it when pretty printed
2204         https://bugs.webkit.org/show_bug.cgi?id=156867
2205         <rdar://problem/25862308>
2206
2207         Reviewed by Geoffrey Garen.
2208
2209         * Tools/Formatting/index.html:
2210         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
2211         (EsprimaFormatter.prototype._handleTokenAtNode):
2212         Handle the unhandled DebuggerStatement node type.
2213
2214 2016-04-20  Joseph Pecoraro  <pecoraro@apple.com>
2215
2216         Web Inspector: console.table(navigator) throws exception about `rowPreview.propertyPreviews.length`
2217         https://bugs.webkit.org/show_bug.cgi?id=156698
2218         <rdar://problem/25778244>
2219
2220         Reviewed by Timothy Hatcher.
2221
2222         * UserInterface/Views/ConsoleMessageView.js:
2223         (WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
2224         Handle a row with a value preview but no sub-property previews (a function).
2225
2226 2016-04-19  Timothy Hatcher  <timothy@apple.com>
2227
2228         Web Inspector: Use debounce proxies in a couple more places
2229
2230         https://bugs.webkit.org/show_bug.cgi?id=156759
2231
2232         Reviewed by Joseph Pecoraro.
2233
2234         * UserInterface/Views/ContentBrowser.js:
2235         (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEvent):
2236         (WebInspector.ContentBrowser.prototype._contentViewSelectionPathComponentDidChange):
2237         (WebInspector.ContentBrowser.prototype._contentViewSupplementalRepresentedObjectsDidChange):
2238         (WebInspector.ContentBrowser.prototype._dispatchCurrentRepresentedObjectsDidChangeEventSoon): Deleted.
2239         * UserInterface/Views/DOMTreeUpdater.js:
2240         (WebInspector.DOMTreeUpdater.prototype._attributesUpdated):
2241         (WebInspector.DOMTreeUpdater.prototype._characterDataModified):
2242         (WebInspector.DOMTreeUpdater.prototype._nodeInserted):
2243         (WebInspector.DOMTreeUpdater.prototype._nodeRemoved):
2244         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodes):
2245         (WebInspector.DOMTreeUpdater.prototype._updateModifiedNodesSoon): Deleted.
2246         * UserInterface/Views/NavigationSidebarPanel.js:
2247         (WebInspector.NavigationSidebarPanel):
2248         (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
2249         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
2250         (WebInspector.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
2251         (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibilitySoon): Deleted.
2252
2253 2016-04-19  Timothy Hatcher  <timothy@apple.com>
2254
2255         Web Inspector: Make debounce use an ES6 Proxy
2256
2257         https://bugs.webkit.org/show_bug.cgi?id=156756
2258         rdar://problem/25809771
2259
2260         Reviewed by Joseph Pecoraro.
2261
2262         * UserInterface/Base/Utilities.js:
2263         (Object.prototype.soon): Added.
2264         (Object.prototype.debounce): Added.
2265         (Function.prototype.debounce): Deleted.
2266         (Function.prototype.cancelDebounce): Added.
2267
2268         * UserInterface/Views/BezierEditor.js:
2269         (WebInspector.BezierEditor.createBezierInput): Use new debounce proxy.
2270         * UserInterface/Views/VisualStyleBackgroundPicker.js:
2271         (WebInspector.VisualStyleBackgroundPicker): Ditto.
2272         * UserInterface/Views/VisualStyleURLInput.js:
2273         (WebInspector.VisualStyleURLInput): Ditto.
2274
2275 2016-04-19  Joseph Pecoraro  <pecoraro@apple.com>
2276
2277         Web Inspector: Picking Snapshot from navigation bar popup does to switch views
2278         https://bugs.webkit.org/show_bug.cgi?id=156762
2279
2280         Reviewed by Timothy Hatcher.
2281
2282         * UserInterface/Views/TimelineDataGridNodePathComponent.js:
2283         (WebInspector.TimelineDataGridNodePathComponent.prototype.get previousSibling):
2284         (WebInspector.TimelineDataGridNodePathComponent.prototype.get nextSibling):
2285         Wrong represented object provided by TimelineDataGridNodePathComponent.
2286
2287 2016-04-18  Timothy Hatcher  <timothy@apple.com>
2288
2289         Web Inspector: DataGrid should be virtualized so it only renders visible rows
2290
2291         https://bugs.webkit.org/show_bug.cgi?id=156663
2292         rdar://problem/25765256
2293
2294         Reviewed by Joseph Pecoraro.
2295
2296         * UserInterface/Views/ComputedStyleDetailsPanel.js:
2297         (WebInspector.ComputedStyleDetailsPanel.prototype.set containerRegions):
2298         Call updateLayoutIfNeeded since we don't use views here.
2299
2300         * UserInterface/Views/ConsoleMessageView.js:
2301         (WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
2302         Set inline and variableHeightRows to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
2303
2304         * UserInterface/Views/DOMTreeDataGrid.js:
2305         (WebInspector.DOMTreeDataGrid):
2306         Set inline to true, remove direct classList add.
2307
2308         * UserInterface/Views/DataGrid.css:
2309         (.data-grid td):
2310         (.data-grid table.data):
2311         (.data-grid:not(.variable-height-rows) table.data):
2312         (.data-grid:not(.variable-height-rows) table.data.odd-first-zebra-stripe):
2313         (.data-grid.variable-height-rows table.data tr:nth-child(odd)):
2314         (.data-grid.variable-height-rows table.data tr:nth-child(even)):
2315         (.data-grid.variable-height-rows.odd-first-zebra-stripe table.data tr:nth-child(odd)):
2316         (.data-grid.variable-height-rows.odd-first-zebra-stripe table.data tr:nth-child(even)):
2317         (.data-grid.variable-height-rows table.data tr.filler):
2318         Updated styles to support variable height rows directly and flipping the order of the stripes
2319         when the virtual table starts at an odd row.
2320
2321         * UserInterface/Views/DataGrid.js:
2322         (WebInspector.DataGrid): Added rowHeight and rows.
2323         (WebInspector.DataGrid.prototype.get inline): Added.
2324         (WebInspector.DataGrid.prototype.set inline): Added.
2325         (WebInspector.DataGrid.prototype.get variableHeightRows): Added.
2326         (WebInspector.DataGrid.prototype.set variableHeightRows): Added.
2327         (WebInspector.DataGrid.prototype.layout): Call _updateVisibleRows.
2328         (WebInspector.DataGrid.prototype._noteRowsChanged): Added.
2329         (WebInspector.DataGrid.prototype._updateVisibleRows): Added.
2330         (WebInspector.DataGrid.prototype._sortNodesCallback): Update to not use the DOM.
2331         (WebInspector.DataGridNode.prototype.set hasChildren): Call needsLayout.
2332         (WebInspector.DataGridNode.prototype.collapse): Call needsLayout.
2333         (WebInspector.DataGridNode.prototype.expand): Call needsLayout.
2334         (WebInspector.DataGridNode.prototype._attach): Call _noteRowsChanged.
2335         (WebInspector.DataGridNode.prototype._detach): Call _noteRowsChanged.
2336
2337         * UserInterface/Views/DatabaseUserQuerySuccessView.js:
2338         (WebInspector.DatabaseUserQuerySuccessView):
2339         Set inline to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
2340
2341         * UserInterface/Views/DetailsSection.css:
2342         (.details-section > .content .data-grid td.value-column):
2343         (.details-section > .content .data-grid table.data): Deleted.
2344         (.details-section > .content .data-grid tr:nth-child(even)): Deleted.
2345         (.details-section > .content .data-grid tr:nth-child(odd)): Deleted.
2346         Now handled by DataGrid.css directly.
2347
2348         * UserInterface/Views/DetailsSectionDataGridRow.js:
2349         (WebInspector.DetailsSectionDataGridRow.prototype.set dataGrid):
2350         Set inline and variableHeightRows to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
2351
2352         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2353         (.heap-snapshot > .data-grid tr:matches(.selected, :hover) td .go-to-arrow):
2354         (.heap-snapshot .icon):
2355         Remove margin-top to fit inside 20px row instead of 21px.
2356
2357         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.css:
2358         (.content-view.indexed-database-object-store > .data-grid table.data): Deleted.
2359         (.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(even)): Deleted.
2360         (.content-view.indexed-database-object-store > .data-grid table.data tr:nth-child(odd)): Deleted.
2361         (.content-view.indexed-database-object-store > .data-grid table.data tr.filler): Deleted.
2362         Now handled by DataGrid.css directly.
2363
2364         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
2365         (WebInspector.IndexedDatabaseObjectStoreContentView):
2366         Set variableHeightRows to true.
2367
2368         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
2369         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
2370         Set inline to true, remove direct classList add. Call updateLayoutIfNeeded since we don't use views here.
2371
2372         * UserInterface/Views/LogContentView.css:
2373         (.console-item .data-grid table.data): Deleted.
2374         (.console-item .data-grid table.data tr:nth-child(even)): Deleted.
2375         Now handled by DataGrid.css directly.
2376
2377         * UserInterface/Views/NetworkGridContentView.css:
2378         (.content-view.network-grid > .data-grid td): Deleted.
2379         (.content-view.network-grid > .data-grid table.data): Deleted.
2380         Now handled by DataGrid.css directly.
2381
2382         * UserInterface/Views/ProbeSetDataGrid.js:
2383         (WebInspector.ProbeSetDataGrid):
2384         Set inline to true, remove direct classList add.
2385
2386         * UserInterface/Views/ProfileView.css:
2387         (.profile > .data-grid td .icon):
2388         (.profile > .data-grid tr:matches(.selected, :hover) .go-to-arrow):
2389         Remove margin-top to fit inside 20px row instead of 21px.
2390
2391         * UserInterface/Views/TimelineRecordingContentView.css:
2392         (.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid td): Deleted.
2393         (.content-view.timeline-recording > .content-browser > .content-view-container > .timeline-view > .data-grid table.data): Deleted.
2394         Now handled by DataGrid.css directly.
2395
2396         * UserInterface/Views/Variables.css:
2397         (:root): Added zebra stripe colors.
2398
2399 2016-04-19  Joseph Pecoraro  <pecoraro@apple.com>
2400
2401         REGRESSION (r199635) Web Inspector: Percentages in Heap Allocations view are too large
2402         https://bugs.webkit.org/show_bug.cgi?id=156729
2403         <rdar://problem/25796002>
2404
2405         Reviewed by Timothy Hatcher.
2406
2407         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2408         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2409         Fix callsite that failed to be updated once percentageString
2410         required 0..1 input instead of 0..100.
2411
2412 2016-04-18  Timothy Hatcher  <timothy@apple.com>
2413
2414         Web Inspector: NavigationSidebarPanel does a lot of style recalc and layout on busy sites
2415
2416         https://bugs.webkit.org/show_bug.cgi?id=156704
2417         rdar://problem/25778744
2418
2419         Reviewed by Brian Burg.
2420
2421         * UserInterface/Views/NavigationSidebarPanel.js:
2422         (WebInspector.NavigationSidebarPanel):
2423         (WebInspector.NavigationSidebarPanel.prototype._treeElementDisclosureDidChange):
2424         Use _updateContentOverflowShadowVisibilitySoon in more places so the style recalc
2425         and layout changes are coalesced into one action after all rapid fire calls.
2426
2427 2016-04-18  Timothy Hatcher  <timothy@apple.com>
2428
2429         Web Inspector: Database query result DataGrids have misaligned header columns
2430
2431         https://bugs.webkit.org/show_bug.cgi?id=156701
2432         rdar://problem/25778310
2433
2434         Reviewed by Brian Burg.
2435
2436         * UserInterface/Views/DataGrid.js:
2437         (WebInspector.DataGrid.prototype.autoSizeColumns): Set the width on the <col> element
2438         for the body table to match the <col> in the header.
2439
2440 2016-04-18  Timothy Hatcher  <timothy@apple.com>
2441
2442         Web Inspector: Fix the debounce function
2443
2444         https://bugs.webkit.org/show_bug.cgi?id=156696
2445         rdar://problem/25778133
2446
2447         Reviewed by Brian Burg.
2448
2449         * UserInterface/Base/Utilities.js:
2450         (Function.prototype.debounce): Store the timeout on the original function instead
2451         of the bound function. Also simplify the implementation with arrow functions
2452         and eliminate the bind altogether.
2453
2454 2016-04-16  Matt Baker  <mattbaker@apple.com>
2455
2456         Web Inspector: Adopt Number.prototype.toLocaleString For All Sizes and Times
2457         https://bugs.webkit.org/show_bug.cgi?id=152033
2458         <rdar://problem/23815589>
2459
2460         Reviewed by Timothy Hatcher.
2461
2462         Update string formatters to localize float and percentage strings. Hook up
2463         console message formatters to use String.standardFormatters so that console
2464         statements (e.g. console.log("%.3f", 3.14159)) are properly formatted.
2465
2466         * Localizations/en.lproj/localizedStrings.js:
2467         * UserInterface/Base/Utilities.js:
2468         (value):
2469         tokenizeFormatString should default to 6 digits when no precision
2470         sub-specifier is provided.
2471
2472         percentageString should localize formatting, and take a fraction value
2473         (0 to 1) instead of a percentage.
2474
2475         secondsToString should perform special-case formatting for zero values
2476         ("0ms") instead of the general purpose float formatter.
2477
2478         (value.d):
2479         Switch to parseInt to floor floating point values and support numeric strings.
2480         Return NaN instead of zero when passed a value that can't be converted to integer.
2481
2482         (value.f):
2483         Switch to parseFloat to support numeric strings, and localize formatting.
2484         Remove precision check, as it will never be less than zero. Return NaN
2485         instead of zero when passed a value that can't be converted to float.
2486
2487         (prettyFunctionName):
2488         Convert substitutions (an arguments object) to an array before calling join.
2489
2490         * UserInterface/Views/ConsoleMessageView.js:
2491         (WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.floatFormatter):
2492         Use String.standardFormatters.f.
2493
2494         (WebInspector.ConsoleMessageView.prototype._formatWithSubstitutionString.integerFormatter):
2495         Use String.standardFormatters.d.
2496
2497         * UserInterface/Views/LayoutTimelineDataGridNode.js:
2498         (WebInspector.LayoutTimelineDataGridNode.prototype.createCellContent):
2499         (WebInspector.LayoutTimelineDataGridNode):
2500         Use integer formatting for pixel values.
2501
2502         * UserInterface/Views/ProfileDataGridNode.js:
2503         (WebInspector.ProfileDataGridNode.prototype._recalculateData):
2504         (WebInspector.ProfileDataGridNode.prototype._totalTimeContent):
2505         Treat percentage as a fraction from 0 to 1.
2506
2507         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
2508         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
2509         Use integer formatting for pixel values.
2510
2511 2016-04-16  Matt Baker  <mattbaker@apple.com>
2512
2513         Web Inspector: Network timeline grid nodes aren't refreshed on LoadingFinished
2514         https://bugs.webkit.org/show_bug.cgi?id=156666
2515         <rdar://problem/25765811>
2516
2517         Reviewed by Timothy Hatcher.
2518
2519         Fix a regression caused by the recent Timelines UI redesign, and
2520         reorder TimelineDataGrid's constructor arguments now that most
2521         timeline views no longer have an associated tree outline.
2522
2523         * UserInterface/Views/HeapAllocationsTimelineView.js:
2524         (WebInspector.HeapAllocationsTimelineView):
2525         * UserInterface/Views/LayoutTimelineView.js:
2526         (WebInspector.LayoutTimelineView):
2527         * UserInterface/Views/NetworkGridContentView.js:
2528         (WebInspector.NetworkGridContentView):
2529         * UserInterface/Views/NetworkTimelineView.js:
2530         (WebInspector.NetworkTimelineView):
2531         * UserInterface/Views/RenderingFrameTimelineView.js:
2532         (WebInspector.RenderingFrameTimelineView):
2533         * UserInterface/Views/ScriptDetailsTimelineView.js:
2534         (WebInspector.ScriptDetailsTimelineView):
2535         Reorder constructor parameters and omit optional treeOutline and
2536         synchronizerDelegate arguments when they aren't needed.
2537
2538         * UserInterface/Views/TimelineDataGrid.js:
2539         (WebInspector.TimelineDataGrid):
2540         Reorder constructor arguments so that treeOutline can be optional.
2541         (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
2542         Nodes should be refreshed and re-inserted in the data grid without
2543         requiring a grid synchronizer. If a synchronizer exists, re-insert
2544         the tree element for the node. Since the syncronizer is disabled the
2545         order of grid/tree operations doesn't matter.
2546
2547 2016-04-15  Joseph Pecoraro  <pecoraro@apple.com>
2548
2549         Web Inspector: sourceMappingURL not used when sourceURL is set
2550         https://bugs.webkit.org/show_bug.cgi?id=156021
2551         <rdar://problem/25438417>
2552
2553         Reviewed by Timothy Hatcher.
2554
2555         Previously Debugger.sourceParsed only providing the sourceURL, and
2556         wiping out the resourceURL, meant that a Script from a Resource that
2557         set a sourceURL directive would fail to be associated with its Resource.
2558
2559         This would result in duplicated tree elements in the Resources Sidebar,
2560         one for the Resource, and one for the Script. With the Script getting
2561         ultimately getting the SourceMap resources. However, since the frontend
2562         prefers Resources over Scripts when possible, an error that generated
2563         from the script would point to a location in the Resource, not following
2564         source maps.
2565
2566         By always providing the resource URL in Debugger.sourceParsed, a Script
2567         can better be associated with its Resource. The result is now a single
2568         shared tree element in the Resources Sidebar, and the Resource getting
2569         the SourceMap resources. Now the script error goes through the Resource
2570         to its SourceMap resources as we would expect.
2571
2572         * UserInterface/Protocol/DebuggerObserver.js:
2573         (WebInspector.DebuggerObserver):
2574         (WebInspector.DebuggerObserver.prototype.scriptParsed):
2575         We now have to handle two different signatures of scriptParsed. One
2576         for legacy, and one for non-legacy. Cache that value early on, since
2577         scriptParsed happens a lot.
2578
2579         * UserInterface/Protocol/InspectorBackend.js:
2580         (InspectorBackend.Agent.prototype.hasEventParameter):
2581         Runtime check a protocol event to see if it has a parameter. This
2582         is used to check if Debugger.sourceParsed is legacy or not based
2583         on if it has the legacy "hasSourceURL" parameter.
2584
2585         * UserInterface/Models/Script.js:
2586         (WebInspector.Script):
2587         (WebInspector.Script.prototype.get sourceURL):
2588         Treat sourceURL and url separately.
2589
2590         (WebInspector.Script.prototype.get displayName):
2591         Handle both the url and sourceURL in displayName.
2592
2593         * UserInterface/Controllers/DebuggerManager.js:
2594         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
2595         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
2596         (WebInspector.DebuggerManager.prototype.scriptDidParse):
2597         * UserInterface/Protocol/RemoteObject.js:
2598         (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
2599         Update code that checks the sourceURL to explicitly use sourceURL.
2600
2601         * UserInterface/Controllers/SourceMapManager.js:
2602         (WebInspector.SourceMapManager.prototype.downloadSourceMap):
2603         For legacy backends, or in case we get a resource that has an incomplete
2604         baseURL, attempt to get an absolute URL based on the main resource.
2605
2606         * UserInterface/Views/DebuggerSidebarPanel.js:
2607         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
2608         * UserInterface/Views/ResourceSidebarPanel.js:
2609         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
2610         Ignore scripts without a url or sourceURL.
2611
2612 2016-04-14  Joseph Pecoraro  <pecoraro@apple.com>
2613
2614         Web Inspector: Cleanup inspector/debugger tests
2615         https://bugs.webkit.org/show_bug.cgi?id=156619
2616
2617         Reviewed by Brian Burg.
2618
2619         * UserInterface/Base/Main.js:
2620         (WebInspector.loaded):
2621         * UserInterface/Controllers/DebuggerManager.js:
2622         Remove agent checks for agents that are always available.
2623
2624 2016-04-14  Joseph Pecoraro  <pecoraro@apple.com>
2625
2626         Web Inspector: Add a JavaScript Formatting test for template strings
2627         https://bugs.webkit.org/show_bug.cgi?id=156600
2628
2629         Reviewed by Brian Burg.
2630
2631         * Tools/Formatting/index.html:
2632
2633 2016-04-14  Carlos Garcia Campos  <cgarcia@igalia.com>
2634
2635         REGRESSION: Web Inspector: Remote inspector doesn't work
2636         https://bugs.webkit.org/show_bug.cgi?id=156543
2637
2638         Reviewed by Timothy Hatcher.
2639
2640         WebSocket connection is blocked by CSP, but needed by the remote web inspector to work, so allow connect to ws
2641         URLs from the web inspector. Also add stubs for zoomFactor and setZoomFactor to InspectorFrontendHostStub,
2642         required after r199396.
2643
2644         * UserInterface/Base/InspectorFrontendHostStub.js:
2645         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setZoomFactor):
2646         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.zoomFactor):
2647         * UserInterface/Main.html:
2648
2649 2016-04-12  Brian Burg  <bburg@apple.com>
2650
2651         Web Inspector: save inspector's zoom factor as a persistent setting across sessions
2652         https://bugs.webkit.org/show_bug.cgi?id=156522
2653         <rdar://problem/25635774>
2654
2655         Reviewed by Timothy Hatcher.
2656
2657         * UserInterface/Base/Main.js:
2658         (WebInspector.loaded):
2659         Initialize the setting and immediately set the zoom before the frontend page loads.
2660
2661         (WebInspector._increaseZoom):
2662         (WebInspector._decreaseZoom):
2663         (WebInspector._resetZoom):
2664         Use the internal get/set method which updates the WebInspector.Setting.
2665
2666         (WebInspector._setZoomFactor):
2667         Added. Round-trip through the frontend host method in case it further clamps the value.
2668
2669         (WebInspector._zoomFactor):
2670         Added. Just return the setting, since there's no other way for zoom to have changed.
2671
2672 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
2673
2674         Web Inspector: Show the normal Native icon for all Internal objects in Heap Snapshots
2675         https://bugs.webkit.org/show_bug.cgi?id=156513
2676
2677         Reviewed by Timothy Hatcher.
2678
2679         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2680         (WebInspector.HeapSnapshotClusterContentView.iconStyleClassNameForClassName):
2681         Show the native icon for internal objects.
2682
2683 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
2684
2685         Web Inspector: Keyboard shortcut for "Inspect Element" only works when Web Inspector is open.
2686         https://bugs.webkit.org/show_bug.cgi?id=111193
2687         <rdar://problem/13325889>
2688
2689         Reviewed by Timothy Hatcher.
2690
2691         * UserInterface/Controllers/DOMTreeManager.js:
2692         (WebInspector.DOMTreeManager.prototype.set inspectModeEnabled):
2693         (WebInspector.DOMTreeManager.set inspectModeEnabled.callback):
2694         * UserInterface/Protocol/InspectorFrontendAPI.js:
2695         (InspectorFrontendAPI.setElementSelectionEnabled):
2696         Frontend API to enable element selection.
2697
2698 2016-04-12  Joseph Pecoraro  <pecoraro@apple.com>
2699
2700         Web Inspector: Should be able to expand Objects in Heap Allocations View to see exactly what it retains
2701         https://bugs.webkit.org/show_bug.cgi?id=156419
2702         <rdar://problem/25633863>
2703
2704         Reviewed by Timothy Hatcher.
2705
2706         * Localizations/en.lproj/localizedStrings.js:
2707         * UserInterface/Main.html:
2708         Remove strings, and fix sort.
2709
2710         * UserInterface/Models/HeapSnapshotRootPath.js:
2711         (WebInspector.HeapSnapshotRootPath.pathComponentForIndividualEdge):
2712         (WebInspector.HeapSnapshotRootPath.canPropertyNameBeDotAccess):
2713         (WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
2714         (WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
2715         Provide a helper to get an path component string for an individual edge.
2716
2717         * UserInterface/Models/PropertyPreview.js:
2718         (WebInspector.PropertyPreview):
2719         Fix an assert that may have errantly fired for an empty string name.
2720
2721         * UserInterface/Proxies/HeapSnapshotNodeProxy.js:
2722         (WebInspector.HeapSnapshotNodeProxy):
2723         (WebInspector.HeapSnapshotNodeProxy.deserialize):
2724         Include "hasChildren" property in the original proxy message.
2725
2726         (WebInspector.HeapSnapshotNodeProxy.prototype.retainedNodes):
2727         The method now also returns a list of edges for each of the retained nodes.
2728
2729         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2730         (WebInspector.HeapSnapshotInstanceDataGridNode):
2731         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
2732         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype.sort):
2733         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._populate):
2734         An instance DataGrid node can now show children. It can expand to show
2735         its retained node graph.
2736
2737         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
2738         (HeapSnapshot.instancesWithClassName):
2739         (HeapSnapshot.prototype.dominatedNodes):
2740         (HeapSnapshot.prototype.retainers):
2741         (HeapSnapshot.prototype.serializeNode):
2742         Remove unnecessary calls to bind in favor of using the `thisObject` argument.
2743
2744         (HeapSnapshot.prototype.retainedNodes):
2745         Return a parallel list of edges for each of the nodes.
2746
2747         * UserInterface/Views/HeapSnapshotClassDataGridNode.js:
2748         (WebInspector.HeapSnapshotClassDataGridNode.prototype.createCellContent):
2749         (WebInspector.HeapSnapshotClassDataGridNode.prototype._populate):
2750         * UserInterface/Views/HeapSnapshotClusterContentView.js:
2751         (WebInspector.HeapSnapshotClusterContentView.prototype.get summaryContentView):
2752         (WebInspector.HeapSnapshotClusterContentView.prototype.get instancesContentView):
2753         (WebInspector.HeapSnapshotClusterContentView.prototype.shown):
2754         (WebInspector.HeapSnapshotClusterContentView):
2755         (WebInspector.HeapSnapshotClusterContentView.prototype.get navigationItems): Deleted.
2756         (WebInspector.HeapSnapshotClusterContentView.prototype._contentViewExtraArguments): Deleted.
2757         (WebInspector.HeapSnapshotClusterContentView.prototype._toggleShowInternalObjectsSetting): Deleted.
2758         (WebInspector.HeapSnapshotClusterContentView.prototype._updateViewsForShowInternalObjectsSettingValue): Deleted.
2759         (WebInspector.HeapSnapshotClusterContentView.prototype._updateShowInternalObjectsButtonNavigationItem): Deleted.
2760         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
2761         (WebInspector.HeapSnapshotInstancesContentView):
2762         (WebInspector.HeapSnapshotInstancesContentView.prototype.get showInternalObjects): Deleted.
2763         (WebInspector.HeapSnapshotInstancesContentView.prototype.set showInternalObjects): Deleted.
2764         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
2765         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype._populateTopLevel):
2766         (WebInspector.HeapSnapshotInstancesDataGridTree):
2767         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get includeInternalObjects): Deleted.
2768         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set includeInternalObjects): Deleted.
2769         * UserInterface/Views/HeapSnapshotSummaryContentView.js:
2770         Remove the show/hide internal objects button. In the Instances view we will
2771         only show non-Internal objects at the top level, and show internal objects
2772         when those instances are expanded.
2773
2774 2016-04-12  Matt Baker  <mattbaker@apple.com>
2775
2776         Web Inspector: clearing the console should exit all console groups
2777         https://bugs.webkit.org/show_bug.cgi?id=156496
2778         <rdar://problem/25676416>
2779
2780         Reviewed by Timothy Hatcher.
2781
2782         * UserInterface/Views/LogContentView.js:
2783         (WebInspector.LogContentView.prototype._logCleared):
2784         Reset nesting level to zero.
2785
2786 2016-04-11  Joseph Pecoraro  <pecoraro@apple.com>
2787
2788         Web Inspector: Tab Bar items get unreadable at narrow window widths, should collapse earlier
2789         https://bugs.webkit.org/show_bug.cgi?id=156477
2790
2791         Reviewed by Timothy Hatcher.
2792
2793         * UserInterface/Views/TabBar.js:
2794         (WebInspector.TabBar.prototype.layout):
2795         Hide-titles sooner since a width of 60 results in only a few characters
2796         and looks poor.
2797
2798 2016-04-11  Joseph Pecoraro  <pecoraro@apple.com>
2799
2800         Web Inspector: Unstyled nodes in ObjectTree previews look poor
2801         https://bugs.webkit.org/show_bug.cgi?id=156475
2802         <rdar://problem/25667351>
2803
2804         Reviewed by Timothy Hatcher.
2805
2806         * UserInterface/Views/ObjectPreviewView.js:
2807         (WebInspector.ObjectPreviewView.prototype._appendPreview):
2808         Treat nodes as simple values.
2809
2810         (WebInspector.ObjectPreviewView.prototype._initTitleElement):
2811         (WebInspector.ObjectPreviewView.prototype._appendValuePreview):
2812         Format nodes nicely, and treat them as lossy since they have properties.
2813
2814 2016-04-11  Joseph Pecoraro  <pecoraro@apple.com>
2815
2816         Web Inspector: HeapSnapshot instance property path popover should include a descriptive header
2817         https://bugs.webkit.org/show_bug.cgi?id=156431
2818         <rdar://problem/25633594>
2819
2820         Reviewed by Timothy Hatcher.
2821
2822         * Localizations/en.lproj/localizedStrings.js:
2823         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2824         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendTitle):
2825         Title for the popover. Because localization may change the location of the @1234
2826         in the string, localize first with a placeholder, and then replace the placeholder
2827         with the @1234 link.
2828
2829         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
2830         Give the table a container for extra padding.
2831
2832         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
2833         Do not include the space before @1234 as part of the clickable link.
2834
2835         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
2836         Include a title when the popover shows a root path.
2837
2838         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
2839         (.heap-snapshot-instance-popover-content > .title):
2840         (.heap-snapshot-instance-popover-content):
2841         (.heap-snapshot-instance-popover-content > .table-container):
2842         (.heap-snapshot-instance-popover-content table):
2843         Provide styles for the title. Let the title extend across the entire
2844         popover horizontally, but pad the table so that it appears more
2845         centered under the title. Because the table has border collapse we have
2846         to wrap it in a container to give it back the padding we want.
2847
2848 2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>
2849
2850         Web Inspector: XHRs and Web Worker scripts are not searchable
2851         https://bugs.webkit.org/show_bug.cgi?id=154214
2852         <rdar://problem/24643587>
2853
2854         Reviewed by Timothy Hatcher.
2855
2856         * UserInterface/Views/SearchSidebarPanel.js:
2857         (WebInspector.SearchSidebarPanel.prototype.performSearch.resourceCallback):
2858         (WebInspector.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
2859         Carry forward the requestId property if it is available.
2860
2861 2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>
2862
2863         Web Inspector: Allocation snapshot hover persists after switching tabs
2864         https://bugs.webkit.org/show_bug.cgi?id=156430
2865         <rdar://problem/25633800>
2866
2867         Reviewed by Timothy Hatcher.
2868
2869         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
2870         (WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
2871         Don't show the popover if the tree is no longer visible.
2872
2873         * UserInterface/Views/HeapSnapshotInstancesContentView.js:
2874         (WebInspector.HeapSnapshotInstancesContentView.prototype.shown):
2875         * UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
2876         (WebInspector.HeapSnapshotInstancesDataGridTree):
2877         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get visible):
2878         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.shown):
2879         (WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
2880         Give the tree a visible state and have its containing ContentView
2881         update it with normal ContentView shown/hidden.
2882
2883         * UserInterface/Views/Popover.js:
2884         We are presenting while we were dismissing, so completely clear the
2885         dismissing state.
2886
2887 2016-04-08  Joseph Pecoraro  <pecoraro@apple.com>
2888
2889         JSContext Inspector: Fix asserts and uncaught exception showing Timeline Tab
2890         https://bugs.webkit.org/show_bug.cgi?id=156411
2891
2892         Reviewed by Timothy Hatcher.
2893
2894         * UserInterface/Views/OverviewTimelineView.js:
2895         (WebInspector.OverviewTimelineView):
2896         (WebInspector.OverviewTimelineView.prototype.closed):
2897         Gracefully handle if we do not have a Network Timeline.
2898
2899         * UserInterface/Views/TimelineTabContentView.js:
2900         (WebInspector.TimelineTabContentView.prototype._changeViewMode):
2901         This function is always called by the constructor, so the assert
2902         is not useful since it can be called when FPS is not supported.
2903
2904 2016-04-08  Matt Baker  <mattbaker@apple.com>
2905
2906         Web Inspector: Attempting to dismiss a popover that is already being dismissed causes an error
2907         https://bugs.webkit.org/show_bug.cgi?id=156385
2908         <rdar://problem/25617962>
2909
2910         Reviewed by Timothy Hatcher.
2911
2912         The Popover element is removed from the DOM once it's fade-out transition
2913         completes. Since Popover.dismiss proceeds as long as it's element has a
2914         parent, successive calls to dismiss can run before the popover is removed.
2915
2916         Rather than rely on the presence of the popover in the DOM, set a "dismissing"
2917         flag the first time dismiss is called, before the fade-out animation begins.
2918
2919         * UserInterface/Controllers/BreakpointPopoverController.js:
2920         (WebInspector.BreakpointPopoverController.prototype._conditionCodeMirrorEscapeOrEnterKey):
2921         Check for null popover.
2922
2923         * UserInterface/Views/Popover.js:
2924         (WebInspector.Popover):
2925         (WebInspector.Popover.prototype.dismiss):
2926         Do nothing if already dismissing.
2927
2928         (WebInspector.Popover.prototype.handleEvent):
2929         Reset dismissing flag after style transition completes.
2930
2931 2016-04-08  Matt Baker  <mattbaker@apple.com>
2932
2933         Web Inspector: Quick Open fails to match pattern "bB" in file "abBc"
2934         https://bugs.webkit.org/show_bug.cgi?id=156398
2935
2936         Reviewed by Timothy Hatcher.
2937
2938         Correct an off-by-one error in the backtrack routine that set the dead
2939         branch index to the character just before the match that was popped.
2940         The dead branch index should equal the index of the popped match.
2941
2942         * UserInterface/Controllers/ResourceQueryController.js:
2943         (WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
2944         (WebInspector.ResourceQueryController.prototype._findQueryMatches):
2945
2946 2016-04-07  Matt Baker  <mattbaker@apple.com>
2947
2948         Web Inspector: OpenResourceDialog should keep its resources list up-to-date
2949         https://bugs.webkit.org/show_bug.cgi?id=155321
2950         <rdar://problem/25093890>
2951
2952         Reviewed by Timothy Hatcher.
2953
2954         The Quick Open dialog should listen for resource change events, refreshing
2955         the resource list and current query results as needed.
2956
2957         * UserInterface/Views/OpenResourceDialog.js:
2958         (WebInspector.OpenResourceDialog):
2959         (WebInspector.OpenResourceDialog.prototype.didDismissDialog):
2960         Unregister resource event handlers.
2961
2962         (WebInspector.OpenResourceDialog.prototype.didPresentDialog):
2963         Register resource event handlers and add main frame resources.
2964
2965         (WebInspector.OpenResourceDialog.prototype._addResource):
2966         Add resource to the query controller, if valid. Optionally suppress
2967         the potentially expensive filter update, which is useful when adding
2968         multiple resources at once.
2969
2970         (WebInspector.OpenResourceDialog.prototype._addResourcesForFrame):
2971         Add the entire frame resource tree and update dialog filter.
2972
2973         (WebInspector.OpenResourceDialog.prototype._mainResourceDidChange):
2974         (WebInspector.OpenResourceDialog.prototype._resourceWasAdded):
2975
2976 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
2977
2978         Web Inspector: ProfileView source links are off by 1 line, worse in pretty printed code
2979         https://bugs.webkit.org/show_bug.cgi?id=156371
2980
2981         Reviewed by Timothy Hatcher.
2982
2983         * UserInterface/Views/ProfileDataGridNode.js:
2984         (WebInspector.ProfileDataGridNode.prototype._displayContent):
2985         Switch the 1-based locations in the CCT data structure to 0-based for SourceCodeLocation.
2986
2987 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
2988
2989         Web Inspector: Uncaught Exception: No resource with given URL found
2990         https://bugs.webkit.org/show_bug.cgi?id=156259
2991         <rdar://problem/25564749>
2992
2993         Reviewed by Timothy Hatcher.
2994
2995         * UserInterface/Views/SourceCodeTextEditor.js:
2996         (WebInspector.SourceCodeTextEditor):
2997         SourceCode.prototype.requestContent will reject if it cannot load
2998         content for the given resource. In that case, we already have an
2999         earlier catch handler that displays an error message in the
3000         ContentView, so we shouldn't show an Uncaught Exception page.
3001         Really, we should not reject the original promise here, and
3002         instead resolve it with an object describing the error, but
3003         short term we should remove the uncaught exception handler for
3004         this case.
3005
3006 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
3007
3008         Web Inspector: Take snapshot navigation button should match navigation button styles
3009         https://bugs.webkit.org/show_bug.cgi?id=156355
3010         <rdar://problem/25325172>
3011
3012         Reviewed by Timothy Hatcher.
3013
3014         * UserInterface/Images/Camera.svg: Added.
3015         * UserInterface/Views/HeapAllocationsTimelineView.js:
3016         (WebInspector.HeapAllocationsTimelineView):
3017         Use the new image for the navigation bar button.
3018
3019 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
3020
3021         Web Inspector: Inspector hangs when trying to view a large XHR resource
3022         https://bugs.webkit.org/show_bug.cgi?id=144107
3023         <rdar://problem/20669463>
3024
3025         Reviewed by Timothy Hatcher.
3026
3027         Previously auto formatting (initial pretty print of source code) in TextEditor
3028         was done synchronously in this order:
3029         
3030           (1) revealing the Editor as soon as we have content
3031           (2) set the CodeMirror value
3032           (3) pretty print with the CodeMirror editor
3033           (4) set the CodeMirror value
3034               => Layout
3035           
3036         At the end, CodeMirror would layout once with the new content. This approach
3037         performs very poorly when step (3) is an asynchronous action, because it would
3038         mean CodeMirror would layout for both (2) and at the end (4) and the layout
3039         itself can be very costly if the content is minified and so has very long
3040         lines at the top of the file that need to be syntax highlighted and visible
3041         since we do not wrap.
3042
3043         This patch changes the order of operations to benefit asynchronous formatting.
3044         When SourceCodeTextEditor determines that it can autoformat it:
3045
3046           (1) set the CodeMirror value
3047           (2) pretty print to source text
3048           (3) reveal the Editor when pretty printing is done
3049           (4) set the CodeMirror value
3050               => Layout
3051
3052         This maintains the fact that to undo pretty printing we can just "undo" the
3053         editor to get the original text. This also means we only do a single
3054         CodeMirror layout, with the pretty printed and therefore more manageable
3055         source text for highlighting. It also means we continue to show a loading
3056         indicator in the editor while we are pretty printing. If this is truely
3057         done asynchronously, which is the case for JavaScript with FormatterWorker,
3058         then the loading indicator will animate smoothly.
3059
3060         This sequence also works with the traditional synchronous formatters,
3061         which we still have for CSS.
3062
3063         * UserInterface/Views/ContentView.js:
3064         (WebInspector.ContentView.contentViewForRepresentedObject):
3065         * UserInterface/Views/NavigationSidebarPanel.js:
3066         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
3067         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
3068         BreakpointTreeElements can now be restored and reselected when its
3069         source code is null. Avoid deleting the pending cookie data if a
3070         ContentView was not shown for the resource. When the Breakpoint
3071         and SourceCode get hooked up, this code will run again and work.
3072
3073         * UserInterface/Views/ScriptContentView.js:
3074         (WebInspector.ScriptContentView.prototype._togglePrettyPrint):
3075         * UserInterface/Views/TextResourceContentView.js:
3076         (WebInspector.TextResourceContentView.prototype._togglePrettyPrint):
3077         * UserInterface/Views/TextContentView.js:
3078         (WebInspector.TextContentView.prototype._togglePrettyPrint):
3079         New API for toggling formatting, now that it is an async operation.
3080
3081         * UserInterface/Views/SourceCodeTextEditor.js:
3082         (WebInspector.SourceCodeTextEditor):
3083         (WebInspector.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
3084         (WebInspector.SourceCodeTextEditor.prototype.prettyPrint):
3085         (WebInspector.SourceCodeTextEditor.prototype._populateWithContent):
3086         (WebInspector.SourceCodeTextEditor.prototype._proceedPopulateWithContent):
3087         (WebInspector.SourceCodeTextEditor.prototype._prepareEditorForInitialContent):
3088         (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent.scriptContentAvailable):
3089         (WebInspector.SourceCodeTextEditor.prototype._populateWithInlineScriptContent):
3090         (WebInspector.SourceCodeTextEditor.prototype._populateWithScriptContent):
3091         (WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
3092         (WebInspector.SourceCodeTextEditor.prototype._contentWillPopulate): Deleted.
3093         Move auto formatting logic into SourceCodeTextEditor, because it
3094         determines if content should be auto formatted, and it loads the
3095         initial content so it can determine when to show the editor for
3096         the first time.
3097
3098         When we get the initial content and determine we have to autoformat,
3099         setup the TextEditor, but don't proceed with WillPopulate/DidPopulate
3100         until after we have formatted text.
3101
3102         * UserInterface/Views/TextEditor.js:
3103         (WebInspector.TextEditor):
3104         (WebInspector.TextEditor.set string.update):
3105         (WebInspector.TextEditor.prototype.set string):
3106         (WebInspector.TextEditor.prototype.updateFormattedState):
3107         (WebInspector.TextEditor.prototype.hasFormatter):
3108         (WebInspector.TextEditor.prototype._format):
3109         (WebInspector.TextEditor.prototype.prettyPrint):
3110         (WebInspector.TextEditor.prototype._canUseFormatterWorker):
3111         (WebInspector.TextEditor.prototype._startWorkerPrettyPrint):
3112         (WebInspector.TextEditor.prototype._startCodeMirrorPrettyPrint):
3113         (WebInspector.TextEditor.prototype._finishPrettyPrint):
3114         (WebInspector.TextEditor.prototype._undoFormatting):
3115         (WebInspector.TextEditor.prototype._updateAfterFormatting):
3116         Break up the synchronous pretty printing code into multiple steps.
3117         One path can be asynchronous formatting via FormatterWorker, another
3118         path may be synchronous formatting using the CodeMirror formatters.
3119
3120         (WebInspector.TextEditor.prototype.set formatted): Deleted.
3121         Remove the synchronous `set formatted` setter. Replace with
3122         updateFormattedState().
3123
3124         (WebInspector.TextEditor.prototype.set autoFormat): Deleted.
3125         Remove the TextEditor's autoformat. Since formatting can be async, having
3126         the TextEditor showing and asynchronously format its initial contents is
3127         a recipe for poor performance causing multiple layouts of different content.
3128         Instead, autoformatting is handled by SourceCodeTextEditor, and TextEditor
3129         can then be shown when it has the right data.
3130
3131 2016-04-07  Joseph Pecoraro  <pecoraro@apple.com>
3132
3133         Web Inspector: Improve JavaScript pretty printing
3134         https://bugs.webkit.org/show_bug.cgi?id=156178
3135         <rdar://problem/25535719>
3136
3137         Reviewed by Timothy Hatcher.
3138
3139         Add a new EsprimaFormatter which pretty prints JavaScript source text
3140         using the Esprima AST and Tokens. Currently we use CodeMirror's
3141         tokenizer for pretty printing. By moving to Esprima for pretty
3142         printing we get a few advantages: (1) can be used within a Worker
3143         as there are no dependencies on DOM objects, (2) a full featured AST
3144         gives more context to handling individual tokens. One disadvantage
3145         is that Esprima requires valid input, so scripts with syntax errors
3146         will not work.
3147
3148         EsprimaFormatter works by:
3149         - Getting the Esprima AST and token stream.
3150         - Walk all AST nodes:
3151           - when entering an AST node, handle any tokens before the start of this node
3152           - when leaving an AST node, handle any tokens that were inside the node
3153         - Whenever we handle a new node or token check if we should preserve any
3154           newlines or comments that do not show up in the AST or token stream.
3155
3156         This allows us to handle any token based on its context. Currently the
3157         formatter prefers to operate on tokens based on their context. So the
3158         formatter has a case for each AST node type and handles the tokens
3159         within that AST node. A small exception is made to special case the
3160         handling of semicolons.
3161
3162         * Scripts/copy-user-interface-resources-dryrun.rb:
3163         Add a generic check for -h, -help, --help to print usage.
3164
3165         * Tools/Formatting/EsprimaFormatterDebug.js: Added.
3166         (EsprimaFormatterDebug):
3167         (EsprimaFormatterDebug.prototype.get debugText):
3168         (EsprimaFormatterDebug.prototype._pad):
3169         (EsprimaFormatterDebug.prototype._debugHeader):
3170         (EsprimaFormatterDebug.prototype._debugFooter):
3171         (EsprimaFormatterDebug.prototype._debug):
3172         (EsprimaFormatterDebug.prototype._debugComments):
3173         (EsprimaFormatterDebug.prototype._debugAfterProgramNode):
3174         (EsprimaFormatterDebug.prototype._before):
3175         (EsprimaFormatterDebug.prototype._after):
3176         * Tools/Formatting/codemirror-additions.css: Copied from Source/WebInspectorUI/Tools/PrettyPrinting/codemirror-additions.css.
3177         * Tools/Formatting/index.html: Added.
3178         * Tools/PrettyPrinting/codemirror-additions.css:
3179         (pre): Deleted.
3180         (a.download): Deleted.
3181         * Tools/PrettyPrinting/index.html:
3182         * Tools/PrettyPrinting/populate/jquery.min.js: Removed.
3183         Add a Formatter tool that is similiar to the PrettyPrinting tool but
3184         outputs debug information for Esprima tokens. This is useful for
3185         iterating on tests, performance measurements, and general debugging
3186         of token stream for any input.
3187
3188         * UserInterface/Controllers/FormatterSourceMap.js:
3189         (WebInspector.FormatterSourceMap.fromSourceMapData):
3190         (WebInspector.FormatterSourceMap.fromBuilder): Deleted.
3191         Switch to constructing with a common data objects, instead of a Builder.
3192
3193         * UserInterface/Main.html:
3194         * UserInterface/Test.html:
3195         New files and moved files.
3196
3197         * UserInterface/Proxies/FormatterWorkerProxy.js: Added.
3198         (WebInspector.FormatterWorkerProxy):
3199         (WebInspector.FormatterWorkerProxy.singleton):
3200         (WebInspector.FormatterWorkerProxy.canFormat):
3201         (WebInspector.FormatterWorkerProxy.prototype.formatJavaScript):
3202         (WebInspector.FormatterWorkerProxy.prototype.performAction):
3203         (WebInspector.FormatterWorkerProxy.prototype._postMessage):
3204         (WebInspector.FormatterWorkerProxy.prototype._handleMessage):
3205         Main world object which provides a static formatJavaScript action.
3206
3207         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3208         (WebInspector.CSSStyleDeclarationTextEditor.prototype._formattedContentFromEditor):
3209         * UserInterface/Views/TextEditor.js:
3210         (WebInspector.TextEditor.prototype.prettyPrint.prettyPrintAndUpdateEditor):
3211         (WebInspector.TextEditor.prototype.prettyPrint):
3212         * UserInterface/Workers/Formatter/FormatterContentBuilder.js: Renamed from Source/WebInspectorUI/UserInterface/Controllers/FormatterContentBuilder.js.
3213         (FormatterContentBuilder):
3214         Simplify construction of a Builder. The constructor objects were always
3215         the same and often unnecessary. Also move out of the WebInspector
3216         namespace signifying it can be used within a Worker.
3217
3218         (FormatterContentBuilder.prototype.get originalContent): Deleted.
3219         (FormatterContentBuilder.prototype.get formattedContent): Deleted.
3220         (FormatterContentBuilder.prototype.get sourceMapData): Added.
3221         Simplify getting all the data needed for SourceMaps.
3222
3223         (FormatterContentBuilder.prototype.setOriginalLineEndings):
3224         A client may wish to pre-fill line endings instead of filling
3225         while building.
3226
3227         (FormatterContentBuilder.prototype.appendNewline):
3228         Auto-clear trailing whitespace on the previous line.
3229
3230         * UserInterface/Workers/Formatter/ESTreeWalker.js: Added.
3231         (ESTreeWalker):
3232         (ESTreeWalker.prototype.walk):
3233         (ESTreeWalker.prototype._walk):
3234         (ESTreeWalker.prototype._walkArray):
3235         (ESTreeWalker.prototype._walkChildren):
3236         Walk AST nodes in an ESTree format. Due to the spec's incompleteness
3237         this is essentially Esprima's ESTree.
3238
3239         * UserInterface/Workers/Formatter/EsprimaFormatter.js: Added.
3240         (EsprimaFormatter):
3241         (EsprimaFormatter.isWhitespace):
3242         (EsprimaFormatter.prototype.get formattedText):
3243         (EsprimaFormatter.prototype.get sourceMapData):
3244         (EsprimaFormatter.prototype._insertNewlinesBeforeToken):
3245         (EsprimaFormatter.prototype._insertComment):
3246         (EsprimaFormatter.prototype._insertSameLineTrailingComments):
3247         (EsprimaFormatter.prototype._insertCommentsAndNewlines):
3248         (EsprimaFormatter.prototype._before):
3249         (EsprimaFormatter.prototype._after):
3250         (EsprimaFormatter.prototype._isInForHeader):
3251         (EsprimaFormatter.prototype._isRangeWhitespace):
3252         (EsprimaFormatter.prototype._handleTokenAtNode):
3253         (EsprimaFormatter.prototype._exitNode):
3254         (EsprimaFormatter.prototype._afterProgram):
3255         Pretty print source text.
3256
3257         * UserInterface/Workers/Formatter/FormatterUtilities.js: Added.
3258         (Array.prototype.lastValue):
3259         (String.prototype.lineEndings):
3260         (isECMAScriptWhitespace):
3261         (isECMAScriptLineTerminator):
3262         Helpers used by the classes in the Worker code.
3263         
3264         * UserInterface/Workers/Formatter/FormatterWorker.js: Added.
3265         (FormatterWorker):
3266         (FormatterWorker.prototype.formatJavaScript):
3267         (FormatterWorker.prototype._handleMessage):
3268         Handle the formatJavaScript action.
3269
3270 2016-04-06  Matt Baker  <mattbaker@apple.com>
3271
3272         Web Inspector: Improve filtering in OpenResourceDialog
3273         https://bugs.webkit.org/show_bug.cgi?id=155324
3274         <rdar://problem/25094504>
3275
3276         Reviewed by Joseph Pecoraro and Timothy Hatcher.
3277
3278         * UserInterface/Base/Utilities.js:
3279         (value):
3280         Added String methods isLowerCase, isUpperCase, removeWhitespace.
3281
3282         * UserInterface/Controllers/ResourceQueryController.js: Added.
3283         (WebInspector.ResourceQueryController):
3284         (WebInspector.ResourceQueryController.prototype.addResource):
3285         (WebInspector.ResourceQueryController.prototype.removeResource):
3286         Add and remove the resources to be queried.
3287
3288         (WebInspector.ResourceQueryController.prototype.reset):
3289         Reset controller state. Current just clears resources.
3290
3291         (WebInspector.ResourceQueryController.prototype.executeQuery):
3292         Executes a query against the list of resources and returns a list of
3293         QueryResult objects, with at most one result per resource, ordered by
3294         descending rank.
3295
3296         The query string is stripped of whitespace characters and lowercased
3297         before use. Prior to running the query, resources undergo a one-time
3298         pre-processing step to locate special characters.
3299
3300         (WebInspector.ResourceQueryController.prototype._findQueryMatches.pushMatch):
3301         (WebInspector.ResourceQueryController.prototype._findQueryMatches.matchNextSpecialCharacter):
3302         (WebInspector.ResourceQueryController.prototype._findQueryMatches.backtrack):
3303         (WebInspector.ResourceQueryController.prototype._findQueryMatches):
3304         Returns a list of query matches for a single resource, along with metadata
3305         which is used to rank the matches. The algorithm attempts to match the
3306         entire query, first comparing each query character against "special" characters
3307         in the resource (commonly used filename separators, the first character,
3308         and camel-case word boundaries).
3309
3310         If there are remaining query characters after exhausting special characters,
3311         regular characters are matched starting from the last matched special
3312         character. Failing that, the algorithm attempts to find a match by backtracking.
3313         To backtrack, the last match is discarded and the query position decremented.
3314         If a special match is now the last match, matching starts again from the
3315         next character in the filename after the match. If a normal match is now
3316         the last match, keep discarding until a special match is found or no matches
3317         remain. The query fails if no matches remain. For example, consider:
3318
3319            Query: "abcd"