3d1b9a3f89ca2abe94c01dce26a4c8484351f28a
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2014-01-27  Joseph Pecoraro  <pecoraro@apple.com>
2
3         Web Inspector: Feature Check all Protocol Generated Interfaces to get JSContext Inspection working
4         https://bugs.webkit.org/show_bug.cgi?id=127712
5
6         Reviewed by Timothy Hatcher.
7
8         Feature check protocol generated interfaces (e.g. FooAgent and registerFooObserver).
9         Also drive by handle a possible exception if a SourceCode's URL is null, which is possible.
10
11         * UserInterface/ApplicationCacheManager.js:
12         (WebInspector.ApplicationCacheManager):
13         (WebInspector.ApplicationCacheManager.prototype.initialize):
14         * UserInterface/CSSCompletions.js:
15         (WebInspector.CSSCompletions.requestCSSNameCompletions):
16         * UserInterface/CSSStyleManager.js:
17         (WebInspector.CSSStyleManager):
18         (WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
19         * UserInterface/DebuggerManager.js:
20         * UserInterface/FrameResourceManager.js:
21         (WebInspector.FrameResourceManager):
22         (WebInspector.FrameResourceManager.prototype.initialize):
23         * UserInterface/Main.js:
24         (WebInspector.loaded):
25         * UserInterface/ProfileManager.js:
26         (WebInspector.ProfileManager):
27         * UserInterface/StorageManager.js:
28         (WebInspector.StorageManager):
29         Type check generated interfaces.
30
31         (WebInspector.DebuggerManager):
32         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
33         Null check a SourceCode URL, which can be null for a Script with no URL.
34
35 2014-01-25  Timothy Hatcher  <timothy@apple.com>
36
37         Remove dead code from the JSC profiler.
38
39         https://bugs.webkit.org/show_bug.cgi?id=127643
40
41         Reviewed by Mark Lam.
42
43         * Versions/Inspector-iOS-7.0.json: Remove visible from CPUProfileNode.
44
45 2014-01-25  Joseph Pecoraro  <pecoraro@apple.com>
46
47         Remove FIXME in CSSKeywordCompletions.js about "inherit" keyword
48         https://bugs.webkit.org/show_bug.cgi?id=127638
49
50         Reviewed by Timothy Hatcher.
51
52         * UserInterface/CSSKeywordCompletions.js:
53         (WebInspector.CSSKeywordCompletions.forProperty):
54         Replace FIXME with a descriptive comment about why the code is what it is.
55
56 2014-01-25  Diego Pino Garcia  <dpino@igalia.com>
57
58         Web Inspector: Position the completion suggestions popup below if there is room
59         https://bugs.webkit.org/show_bug.cgi?id=127615
60
61         Reviewed by Joseph Pecoraro.
62
63         * UserInterface/CompletionSuggestionsView.js:
64         (WebInspector.CompletionSuggestionsView.prototype.show):
65
66 2014-01-23  Timothy Hatcher  <timothy@apple.com>
67
68         Refactor TimelineRecordBar combining logic into a helper function.
69
70         https://bugs.webkit.org/show_bug.cgi?id=127530
71
72         Reviewed by Joseph Pecoraro.
73
74         * UserInterface/LayoutTimelineOverviewGraph.js:
75         (WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout.createBar):
76         (WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
77         Use TimelineRecordBar.createCombinedBars.
78
79         * UserInterface/NetworkTimelineOverviewGraph.css:
80         (.timeline-overview-graph.network):
81         (.timeline-overview-graph.network > .graph-row > .timeline-record-bar):
82         Cleaned up since we are using TimelineRecordBar.
83
84         * UserInterface/NetworkTimelineOverviewGraph.js:
85         (WebInspector.NetworkTimelineOverviewGraph.prototype.reset):
86         (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar):
87         (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout):
88         Use TimelineRecordBar.createCombinedBars.
89
90         * UserInterface/ScriptTimelineOverviewGraph.js:
91         (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout.createBar):
92         (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
93         Use TimelineRecordBar.createCombinedBars.
94
95         * UserInterface/TimelineDataGridNode.js:
96         (WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBar):
97         (WebInspector.TimelineDataGridNode.prototype.refreshGraph):
98         Use TimelineRecordBar.createCombinedBars.
99
100         * UserInterface/TimelineRecordBar.css:
101         (.timeline-record-bar.unfinished > .segment):
102         (.timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
103         (:focus .selected .timeline-record-bar > .segment.inactive):
104         Improved selected appearance and don't assume .segment.inactive exists.
105
106         * UserInterface/TimelineRecordBar.js:
107         (WebInspector.TimelineRecordBar):
108         (WebInspector.TimelineRecordBar.createCombinedBars.compareByActiveStartTime): Added.
109         (WebInspector.TimelineRecordBar.createCombinedBars): Added.
110         (WebInspector.TimelineRecordBar.prototype.get renderMode): Added.
111         (WebInspector.TimelineRecordBar.prototype.set renderMode): Added.
112         (WebInspector.TimelineRecordBar.prototype.set records):
113         (WebInspector.TimelineRecordBar.prototype.refresh):
114         Lazily create DOM elements. Support rendering one or both segments. Doing this lets
115         combined inactive segments sit behind multiple active segments.
116
117 2014-01-22  Timothy Hatcher  <timothy@apple.com>
118
119         Improve collapsing of TimelineDataGridNode graphs up to ancestors.
120
121         https://bugs.webkit.org/show_bug.cgi?id=127440
122
123         Reviewed by Joseph Pecoraro.
124
125         * UserInterface/TimelineDataGridNode.js:
126         (WebInspector.TimelineDataGridNode.prototype.collapse):
127         (WebInspector.TimelineDataGridNode.prototype.createCellContent):
128         (WebInspector.TimelineDataGridNode.prototype.refresh):
129         (WebInspector.TimelineDataGridNode.prototype.needsGraphRefresh):
130         Notify the next visible ancestor it needs to refresh. Use needsGraphRefresh so ancestors
131         are notified instead of directly calling refreshGraph in some places.
132
133 2014-01-22  Timothy Hatcher  <timothy@apple.com>
134
135         Don't include a hidden Timeline selection in the navigation path components.
136
137         https://bugs.webkit.org/show_bug.cgi?id=127443
138
139         Reviewed by Joseph Pecoraro.
140
141         * UserInterface/GeneralTreeElementPathComponent.js:
142         (WebInspector.GeneralTreeElementPathComponent.prototype.get previousSibling):
143         (WebInspector.GeneralTreeElementPathComponent.prototype.get nextSibling):
144         Skip hidden siblings.
145
146         * UserInterface/OverviewTimelineView.js:
147         (WebInspector.OverviewTimelineView.prototype.updateLayout):
148         (WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
149         Don't include hidden selection and dispatch SelectionPathComponentsDidChange event if hidden changes.
150
151         * UserInterface/TimelineContentView.js:
152         (WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
153         Dispatch SelectionPathComponentsDidChange event if hidden changes on the selected tree element.
154
155         * UserInterface/TimelineView.js:
156         (WebInspector.TimelineView.prototype.get selectionPathComponents):
157         Don't include hidden selection.
158
159 2014-01-22  Timothy Hatcher  <timothy@apple.com>
160
161         Support collapsing call site records into the resource timeline.
162
163         Also fix some filtering and graph issues.
164
165         https://bugs.webkit.org/show_bug.cgi?id=127440
166
167         Reviewed by Joseph Pecoraro.
168
169         * UserInterface/NavigationSidebarPanel.js:
170         (WebInspector.NavigationSidebarPanel.prototype.updateFilter):
171         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter):
172         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.makeVisible):
173         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
174         (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
175         Tweak how filtering happens so custom filters never expand to reveal and auto expanded
176         tree elements will auto-collapse again later even with custom filters.
177
178         * UserInterface/OverviewTimelineView.css:
179         (.timeline-view.overview > .data-grid tr.parent:not(.expanded) td.graph-column .timeline-record-bar:not(.timeline-record-type-network) > .segment):
180         (.timeline-view.overview > .data-grid tr.parent:not(.expanded).selected td.graph-column .timeline-record-bar:not(.timeline-record-type-network) > .segment):
181         (.timeline-view.overview > .data-grid:focus tr.parent:not(.expanded).selected td.graph-column .timeline-record-bar:not(.timeline-record-type-network) > .segment):
182         Add a shadow to provide some negative space between juxtaposed records. Only needed when not expanded.
183
184         * UserInterface/OverviewTimelineView.js:
185         (WebInspector.OverviewTimelineView.prototype.updateLayout):
186         (WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
187         Update the filter when current time changes and only auto expand the main resource.
188
189         * UserInterface/ResourceTimelineDataGridNode.js:
190         (WebInspector.ResourceTimelineDataGridNode):
191         (WebInspector.ResourceTimelineDataGridNode.prototype._timelineRecordUpdated):
192         Don't schedule a refresh of the graph if the record isn't visible.
193
194         * UserInterface/SourceCodeTimelineTimelineDataGridNode.js:
195         (WebInspector.SourceCodeTimelineTimelineDataGridNode):
196         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype._timelineRecordAdded):
197         Don't schedule a refresh of the graph if the record isn't visible.
198
199         * UserInterface/TimelineContentView.js:
200         (WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
201         Remove the boolean for updateFilter.
202
203         * UserInterface/TimelineDataGrid.js:
204         (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
205         (WebInspector.TimelineDataGrid.prototype._sort):
206         Keep the hidden state in-sync between node and element.
207
208         * UserInterface/TimelineDataGridNode.js:
209         (WebInspector.TimelineDataGridNode.prototype.collapse):
210         (WebInspector.TimelineDataGridNode.prototype.expand):
211         (WebInspector.TimelineDataGridNode.prototype.appendChild):
212         (WebInspector.TimelineDataGridNode.prototype.insertChild):
213         (WebInspector.TimelineDataGridNode.prototype.removeChild):
214         (WebInspector.TimelineDataGridNode.prototype.removeChildren):
215         (WebInspector.TimelineDataGridNode.prototype.removeChildrenRecursive):
216         (WebInspector.TimelineDataGridNode.prototype.refreshGraph.createBarsForRecords):
217         (WebInspector.TimelineDataGridNode.prototype.refreshGraph.else.collectRecordsByType.get if):
218         (WebInspector.TimelineDataGridNode.prototype.needsGraphRefresh):
219         (WebInspector.TimelineDataGridNode.prototype.isRecordVisible):
220         Support drawing the children records on the parent graph.
221
222         * UserInterface/TimelineRecordBar.css:
223         (.timeline-record-bar.unfinished > .segment):
224         (:focus .selected .timeline-record-bar > .segment):
225         (:focus .selected .timeline-record-bar > .segment.inactive):
226         (:focus .selected .timeline-record-bar.has-inactive-segment > .segment:not(.inactive)):
227         Tweaked styles to look better when selected.
228
229         * UserInterface/TimelineRecordBar.js:
230         (WebInspector.TimelineRecordBar.recordsCannotBeCombined):
231         (WebInspector.TimelineRecordBar.prototype.set records):
232         (WebInspector.TimelineRecordBar.prototype.refresh):
233         Drive-by fixes for some bug with bars being reused.
234
235 2014-01-21  Timothy Hatcher  <timothy@apple.com>
236
237         Remember the Timeline Overview zoom and selection between sessions.
238
239         https://bugs.webkit.org/show_bug.cgi?id=127369
240
241         Reviewed by Joseph Pecoraro.
242
243         * UserInterface/TimelineOverview.js:
244         (WebInspector.TimelineOverview):
245         (WebInspector.TimelineOverview.prototype.set secondsPerPixel):
246         (WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
247
248 2014-01-21  Timothy Hatcher  <timothy@apple.com>
249
250         Show the Resource and Record selection path in the navigation bar for Timeline views.
251
252         https://bugs.webkit.org/show_bug.cgi?id=127367
253
254         Reviewed by Joseph Pecoraro.
255
256         * UserInterface/LayoutTimelineView.js:
257         (WebInspector.LayoutTimelineView.prototype.treeElementPathComponentSelected):
258         (WebInspector.LayoutTimelineView.prototype._dataGridNodeSelected):
259         * UserInterface/NetworkTimelineView.js:
260         (WebInspector.NetworkTimelineView.prototype.treeElementPathComponentSelected):
261         (WebInspector.NetworkTimelineView.prototype._dataGridNodeSelected):
262         * UserInterface/OverviewTimelineView.js:
263         (WebInspector.OverviewTimelineView.prototype.get selectionPathComponents):
264         (WebInspector.OverviewTimelineView.prototype.treeElementPathComponentSelected):
265         (WebInspector.OverviewTimelineView.prototype._dataGridNodeSelected):
266         * UserInterface/ScriptTimelineView.js:
267         (WebInspector.ScriptTimelineView.prototype.treeElementPathComponentSelected):
268         (WebInspector.ScriptTimelineView.prototype._dataGridNodeSelected):
269         * UserInterface/TimelineContentView.js:
270         (WebInspector.TimelineContentView.prototype._timelineViewSelectionPathComponentsDidChange):
271         (WebInspector.TimelineContentView.prototype._showTimelineView):
272         * UserInterface/TimelineDataGrid.js:
273         (WebInspector.TimelineDataGrid.prototype.treeElementForDataGridNode):
274         (WebInspector.TimelineDataGrid.prototype.dataGridNodeForTreeElement):
275         * UserInterface/TimelineView.js:
276         (WebInspector.TimelineView.prototype.get selectionPathComponents):
277         (WebInspector.TimelineView.prototype.treeElementPathComponentSelected):
278
279 2014-01-20  Timothy Hatcher  <timothy@apple.com>
280
281         Add the recording button back to the Timelines sidebar.
282
283         https://bugs.webkit.org/show_bug.cgi?id=127314
284
285         Reviewed by Joseph Pecoraro.
286
287         * Localizations/en.lproj/localizedStrings.js: Updated.
288
289         * UserInterface/TimelineContentView.js:
290         (WebInspector.TimelineContentView.prototype.get navigationItems):
291         (WebInspector.TimelineContentView.prototype._update):
292         (WebInspector.TimelineContentView.prototype._updateTimes):
293         (WebInspector.TimelineContentView.prototype._startUpdatingCurrentTime):
294         (WebInspector.TimelineContentView.prototype._recordingTimesUpdated):
295         (WebInspector.TimelineContentView.prototype._clearTimeline):
296         (WebInspector.TimelineContentView.prototype._recordingReset):
297         Add a clear button and reset the time ruler and views when the recording resets.
298
299         * UserInterface/TimelineSidebarPanel.css:
300         (.sidebar > .panel.timeline > .status-bar):
301         (.sidebar > .panel.timeline > .status-bar > .record-glyph):
302         (.sidebar > .panel.timeline > .status-bar > .record-glyph.recording):
303         (.sidebar > .panel.timeline > .status-bar > .record-glyph:hover):
304         (.sidebar > .panel.timeline > .status-bar > .record-glyph.recording:hover):
305         (.sidebar > .panel.timeline > .status-bar > .record-glyph.forced):
306         (.sidebar > .panel.timeline > .status-bar > .record-glyph.recording.forced):
307         (.sidebar > .panel.timeline > .status-bar > .record-status):
308         Add styles for the recording button and status message.
309
310         * UserInterface/TimelineSidebarPanel.js:
311         (WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
312         (WebInspector.TimelineSidebarPanel.prototype._recordingStarted):
313         (WebInspector.TimelineSidebarPanel.prototype._recordingStopped):
314         (WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOver):
315         (WebInspector.TimelineSidebarPanel.prototype._recordGlyphMousedOut):
316         (WebInspector.TimelineSidebarPanel.prototype._recordGlyphClicked):
317         Add support for the recording button and status message.
318
319 2014-01-20  Timothy Hatcher  <timothy@apple.com>
320
321         Make the TimelineRecordTreeElement location subtitle live.
322
323         https://bugs.webkit.org/show_bug.cgi?id=127270
324
325         Reviewed by Joseph Pecoraro.
326
327         * Localizations/en.lproj/localizedStrings.js: Updated.
328
329         * UserInterface/SourceCodeLocation.js:
330         (WebInspector.SourceCodeLocation.prototype.originalLocationString):
331         (WebInspector.SourceCodeLocation.prototype.formattedLocationString):
332         (WebInspector.SourceCodeLocation.prototype.displayLocationString):
333         (WebInspector.SourceCodeLocation.prototype.updateDisplayString):
334         (WebInspector.SourceCodeLocation.prototype._locationString):
335         Support for a new nameStyle enum and a prefix for the location string.
336         Passing the prefix here lets it be italicized with the line number.
337         Support column number for SourceCode's without a URL too.
338
339         * UserInterface/TimelineRecordTreeElement.js:
340         (WebInspector.TimelineRecordTreeElement):
341         (WebInspector.TimelineRecordTreeElement.prototype.onattach):
342         Create a subtitle span to update the location inside. Update the tooltip on attach.
343
344 2014-01-19  Timothy Hatcher  <timothy@apple.com>
345
346         Generate better display names for timer and event Timeline records.
347
348         Also support AnimationFrameRequested and AnimationFrameCanceled.
349
350         https://bugs.webkit.org/show_bug.cgi?id=127258
351
352         Reviewed by Joseph Pecoraro.
353
354         * Localizations/en.lproj/localizedStrings.js: Updated.
355
356         * UserInterface/LayoutTimelineRecord.js:
357         (WebInspector.LayoutTimelineRecord.EventType.displayName):
358         Generate past tense names that better match other names.
359
360         * UserInterface/ScriptTimelineDataGridNode.js:
361         (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent):
362         Pass the details to displayName.
363
364         * UserInterface/ScriptTimelineRecord.js:
365         (WebInspector.ScriptTimelineRecord.EventType.displayName):
366         Generate better names for timer and event records. Also add missing animation frame types.
367
368         * UserInterface/ScriptTimelineView.js:
369         (WebInspector.ScriptTimelineView.prototype._processPendingRecords):
370         Pass true to WebInspector.TimelineRecordTreeElement to include timer identifiers in the title.
371
372         * UserInterface/SourceCodeTimelineTreeElement.js:
373         (WebInspector.SourceCodeTimelineTreeElement):
374         Pass includeTimerIdentifierInMainTitle through to TimelineRecordTreeElement.
375
376         * UserInterface/TimelineManager.js:
377         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
378         Include AnimationFrameRequested and AnimationFrameCanceled.
379
380         * UserInterface/TimelineRecordTreeElement.js:
381         (WebInspector.TimelineRecordTreeElement):
382         Use displayName functions instead and support includeTimerIdentifierInMainTitle.
383
384 2014-01-19  Timothy Hatcher  <timothy@apple.com>
385
386         Implement basic versions of the TimelineOverview graphs.
387
388         https://bugs.webkit.org/show_bug.cgi?id=127184
389
390         Reviewed by Joseph Pecoraro.
391
392         * UserInterface/LayoutTimelineOverviewGraph.css: Added.
393         (.timeline-overview-graph.layout > .timeline-record-bar):
394         (.timeline-overview-graph.layout > .timeline-record-bar > .segment):
395
396         * UserInterface/LayoutTimelineOverviewGraph.js: Added.
397         (WebInspector.LayoutTimelineOverviewGraph.prototype.reset):
398         (WebInspector.LayoutTimelineOverviewGraph.prototype.updateLayout):
399         (WebInspector.LayoutTimelineOverviewGraph.prototype._layoutTimelineRecordAdded):
400
401         * UserInterface/Main.html: Added new files.
402
403         * UserInterface/NetworkTimelineOverviewGraph.css: Added.
404         (.timeline-overview-graph.network):
405         (.timeline-overview-graph.network > .graph-row):
406         (.timeline-overview-graph.network > .graph-row > .bar):
407         (.timeline-overview-graph.network > .graph-row > .bar.inactive):
408         (.timeline-overview-graph.network > .graph-row > .bar.unfinished):
409         (.timeline-overview-graph.network > .graph-row > .bar:not(.inactive)):
410         (.timeline-overview-graph.network:nth-child(even) > .graph-row > .bar:not(.inactive)):
411
412         * UserInterface/NetworkTimelineOverviewGraph.js: Added.
413         (WebInspector.NetworkTimelineOverviewGraph.prototype.reset):
414         (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.updateElementPosition):
415         (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout.createBar):
416         (WebInspector.NetworkTimelineOverviewGraph.prototype.updateLayout):
417         (WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded.compareByStartTime):
418         (WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded.insertObjectIntoSortedArray):
419         (WebInspector.NetworkTimelineOverviewGraph.prototype._networkTimelineRecordAdded):
420
421         * UserInterface/ScriptTimelineOverviewGraph.css: Added.
422         (.timeline-overview-graph.script > .timeline-record-bar):
423         (.timeline-overview-graph.script > .timeline-record-bar > .segment):
424
425         * UserInterface/ScriptTimelineOverviewGraph.js: Added.
426         (WebInspector.ScriptTimelineOverviewGraph.prototype.reset):
427         (WebInspector.ScriptTimelineOverviewGraph.prototype.updateLayout):
428         (WebInspector.ScriptTimelineOverviewGraph.prototype._scriptTimelineRecordAdded):
429
430         * UserInterface/TimelineContentView.js:
431         (WebInspector.TimelineContentView.prototype._showTimelineView):
432         (WebInspector.TimelineContentView.prototype._update):
433         (WebInspector.TimelineContentView.prototype._recordingReset):
434         Create and keep the graphs informed.
435
436         * UserInterface/TimelineDataGridNode.js:
437         (WebInspector.TimelineDataGridNode):
438         (WebInspector.TimelineDataGridNode.prototype.refreshGraph):
439         Combine records that might overlap.
440
441         * UserInterface/TimelineOverview.css:
442         (.timeline-overview > .graphs-container):
443         (.timeline-overview > .graphs-container > .timeline-overview-graph):
444         (.timeline-overview > .graphs-container > .timeline-overview-graph:nth-child(even)):
445         (.timeline-overview > .graphs-container > .timeline-overview-graph:not(:first-child)):
446         Add the graph rows with alternating stripe.
447
448         * UserInterface/TimelineOverview.js:
449         (WebInspector.TimelineOverview):
450         (WebInspector.TimelineOverview.prototype.set startTime):
451         (WebInspector.TimelineOverview.prototype.get currentTime):
452         (WebInspector.TimelineOverview.prototype.set currentTime):
453         (WebInspector.TimelineOverview.prototype.updateLayout):
454         (WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
455         Track currentTime in a member variable and let TimelineOverview manage the current time marker.
456
457         * UserInterface/TimelineOverviewGraph.js: Added.
458         (WebInspector.TimelineOverviewGraph):
459         (WebInspector.TimelineOverviewGraph.prototype.get zeroTime):
460         (WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
461         (WebInspector.TimelineOverviewGraph.prototype.get startTime):
462         (WebInspector.TimelineOverviewGraph.prototype.set startTime):
463         (WebInspector.TimelineOverviewGraph.prototype.get endTime):
464         (WebInspector.TimelineOverviewGraph.prototype.set endTime):
465         (WebInspector.TimelineOverviewGraph.prototype.get currentTime):
466         (WebInspector.TimelineOverviewGraph.prototype.set currentTime):
467         (WebInspector.TimelineOverviewGraph.prototype.reset):
468         (WebInspector.TimelineOverviewGraph.prototype.updateLayout):
469         (WebInspector.TimelineOverviewGraph.prototype.updateLayoutIfNeeded):
470         (WebInspector.TimelineOverviewGraph.prototype.needsLayout):
471
472         * UserInterface/TimelineRecordBar.css:
473         (.timeline-record-bar > .segment):
474         (.timeline-record-bar.unfinished > .segment):
475         (.timeline-record-bar > .segment.inactive + .segment):
476         (.timeline-record-bar.timeline-record-type-network > .segment.inactive):
477
478         * UserInterface/TimelineRecordBar.js:
479         (WebInspector.TimelineRecordBar):
480         (WebInspector.TimelineRecordBar.recordsCannotBeCombined):
481         (WebInspector.TimelineRecordBar.prototype.get records):
482         (WebInspector.TimelineRecordBar.prototype.set records):
483         (WebInspector.TimelineRecordBar.prototype.refresh):
484         Make TimelineRecordBar support multiple records.
485
486         * UserInterface/TimelineRuler.css:
487         (.timeline-ruler > .markers):
488         (.timeline-ruler > .selection-handle):
489         (.timeline-ruler > .shaded-area):
490         Add some z-index values to stay above graph elements.
491
492 2014-01-16  Timothy Hatcher  <timothy@apple.com>
493
494         Clean up Timelines code by using ES6 features and less global access of TimelineRecording.
495         Also don't recreate Timeline objects when TimelineRecording is reset, reset them instead.
496
497         https://bugs.webkit.org/show_bug.cgi?id=127157
498
499         Reviewed by Joseph Pecoraro.
500
501         * UserInterface/LayoutTimelineView.js:
502         (WebInspector.LayoutTimelineView.prototype.reset):
503         * UserInterface/NetworkTimeline.js:
504         (WebInspector.NetworkTimeline):
505         (WebInspector.NetworkTimeline.prototype.reset):
506         * UserInterface/NetworkTimelineView.js:
507         (WebInspector.NetworkTimelineView.prototype.reset):
508         * UserInterface/OverviewTimelineView.js:
509         (WebInspector.OverviewTimelineView.prototype._networkTimelineRecordAdded):
510         * UserInterface/ScriptTimelineView.js:
511         (WebInspector.ScriptTimelineView.prototype.reset):
512         * UserInterface/Timeline.js:
513         (WebInspector.Timeline):
514         (WebInspector.Timeline.prototype.reset):
515         * UserInterface/TimelineContentView.js:
516         (WebInspector.TimelineContentView.set createPathComponent):
517         (WebInspector.TimelineContentView.set var):
518         (WebInspector.TimelineContentView.prototype.showOverviewTimelineView):
519         (WebInspector.TimelineContentView.prototype.showTimelineView):
520         (WebInspector.TimelineContentView.prototype._showTimelineView):
521         (WebInspector.TimelineContentView.prototype._update):
522         (WebInspector.TimelineContentView.prototype._recordingReset):
523         * UserInterface/TimelineRecording.js:
524         (WebInspector.TimelineRecording.prototype.reset):
525
526 2014-01-16  Timothy Hatcher  <timothy@apple.com>
527
528         Improve WebInspector.TimelineOverview by not putting WebInspector.TimelineRuler in a scroll area.
529
530         https://bugs.webkit.org/show_bug.cgi?id=127145
531
532         Reviewed by Joseph Pecoraro.
533
534         * UserInterface/TimelineOverview.css:
535         (.timeline-overview > .scroll-container):
536         (.timeline-overview > .timeline-ruler):
537         (.timeline-overview > .scroll-container > .scroll-width-sizer):
538         * UserInterface/TimelineOverview.js:
539         (WebInspector.TimelineOverview):
540         (WebInspector.TimelineOverview.prototype.get startTime):
541         (WebInspector.TimelineOverview.prototype.set startTime):
542         (WebInspector.TimelineOverview.prototype.get secondsPerPixel):
543         (WebInspector.TimelineOverview.prototype.set secondsPerPixel):
544         (WebInspector.TimelineOverview.prototype.get scrollStartTime):
545         (WebInspector.TimelineOverview.prototype.set scrollStartTime):
546         (WebInspector.TimelineOverview.prototype.get visibleDuration):
547         (WebInspector.TimelineOverview.prototype.revealMarker):
548         (WebInspector.TimelineOverview.prototype.updateLayout):
549         (WebInspector.TimelineOverview.prototype._handleScrollEvent):
550         (WebInspector.TimelineOverview.prototype._handleWheelEvent):
551         * UserInterface/TimelineRuler.js:
552         (WebInspector.TimelineRuler.MinimumSelectionTimeRange): Reduce to 10ms now that super zoom has no performance impact.
553
554 2014-01-15  Timothy Hatcher  <timothy@apple.com>
555
556         Implement the discrete Script and Layout timeline views.
557
558         https://bugs.webkit.org/show_bug.cgi?id=127063
559
560         Reviewed by Joseph Pecoraro.
561
562         * Localizations/en.lproj/localizedStrings.js: Updated.
563
564         * UserInterface/DataGrid.js:
565         (WebInspector.DataGrid): Support hidden columns by default.
566         (WebInspector.DataGrid.prototype.updateLayout): Set the column width to zero for hidden columns.
567
568         * UserInterface/LayoutTimelineDataGrid.js:
569         (WebInspector.LayoutTimelineDataGrid): Pass the right parameters to the superclass.
570
571         * UserInterface/LayoutTimelineRecord.js:
572         (WebInspector.LayoutTimelineRecord.prototype.saveIdentityToCookie): Added.
573
574         * UserInterface/LayoutTimelineView.css: Copied from Source/WebInspectorUI/UserInterface/ScriptTimelineDataGrid.js.
575         (.timeline-view.layout > .data-grid):
576         (.timeline-view.layout > .data-grid .eventType-column):
577         (.sidebar > .panel.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.layout .item .subtitle):
578
579         * UserInterface/LayoutTimelineView.js: Added.
580         (WebInspector.LayoutTimelineView):
581         (WebInspector.LayoutTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
582         (WebInspector.LayoutTimelineView.prototype.shown):
583         (WebInspector.LayoutTimelineView.prototype.hidden):
584         (WebInspector.LayoutTimelineView.prototype.updateLayout):
585         (WebInspector.LayoutTimelineView.prototype.matchTreeElementAgainstCustomFilters):
586         (WebInspector.LayoutTimelineView.prototype._layoutTimelineRecordAdded):
587         (WebInspector.LayoutTimelineView.prototype._dataGridFiltersDidChange):
588         (WebInspector.LayoutTimelineView.prototype._treeElementSelected):
589
590         * UserInterface/Main.html: Added new files.
591
592         * UserInterface/ScriptTimelineDataGrid.js:
593         (WebInspector.ScriptTimelineDataGrid): Pass the right parameters to the superclass.
594
595         * UserInterface/ScriptTimelineDataGridNode.js:
596         (WebInspector.ScriptTimelineDataGridNode.prototype.createCellContent): Fix up how we create the link.
597
598         * UserInterface/ScriptTimelineRecord.js:
599         (WebInspector.ScriptTimelineRecord.prototype.saveIdentityToCookie): Added.
600
601         * UserInterface/ScriptTimelineView.css: Copied from Source/WebInspectorUI/UserInterface/ScriptTimelineDataGrid.js.
602         (.timeline-view.script > .data-grid):
603         (.timeline-view.script > .data-grid .eventType-column):
604         (.sidebar > .panel.timeline.timeline-content-view-showing .navigation-sidebar-panel-content-tree-outline.script .item .subtitle):
605
606         * UserInterface/ScriptTimelineView.js: Added.
607         (WebInspector.ScriptTimelineView):
608         (WebInspector.ScriptTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
609         (WebInspector.ScriptTimelineView.prototype.shown):
610         (WebInspector.ScriptTimelineView.prototype.hidden):
611         (WebInspector.ScriptTimelineView.prototype.updateLayout):
612         (WebInspector.ScriptTimelineView.prototype.matchTreeElementAgainstCustomFilters):
613         (WebInspector.ScriptTimelineView.prototype._scriptTimelineRecordAdded):
614         (WebInspector.ScriptTimelineView.prototype._dataGridFiltersDidChange):
615         (WebInspector.ScriptTimelineView.prototype._treeElementSelected):
616
617         * UserInterface/SourceCodeTimelineTreeElement.js:
618         (WebInspector.SourceCodeTimelineTreeElement):
619         Moved code to TimelineRecordTreeElement. Subclass from it.
620
621         * UserInterface/TimelineContentView.js:
622         (WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters): Support TimelineRecordTreeElement.
623         (WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged): Update zeroTime for all views.
624
625         * UserInterface/TimelineDataGrid.css:
626         (.data-grid.timeline td .icon):
627         (.data-grid.timeline td .go-to-arrow):
628         (.data-grid.timeline tr:hover .go-to-arrow):
629         (.data-grid.timeline td .subtitle):
630         (.data-grid.timeline td .subtitle::before):
631         (.data-grid.timeline:focus tr.selected td .subtitle):
632
633         * UserInterface/TimelineRecord.js:
634         (WebInspector.TimelineRecord.prototype.saveIdentityToCookie): Added.
635
636         * UserInterface/TimelineRecordTreeElement.js: Added.
637         (WebInspector.TimelineRecordTreeElement):
638         (WebInspector.TimelineRecordTreeElement.prototype.get record):
639         (WebInspector.TimelineRecordTreeElement.prototype.get filterableData):
640         Factored out from SourceCodeTimelineTreeElement.
641
642         * UserInterface/TimelineSidebarPanel.js:
643         (WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject.looslyCompareRepresentedObjects):
644         (WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject):
645         Find TreeElements via a loose lookup based on represented objects that might contain the represented object we are
646         really looking for.
647
648 2014-01-14  Timothy Hatcher  <timothy@apple.com>
649
650         Implement the discrete Network timeline view.
651
652         https://bugs.webkit.org/show_bug.cgi?id=127022
653
654         Reviewed by Joseph Pecoraro.
655
656         * UserInterface/DataGrid.js:
657         (WebInspector.DataGrid): Align the labels of the column headers to match the data.
658         (WebInspector.DataGridNode.prototype.get selectable): Prevent selection when hidden.
659
660         * UserInterface/DetailsSection.css:
661         (.details-section > .header): Bump the font size to match data grid header sizes.
662
663         * UserInterface/Main.html: Add new files.
664
665         * UserInterface/NetworkTimelineView.css: Added.
666         (.timeline-view.network > .data-grid):
667         (.sidebar > .panel.timeline.timeline-content-view-showing > .content .item.resource .subtitle):
668         Hide the domain subtitle when the content view is showing which also has the domain.
669
670         * UserInterface/NetworkTimelineView.js: Added.
671         (WebInspector.NetworkTimelineView):
672         (WebInspector.NetworkTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
673         (WebInspector.NetworkTimelineView.prototype.shown):
674         (WebInspector.NetworkTimelineView.prototype.hidden):
675         (WebInspector.NetworkTimelineView.prototype.updateLayout):
676         (WebInspector.NetworkTimelineView.prototype.matchTreeElementAgainstCustomFilters):
677         (WebInspector.NetworkTimelineView.prototype._networkTimelineRecordAdded):
678         (WebInspector.NetworkTimelineView.prototype._dataGridFiltersDidChange):
679         (WebInspector.NetworkTimelineView.prototype._treeElementSelected):
680
681         * UserInterface/ResourceTimelineDataGridNode.js:
682         (WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh):
683         Call dataGridNodeNeedsRefresh on the TimelineDataGrid so things can be batched with
684         one request animation frame.
685
686         * UserInterface/TimelineContentView.js:
687         (WebInspector.TimelineContentView): Create a NetworkTimelineView.
688         (WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters):
689
690         * UserInterface/TimelineDataGrid.css:
691         (.data-grid.timeline table):
692         (.data-grid.timeline th):
693         (.data-grid.timeline th:not(:last-child)):
694         (.data-grid.timeline th.sortable:active):
695         (.data-grid.timeline th.sort-descending):
696         (.data-grid.timeline .data-container):
697         (.data-grid.timeline td):
698         (.data-grid.timeline td:last-child):
699         (.data-grid.timeline td:not(:last-child)):
700         (.data-grid.timeline:focus tr.selected td:not(:last-child)):
701         (.data-grid.timeline th.sort-descending > div:first-child):
702         (.data-grid.timeline th.sort-descending > div:first-child::after):
703         (.data-grid.timeline td.error):
704         (.data-grid.timeline tr.selected td.error):
705         (.data-grid.timeline > .navigation-bar-container):
706         (.data-grid.timeline:hover > .navigation-bar-container):
707         (.data-grid.timeline > .navigation-bar-container > .navigation-bar):
708
709         * UserInterface/TimelineDataGrid.js:
710         (WebInspector.TimelineDataGrid):
711         (WebInspector.TimelineDataGrid.createColumnScopeBar):
712         (WebInspector.TimelineDataGrid.prototype.reset):
713         (WebInspector.TimelineDataGrid.prototype.shown):
714         (WebInspector.TimelineDataGrid.prototype.hidden):
715         (WebInspector.TimelineDataGrid.prototype.callFramePopoverAnchorElement):
716         (WebInspector.TimelineDataGrid.prototype.updateLayout):
717         (WebInspector.TimelineDataGrid.prototype.treeElementMatchesActiveScopeFilters):
718         (WebInspector.TimelineDataGrid.prototype.addRowInSortOrder):
719         (WebInspector.TimelineDataGrid.prototype.shouldIgnoreSelectionEvent):
720         (WebInspector.TimelineDataGrid.prototype.dataGridNodeNeedsRefresh):
721         (WebInspector.TimelineDataGrid.prototype._refreshDirtyDataGridNodes):
722         (WebInspector.TimelineDataGrid.prototype._sort):
723         (WebInspector.TimelineDataGrid.prototype._sortComparator):
724         Add support for sorting, batch refresh and managing of a TreeOutlineDataGridSynchronizer.
725
726         * UserInterface/TimelineSidebarPanel.css:
727         (.sidebar > .panel.timeline > .title-bar): Bump the font size to match data grid header sizes.
728
729         * UserInterface/TimelineView.js:
730         (WebInspector.TimelineView.prototype.matchTreeElementAgainstCustomFilters): Added stub.
731
732         * UserInterface/TreeOutlineDataGridSynchronizer.js:
733         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.get treeOutline):
734         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.get dataGrid):
735         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.get enabled):
736         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.set enabled):
737         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.treeElementForDataGridNode):
738         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.dataGridNodeForTreeElement):
739         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineScrolled):
740         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridScrolled):
741         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeSelected):
742         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeExpanded):
743         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeCollapsed):
744         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected):
745         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
746         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
747         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded):
748         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed):
749         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged):
750         Added support for disabling the synchronizer when the client can do a better job.
751
752 2014-01-13  Timothy Hatcher  <timothy@apple.com>
753
754         Filter the Timeline overview graph and sidebar based on the current time selection.
755
756         https://bugs.webkit.org/show_bug.cgi?id=126955
757
758         Reviewed by Joseph Pecoraro.
759
760         * UserInterface/NavigationSidebarPanel.js:
761         (WebInspector.NavigationSidebarPanel.prototype.updateFilter):
762         (WebInspector.NavigationSidebarPanel.prototype.hasCustomFilters):
763         (WebInspector.NavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
764         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement.matchTextFilter):
765         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
766         Add support for custom filters implemented by subclasses.
767
768         * UserInterface/TimelineContentView.js:
769         (WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters.checkTimeBounds):
770         (WebInspector.TimelineContentView.prototype.matchTreeElementAgainstCustomFilters):
771         (WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
772         Filter known tree element types by time.
773
774         * UserInterface/TimelineSidebarPanel.css:
775         (.sidebar > .panel.timeline > .empty-content-placeholder):
776         Position the empty placeholder with the content.
777
778         * UserInterface/TimelineSidebarPanel.js:
779         (WebInspector.TimelineSidebarPanel.prototype.hasCustomFilters):
780         (WebInspector.TimelineSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
781         Defer filtering to the TimelineContentView.
782
783 2014-01-13  Timothy Hatcher  <timothy@apple.com>
784
785         Implement state cookie support for WebInspector.TimelineSidebarPanel.
786
787         https://bugs.webkit.org/show_bug.cgi?id=126921
788
789         Reviewed by Joseph Pecoraro.
790
791         * UserInterface/DebuggerSidebarPanel.js:
792         (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
793         Drive-by fix to pass along relaxedMatchDelay to the superclass. 
794
795         * UserInterface/Main.js:
796         (WebInspector.loaded):
797         (WebInspector._provisionalLoadStarted):
798         Listen for ProvisionalLoadStarted instead of ProvisionalLoadCommitted to save the cookie
799         before the TimelineRecording is reset and clears the UI.
800
801         * UserInterface/NavigationSidebarPanel.js:
802         (WebInspector.NavigationSidebarPanel.prototype.get restoringState): Added.
803         (WebInspector.NavigationSidebarPanel.prototype.restoreStateFromCookie.finalAttemptToRestoreViewStateFromCookie):
804         Delete _pendingViewStateCookie since this was the final attempt.
805         (WebInspector.NavigationSidebarPanel.prototype.restoreStateFromCookie):
806         (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject): Block string represented objects.
807         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
808
809         * UserInterface/OverviewTimelineView.js:
810         (WebInspector.OverviewTimelineView.prototype._treeElementSelected):
811
812         * UserInterface/ResourceSidebarPanel.js:
813         (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject):
814         Drive-by fix to null check parentFrame since it can be null. Was causing an exception while working on this.
815
816         * UserInterface/SourceCodeTimeline.js:
817         (WebInspector.SourceCodeTimeline):
818         (WebInspector.SourceCodeTimeline.prototype.saveIdentityToCookie):
819
820         * UserInterface/TimelineSidebarPanel.js:
821         (WebInspector.TimelineSidebarPanel.prototype.canShowDifferentContentView):
822         (WebInspector.TimelineSidebarPanel.prototype.saveStateToCookie):
823         (WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
824
825         * UserInterface/TreeOutline.js:
826         (TreeOutline.prototype._forgetTreeElement):
827         Drive-by fix to clear selectedTreeElement if it is removed from the tree. Was causing removed TreeElements to be
828         saved as a cookie since it was still the selected item.
829
830 2014-01-11  Timothy Hatcher  <timothy@apple.com>
831
832         Implement bar graph rendering for WebInspector.OverviewTimelineView.
833
834         https://bugs.webkit.org/show_bug.cgi?id=126831
835
836         Reviewed by Joseph Pecoraro.
837
838         * UserInterface/Main.html: Added new files.
839
840         * UserInterface/OverviewTimelineView.css:
841         (.timeline-view.overview > .data-grid td.graph-column):
842         (.timeline-view.overview > .data-grid td.graph-column > div):
843         (.timeline-view.overview > .data-grid td.graph-column .timeline-record-bar):
844         Position the bars in the DataGrid cells.
845
846         * UserInterface/OverviewTimelineView.js:
847         (WebInspector.OverviewTimelineView.prototype.updateLayout):
848         (WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
849         (WebInspector.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
850         Create the proper DataGridNodes for resources and source code timelines.
851
852         * UserInterface/ResourceTimelineDataGridNode.js:
853         (WebInspector.ResourceTimelineDataGridNode):
854         (WebInspector.ResourceTimelineDataGridNode.prototype.get records):
855         (WebInspector.ResourceTimelineDataGridNode.prototype.get resource):
856         (WebInspector.ResourceTimelineDataGridNode.prototype.get data):
857         (WebInspector.ResourceTimelineDataGridNode.prototype.createCellContent):
858         (WebInspector.ResourceTimelineDataGridNode.prototype.refresh):
859         (WebInspector.ResourceTimelineDataGridNode.prototype._needsRefresh):
860         (WebInspector.ResourceTimelineDataGridNode.prototype._goToResource):
861         Simplify by deferring the graph logic to the new TimelineDataGridNode base class.
862
863         * UserInterface/SourceCodeTimelineTimelineDataGridNode.js: Added.
864         (WebInspector.SourceCodeTimelineTimelineDataGridNode):
865         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.get records):
866         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.get sourceCodeTimeline):
867         (WebInspector.SourceCodeTimelineTimelineDataGridNode.prototype.get data):
868
869         * UserInterface/TimelineDataGridNode.js: Added.
870         (WebInspector.TimelineDataGridNode):
871         (WebInspector.TimelineDataGridNode.prototype.get records):
872         (WebInspector.TimelineDataGridNode.prototype.get data):
873         (WebInspector.TimelineDataGridNode.prototype.createCellContent):
874         (WebInspector.TimelineDataGridNode.prototype.refresh):
875         (WebInspector.TimelineDataGridNode.prototype.refreshGraph):
876         (WebInspector.TimelineDataGridNode.prototype.needsGraphRefresh):
877         Handles the graph column and manages the records and their bars.
878
879         * UserInterface/TimelineRecordBar.css: Added.
880         (.timeline-record-bar):
881         (.timeline-record-bar > .segment):
882         (.timeline-record-bar:not(.has-inactive-segment) > .segment):
883         (.timeline-record-bar.unfinished > .segment):
884         (.timeline-record-bar > .segment.inactive + .segment):
885         (:focus .selected .timeline-record-bar > .segment):
886         (.timeline-record-bar > .segment.inactive):
887         (.timeline-record-bar.timeline-record-type-network > .segment):
888         (.timeline-record-bar.timeline-record-type-layout > .segment):
889         (.timeline-record-bar.timeline-record-type-script > .segment):
890
891         * UserInterface/TimelineRecordBar.js: Added.
892         (WebInspector.TimelineRecordBar):
893         (WebInspector.TimelineRecordBar.prototype.get element):
894         (WebInspector.TimelineRecordBar.prototype.refresh):
895         (WebInspector.TimelineRecordBar.prototype._updateElementPosition):
896
897 2014-01-08  Timothy Hatcher  <timothy@apple.com>
898
899         Update the current WebInspector.TimelineView when time range changes.
900
901         https://bugs.webkit.org/show_bug.cgi?id=126667
902
903         Reviewed by Joseph Pecoraro.
904
905         * UserInterface/TimelineContentView.js:
906         (WebInspector.TimelineContentView.prototype._showTimelineView):
907         (WebInspector.TimelineContentView.prototype._update):
908         (WebInspector.TimelineContentView.prototype._startUpdatingCurrentTime):
909         (WebInspector.TimelineContentView.prototype._stopUpdatingCurrentTime):
910         (WebInspector.TimelineContentView.prototype._recordingStarted):
911         (WebInspector.TimelineContentView.prototype._recordingStopped):
912         (WebInspector.TimelineContentView.prototype._recordingReset):
913         (WebInspector.TimelineContentView.prototype._timeRangeSelectionChanged):
914         * UserInterface/TimelineOverview.js:
915         (WebInspector.TimelineOverview):
916         (WebInspector.TimelineOverview.prototype.updateLayout):
917         (WebInspector.TimelineOverview.prototype.updateLayoutIfNeeded):
918         (WebInspector.TimelineOverview.prototype._updateElementWidth):
919         (WebInspector.TimelineOverview.prototype._handleWheelEvent):
920         (WebInspector.TimelineOverview.prototype._timeRangeSelectionChanged):
921         * UserInterface/TimelineRuler.js:
922         (WebInspector.TimelineRuler.prototype.updateLayoutIfNeeded):
923         * UserInterface/TimelineView.js:
924         (WebInspector.TimelineView):
925         (WebInspector.TimelineView.prototype.get zeroTime):
926         (WebInspector.TimelineView.prototype.set zeroTime):
927         (WebInspector.TimelineView.prototype.get startTime):
928         (WebInspector.TimelineView.prototype.set startTime):
929         (WebInspector.TimelineView.prototype.get endTime):
930         (WebInspector.TimelineView.prototype.set endTime):
931         (WebInspector.TimelineView.prototype.get currentTime):
932         (WebInspector.TimelineView.prototype.set currentTime.checkIfLayoutIsNeeded):
933         (WebInspector.TimelineView.prototype.set currentTime):
934         (WebInspector.TimelineView.prototype.updateLayout):
935         (WebInspector.TimelineView.prototype.updateLayoutIfNeeded):
936         (WebInspector.TimelineView.prototype.needsLayout):
937
938 2013-12-19  Timothy Hatcher  <timothy@apple.com>
939
940         Implement time range selection for TimelineOverview and TimelineRuler.
941
942         https://bugs.webkit.org/show_bug.cgi?id=126035
943
944         Reviewed by Joseph Pecoraro.
945
946         * UserInterface/TimelineContentView.js:
947         (WebInspector.TimelineContentView.prototype._update):
948         (WebInspector.TimelineContentView.prototype._recordingReset):
949         Properly update start time and the selection start time on reset.
950
951         * UserInterface/TimelineOverview.js:
952         (WebInspector.TimelineOverview):
953         (WebInspector.TimelineOverview.prototype.get selectionStartTime):
954         (WebInspector.TimelineOverview.prototype.set selectionStartTime):
955         (WebInspector.TimelineOverview.prototype.get selectionDuration):
956         (WebInspector.TimelineOverview.prototype.set selectionDuration):
957         Added selection getters and setters.
958
959         * UserInterface/TimelineRuler.css:
960         (.timeline-ruler.allows-time-range-selection):
961         (.timeline-ruler > *):
962         (.timeline-ruler > .header):
963         (.timeline-ruler > .selection-drag):
964         (.timeline-ruler > .selection-drag:active):
965         (.timeline-ruler > .selection-handle):
966         (.timeline-ruler > .selection-handle.left):
967         (.timeline-ruler > .selection-handle.right):
968         (.timeline-ruler > .shaded-area):
969         (.timeline-ruler > .shaded-area.left):
970         (.timeline-ruler > .shaded-area.right):
971         Added styles for the selection elements and tweaked pointer-events to allow
972         events on elements we expect.
973
974         * UserInterface/TimelineRuler.js:
975         (WebInspector.TimelineRuler):
976         (WebInspector.TimelineRuler.prototype.get allowsTimeRangeSelection): Added.
977         (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection): Added.
978         (WebInspector.TimelineRuler.prototype.get selectionStartTime): Added.
979         (WebInspector.TimelineRuler.prototype.set selectionStartTime): Added.
980         (WebInspector.TimelineRuler.prototype.get selectionEndTime): Added.
981         (WebInspector.TimelineRuler.prototype.set selectionEndTime): Added.
982         (WebInspector.TimelineRuler.prototype.updateLayout):
983         (WebInspector.TimelineRuler.prototype._needsMarkerLayout.update):
984         (WebInspector.TimelineRuler.prototype._needsMarkerLayout):
985         (WebInspector.TimelineRuler.prototype._needsSelectionLayout.update):
986         (WebInspector.TimelineRuler.prototype._needsSelectionLayout):
987         (WebInspector.TimelineRuler.prototype._recalculate):
988         (WebInspector.TimelineRuler.prototype._updatePositionOfElement):
989         (WebInspector.TimelineRuler.prototype._updateMarkers):
990         (WebInspector.TimelineRuler.prototype._updateSelection): Added.
991         (WebInspector.TimelineRuler.prototype._dispatchTimeRangeSelectionChangedEvent):
992         (WebInspector.TimelineRuler.prototype._timelineMarkerTimeChanged):
993         (WebInspector.TimelineRuler.prototype._handleMouseDown): Added.
994         (WebInspector.TimelineRuler.prototype._handleMouseMove): Added.
995         (WebInspector.TimelineRuler.prototype._handleMouseUp): Added.
996         (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseDown): Added.
997         (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseMove): Added.
998         (WebInspector.TimelineRuler.prototype._handleSelectionHandleMouseUp): Added.
999         Create selection elements and handle mouse events for drag and move.
1000
1001 2013-12-17  Timothy Hatcher  <timothy@apple.com>
1002
1003         Support scroll to zoom in TimelineOverview.
1004
1005         https://bugs.webkit.org/show_bug.cgi?id=125909
1006
1007         Reviewed by Joseph Pecoraro.
1008
1009         * UserInterface/TimelineOverview.js:
1010         (WebInspector.TimelineOverview):
1011         (WebInspector.TimelineOverview.prototype._handleWheelEvent):
1012
1013 2013-12-17  Timothy Hatcher  <timothy@apple.com>
1014
1015         Add the start of the TimelineOverview class.
1016
1017         TimelineOverview currently has a time ruler and tracks the current recording time.
1018
1019         https://bugs.webkit.org/show_bug.cgi?id=125878
1020
1021         Reviewed by Joseph Pecoraro.
1022
1023         * UserInterface/Main.html:
1024         * UserInterface/TimelineContentView.css:
1025         (.content-view.timeline > .timeline-overview):
1026         * UserInterface/TimelineContentView.js:
1027         (WebInspector.TimelineContentView):
1028         (WebInspector.TimelineContentView.prototype.updateLayout):
1029         (WebInspector.TimelineContentView.prototype._update):
1030         (WebInspector.TimelineContentView.prototype._recordingStarted):
1031         (WebInspector.TimelineContentView.prototype._recordingStopped):
1032         (WebInspector.TimelineContentView.prototype._recordingReset):
1033         * UserInterface/TimelineManager.js:
1034         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
1035         (WebInspector.TimelineManager.prototype.eventRecorded):
1036         * UserInterface/TimelineMarker.js: Renamed from Source/WebInspectorUI/UserInterface/TimelineEventMarker.js.
1037         (WebInspector.TimelineMarker):
1038         (WebInspector.TimelineMarker.prototype.get time):
1039         (WebInspector.TimelineMarker.prototype.set time):
1040         (WebInspector.TimelineMarker.prototype.get type):
1041         * UserInterface/TimelineOverview.css: Added.
1042         (.timeline-overview > .scroll-container):
1043         (.timeline-overview > .scroll-container > .timeline-ruler):
1044         * UserInterface/TimelineOverview.js: Added.
1045         (WebInspector.TimelineOverview):
1046         (WebInspector.TimelineOverview.prototype.get element):
1047         (WebInspector.TimelineOverview.prototype.get startTime):
1048         (WebInspector.TimelineOverview.prototype.set startTime):
1049         (WebInspector.TimelineOverview.prototype.get secondsPerPixel):
1050         (WebInspector.TimelineOverview.prototype.set secondsPerPixel):
1051         (WebInspector.TimelineOverview.prototype.get endTime):
1052         (WebInspector.TimelineOverview.prototype.set endTime):
1053         (WebInspector.TimelineOverview.prototype.addMarker):
1054         (WebInspector.TimelineOverview.prototype.revealMarker):
1055         (WebInspector.TimelineOverview.prototype.updateLayout):
1056         (WebInspector.TimelineOverview.prototype._updateElementWidth):
1057         (WebInspector.TimelineOverview.prototype._needsLayout):
1058         * UserInterface/TimelineRecording.js:
1059         (WebInspector.TimelineRecording.prototype.get startTime):
1060         (WebInspector.TimelineRecording.prototype.get endTime):
1061         (WebInspector.TimelineRecording.prototype.reset):
1062         * UserInterface/TimelineRuler.css:
1063         (.timeline-ruler > .markers):
1064         (.timeline-ruler > .markers > .marker):
1065         (.timeline-ruler > .markers > .marker.current-time):
1066         (.timeline-ruler > .markers > .marker.current-time::before):
1067         (.timeline-ruler > .markers > .marker.load-event):
1068         (.timeline-ruler > .markers > .marker.dom-content-event):
1069         (.timeline-ruler > .markers > .marker.timestamp):
1070         * UserInterface/TimelineRuler.js:
1071         (WebInspector.TimelineRuler):
1072         (WebInspector.TimelineRuler.prototype.updateLayout):
1073         (WebInspector.TimelineRuler.prototype._needsLayout):
1074         (WebInspector.TimelineRuler.prototype._needsMarkerLayout.update):
1075         (WebInspector.TimelineRuler.prototype._needsMarkerLayout):
1076         (WebInspector.TimelineRuler.prototype._recalculate):
1077         (WebInspector.TimelineRuler.prototype._updateLeftPositionOfElement):
1078         (WebInspector.TimelineRuler.prototype._updateMarkers):
1079         (WebInspector.TimelineRuler.prototype._timelineMarkerTimeChanged):
1080
1081 2013-12-13  Timothy Hatcher  <timothy@apple.com>
1082
1083         Clean up and refactor TimelineDecorations into TimelineRuler.
1084
1085         https://bugs.webkit.org/show_bug.cgi?id=125709
1086
1087         Reviewed by Joseph Pecoraro.
1088
1089         * UserInterface/Main.html:
1090         * UserInterface/OverviewTimelineView.css:
1091         (.timeline-view.overview > .timeline-ruler):
1092         (.timeline-view.overview > .timeline-ruler > .header):
1093         (.timeline-view.overview > .timeline-ruler > .event-markers):
1094         Updated class names and border sides.
1095
1096         * UserInterface/OverviewTimelineView.js:
1097         (WebInspector.OverviewTimelineView):
1098         (WebInspector.OverviewTimelineView.prototype.updateLayout):
1099         Call updateLayout on the TimelineRuler.
1100
1101         * UserInterface/TimelineRuler.css: Renamed from Source/WebInspectorUI/UserInterface/TimelineDecorations.css.
1102         (.timeline-ruler):
1103         (.timeline-ruler > .header):
1104         (.timeline-ruler > .header > .divider):
1105         (.timeline-ruler > .header > .divider > .label):
1106         (.timeline-ruler > .event-markers):
1107         (.timeline-ruler > .event-markers > .event-marker-tooltip):
1108         (.timeline-ruler > .event-markers > .event-marker):
1109         (.timeline-ruler > .event-markers > .event-marker.load-event):
1110         (.timeline-ruler > .event-markers > .event-marker.dom-content-event):
1111         (.timeline-ruler > .event-markers > .event-marker.timestamp):
1112         Updated class names and border sides.
1113
1114         * UserInterface/TimelineRuler.js: Renamed from Source/WebInspectorUI/UserInterface/TimelineDecorations.js.
1115         (WebInspector.TimelineRuler):
1116         (WebInspector.TimelineRuler.prototype.get element):
1117         (WebInspector.TimelineRuler.prototype.get headerElement):
1118         (WebInspector.TimelineRuler.prototype.get allowsClippedLabels):
1119         (WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
1120         (WebInspector.TimelineRuler.prototype.get zeroTime):
1121         (WebInspector.TimelineRuler.prototype.set zeroTime):
1122         (WebInspector.TimelineRuler.prototype.get startTime):
1123         (WebInspector.TimelineRuler.prototype.set startTime):
1124         (WebInspector.TimelineRuler.prototype.get duration):
1125         (WebInspector.TimelineRuler.prototype.set duration):
1126         (WebInspector.TimelineRuler.prototype.get endTime):
1127         (WebInspector.TimelineRuler.prototype.set endTime):
1128         (WebInspector.TimelineRuler.prototype.get secondsPerPixel):
1129         (WebInspector.TimelineRuler.prototype.set secondsPerPixel):
1130         (WebInspector.TimelineRuler.prototype.updateLayout.removeDividerAndSelectNext):
1131         (WebInspector.TimelineRuler.prototype.updateLayout):
1132         (WebInspector.TimelineRuler.prototype._needsLayout):
1133         (WebInspector.TimelineRuler.prototype._recalculate):
1134         Refactor so the times are stored on TimelineRuler and not passed in each time an update is needed.
1135         Support dividers that don't always start at the zero position, allowing a sliding time ruler.
1136         Support for a non-pinned ruler where the end time is not fixed and the scale is specified in
1137         seconds-per-pixel.
1138
1139 2014-01-08  Timothy Hatcher  <timothy@apple.com>
1140
1141         Improve scroll performance of WebInspector.TreeOutlineDataGridSynchronizer.
1142
1143         https://bugs.webkit.org/show_bug.cgi?id=126660
1144
1145         Reviewed by Joseph Pecoraro.
1146
1147         * UserInterface/TreeOutlineDataGridSynchronizer.js:
1148         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineScrolled):
1149         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridScrolled):
1150         Ignore scroll events triggered by our internal use of setting scrollTop.
1151
1152 2013-11-15  Timothy Hatcher  <timothy@apple.com>
1153
1154         Add a synchronized DataGrid to the OverviewTimelineView.
1155
1156         The DataGrid is synchronized with the sidebar TreeOutline to appear as one when the view
1157         and sidebar are both showing. The two scroll, expand and collapse in sync when the view
1158         is showing. When the view is not showing the sidebar can scroll independently.
1159
1160         https://bugs.webkit.org/show_bug.cgi?id=124429
1161
1162         Reviewed by Joseph Pecoraro.
1163
1164         * UserInterface/DataGrid.js:
1165         (WebInspector.DataGrid):
1166         (WebInspector.DataGrid.createSortableDataGrid):
1167         (WebInspector.DataGrid.prototype._copyTextForDataGridNode):
1168         (WebInspector.DataGridNode.prototype.createCellContent):
1169         Handle undefined/null cells better by substituting empty strings.
1170
1171         (WebInspector.DataGridNode.prototype.collapse):
1172         (WebInspector.DataGridNode.prototype.expand):
1173         Fire events on the DataGrid for expand and collapse.
1174
1175         * UserInterface/Main.html: Include TreeOutlineDataGridSynchronizer.js.
1176
1177         * UserInterface/NavigationSidebarPanel.css:
1178         (.sidebar > .panel.navigation > .content): Shorten by 1px to match the content view height.
1179         Needed to keep scrolling in sync. The clipping looks better too.
1180
1181         * UserInterface/OverviewTimelineView.css:
1182         (.timeline-view.overview > .data-grid):
1183         (.timeline-view.overview > .data-grid table.header):
1184         (.timeline-view.overview > .data-grid .data-container):
1185         Style the DataGrid to to not have a header.
1186
1187         * UserInterface/OverviewTimelineView.js:
1188         (WebInspector.OverviewTimelineView):
1189         (WebInspector.OverviewTimelineView.prototype.shown):
1190         (WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
1191         (WebInspector.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
1192         Create the DataGrid and some placeholder nodes. Hook up TreeOutlineDataGridSynchronizer.
1193
1194         * UserInterface/TimelineContentView.css:
1195         (.content-view.timeline > .view-container > .timeline-view > .data-grid td):
1196         (.content-view.timeline > .view-container > .timeline-view > .data-grid table.data):
1197         Style the DataGrid to match the height of TreeElements in the sidebar.
1198
1199         * UserInterface/TimelineSidebarPanel.css:
1200         (.sidebar > .panel.timeline.timeline-content-view-showing > .content):
1201         Hide the scrollbar off the right when the view is showing. The view will show the scrollbar.
1202
1203         * UserInterface/TimelineSidebarPanel.js:
1204         (WebInspector.TimelineSidebarPanel):
1205         (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected):
1206         (WebInspector.TimelineSidebarPanel.prototype._contentBrowserCurrentContentViewDidChange):
1207
1208         * UserInterface/TreeOutline.js:
1209         (TreeOutline.prototype.removeChildAtIndex):
1210         (TreeOutline.prototype.removeChildren):
1211         (TreeOutline.prototype.removeChildrenRecursive):
1212         (TreeElement.prototype.set hidden):
1213         Add event callbacks for onhidden and onremove.
1214
1215         * UserInterface/TreeOutlineDataGridSynchronizer.js: Added.
1216         (WebInspector.TreeOutlineDataGridSynchronizer):
1217         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.associate):
1218         (WebInspector.TreeOutlineDataGridSynchronizer.prototype.synchronize):
1219         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeOutlineScrolled):
1220         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridScrolled):
1221         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeSelected):
1222         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeExpanded):
1223         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._dataGridNodeCollapsed):
1224         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected):
1225         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
1226         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
1227         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded):
1228         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed):
1229         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged):
1230
1231 2013-11-07  Timothy Hatcher  <timothy@apple.com>
1232
1233         Start fleshing out the Overview Timeline view.
1234
1235         This gets the overview populating in the Timeline sidebar. The graph side is still empty.
1236
1237         https://bugs.webkit.org/show_bug.cgi?id=124005
1238
1239         Reviewed by Joseph Pecoraro.
1240
1241         * Localizations/en.lproj/localizedStrings.js: Updated.
1242         * UserInterface/Frame.js:
1243         (WebInspector.Frame.prototype.addResource):
1244         * UserInterface/Images/TimelineRecordAnimation.svg: Added.
1245         * UserInterface/Images/TimelineRecordEvent.svg: Added.
1246         * UserInterface/Images/TimelineRecordLayout.svg: Added.
1247         * UserInterface/Images/TimelineRecordPaint.svg: Added.
1248         * UserInterface/Images/TimelineRecordScriptEvaluated.svg: Added.
1249         * UserInterface/Images/TimelineRecordStyle.svg: Added.
1250         * UserInterface/Images/TimelineRecordTimer.svg: Added.
1251         * UserInterface/Main.html:
1252         * UserInterface/OverviewTimelineView.js: Added.
1253         (WebInspector.OverviewTimelineView):
1254         (WebInspector.OverviewTimelineView.prototype.get navigationSidebarTreeOutlineLabel):
1255         (WebInspector.OverviewTimelineView.prototype._childFrameWasAdded):
1256         (WebInspector.OverviewTimelineView.prototype._mainResourceDidChange):
1257         (WebInspector.OverviewTimelineView.prototype._provisionalResourceWasAdded):
1258         (WebInspector.OverviewTimelineView.prototype._resourceWasAdded):
1259         (WebInspector.OverviewTimelineView.prototype._compareTreeElementsByDetails):
1260         (WebInspector.OverviewTimelineView.prototype._compareTreeElementsByStartTime):
1261         (WebInspector.OverviewTimelineView.prototype._insertTreeElement):
1262         (WebInspector.OverviewTimelineView.prototype._addResourceToTreeIfNeeded):
1263         (WebInspector.OverviewTimelineView.prototype._sourceCodeTimelineAdded):
1264         (WebInspector.OverviewTimelineView.prototype._treeElementSelected):
1265         * UserInterface/SourceCodeTimelineTreeElement.js: Added.
1266         (WebInspector.SourceCodeTimelineTreeElement):
1267         (WebInspector.SourceCodeTimelineTreeElement.prototype.get sourceCodeTimeline):
1268         * UserInterface/TimelineContentView.js:
1269         (WebInspector.TimelineContentView.createPathComponent):
1270         (WebInspector.TimelineContentView):
1271         (WebInspector.TimelineContentView.prototype.showOverviewTimelineView):
1272         (WebInspector.TimelineContentView.prototype.showTimelineView):
1273         (WebInspector.TimelineContentView.prototype.get supportsSplitContentBrowser):
1274         (WebInspector.TimelineContentView.prototype.get selectionPathComponents):
1275         (WebInspector.TimelineContentView.prototype._pathComponentSelected):
1276         (WebInspector.TimelineContentView.prototype._showTimelineView):
1277         (WebInspector.TimelineContentView.prototype._recordingReset):
1278         * UserInterface/TimelineIcons.css:
1279         (.style-record .icon): Added.
1280         (.layout-record .icon): Added.
1281         (.paint-record .icon): Added.
1282         (.evaluated-record .icon): Added.
1283         (.event-record .icon): Added.
1284         (.timer-record .icon): Added.
1285         (.animation-record .icon): Added.
1286         * UserInterface/TimelineView.css: Added.
1287         (.timeline-view):
1288         * UserInterface/TimelineView.js: Added.
1289         (WebInspector.TimelineView):
1290         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutline):
1291         (WebInspector.TimelineView.prototype.get navigationSidebarTreeOutlineLabel):
1292         (WebInspector.TimelineView.prototype.reset):
1293         (WebInspector.TimelineView.prototype.shown):
1294         (WebInspector.TimelineView.prototype.hidden):
1295
1296 2013-11-07  Timothy Hatcher  <timothy@apple.com>
1297
1298         Start fleshing out the new TimelineSidebarPanel and TimelineContentView.
1299
1300         https://bugs.webkit.org/show_bug.cgi?id=124003
1301
1302         Reviewed by Joseph Pecoraro.
1303
1304         * UserInterface/ContentView.js:
1305         (WebInspector.ContentView):
1306         (WebInspector.ContentView.isViewable):
1307         * UserInterface/FrameContentView.js:
1308         * UserInterface/Images/CloseTimeline.png: Added.
1309         * UserInterface/Images/CloseTimeline@2x.png: Added.
1310         * UserInterface/Images/ColorsLarge.png: Added.
1311         * UserInterface/Images/ColorsLarge@2x.png: Added.
1312         * UserInterface/Images/NetworkLarge.png: Added.
1313         * UserInterface/Images/NetworkLarge@2x.png: Added.
1314         * UserInterface/Images/ScriptLarge.png: Added.
1315         * UserInterface/Images/ScriptLarge@2x.png: Added.
1316         * UserInterface/Main.html:
1317         * UserInterface/Main.js:
1318         (WebInspector.sidebarPanelForRepresentedObject):
1319         (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar):
1320         * UserInterface/NavigationSidebarPanel.js:
1321         (WebInspector.NavigationSidebarPanel.prototype.showDefaultContentView):
1322         * UserInterface/ResourceClusterContentView.js:
1323         * UserInterface/TimelineContentView.css: Added.
1324         (.content-view.timeline > .view-container):
1325         * UserInterface/TimelineContentView.js: Added.
1326         (WebInspector.TimelineContentView):
1327         * UserInterface/TimelineIcons.css: Renamed from Source/WebInspectorUI/UserInterface/InstrumentIcons.css.
1328         (.network-icon.large .icon): Added.
1329         (.colors-icon.large .icon): Added.
1330         (.script-icon.large .icon): Added.
1331         * UserInterface/TimelineSidebarPanel.css:
1332         (.sidebar > .panel.timeline > .navigation-bar):
1333         (.sidebar > .panel.timeline > .title-bar):
1334         (.sidebar > .panel.timeline > .title-bar.timelines):
1335         (.sidebar > .panel.timeline > .title-bar.timeline-events):
1336         (.sidebar > .panel.timeline > .timelines-content):
1337         (.sidebar > .panel.timeline > .timelines-content .close-button):
1338         (.sidebar > .panel.timeline > .timelines-content li.item.selected .close-button):
1339         (.sidebar > .panel.timeline > .timelines-content .close-button:active):
1340         (.sidebar > .panel.timeline > .content):
1341         * UserInterface/TimelineSidebarPanel.js:
1342         (WebInspector.TimelineSidebarPanel.createTimelineTreeElement):
1343         (WebInspector.TimelineSidebarPanel):
1344         (WebInspector.TimelineSidebarPanel.prototype.showDefaultContentView):
1345         (WebInspector.TimelineSidebarPanel.prototype.treeElementForRepresentedObject):
1346         (WebInspector.TimelineSidebarPanel.prototype.get contentTreeOutlineLabel):
1347         (WebInspector.TimelineSidebarPanel.prototype.set contentTreeOutlineLabel):
1348         (WebInspector.TimelineSidebarPanel.prototype.showTimelineOverview):
1349         (WebInspector.TimelineSidebarPanel.prototype.showTimelineView):
1350         (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected):
1351
1352 2014-01-08  Timothy Hatcher  <timothy@apple.com>
1353
1354         Correctly track time bounds of WebInspector.Timeline and WebInspector.TimelineRecording.
1355
1356         The startTime and endTime were not correct when Network timeline needed to be taken into
1357         account (due to its dynamic loading nature.) This creates a network Timeline for the purposes
1358         of tracking the ResourceTimelineRecords and getting accurate start and end times.
1359
1360         Also changes the way TimelineRecord tracks the inactive portion of time, needed for later
1361         work on the timeline graphs.
1362
1363         https://bugs.webkit.org/show_bug.cgi?id=126676
1364
1365         Reviewed by Joseph Pecoraro.
1366
1367         * UserInterface/ResourceTimelineRecord.js:
1368         (WebInspector.ResourceTimelineRecord.prototype.get updatesDynamically):
1369         (WebInspector.ResourceTimelineRecord.prototype.get usesActiveStartTime):
1370         (WebInspector.ResourceTimelineRecord.prototype.get startTime):
1371         (WebInspector.ResourceTimelineRecord.prototype.get activeStartTime):
1372         (WebInspector.ResourceTimelineRecord.prototype.get endTime):
1373         * UserInterface/Timeline.js:
1374         (WebInspector.Timeline):
1375         (WebInspector.Timeline.prototype.get startTime):
1376         (WebInspector.Timeline.prototype.get endTime):
1377         (WebInspector.Timeline.prototype.addRecord):
1378         (WebInspector.Timeline.prototype._updateTimesIfNeeded):
1379         (WebInspector.Timeline.prototype._recordUpdated):
1380         * UserInterface/TimelineRecord.js:
1381         (WebInspector.TimelineRecord.prototype.get startTime):
1382         (WebInspector.TimelineRecord.prototype.get activeStartTime):
1383         (WebInspector.TimelineRecord.prototype.get endTime):
1384         (WebInspector.TimelineRecord.prototype.get inactiveDuration):
1385         (WebInspector.TimelineRecord.prototype.get activeDuration):
1386         (WebInspector.TimelineRecord.prototype.get updatesDynamically):
1387         (WebInspector.TimelineRecord.prototype.get usesActiveStartTime):
1388         * UserInterface/TimelineRecording.js:
1389         (WebInspector.TimelineRecording.prototype._timelineTimesUpdated):
1390
1391 2013-10-25  Timothy Hatcher  <timothy@apple.com>
1392
1393         Implement TimelineRecording and per-call-site timelines.
1394
1395         Keep track of timeline records per global timeline and per source code location.
1396         This will be used to display them in the UI in later patches.
1397
1398         https://bugs.webkit.org/show_bug.cgi?id=123367
1399
1400         Reviewed by Joseph Pecoraro.
1401
1402         * UserInterface/Main.html:
1403         * UserInterface/SourceCodeTimeline.js: Added.
1404         (WebInspector.SourceCodeTimeline):
1405         (WebInspector.SourceCodeTimeline.prototype.get sourceCode):
1406         (WebInspector.SourceCodeTimeline.prototype.get sourceCodeLocation):
1407         (WebInspector.SourceCodeTimeline.prototype.get recordType):
1408         (WebInspector.SourceCodeTimeline.prototype.get recordEventType):
1409         * UserInterface/Timeline.js: Added.
1410         (WebInspector.Timeline):
1411         (WebInspector.Timeline.prototype.get records):
1412         (WebInspector.Timeline.prototype.addRecord):
1413         * UserInterface/TimelineRecording.js:
1414         (WebInspector.TimelineRecording):
1415         (WebInspector.TimelineRecording.prototype.get timelines): Added.
1416         (WebInspector.TimelineRecording.prototype.sourceCodeTimelinesForSourceCode): Added.
1417         (WebInspector.TimelineRecording.prototype.addEventMarker): Implemented.
1418         (WebInspector.TimelineRecording.prototype.addRecord): Implemented.
1419         (WebInspector.TimelineRecording.prototype._keyForRecord): Added.
1420
1421 2013-10-25  Timothy Hatcher  <timothy@apple.com>
1422
1423         Add support for multiple Timeline recordings.
1424
1425         We also don't explicitly add ResourceTimelineRecords anymore. These will be tracked automatically in a later patch.
1426
1427         https://bugs.webkit.org/show_bug.cgi?id=123366
1428
1429         Reviewed by Joseph Pecoraro.
1430
1431         * UserInterface/DashboardManager.js:
1432         (WebInspector.DashboardManager.prototype._mainResourceDidChange): Check for currentRecording.
1433         * UserInterface/InspectorFrontendAPI.js:
1434         (InspectorFrontendAPI.isTimelineProfilingEnabled): Check for currentRecording.
1435         * UserInterface/Main.html:
1436         * UserInterface/TimelineManager.js:
1437         (WebInspector.TimelineManager):
1438         (WebInspector.TimelineManager.prototype.get currentRecording): Added.
1439         (WebInspector.TimelineManager.prototype.startRecording): Make a new recording and push it onto the recording array.
1440         Add the current recording to the event.
1441         (WebInspector.TimelineManager.prototype.stopRecording): Add the current recording to the event.
1442         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Check for currentRecording. Add the markers
1443         to the current recording.
1444         (WebInspector.TimelineManager.prototype._addRecord): Add the record to the current recording.
1445         (WebInspector.TimelineManager.prototype._startAutoRecording): Clean up. Don't add ResourceTimelineRecord. Clear recordings.
1446         (WebInspector.TimelineManager.prototype._stopAutoRecordingSoon): Check for _currentRecording.
1447         (WebInspector.TimelineManager.prototype._resetAutoRecordingDeadTimeTimeout): Ditto.
1448         (WebInspector.TimelineManager.prototype._mainResourceDidChange): Don't add ResourceTimelineRecord anymore.
1449         (WebInspector.TimelineManager.prototype._resourceWasAdded): Removed.
1450         * UserInterface/TimelineRecording.js: Added.
1451         (WebInspector.TimelineRecording): Added.
1452         (WebInspector.TimelineRecording.prototype.addEventMarker): Added.
1453         (WebInspector.TimelineRecording.prototype.addRecord): Added.
1454
1455 2013-10-25  Timothy Hatcher  <timothy@apple.com>
1456
1457         Track callFrames and sourceCodeLocation per TimelineRecord.
1458
1459         https://bugs.webkit.org/show_bug.cgi?id=123359
1460
1461         Reviewed by Joseph Pecoraro.
1462
1463         * UserInterface/LayoutTimelineRecord.js:
1464         (WebInspector.LayoutTimelineRecord): Pass callFrames and sourceCodeLocation to superclass.
1465         * UserInterface/ScriptTimelineRecord.js:
1466         (WebInspector.ScriptTimelineRecord): Pass callFrames and sourceCodeLocation to superclass.
1467         * UserInterface/TimelineManager.js:
1468         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Add "Payload" suffix to better track what is a protocol object.
1469         Pass the callFrames and sourceCodeLocation to all the new TimelineRecords.
1470         (WebInspector.TimelineManager.prototype.eventRecorded): Add "Payload" suffix.
1471         * UserInterface/TimelineRecord.js:
1472         (WebInspector.TimelineRecord):
1473         (WebInspector.TimelineRecord.prototype.get callFrames): Added.
1474         (WebInspector.TimelineRecord.prototype.get initiatorCallFrame): Added.
1475         (WebInspector.TimelineRecord.prototype.get sourceCodeLocation): Added.
1476
1477 2013-10-25  Timothy Hatcher  <timothy@apple.com>
1478
1479         Change how the load and content ready event timestamps are tracked.
1480
1481         https://bugs.webkit.org/show_bug.cgi?id=123356
1482
1483         Reviewed by Joseph Pecoraro.
1484
1485         * UserInterface/DashboardManager.js:
1486         (WebInspector.DashboardManager.prototype._updateTime): Use the timestamps on the main frame.
1487         * UserInterface/Frame.js:
1488         (WebInspector.Frame):
1489         (WebInspector.Frame.prototype.get domContentReadyEventTimestamp): Added.
1490         (WebInspector.Frame.prototype.get loadEventTimestamp): Added.
1491         (WebInspector.Frame.prototype.markDOMContentReadyEvent): Added.
1492         (WebInspector.Frame.prototype.markLoadEvent): Added.
1493         * UserInterface/TimelineManager.js:
1494         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord): Use markLoadEvent and markDOMContentReadyEvent.
1495         Do it for all frames, not just the main frame.
1496         (WebInspector.TimelineManager.prototype.pageDidLoad): Call markLoadEvent on the Frame.
1497
1498 2013-10-25  Timothy Hatcher  <timothy@apple.com>
1499
1500         Remove a lot of the current Timelines code to make room for a new implementation.
1501
1502         https://bugs.webkit.org/show_bug.cgi?id=123368
1503
1504         Reviewed by Joseph Pecoraro.
1505
1506         * Localizations/en.lproj/localizedStrings.js:
1507         * UserInterface/ContentView.js:
1508         (WebInspector.ContentView):
1509         (WebInspector.ContentView.isViewable):
1510         * UserInterface/DashboardView.js:
1511         (WebInspector.DashboardView.prototype._networkItemWasClicked):
1512         * UserInterface/InspectorFrontendAPI.js:
1513         (InspectorFrontendAPI.setTimelineProfilingEnabled):
1514         (InspectorFrontendAPI.stopProfilingJavaScript):
1515         * UserInterface/InstrumentSidebarPanel.js: Removed.
1516         * UserInterface/Main.html:
1517         * UserInterface/Main.js:
1518         (WebInspector.contentLoaded):
1519         (WebInspector.sidebarPanelForRepresentedObject):
1520         (WebInspector.openURL):
1521         * UserInterface/Object.js:
1522         (WebInspector.Object.addEventListener):
1523         * UserInterface/TimelineManager.js:
1524         (WebInspector.TimelineManager):
1525         (WebInspector.TimelineManager.prototype.startRecording):
1526         (WebInspector.TimelineManager.prototype.eventRecorded.processRecord):
1527         (WebInspector.TimelineManager.prototype.eventRecorded):
1528         (WebInspector.TimelineManager.prototype.objectForCookie):
1529         (WebInspector.TimelineManager.prototype._addRecord):
1530         * UserInterface/TimelinesObject.js: Removed.
1531         * UserInterface/TimelineOverview.css: Removed.
1532         * UserInterface/TimelineOverview.js: Removed.
1533         * UserInterface/TimelineSidebarPanel.css: Added.
1534         * UserInterface/TimelineSidebarPanel.js: Added.
1535         (WebInspector.TimelineSidebarPanel):
1536         * UserInterface/TimelinesContentView.css: Removed.
1537         * UserInterface/TimelinesContentView.js: Removed.
1538
1539 2014-01-20  Timothy Hatcher  <timothy@apple.com>
1540
1541         Fix jumping to a text position when showing a resource.
1542
1543         https://bugs.webkit.org/show_bug.cgi?id=127271
1544
1545         Reviewed by Joseph Pecoraro.
1546
1547         * UserInterface/FrameContentView.js:
1548         (WebInspector.FrameContentView.prototype.showSourceCode): Just use showResponse's arguments
1549         which already does the same logic to call revealPosition.
1550         * UserInterface/ResourceClusterContentView.js:
1551         (WebInspector.ResourceClusterContentView.prototype.restoreFromCookie): This was the bug.
1552         lineNumber and columnNumber need honored here. They were only honored by FrameContentView.
1553         * UserInterface/ResourceSidebarPanel.js:
1554         (WebInspector.ResourceSidebarPanel.prototype.showSourceCode): Use showContentViewForRepresentedObject
1555         which also accepts a cookie and handles creating the content view for us.
1556
1557 2014-01-16  Brian Burg  <bburg@apple.com>
1558
1559         Web Inspector: add more context to Object.addEventListener assertions
1560         https://bugs.webkit.org/show_bug.cgi?id=127125
1561
1562         Reviewed by Joseph Pecoraro.
1563
1564         Log invalid event type and listener parameters, and log the other
1565         parameters so the callsite is easier to figure out.
1566
1567         * UserInterface/Object.js:
1568         (WebInspector.Object.addEventListener):
1569
1570 2014-01-16  Brian Burg  <bburg@apple.com>
1571
1572         Web Inspector: CallFrame is missing saveIdentityToCookie, or should be excluded
1573         https://bugs.webkit.org/show_bug.cgi?id=126791
1574
1575         Reviewed by Timothy Hatcher.
1576
1577         * UserInterface/CallFrame.js: Add a dummy saveIdentityToCookie() implementation.
1578
1579 2014-01-16  Brian Burg  <bburg@apple.com>
1580
1581         Web Inspector: add probe breakpoint action to popup breakpoint editor
1582         https://bugs.webkit.org/show_bug.cgi?id=126931
1583
1584         Reviewed by Timothy Hatcher.
1585
1586         Add probes to the breakpoint action dropdown.
1587         Reuse the "evaluate JavaScript" input UI.
1588
1589         * Localizations/en.lproj/localizedStrings.js:
1590         * UserInterface/BreakpointAction.js:
1591         * UserInterface/BreakpointActionView.js:
1592         (WebInspector.BreakpointActionView.displayStringForType):
1593         (WebInspector.BreakpointActionView.prototype._updateBody.switch.break):
1594
1595 2014-01-15  Brian Burg  <bburg@apple.com>
1596
1597         Web Inspector: capture probe samples on the backend
1598         https://bugs.webkit.org/show_bug.cgi?id=126668
1599
1600         Reviewed by Joseph Pecoraro.
1601
1602         * UserInterface/InspectorJSBackendCommands.js: Add probe enumeration value.
1603
1604 2014-01-15  Andreas Kling  <akling@apple.com>
1605
1606         Remove the CSS selector profiler.
1607         <https://webkit.org/b/127039>
1608
1609         Purge selector profiler code from the new Web Inspector UI.
1610
1611         Reviewed by Sam Weinig.
1612
1613         * Localizations/en.lproj/localizedStrings.js:
1614         * UserInterface/CSSSelectorProfileObject.js: Removed.
1615         * UserInterface/CSSSelectorProfileType.js: Removed.
1616         * UserInterface/CSSSelectorProfileView.js: Removed.
1617         * UserInterface/ContentView.js:
1618         (WebInspector.ContentView):
1619         (WebInspector.ContentView.isViewable):
1620         * UserInterface/InspectorWebBackendCommands.js:
1621         * UserInterface/InstrumentSidebarPanel.js:
1622         (WebInspector.InstrumentSidebarPanel):
1623         (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedOver):
1624         (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphMousedDown):
1625         (WebInspector.InstrumentSidebarPanel.prototype._recordProfileGlyphClicked):
1626         (WebInspector.InstrumentSidebarPanel.prototype._profileTypeWasSelected):
1627         (WebInspector.InstrumentSidebarPanel.prototype._profilesCleared):
1628         * UserInterface/Main.html:
1629         * UserInterface/ProfileManager.js:
1630         (WebInspector.ProfileManager):
1631         (WebInspector.ProfileManager.prototype.initialize):
1632         (WebInspector.ProfileManager.prototype._checkForInterruptions):
1633         (WebInspector.ProfileManager.prototype._attemptToResumeProfiling):
1634         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
1635         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
1636
1637 2014-01-13  Timothy Hatcher  <timothy@apple.com>
1638
1639         Snap time dividers to nearest numbers instead of just dividing the time span into max density slices.
1640
1641         https://bugs.webkit.org/show_bug.cgi?id=125081
1642
1643         Reviewed by Joseph Pecoraro.
1644
1645         * UserInterface/TimelineDecorations.js:
1646         (WebInspector.TimelineDecorations.prototype.updateHeaderTimes): Snap the time slice to a nearest number.
1647         (WebInspector.TimelineDecorations.prototype.updateEventMarkers): Rename boundarySpan to timeSpan.
1648
1649 2014-01-10  Joseph Pecoraro  <pecoraro@apple.com>
1650
1651         Web Inspector: Remove unimplemented or static ScriptDebugServer features
1652         https://bugs.webkit.org/show_bug.cgi?id=126784
1653
1654         Reviewed by Timothy Hatcher.
1655
1656         * UserInterface/InspectorJSBackendCommands.js:
1657         * UserInterface/InspectorWebBackendCommands.js:
1658         * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
1659         * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
1660         * Versions/Inspector-iOS-6.0.json:
1661         * Versions/Inspector-iOS-7.0.json:
1662
1663 2014-01-10  Timothy Hatcher  <timothy@apple.com>
1664
1665         Web Inspector: support negative numbers in secondsToString and bytesToString.
1666
1667         https://bugs.webkit.org/show_bug.cgi?id=125708
1668
1669         Reviewed by Joseph Pecoraro.
1670
1671         * UserInterface/Utilities.js:
1672         (Number.secondsToString): Use Math.abs in the size checks.
1673         (Number.bytesToString): Ditto.
1674
1675 2014-01-10  Brian Burg  <bburg@apple.com>
1676
1677         Web Inspector: cycle clicked breakpoints between enabled, auto-continue, and disabled
1678         https://bugs.webkit.org/show_bug.cgi?id=126669
1679
1680         Reviewed by Joseph Pecoraro.
1681
1682         It's time-consuming to change a breakpoint's auto-continue setting through the
1683         breakpoint editor popup. This patch enables the user to toggle between enabled,
1684         auto-continue, and disabled by clicking on the breakpoint wedge in the sidebar
1685         tree and in the source text editor gutter. The auto-continue option is only
1686         cycled when the breakpoint has associated actions.
1687
1688         Clean up the breakpoint editor dialog so it hides irrelevant options when
1689         no breakpoint actions have been added.
1690
1691         Automatically unset auto-continue when the last breakpoint action is removed.
1692
1693         Rename the delegate textEditorBreakpointToggled to textEditorBreakpointClicked, since
1694         the behavior of the click depends on breakpoint state not available in the text editor.
1695
1696         * Localizations/en.lproj/localizedStrings.js:
1697         * UserInterface/Breakpoint.js:
1698         (WebInspector.Breakpoint.prototype.cycleToNextMode): Added.
1699         (WebInspector.Breakpoint.prototype.toggleAutoContinue): Added.
1700         (WebInspector.Breakpoint.prototype.appendContextMenuItems): Add auto-continue options.
1701         (WebInspector.Breakpoint.prototype.removeAction):
1702
1703         (WebInspector.Breakpoint.prototype._editBreakpointPopoverContentElement):
1704         (WebInspector.Breakpoint.prototype._popoverActionsAddActionButtonClicked):
1705         (WebInspector.Breakpoint.prototype.breakpointActionViewAppendActionView):
1706         (WebInspector.Breakpoint.prototype.breakpointActionViewRemoveActionView):
1707         (WebInspector.Breakpoint.prototype.willDismissPopover):
1708         * UserInterface/BreakpointTreeElement.css:
1709         (.item.breakpoint .status > .status-image.auto-continue):
1710         (.item.breakpoint .status > .status-image.disabled):
1711         * UserInterface/BreakpointTreeElement.js:
1712         (WebInspector.BreakpointTreeElement):
1713         (WebInspector.BreakpointTreeElement.prototype.onenter):
1714         (WebInspector.BreakpointTreeElement.prototype.onspace):
1715         (WebInspector.BreakpointTreeElement.prototype._updateStatus):
1716         (WebInspector.BreakpointTreeElement.prototype._breakpointLocationDidChange):
1717         (WebInspector.BreakpointTreeElement.prototype._statusImageElementClicked):
1718         * UserInterface/SourceCodeTextEditor.js:
1719         (WebInspector.SourceCodeTextEditor):
1720         (WebInspector.SourceCodeTextEditor.prototype.close):
1721         (WebInspector.SourceCodeTextEditor.prototype._breakpointInfoForBreakpoint):
1722         (WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointClicked):
1723         * UserInterface/TextEditor.css:
1724         (.text-editor > .CodeMirror .breakpoint-auto-continue:not(.breakpoint-disabled) .CodeMirror-linenumber::before):
1725         * UserInterface/TextEditor.js:
1726         (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine.updateStyles):
1727         (WebInspector.TextEditor.prototype._setBreakpointStylesOnLine):
1728         (WebInspector.TextEditor.prototype.updateStyles):
1729         (WebInspector.TextEditor.prototype._removeBreakpointFromLineAndColumn):
1730         (WebInspector.TextEditor.prototype._documentMouseUp):
1731
1732 2014-01-10  Timothy Hatcher  <timothy@apple.com>
1733
1734         Clean up some areas of TreeOutline.
1735
1736         https://bugs.webkit.org/show_bug.cgi?id=123924
1737
1738         Reviewed by Joseph Pecoraro.
1739
1740         * UserInterface/TreeOutline.js:
1741         (TreeOutline.prototype.appendChild): Don't force create _childrenListNode, it will be created
1742         when the tree element is expanded. Only attach if _childrenListNode already exists.
1743         (TreeOutline.prototype.insertChild): Ditto.
1744         (TreeOutline.prototype.getCachedTreeElement): Check the value of __treeElementIdentifier
1745         not just the existence of the property. It should never be null/undefined/0, but be safe.
1746         (TreeOutline.prototype.findTreeElement): Null check isAncestor, it isn't required.
1747
1748 2014-01-10  Timothy Hatcher  <timothy@apple.com>
1749
1750         Fix an exception in WebInspector.Color.
1751
1752         https://bugs.webkit.org/show_bug.cgi?id=126765
1753
1754         Reviewed by Joseph Pecoraro.
1755
1756         * UserInterface/Color.js:
1757         (WebInspector.Color.fromString): Check hasOwnPrperty before using the nickname color array.
1758         (WebInspector.Color.prototype._toNicknameString): Ditto.
1759
1760 2014-01-10  Joseph Pecoraro  <pecoraro@apple.com>
1761
1762         [CSS Blending] Log blending as a layer creation reason in the WI
1763         https://bugs.webkit.org/show_bug.cgi?id=126159
1764
1765         Reviewed by Timothy Hatcher.
1766
1767         * Localizations/en.lproj/localizedStrings.js:
1768         * UserInterface/LayerTreeSidebarPanel.js:
1769         (WebInspector.LayerTreeSidebarPanel.prototype._populateListOfCompositingReasons):
1770
1771 2014-01-10  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
1772
1773         Add missing function stub in InspectorFrontendHostStub.js
1774         https://bugs.webkit.org/show_bug.cgi?id=126745
1775
1776         Reviewed by Timothy Hatcher.
1777
1778         * UserInterface/InspectorFrontendHostStub.js:
1779         (.WebInspector.InspectorFrontendHostStub.prototype.debuggableType):
1780         The function debuggableType() was added to InspectorFrontendHost.idl and InspectorFrontendHost.cpp
1781         in r160887, but not to InspectorFrontendHostStub.js.
1782
1783 2014-01-09  Seokju Kwon  <seokju@webkit.org>
1784
1785         Web Inspector: Remove unused overriding protocols.
1786         https://bugs.webkit.org/show_bug.cgi?id=126630
1787
1788         Reviewed by Timothy Hatcher.
1789
1790         Update InspectorWebBackendCommands.js after removing unused overriding protocols.
1791
1792         * UserInterface/InspectorWebBackendCommands.js:
1793         * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
1794         * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
1795         * Versions/Inspector-iOS-6.0.json:
1796         * Versions/Inspector-iOS-7.0.json:
1797
1798 2014-01-07  Joseph Pecoraro  <pecoraro@apple.com>
1799
1800         Web Inspector: Typo "clipboarPrefixString"
1801         https://bugs.webkit.org/show_bug.cgi?id=126595
1802
1803         Reviewed by Sam Weinig.
1804
1805         * UserInterface/ConsoleCommandResult.js:
1806         (WebInspector.ConsoleCommandResult.prototype.toMessageElement):
1807         (WebInspector.ConsoleCommandResult.prototype.get clipboardPrefixString):
1808         * UserInterface/ConsoleMessageImpl.js:
1809         (WebInspector.ConsoleMessageImpl.prototype.get clipboardPrefixString):
1810         (WebInspector.ConsoleMessageImpl.prototype.toClipboardString):
1811
1812 2014-01-06  Seokju Kwon  <seokju@webkit.org>
1813
1814         Web Inspector: Remove canOverrideDeviceMetrics and setDeviceMetricsOverride from protocol
1815         https://bugs.webkit.org/show_bug.cgi?id=126149
1816
1817         Reviewed by Joseph Pecoraro.
1818
1819         * UserInterface/InspectorWebBackendCommands.js: Remove unused codes.
1820         * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Ditto.
1821         * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Ditto.
1822         * Versions/Inspector-iOS-6.0.json: Ditto.
1823         * Versions/Inspector-iOS-7.0.json: Ditto.
1824
1825 2014-01-06  Seokju Kwon  <seokju@webkit.org>
1826
1827         Web Inspector: Remove support for FileSystem in Frontend.
1828         https://bugs.webkit.org/show_bug.cgi?id=126369
1829
1830         Reviewed by Joseph Pecoraro.
1831
1832         Update InspectorWebBackendCommands after removing 'FileSystem' domain.
1833
1834         * UserInterface/InspectorWebBackendCommands.js:
1835         * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js:
1836         * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js:
1837         * Versions/Inspector-iOS-6.0.json:
1838         * Versions/Inspector-iOS-7.0.json:
1839
1840 2014-01-06  Seokju Kwon  <seokju@webkit.org>
1841
1842         Web Inspector: Get rid of DOM.setFileInputFiles from Protocol
1843         https://bugs.webkit.org/show_bug.cgi?id=126312
1844
1845         Reviewed by Joseph Pecoraro.
1846
1847         Update InspectorWebBackendCommands.js after removing DOM.setFileInputFiles.
1848
1849         * UserInterface/InspectorWebBackendCommands.js:
1850
1851 2013-12-22  Martin Robinson  <mrobinson@igalia.com>
1852
1853         [GTK][CMake] Integrate GResource for inspector files (and others?)
1854         https://bugs.webkit.org/show_bug.cgi?id=125569
1855
1856         Reviewed by Gustavo Noronha Silva.
1857
1858         * GNUmakefile.am: Use the new generation script instead of generating with
1859         shell scripting in the makefile.
1860
1861 2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>
1862
1863         Web Inspector: Frontend Error when selecting Database folder in Resources Sidebar
1864         https://bugs.webkit.org/show_bug.cgi?id=126029
1865
1866         Reviewed by Timothy Hatcher.
1867
1868         Treat the DatabaseHostTreeElement tree element like a folder. It pretty much
1869         is a folder, but inherits from StorageTreeElement to share some code there.
1870
1871         * UserInterface/ResourceSidebarPanel.js:
1872         (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
1873
1874 2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>
1875
1876         Web Inspector: Uncaught Exception: NavigationSidebarPanel.js: TypeError: undefined is not a function
1877         https://bugs.webkit.org/show_bug.cgi?id=126018
1878
1879         Reviewed by Timothy Hatcher.
1880
1881         ERROR: TypeError: undefined is not a function (evaluating 'representedObject.saveIdentityToCookie(candidateObjectCookie)')
1882
1883         There are some TreeElements (Folders, and the special Databases Folder)
1884         which do not have a represented object, and would throw an exception
1885         when trying to use saveIdentityToCookie.
1886
1887         We should always provide a saveIdentityToCookie when possible. So just
1888         blacklist the tree element types we know do not have representedObjects,
1889         and where we don't want to save identity. This will continue to throw
1890         exceptions in the future for tree elements that don't have the save
1891         function implemented, but should.
1892
1893         Note that even if a TreeElement is constructed with a null represented
1894         object, it becomes an empty object (representedObject || {}).
1895
1896         * UserInterface/NavigationSidebarPanel.js:
1897         (WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
1898         (WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
1899         (WebInspector.NavigationSidebarPanel.prototype.treeElementMatchesCookie):
1900         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
1901
1902 2013-12-19  Joseph Pecoraro  <pecoraro@apple.com>
1903
1904         Web Inspector: Add InspectorFrontendHost.debuggableType to let the frontend know it's backend is JavaScript or Web
1905         https://bugs.webkit.org/show_bug.cgi?id=126016
1906
1907         Reviewed by Timothy Hatcher.
1908
1909         * UserInterface/LoadInspectorBackendCommands.js:
1910         If the debuggable target is "web" load both JS and Web backend commands.
1911         Otherwise, we only load the default, js backend commands.
1912
1913 2013-12-16  Alex Christensen  <achristensen@webkit.org>
1914
1915         Fixed Win64 build on VS2013.
1916         https://bugs.webkit.org/show_bug.cgi?id=125753
1917
1918         Reviewed by Brent Fulgham.
1919
1920         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
1921         Added 64-bit configuration.
1922
1923 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1924
1925         Web Inspector: Move Inspector and Debugger protocol domains into JavaScriptCore
1926         https://bugs.webkit.org/show_bug.cgi?id=125707
1927
1928         Reviewed by Timothy Hatcher.
1929
1930         * UserInterface/InspectorJSBackendCommands.js:
1931         * UserInterface/InspectorWebBackendCommands.js:
1932         Regenerate now that domains have moved around.
1933
1934 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1935
1936         Web Inspector: Exception: TypeError: undefined is not a function (evaluating 'marker.find()')
1937         https://bugs.webkit.org/show_bug.cgi?id=125724
1938
1939         Reviewed by Darin Adler.
1940
1941         * UserInterface/CSSStyleDeclarationTextEditor.js:
1942         (WebInspector.CSSStyleDeclarationTextEditor.prototype.):
1943         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
1944         The callback changed to returning WebInspector.TextMarkers, however
1945         this class expected a raw CodeMirror marker. Since this class knows
1946         about CodeMirror and expects to access these markers later go
1947         directly to the CodeMirror marker.
1948
1949 2013-12-13  Joseph Pecoraro  <pecoraro@apple.com>
1950
1951         Web Inspector: Add Inspector Code Generation to JavaScriptCore for Runtime Domain
1952         https://bugs.webkit.org/show_bug.cgi?id=125595
1953
1954         Reviewed by Timothy Hatcher.
1955
1956         * Scripts/copy-user-interface-resources.sh:
1957         Copy all the different backend commands files.
1958
1959         * Scripts/update-InspectorBackendCommands.rb:
1960         Update with respect to new script location and new file names.
1961
1962         * WebInspectorUI.xcodeproj/project.pbxproj:
1963         Remove Inputs and Outputs of build phase, which were wrong.
1964         Now this build phase always runs, and not by accident.
1965
1966         * UserInterface/InspectorJSBackendCommands.js: Added.
1967         * UserInterface/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/InspectorBackendCommands.js.
1968         * UserInterface/Legacy/6.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/6.0/InspectorBackendCommands.js.
1969         * UserInterface/Legacy/7.0/InspectorWebBackendCommands.js: Renamed from Source/WebInspectorUI/UserInterface/Legacy/7.0/InspectorBackendCommands.js.
1970         * UserInterface/LoadInspectorBackendCommands.js:
1971         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
1972         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
1973
1974 2013-12-13  Antoine Quint  <graouts@apple.com>
1975
1976         Web Inspector: provide an abstraction for CodeMirror's TextMarker
1977         https://bugs.webkit.org/show_bug.cgi?id=125695
1978
1979         Reviewed by Timothy Hatcher.
1980
1981         Introduce a new WebInspector.TextMarker class which is used by code with CodeMirror knowledge
1982         to return information related to text markers to objects that should have no direct knowledge
1983         of CodeMirror. Start using this class in TextEditor and SourceCodeTextEditor to remove the
1984         last remaining pieces of CodeMirror knowledge added to SourceCodeTextEditor to fix
1985         https://webkit.org/b/124364.
1986
1987         * UserInterface/CodeMirrorAdditions.js:
1988         Stop using __markedColor to identify a color marker and instead use the type on the matching
1989         WebInspector.TextMarker. Additionally, create a WebInspector.TextMarker with type
1990         WebInspector.TextMarker.Type.Color in createColorMarkers().
1991         
1992         * UserInterface/CodeMirrorColorEditingController.js:
1993         (WebInspector.CodeMirrorColorEditingController):
1994         Use a WebInspector.TextRange to track the edited range and obtain it directly from the
1995         WebInspector.TextMaker used to instantiate the object. We also use the new "text" public
1996         property to create the color.
1997
1998         (WebInspector.CodeMirrorColorEditingController.prototype.set color):
1999         Simply assing the serialized color to the new "text" public property.
2000
2001         (WebInspector.CodeMirrorColorEditingController.prototype.get text):
2002         (WebInspector.CodeMirrorColorEditingController.prototype.set text):
2003         New public property to set get and set the text for the edited range, automatically updating
2004         the range upon setting to a new text.
2005
2006         (WebInspector.CodeMirrorColorEditingController.prototype.presentHoverMenu):
2007         Obtain the bounds directly from the WebInspector.TextMarker object.
2008
2009         * UserInterface/CodeMirrorTokenTrackingController.js:
2010         (WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
2011         Since we're now tracking the hoveredMarker as a WebInspector.TextMarker, get the CodeMirror
2012         TextMarker from that object to check if it's contained within the text markers at the
2013         hovered position.
2014
2015         * UserInterface/Main.html:
2016         Add the new TextMarker class source.
2017
2018         * UserInterface/SourceCodeTextEditor.js:
2019         (WebInspector.SourceCodeTextEditor.prototype._hasColorMarkers):
2020         Use the WebInspector.TextMarker type to identify a given text marker is marking a color.
2021
2022         (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
2023         Use the renamed markersAtPosition() method from TextEditor.
2024
2025         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
2026         Use the WebInspector.TextMarker type to identify a given text marker is marking a color.
2027
2028         (WebInspector.SourceCodeTextEditor.prototype.colorEditingControllerDidFinishEditing):
2029         Since the CodeMirrorColorEditingController is now using a WebInspector.TextRange for its range,
2030         update to use a WebInspector.TextRange API to get the range's start line.
2031
2032         * UserInterface/TextEditor.js:
2033         (WebInspector.TextEditor.prototype.get markers):
2034         Return WebInspector.TextMarker objects instead of CodeMirror TextRange objects.
2035
2036         (WebInspector.TextEditor.prototype.markersAtPosition):
2037         Rename method to a better name instead of using the CodeMirror-influenced name. Also, return
2038         WebInspector.TextMarker objects instead of CodeMirror TextRange objects.
2039
2040         * UserInterface/TextMarker.js: Added.
2041         (WebInspector.TextMarker):
2042         Create a WebInspector.TextMarker with a CodeMirror TextMarker and an optional type.
2043
2044         (WebInspector.TextMarker.textMarkerForCodeMirrorTextMarker):
2045         Static method to either obtain the existing WebInspector.TextMarker for a given CodeMirror
2046         TextMarker, or create a new WebInspector.TextMarker.
2047
2048         (WebInspector.TextMarker.prototype.get codeMirrorTextMarker):
2049         Public property to access the CodeMirror TextMarker objects for classes that have direct
2050         knowledge of CodeMirror.
2051
2052         (WebInspector.TextMarker.prototype.get type):
2053         Public property to access the type used to create this text marker.
2054
2055         (WebInspector.TextMarker.prototype.get range):
2056         (WebInspector.TextMarker.prototype.get bounds):
2057         Public properties allowing easy access to generally useful information related to marked text.
2058
2059         (WebInspector.TextMarker.prototype.clear):
2060         Wrapper for the CodeMirror TextMarker clear() method.
2061
2062 2013-12-13  Brent Fulgham  <bfulgham@apple.com>
2063
2064         [Win] Switch WebKit solution to Visual Studio 2013
2065         https://bugs.webkit.org/show_bug.cgi?id=125192
2066
2067         Reviewed by Anders Carlsson.
2068
2069         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj: Update for VS2013
2070
2071 2013-12-12  Laszlo Vidacs  <lac@inf.u-szeged.hu>
2072
2073         Web Inspector: ES6: JavaScript syntax highlighting and recognition of for..of
2074         https://bugs.webkit.org/show_bug.cgi?id=122868
2075
2076         Reviewed by Timothy Hatcher.
2077
2078         Update to CodeMirror 3.20 including javascript ES6 updates.
2079
2080         * Tools/PrettyPrinting/codemirror.css:
2081         * Tools/PrettyPrinting/codemirror.js: Minor local change due to error from jsmin.py
2082         * Tools/PrettyPrinting/css.js:
2083         * Tools/PrettyPrinting/javascript.js:
2084         * UserInterface/External/CodeMirror/codemirror.css:
2085         * UserInterface/External/CodeMirror/codemirror.js: Minor local change due to error from jsmin.py
2086         * UserInterface/External/CodeMirror/coffeescript.js:
2087         * UserInterface/External/CodeMirror/css.js:
2088         * UserInterface/External/CodeMirror/htmlmixed.js:
2089         * UserInterface/External/CodeMirror/javascript.js:
2090         * UserInterface/External/CodeMirror/less.js:
2091         * UserInterface/External/CodeMirror/matchbrackets.js:
2092         * UserInterface/External/CodeMirror/placeholder.js:
2093         * UserInterface/External/CodeMirror/runmode.js:
2094         * UserInterface/External/CodeMirror/searchcursor.js:
2095         * UserInterface/External/CodeMirror/sql.js:
2096         * UserInterface/External/CodeMirror/xml.js:
2097
2098 2013-12-12  Antoine Quint  <graouts@apple.com>
2099
2100         Web Inspector: allow editing of colors in CSS resources
2101         https://bugs.webkit.org/show_bug.cgi?id=124364
2102
2103         Reviewed by Timothy Hatcher.
2104
2105         Identify colors in CSS and HTML resources so that hovering these colors shows a HoverMenu
2106         allowing a ColorPicker hosted in a Popover to be shown to edit the hovered color.
2107
2108         * UserInterface/CSSStyleDeclarationTextEditor.js:
2109         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
2110         Remove the code that goes through the lines of the CodeMirror editor to look for
2111         color strings and replace it with a call to the .createColorMarkers() CodeMirror
2112         extension in which the code was refactored. The callback passed to
2113         .createColorMarkers() handles the CSSStyleDeclarationTextEditor-specific creation
2114         of color swatches to show the popover, keeping the existing behavior of the Styles
2115         sidebar panel.
2116
2117         * UserInterface/CodeMirrorAdditions.js:
2118         Refactor existing code into two new CodeMirror extensions: .boundsForRange(), which
2119         was previously defined on the CodeMirrorTokenTrackingController but was also needed
2120         in the new CodeMirrorColorEditingController, and .createColorMarkers(), discussed above.
2121
2122         * UserInterface/CodeMirrorColorEditingController.js: Added.
2123         (WebInspector.CodeMirrorColorEditingController):
2124         New class used by SourceCodeTextEditor to coordinate the editing of a color in a CodeMirror
2125         TextMarker by a ColorPicker hosted in a Popover shown by the activation of a HoverMenu. This
2126         controller automatically gets the color set by the user using the ColorPicker and updates
2127         the CodeMirror text editor with the new value. When the user presses the Esc. key while the
2128         popover is shown, it's automatically dismissed and the original color is reset in the editor.
2129
2130         (WebInspector.CodeMirrorColorEditingController.prototype.get marker):
2131         (WebInspector.CodeMirrorColorEditingController.prototype.get range):
2132         (WebInspector.CodeMirrorColorEditingController.prototype.get delegate):
2133         (WebInspector.CodeMirrorColorEditingController.prototype.set delegate):
2134         Getters and setters for public properties.
2135
2136         (WebInspector.CodeMirrorColorEditingController.prototype.get color):
2137         (WebInspector.CodeMirrorColorEditingController.prototype.set color):
2138         Get and set the color for the edited color marker, replacing the text in the marker's range
2139         upon setting.
2140
2141         (WebInspector.CodeMirrorColorEditingController.prototype.presentHoverMenu):
2142         Public API allowing for a HoverMenu to be shown around the bounds of the TextMarker passed
2143         in the constructor. This method is called from SourceCodeTextEditor when the
2144         CodeMirrorTokenTrackingController identifies that a token that is part of a TextMarker is
2145         hovered and that token is a color.
2146
2147         (WebInspector.CodeMirrorColorEditingController.prototype.dismissHoverMenu):
2148         Public API allowing for the HoverMenu to be dismissed. This method is called when the
2149         CodeMirrorTokenTrackingController identifies that its "hoveredMarker" is no longer being
2150         hovered as well as when we identify that editing of the color has completed.
2151
2152         (WebInspector.CodeMirrorColorEditingController.prototype.handleEvent):
2153         Event handler for the "keydown" event that are being listened to when the HoverMenu
2154         is activated such that the Esc. key can be used to dimiss the popover and reset the
2155         original color before any edits.
2156
2157         (WebInspector.CodeMirrorColorEditingController.prototype.hoverMenuButtonWasPressed):
2158         Implementation of the HoverMenu delegation method used to show a Popover containing a
2159         ColorPicker upon clicking on the color wheel attached to the HoverMenu. We also remember
2160         the color set on the marker so that it may be restored when Esc. is pressed and used to
2161         set the original state of the ColorPicker. The delegation method
2162         colorEditingControllerDidStartEditing() is also called at this point, which the
2163         SourceCodeTextEditor implements.
2164
2165         (WebInspector.CodeMirrorColorEditingController.prototype.didDismissPopover):
2166         Implementation of the Popover delegation method used to identify that color editing has
2167         completed. The delegation method colorEditingControllerDidFinishEditing() is called
2168         at this point, which the SourceCodeTextEditor implements.
2169
2170         (WebInspector.CodeMirrorColorEditingController.prototype._colorPickerColorChanged):
2171         Apply the color set in the color picker to the CodeMirror text editor.
2172
2173         * UserInterface/CodeMirrorTokenTrackingController.js:
2174         Add two new modes to CodeMirrorTokenTrackingController. The first mode is "None" and is
2175         the default, incurring no specific token handling behavior. The second mode is "MarkedTokens"
2176         which identifies hover of a token contained in a CodeMirror TextMarker range. The new
2177         "MarkedTokens" mode is used by SourceCodeTextEditor to identify when a marked color is being
2178         hovered to display a HoverMenu.
2179
2180         (WebInspector.CodeMirrorTokenTrackingController):
2181         (WebInspector.CodeMirrorTokenTrackingController.prototype.set mode):
2182         Make "None" the new default mode for CodeMirrorTokenTrackingController.
2183
2184         (WebInspector.CodeMirrorTokenTrackingController.prototype.get hoveredMarker):
2185         (WebInspector.CodeMirrorTokenTrackingController.prototype.set hoveredMarker):
2186         (WebInspector.CodeMirrorTokenTrackingController.prototype._updateHoveredTokenInfo):
2187         Check, when we have a "hoveredMarker" set on the CodeMirrorTokenTrackingController,
2188         whether the "hoveredMarker" is still being hovered when there is no token at the current
2189         mouse position. We can then determine when we're mousing out of the "hoveredMarker" and
2190         notify the delegate via the new tokenTrackingControllerMouseOutOfHoveredMarker delegate
2191         method. The SourceCodeTextEditor uses this method to dismiss its CodeMirrorColorEditingController.
2192
2193         (WebInspector.CodeMirrorTokenTrackingController.prototype._processNewHoveredToken):
2194         Add support for the new "MarkedTokens" mode.
2195
2196         (WebInspector.CodeMirrorTokenTrackingController.prototype._processMarkedToken):
2197         For the moment, use the same behavior as the existing "MarkedTokens" mode.
2198
2199         * UserInterface/Color.js:
2200         (WebInspector.Color):
2201         Add a new "valid" property to identify whether a color has any invalid (NaN) component. This property
2202         is used by SourceCodeTextEditor to establish whether a hovered color marker is indeed set to a
2203         valid color still.
2204
2205         (WebInspector.Color.prototype.copy):
2206         New method to create an exact copy of a Color instance, used by CodeMirrorColorEditingController
2207         to duplicate the edited color in case we need to revert it.
2208
2209         * UserInterface/HoverMenu.js:
2210         (WebInspector.HoverMenu.prototype._handleClickEvent):
2211         Rename hoverMenuWasActivated to hoverMenuButtonWasPressed per review feedback.
2212
2213         * UserInterface/Images/ColorIcon.png: Added.
2214         * UserInterface/Images/ColorIcon@2x.png: Added.
2215         New color wheel icon used to customize the HoverMenu shown by a CodeMirrorColorEditingController.
2216
2217         * UserInterface/Main.html:
2218         Link to the new CodeMirrorColorEditingController.js file.
2219
2220         * UserInterface/SourceCodeTextEditor.css:
2221         (.hover-menu.color):
2222         (.hover-menu.color > img):
2223         Customize the HoverMenu shown by a CodeMirrorColorEditingController to use the new ColorIcon asset.
2224
2225         * UserInterface/SourceCodeTextEditor.js:
2226         (WebInspector.SourceCodeTextEditor):
2227         Add a new "_ignoreContentDidChange" ivar that increments and decrements to track when handling
2228         of CodeMirror content changes should be disabled.
2229
2230         (WebInspector.SourceCodeTextEditor.prototype.close):
2231         Adopt the new ._updateTokenTrackingControllerState() method to update the state of the
2232         CodeMirrorTokenTrackingController.
2233
2234         (WebInspector.SourceCodeTextEditor.prototype.contentDidChange):
2235         Override the new TextEditor public API called when content in the CodeMirror text editor is changed.
2236         We use this method to process any newly added line to create any newly added color marker.
2237
2238         (WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
2239         (WebInspector.SourceCodeTextEditor.prototype._debuggerDidPause):
2240         (WebInspector.SourceCodeTextEditor.prototype._debuggerDidResume):
2241         (WebInspector.SourceCodeTextEditor.prototype._sourceCodeSourceMapAdded):
2242         Adopt the new ._updateTokenTrackingControllerState() method to update the state of the
2243         CodeMirrorTokenTrackingController.
2244
2245         (WebInspector.SourceCodeTextEditor.prototype._updateTokenTrackingControllerState):
2246         New method acting as the only point where we check the state of the text editor and set the right
2247         mode and settings on the CodeMirrorTokenTrackingController, including setting the new "MarkedTokens"
2248         mode when we have color markers, as determined by ._hasColorMarkers().
2249
2250         (WebInspector.SourceCodeTextEditor.prototype._hasColorMarkers):
2251         Check whether any of the TextMarkers set on the CodeMirror text editor were created for a color.
2252
2253         (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked):
2254         Check the CodeMirrorTokenTrackingController mode rather than the removed "_jumpToSymbolTrackingModeEnabled"
2255         ivar to identify we're in the "NonSymbolTokens" mode.
2256
2257         (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerNewHighlightCandidate):
2258         Refactor method to use the CodeMirrorTokenTrackingController mode to branch into mode-specific code
2259         and add a new branch for the new "MarkedTokens" mode where we check if the newly hovered token
2260         is part of a color TextMarker range.
2261
2262         (WebInspector.SourceCodeTextEditor.prototype.tokenTrackingControllerMouseOutOfHoveredMarker):
2263         Implement this new CodeMirrorTokenTrackingController delegation method to dismiss the
2264         CodeMirrorColorEditingController as we identify we're no longer hovering over the TextMarker
2265         for which the CodeMirrorColorEditingController was created.
2266
2267         (WebInspector.SourceCodeTextEditor.prototype._showPopover):
2268         Adopt the new TextEditor boundsForRange() method.
2269
2270         (WebInspector.SourceCodeTextEditor.prototype._updateColorMarkers):
2271         Harness the new TextEditor createColorMarkers() method to create new TextMarkers for the provided
2272         line, or the entire text editor content if none provided. We then immediately call _updateTokenTrackingControllerState()
2273         so that the new "MarkedTokens" mode is entered in case color TextMarkers were created for the first
2274         time for this text editor.
2275
2276         (WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
2277         Called when we've identified the CodeMirrorTokenTrackingController highlighted a TextMarker. We check
2278         if any of the hovered TextMarkers are for a color, and in this case create a CodeMirrorColorEditingController
2279         to coordinate the display of a ColorPicker in a Popover to edit the hovered color token. We also check
2280         whether the hovered marker still contains a valid color, clearing the marker in case it was edited to
2281         no longer contain a color.
2282
2283         (WebInspector.SourceCodeTextEditor.prototype._dismissCodeMirrorColorEditingController):
2284         Used to dismiss the CodeMirrorColorEditingController, if previously presented, and reset some internal state.
2285
2286         (WebInspector.SourceCodeTextEditor.prototype.colorEditingControllerDidStartEditing):
2287         Implement this CodeMirrorColorEditingController delegation method to temporarily disable the
2288         CodeMirrorTokenTrackingController while we edit the color with the ColorPicker, remove
2289         the TextMarker for the edited color and instruct that content changes should be ignored
2290         such that we act on the complete set of color edits upon completion.
2291
2292         (WebInspector.SourceCodeTextEditor.prototype.colorEditingControllerDidFinishEditing):
2293         Update color markers for the edited line such that any color edits are correctly updated for
2294         the future and so that, as a side-effect, the CodeMirrorColorEditingController is reset to the
2295         appropriate mode depending on whether color TextMarkers are indeed available, resetting states
2296         that may have been altered by colorEditingControllerDidStartEditing().
2297
2298         * UserInterface/TextEditor.js:
2299         (WebInspector.TextEditor.prototype.contentDidChange):
2300         New public method meant to be overriden by subclasses, added for the use of SourceCodeTextEditor, exposing
2301         the list of TextRanges affected by the content change, both in the context of the old content and new content.
2302
2303         (WebInspector.TextEditor.prototype.boundsForRange):
2304         (WebInspector.TextEditor.prototype.get markers):
2305         (WebInspector.TextEditor.prototype.findMarkersAtPosition):
2306         (WebInspector.TextEditor.prototype.createColorMarkers):
2307         (WebInspector.TextEditor.prototype.colorEditingControllerForMarker):
2308         New public methods calling into the CodeMirror private ivar for the benefit of SourceCodeTextEditor.
2309
2310         (WebInspector.TextEditor.prototype._contentChanged):
2311         Call the new contentDidChange() method.
2312
2313 2013-12-05  Seokju Kwon  <seokju@webkit.org>
2314
2315         Web Inspector: Remove 'cookiesString' output from Page.getCookies
2316         https://bugs.webkit.org/show_bug.cgi?id=125268
2317
2318         Reviewed by Timothy Hatcher.
2319
2320         Remove 'cookiesString' output from Page.getCookies protocol.
2321         It is no longer meaningful because it is an unused parameter.
2322
2323         * UserInterface/CookieStorageContentView.js:
2324         (WebInspector.CookieStorageContentView.prototype.update):
2325         * UserInterface/InspectorBackendCommands.js:
2326
2327 2013-12-05  Brian J. Burg  <burg@cs.washington.edu>
2328
2329         Web Inspector: expose node and frame snapshot capabilities.
2330         https://bugs.webkit.org/show_bug.cgi?id=124326
2331
2332         Reviewed by Joseph Pecoraro.
2333
2334         Add method signatures for snapshotNode() and snapshotRect().
2335         Remove method signature for unimplemented Page.captureScreenshot.
2336
2337         * UserInterface/InspectorBackendCommands.js:
2338
2339 2013-12-05  Alexandru Chiculita  <achicu@adobe.com>
2340
2341         Web Inspector: [CSS Regions] Show a list of containing regions when clicking a node that is part of a flow
2342         https://bugs.webkit.org/show_bug.cgi?id=124614
2343
2344         Reviewed by Timothy Hatcher.
2345
2346         Added a new function in DOMTreeManager called getNodeContentFlowInfo that can be used
2347         to retrieve an object with the following structure:
2348         {
2349              "regionFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-from property of the node>,
2350              "contentFlow": <Reference to the ContentFlow object referenced by the -webkit-flow-into property of 
2351                              the node or a parent of the node>,
2352              "regions": [ list of DOMNodes representing the regions containers of the node. The node is split across all these regions. ]
2353         }
2354
2355         Also, used this method to display a two new sections in the Computed Styles panel.
2356         1. Section "Flows": can have up to two Simple Rows: "Region Flow" and "Content Flow".
2357         2. Section "Container Regions" contains a DOMTreeDataGrid with the list of regions.
2358
2359         The sections are only visible when there's content to display.
2360
2361         Next to the "Region Flow" simple row I've added an arrow that will take the user to the "ContentFlowDOMTreeContentView" of the
2362         ContentFlow. The same happens for the "Content Flow", but in this case the element will also be highlighted.
2363
2364         Part of the patch I've added the DOMTreeDataGridNode. LayerTreeDataGrid has a lot of CSS in common with it, so I
2365         will make another patch to refactor LayerTreeDataGrid to use DOMTreeDataGridNode as a base class.
2366
2367         * Localizations/en.lproj/localizedStrings.js:
2368         * UserInterface/ComputedStyleDetailsPanel.css: Added.
2369         (.details-section > .content > .group > .row.simple.content-flow-link > .label):
2370         (.details-section > .content > .group > .row.simple.content-flow-link > .value):
2371         (.details-section > .content > .group > .row.simple.content-flow-link > .value > div):
2372         (.details-section > .content > .group > .row.simple.content-flow-link > .value > div > .icon):
2373         (.details-section > .content > .group > .row.simple.content-flow-link > .value > div > span):
2374         (.details-section > .content > .group > .row.simple.content-flow-link > .value > div > .go-to-arrow):
2375         (.details-section > .content > .group > .row.simple.content-flow-link:hover > .value > div > .go-to-arrow):
2376         * UserInterface/ComputedStyleDetailsPanel.js:
2377         (WebInspector.ComputedStyleDetailsPanel):
2378         (WebInspector.ComputedStyleDetailsPanel.prototype.get regionFlow):
2379         (WebInspector.ComputedStyleDetailsPanel.prototype.set regionFlow):
2380         (WebInspector.ComputedStyleDetailsPanel.prototype.get contentFlow):
2381         (WebInspector.ComputedStyleDetailsPanel.prototype.set contentFlow):
2382         (WebInspector.ComputedStyleDetailsPanel.prototype.get containerRegions):
2383         (WebInspector.ComputedStyleDetailsPanel.prototype.set containerRegions):
2384         (WebInspector.ComputedStyleDetailsPanel.prototype.refresh):
2385         (WebInspector.ComputedStyleDetailsPanel.prototype._computedStyleShowAllCheckboxValueChanged):
2386         (WebInspector.ComputedStyleDetailsPanel.prototype._resetFlowDetails):
2387         (WebInspector.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady):
2388         (WebInspector.ComputedStyleDetailsPanel.prototype._refreshFlowDetails):
2389         (WebInspector.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked):
2390         (WebInspector.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked):
2391         * UserInterface/DOMTreeDataGrid.css: Added.
2392         (.dom-tree-data-grid .data-grid):
2393         (.dom-tree-data-grid .data-grid table.data):
2394         (.dom-tree-data-grid .data-container):
2395         (.dom-tree-data-grid .data-container tr):
2396         (.dom-tree-data-grid .data-container td > div):
2397         (.dom-tree-data-grid .data-container .name-column):
2398         (.dom-tree-data-grid .data-container .name-column .icon):
2399         (.dom-tree-data-grid .data-container .name-column .label):
2400         (.dom-tree-data-grid .data-container tr:hover .name-column .label):
2401         (.dom-tree-data-grid .data-container .go-to-arrow):
2402         (.dom-tree-data-grid .data-container tr:hover .go-to-arrow):
2403         (.dom-tree-data-grid .data-container tbody > tr:nth-child(2n)):
2404         (.dom-tree-data-grid .data-container tbody > tr:nth-child(2n+1)):
2405         * UserInterface/DOMTreeDataGrid.js: Added.
2406         (WebInspector.DOMTreeDataGrid):
2407         (WebInspector.DOMTreeDataGrid.prototype._onmousemove):
2408         (WebInspector.DOMTreeDataGrid.prototype._onmouseout):
2409         * UserInterface/DOMTreeDataGridNode.js: Added.
2410         (WebInspector.DOMTreeDataGridNode):
2411         (WebInspector.DOMTreeDataGridNode.prototype.get domNode):
2412         (WebInspector.DOMTreeDataGridNode.prototype.createCellContent):
2413         (WebInspector.DOMTreeDataGridNode.prototype._updateNodeName):
2414         (WebInspector.DOMTreeDataGridNode.prototype._makeNameCell):
2415         (WebInspector.DOMTreeDataGridNode.prototype._updateNameCellData):
2416         (WebInspector.DOMTreeDataGridNode.prototype._goToArrowWasClicked):
2417         * UserInterface/DOMTreeManager.js:
2418         (WebInspector.DOMTreeManager.prototype.unregisteredNamedFlowContentElement):
2419         (WebInspector.DOMTreeManager.prototype.nodeRequested):
2420         (WebInspector.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes):
2421         (WebInspector.DOMTreeManager.prototype.domNodeResolved):
2422         (WebInspector.DOMTreeManager.prototype.regionNodesAvailable):
2423         (WebInspector.DOMTreeManager.prototype.get if):
2424         (WebInspector.DOMTreeManager.prototype.get var):
2425         (WebInspector.DOMTreeManager.prototype.backendFunction.getComputedProperty):
2426         (WebInspector.DOMTreeManager.prototype.backendFunction.getContentFlowName):
2427         (WebInspector.DOMTreeManager.prototype.):
2428         * UserInterface/DataGrid.css:
2429         (.data-grid.no-header > table.header):
2430         (.data-grid.no-header .data-container):
2431         * UserInterface/DetailsSection.js:
2432         (WebInspector.DetailsSection):
2433         * UserInterface/InspectorBackend.js:
2434         (InspectorBackendClass.prototype._wrap):
2435         * UserInterface/Main.html:
2436         * UserInterface/ResourceSidebarPanel.js:
2437         (WebInspector.ResourceSidebarPanel.prototype.showContentFlowDOMTree):
2438         * UserInterface/RuntimeManager.js:
2439         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
2440         (WebInspector.RuntimeManager.prototype.getPropertiesForRemoteObject):
2441
2442 2013-12-04  Antoine Quint  <graouts@apple.com>
2443
2444         Web Inspector: ColorWheel uses old Color constructor
2445         https://bugs.webkit.org/show_bug.cgi?id=125260
2446
2447         Reviewed by Joseph Pecoraro.
2448
2449         Update to new WebInspector.Color constructor signature and use a clear color.
2450
2451         * UserInterface/ColorWheel.js:
2452         (WebInspector.ColorWheel.prototype.get tintedColor):
2453         (WebInspector.ColorWheel.prototype.get rawColor):
2454
2455 2013-12-04  Antoine Quint  <graouts@apple.com>
2456
2457         Web Inspector: color picker doesn't work with "blue"
2458         https://bugs.webkit.org/show_bug.cgi?id=125262
2459
2460         Reviewed by Joseph Pecoraro.
2461
2462         Under certain circumstances rounding issues would have us compare
2463         two equal numbers that differ by 0.00000001 and sometime trip this
2464         if statement and yield a null color. We now add a little fudge to
2465         the test and also return a clear color rather than null to match what
2466         we do in the getters for "tintedColor" and "rawColor".
2467
2468         * UserInterface/ColorWheel.js:
2469         (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
2470
2471 2013-12-04  Antoine Quint  <graouts@apple.com>
2472
2473         Web Inspector: use only two decimals for opacity in rgba/hsla colors
2474         https://bugs.webkit.org/show_bug.cgi?id=125261
2475
2476         Reviewed by Joseph Pecoraro.
2477
2478         * UserInterface/ColorPicker.js:
2479         (WebInspector.ColorPicker.prototype._updateColor):
2480
2481 2013-12-04  Antoine Quint  <graouts@apple.com>
2482
2483         Web Inspector: "data detectors" menu on hover for actionable tokens
2484         https://bugs.webkit.org/show_bug.cgi?id=124363
2485
2486         Reviewed by Timothy Hatcher.
2487
2488         Add a new WebInspector.HoverMenu class to display an overlay menu that is presented
2489         with respect to a target frame that it draws itself around adding a customizable
2490         action button to its right. The menu uses fade animations as it's presented and
2491         dismissed and a single delegation method is fired when the button is pressed. Finally,
2492         just like a popover, it automatically dismisses itself upon scrolling anywhere
2493         outside of its bounds.
2494
2495         * UserInterface/HoverMenu.css: Added.
2496         * UserInterface/HoverMenu.js: Added.
2497         (WebInspector.HoverMenu):
2498         (WebInspector.HoverMenu.prototype.get element):
2499         (WebInspector.HoverMenu.prototype.dismiss):
2500         (WebInspector.HoverMenu.prototype.handleEvent):
2501         (WebInspector.HoverMenu.prototype._handleClickEvent):
2502         * UserInterface/Images/HoverMenuButton.png: Added.
2503         * UserInterface/Images/HoverMenuButton@2x.png: Added.
2504         * UserInterface/Main.html:
2505
2506 2013-12-04  Antoine Quint  <graouts@apple.com>
2507
2508         Web Inspector: edited color should serialize back to original format when possible
2509         https://bugs.webkit.org/show_bug.cgi?id=125244
2510
2511         Reviewed by Joseph Pecoraro.
2512
2513         Profoundly reworked WebInspector.Color to be more efficient and more flexible when
2514         serializing the color to the various supported formats.
2515
2516         * UserInterface/CSSStyleDeclarationTextEditor.js:
2517         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createColorSwatches):
2518         Use new WebInspector.Color.fromString() factory and check for a null return value
2519         rather than an exception to identify invalid color tokens.
2520
2521         * UserInterface/Color.js:
2522         (WebInspector.Color):
2523         Rewrote WebInspector.Color such that it would have, at all times, a canonical
2524         representation in terms of either RGBA or HSLA depending on the format used to
2525         create the color. The new constructor parameters lets the user pass a format
2526         and the RGBA or HSLA components, allowing to bypass the string-only creation
2527         system which was sub-optimal for the new color picker. Additionally, the toString()
2528         method now can provide the most accurate serialization of the color based on the
2529         provided format with a fallback mechanism to RGB/RGBA in cases where the desired
2530         format would incur a loss of fidelity. Finally, simplified the API to only feature
2531         essential features.
2532
2533         (WebInspector.Color.fromString):
2534         New factory method used to create a color from a string.
2535
2536         * UserInterface/ColorPicker.js:
2537         (WebInspector.ColorPicker.prototype.set color):
2538         Keep track of the original color format so that we can use it as the preferred format
2539         when serializing the updated color in _updateColor().
2540
2541         (WebInspector.ColorPicker.prototype._updateColor):
2542         Use the original color format as the prefered formation for color serialization. Also,
2543         use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.
2544
2545         (WebInspector.ColorPicker.prototype._updateSliders):
2546         Use the new WebInspector.Color constructor in lieu of the removed .fromRGBA factory.
2547
2548         * UserInterface/ColorWheel.js:
2549         (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
2550         Use the new WebInspector.Color constructor in lieu of the removed .fromRGB factory.
2551
2552 2013-12-03  Seokju Kwon  <seokju@webkit.org>
2553
2554         Web Inspector: Remove '_attachedWindowHeight' property in InspectorFrontendHostStub.js
2555         https://bugs.webkit.org/show_bug.cgi?id=125204
2556
2557         Reviewed by Timothy Hatcher.
2558
2559         '_attachedWindowHeight' property is not used anywhere, so remove it.
2560
2561         * UserInterface/InspectorFrontendHostStub.js:
2562         (.WebInspector.InspectorFrontendHostStub):
2563
2564 2013-12-03  Brian J. Burg  <burg@cs.washington.edu>
2565
2566         Web Inspector: restore navigation panel state across reloads and reopens
2567         https://bugs.webkit.org/show_bug.cgi?id=122125
2568
2569         Reviewed by Timothy Hatcher.
2570
2571         The previous strategy for restoring content views after inspector
2572         re-open did not consider the active sidebar and its selection, and
2573         tried to recreate the appropriate selection from the saved content
2574         view. However, doesn't work for tree elements in the sidebar panel
2575         that don't change views when selected, such as script breakpoints,
2576         special breakpoints, call stack, timeline sections, etc.
2577
2578         This patch implements a new strategy that saves the navigation
2579         sidebar panel's view state by serializing the identity of the
2580         selected element's represented object. Relevant represented
2581         object classes implement the saveIdentityToCookie() method. Each
2582         represented object class also adds a TypeIdentifier property to
2583         its constructor, to aid inexact matching based on represented
2584         object type, rather than its complete identity.
2585
2586         When restoring, the navigation sidebar attempts to match added
2587         tree elements against the pending cookie, and selects the element
2588         if it matches. A represented object matches if its serialized
2589         identity matches the previously saved serialized identity.
2590
2591         The inspector view state is now only saved on the page hide event
2592         (for saving across reopen) and when the main frame commits its
2593         provisional load (for saving across same-page reloads). It
2594         consolidates similar view state settings into a single setting.
2595
2596         * UserInterface/ApplicationCacheFrame.js:
2597         (WebInspector.ApplicationCacheFrame): Add cookie keys and type identifier.
2598         (WebInspector.ApplicationCacheFrame.prototype.saveIdentityToCookie): Added.
2599         * UserInterface/ApplicationCacheManager.js: remove objectForCookie().
2600         * UserInterface/Breakpoint.js:
2601         (WebInspector.Breakpoint): Add cookie keys and type identifier.
2602         (WebInspector.Breakpoint.prototype.saveIdentityToCookie):
2603         * UserInterface/CookieStorageObject.js:
2604         (WebInspector.CookieStorageObject.prototype.saveIdentityToCookie): Added.
2605         * UserInterface/DOMStorageObject.js:
2606         (WebInspector.DOMStorageObject): Add cookie keys and type identifier.
2607         (WebInspector.DOMStorageObject.prototype.saveIdentityToCookie): Added.
2608         * UserInterface/DatabaseObject.js:
2609         (WebInspector.DatabaseObject): Add cookie keys and type identifier.
2610         (WebInspector.DatabaseObject.prototype.saveIdentityToCookie): Added.
2611         * UserInterface/DatabaseTableObject.js:
2612         (WebInspector.DatabaseTableObject): Add cookie keys and type identifier.
2613         (WebInspector.DatabaseTableObject.prototype.saveIdentityToCookie): Added.
2614         * UserInterface/DebuggerSidebarPanel.js:
2615         (WebInspector.DebuggerSidebarPanel.prototype.saveStateToCookie): Added.
2616         (WebInspector.DebuggerSidebarPanel.prototype.restoreStateFromCookie): Added.
2617         * UserInterface/Frame.js:
2618         (WebInspector.Frame): Add cookie keys and type identifier.
2619         (WebInspector.Frame.prototype.saveIdentityToCookie): Added.
2620         * UserInterface/FrameResourceManager.js: remove objectForCookie().
2621         * UserInterface/InstrumentSidebarPanel.js:
2622         (WebInspector.InstrumentSidebarPanel.prototype.showTimelineForRecordType):
2623         Return the shown timeline, if any.
2624
2625         (WebInspector.InstrumentSidebarPanel.prototype.saveStateToCookie): Added.
2626         (WebInspector.InstrumentSidebarPanel.prototype.restoreStateFromCookie): Added.
2627         (WebInspector.InstrumentSidebarPanel.prototype.showProfile):
2628         Return the shown profile, if any.
2629
2630         * UserInterface/Main.js:
2631         (WebInspector): Added cookie keys for the selected sidebar and
2632         typeidentifier of the sidebar's selected tree element.
2633
2634         (WebInspector.contentLoaded): Remove callbacks for
2635         resolveAndShowPendingContentViewCookie(). Consolidate all saved
2636         inspector view state into one Setting. Move special-cased
2637         restoring of the console to the restoration method. Move saving
2638         of last opened navigation panel to the saving method.
2639
2640         (WebInspector._mainResourceDidChange): Try to restore saved view
2641         state when the main resource changes.
2642
2643         (WebInspector._provisionalLoadCommitted): Update the saved view
2644         state when the navigation commits. This is the last chance to save
2645         it before the main resource changes and the navigation panel view
2646         state is discarded and rebuilt.
2647
2648         (WebInspector._pageHidden): Update the saved view state when the
2649         inspector page is hidden, but before state is discarded.
2650
2651         (WebInspector._navigationSidebarPanelSelected): Don't save last
2652         navigation sidebar panel.
2653         (WebInspector._updateCookieForInspectorViewState): Renamed from
2654         _updateCurrentContentViewCookie. It delegates view state
2655         serialization to the currently open navigation sidebar, rather
2656         than the current content view.
2657
2658         (WebInspector._contentBrowserRepresentedObjectsDidChange): Don't
2659         spuriously serialize the current view state cookie on every
2660         ContentView change.
2661
2662         (WebInspector._restoreInspectorViewStateFromCookie): Renamed from
2663         _showContentViewForCookie. It now restores a specific navigation
2664         panel and delegates remaining view state restoration to the panel
2665         itself. Last-resort selection of any tree element with the same
2666         type identifier was moved to the navigation panel's restore method.
2667
2668         * UserInterface/NavigationSidebarPanel.js:
2669         (WebInspector.NavigationSidebarPanel):
2670         (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
2671         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
2672         Save references to all created TreeOutlines in a Set, so we can
2673         restore any tree's selection.
2674
2675         (WebInspector.NavigationSidebarPanel.prototype.saveStateToCookie):
2676         Added. Find the selected tree element from all tree outlines and
2677         ask it to serialize its identity.
2678
2679         (WebInspector.NavigationSidebarPanel.prototype.restoreStateFromCookie):
2680         Added. Eagerly search existing tree elements for a matching
2681         representedObject. If none exists, save the pending cookie and
2682         schedule last-resort matching using the provided timeout interval.
2683
2684         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
2685         Check if the added tree element matches a pending view state
2686         cookie, if one exists.
2687
2688         (WebInspector.NavigationSidebarPanel.prototype.treeElementMatchesCookie):
2689         Added. Check if the tree element's representedObject matches the
2690         pending view state cookie.
2691
2692         (WebInspector.NavigationSidebarPanel.prototype._checkElementsForPendingViewStateCookie):
2693         Added. For each provided tree element, check if the tree
2694         element's represented object produces the same serialized identity
2695         as the pending view state cookie that we are trying to resolve.
2696         If a match is found (possibly by relaxing to matching anything
2697         with the same type), select the tree element and clear both the
2698         pending view state cookie and last-resort selection timer.
2699
2700         * UserInterface/Resource.js:
2701         (WebInspector.Resource): Add cookie keys and type identifier.
2702         (WebInspector.Resource.prototype.saveIdentityToCookie): Added.
2703
2704         * UserInterface/ResourceClusterContentView.js:
2705         (WebInspector.ResourceClusterContentView.prototype.saveToCookie):
2706         (WebInspector.ResourceClusterContentView.prototype.restoreFromCookie):
2707         Since identity state is serialized by the representedObject, these
2708         methods only need to save view-specific state, such as the visible
2709         subview. Remove extraneous state.
2710
2711         * UserInterface/Script.js:
2712         (WebInspector.Script): Add cookie keys and type identifier.
2713         (WebInspector.Script.prototype.saveIdentityToCookie): Added.
2714         * UserInterface/StorageManager.js: remove objectForCookie().
2715         * UserInterface/TimelineManager.js: remove objectForCookie().
2716         * UserInterface/TimelinesContentView.js:
2717         (WebInspector.TimelinesContentView.prototype.saveToCookie):
2718         (WebInspector.TimelinesContentView.prototype.restoreFromCookie):
2719         Since identity state is serialized by the representedObject, these
2720         methods only need to save view-specific state, such as the visible
2721         subview. Remove extraneous state.
2722
2723         * UserInterface/TreeOutline.js: Add TreeOutline.prototype.constructor
2724         so other code can assume the constructor property exists.
2725
2726 2013-12-02  Antoine Quint  <graouts@apple.com>
2727
2728         Web Inspector: popover can overlap target frame
2729         https://bugs.webkit.org/show_bug.cgi?id=125069
2730
2731         Reviewed by Joseph Pecoraro.
2732
2733         Fix a regression introduced in http://trac.webkit.org/changeset/159286. We should only
2734         offset the frame of the popover in the y-axis if the target edge is on the x-axis, and
2735         vice versa. We also remove the needsToDrawBackground check since it incorrectly disregarded
2736         the anchor point. We now always draw the background which is a lot safer and guarantees
2737         we'll always draw an adequate frame and anchor point.
2738
2739         * UserInterface/Popover.js:
2740         (WebInspector.Popover.prototype._update):
2741         (WebInspector.Popover.prototype._bestMetricsForEdge):
2742
2743 2013-12-02  Antoine Quint  <graouts@apple.com>
2744
2745         Web Inspector: add a method to add padding around a WebInspector.Rect
2746         https://bugs.webkit.org/show_bug.cgi?id=125072
2747
2748         Reviewed by Joseph Pecoraro.
2749
2750         Add a new WebInspector.Rect.prototype.pad() method which does not alter
2751         the rectangle it's called and returns a new rect much like .inset(). I've
2752         checked all call sites and there was no reuse of the rectangle that was
2753         padded so this patch won't have any side effects.
2754
2755         * UserInterface/Breakpoint.js:
2756         (WebInspector.Breakpoint.prototype._showEditBreakpointPopover):
2757         * UserInterface/CSSStyleDeclarationTextEditor.js:
2758         * UserInterface/Geometry.js:
2759         (WebInspector.Rect.prototype.pad):
2760         * UserInterface/LayerTreeSidebarPanel.js:
2761         (WebInspector.LayerTreeSidebarPanel.prototype._updatePopoverForSelectedNode):
2762         * UserInterface/SourceCodeTextEditor.js:
2763         (WebInspector.SourceCodeTextEditor.prototype._showPopover):
2764         * UserInterface/TimelineDataGrid.js:
2765         (WebInspector.TimelineDataGrid.prototype._updatePopoverForSelectedNode):
2766
2767 2013-11-26  Antoine Quint  <graouts@apple.com>
2768
2769         Web Inspector: Allow showing a context menu on all mouse events.
2770         https://bugs.webkit.org/show_bug.cgi?id=124747
2771
2772         Reviewed by Joseph Pecoraro.
2773
2774         Automatically dispatch a contextmenu event in case WebInspector.ContextMenu.prototype.show()
2775         is called outside of a contextmenu event handler and would therefore not show the expected
2776         context menu (except in the Remote Web Inspector where this already works). 
2777
2778         * UserInterface/ContextMenu.js:
2779         (WebInspector.ContextMenu.prototype.show):
2780         Check whether the event is a contextmenu event, and if not, add an event listener for a manually
2781         dispatched contextmenu event such that we may then call InspectorFrontendHost.showContextMenu()
2782         in a contextmenu event handler.
2783
2784         (WebInspector.ContextMenu.prototype.handleEvent):
2785         Call InspectorFrontendHost.showContextMenu() now that we received the manually dispatched
2786         contextmenu event.
2787
2788 2013-11-25  Alexandru Chiculita  <achicu@adobe.com>
2789
2790         Web Inspector: [CSS Regions] A page with many flows should collapse the resources tree
2791         https://bugs.webkit.org/show_bug.cgi?id=122926
2792
2793         Reviewed by Timothy Hatcher.
2794
2795         Refactored the code in FrameTreeElement._shouldGroupIntoFolders to make it easy to track
2796         more types of resources. Added the content flows as another type of resource that would trigger the
2797         collapsing.
2798
2799         * UserInterface/DOMTreeManager.js:
2800         (WebInspector.DOMTreeManager.prototype.namedFlowRemoved): Added code to remove the content nodes from
2801         a flow that has been removed.
2802         * UserInterface/FrameTreeElement.js:
2803         (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders.pushCategory):
2804         (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders.pushResourceType):
2805         (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
2806
2807 2013-11-25  Dan Bernstein  <mitz@apple.com>
2808
2809         Set the svn:ignore property on the Xcode project to ignore the workspace and user data.
2810
2811         * WebInspectorUI.xcodeproj: Added property svn:ignore.
2812
2813 2013-11-21  Mark Rowe  <mrowe@apple.com>
2814
2815         <https://webkit.org/b/124702> Stop overriding VALID_ARCHS.
2816
2817         All modern versions of Xcode set it appropriately for our needs.
2818
2819         Reviewed by Alexey Proskuryakov.
2820
2821         * Configurations/Base.xcconfig:
2822
2823 2013-11-19  Antoine Quint  <graouts@apple.com>
2824
2825         Web Inspector: layer info sidebar should convert to MB for very large layers
2826         https://bugs.webkit.org/show_bug.cgi?id=124570
2827
2828         Reviewed by Timothy Hatcher.
2829
2830         Setting higherResolution to true (its default value if omitted) when calling
2831         Number.bytesToString() would always result in a KB-formatted string instead
2832         since it didn't check for a < 1024 value as well.
2833
2834         * UserInterface/Utilities.js:
2835         (Number.bytesToString):
2836
2837 2013-11-19  Antoine Quint  <graouts@apple.com>
2838
2839         Remove some unused utilities from Utilities.js
2840         https://bugs.webkit.org/show_bug.cgi?id=124590
2841
2842         Reviewed by Darin Adler.
2843
2844         Remove some methods and properties that were no longer used through the codebase.
2845
2846         * UserInterface/Utilities.js:
2847
2848 2013-11-18  Alexandru Chiculita  <achicu@adobe.com>
2849
2850         Web Inspector: Update WebInspectorUI to use the new "nodeIds" parameter for DOM.performSearch
2851         https://bugs.webkit.org/show_bug.cgi?id=124544
2852
2853         Reviewed by Joseph Pecoraro.
2854
2855         Added the new DOM.performSearch "nodeIds" parameter and made the two implementations
2856         of DOMTreeContentView provide the right context node ids.
2857
2858         DOMTreeContentView is just using the id of the document node while ContentFlowDOMTreeContentView
2859         is passing the list of content nodes.
2860
2861         Note that adding an extra optional parameter to DOM.performSearch does not break iOS 6 and 7 compatibility.
2862
2863         * UserInterface/ContentFlowDOMTreeContentView.js:
2864         (WebInspector.ContentFlowDOMTreeContentView.prototype.getSearchContextNodes):
2865         * UserInterface/DOMTreeContentView.js:
2866         (WebInspector.DOMTreeContentView.prototype.performSearch.contextNodesReady):
2867         (WebInspector.DOMTreeContentView.prototype.performSearch):
2868         (WebInspector.DOMTreeContentView.prototype.getSearchContextNodes):
2869         * UserInterface/FrameDOMTreeContentView.js:
2870         (WebInspector.FrameDOMTreeContentView.prototype.getSearchContextNodes):
2871         * UserInterface/InspectorBackendCommands.js:
2872
2873 2013-11-18  Joseph Pecoraro  <pecoraro@apple.com>
2874
2875         Web Inspector: Update localizedStrings, remove stale string
2876         https://bugs.webkit.org/show_bug.cgi?id=124543
2877
2878         Reviewed by Jessie Berlin.
2879
2880         Remove stale localized strings after r124543 remove the old color picker.
2881
2882         * Localizations/en.lproj/localizedStrings.js:
2883
2884 2013-11-15  Antoine Quint  <graouts@apple.com>
2885
2886         Web Inspector: New color picker
2887         https://bugs.webkit.org/show_bug.cgi?id=124354
2888
2889         Reviewed by Timothy Hatcher.
2890
2891         Beginning of a new color picker. The focus of this new picker is to let you pick from
2892         a color wheel as the primary mean of color picking, with additional slider controls for
2893         the brightness and the opacity, better matching the default OS X color picker. This is the
2894         basis for a color picker that will evolve to support the following:
2895
2896         - editable CSS value label (http://webkit.org/b/124356)
2897         - picking a color anywhere on screen (http://webkit.org/b/124357)
2898         - swatches based on other colors in page (http://webkit.org/b/124358)
2899
2900         Note also that the color wheel has not been tested on Retina displays
2901         (see http://webkit.org/b/124355).
2902
2903         * UserInterface/CSSColorPicker.css: Removed.
2904         * UserInterface/CSSColorPicker.js: Removed.
2905         Previous color picker, now removed in favor of the new ColorPicker class.
2906
2907         * UserInterface/CSSStyleDeclarationTextEditor.js:
2908         Adopt new class name for the color picker, add a little padding to the popover
2909         target frame and set the base color after the picker has been presented.
2910
2911         * UserInterface/Color.js:
2912         (WebInspector.Color.prototype._hslToRGB):
2913         Simplified math.
2914
2915         (WebInspector.Color.rgb2hsv):
2916         (WebInspector.Color.hsv2rgb):
2917         New utilities to deal with HSV colors used in the ColorWheel.
2918
2919         * UserInterface/ColorPicker.css: Added.
2920
2921         * UserInterface/ColorPicker.js: Added.
2922         (WebInspector.ColorPicker):
2923         (WebInspector.ColorPicker.prototype.get element):
2924         (WebInspector.ColorPicker.prototype.set brightness):
2925         (WebInspector.ColorPicker.prototype.set opacity):
2926         (WebInspector.ColorPicker.prototype.get color):
2927
2928         (WebInspector.ColorPicker.prototype.set color):
2929         We set the _dontUpdateColor flag here such that we don't attempt to
2930         notify about a color change at this point in case the selected color
2931         is too saturated to be represented accurately on the color wheel and
2932         we would end up changing the color by virtue of presenting the popover.
2933
2934         (WebInspector.ColorPicker.prototype.colorWheelColorDidChange):
2935         (WebInspector.ColorPicker.prototype.sliderValueDidChange):
2936         (WebInspector.ColorPicker.prototype._updateColor):
2937         (WebInspector.ColorPicker.prototype._updateSliders):
2938
2939         * UserInterface/ColorWheel.css: Added.
2940
2941         * UserInterface/ColorWheel.js: Added.
2942         The ColorWheel makes use of three different <canvas> elements to draw itself.
2943         The "raw" canvas is used to draw the raw, un-tinted color wheel with poor
2944         aliasing. The "raw" canvas is only drawn when the dimension is changed.
2945         The "tinted" canvas is used to draw the "raw" canvas with a black overlay
2946         based on the brightness set on the wheel. The "final" canvas, the only <canvas>
2947         element attached to the DOM, is used to draw the "tinted" canvas into a circle
2948         clip of a slightly narrower radius so that the drawn image is visually more pleasing
2949         and can be displayed above virtually any background color.
2950
2951         We use color math to generate the color wheel, courtesy of Dean Jackson, and also to
2952         figure out where to position the crosshair for the provided base color as well as
2953         the opposite operation where we get the color under the mouse pointer.
2954
2955         The color wheel fires a single delegate method call colorWheelColorDidChange(colorWheel),
2956         the colors themselves being retrieved via the public properties tintedColor and rawColor.
2957
2958         (WebInspector.ColorWheel):
2959         (WebInspector.ColorWheel.prototype.set dimension):
2960         (WebInspector.ColorWheel.prototype.get element):
2961         (WebInspector.ColorWheel.prototype.get brightness):
2962         (WebInspector.ColorWheel.prototype.set brightness):
2963         (WebInspector.ColorWheel.prototype.get tintedColor):
2964         (WebInspector.ColorWheel.prototype.set tintedColor):
2965         (WebInspector.ColorWheel.prototype.get rawColor):
2966         (WebInspector.ColorWheel.prototype.handleEvent):
2967         (WebInspector.ColorWheel.prototype._handleMousedown):
2968         (WebInspector.ColorWheel.prototype._handleMousemove):
2969         (WebInspector.ColorWheel.prototype._handleMouseup):
2970         (WebInspector.ColorWheel.prototype._pointInCircleForEvent):
2971         (WebInspector.ColorWheel.prototype._pointInCircleForEvent.angleFromCenterToPoint):
2972         (WebInspector.ColorWheel.prototype._pointInCircleForEvent.pointOnCircumference):
2973         (WebInspector.ColorWheel.prototype._updateColorForMouseEvent):
2974         (WebInspector.ColorWheel.prototype._setCrosshairPosition):
2975         (WebInspector.ColorWheel.prototype._tintedColorToPointAndBrightness):
2976         (WebInspector.ColorWheel.prototype._drawRawCanvas):
2977         (WebInspector.ColorWheel.prototype._colorAtPointWithBrightness):
2978         (WebInspector.ColorWheel.prototype._drawTintedCanvas):
2979         (WebInspector.ColorWheel.prototype._draw):
2980
2981         * UserInterface/Images/SliderThumb.png: Added.
2982         * UserInterface/Images/SliderThumb@2x.png: Added.
2983         * UserInterface/Images/SliderThumbPressed.png: Added.
2984         * UserInterface/Images/SliderThumbPressed@2x.png: Added.
2985         Supporting artwork for the new Slider class.
2986
2987         * UserInterface/Main.html:
2988         Remove the previous color picker class and add the new one, as well as the new Slider class.
2989
2990         * UserInterface/Slider.css: Added.
2991
2992         * UserInterface/Slider.js: Added.
2993         New slider to match the look of the sliders used in the native OS X color picker. The most
2994         interesting feature of these sliders is that they can be transformed using CSS in any way
2995         and will still operate correctly due to always converting the mouse coordinates in the page
2996         coordinate system to the coordinate system local to the backing element. For instance, the
2997         color picker uses two sliders transformed to be displayed vertically.
2998
2999         As it stands these slides only support values between 0 and 1 and fire a single delegate
3000         method call sliderValueDidChange(slider, newValue).
3001
3002         (WebInspector.Slider):
3003         (WebInspector.Slider.prototype.get element):
3004         (WebInspector.Slider.prototype.get value):
3005         (WebInspector.Slider.prototype.set value):
3006         (WebInspector.Slider.prototype.handleEvent):
3007         (WebInspector.Slider.prototype._handleMousedown):
3008         (WebInspector.Slider.prototype._handleMousemove):
3009         (WebInspector.Slider.prototype._handleMouseup):
3010         (WebInspector.Slider.prototype._localPointForEvent):
3011         (WebInspector.Slider.prototype.get _maxX):
3012
3013         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
3014         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
3015         Update file names for the new color picker.
3016
3017 2013-11-14  Antoine Quint  <graouts@apple.com>
3018
3019         Web Inspector: Popovers may shrink unnecessarily
3020         https://bugs.webkit.org/show_bug.cgi?id=124350
3021
3022         Reviewed by Timothy Hatcher.
3023
3024         Because we always get the intersection of the preferred frame and the container frame to
3025         ensure the popover fits within its container based on a preferred frame that would place
3026         the arrow within the center of the attachment edge, we get in situations where we may
3027         shrink the popover instead of shifting it to fit within the container frame. We now first
3028         shift the preferred frame before getting its intersection with the container frame to
3029         avoid such situations. 
3030
3031         * UserInterface/Popover.js:
3032         (WebInspector.Popover.prototype._bestMetricsForEdge):
3033
3034 2013-11-13  Joseph Pecoraro  <pecoraro@apple.com>
3035
3036         Web Inspector: Split Inspector.json into individual domain json files
3037         https://bugs.webkit.org/show_bug.cgi?id=124098
3038
3039         Reviewed by Timothy Hatcher.
3040
3041         Removed now stale comments referring to the combined Inspector.json.
3042         Make update-InspectorBackendCommands helper script generate a
3043         combined Inspector.json to still work for tip of tree.
3044
3045         * Scripts/update-InspectorBackendCommands.rb:
3046         * UserInterface/ApplicationCacheObserver.js:
3047         * UserInterface/CSSObserver.js:
3048         * UserInterface/CanvasObserver.js:
3049         * UserInterface/ConsoleObserver.js:
3050         * UserInterface/DOMObserver.js:
3051         * UserInterface/DOMStorageObserver.js:
3052         * UserInterface/DatabaseObserver.js:
3053         * UserInterface/DebuggerObserver.js:
3054         * UserInterface/InspectorBackendCommands.js:
3055         * UserInterface/InspectorObserver.js:
3056         * UserInterface/LayerTreeObserver.js:
3057         * UserInterface/NetworkObserver.js:
3058         * UserInterface/PageObserver.js:
3059         * UserInterface/ProfilerObserver.js:
3060         * UserInterface/Resource.js:
3061         * UserInterface/RuntimeObserver.js:
3062         * UserInterface/TimelineObserver.js:
3063
3064 2013-11-12  Alexandru Chiculita  <achicu@adobe.com>
3065
3066         Web Inspector: ContentFlowTreeContentView should use only one DOMTreeOutline
3067         https://bugs.webkit.org/show_bug.cgi?id=124230
3068
3069         Reviewed by Timothy Hatcher.
3070
3071         Changed ContentFlowTreeContentView to use one DOMTreeOutline by just
3072         populating it with root DOMTreeElements directly. That is very
3073         similar to how DOMTreeOutline works when omitRootDOMNode is used.
3074
3075         Now that ContentFlowTreeContentView has only one DOMTreeOutline,
3076         it makes sense to change its base class to be DOMTreeContentView instead.
3077         Also, with that I've changed its name to ContentFlowDOMTreeContentView.
3078
3079         I had to move all the DOMTree document loading code from DOMTreeContentView to a
3080         new class called FrameDOMTreeContentView. This is used to display the DOM of the
3081         frame objects. FrameDOMTreeContentView is also inheriting from DOMTreeContentView.
3082
3083         Issues that are fixed as a side effect:
3084         - Selection path components are now displaying all the sibling elements for contentFlow.contentNodes
3085         (those are the nodes that have "-webkit-flow-into" set directly).
3086         - Keyboard navigation works for the contentFlow.contentNodes.
3087         - Search is implemented in DOMTreeContentView, so that code now works for flows too.
3088         The DOMAgents's search API will use all the Documents to lookup for nodes, so it might
3089         find DOM nodes that are not part of the flow. This is in line with the behavior for the
3090         frames.
3091
3092         * UserInterface/ContentFlowDOMTreeContentView.js: Renamed from ContentFlowTreeContentView
3093         to better reflect the inheritance from DOMTreeContentView.
3094         (WebInspector.ContentFlowDOMTreeContentView):
3095         (WebInspector.ContentFlowDOMTreeContentView.prototype.closed):
3096         (WebInspector.ContentFlowDOMTreeContentView.prototype._createContentTrees):
3097         (WebInspector.ContentFlowDOMTreeContentView.prototype._contentNodeWasAdded):
3098         (WebInspector.ContentFlowDOMTreeContentView.prototype._contentNodeWasRemoved):
3099         * UserInterface/ContentView.js:
3100         (WebInspector.ContentView):
3101         * UserInterface/DOMTreeContentView.js:
3102         (WebInspector.DOMTreeContentView):
3103         (WebInspector.DOMTreeContentView.prototype.closed):
3104         (WebInspector.DOMTreeContentView.prototype.):
3105         (WebInspector.DOMTreeContentView.prototype._restoreSelectedNodeAfterUpdate):
3106         (WebInspector.DOMTreeContentView.prototype._selectedNodeDidChange):
3107         * UserInterface/FrameDOMTreeContentView.js: Added.
3108         (WebInspector.FrameDOMTreeContentView):
3109         (WebInspector.FrameDOMTreeContentView.prototype.get domTree):
3110         (WebInspector.FrameDOMTreeContentView.prototype.closed):
3111         (WebInspector.FrameDOMTreeContentView.prototype._rootDOMNodeAvailable):
3112         (WebInspector.FrameDOMTreeContentView.prototype._rootDOMNodeInvalidated):
3113         (WebInspector.FrameDOMTreeContentView.prototype._requestRootDOMNode):
3114         * UserInterface/Main.html:
3115
3116 2013-11-08  Joseph Pecoraro  <pecoraro@apple.com>
3117
3118         Web Inspector: remove -webkit-min and -webkit-max from CSS completions
3119         https://bugs.webkit.org/show_bug.cgi?id=124072
3120
3121         Reviewed by Timothy Hatcher.
3122
3123         -webkit-min and -webkit-max are not implemented in WebCore, despite mentions of it.
3124
3125         * UserInterface/CSSKeywordCompletions.js:
3126
3127 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
3128
3129         Web Inspector: CSS Regions: Use a Map object to store the ContentFlows
3130         https://bugs.webkit.org/show_bug.cgi?id=124015
3131
3132         Reviewed by Joseph Pecoraro.
3133
3134         Changed the Object hashmap to a Map based hashmap when storing the flows in DOMTreeManager.
3135
3136         * UserInterface/DOMTreeManager.js:
3137         (WebInspector.DOMTreeManager):
3138         (WebInspector.DOMTreeManager.prototype.getNamedFlowCollection):
3139         (WebInspector.DOMTreeManager.prototype.namedFlowRemoved):
3140         (WebInspector.DOMTreeManager.prototype._sendNamedFlowUpdateEvents):
3141
3142 2013-11-07  Timothy Hatcher  <timothy@apple.com>
3143
3144         Fix up some sidebar switching details to make selections persist better.
3145
3146         Translate represented objects between sidebars so the same item can be reselected
3147         as you switch between frames and main reources. Also fix some null checks that are
3148         needed on selectedSidebarPanel.
3149
3150         https://bugs.webkit.org/show_bug.cgi?id=124001
3151
3152         Reviewed by Joseph Pecoraro.
3153
3154         * UserInterface/DebuggerSidebarPanel.js:
3155         (WebInspector.DebuggerSidebarPanel.prototype.treeElementForRepresentedObject): Added. Translate a Frame
3156         representedObject into a main resource representedObject.
3157         * UserInterface/Main.js:
3158         (WebInspector._revealAndSelectRepresentedObjectInNavigationSidebar): Null check selectedSidebarPanel.
3159         (WebInspector._updateNavigationSidebarForCurrentContentView): Fix a logic error to match other code.
3160         allowedNavigationSidebarPanels.length needs to have a length before using contains.
3161         (WebInspector._contentBrowserCurrentContentViewDidChange): Null check selectedSidebarPanel.
3162         * UserInterface/ResourceSidebarPanel.js:
3163         (WebInspector.ResourceSidebarPanel.prototype.treeElementForRepresentedObject): Translate a main resource
3164         representedObject into a Frame representedObject.
3165
3166 2013-11-07  Alexandru Chiculita  <achicu@adobe.com>
3167
3168         Web Inspector: CSS Regions: Removing a content node of a ContentFlow from the DOM will send a 0 nodeId
3169         https://bugs.webkit.org/show_bug.cgi?id=123577
3170
3171         Reviewed by  Timothy Hatcher.
3172
3173         Fixed the content node removal from the content flow.
3174
3175         * UserInterface/ContentFlowTreeContentView.js:
3176         * UserInterface/DOMTreeManager.js:
3177         (WebInspector.DOMTreeManager):
3178         (WebInspector.DOMTreeManager.prototype._createContentFlowFromPayload): Registered all the content nodes
3179         in the _contentNodesToFlowsMap.
3180         (WebInspector.DOMTreeManager.prototype._unbind): Added call to _removeContentNodeFromFlowIfNeeded.
3181         (WebInspector.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Called from _unbind to check
3182         and remove a node from it's parent content flow if needed.
3183         (WebInspector.DOMTreeManager.prototype.unregisteredNamedFlowContentElement):
3184
3185 2013-11-06  Timothy Hatcher  <timothy@apple.com>
3186
3187         Properly null check positionToReveal in ResourceSidebarPanel.prototype.showSourceCode.
3188
3189         https://bugs.webkit.org/show_bug.cgi?id=123921
3190
3191         Reviewed by Joseph Pecoraro.
3192
3193         * UserInterface/ResourceSidebarPanel.js:
3194         (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
3195
3196 2013-11-06  Timothy Hatcher  <timothy@apple.com>
3197
3198         Fix the display of query parameters when the value is missing. 
3199
3200         https://bugs.webkit.org/show_bug.cgi?id=123920
3201
3202         Reviewed by Joseph Pecoraro.
3203
3204         * UserInterface/ResourceDetailsSidebarPanel.js:
3205         (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid):
3206
3207 2013-11-06  Alexandru Chiculita  <achicu@adobe.com>
3208
3209         Web Inspector: CSS Regions: When a flow is clicked the content of flow needs to be displayed
3210         https://bugs.webkit.org/show_bug.cgi?id=122927
3211
3212         Reviewed by Joseph Pecoraro.
3213
3214         ContentFlowTreeContentView is now used to display the content nodes of a ContentFlow. It is
3215         very similar to the DOMTreeContentView class, but can handle multiple root nodes.
3216
3217         * UserInterface/ContentFlowTreeContentView.js: Added.
3218         (WebInspector.ContentFlowTreeContentView):
3219         (WebInspector.ContentFlowTreeContentView.prototype.get selectionPathComponents):
3220         (WebInspector.ContentFlowTreeContentView.prototype.updateLayout):
3221         (WebInspector.ContentFlowTreeContentView.prototype.shown):
3222         (WebInspector.ContentFlowTreeContentView.prototype.hidden):
3223         (WebInspector.ContentFlowTreeContentView.prototype.closed):
3224         (WebInspector.ContentFlowTreeContentView.prototype._selectedNodeDidChange):
3225         (WebInspector.ContentFlowTreeContentView.prototype._pathComponentSelected):
3226         (WebInspector.ContentFlowTreeContentView.prototype._createContentNodeTree):
3227         (WebInspector.ContentFlowTreeContentView.prototype._createContentTrees):
3228         (WebInspector.ContentFlowTreeContentView.prototype._contentNodeWasAdded):
3229         (WebInspector.ContentFlowTreeContentView.prototype._contentNodeWasRemoved):
3230         * UserInterface/ContentView.js:
3231         (WebInspector.ContentView):
3232         (WebInspector.ContentView.isViewable):
3233         * UserInterface/DOMTreeElement.js:
3234         (WebInspector.DOMTreeElement.prototype.ondeselect): We need to remove the selected "dom node"
3235         so that the element is not going to stay selected after the we move to a different DOM tree.
3236         * UserInterface/DOMTreeOutline.js:
3237         (WebInspector.DOMTreeOutline.prototype.selectDOMNode):
3238         * UserInterface/Main.html:
3239         * UserInterface/Main.js:
3240         (WebInspector.sidebarPanelForRepresentedObject):
3241         * UserInterface/ResourceSidebarPanel.js:
3242         (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
3243
3244 2013-11-01  Antoine Quint  <graouts@apple.com>
3245
3246         Remove custom Function.prototype.bind() in favor of native version
3247         https://bugs.webkit.org/show_bug.cgi?id=123608
3248
3249         Reviewed by Joseph Pecoraro.
3250
3251         * UserInterface/Utilities.js:
3252
3253 2013-11-01  Antoine Quint  <graouts@apple.com>
3254
3255         Error trying to serialize a color created without an alpha component to RGBA or HSLA
3256         https://bugs.webkit.org/show_bug.cgi?id=123623
3257
3258         Reviewed by Joseph Pecoraro.
3259
3260         Check whether we have .rgba and .hsla ivars before trying to retrieve them to serialize
3261         the color to RGBA or HSLA format.
3262
3263         * UserInterface/Color.js:
3264         (WebInspector.Color.prototype.toString):
3265
3266 2013-11-01  Antoine Quint  <graouts@apple.com>
3267
3268         Remove custom Element.prototype.remove() in favor of native version
3269         https://bugs.webkit.org/show_bug.cgi?id=123607
3270
3271         Reviewed by Timothy Hatcher.
3272
3273         * UserInterface/Utilities.js:
3274
3275 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3276
3277         Web Inspector: Breakpoints in auto-formatted JavaScript editors are not working
3278         https://bugs.webkit.org/show_bug.cgi?id=123589
3279
3280         Reviewed by Timothy Hatcher.
3281
3282         The internal this._ignoreCodeMirrorContentDidChangeEvent flag was being used
3283         in two places that could be nested, meaning the flag was deleted while it
3284         was still expected to be set. Change it instead to a counter, to handle nesting.
3285
3286         * UserInterface/TextEditor.js:
3287         (WebInspector.TextEditor):
3288         (WebInspector.TextEditor.prototype.set string):
3289         (WebInspector.TextEditor.prototype.set formatted):
3290         (WebInspector.TextEditor.prototype._contentChanged):
3291
3292 2013-10-31  Joseph Pecoraro  <pecoraro@apple.com>
3293
3294         Web Inspector: Remove stale optional native memory instrumentation protocol params
3295         https://bugs.webkit.org/show_bug.cgi?id=123552
3296
3297         Reviewed by Timothy Hatcher.
3298
3299         * UserInterface/InspectorBackendCommands.js:
3300
3301 2013-10-30  Joseph Pecoraro  <pecoraro@apple.com>
3302
3303         Web Inspector: Fix PrettyPrinting Tool Load from Saved URL
3304
3305         Reviewed by Timothy Hatcher.
3306
3307         * Tools/PrettyPrinting/index.html:
3308
3309 2013-10-28  Alexandru Chiculita  <achicu@adobe.com>
3310
3311         Web Inspector: CSS Regions: Add protocol API to expose content nodes addition/removal
3312         https://bugs.webkit.org/show_bug.cgi?id=123424
3313
3314         Reviewed by Timothy Hatcher.
3315
3316         Exposed the new CSS Agent events to the ContentFlow class that will now maintain
3317         a list of nodes in the "contentNodes" property.
3318
3319         * UserInterface/CSSObserver.js:
3320         (WebInspector.CSSObserver.prototype.regionOversetChanged):
3321         (WebInspector.CSSObserver.prototype.registeredNamedFlowContentElement):
3322         (WebInspector.CSSObserver.prototype.unregisteredNamedFlowContentElement):
3323         * UserInterface/ContentFlow.js:
3324         (WebInspector.ContentFlow):
3325         (WebInspector.ContentFlow.prototype.set overset):
3326         (WebInspector.ContentFlow.prototype.get contentNodes):
3327         (WebInspector.ContentFlow.prototype.insertContentNodeBefore):
3328         (WebInspector.ContentFlow.prototype.appendContentNode):
3329         (WebInspector.ContentFlow.prototype.removeContentNode):
3330         * UserInterface/DOMTreeManager.js:
3331         (WebInspector.DOMTreeManager.prototype._createContentFlowFromPayload):
3332         (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
3333         (WebInspector.DOMTreeManager.prototype.regionOversetChanged):
3334         (WebInspector.DOMTreeManager.prototype.registeredNamedFlowContentElement):
3335         (WebInspector.DOMTreeManager.prototype.unregisteredNamedFlowContentElement):
3336         * UserInterface/InspectorBackendCommands.js:
3337
3338 2013-10-25  Joseph Pecoraro  <pecoraro@apple.com>
3339
3340         Web Inspector: PrettyPrinting tool should have save button
3341         https://bugs.webkit.org/show_bug.cgi?id=123371
3342
3343         Reviewed by Timothy Hatcher.
3344
3345         Add buttons to save as a URL to share or to save/clear to
3346         localStorage for easier reloads testing local changes.
3347
3348         * Tools/PrettyPrinting/index.html:
3349
3350 2013-10-25  Joseph Pecoraro  <pecoraro@apple.com>
3351
3352         Web Inspector: Command+Click on url(…) should go to image not source line
3353         https://bugs.webkit.org/show_bug.cgi?id=123362
3354
3355         Reviewed by Timothy Hatcher.
3356
3357         CodeMirror changed "url" from being type "variable-2" to "string-2".
3358
3359         * UserInterface/CodeMirrorAdditions.js:
3360
3361 2013-10-25  Jessie Berlin  <jberlin@apple.com>
3362
3363         Ran update-localizable-strings after changes made in r157947.
3364
3365         Rubber-stamped by Timothy Hatcher.
3366
3367         * Localizations/en.lproj/localizedStrings.js:
3368
3369 2013-10-24  Mark Rowe  <mrowe@apple.com>
3370
3371         Remove references to OS X 10.7 from Xcode configuration settings.
3372
3373         Now that we're not building for OS X 10.7 they're no longer needed.
3374
3375         Reviewed by Anders Carlsson.
3376
3377         * Configurations/Base.xcconfig:
3378         * Configurations/DebugRelease.xcconfig:
3379         * Configurations/Version.xcconfig:
3380
3381 2013-10-24  Mark Rowe  <mrowe@apple.com>
3382
3383         <rdar://problem/15312643> Prepare for the mysterious future.
3384
3385         Reviewed by David Kilzer.
3386
3387         * Configurations/Base.xcconfig:
3388         * Configurations/DebugRelease.xcconfig:
3389         * Configurations/Version.xcconfig:
3390
3391 2013-10-24  Timothy Hatcher  <timothy@apple.com>
3392
3393         Allow editing CSS resources after they have been pretty printed.
3394
3395         https://bugs.webkit.org/show_bug.cgi?id=123297
3396
3397         Reviewed by Joseph Pecoraro.
3398
3399         * UserInterface/TextEditor.js:
3400         (WebInspector.TextEditor): Remove the need for _readOnly.
3401         (WebInspector.TextEditor.prototype.set readOnly): Set CodeMirror readOnly directly.
3402         (WebInspector.TextEditor.prototype.set formatted): Don't call _updateCodeMirrorReadOnly.
3403         (WebInspector.TextEditor.prototype._updateCodeMirrorReadOnly): Removed.
3404         (WebInspector.TextEditor.prototype._contentChanged): Clear _formatted and _formatterSourceMap
3405         on edit and notify the delegate and fire the FormattingDidChange event.
3406
3407 2013-10-24  Timothy Hatcher  <timothy@apple.com>
3408
3409         Adjust the precision of byte strings in Web Inspector.
3410
3411         https://bugs.webkit.org/show_bug.cgi?id=123281
3412
3413         Reviewed by Joseph Pecoraro.
3414
3415         * UserInterface/Utilities.js:
3416         (Number.bytesToString): More precision for MB and less precision for 10..1023 KB.
3417
3418 2013-10-24  Alexandru Chiculita  <achicu@adobe.com>
3419
3420         Web Inspector: Add a way to test the Manager and model classes
3421         https://bugs.webkit.org/show_bug.cgi?id=123223
3422
3423         Reviewed by Timothy Hatcher.
3424
3425         Moved some global functions out of Main.js, so that they can be used in the 
3426         layout tests without including Main.js.
3427
3428         * UserInterface/Main.html: Referenced the new JS files.
3429         * UserInterface/Main.js:
3430         * UserInterface/MessageDispatcher.js: Added.
3431         (WebInspector.dispatchNextQueuedMessageFromBackend):
3432         (WebInspector.dispatchMessageFromBackend):
3433         * UserInterface/URLUtilities.js: Added.
3434         (removeURLFragment):
3435         (relativePath):
3436         (parseURL):
3437         (absoluteURL):
3438         (parseLocationQueryParameters):
3439         (parseQueryString):
3440         (WebInspector.displayNameForURL):
3441         (WebInspector.displayNameForHost):
3442         * UserInterface/Utilities.js:
3443
3444 2013-10-21  Alexandru Chiculita  <achicu@adobe.com>
3445
3446         Web Inspector: [CSS Regions] Flows are not loading if you refresh the page several times
3447         https://bugs.webkit.org/show_bug.cgi?id=123123
3448
3449         Reviewed by Joseph Pecoraro.
3450
3451         There was a typo in the code where an exception was thrown because "flowKey" was undefined.
3452
3453         * UserInterface/DOMTree.js:
3454         (WebInspector.DOMTree.prototype._contentFlowListWasUpdated):
3455
3456 2013-10-21  Oliver Hunt  <oliver@apple.com>
3457
3458         Restore accidentally removed files.
3459
3460         * UserInterface/GoToLineDialog.css: Added.
3461         (.go-to-line-dialog):
3462         (.go-to-line-dialog > div):
3463         (.go-to-line-dialog > div > input):
3464         (.go-to-line-dialog > div > input::-webkit-input-placeholder):
3465         (.go-to-line-dialog > div > img):
3466         (.go-to-line-dialog > div > img:active):
3467         (.go-to-line-dialog.non-empty > div > img):
3468         * UserInterface/GoToLineDialog.js: Added.
3469         (WebInspector.GoToLineDialog):
3470         (WebInspector.GoToLineDialog.prototype.present):
3471         (WebInspector.GoToLineDialog.prototype.dismiss):
3472         (WebInspector.GoToLineDialog.prototype.handleEvent):
3473         (WebInspector.GoToLineDialog.prototype._handleInputEvent):
3474         (WebInspector.GoToLineDialog.prototype._handleKeydownEvent):
3475         (WebInspector.GoToLineDialog.prototype._handleBlurEvent):
3476         (WebInspector.GoToLineDialog.prototype._handleMousedownEvent):
3477         (WebInspector.GoToLineDialog.prototype._handleClickEvent):
3478         (WebInspector.GoToLineDialog.prototype._clear):
3479         * UserInterface/Images/CloseWhite.svg: Added.
3480
3481 2013-10-18  Alexandru Chiculita  <achicu@adobe.com>
3482
3483         Web Inspector: CSS Regions: Add the list of flows in the FrameTreeElement
3484         https://bugs.webkit.org/show_bug.cgi?id=122924
3485
3486         Reviewed by Timothy Hatcher.
3487
3488         Added code to collect the flows from the backend into the DOMTree object
3489         on the frontend. Added ContentFlow to represent the flows on the frontend
3490         side and created ContentFlowTreeElement to display the flows in the FrameTreeElement.
3491
3492         * Localizations/en.lproj/localizedStrings.js:
3493         * Scripts/copy-user-interface-resources.sh:
3494         * UserInterface/CSSObserver.js:
3495         (WebInspector.CSSObserver.prototype.namedFlowCreated):
3496         (WebInspector.CSSObserver.prototype.namedFlowRemoved):
3497         (WebInspector.CSSObserver.prototype.regionLayoutUpdated):
3498         (WebInspector.CSSObserver.prototype.regionOversetChanged):
3499         * UserInterface/ContentFlow.js: Added.
3500         (WebInspector.ContentFlow):
3501         (WebInspector.ContentFlow.prototype.get id):
3502         (WebInspector.ContentFlow.prototype.get documentNodeIdentifier):
3503         (WebInspector.ContentFlow.prototype.get name):
3504         (WebInspector.ContentFlow.prototype.get overset):
3505         (WebInspector.ContentFlow.prototype.set overset):
3506         * UserInterface/ContentFlowIcon.css: Added.
3507         (.content-flow-icon .icon):
3508         * UserInterface/ContentFlowTreeElement.js: Added.
3509         (WebInspector.ContentFlowTreeElement):
3510         * UserInterface/DOMTree.js:
3511         (WebInspector.DOMTree):
3512         (WebInspector.DOMTree.prototype.get flowMap):
3513         (WebInspector.DOMTree.prototype.get flowsCount):
3514         (WebInspector.DOMTree.prototype._framePageExecutionContextChanged):
3515         (WebInspector.DOMTree.prototype.requestContentFlowList):
3516         (WebInspector.DOMTree.prototype._isContentFlowInCurrentDocument):
3517         (WebInspector.DOMTree.prototype._contentFlowListWasUpdated):
3518         (WebInspector.DOMTree.prototype._contentFlowWasAdded):
3519         (WebInspector.DOMTree.prototype._contentFlowWasRemoved):
3520         * UserInterface/DOMTreeManager.js:
3521         (WebInspector.DOMTreeManager):
3522         (WebInspector.DOMTreeManager._flowPayloadHashKey):
3523         (WebInspector.DOMTreeManager.prototype._buildHighlightConfig):
3524         (WebInspector.DOMTreeManager.prototype._createContentFlowFromPayload):
3525         (WebInspector.DOMTreeManager.prototype._updateContentFlowFromPayload):
3526         (WebInspector.DOMTreeManager.prototype.getNamedFlowCollection):
3527         (WebInspector.DOMTreeManager.prototype.namedFlowCreated):
3528         (WebInspector.DOMTreeManager.prototype.namedFlowRemoved):
3529         (WebInspector.DOMTreeManager.prototype._sendNamedFlowUpdateEvents):
3530         (WebInspector.DOMTreeManager.prototype.regionLayoutUpdated):
3531         (WebInspector.DOMTreeManager.prototype.regionOversetChanged):
3532         * UserInterface/FrameTreeElement.js:
3533         (WebInspector.FrameTreeElement):
3534         (WebInspector.FrameTreeElement.prototype.onpopulate):
3535         (WebInspector.FrameTreeElement.prototype.onexpand):
3536         (WebInspector.FrameTreeElement.prototype._childContentFlowWasAdded):
3537         (WebInspector.FrameTreeElement.prototype._childContentFlowWasRemoved):
3538         (WebInspector.FrameTreeElement.prototype._rootDOMNodeInvalidated):
3539         (WebInspector.FrameTreeElement.prototype._addChildForRepresentedObject):
3540         (WebInspector.FrameTreeElement.prototype._removeChildForRepresentedObject):
3541         (WebInspector.FrameTreeElement.prototype._addTreeElementForRepresentedObject):
3542         (WebInspector.FrameTreeElement.prototype._compareResourceTreeElements):
3543         (WebInspector.FrameTreeElement.prototype._insertResourceTreeElement):
3544         (WebInspector.FrameTreeElement.prototype._parentTreeElementForRepresentedObject):
3545         (WebInspector.FrameTreeElement.prototype._shouldGroupIntoFolders):
3546         * UserInterface/Images/ContentFlow.svg: Added.
3547         * UserInterface/Main.html:
3548         * UserInterface/ResourceSidebarPanel.js:
3549         (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected):
3550
3551 2013-10-17  Antoine Quint  <graouts@apple.com>
3552
3553         Web Inspector: Go to line keyboard command and dialog
3554         https://bugs.webkit.org/show_bug.cgi?id=122893
3555
3556         Reviewed by Timothy Hatcher.
3557
3558         Add a text input over source code text editors, centered within the width of the editor
3559         and towards the top of the editor, upon pressing Command+L or Control+G to match the
3560         behavior in Chrome.
3561
3562         * Localizations/en.lproj/localizedStrings.js:
3563         New localized string "Line Number".
3564
3565         * UserInterface/GoToLineDialog.css: Added.
3566         Styling for the go-to-line dialog.
3567
3568         * UserInterface/GoToLineDialog.js: Added.
3569         (WebInspector.GoToLineDialog):
3570         Generate the DOM structure for the dialog.
3571
3572         (WebInspector.GoToLineDialog.prototype.present):
3573         Present the dialog as a child of a parent element. The dialog's text field automatically
3574         gets focus and resets to be empty.
3575
3576         (WebInspector.GoToLineDialog.prototype.dismiss):
3577         Dismiss the dialog if visible, this triggers the goToLineDialogWasDismissed delegate method.
3578
3579         (WebInspector.GoToLineDialog.prototype.handleEvent):
3580         Route the various events registered in the dialog's DOM tree: input, keydown, blur, mousedown
3581         and click.
3582
3583         (WebInspector.GoToLineDialog.prototype._handleInputEvent):
3584         Update the "non-empty" class on the dialog's element depending on the content of the dialog's
3585         text field. If there is content in the text field, this will make the clear icon visible.
3586
3587         (WebInspector.GoToLineDialog.prototype._handleKeydownEvent):
3588         If the Esc. key is pressed when there is text in the dialog's input field, clear the input field.
3589         If no text is in the input field, dismiss the input field. When the Enter key is pressed, we call
3590         the isGoToLineDialogValueValid() method on the delegate to figure out if the text field value is
3591         valid. If it's not, we select the text field value so that it may be easily replaced and play
3592         en error sound. If it's valid, we call the goToLineDialogValueWasValidated() delegate method
3593         and dismiss the dialog.
3594
3595         (WebInspector.GoToLineDialog.prototype._handleBlurEvent):
3596         Dismiss the dialog when its text field loses focus. This ensures that clicking anywhere outside
3597         of the dialog removes it from display.
3598
3599         (WebInspector.GoToLineDialog.prototype._handleMousedownEvent):
3600         Upon pressing the mouse down on the clear icon, select the entire text field content (matches
3601         the behavior of Xcode) and prevent the default event action that would blur the text field
3602         which would dismiss the dialog.
3603
3604         (WebInspector.GoToLineDialog.prototype._handleClickEvent):
3605         Clear the content of the dialog's text field upon clicking on its clear button.
3606
3607         (WebInspector.GoToLineDialog.prototype._clear):
3608         Reset the dialog's text field's value to an empty string and remove the "non-empty" CSS class name
3609         controlling the display of the clear button.
3610
3611         * UserInterface/Images/CloseWhite.svg: Added.
3612         Variation of the Close.svg icon with a white cross.
3613
3614         * UserInterface/Main.html:
3615         Link to the newly added resources for GoToLineDialog.
3616
3617         * UserInterface/SourceCodeTextEditor.js:
3618         (WebInspector.SourceCodeTextEditor):
3619         Register the Command+L and Control+G keyboard shortcuts to bring up the go-to-line dialog.
3620
3621         (WebInspector.SourceCodeTextEditor.prototype.showGoToLineDialog):
3622         Method called upon pressing the Command+L and Control+G keyboard shorcuts creating an instance
3623         of a GoToDialog if necessary, becoming its delegate and presenting it in the context of the
3624         editor's root element.
3625
3626         (WebInspector.SourceCodeTextEditor.prototype.isGoToLineDialogValueValid):
3627         Delegate method called to validate the line number presently set in the go-to-dialog's text field,
3628         checking it's a number between 1 and the number of lines in the source code.
3629
3630         (WebInspector.SourceCodeTextEditor.prototype.goToLineDialogValueWasValidated):
3631         Delegate method called when the line number set in the go-to-dialog's text field has been validated.
3632         We reveal and select the line at the number provided.
3633
3634         (WebInspector.SourceCodeTextEditor.prototype.goToLineDialogWasDismissed):
3635         Ensure the source code editor regains focus upon dismissing the go-to-dialog.
3636
3637         * UserInterface/TextEditor.js:
3638         (WebInspector.TextEditor.prototype.revealPosition):
3639         Add a new opt-in option to not highlight the revealed position. The code in goToLineDialogValueWasValidated()
3640         sets that new flag to true to avoid an unnecessary highlight on top of the selection.
3641
3642         (WebInspector.TextEditor.prototype.get lineCount):
3643         Expose the lineCount() method on the private CodeMirror instance.
3644
3645         (WebInspector.TextEditor.prototype.focus):
3646         Expose the focus() method on the private CodeMirror instance.
3647
3648 2013-10-17  Antoine Quint  <graouts@apple.com>
3649
3650         Web Inspector: logged objects are highlighted in blue
3651         https://bugs.webkit.org/show_bug.cgi?id=122897
3652
3653         Reviewed by Joseph Pecoraro.
3654
3655         Switch to using the system highlight color for the background selected messages.
3656         Also removing SVG assets no longer needed since we won't be showing white prompt
3657         and result icons anymore as well as a few generated canvas states.
3658
3659         * UserInterface/Images/UserInputPromptPreviousSelected.svg: Removed.
3660         * UserInterface/Images/UserInputResultSelected.svg: Removed.
3661         * UserInterface/LogContentView.css:
3662         (.console-messages:focus .console-item.selected):
3663         * UserInterface/Main.js:
3664         (WebInspector._generateDisclosureTriangleImages):
3665
3666 2013-10-17  Antoine Quint  <graouts@apple.com>
3667
3668         Web Inspector: allow front-end to trigger the system beep sound to signal an error
3669         https://bugs.webkit.org/show_bug.cgi?id=122955
3670
3671         Reviewed by Timothy Hatcher.
3672
3673         Provide a stub method for the new InspectorFrontendHost.beep() method.
3674
3675         * UserInterface/InspectorFrontendHostStub.js:
3676         (WebInspector.InspectorFrontendHostStub.prototype.beep):
3677
3678 2013-10-15  Antoine Quint  <graouts@apple.com>
3679
3680         Web Inspector: can't select text inside a text node
3681         https://bugs.webkit.org/show_bug.cgi?id=122828
3682
3683         Reviewed by Timothy Hatcher.
3684
3685         Cancel the default user interaction when a drag action starts if the
3686         element is being edited.
3687
3688         * UserInterface/DOMTreeElement.js:
3689         (WebInspector.DOMTreeElement.prototype.onattach):
3690         (WebInspector.DOMTreeElement.prototype.handleEvent):
3691
3692 2013-10-10  Brian J. Burg  <burg@cs.washington.edu>
3693
3694         Web Inspector: content views and managers should save/restore view state.
3695         https://bugs.webkit.org/show_bug.cgi?id=122546
3696
3697         To restore the same content view and sidebars when re-opening the
3698         inspector, a cookie is saved whenever a new content view is shown
3699         in the main content browser. Previously, this cookie was created
3700         and restored using navigation sidebar-specific logic. This has two
3701         major flaws: non-default sidebars for a represented object are not
3702         restored correctly; and it centralizes storage of view-specific
3703         state such as subview selections.
3704
3705         This patch adds ContentView methods for saving a key for the
3706         view's represented object, and saving/restoring any view-specific
3707         state as the view is shown. The 'type' field of the cookie
3708         specifies the manager which deserializes the cookie into a
3709         represented object.
3710
3711         Reviewed by Timothy Hatcher.
3712
3713         * UserInterface/ApplicationCacheFrameContentView.js:
3714         (WebInspector.ApplicationCacheFrameContentView):
3715         (WebInspector.ApplicationCacheFrameContentView.prototype.saveToCookie):
3716         (WebInspector.ApplicationCacheFrameContentView.prototype._maybeUpdate):
3717         (WebInspector.ApplicationCacheFrameContentView.prototype._updateStatus):
3718         (WebInspector.ApplicationCacheFrameContentView.prototype.updateStatus):
3719         (WebInspector.ApplicationCacheFrameContentView.prototype._updateCallback):
3720         * UserInterface/ApplicationCacheManager.js:
3721         (WebInspector.ApplicationCacheManager.prototype.networkStateUpdated):
3722         (WebInspector.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
3723         (WebInspector.ApplicationCacheManager.prototype.):
3724         (WebInspector.ApplicationCacheManager.prototype.requestApplicationCache):
3725         (WebInspector.ApplicationCacheManager.prototype.objectForCookie):
3726         (WebInspector.ApplicationCacheManager.prototype._manifestForFrameLoaded):
3727         (WebInspector.ApplicationCacheManager.prototype._framesWithManifestsLoaded):
3728         (WebInspector.ApplicationCacheManager.prototype._frameManifestUpdated):
3729         * UserInterface/BackForwardEntry.js:
3730         (WebInspector.BackForwardEntry):
3731         (WebInspector.BackForwardEntry.prototype._restoreFromCookie):
3732         * UserInterface/ContentBrowser.js:
3733         (WebInspector.ContentBrowser.prototype.showContentViewForRepresentedObject):
3734         (WebInspector.ContentBrowser.prototype.showContentView):
3735         * UserInterface/ContentView.js:
3736         (WebInspector.ContentView.prototype.saveToCookie):
3737         (WebInspector.ContentView.prototype.restoreFromCookie):
3738         * UserInterface/ContentViewContainer.js:
3739         (WebInspector.ContentViewContainer.prototype.showContentView):
3740         * UserInterface/CookieStorageContentView.js:
3741         (WebInspector.CookieStorageContentView.prototype.update):
3742         (WebInspector.CookieStorageContentView.prototype.saveToCookie):
3743         (WebInspector.CookieStorageContentView.prototype._rebuildTable):
3744         (WebInspector.CookieStorageContentView.prototype._filterCookies):
3745         * UserInterface/DOMStorageContentView.js:
3746         (WebInspector.DOMStorageContentView.prototype.saveToCookie):
3747         * UserInterface/DatabaseContentView.js:
3748         (WebInspector.DatabaseContentView.prototype.saveToCookie):
3749         (WebInspector.DatabaseContentView.prototype._messagesClicked):
3750         * UserInterface/DatabaseTableContentView.js:
3751         (WebInspector.DatabaseTableContentView):
3752         (WebInspector.DatabaseTableContentView.prototype.saveToCookie):
3753         * UserInterface/FrameContentView.js:
3754         (WebInspector.FrameContentView.prototype.saveToCookie):
3755         (WebInspector.FrameContentView.prototype.restoreFromCookie):
3756         * UserInterface/FrameResourceManager.js:
3757         (WebInspector.FrameResourceManager.prototype.objectForCookie):
3758         * UserInterface/InstrumentSidebarPanel.js:
3759         (WebInspector.InstrumentSidebarPanel):
3760         (WebInspector.InstrumentSidebarPanel.prototype.showTimeline):
3761         (WebInspector.InstrumentSidebarPanel.prototype.shown):
3762         (WebInspector.InstrumentSidebarPanel.prototype._timelinesTreeElementSelected):
3763         * UserInterface/Main.js:
3764         (WebInspector.loaded):
3765         (WebInspector.contentLoaded):
3766         (WebInspector.openURL):
3767         (WebInspector._updateCurrentContentViewCookie):
3768         (WebInspector._showContentViewForCookie.lastAttemptToRestoreFromCookie):
3769         (WebInspector._showContentViewForCookie):
3770         (WebInspector._resolveAndShowPendingContentViewCookie.delayedWork):
3771         (WebInspector._resolveAndShowPendingContentViewCookie):
3772         (WebInspector.elementDragStart):
3773         (WebInspector.elementDragEnd):
3774         (WebInspector.createMessageTextView):
3775         (WebInspector.linkifyStringAsFragment):
3776         * UserInterface/NavigationSidebarPanel.js:
3777         * UserInterface/ResourceClusterContentView.js:
3778         (WebInspector.ResourceClusterContentView.prototype.saveToCookie):
3779         (WebInspector.ResourceClusterContentView.prototype.restoreFromCookie):
3780         * UserInterface/ResourceSidebarPanel.js:
3781         (WebInspector.ResourceSidebarPanel.prototype.showSourceCode):
3782         (WebInspector.ResourceSidebarPanel.prototype._mainFrameDidChange):
3783         (WebInspector.ResourceSidebarPanel.prototype._domStorageObjectWasAdded):
3784         (WebInspector.ResourceSidebarPanel.prototype._databaseWasAdded):
3785         (WebInspector.ResourceSidebarPanel.prototype._cookieStorageObjectWasAdded):
3786         (WebInspector.ResourceSidebarPanel.prototype._frameManifestAdded):
3787         * UserInterface/ScriptContentView.js:
3788         (WebInspector.ScriptContentView.prototype.saveToCookie):
3789         (WebInspector.ScriptContentView.prototype.restoreFromCookie):
3790         * UserInterface/StorageManager.js:
3791         (WebInspector.StorageManager.prototype.findMatchingObjectInArray):
3792         (WebInspector.StorageManager.prototype.objectForCookie):
3793         * UserInterface/TimelineManager.js:
3794         (WebInspector.TimelineManager):
3795         (WebInspector.TimelineManager.prototype.get timelines):
3796         (WebInspector.TimelineManager.prototype.objectForCookie):
3797         * UserInterface/TimelinesContentView.js:
3798         (WebInspector.TimelinesContentView.prototype.saveToCookie):
3799         (WebInspector.TimelinesContentView.prototype.restoreFromCookie):
3800         (WebInspector.TimelinesContentView.prototype._makeColumnScopeBar):
3801
3802 2013-10-10  Mark Rowe  <mrowe@apple.com>
3803
3804         <rdar://problem/13341666> WebKit should always build against an SDK.
3805
3806         Have all projects default to building against the OS X Internal SDK for the Production
3807         configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
3808         to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
3809
3810         Reviewed by Dan Bernstein.
3811
3812         * Configurations/Base.xcconfig:
3813         * Configurations/DebugRelease.xcconfig:
3814
3815 2013-10-04  Antoine Quint  <graouts@apple.com>
3816
3817         Web Inspector: pressing the Cmd key over a CSS property should underline it immediately (jump to definition mode)
3818         https://bugs.webkit.org/show_bug.cgi?id=119012
3819
3820         Reviewed by Joseph Pecoraro.
3821
3822         We add an "enabled" state to the tokenTrackingController to indicate that we're interested
3823         in tracking hovered tokens. The tokenTrackingController is now only enabled in the
3824         CSSStyleDeclarationTextEditor when the Cmd key is pressed and in the SourceCodeTextEditor
3825         when either the Cmd key is pressed (NonSymbolTokens mode) or when the debugger is paused
3826         (JavaScriptExpression mode).
3827         
3828         The tokenTrackingController is now smarter about how it tracks mouse events when it's enabled,
3829         tracking "mouseenter" and "mousele