Web Inspector: debugger popover should have source location link when showing functio...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2015-12-10  Matt Baker  <mattbaker@apple.com>
2
3         Web Inspector: debugger popover should have source location link when showing function source
4         https://bugs.webkit.org/show_bug.cgi?id=151866
5
6         Reviewed by Brian Burg.
7
8         Added source code location link to function popover header.
9
10         * UserInterface/Views/SourceCodeTextEditor.js:
11         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
12         Create source code location link from response payload.
13         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
14
15 2015-12-10  Nikita Vasilyev  <nvasilyev@apple.com>
16
17         Web Inspector: [Meta] Unify z-index values in Inspector's CSS
18         https://bugs.webkit.org/show_bug.cgi?id=151978
19
20         Introduce CSS variables for z-index due to recurring issues with incorrectly overlapping elements.
21
22         From now on, all z-index values >= 64 must be defined as variables.
23         Values below 64 must not.
24
25         Reviewed by Timothy Hatcher.
26
27         * UserInterface/Views/Variables.css:
28         (:root):
29         Introduce z-index variables.
30
31         * UserInterface/Debug/UncaughtExceptionReporter.css:
32         (.sheet-container):
33         * UserInterface/Views/BoxModelDetailsSectionRow.css:
34         (.details-section .row.box-model .editing):
35         * UserInterface/Views/CompletionSuggestionsView.css:
36         (.completion-suggestions):
37         * UserInterface/Views/DashboardContainerView.css:
38         (.dashboard-container .advance-arrow):
39         * UserInterface/Views/DataGrid.css:
40         (.data-grid .resizer):
41         * UserInterface/Views/DetailsSection.css:
42         (.details-section > .header):
43         (.details-section .details-section > .header):
44         * UserInterface/Views/FindBanner.css:
45         (.find-banner):
46         (.find-banner > button.segmented:active):
47         * UserInterface/Views/Main.css:
48         (#docked-resizer):
49         (.message-text-view):
50         (.bouncy-highlight):
51         * UserInterface/Views/Popover.css:
52         (.popover):
53         * UserInterface/Views/Resizer.css:
54         (.resizer):
55         (.glass-pane-for-drag):
56         * UserInterface/Views/TimelineOverview.css:
57         (.timeline-overview > .scroll-container):
58         * UserInterface/Views/VisualStyleSelectorSection.css:
59         (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
60
61 2015-12-09  Matt Baker  <mattbaker@apple.com>
62
63         Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
64         https://bugs.webkit.org/show_bug.cgi?id=151876
65
66         Reviewed by Brian Burg.
67
68         * UserInterface/Base/Main.js:
69         Use root view singleton instead of creating it explicitly.
70
71         * UserInterface/Views/View.js:
72         (WebInspector.View):
73         (WebInspector.View.rootView):
74         Singleton root view access. Lazily create and return a view backed
75         by the document's body element.
76         (WebInspector.View.prototype.isDescendantOf):
77         (WebInspector.View.prototype.insertSubviewBefore):
78         (WebInspector.View.prototype.removeSubview):
79         (WebInspector.View.prototype.didMoveToWindow):
80         Notify the view when it becomes, or is no longer, descended from the root view.
81         (WebInspector.View.prototype.didMoveToParent):
82         Notify the view when it's added to, or removed from, a parent view.
83         (WebInspector.View._scheduleLayoutForView):
84         (WebInspector.View._cancelScheduledLayoutForView):
85         (WebInspector.View.prototype.makeRootView): Deleted.
86         No longer needed.
87         (WebInspector.View.prototype.didAttach): Deleted.
88         (WebInspector.View.prototype.didDetach): Deleted.
89         Replaced by didMoveToParent.
90
91 2015-12-09  Brian Burg  <bburg@apple.com>
92
93         Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
94         https://bugs.webkit.org/show_bug.cgi?id=151635
95
96         Reviewed by Timothy Hatcher.
97
98         When closing and reopening the inspector, the setting for whether
99         to dump protocol messages should be persisted. Otherwise, enabling
100         dumping from the debug-only UI will miss the initial flood of
101         messages that are processed when the Inspector loads initial data.
102
103         To support a persistent setting, and build some infrastructure for
104         more advanced uses of collected protocol messages, this patch adds
105         a new object to trace protocol events. It gets callbacks for each
106         and implements the console-dumping functionality previously baked in
107         to InspectorBackend.
108
109         In follow-up patches, other protocol tracers will be added to save
110         protocol data to disk, marshall it to a higher inspection level,
111         or provide more fine-grained control over what is logged.
112
113         This change moves Setting.js into the Base/ directory,
114         since it is used by Views, Models, and now Protocol classes.
115
116         * UserInterface/Base/Setting.js: Renamed from Source/WebInspectorUI/UserInterface/Models/Setting.js.
117         (WebInspector.Setting):
118         (WebInspector.Setting.prototype.get name):
119         (WebInspector.Setting.prototype.get value):
120         (WebInspector.Setting.prototype.set value):
121         * UserInterface/Main.html:
122         * UserInterface/Protocol/InspectorBackend.js:
123         (InspectorBackendClass):
124         (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
125         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
126
127             We still want to support the legacy way to enable dumping:
128             `InspectorBackend.dumpInspectorProtocolMessages = true`. This
129             is because some tests always use it, and it's easier to set this
130             flag in a custom Bootstrap.js file than to configure the Setting.
131
132         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
133         (InspectorBackendClass.prototype.get dumpInspectorTimeStats):
134
135             We still want to support the legacy way to enable dumping:
136             `InspectorBackend.dumpInspectorTimeStats = true`. This is
137             because MessageDispatcher checks this flag for its logging.
138
139         (InspectorBackendClass.prototype.set activeTracer):
140         (InspectorBackendClass.prototype.get activeTracer):
141
142             Set the active tracer, finalizing and removing any active tracer
143             if one exists. If removing a custom tracer (setting to null), then
144             re-sync activeTracer with the automatic tracing Setting.
145
146         (InspectorBackendClass.prototype.dispatch):
147         (InspectorBackendClass.prototype._startOrStopAutomaticTracing):
148
149             Sync the Setting with activeTracer. If an custom tracer is active,
150             don't replace it with the automatic logging tracer.
151
152         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
153         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
154         (InspectorBackendClass.prototype._sendMessageToBackend):
155         (InspectorBackendClass.prototype._dispatchResponse):
156         (InspectorBackendClass.prototype._dispatchEvent):
157         (InspectorBackendClass.prototype._flushPendingScripts):
158         * UserInterface/Protocol/LoggingProtocolTracer.js: Added.
159         (WebInspector.LoggingProtocolTracer):
160         (WebInspector.LoggingProtocolTracer.prototype.set dumpMessagesToConsole):
161         (WebInspector.LoggingProtocolTracer.prototype.get dumpMessagesToConsole):
162         (WebInspector.LoggingProtocolTracer.prototype.set dumpTimingDataToConsole):
163         (WebInspector.LoggingProtocolTracer.prototype.get dumpTimingDataToConsole):
164         (WebInspector.LoggingProtocolTracer.prototype.logFrontendException):
165         (WebInspector.LoggingProtocolTracer.prototype.logProtocolError):
166         (WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
167         (WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
168         (WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
169         (WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
170         (WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
171         (WebInspector.LoggingProtocolTracer.prototype._processEntry):
172         * UserInterface/Protocol/ProtocolTracer.js: Added.
173         (WebInspector.ProtocolTracer.prototype.logStarted):
174         (WebInspector.ProtocolTracer.prototype.logFrontendException):
175         (WebInspector.ProtocolTracer.prototype.logProtocolError):
176         (WebInspector.ProtocolTracer.prototype.logFrontendRequest):
177         (WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
178         (WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
179         (WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
180         (WebInspector.ProtocolTracer.prototype.logDidHandleEvent):        (WebInspector.ProtocolTracer.prototype.logFinished):
181         (WebInspector.ProtocolTracer):
182         * UserInterface/Test.html:
183
184 2015-12-09  Brian Burg  <bburg@apple.com>
185
186         Web Inspector: zoom with Ctrl +/- doesn't work correctly when inspector is docked
187         https://bugs.webkit.org/show_bug.cgi?id=152076
188
189         Reviewed by Timothy Hatcher.
190
191         When computing the new width or height of the inspector, take the zoom level into
192         account. window.inner{Width,Height} are in document pixels, but we need to specify
193         device pixels to InspectorFrontendHost.
194
195         * UserInterface/Base/Main.js:
196
197 2015-12-08  Joseph Pecoraro  <pecoraro@apple.com>
198
199         Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
200         https://bugs.webkit.org/show_bug.cgi?id=152031
201
202         Reviewed by Timothy Hatcher.
203
204         * UserInterface/Views/TimelineOverviewGraph.js:
205         (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
206         Workaround an existing arrow function issue by moving off of arrow functions here.
207
208 2015-12-08  Matt Baker  <mattbaker@apple.com>
209
210         Web Inspector: Add a hidden property to TreeOutline
211         https://bugs.webkit.org/show_bug.cgi?id=152014
212
213         Reviewed by Timothy Hatcher.
214
215         * UserInterface/Views/NavigationSidebarPanel.js:
216         Removed static property for "hidden" CSS class. No longer used.
217         (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
218         Fixed bug in order of visibleTreeOutlines add/remove.
219         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
220
221         * UserInterface/Views/TimelineSidebarPanel.js:
222         (WebInspector.TimelineSidebarPanel):
223         (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
224
225         * UserInterface/Views/TreeOutline.js:
226         (WebInspector.TreeOutline):
227         (WebInspector.TreeOutline.prototype.get hidden):
228         (WebInspector.TreeOutline.prototype.set hidden):
229         Added hidden property, set DOM element hidden attribute.
230         (WebInspector.TreeElement.prototype.set hidden):
231         Remove CSS class, set DOM element hidden attribute.
232         (WebInspector.TreeElement.prototype._attach):
233         (WebInspector.TreeElement.prototype.expand):
234
235 2015-12-08  Matt Baker  <mattbaker@apple.com>
236
237         Web Inspector: Global Breakpoints should always be visible
238         https://bugs.webkit.org/show_bug.cgi?id=151066
239
240         Reviewed by Timothy Hatcher.
241
242         * UserInterface/Views/DebuggerSidebarPanel.js:
243         (WebInspector.DebuggerSidebarPanel):
244         Turn off filtering for Global Breakpoints elements.
245
246         * UserInterface/Views/NavigationSidebarPanel.js:
247         (WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
248         Allow filtering to be turned off for specific tree elements.
249         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
250         Make element visible if filtering suppressed.
251         (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
252         Visible elements with filtering disabled aren't considered when
253         showing/hiding the empty content placeholder.
254
255 2015-12-07  Brian Burg  <bburg@apple.com>
256
257         Web Inspector: Uncaught Exception page should have better styles and handle more error cases
258         https://bugs.webkit.org/show_bug.cgi?id=151923
259
260         Reviewed by Timothy Hatcher.
261
262         Restructure the Uncaught Exception reporting page to act more like
263         a modal sheet. Distinguish between uncaught exceptions before and
264         after the frontend is initially loaded. If the frontend is loaded,
265         add a clickable link that dismisses the sheet and ignores the error.
266         If the inspector finished loading, then only show at most one
267         exception at a time, since subsequent interactions can cause spurious
268         errors when the sheet is active.
269
270         Split existing code into multiple functions so it's easier to follow.
271         Add miscellaneous guards against internal corruption and weird cases.
272
273         * UserInterface/Base/Main.js:
274         (WebInspector.contentLoaded): Store the flag on the global object
275         in case WebInspector becomes shadowed or otherwise unusable.
276
277         * UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css.
278         (div.sheet-container):
279         (div.uncaught-exception-sheet):
280         (div.uncaught-exception-sheet a):
281         (div.uncaught-exception-sheet a:active):
282         (div.uncaught-exception-sheet h2):
283         (div.uncaught-exception-sheet h1 > img):
284         (div.uncaught-exception-sheet h2 > img):
285         (div.uncaught-exception-sheet dl):
286         (div.uncaught-exception-sheet dt):
287         (div.uncaught-exception-sheet dd):
288         (div.uncaught-exception-sheet ul):
289         (div.uncaught-exception-sheet li):
290         * UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js.
291         (stopEventPropagation): Allow clicking whitelisted links on the sheet.
292         (blockEventHandlers):
293         (unblockEventHandlers):
294         (handleUncaughtException):
295         (dismissErrorSheet):
296         (createErrorSheet.insertWordBreakCharacters):
297         (createErrorSheet):
298         (handleLinkClick):
299         * UserInterface/Main.html:
300         * UserInterface/Protocol/MessageDispatcher.js:
301         (WebInspector.dispatchMessageFromBackend): Don't try to dispatch
302         messages from the backend when showing the error sheet. They will
303         probably fail, so suspend dispatching until the sheet is dismissed.
304
305 2015-12-06  Devin Rousso  <dcrousso+webkit@gmail.com>
306
307         Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken
308         https://bugs.webkit.org/show_bug.cgi?id=151924
309
310         Reviewed by Brian Burg.
311
312         * UserInterface/Views/VisualStyleSelectorSection.js:
313         (WebInspector.VisualStyleSelectorSection):
314         (WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
315         Now uses an event listener instead of an "onselect" function.
316
317 2015-12-06  Matt Baker  <mattbaker@apple.com>
318
319         Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc")
320         https://bugs.webkit.org/show_bug.cgi?id=151910
321
322         Reviewed by Timothy Hatcher.
323
324         Updated setters that use default values to convert falsy inputs to the default value
325         before compariing against the current value.
326
327         * UserInterface/Models/TimelineMarker.js:
328         (WebInspector.TimelineMarker.prototype.set time):
329         Assert new value is a number.
330
331         * UserInterface/Views/DataGrid.js:
332         (WebInspector.DataGridNode.prototype.set hidden):
333         (WebInspector.DataGridNode.prototype.set data):
334         Assert new value is of type object. Use shallowEqual compare before setting value.
335
336         * UserInterface/Views/GeneralTreeElement.js:
337         (WebInspector.GeneralTreeElement.prototype.set classNames):
338         Use shallowEqual compare before setting value.
339         (WebInspector.GeneralTreeElement.prototype.set mainTitle):
340         (WebInspector.GeneralTreeElement.prototype.set subtitle):
341         (WebInspector.GeneralTreeElement.prototype.set status):
342         (WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
343
344         * UserInterface/Views/TimelineOverview.js:
345         (WebInspector.TimelineOverview.prototype.set startTime):
346         (WebInspector.TimelineOverview.prototype.set currentTime):
347         (WebInspector.TimelineOverview.prototype.set endTime):
348         (WebInspector.TimelineOverview.prototype.set scrollStartTime):
349         (WebInspector.TimelineOverview.prototype.set selectionStartTime):
350         Check current ruler selectionStartTime before setting value.
351
352         * UserInterface/Views/TimelineOverviewGraph.js:
353         (WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
354         (WebInspector.TimelineOverviewGraph.prototype.set startTime):
355         (WebInspector.TimelineOverviewGraph.prototype.set endTime):
356         (WebInspector.TimelineOverviewGraph.prototype.set currentTime):
357
358         * UserInterface/Views/TimelineRuler.js:
359         (WebInspector.TimelineRuler):
360         (WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
361         (WebInspector.TimelineRuler.prototype.set formatLabelCallback):
362         (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
363         (WebInspector.TimelineRuler.prototype.set zeroTime):
364         (WebInspector.TimelineRuler.prototype.set startTime):
365         (WebInspector.TimelineRuler.prototype.set endTime):
366         (WebInspector.TimelineRuler.prototype.set secondsPerPixel):
367         (WebInspector.TimelineRuler.prototype.set selectionStartTime):
368         (WebInspector.TimelineRuler.prototype.set selectionEndTime):
369         (WebInspector.TimelineRuler.prototype.set duration): Deleted.
370         The ruler duration and "pinned" state are controlled by setting an end
371         time. Removed since it wasn't being used, and there shouldn't be two
372         ways to the exact same thing.
373
374         * UserInterface/Views/TimelineView.js:
375         (WebInspector.TimelineView.prototype.set zeroTime):
376         (WebInspector.TimelineView.prototype.set startTime):
377         (WebInspector.TimelineView.prototype.set endTime):
378
379 2015-12-04  Commit Queue  <commit-queue@webkit.org>
380
381         Unreviewed, rolling out r193486.
382         https://bugs.webkit.org/show_bug.cgi?id=151904
383
384         Causes Infinite Recursion in Timeline Recording (Requested by
385         JoePeck on #webkit).
386
387         Reverted changeset:
388
389         "Web Inspector: when a marked-dirty subview is attached to a
390         parent View, dirtyDescendantsCount gets out of sync"
391         https://bugs.webkit.org/show_bug.cgi?id=151876
392         http://trac.webkit.org/changeset/193486
393
394 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
395
396         Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
397         https://bugs.webkit.org/show_bug.cgi?id=151896
398
399         Reviewed by Timothy Hatcher.
400
401         * UserInterface/Base/Main.js:
402         (WebInspector.contentLoaded):
403         Do not implicitly prevent default on these keyboard shortcuts
404         so we can system beep if we do not do anything.
405
406         (WebInspector._reloadPage):
407         (WebInspector._reloadPageIgnoringCache):
408         Bail if there is no PageAgent without preventing default for
409         a beep system beep. Prevent default if we did something.
410
411 2015-12-04  Matt Baker  <mattbaker@apple.com>
412
413         Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
414         https://bugs.webkit.org/show_bug.cgi?id=151876
415
416         Reviewed by Brian Burg.
417
418         * UserInterface/Views/NewTabContentView.js:
419         (WebInspector.NewTabContentView.prototype._updateShownTabs):
420         Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594.
421
422         * UserInterface/Views/View.js:
423         (WebInspector.View._scheduleLayoutForView):
424         Always perform a synchronous layout when a view that isn't descended from the
425         root view schedules a layout.
426
427 2015-12-04  Brian Burg  <bburg@apple.com>
428
429         Web Inspector: support runtime registration of tab type associations
430         https://bugs.webkit.org/show_bug.cgi?id=151594
431
432         Reviewed by Joseph Pecoraro.
433
434         We want to add special tabs that only exist in engineering builds
435         for debugging purposes. Though the relevant models and views can be
436         put in the Debug/ directory to exclude them from production builds,
437         there's no way to register tabs conditionally at runtime; tabs are
438         hardcoded.
439
440         This patch makes it possible to register new tab types at runtime.
441         First, WebInspector keeps a map of known, registered tab classes.
442         Details that were hardcoded before---whether to show in New Tab,
443         whether a tab can be instantiated given the active domains, UI text,
444         etc.---are now static methods on the base TabContentView or overidden
445         in its subclasses. Lastly, a public method allows code in Bootstrap.js
446         to register tabs at runtime. Doing so sends a notification so the
447         NewTabContentView can show the newly available tab item.
448
449         * UserInterface/Base/Main.js:
450         (WebInspector.contentLoaded):
451         (WebInspector.isTabTypeAllowed):
452         (WebInspector.knownTabClasses): Added, used by NewTabContentView.
453         (WebInspector._createTabContentViewForType): Renamed from _tabContentViewForType.
454         (WebInspector._rememberOpenTabs):
455         (WebInspector._updateNewTabButtonState):
456         (WebInspector._tryToRestorePendingTabs): Added.
457
458         Whenever a new tab is registered, try to restore pending tabs, since
459         an extra tab won't be added initially when production tabs are added.
460         But, it could have been saved in the Setting for opened tabs.
461
462         (WebInspector.showNewTabTab):
463         (WebInspector.isNewTabWithTypeAllowed):
464         (WebInspector.createNewTabWithType):
465         (WebInspector._tabContentViewForType): Deleted.
466         * UserInterface/Base/Object.js:
467         * UserInterface/Views/ConsoleTabContentView.js:
468         (WebInspector.ConsoleTabContentView):
469         (WebInspector.ConsoleTabContentView.tabInfo): Added.
470         * UserInterface/Views/DebuggerTabContentView.js:
471         (WebInspector.DebuggerTabContentView):
472         (WebInspector.DebuggerTabContentView.tabInfo): Added.
473         * UserInterface/Views/ElementsTabContentView.js:
474         (WebInspector.ElementsTabContentView):
475         (WebInspector.ElementsTabContentView.tabInfo): Added.
476         (WebInspector.ElementsTabContentView.isTabAllowed): Added.
477         * UserInterface/Views/NetworkTabContentView.js:
478         (WebInspector.NetworkTabContentView):
479         (WebInspector.NetworkTabContentView.tabInfo): Added.
480         (WebInspector.NetworkTabContentView.isTabAllowed): Added.
481         * UserInterface/Views/NewTabContentView.js:
482
483         Keep a list of shown tab items, so we don't have to query the DOM
484         to update enabled/disabled state. Put tree construction inside a
485         layout() override and dirty the view whenever known tab types change.
486
487         (WebInspector.NewTabContentView):
488         (WebInspector.NewTabContentView.tabInfo): Added.
489         (WebInspector.NewTabContentView.isEphemeral): Added.
490         (WebInspector.NewTabContentView.shouldSaveTab): Added.
491         (WebInspector.NewTabContentView.prototype.layout): Added.
492         (WebInspector.NewTabContentView.prototype._updateShownTabs): Added.
493         (WebInspector.NewTabContentView.prototype._allowableTabTypes):
494         (WebInspector.NewTabContentView.prototype._updateTabItems):
495         (WebInspector.NewTabContentView.prototype.get tabItemElements): Deleted.
496         * UserInterface/Views/ResourcesTabContentView.js:
497         (WebInspector.ResourcesTabContentView):
498         (WebInspector.ResourcesTabContentView.tabInfo): Added.
499         * UserInterface/Views/SearchTabContentView.js:
500         (WebInspector.SearchTabContentView):
501         (WebInspector.SearchTabContentView.tabInfo): Added.
502         (WebInspector.SearchTabContentView.isEphemeral): Added.
503         * UserInterface/Views/SettingsTabContentView.js:
504         (WebInspector.SettingsTabContentView.isTabAllowed): Added.
505         (WebInspector.SettingsTabContentView.shouldSaveTab): Added.
506         * UserInterface/Views/StorageTabContentView.js:
507         (WebInspector.StorageTabContentView):
508         (WebInspector.StorageTabContentView.tabInfo): Added.
509         (WebInspector.StorageTabContentView.isTabAllowed): Added.
510         * UserInterface/Views/TabBrowser.js:
511         (WebInspector.TabBrowser.showTabForContentView):
512
513         Add a workaround for <https://webkit.org/b/151876>. This bug is
514         revealed by the changes to NewTabContentView in this patch.
515
516         * UserInterface/Views/TabContentView.js:
517         (WebInspector.TabContentView.isTabAllowed): Added.
518         (WebInspector.TabContentView.isEphemeral): Added.
519         (WebInspector.TabContentView.shouldSaveTab): Added.
520         * UserInterface/Views/TimelineTabContentView.js:
521         (WebInspector.TimelineTabContentView):
522         (WebInspector.TimelineTabContentView.tabInfo): Added.
523         (WebInspector.TimelineTabContentView.isTabAllowed): Added.
524
525 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
526
527         Web Inspector: Remove untested and unused Worker inspection
528         https://bugs.webkit.org/show_bug.cgi?id=151848
529
530         Reviewed by Brian Burg.
531
532         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
533         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
534         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
535         * Versions/Inspector-iOS-7.0.json:
536         * Versions/Inspector-iOS-8.0.json:
537         * Versions/Inspector-iOS-9.0.json:
538         Since this was untested in older releases as well, remove
539         the protocol interfaces for legacy versions.
540
541 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
542
543         Web Inspector: Specifically Identify the Global Lexical Environment Scope
544         https://bugs.webkit.org/show_bug.cgi?id=151828
545
546         Reviewed by Brian Burg.
547
548         * Localizations/en.lproj/localizedStrings.js:
549         * UserInterface/Controllers/DebuggerManager.js:
550         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
551         * UserInterface/Models/ScopeChainNode.js:
552         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
553         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
554         Include a new scope type and give it a localized string.
555
556 2015-12-03  Anders Carlsson  <andersca@apple.com>
557
558         Remove Objective-C GC support
559         https://bugs.webkit.org/show_bug.cgi?id=151819
560         rdar://problem/23746991
561
562         Reviewed by Dan Bernstein.
563
564         * Configurations/Base.xcconfig:
565
566 2015-12-03  Matt Baker  <mattbaker@apple.com>
567
568         Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList')
569         https://bugs.webkit.org/show_bug.cgi?id=151790
570
571         Reviewed by Timothy Hatcher.
572
573         * UserInterface/Views/DataGrid.js:
574         (WebInspector.DataGridNode):
575         (WebInspector.DataGridNode.prototype.get hidden):
576         (WebInspector.DataGridNode.prototype.set hidden):
577         Make hidden a property, so it can be set before the grid node's DOM element exists.
578         (WebInspector.DataGridNode.prototype.get selectable):
579         (WebInspector.DataGridNode.prototype.get element):
580         Add hidden style, if needed, when element is created.
581
582         * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
583         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
584         (WebInspector.TreeOutlineDataGridSynchronizer):
585         Don't access the grid node's element directly, since it may not exist yet.
586
587 2015-12-02  Joseph Pecoraro  <pecoraro@apple.com>
588
589         Web Inspector: Handle YieldExpressions in the ScriptSyntaxTree
590         https://bugs.webkit.org/show_bug.cgi?id=151730
591
592         Reviewed by Brian Burg.
593
594         * UserInterface/Models/NativeFunctionParameters.js:
595         Add the Generator API.
596
597         * UserInterface/Models/ScriptSyntaxTree.js:
598         (WebInspector.ScriptSyntaxTree.prototype._recurse):
599         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
600         Handle YieldExpressions.
601
602 2015-12-01  Matt Baker  <mattbaker@apple.com>
603
604         Web Inspector: TreeOutline should just dispatch events via WebInspector.Object
605         https://bugs.webkit.org/show_bug.cgi?id=148067
606
607         Reviewed by Timothy Hatcher.
608
609         TreeOutline now dispatches most events via WebInspector.Object. The onselect and
610         ondeselect callbacks are replaced by a SelectionDidChange event, which includes
611         both the selected and deselected elements in its event data. The onexpand and oncollapse
612         callbacks are replaced by an ElementDisclosureDidChange event. This is consistent with the
613         behavior of onhidden, which had no corresponding onvisible callback.
614
615         Alas, TimelineView and TreeOutlineDataGridSynchronizer depended on the order in which
616         TreeOutline.onselect callbacks were chained together. The synchronizer added its
617         callback after the timeline view, which ensured that the tree and grid were in sync
618         before the view handled onselect and dispatched a SelectionPathComponentsDidChange.
619         The change notification causes the view's path components to be read, and timeline
620         views need the grid selection to be in a valid state to build path components.
621
622         This is addressed by having timeline views dispatch SelectionPathComponentsDidChange
623         events when the grid selection changes, instead of the tree selection. The change
624         required that the synchronizer no longer suppress notifications when selecting grid nodes.
625
626         * UserInterface/Views/DebuggerSidebarPanel.js:
627         (WebInspector.DebuggerSidebarPanel):
628         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
629         (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
630
631         * UserInterface/Views/NavigationSidebarPanel.js:
632         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
633         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
634
635         * UserInterface/Views/NetworkGridContentView.js:
636         (WebInspector.NetworkGridContentView):
637         (WebInspector.NetworkGridContentView.prototype._treeSelectionDidChange):
638
639         * UserInterface/Views/ResourceSidebarPanel.js:
640         (WebInspector.ResourceSidebarPanel):
641         (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
642         (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Deleted.
643
644         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
645         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
646         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
647         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementAdded):
648         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementDisclosureDidChange):
649         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler): Deleted.
650         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler): Deleted.
651
652         * UserInterface/Views/SearchSidebarPanel.js:
653         (WebInspector.SearchSidebarPanel):
654         (WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange):
655         (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Deleted.
656
657         * UserInterface/Views/StorageSidebarPanel.js:
658         (WebInspector.StorageSidebarPanel):
659         (WebInspector.StorageSidebarPanel._treeSelectionDidChange):
660
661         * UserInterface/Views/TimelineDataGrid.js:
662         (WebInspector.TimelineDataGrid.prototype._createPopoverContent):
663         (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
664         (WebInspector.TimelineDataGrid):
665
666         * UserInterface/Views/TimelineSidebarPanel.js:
667         (WebInspector.TimelineSidebarPanel):
668         (WebInspector.TimelineSidebarPanel.prototype._recordingsTreeSelectionDidChange):
669         (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeSelectionDidChange):
670         (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): Deleted.
671
672         * UserInterface/Views/TimelineView.js:
673         (WebInspector.TimelineView):
674         (WebInspector.TimelineView.prototype._treeSelectionDidChange):
675         (WebInspector.TimelineView.prototype.treeElementSelected):
676         Don't dispatch SelectionPathComponentsDidChange. Timeline views already do this
677         in response to grid selection events.
678
679         * UserInterface/Views/TreeOutline.js:
680         (WebInspector.TreeOutline.prototype.appendChild):
681         (WebInspector.TreeOutline.prototype.insertChild):
682         (WebInspector.TreeOutline.prototype.removeChildAtIndex):
683         (WebInspector.TreeOutline.prototype.removeChildren):
684         (WebInspector.TreeOutline.prototype.removeChildrenRecursive):
685         (WebInspector.TreeOutline.prototype._treeElementDidChange):
686         (WebInspector.TreeElement.prototype.set hidden):
687         (WebInspector.TreeElement.prototype.collapse):
688         (WebInspector.TreeElement.prototype.expand):
689         (WebInspector.TreeElement.prototype.select):
690         (WebInspector.TreeElement.prototype.deselect):
691         (WebInspector.TreeElement.prototype.get childrenListElement): Deleted.
692         Removed dead code.
693
694         * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
695         (WebInspector.TreeOutlineDataGridSynchronizer):
696         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeSelectionDidChange):
697         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
698         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
699         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementDisclosureDidChange):
700         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
701         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onadd): Deleted.
702         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onremove): Deleted.
703         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onexpand): Deleted.
704         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.oncollapse): Deleted.
705         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onhidden): Deleted.
706         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onselect): Deleted.
707         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected): Deleted.
708         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded): Deleted.
709         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed): Deleted.
710         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged): Deleted.
711
712         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
713         (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
714         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeSelectionDidChange):
715         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected): Deleted.
716
717 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
718
719         Web Inspector: Timestamp in Tooltip of Event Markers is incorrect
720         https://bugs.webkit.org/show_bug.cgi?id=151722
721
722         Reviewed by Timothy Hatcher.
723
724         * UserInterface/Views/TimelineRuler.js:
725         (WebInspector.TimelineRuler.prototype.addMarker):
726         Convert the marker's time, to be relative to the start of the recording.
727
728 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
729
730         Unreviewed common typo fix "occurance" => "occurrence".
731
732         * Scripts/combine-resources.pl:
733         (concatenateFiles):
734
735 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
736
737         Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
738         https://bugs.webkit.org/show_bug.cgi?id=151530
739
740         Reviewed by Timothy Hatcher.
741
742         If reloading the page caused the console to clear, that was triggering
743         the console prompt to be focused. When the console prompt is focused,
744         keyboard input like Spacebar, was just inputing characters instead of
745         triggering the keyboard shortcut that was expected.
746
747         This also means that console.clear() in the inspected page would cause
748         the inspector to focus the console. That is unexpected as well.
749
750         Focusing the console prompt whenever the console log is cleared
751         is not ideal. If we do want to focus the prompt the caller should
752         make that determination, not clear.
753
754         * UserInterface/Controllers/JavaScriptLogViewController.js:
755         (WebInspector.JavaScriptLogViewController.prototype.clear):
756
757 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
758
759         Web Inspector: Update Timeline UI based on the Instruments in the Active Recording
760         https://bugs.webkit.org/show_bug.cgi?id=151374
761
762         Reviewed by Brian Burg.
763
764         * UserInterface/Views/TimelineRecordingContentView.js:
765         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
766         Modernize as I was in this code while looking into this patch.
767
768         * UserInterface/Views/TimelineSidebarPanel.css:
769         (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
770         (.sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
771         These defaults are no longer necessary, the UI overrides them anyways.
772
773         * UserInterface/Views/TimelineSidebarPanel.js:
774         (WebInspector.TimelineSidebarPanel):
775         Include both the basic and rendering frames toolbars. They will be
776         mutually exclusive based on if the FPSIntrument is available.
777
778         (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
779         (WebInspector.TimelineSidebarPanel.prototype._clearInstruments):
780         When loading a new Recording clear the UI.
781
782         (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
783         (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
784         (WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument):
785         (WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument):
786         Handle toggling the toolbars when the FPS instrument is added/removed.
787
788         (WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
789         (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
790         (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
791         Properly update the sidebar's understanding of the TimelineOverview size.
792
793 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
794
795         Web Inspector: Initial support for variable timelines
796         https://bugs.webkit.org/show_bug.cgi?id=151372
797
798         Reviewed by Brian Burg.
799
800         * UserInterface/Controllers/TimelineManager.js:
801         (WebInspector.TimelineManager.defaultInstruments):
802         (WebInspector.TimelineManager.prototype._loadNewRecording):
803         Keep the status quo which is the same set of instruments for each recording.
804
805         (WebInspector.TimelineManager.prototype.startCapturing):
806         (WebInspector.TimelineManager.prototype.stopCapturing):
807         Push responsibility of capturing to the Recording, which has a specific set
808         of instruments that know what they need to turn on an off from the backend.
809         
810         * UserInterface/Main.html:
811         * UserInterface/Models/Instrument.js: Added.
812         (WebInspector.Instrument):
813         (WebInspector.Instrument.startLegacyTimelineAgent):
814         (WebInspector.Instrument.stopLegacyTimelineAgent):
815         (WebInspector.Instrument.prototype.get timelineRecordType):
816         (WebInspector.Instrument.prototype.startInstrumentation):
817         (WebInspector.Instrument.prototype.stopInstrumentation):
818         New class representing something that can be turned on and off
819         from the backend and produces a set of Timeline record types.
820         Currently instruments are 1-to-1 to a Timeline type.
821
822         * UserInterface/Models/LayoutInstrument.js: Added.
823         (WebInspector.LayoutInstrument.prototype.get timelineRecordType):
824         (WebInspector.LayoutInstrument):
825         * UserInterface/Models/NetworkInstrument.js: Added.
826         (WebInspector.NetworkInstrument.prototype.get timelineRecordType):
827         (WebInspector.NetworkInstrument.prototype.startInstrumentation):
828         (WebInspector.NetworkInstrument.prototype.stopInstrumentation):
829         (WebInspector.NetworkInstrument):
830         * UserInterface/Models/ScriptInstrument.js: Added.
831         (WebInspector.ScriptInstrument.prototype.get timelineRecordType):
832         (WebInspector.ScriptInstrument):
833         The default set of instruments. Currently they all enable the TimelineAgent,
834         so they share code to enable/disable in the base class to avoid duplication.
835
836         * UserInterface/Models/FPSInstrument.js: Added.
837         (WebInspector.FPSInstrument):
838         (WebInspector.FPSInstrument.supported):
839         (WebInspector.FPSInstrument.prototype.get timelineRecordType):
840         Provide a "supported" static method and simplify other code that
841         checks whether or not RenderingFrames is available or not.
842
843
844         * UserInterface/Models/Timeline.js:
845         (WebInspector.Timeline.prototype.get displayName): Deleted.
846         (WebInspector.Timeline.prototype.get iconClassName): Deleted.
847         Move these to a View class, as this is primarily View logic.
848
849         * UserInterface/Models/TimelineRecording.js:
850         (WebInspector.TimelineRecording):
851         (WebInspector.TimelineRecording.prototype.get instruments):
852         (WebInspector.TimelineRecording.prototype.start):
853         (WebInspector.TimelineRecording.prototype.stop):
854         (WebInspector.TimelineRecording.prototype.timelineForInstrument):
855         (WebInspector.TimelineRecording.prototype.addInstrument):
856         (WebInspector.TimelineRecording.prototype.removeInstrument):
857         (WebInspector.TimelineRecording.prototype.addEventMarker):
858         (WebInspector.TimelineRecording.prototype.addTimeline): Deleted.
859         (WebInspector.TimelineRecording.prototype.removeTimeline): Deleted.
860         A recording now has a set of Instruments and its own start/stop
861         which starts/stops its set of Instruments! Treat Instruments as
862         the variable property of a Recording instead of Timelines.
863     
864         * UserInterface/Views/TimelineOverview.js:
865         (WebInspector.TimelineOverview):
866         (WebInspector.TimelineOverview.prototype._instrumentAdded):
867         (WebInspector.TimelineOverview.prototype._instrumentRemoved):
868         (WebInspector.TimelineOverview.prototype._timelineAdded): Deleted.
869         (WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted.
870         * UserInterface/Views/TimelineRecordingContentView.js:
871         (WebInspector.TimelineRecordingContentView):
872         (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
873         (WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved):
874         (WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted.
875         (WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted.
876         * UserInterface/Views/TimelineSidebarPanel.js:
877         (WebInspector.TimelineSidebarPanel):
878         (WebInspector.TimelineSidebarPanel.displayNameForTimeline):
879         (WebInspector.TimelineSidebarPanel.iconClassNameForTimeline):
880         (WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
881         (WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
882         (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
883         (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
884         (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
885         (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
886         (WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted.
887         (WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted.
888         Update all TimelineAdded/TimelineRemoved clients to instead check
889         InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument
890         to a Timeline to keep the patch simple.
891
892 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
893
894         Web Inspector: Broken Inspector when resources are minified
895         https://bugs.webkit.org/show_bug.cgi?id=151711
896
897         Reviewed by Timothy Hatcher.
898
899         * Scripts/combine-resources.pl:
900         (concatenateFiles):
901         Provide a way to just strip resources matches a pattern.
902
903         * Scripts/copy-user-interface-resources.pl:
904         Strip "Debug/" resources before combining / minifying others.
905
906         * UserInterface/Views/View.js:
907         (WebInspector.View.prototype.makeRootView):
908         (WebInspector.View.prototype.didDetach):
909         Address warnings from the console.assert stripping phase
910         for console.assert statements lacking a trailing semicolon.
911
912 2015-11-30  Brian Burg  <bburg@apple.com>
913
914         Web Inspector: show something useful when the inspector frontend fails to load
915         https://bugs.webkit.org/show_bug.cgi?id=151643
916
917         Reviewed by Timothy Hatcher.
918
919         When a parse error or other early error happens before the inspector
920         is fully loaded, we can't use the second-level inspector to tell what's
921         going on. It would be better to catch any early errors and list them.
922
923         This patch adds an error page that shows the early errors that happened
924         during loading. It provides a list of errors, a link to reload the
925         inspector, and a link to submit a pre-filled bug report about the error.
926
927         For now, this page only shows up in engineering builds because it's
928         located in the Debug/ directory. We can move it later when it works
929         better in all cases. Follow-up patches can address smaller issues,
930         such as the transparent title bar and broken text selection.
931
932          * UserInterface/Debug/CatchEarlyErrors.css: Added.
933          * UserInterface/Debug/CatchEarlyErrors.js: Added.
934          * UserInterface/Main.html:
935          * UserInterface/Main.js: Abort setting up the UI if something happened.
936
937 2015-11-30  Brian Burg  <bburg@apple.com>
938
939         Web Inspector: delete-by-word and similar shortcuts should add text to the WebCore kill ring
940         https://bugs.webkit.org/show_bug.cgi?id=151312
941
942         Reviewed by Darin Adler.
943
944         Add support for other kill ring-eligible keybindinsg, such as
945         deleting by word, group, or line forwards and backwards.
946
947         * UserInterface/Controllers/CodeMirrorTextKillController.js:
948         (WebInspector.CodeMirrorTextKillController):
949         (WebInspector.CodeMirrorTextKillController.prototype._handleTextKillCommand): Renamed from _handleKillLine.
950
951             Parameterize the function so it can handle any keybinding and
952             command. Take a kill ring insertion mode argument, too.
953
954         (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
955
956             Add some special casing for changes received from Delete Line
957             (Cmd-D) so the right text is added to the kill ring. Thread the
958             kill ring insertion mode to the frontend host call.
959
960         (WebInspector.CodeMirrorTextKillController.prototype._handleKillLine): Deleted.
961
962 2015-11-29  Brian Burg  <bburg@apple.com>
963
964         Web Inspector: Add context menu item to Reload the Inspector
965         https://bugs.webkit.org/show_bug.cgi?id=141742
966
967         Reviewed by Timothy Hatcher.
968
969         Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to
970         reload the Web Inspector frontend without closing the browser.
971
972         This should make it possible to more quickly fix typos, small nits,
973         etc. without having to relaunch. It might also make state
974         restoration bugs more visible in engineering builds, since there
975         is hardly any delay between seeing the old and reloaded frontends.
976
977         Note that this functionality reloads scripts from the configuration's
978         build directory, so you still need to "build" WebInspectorUI to ensure
979         that any changed files are properly minified and staged.
980
981         * UserInterface/Base/Main.js:
982         (WebInspector.unlocalizedString):
983
984             Added. Make it obvious when strings are intentionally not localized.
985
986         (WebInspector._contextMenuRequested):
987
988             If the "Show Debug UI" setting is available and true, add
989             a global "Reload Web Inspector" menu item to every context
990             menu. Otherwise, don't eagerly create a context menu.
991         * UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut.
992
993 2015-11-29  Brian Burg  <bburg@apple.com>
994
995         Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event
996         https://bugs.webkit.org/show_bug.cgi?id=151629
997
998         Reviewed by Timothy Hatcher.
999
1000         The existing Context Menu system assumes that only one UI component
1001         will need to provide context menu items. But in some scenarios, there
1002         are multiple UI components that could provide relevant menu items. For
1003         example, right-clicking on an DOM element in the console should show
1004         menu items relevant to 1) the DOM element, 2) the console in general,
1005         and 3) global menu items. Existing code shows menu items provided by
1006         the first object that handles the event and calls ContextMenu.show().
1007
1008         This patch changes behavior so that a context menu can be built up
1009         by multiple 'contextmenu' event handlers. A ContextMenu instance is
1010         hidden on the 'contextmenu' event object; client code calls a
1011         factory method that digs out this existing context menu or creates a
1012         new one as needed. To actually show the context menu through the
1013         InspectorFrontendHost methods, the top-level app controller adds a
1014         bubbling listener for 'contextmenu' and shows the event's context
1015         menu if one has been created.
1016
1017         Along the way, do some cleanup. Do s/var/let/, arrowize some functions,
1018         use Array.{map,some}, and simplify some other code as a result.
1019
1020         No new tests yet, since we can't trigger context menu easily from
1021         an inspector test. All affected context menus were manually verified.
1022
1023         * UserInterface/Base/Main.js:
1024         (WebInspector.contentLoaded):
1025         * UserInterface/Controllers/BreakpointPopoverController.js:
1026         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
1027         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted.
1028         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
1029         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
1030         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
1031         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
1032         * UserInterface/Views/BreakpointTreeElement.js:
1033         (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
1034         * UserInterface/Views/CSSStyleDeclarationSection.js:
1035         * UserInterface/Views/ContextMenu.js:
1036         (WebInspector.ContextMenuItem.prototype._buildDescriptor):
1037         (WebInspector.ContextMenuItem):
1038         (WebInspector.ContextSubMenuItem.prototype.appendItem):
1039         (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
1040         (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
1041         (WebInspector.ContextSubMenuItem.prototype._pushItem):
1042         (WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
1043         (WebInspector.ContextSubMenuItem):
1044         (WebInspector.ContextMenu.createFromEvent):
1045         (WebInspector.ContextMenu.prototype.show):
1046         (WebInspector.ContextMenu.prototype.handleEvent):
1047         (WebInspector.ContextMenu.prototype._buildDescriptor):
1048         * UserInterface/Views/DOMTreeOutline.js:
1049         (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
1050         (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
1051         (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
1052         * UserInterface/Views/DataGrid.js:
1053         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
1054         * UserInterface/Views/DebuggerSidebarPanel.js:
1055         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
1056         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted.
1057         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted.
1058         * UserInterface/Views/LogContentView.js:
1059         (WebInspector.LogContentView.prototype._handleContextMenuEvent):
1060         * UserInterface/Views/ObjectPreviewView.js:
1061         (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
1062         (WebInspector.ObjectPreviewView):
1063         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
1064         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
1065         (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
1066         (WebInspector.ObjectTreeBaseTreeElement):
1067         * UserInterface/Views/SourceCodeTextEditor.js:
1068         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1069         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted.
1070         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted.
1071         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted.
1072         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted.
1073         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted.
1074         * UserInterface/Views/TabBarItem.js:
1075         (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
1076         (WebInspector.TabBarItem):
1077         (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted.
1078         (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted.
1079         * UserInterface/Views/TimelineSidebarPanel.js:
1080         (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar):
1081         (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted.
1082         * UserInterface/Views/Toolbar.js:
1083         (WebInspector.Toolbar.prototype._handleContextMenuEvent):
1084         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
1085         (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
1086
1087 2015-11-28  Devin Rousso  <dcrousso+webkit@gmail.com>
1088
1089         Web Inspector: Styles sidebar placeholder is misaligned
1090         https://bugs.webkit.org/show_bug.cgi?id=151638
1091
1092         Reviewed by Brian Burg.
1093
1094         * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
1095         (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
1096
1097 2015-11-28  Devin Rousso  <dcrousso+webkit@gmail.com>
1098
1099         Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work
1100         https://bugs.webkit.org/show_bug.cgi?id=151628
1101
1102         Reviewed by Brian Burg.
1103
1104         Merged the two "add rule" functions inside DOMNodeStyles to create a
1105         new rule with the given selector and use the generated best selector
1106         for that node otherwise. This also preserves all fallbacks across all
1107         functions for creating new CSS rules.
1108
1109         * UserInterface/Models/DOMNodeStyles.js:
1110         (WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted.
1111         (WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted.
1112         (WebInspector.DOMNodeStyles.prototype.addRule):
1113         Creates a new CSS rule using either the provided selector or the best
1114         selector for the current node.
1115
1116         * UserInterface/Views/CSSStyleDeclarationSection.js:
1117         (WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
1118         * UserInterface/Views/RulesStyleDetailsPanel.js:
1119         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
1120         * UserInterface/Views/VisualStyleSelectorSection.js:
1121         (WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
1122
1123 2015-11-24  Brian Burg  <bburg@apple.com>
1124
1125         Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified
1126         https://bugs.webkit.org/show_bug.cgi?id=151581
1127
1128         Reviewed by Timothy Hatcher.
1129
1130         Serialize all breakpoints to the "breakpoints" Setting in local storage
1131         whenever any breakpoint model object is added, removed, or modified.
1132
1133         Remove the old listener that attempted to save breakpoints on the
1134         pagehide event. It did not fire in important scenarios like exiting
1135         the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL.
1136
1137         This is not expected to be a performance problem because most people
1138         do not keep thousands of breakpoints active, and breakpoints are not
1139         set very often. If it's a problem, we can mitigate it with coalescing.
1140
1141         * UserInterface/Controllers/DebuggerManager.js:
1142         (WebInspector.DebuggerManager.prototype.addBreakpoint):
1143         (WebInspector.DebuggerManager.prototype.removeBreakpoint):
1144         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
1145         (WebInspector.DebuggerManager.prototype._saveBreakpoints):
1146         (WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted.
1147
1148 2015-11-24  Brian Burg  <bburg@apple.com>
1149
1150         Web Inspector: Cmd-1 to Cmd-9 shortcuts should select tabs by ordinal
1151         https://bugs.webkit.org/show_bug.cgi?id=151577
1152
1153         Reviewed by Timothy Hatcher.
1154
1155         The shortcuts only work if a tab at the specified ordinal exists.
1156
1157         * UserInterface/Base/Main.js:
1158         (WebInspector.contentLoaded):
1159
1160 2015-11-23  Brian Burg  <bburg@apple.com>
1161
1162         Web Inspector: Add a keyboard shortcut to restore the default zoom level
1163         https://bugs.webkit.org/show_bug.cgi?id=151237
1164
1165         Reviewed by Timothy Hatcher.
1166
1167         The Cmd-0 shortcut matches the keybindings of Safari and other browsers.
1168
1169         * UserInterface/Base/Main.js:
1170         (WebInspector.contentLoaded):
1171
1172 2015-11-23  Brian Burg  <bburg@apple.com>
1173
1174         Web Inspector: inspector settings should not be shared between different inspection levels
1175         https://bugs.webkit.org/show_bug.cgi?id=151151
1176
1177         Reviewed by Timothy Hatcher.
1178
1179         It's really annoying to have shared settings between Inspector^1 and Inspector^2, because
1180         they are not designed to respond to external changes to local storage keys. As a result,
1181         the two inspectors seemingly have different settings while both are open, but the settings
1182         clobber each other depending on which inspector is closed first. On the next inspector
1183         being opened, it has settings that reflect whichever inspector closed last.
1184
1185         To fix this, alter the local storage key prefix to incude the inspection level when it is
1186         greater than 1 (i.e., inspecting the inspector). The storage prefix becomes
1187         "com.apple.WebInspector-${inspectionLevel}." in this case.
1188         This is backwards-compatible for normal Inspector, who keeps the same storage prefix. 
1189
1190         Alternate approaches that were considered and abandoned:
1191
1192          - Use separate WKWebSiteDataStores for each inspection level. This API (as it currently is)
1193         does not support multiple on-disk storage locations. We don't want to add an entirely new
1194         Library directory for each inspector level, and sharing a single location doesn't fix the
1195         shared-settings bug. Changing storage location would lose all existing Inspector settings.
1196
1197          - Sync settings between multiple open Inspectors. This would be catastrophic, as changing
1198         the active tab on one inspector would immediately propagate to the other open inspectors.
1199
1200         * UserInterface/Models/Setting.js:
1201         (WebInspector.Setting):
1202         * UserInterface/Protocol/InspectorFrontendHostStub.js:
1203         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.inspectionLevel):
1204
1205 2015-11-23  Brian Burg  <bburg@apple.com>
1206
1207         Web Inspector: use Cmd-Option-L and Cmd-Option-R for toggling navigation and details sidebars
1208         https://bugs.webkit.org/show_bug.cgi?id=151572
1209
1210         Reviewed by Timothy Hatcher.
1211
1212         The previous shortcuts were Cmd-0 and Cmd-Option-0, but these didn't match Safari's
1213         sidebar shortcuts and conflict with Cmd-0 as the cross-browser way to reset page zoom.
1214
1215         * UserInterface/Base/Main.js:
1216         (WebInspector.contentLoaded):
1217
1218 2015-11-23  Brian Burg  <bburg@apple.com>
1219
1220         Web Inspector: when inspecting the inspector, add the inspection level to the title bar
1221         https://bugs.webkit.org/show_bug.cgi?id=151555
1222
1223         Reviewed by Timothy Hatcher.
1224
1225         Drive-by update to remove some localization strings that are no longer used.
1226
1227         * Localizations/en.lproj/localizedStrings.js:
1228
1229 2015-11-22  Matt Baker  <mattbaker@apple.com>
1230
1231         Web Inspector: Clean up FolderizedTreeElement folder settings
1232         https://bugs.webkit.org/show_bug.cgi?id=151539
1233
1234         Reviewed by Brian Burg.
1235
1236         The expanded state for each folder was stored as an external property on the folder
1237         tree element. Now FolderizedTreeElement keeps a map of folders to settings.
1238
1239         * UserInterface/Views/FolderizedTreeElement.js:
1240         (WebInspector.FolderizedTreeElement):
1241         (WebInspector.FolderizedTreeElement.prototype.removeChildren):
1242         (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
1243         (WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange):
1244
1245 == Rolled over to ChangeLog-2015-11-21 ==