Web Inspector: add a DebugUI context menu item for saving inspector protocol traffic...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2016-01-04  Brian Burg  <bburg@apple.com>
2
3         Web Inspector: add a DebugUI context menu item for saving inspector protocol traffic to file
4         https://bugs.webkit.org/show_bug.cgi?id=152671
5
6         Reviewed by Timothy Hatcher.
7
8         Add a new tracer that captures all messages, and debug context menu
9         items to control whether to capture protocol traffic and export it.
10         In later patches, a reciprocal "Import..." context menu item will
11         allow opening saved protocol traces and viewing them in a debug UI
12         content view for debugging/visualizing protocol traffic.
13
14         * UserInterface/Base/Main.js:
15         * UserInterface/Debug/CapturingProtocolTracer.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/ProtocolTracer.js.
16
17             This tracer saves everything into a flat array. JSON protocol
18             messages are saved as escaped strings, in case they are not
19             valid JSON. We want to be able to debug such scenarios.
20
21         (WebInspector.CapturingProtocolTracer):
22         (WebInspector.CapturingProtocolTracer.prototype.get trace):
23         (WebInspector.CapturingProtocolTracer.prototype.logFrontendException):
24         (WebInspector.CapturingProtocolTracer.prototype.logProtocolError):
25         (WebInspector.CapturingProtocolTracer.prototype.logFrontendRequest):
26         (WebInspector.CapturingProtocolTracer.prototype.logDidHandleResponse):
27         (WebInspector.CapturingProtocolTracer.prototype.logDidHandleEvent):
28         (WebInspector.CapturingProtocolTracer.prototype._stringifyMessage):
29         (WebInspector.CapturingProtocolTracer.prototype._processEntry):
30
31         * UserInterface/Debug/ProtocolTrace.js: Added.
32
33             This is a dumb container that holds protocol trace data. It will
34             be responsible for deserializing saved trace files in later work.
35
36         (WebInspector.ProtocolTrace):
37         (WebInspector.ProtocolTrace.prototype.addEntry):
38         (WebInspector.ProtocolTrace.prototype.get saveData):
39         * UserInterface/Main.html:
40         * UserInterface/Protocol/InspectorBackend.js:
41         (InspectorBackendClass):
42
43             Simplify the implementation. Now there are one or two tracers
44             at any given time. The default tracer handles legacy logging
45             behavior and always exists. The custom tracer is installed when
46             the "Capture Protocol Traffic" context menu item is toggled.
47
48             Dispatch to the array of active tracers at each trace point.
49             Tracers now get the actual JSON message instead of a stringified
50             version passed as an argument.
51
52         (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
53         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
54         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
55         (InspectorBackendClass.prototype.set customTracer):
56         (InspectorBackendClass.prototype.get activeTracers):
57         (InspectorBackendClass.prototype._startOrStopAutomaticTracing):
58         (InspectorBackendClass.prototype._sendMessageToBackend):
59         (InspectorBackendClass.prototype._dispatchResponse):
60         (InspectorBackendClass.prototype._dispatchEvent):
61         (InspectorBackendClass.prototype.set activeTracer): Deleted.
62         (InspectorBackendClass.prototype.get activeTracer): Deleted.
63         * UserInterface/Protocol/LoggingProtocolTracer.js:
64         (WebInspector.LoggingProtocolTracer.prototype._processEntry):
65         (WebInspector.LoggingProtocolTracer):
66         (WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
67         (WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
68         (WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
69         (WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
70         (WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
71         * UserInterface/Protocol/ProtocolTracer.js:
72         (WebInspector.ProtocolTracer.prototype.logFrontendException):
73         (WebInspector.ProtocolTracer.prototype.logProtocolError):
74         (WebInspector.ProtocolTracer.prototype.logFrontendRequest):
75         (WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
76         (WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
77         (WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
78         (WebInspector.ProtocolTracer.prototype.logDidHandleEvent):
79
80 2016-01-04  Devin Rousso  <dcrousso+webkit@gmail.com>
81
82         Web Inspector: Comma separated values in the Visual sidebar are appended with )
83         https://bugs.webkit.org/show_bug.cgi?id=152653
84
85         Reviewed by Timothy Hatcher.
86
87         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
88         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.set value):
89         Modified the RexExp used to split the comma separated value to account for strings
90         with commas inside parenthesis (such as rgba() or hsla()) as well as ones without
91         commas (such as "arial" and "red").
92
93 2016-01-03  Devin Rousso  <dcrousso+webkit@gmail.com>
94
95         Web Inspector: Visual sidebar selector section displays inherited section for non-editable rules
96         https://bugs.webkit.org/show_bug.cgi?id=152659
97
98         Reviewed by Brian Burg.
99
100         * UserInterface/Views/VisualStyleSelectorSection.js:
101         (WebInspector.VisualStyleSelectorSection.prototype.update):
102         Only add a new inherited section header if it will contain at least one inherited rule.
103
104 2016-01-02  Devin Rousso  <dcrousso+webkit@gmail.com>
105
106         Web Inspector: List all resources that are initiated by the selected resource in the Network tab
107         https://bugs.webkit.org/show_bug.cgi?id=152647
108
109         Reviewed by Timothy Hatcher.
110
111         Selecting resources in the Network tab will now display a list of all resources
112         that the selected resource loaded, allowing for easier understanding of the
113         relationship between all the resources loaded on a page.
114
115         * Localizations/en.lproj/localizedStrings.js:
116         * UserInterface/Base/Main.js:
117         Added functions to generate link(s) to Resource instead of SourceCodeLocation.
118
119         * UserInterface/Models/Resource.js:
120         (WebInspector.Resource):
121         (WebInspector.Resource.prototype.get initiatedResources):
122         (WebInspector.Resource.prototype.addInitiatedResource):
123         Each time a resource is added, if it has an initiator, it adds itself to the
124         initiator's list of initiated resources.
125
126         * UserInterface/Views/Main.css:
127         (.resource-list > .resource-link):
128         (.resource-list > .resource-link::before):
129         (.resource-list > .resource-link + .resource-link):
130         (.resource-link):
131
132         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
133         (WebInspector.ResourceDetailsSidebarPanel):
134         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
135
136 2016-01-02  Devin Rousso  <dcrousso+webkit@gmail.com>
137
138         Web Inspector: Add list-style properties to Visual Sidebar
139         https://bugs.webkit.org/show_bug.cgi?id=152631
140
141         Reviewed by Timothy Hatcher.
142
143         Seeing as lists are very common in web pages across the internet, adding
144         a section to let users edit the properties unique to lists seems prudent.
145
146         * Localizations/en.lproj/localizedStrings.js:
147         * UserInterface/Images/ListStylePositionInside.svg: Added.
148         * UserInterface/Images/ListStylePositionOutside.svg: Added.
149         * UserInterface/Main.html:
150         Re-added UserInterface/Views/VisualStyleURLInput.js
151
152         * UserInterface/Views/VisualStyleDetailsPanel.js:
153         (WebInspector.VisualStyleDetailsPanel):
154         (WebInspector.VisualStyleDetailsPanel.prototype._populateListStyleSection):
155
156         * UserInterface/Views/VisualStyleKeywordIconList.css:
157         (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon):
158         Added specified color property to ensure that :active doesn't break the color of the svg.
159
160         (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon:matches(.computed, .selected)):
161         (.visual-style-property-container.keyword-icon-list > .visual-style-property-value-container > .keyword-icon-list-container > .keyword-icon.selected):
162         Changed the background-color and border-color values to match the rest of Web Inspector.
163
164         * UserInterface/Views/VisualStyleKeywordIconList.js:
165         (WebInspector.VisualStyleKeywordIconList):
166         (WebInspector.VisualStyleKeywordIconList.dashToCapital): Deleted.
167         (WebInspector.VisualStyleKeywordIconList.createListItem):
168         The "initial" keyword will also use UserInterface/Images/VisualStyleNone.svg
169
170         * UserInterface/Views/VisualStyleURLInput.js: Added.
171         Previously removed in r192705.
172
173 2016-01-02  Alberto Garcia  <berto@igalia.com>
174
175         [GTK] webkit 2.3.5 build failure with python 3.3.4
176         https://bugs.webkit.org/show_bug.cgi?id=128971
177
178         Reviewed by Michael Catanzaro.
179
180         Make sure that the stdin encoding is 'UTF-8' if using Python 3,
181         otherwise the build will break.
182
183         * Scripts/cssmin.py:
184
185 2016-01-01  Devin Rousso  <dcrousso+webkit@gmail.com>
186
187         Web Inspector: shadow visual sidebar section can be confused with the box shadow section
188         https://bugs.webkit.org/show_bug.cgi?id=148107
189
190         Reviewed by Brian Burg.
191
192         * Localizations/en.lproj/localizedStrings.js:
193         * UserInterface/Views/VisualStyleDetailsPanel.js:
194         (WebInspector.VisualStyleDetailsPanel):
195         Changed title of "Shadow" sub-section in "Background" to "Box Shadow".
196
197 2016-01-01  Devin Rousso  <dcrousso+webkit@gmail.com>
198
199         Web Inspector: The Computed Styles Properties section shows warning icons and doesn't update if collapsed
200         https://bugs.webkit.org/show_bug.cgi?id=152609
201
202         Reviewed by Brian Burg.
203
204         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
205         (WebInspector.CSSStyleDeclarationTextEditor.prototype._createTextMarkerForPropertyIfNeeded):
206         If the CodeMirror instance is read-only, don't add any warning icons.
207
208         * UserInterface/Views/ComputedStyleDetailsPanel.js:
209         (WebInspector.ComputedStyleDetailsPanel):
210         (WebInspector.ComputedStyleDetailsPanel.prototype._handleCollapsedStateChanged):
211         The properties text editor will now refresh whenever the details section
212         becomes un-collapsed.
213
214         * UserInterface/Views/DetailsSection.js:
215         (WebInspector.DetailsSection.prototype.set collapsed):
216         Now fires an event with the current collapsed state as data.
217
218 2015-12-31  Matt Baker  <mattbaker@apple.com>
219
220         Web Inspector: "No Filter Results" message overlaps Debugger sidebar sections
221         https://bugs.webkit.org/show_bug.cgi?id=150608
222
223         Reviewed by Brian Burg.
224
225         * UserInterface/Views/DebuggerSidebarPanel.js:
226         (WebInspector.DebuggerSidebarPanel.showResourcesWithIssuesOnlyFilterFunction):
227         Style cleanup.
228         (WebInspector.DebuggerSidebarPanel):
229         Add breakpoints tree to the details section before adding Global Breakpoint
230         elements, since adding them will trigger filtering.
231         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
232         Simplified selection management between the various tree outlines.
233         (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
234         Style cleanup.
235         (WebInspector.DebuggerSidebarPanel.prototype.get hasSelectedElement): Deleted.
236         Defer to the base class implementation.
237         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectCallStackContentTreeElements): Deleted.
238         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectBreakpointContentTreeElements): Deleted.
239         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange.deselectPauseReasonContentTreeElements): Deleted.
240         These are no longer needed, since the list of visible tree elements list can be used
241         to manage tree element selection is a more general way.
242
243         * UserInterface/Views/NavigationSidebarPanel.css:
244         Empty content placeholders are now inserted into the DOM as a sibling of the
245         tree that was filtered. As such, they can be a child of a details section, or
246         the sidebar's content element.
247         (.sidebar > .panel.navigation > .content .empty-content-placeholder):
248         Styles for all empty content placeholders.
249         (.sidebar > .panel.navigation > .content > .empty-content-placeholder):
250         Styles for empty content placeholders that fill the sidebar's content element.
251         (.sidebar > .panel.navigation > .content .message):
252         Styles for all empty content placeholders.
253         (.sidebar > .panel.navigation > .empty-content-placeholder): Deleted.
254         (.sidebar > .panel.navigation > .empty-content-placeholder > .message): Deleted.
255
256         * UserInterface/Views/NavigationSidebarPanel.js:
257         (WebInspector.NavigationSidebarPanel):
258         Track the tree outline which currently has a selection.
259         Manage a map of content placeholders
260         (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
261         (WebInspector.NavigationSidebarPanel.prototype.get hasSelectedElement):
262         Check all visible content trees for a selected element.
263         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
264         (WebInspector.NavigationSidebarPanel.prototype.treeElementForRepresentedObject):
265         Check all visible content trees for the represented object.
266         (WebInspector.NavigationSidebarPanel.prototype.showEmptyContentPlaceholder):
267         (WebInspector.NavigationSidebarPanel.prototype.hideEmptyContentPlaceholder):
268         (WebInspector.NavigationSidebarPanel.prototype.updateEmptyContentPlaceholder):
269         No sidebars currently have more than one filterable content tree outline, but in
270         the future we will want to support this. Empty content placeholder visibility
271         is now done per tree outline.
272         (WebInspector.NavigationSidebarPanel.prototype.show):
273         Focus the tree outline that most recently had the selection, or the
274         first tree outline in the visible tree list, if it exists.
275         (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults.checkTreeOutlineForEmptyFilterResults):
276         Tree is considered filtered if no visible filterable tree elements are found.
277         (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
278         Check all visible trees that support filtering.
279         (WebInspector.NavigationSidebarPanel.prototype._updateFilter):
280         Support for filtering multiple content trees.
281         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
282         Check if the element's tree outline supports filtering, before applying filters.
283         (WebInspector.NavigationSidebarPanel.prototype._treeSelectionDidChange):
284         Update the selected tree outline.
285         (WebInspector.NavigationSidebarPanel.prototype._createEmptyContentPlaceholderIfNeeded):
286         Create a new empty content placeholder element for the tree.
287         (WebInspector.NavigationSidebarPanel.prototype.get contentTreeOutlineElement): Deleted.
288         No longer used.
289
290         * UserInterface/Views/TimelineSidebarPanel.js:
291         (WebInspector.TimelineSidebarPanel.prototype.get hasSelectedElement): Deleted.
292         Defer to the base class implementation.
293
294 2015-12-29  Devin Rousso  <dcrousso+webkit@gmail.com>
295
296         Web Inspector: Styling of invalid selector persists when changing the selected node
297         https://bugs.webkit.org/show_bug.cgi?id=152456
298
299         Reviewed by Brian Burg.
300
301         If the user changes the selector of a CSS rule to be invalid (e.g. having
302         a { or ; character), it is expected that the invalid indicator will be removed
303         once the user changes nodes or reverts the selector to its previous value.
304
305         * Localizations/en.lproj/localizedStrings.js:
306         * UserInterface/Views/CSSStyleDeclarationSection.css:
307         (.style-declaration-section > .header > .icon.toggle-able:hover):
308         (.style-declaration-section > .header > .icon.toggle-able:active):
309         (.style-declaration-section:not(.invalid-selector) > .header > .icon.toggle-able:hover): Deleted.
310         Added better :hover and :active styles.
311
312         * UserInterface/Views/CSSStyleDeclarationSection.js:
313         (WebInspector.CSSStyleDeclarationSection):
314         (WebInspector.CSSStyleDeclarationSection.prototype.refresh):
315         (WebInspector.CSSStyleDeclarationSection.prototype._handleIconElementClicked):
316         If the selector is invalid, simply refresh the section to regenerate the
317         original selector with correct content, specificity, and highlighting.
318
319         (WebInspector.CSSStyleDeclarationSection.prototype.get _hasInvalidSelector): Deleted.
320         Moved the state of the invalid selector to a member
321         variable instead of a DOM class.
322
323         (WebInspector.CSSStyleDeclarationSection.prototype._updateSelectorIcon):
324         Renamed from _markSelector for clarity.
325
326         * UserInterface/Views/VisualStyleSelectorTreeItem.css:
327         (.item.visual-style-selector-item.selector-invalid > .icon:hover):
328         (.item.visual-style-selector-item.selector-invalid > .icon:active):
329         (.item.visual-style-selector-item.selector-invalid > .icon):
330         Added :hover and :active styles.
331
332         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
333         (WebInspector.VisualStyleSelectorTreeItem):
334         (WebInspector.VisualStyleSelectorTreeItem.prototype.onattach):
335         (WebInspector.VisualStyleSelectorTreeItem.prototype._commitSelector):
336         (WebInspector.VisualStyleSelectorTreeItem.prototype._updateSelectorIcon):
337         (WebInspector.VisualStyleSelectorTreeItem.prototype._handleIconElementClicked):
338         (WebInspector.VisualStyleSelectorTreeItem.prototype._selectorChanged): Deleted.
339         Changed the names of a few functions to provide better
340         consistency across the classes in the Style sidebar.
341
342 2015-12-27  Brian Burg  <bburg@apple.com>
343
344         Web Inspector: improve pre-filled bugzilla link on Uncaught Exception reporter sheet
345         https://bugs.webkit.org/show_bug.cgi?id=152402
346
347         Reviewed by Joseph Pecoraro.
348
349         Include the UA string, inspected page URL, and a template that includes
350         steps to reproduce and notes. Other common headings (regression, expected,
351         results, summary) are omitted because they are unlikely to be known when
352         an uncaught exception occurs, or are obvious ("shouldn't throw exception").
353
354         * UserInterface/Debug/UncaughtExceptionReporter.js:
355
356 2015-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
357
358         WebInspector: Can't open a new tab: Uncaught Exception: TypeError: this.isNewTabWithTypeAllowed is not a function
359         https://bugs.webkit.org/show_bug.cgi?id=152471
360
361         Reviewed by Timothy Hatcher.
362
363         * UserInterface/Base/Main.js:
364         (WebInspector._updateNewTabButtonState):
365         Don't use arrow functions because of https://webkit.org/b/152497 "Arrow functions: 'this' isn't lexically bound"
366
367 2015-12-21  Nikita Vasilyev  <nvasilyev@apple.com>
368
369         Web Inspector: Remove unused WebInspector.Object.removeAllListeners
370         https://bugs.webkit.org/show_bug.cgi?id=152474
371
372         Reviewed by Timothy Hatcher.
373
374         * UserInterface/Base/Object.js:
375         (WebInspector.Object.removeAllListeners): Deleted.
376         (WebInspector.Object.prototype.removeAllListeners): Deleted.
377
378 2015-12-20  Dan Bernstein  <mitz@apple.com>
379
380         Remove unused setToolbarHeight
381         https://bugs.webkit.org/show_bug.cgi?id=152466
382
383         Reviewed by Darin Adler.
384
385         * UserInterface/Base/Main.js:
386         (WebInspector.contentLoaded):
387         * UserInterface/Protocol/InspectorFrontendHostStub.js:
388         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.setToolbarHeight): Deleted.
389
390 2015-12-19  Dan Bernstein  <mitz@apple.com>
391
392         [Mac] WebKit contains dead source code for OS X Mavericks and earlier
393         https://bugs.webkit.org/show_bug.cgi?id=152462
394
395         Reviewed by Alexey Proskuryakov.
396
397         - Removed build setting definitions for OS X 10.9 and earlier, and simplified defintions
398           that became uniform across all OS X versions as a result:
399
400         * Configurations/Base.xcconfig:
401         * Configurations/DebugRelease.xcconfig:
402         * Configurations/Version.xcconfig:
403
404         * Scripts/copy-user-interface-resources.pl: Removed code to delete Images/Legacy.
405
406         * UserInterface/Images/Legacy: Removed this empty directory.
407
408 2015-12-18  Matt Baker  <mattbaker@apple.com>
409
410         Web Inspector: Make it possible to debug injected scripts when the Debug UI is enabled
411         https://bugs.webkit.org/show_bug.cgi?id=152445
412
413         Reviewed by Joseph Pecoraro.
414
415         * UserInterface/Base/Main.js:
416         Added function to check for debug UI.
417
418         * UserInterface/Base/Object.js:
419         Added notification for debug UI enabled state change.
420
421         * UserInterface/Base/Utilities.js:
422         (isWebInspectorInternalScript):
423         (isWebInspectorDebugScript):
424         Added functions to check for internal and debug inspector scripts.
425
426         * UserInterface/Controllers/DebuggerManager.js:
427         (WebInspector.DebuggerManager):
428         Maintain a list of inspector debug scripts, so that the manager can
429         add and remove them when the debug UI is enabled/disabled.
430         (WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
431         (WebInspector.DebuggerManager.prototype.reset):
432         Clear the list of inspector debug scripts.
433         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
434         (WebInspector.DebuggerManager.prototype.scriptDidParse):
435         Skip internal inspector scripts. Debug inspector scripts are tracked,
436         and an added event is dispatched if the debug UI is enabled.
437         (WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
438         Dispatch added/removed events for inspector debug scripts.
439
440         * UserInterface/Debug/Bootstrap.js:
441         (WebInspector.runBootstrapOperations):
442         Expose changes to the debug UI setting to the reset of the UI, by dispatching
443         a WebInspector.Notification.DebugUIEnabledDidChange event.
444
445         * UserInterface/Protocol/RemoteObject.js:
446         (WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
447         Only resolve inspector debug source locations when the debug UI is enabled.
448
449         * UserInterface/Test/Test.js:
450         Reimplemented debug UI check for tests. Always returns false.
451
452         * UserInterface/Views/DebuggerSidebarPanel.js:
453         (WebInspector.DebuggerSidebarPanel.prototype._addScript):
454         Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
455         (WebInspector.DebuggerSidebarPanel.prototype._scriptRemoved):
456         Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
457
458         * UserInterface/Views/ResourceSidebarPanel.js:
459         (WebInspector.ResourceSidebarPanel):
460         (WebInspector.ResourceSidebarPanel.prototype._scriptWasRemoved):
461         Handle DebuggerManager ScriptRemoved events. Only applies to debug scripts.
462         (WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
463         Removed check for inspector debug scripts. DebuggerManager filters scripts as needed.
464
465 2015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
466
467         Web Inspector: Remove "local" scope type from the protocol
468         https://bugs.webkit.org/show_bug.cgi?id=152409
469
470         Reviewed by Timothy Hatcher.
471
472         * UserInterface/Controllers/DebuggerManager.js:
473         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
474
475 2015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
476
477         Web Inspector: CSS warning's fake CallFrame is not creating a valid payload
478         https://bugs.webkit.org/show_bug.cgi?id=152413
479
480         Reviewed by Timothy Hatcher.
481
482         * UserInterface/Views/ConsoleMessageView.js:
483         (WebInspector.ConsoleMessageView.prototype._appendLocationLink):
484         This attempts to create a CallFrame from a Console.CallFrame payload,
485         but this was missing the required functionName string parameter.
486
487 2015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
488
489         Provide a way to distinguish a nested lexical block from a function's lexical block
490         https://bugs.webkit.org/show_bug.cgi?id=152361
491
492         Reviewed by Saam Barati.
493
494         * Localizations/en.lproj/localizedStrings.js:
495         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
496         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
497         New "Block Variables" string.
498
499         * UserInterface/Models/ScopeChainNode.js:
500         New "Block" scope type, and update existing types.
501
502         * UserInterface/Controllers/DebuggerManager.js:
503         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
504         Parse the protocol type to frontend types. Use the protocol generated enum.
505
506 2015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
507
508         Web Inspector: Improve names in Debugger Call Stack section when paused
509         https://bugs.webkit.org/show_bug.cgi?id=152398
510
511         Reviewed by Brian Burg.
512
513         * UserInterface/Controllers/DebuggerManager.js:
514         (WebInspector.DebuggerManager.prototype.debuggerDidPause):
515         Use a new fromPayload helper to construct the CallFrame and share code.
516
517         * UserInterface/Models/CallFrame.js:
518         (WebInspector.CallFrame.functionNameFromPayload):
519         (WebInspector.CallFrame.programCodeFromPayload):
520         (WebInspector.CallFrame.fromDebuggerPayload):
521         (WebInspector.CallFrame.fromPayload):
522         Add a new way to construct a call frame. There are two kinds of
523         CallFrame payloads in the protocol:
524         - Debugger.CallFrame, this new path
525         - Console.CallFrame, the pre-existing path
526
527 2015-12-17  Brian Burg  <bburg@apple.com>
528
529         Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
530         https://bugs.webkit.org/show_bug.cgi?id=151635
531
532         Reviewed by Joseph Pecoraro.
533
534         Follow-up fix to stop double-logging everything.
535
536         * UserInterface/Protocol/LoggingProtocolTracer.js:
537         (WebInspector.LoggingProtocolTracer.prototype._processEntry):
538
539 2015-12-17  Joseph Pecoraro  <pecoraro@apple.com>
540
541         Web Inspector: Improve console.trace, make it more like console.assert and inline the message
542         https://bugs.webkit.org/show_bug.cgi?id=152352
543
544         Reviewed by Timothy Hatcher.
545
546         * Localizations/en.lproj/localizedStrings.js:
547         New "Trace" related strings.
548
549         * UserInterface/Views/ConsoleMessageView.js:
550         (WebInspector.ConsoleMessageView.prototype.expand):
551         Since we auto-expand Trace messages for their Call Stack, don't also
552         auto-expand a single inner object, which may be big and push the
553         actual stack trace off the screen.
554         
555         (WebInspector.ConsoleMessageView.prototype._appendMessageTextAndArguments):
556         Behave like Assert messages and absorb a message string, and include
557         extra arguments gracefully.
558
559         (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
560         For expandable messages with simple extra arguments (console.trace with
561         primitives and backtrace, or console.assert with primitives and backtrace)
562         we were hiding the inline lossless previews and not showing them as a
563         bulleted list below. We can just keep the lossless previews inline in the
564         title, since they were only put there because they are small and lossless.
565
566         (WebInspector.ConsoleMessageView.prototype.toClipboardString):
567         No need to hard code "console.trace()" in the clipboard.
568
569         * UserInterface/Views/ConsoleMessageView.css:
570         (.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider):not(.inline-lossless)):
571         (.console-message.expandable.expanded :matches(.console-message-preview, .console-message-preview-divider)): Deleted.
572         Don't hide the inline lossless preview in the console message title when it is inline-lossless.
573
574         * UserInterface/Views/ObjectTreeView.js:
575         (WebInspector.ObjectTreeView.prototype.expand):
576         Do not allow expanding a loss-less preview.
577
578 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
579
580         Web Inspector: Add JSContext Script Profiling
581         https://bugs.webkit.org/show_bug.cgi?id=151899
582
583         Reviewed by Brian Burg.
584
585         Enable the Timeline tab for JSContext inspection. Currently only
586         JSContext inspection will use the ScriptProfiler domain, it will
587         be enabled for Page inspection in a follow-up.
588
589         First pass at the UI creates basic ScriptTimelineRecords for
590         ScriptProfiler events. At the end of recording, when profiles
591         are downloaded, it attaches profiles to the timeline records
592         and refreshes the Scripts timeline.
593
594         * UserInterface/Base/Main.js:
595         (WebInspector.loaded):
596         * UserInterface/Controllers/TimelineManager.js:
597         (WebInspector.TimelineManager):
598         (WebInspector.TimelineManager.defaultInstruments):
599         (WebInspector.TimelineManager.prototype.computeElapsedTime):
600         (WebInspector.TimelineManager.prototype.scriptProfilerIsTracking):
601         (WebInspector.TimelineManager.prototype._loadNewRecording):
602         (WebInspector.TimelineManager.prototype._mainResourceDidChange):
603         (WebInspector.TimelineManager.prototype._resourceWasAdded):
604         (WebInspector.TimelineManager.prototype._garbageCollected):
605         (WebInspector.TimelineManager.prototype._addRecord): Deleted.
606         * UserInterface/Main.html:
607         * UserInterface/Models/Instrument.js:
608         (WebInspector.Instrument.startLegacyTimelineAgent):
609         * UserInterface/Models/ScriptInstrument.js:
610         (WebInspector.ScriptInstrument.prototype.startInstrumentation):
611         (WebInspector.ScriptInstrument.prototype.stopInstrumentation):
612         (WebInspector.ScriptInstrument):
613         * UserInterface/Models/ScriptTimelineRecord.js:
614         (WebInspector.ScriptTimelineRecord.prototype.get profilePayload):
615         (WebInspector.ScriptTimelineRecord.prototype._initializeProfileFromPayload):
616         (WebInspector.ScriptTimelineRecord):
617         (WebInspector.ScriptTimelineRecord.EventType.displayName):
618         * UserInterface/Models/Timeline.js:
619         (WebInspector.Timeline.prototype.refresh):
620         * UserInterface/Models/TimelineRecording.js:
621         (WebInspector.TimelineRecording.sourceCodeTimelinesSupported):
622         (WebInspector.TimelineRecording.prototype.timelineForRecordType):
623         (WebInspector.TimelineRecording.prototype.addRecord):
624         * UserInterface/Protocol/ScriptProfilerObserver.js: Copied from Source/WebInspectorUI/UserInterface/Models/ScriptInstrument.js.
625         (WebInspector.ScriptProfilerObserver.prototype.trackingStart):
626         (WebInspector.ScriptProfilerObserver.prototype.trackingUpdate):
627         (WebInspector.ScriptProfilerObserver.prototype.trackingComplete):
628         (WebInspector.ScriptProfilerObserver):
629         * UserInterface/Views/ScriptTimelineView.js:
630         (WebInspector.ScriptTimelineView):
631         (WebInspector.ScriptTimelineView.prototype._processPendingRecords):
632         (WebInspector.ScriptTimelineView.prototype._scriptTimelineRecordRefreshed):
633         * UserInterface/Views/TimelineRecordTreeElement.js:
634         (WebInspector.TimelineRecordTreeElement):
635         * UserInterface/Views/TimelineTabContentView.js:
636         (WebInspector.TimelineTabContentView.isTabAllowed):
637
638 2015-12-17  Matt Baker  <mattbaker@apple.com>
639
640         Web Inspector: REGRESSION (r193913): Popover covers completion suggestions
641         https://bugs.webkit.org/show_bug.cgi?id=152369
642
643         Reviewed by Timothy Hatcher.
644
645         * UserInterface/Views/Variables.css:
646         (:root):
647         Swap popover and tooltip z-index ordering.
648
649 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
650
651         REGRESSION: Web Inspector: console.dir(...) should force allowing object expansion
652         https://bugs.webkit.org/show_bug.cgi?id=152328
653
654         Reviewed by Timothy Hatcher.
655
656         * UserInterface/Views/ConsoleMessageView.js:
657         (WebInspector.ConsoleMessageView.prototype._formatParameter):
658         Propogate the force parameter down.
659
660 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
661
662         Web Inspector: Improve copy of console messages with multiple arguments - console.log(obj1, obj2)
663         https://bugs.webkit.org/show_bug.cgi?id=152330
664
665         Reviewed by Timothy Hatcher.
666
667         * UserInterface/Views/ConsoleMessageView.js:
668         (WebInspector.ConsoleMessageView.prototype.toClipboardString):
669         Copy the inner text of the extra arguments list as well, for
670         console messages with multiple objects. Rearrange the sections
671         that, if there is a stack trace it comes at the end after
672         multiple arguments. If there is no stack trace, include the
673         location info next to the top line, before multiple arguments.
674
675 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
676
677         Web Inspector: Improve copy of console message containing Array and Map output
678         https://bugs.webkit.org/show_bug.cgi?id=152329
679
680         Reviewed by Timothy Hatcher.
681
682         Introduce a real space in the content instead of style specific
683         margins so the existing copy/paste mechanism (innerText)
684         will have spaces between index/key and value.
685
686         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
687         (.object-tree-array-index .index-name): Deleted.
688         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.js:
689         (WebInspector.ObjectTreeArrayIndexTreeElement.prototype._titleFragment):
690         (WebInspector.ObjectTreeArrayIndexTreeElement):
691         * UserInterface/Views/ObjectTreeMapEntryTreeElement.css:
692         (.object-tree-array-index.object-tree-map-entry > .titles > .title > .index-name): Deleted.
693         * UserInterface/Views/ObjectTreeMapEntryTreeElement.js:
694         (WebInspector.ObjectTreeMapEntryTreeElement.prototype.titleFragment):
695         (WebInspector.ObjectTreeMapEntryTreeElement):
696         * UserInterface/Views/ObjectTreeSetIndexTreeElement.js:
697         (WebInspector.ObjectTreeSetIndexTreeElement.prototype._titleFragment):
698         (WebInspector.ObjectTreeSetIndexTreeElement):
699
700 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
701
702         Web Inspector: Typing object literal in the console causes a parse error
703         https://bugs.webkit.org/show_bug.cgi?id=141737
704
705         Reviewed by Timothy Hatcher.
706
707         Provide a convenience in console evaluations for JSON object like input.
708         If the console input starts with '{' and ends with '}' wrap the input
709         in parenthesis to force evaluation as an expression.
710
711         For example, input "{a:1}" would be convenience wrapped to "({a:1})"
712         and produce the expected object. This helps avoid the unusual treatment
713         of "{a:1}" as program containing a labeled statement, which is often
714         not what the user expects. And in more realistic cases, like "{a:1, b:2}",
715         produce a SyntaxError.
716
717         * UserInterface/Controllers/RuntimeManager.js:
718         (WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
719         Detect and convenience wrap the given expression.
720
721 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
722
723         Uncaught Exception View has undefined exception URL
724         https://bugs.webkit.org/show_bug.cgi?id=152327
725
726         Reviewed by Darin Adler.
727
728         * UserInterface/Debug/UncaughtExceptionReporter.js:
729         (handleUncaughtException):
730         Use ErrorEvent's filename property, not url which is undefined.
731
732 2015-12-16  Joseph Pecoraro  <pecoraro@apple.com>
733
734         Uncaught Exception: ReferenceError: Can't find variable: resolvedValue
735         https://bugs.webkit.org/show_bug.cgi?id=152326
736
737         Reviewed by Darin Adler.
738
739         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
740         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
741         This identifier is used later on, so assign it here.
742
743 2015-12-15  Joseph Pecoraro  <pecoraro@apple.com>
744
745         Web Inspector: Localize "global code" and "eval code" strings
746         https://bugs.webkit.org/show_bug.cgi?id=152313
747
748         Reviewed by Timothy Hatcher.
749
750         * Localizations/en.lproj/localizedStrings.js:
751         * UserInterface/Models/CallFrame.js:
752         (WebInspector.CallFrame.fromPayload):
753         Localize the strings given to use from the backend.
754
755 2015-12-15  Matt Baker  <mattbaker@apple.com>
756
757         Web Inspector: Convert Sidebar classes to use View
758         https://bugs.webkit.org/show_bug.cgi?id=152274
759
760         Reviewed by Brian Burg.
761
762         Updated Sidebar and SidebarPanel to inherit from View. Mostly mechanical changes.
763         Once the DetailsSection class family inherits from View (https://webkit.org/b/152269),
764         directly modifying a sidebar's 'contentView' element will rarely be necessary.
765
766         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
767         (WebInspector.ApplicationCacheDetailsSidebarPanel):
768
769         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
770         (WebInspector.CSSStyleDetailsSidebarPanel):
771         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.refresh):
772         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._switchPanels):
773         Add/remove panels as subviews of the sidebar.
774         (WebInspector.CSSStyleDetailsSidebarPanel.prototype._filterDidChange):
775
776         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
777         (WebInspector.DOMNodeDetailsSidebarPanel):
778
779         * UserInterface/Views/DebuggerSidebarPanel.js:
780         (WebInspector.DebuggerSidebarPanel):
781         (WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
782
783         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
784         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildLayerInfoSection):
785         (WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
786
787         * UserInterface/Views/NavigationSidebarPanel.js:
788         (WebInspector.NavigationSidebarPanel):
789         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
790         (WebInspector.NavigationSidebarPanel.prototype._updateContentOverflowShadowVisibility):
791
792         * UserInterface/Views/ProbeDetailsSidebarPanel.js:
793         (WebInspector.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
794
795         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
796         (WebInspector.ResourceDetailsSidebarPanel):
797         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshURL):
798         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshImageSizeSection):
799         (WebInspector.ResourceDetailsSidebarPanel.prototype._refreshRequestDataSection):
800
801         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
802         (WebInspector.ScopeChainDetailsSidebarPanel):
803         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh.):
804         (WebInspector.ScopeChainDetailsSidebarPanel.prototype.refresh):
805
806         * UserInterface/Views/SidebarPanel.js:
807         Inherit from View.
808         (WebInspector.SidebarPanel):
809         Replace the content element (the portion of the view excluding navigation
810         bars, filter bars, etc.) with a View object. A sidebar's content can be a mixture
811         of unwrapped DOM elements and View objects. For now, the content view's element
812         will be mutated directly, but once the DetailsSection class family inherits from
813         the View class the handling of details sections will be simplified.
814         (WebInspector.SidebarPanel.prototype.get contentView):
815         (WebInspector.SidebarPanel.prototype.shown):
816         (WebInspector.SidebarPanel.prototype.hidden):
817         (WebInspector.SidebarPanel.prototype.get contentElement): Deleted.
818         Replaced by WebInspector.SidebarPanel.prototype.get contentView.
819
820         * UserInterface/Views/StyleDetailsPanel.js:
821         Inherit from View.
822         (WebInspector.StyleDetailsPanel):
823         (WebInspector.StyleDetailsPanel.prototype.get element): Deleted.
824         Defer to View.element getter.
825
826         * UserInterface/Views/TimelineSidebarPanel.js:
827         (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
828
829         * UserInterface/Views/VisualStyleDetailsPanel.js:
830         (WebInspector.VisualStyleDetailsPanel):
831         (WebInspector.VisualStyleDetailsPanel.prototype._updateSections):
832
833 2015-12-14  Joseph Pecoraro  <pecoraro@apple.com>
834
835         Web Inspector: Stack traces in console incorrectly show "(anonymous function)" for global code
836         https://bugs.webkit.org/show_bug.cgi?id=152280
837
838         Reviewed by Brian Burg.
839
840         * UserInterface/Images/Program.svg: Added.
841         * UserInterface/Images/gtk/Program.svg: Added.
842         Copied from TimelineRecordScriptEvaluated.svg.
843
844         * UserInterface/Models/CallFrame.js:
845         (WebInspector.CallFrame):
846         (WebInspector.CallFrame.prototype.get programCode):
847         Add a new property to check if this call frame is in program code.
848
849         (WebInspector.CallFrame.fromPayload):
850         Detect different sources of program code (global, eval, module).
851
852         * UserInterface/Views/CallFrameIcons.css:
853         (.program-icon .icon):
854         * UserInterface/Views/CallFrameView.js:
855         (WebInspector.CallFrameView.iconClassNameForCallFrame):
856         Give program code the [S] global script icon like in profiles.
857
858 2015-12-14  Joseph Pecoraro  <pecoraro@apple.com>
859
860         Web Inspector: Copy message from console with a stack trace does not include source code locations
861         https://bugs.webkit.org/show_bug.cgi?id=152270
862
863         Reviewed by Timothy Hatcher.
864
865         * UserInterface/Views/ConsoleMessageView.js:
866         (WebInspector.ConsoleMessageView.prototype.toClipboardString):
867         When the the StackTrace was upgraded to a real collection of CallFrame
868         object's the CallFrame's got real SourceCodeLocation properties.
869
870 2015-12-13  Matt Baker  <mattbaker@apple.com>
871
872         Web Inspector: Make TimelineOverview's graph container a subview
873         https://bugs.webkit.org/show_bug.cgi?id=152235
874
875         Reviewed by Brian Burg.
876
877         * UserInterface/Views/TimelineOverview.js:
878         (WebInspector.TimelineOverview):
879         Create graph container subview.
880         (WebInspector.TimelineOverview.prototype._instrumentAdded):
881         Add overview to the graph container view.
882         (WebInspector.TimelineOverview.prototype._instrumentRemoved):
883         Remove overview from the graph container view.
884         (WebInspector.TimelineOverview.prototype.layout):
885         No longer necessary to manually lay out overview graphs.
886         (WebInspector.TimelineOverview.prototype._needsLayout): Deleted.
887         Removed dead code.
888
889 2015-12-12  Matt Baker  <mattbaker@apple.com>
890
891         Web Inspector: CodeMirrorTokenTrackingController handles symbols in class definitions incorrectly
892         https://bugs.webkit.org/show_bug.cgi?id=152218
893
894         Reviewed by Timothy Hatcher.
895
896         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
897         (WebInspector.CodeMirrorTokenTrackingController.prototype._processJavaScriptExpression):
898         Stop checking for object literal shorthand property if an open parenthesis is found.
899         This check became necessary with the introduction of ES6 class syntax.
900
901         * UserInterface/Views/CodeMirrorAdditions.js:
902         Use localState when available, to prevent passing a state that doesn't define a tokenize property.
903
904 2015-12-12  Joseph Pecoraro  <pecoraro@apple.com>
905
906         REGRESSION (r191613): Web Inspector: Can't type spaces when editing DOM nodes
907         https://bugs.webkit.org/show_bug.cgi?id=152173
908
909         Reviewed by Timothy Hatcher.
910
911         * UserInterface/Views/TimelineSidebarPanel.js:
912         (WebInspector.TimelineSidebarPanel):
913         Disable the keyboard shortcuts when they are created. They will be
914         enabled when the panel is shown / hidden. It doesn't really make sense
915         that these are on the sidebar panel instead of the tab, but things
916         will be changing in Timelines soon anyways so just fix this now.
917
918 2015-12-12  Nikita Vasilyev  <nvasilyev@apple.com>
919
920         Web Inspector: "Selected Element" should use sans-serif font, not monospace
921         https://bugs.webkit.org/show_bug.cgi?id=152212
922
923         Reviewed by Timothy Hatcher.
924
925         * UserInterface/Views/ConsoleMessageView.css:
926         (.console-user-command.special-user-log > .console-message-text):
927
928 2015-12-11  Nikita Vasilyev  <nvasilyev@apple.com>
929
930         Web Inspector: When logging strings, detect stack traces and show them as StackTraceView
931         https://bugs.webkit.org/show_bug.cgi?id=149790
932
933         Reviewed by Timothy Hatcher.
934
935         * UserInterface/Models/StackTrace.js:
936         (WebInspector.StackTrace.isLikelyStackTrace): Added.
937
938         * UserInterface/Views/ConsoleMessageView.css:
939         (.console-message-extra-parameter .stack-trace):
940         Display stack trace view on the same line as a list bullet point from
941         console message extra parameter.
942
943         * UserInterface/Views/ConsoleMessageView.js:
944         (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
945         Don't format with string substitutions for stack traces. E.g. there is
946         no need to replace %s with the next argument.
947
948         (WebInspector.ConsoleMessageView.prototype._isStackTrace): Added.
949         (WebInspector.ConsoleMessageView.prototype._formatParameterAsString):
950         Detect stack traces and format them appropriately.
951
952 2015-12-10  Nikita Vasilyev  <nvasilyev@apple.com>
953
954         Web Inspector: debugger dashboard's switching arrows are positioned too close to the dashboard border
955         https://bugs.webkit.org/show_bug.cgi?id=151867
956
957         Reviewed by Timothy Hatcher.
958
959         * UserInterface/Views/DashboardContainerView.css:
960         (.dashboard-container .advance-arrow):
961
962 2015-12-10  Matt Baker  <mattbaker@apple.com>
963
964         Web Inspector: debugger popover should have source location link when showing function source
965         https://bugs.webkit.org/show_bug.cgi?id=151866
966
967         Reviewed by Brian Burg.
968
969         Added source code location link to function popover header.
970
971         * UserInterface/Views/SourceCodeTextEditor.js:
972         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction.didGetDetails):
973         Create source code location link from response payload.
974         (WebInspector.SourceCodeTextEditor.prototype._showPopoverForFunction):
975
976 2015-12-10  Nikita Vasilyev  <nvasilyev@apple.com>
977
978         Web Inspector: [Meta] Unify z-index values in Inspector's CSS
979         https://bugs.webkit.org/show_bug.cgi?id=151978
980
981         Introduce CSS variables for z-index due to recurring issues with incorrectly overlapping elements.
982
983         From now on, all z-index values >= 64 must be defined as variables.
984         Values below 64 must not.
985
986         Reviewed by Timothy Hatcher.
987
988         * UserInterface/Views/Variables.css:
989         (:root):
990         Introduce z-index variables.
991
992         * UserInterface/Debug/UncaughtExceptionReporter.css:
993         (.sheet-container):
994         * UserInterface/Views/BoxModelDetailsSectionRow.css:
995         (.details-section .row.box-model .editing):
996         * UserInterface/Views/CompletionSuggestionsView.css:
997         (.completion-suggestions):
998         * UserInterface/Views/DashboardContainerView.css:
999         (.dashboard-container .advance-arrow):
1000         * UserInterface/Views/DataGrid.css:
1001         (.data-grid .resizer):
1002         * UserInterface/Views/DetailsSection.css:
1003         (.details-section > .header):
1004         (.details-section .details-section > .header):
1005         * UserInterface/Views/FindBanner.css:
1006         (.find-banner):
1007         (.find-banner > button.segmented:active):
1008         * UserInterface/Views/Main.css:
1009         (#docked-resizer):
1010         (.message-text-view):
1011         (.bouncy-highlight):
1012         * UserInterface/Views/Popover.css:
1013         (.popover):
1014         * UserInterface/Views/Resizer.css:
1015         (.resizer):
1016         (.glass-pane-for-drag):
1017         * UserInterface/Views/TimelineOverview.css:
1018         (.timeline-overview > .scroll-container):
1019         * UserInterface/Views/VisualStyleSelectorSection.css:
1020         (.details-section.visual-style-selector-section > .content > .selectors > .selector-list > .section-divider):
1021
1022 2015-12-09  Matt Baker  <mattbaker@apple.com>
1023
1024         Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
1025         https://bugs.webkit.org/show_bug.cgi?id=151876
1026
1027         Reviewed by Brian Burg.
1028
1029         * UserInterface/Base/Main.js:
1030         Use root view singleton instead of creating it explicitly.
1031
1032         * UserInterface/Views/View.js:
1033         (WebInspector.View):
1034         (WebInspector.View.rootView):
1035         Singleton root view access. Lazily create and return a view backed
1036         by the document's body element.
1037         (WebInspector.View.prototype.isDescendantOf):
1038         (WebInspector.View.prototype.insertSubviewBefore):
1039         (WebInspector.View.prototype.removeSubview):
1040         (WebInspector.View.prototype.didMoveToWindow):
1041         Notify the view when it becomes, or is no longer, descended from the root view.
1042         (WebInspector.View.prototype.didMoveToParent):
1043         Notify the view when it's added to, or removed from, a parent view.
1044         (WebInspector.View._scheduleLayoutForView):
1045         (WebInspector.View._cancelScheduledLayoutForView):
1046         (WebInspector.View.prototype.makeRootView): Deleted.
1047         No longer needed.
1048         (WebInspector.View.prototype.didAttach): Deleted.
1049         (WebInspector.View.prototype.didDetach): Deleted.
1050         Replaced by didMoveToParent.
1051
1052 2015-12-09  Brian Burg  <bburg@apple.com>
1053
1054         Web Inspector: control whether to collect and dump protocol messages using a WebInspector.Setting
1055         https://bugs.webkit.org/show_bug.cgi?id=151635
1056
1057         Reviewed by Timothy Hatcher.
1058
1059         When closing and reopening the inspector, the setting for whether
1060         to dump protocol messages should be persisted. Otherwise, enabling
1061         dumping from the debug-only UI will miss the initial flood of
1062         messages that are processed when the Inspector loads initial data.
1063
1064         To support a persistent setting, and build some infrastructure for
1065         more advanced uses of collected protocol messages, this patch adds
1066         a new object to trace protocol events. It gets callbacks for each
1067         and implements the console-dumping functionality previously baked in
1068         to InspectorBackend.
1069
1070         In follow-up patches, other protocol tracers will be added to save
1071         protocol data to disk, marshall it to a higher inspection level,
1072         or provide more fine-grained control over what is logged.
1073
1074         This change moves Setting.js into the Base/ directory,
1075         since it is used by Views, Models, and now Protocol classes.
1076
1077         * UserInterface/Base/Setting.js: Renamed from Source/WebInspectorUI/UserInterface/Models/Setting.js.
1078         (WebInspector.Setting):
1079         (WebInspector.Setting.prototype.get name):
1080         (WebInspector.Setting.prototype.get value):
1081         (WebInspector.Setting.prototype.set value):
1082         * UserInterface/Main.html:
1083         * UserInterface/Protocol/InspectorBackend.js:
1084         (InspectorBackendClass):
1085         (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
1086         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
1087
1088             We still want to support the legacy way to enable dumping:
1089             `InspectorBackend.dumpInspectorProtocolMessages = true`. This
1090             is because some tests always use it, and it's easier to set this
1091             flag in a custom Bootstrap.js file than to configure the Setting.
1092
1093         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
1094         (InspectorBackendClass.prototype.get dumpInspectorTimeStats):
1095
1096             We still want to support the legacy way to enable dumping:
1097             `InspectorBackend.dumpInspectorTimeStats = true`. This is
1098             because MessageDispatcher checks this flag for its logging.
1099
1100         (InspectorBackendClass.prototype.set activeTracer):
1101         (InspectorBackendClass.prototype.get activeTracer):
1102
1103             Set the active tracer, finalizing and removing any active tracer
1104             if one exists. If removing a custom tracer (setting to null), then
1105             re-sync activeTracer with the automatic tracing Setting.
1106
1107         (InspectorBackendClass.prototype.dispatch):
1108         (InspectorBackendClass.prototype._startOrStopAutomaticTracing):
1109
1110             Sync the Setting with activeTracer. If an custom tracer is active,
1111             don't replace it with the automatic logging tracer.
1112
1113         (InspectorBackendClass.prototype._sendCommandToBackendWithCallback):
1114         (InspectorBackendClass.prototype._sendCommandToBackendExpectingPromise):
1115         (InspectorBackendClass.prototype._sendMessageToBackend):
1116         (InspectorBackendClass.prototype._dispatchResponse):
1117         (InspectorBackendClass.prototype._dispatchEvent):
1118         (InspectorBackendClass.prototype._flushPendingScripts):
1119         * UserInterface/Protocol/LoggingProtocolTracer.js: Added.
1120         (WebInspector.LoggingProtocolTracer):
1121         (WebInspector.LoggingProtocolTracer.prototype.set dumpMessagesToConsole):
1122         (WebInspector.LoggingProtocolTracer.prototype.get dumpMessagesToConsole):
1123         (WebInspector.LoggingProtocolTracer.prototype.set dumpTimingDataToConsole):
1124         (WebInspector.LoggingProtocolTracer.prototype.get dumpTimingDataToConsole):
1125         (WebInspector.LoggingProtocolTracer.prototype.logFrontendException):
1126         (WebInspector.LoggingProtocolTracer.prototype.logProtocolError):
1127         (WebInspector.LoggingProtocolTracer.prototype.logFrontendRequest):
1128         (WebInspector.LoggingProtocolTracer.prototype.logWillHandleResponse):
1129         (WebInspector.LoggingProtocolTracer.prototype.logDidHandleResponse):
1130         (WebInspector.LoggingProtocolTracer.prototype.logWillHandleEvent):
1131         (WebInspector.LoggingProtocolTracer.prototype.logDidHandleEvent):
1132         (WebInspector.LoggingProtocolTracer.prototype._processEntry):
1133         * UserInterface/Protocol/ProtocolTracer.js: Added.
1134         (WebInspector.ProtocolTracer.prototype.logStarted):
1135         (WebInspector.ProtocolTracer.prototype.logFrontendException):
1136         (WebInspector.ProtocolTracer.prototype.logProtocolError):
1137         (WebInspector.ProtocolTracer.prototype.logFrontendRequest):
1138         (WebInspector.ProtocolTracer.prototype.logWillHandleResponse):
1139         (WebInspector.ProtocolTracer.prototype.logDidHandleResponse):
1140         (WebInspector.ProtocolTracer.prototype.logWillHandleEvent):
1141         (WebInspector.ProtocolTracer.prototype.logDidHandleEvent):        (WebInspector.ProtocolTracer.prototype.logFinished):
1142         (WebInspector.ProtocolTracer):
1143         * UserInterface/Test.html:
1144
1145 2015-12-09  Brian Burg  <bburg@apple.com>
1146
1147         Web Inspector: zoom with Ctrl +/- doesn't work correctly when inspector is docked
1148         https://bugs.webkit.org/show_bug.cgi?id=152076
1149
1150         Reviewed by Timothy Hatcher.
1151
1152         When computing the new width or height of the inspector, take the zoom level into
1153         account. window.inner{Width,Height} are in document pixels, but we need to specify
1154         device pixels to InspectorFrontendHost.
1155
1156         * UserInterface/Base/Main.js:
1157
1158 2015-12-08  Joseph Pecoraro  <pecoraro@apple.com>
1159
1160         Web Inspector: Workaround arrow function issue in TimelineOverviewGraph.js
1161         https://bugs.webkit.org/show_bug.cgi?id=152031
1162
1163         Reviewed by Timothy Hatcher.
1164
1165         * UserInterface/Views/TimelineOverviewGraph.js:
1166         (WebInspector.TimelineOverviewGraph.prototype._needsSelectedRecordLayout):
1167         Workaround an existing arrow function issue by moving off of arrow functions here.
1168
1169 2015-12-08  Matt Baker  <mattbaker@apple.com>
1170
1171         Web Inspector: Add a hidden property to TreeOutline
1172         https://bugs.webkit.org/show_bug.cgi?id=152014
1173
1174         Reviewed by Timothy Hatcher.
1175
1176         * UserInterface/Views/NavigationSidebarPanel.js:
1177         Removed static property for "hidden" CSS class. No longer used.
1178         (WebInspector.NavigationSidebarPanel.prototype.set contentTreeOutline):
1179         Fixed bug in order of visibleTreeOutlines add/remove.
1180         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
1181
1182         * UserInterface/Views/TimelineSidebarPanel.js:
1183         (WebInspector.TimelineSidebarPanel):
1184         (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
1185
1186         * UserInterface/Views/TreeOutline.js:
1187         (WebInspector.TreeOutline):
1188         (WebInspector.TreeOutline.prototype.get hidden):
1189         (WebInspector.TreeOutline.prototype.set hidden):
1190         Added hidden property, set DOM element hidden attribute.
1191         (WebInspector.TreeElement.prototype.set hidden):
1192         Remove CSS class, set DOM element hidden attribute.
1193         (WebInspector.TreeElement.prototype._attach):
1194         (WebInspector.TreeElement.prototype.expand):
1195
1196 2015-12-08  Matt Baker  <mattbaker@apple.com>
1197
1198         Web Inspector: Global Breakpoints should always be visible
1199         https://bugs.webkit.org/show_bug.cgi?id=151066
1200
1201         Reviewed by Timothy Hatcher.
1202
1203         * UserInterface/Views/DebuggerSidebarPanel.js:
1204         (WebInspector.DebuggerSidebarPanel):
1205         Turn off filtering for Global Breakpoints elements.
1206
1207         * UserInterface/Views/NavigationSidebarPanel.js:
1208         (WebInspector.NavigationSidebarPanel.prototype.suppressFilteringOnTreeElements):
1209         Allow filtering to be turned off for specific tree elements.
1210         (WebInspector.NavigationSidebarPanel.prototype.applyFiltersToTreeElement):
1211         Make element visible if filtering suppressed.
1212         (WebInspector.NavigationSidebarPanel.prototype._checkForEmptyFilterResults):
1213         Visible elements with filtering disabled aren't considered when
1214         showing/hiding the empty content placeholder.
1215
1216 2015-12-07  Brian Burg  <bburg@apple.com>
1217
1218         Web Inspector: Uncaught Exception page should have better styles and handle more error cases
1219         https://bugs.webkit.org/show_bug.cgi?id=151923
1220
1221         Reviewed by Timothy Hatcher.
1222
1223         Restructure the Uncaught Exception reporting page to act more like
1224         a modal sheet. Distinguish between uncaught exceptions before and
1225         after the frontend is initially loaded. If the frontend is loaded,
1226         add a clickable link that dismisses the sheet and ignores the error.
1227         If the inspector finished loading, then only show at most one
1228         exception at a time, since subsequent interactions can cause spurious
1229         errors when the sheet is active.
1230
1231         Split existing code into multiple functions so it's easier to follow.
1232         Add miscellaneous guards against internal corruption and weird cases.
1233
1234         * UserInterface/Base/Main.js:
1235         (WebInspector.contentLoaded): Store the flag on the global object
1236         in case WebInspector becomes shadowed or otherwise unusable.
1237
1238         * UserInterface/Debug/UncaughtExceptionReporter.css: Renamed from Source/WebInspectorUI/UserInterface/Debug/CatchEarlyErrors.css.
1239         (div.sheet-container):
1240         (div.uncaught-exception-sheet):
1241         (div.uncaught-exception-sheet a):
1242         (div.uncaught-exception-sheet a:active):
1243         (div.uncaught-exception-sheet h2):
1244         (div.uncaught-exception-sheet h1 > img):
1245         (div.uncaught-exception-sheet h2 > img):
1246         (div.uncaught-exception-sheet dl):
1247         (div.uncaught-exception-sheet dt):
1248         (div.uncaught-exception-sheet dd):
1249         (div.uncaught-exception-sheet ul):
1250         (div.uncaught-exception-sheet li):
1251         * UserInterface/Debug/UncaughtExceptionReporter.js: Renamed from CatchEarlyErrors.js.
1252         (stopEventPropagation): Allow clicking whitelisted links on the sheet.
1253         (blockEventHandlers):
1254         (unblockEventHandlers):
1255         (handleUncaughtException):
1256         (dismissErrorSheet):
1257         (createErrorSheet.insertWordBreakCharacters):
1258         (createErrorSheet):
1259         (handleLinkClick):
1260         * UserInterface/Main.html:
1261         * UserInterface/Protocol/MessageDispatcher.js:
1262         (WebInspector.dispatchMessageFromBackend): Don't try to dispatch
1263         messages from the backend when showing the error sheet. They will
1264         probably fail, so suspend dispatching until the sheet is dismissed.
1265
1266 2015-12-06  Devin Rousso  <dcrousso+webkit@gmail.com>
1267
1268         Web Inspector: Regression (r192936) - changing selectors in the visual styles sidebar is broken
1269         https://bugs.webkit.org/show_bug.cgi?id=151924
1270
1271         Reviewed by Brian Burg.
1272
1273         * UserInterface/Views/VisualStyleSelectorSection.js:
1274         (WebInspector.VisualStyleSelectorSection):
1275         (WebInspector.VisualStyleSelectorSection.prototype._selectorChanged):
1276         Now uses an event listener instead of an "onselect" function.
1277
1278 2015-12-06  Matt Baker  <mattbaker@apple.com>
1279
1280         Web Inspector: Comparisons in setters should use the massaged value (" = x || 0/false/null/etc")
1281         https://bugs.webkit.org/show_bug.cgi?id=151910
1282
1283         Reviewed by Timothy Hatcher.
1284
1285         Updated setters that use default values to convert falsy inputs to the default value
1286         before compariing against the current value.
1287
1288         * UserInterface/Models/TimelineMarker.js:
1289         (WebInspector.TimelineMarker.prototype.set time):
1290         Assert new value is a number.
1291
1292         * UserInterface/Views/DataGrid.js:
1293         (WebInspector.DataGridNode.prototype.set hidden):
1294         (WebInspector.DataGridNode.prototype.set data):
1295         Assert new value is of type object. Use shallowEqual compare before setting value.
1296
1297         * UserInterface/Views/GeneralTreeElement.js:
1298         (WebInspector.GeneralTreeElement.prototype.set classNames):
1299         Use shallowEqual compare before setting value.
1300         (WebInspector.GeneralTreeElement.prototype.set mainTitle):
1301         (WebInspector.GeneralTreeElement.prototype.set subtitle):
1302         (WebInspector.GeneralTreeElement.prototype.set status):
1303         (WebInspector.GeneralTreeElement.prototype.set tooltipHandledSeparately):
1304
1305         * UserInterface/Views/TimelineOverview.js:
1306         (WebInspector.TimelineOverview.prototype.set startTime):
1307         (WebInspector.TimelineOverview.prototype.set currentTime):
1308         (WebInspector.TimelineOverview.prototype.set endTime):
1309         (WebInspector.TimelineOverview.prototype.set scrollStartTime):
1310         (WebInspector.TimelineOverview.prototype.set selectionStartTime):
1311         Check current ruler selectionStartTime before setting value.
1312
1313         * UserInterface/Views/TimelineOverviewGraph.js:
1314         (WebInspector.TimelineOverviewGraph.prototype.set zeroTime):
1315         (WebInspector.TimelineOverviewGraph.prototype.set startTime):
1316         (WebInspector.TimelineOverviewGraph.prototype.set endTime):
1317         (WebInspector.TimelineOverviewGraph.prototype.set currentTime):
1318
1319         * UserInterface/Views/TimelineRuler.js:
1320         (WebInspector.TimelineRuler):
1321         (WebInspector.TimelineRuler.prototype.set allowsClippedLabels):
1322         (WebInspector.TimelineRuler.prototype.set formatLabelCallback):
1323         (WebInspector.TimelineRuler.prototype.set allowsTimeRangeSelection):
1324         (WebInspector.TimelineRuler.prototype.set zeroTime):
1325         (WebInspector.TimelineRuler.prototype.set startTime):
1326         (WebInspector.TimelineRuler.prototype.set endTime):
1327         (WebInspector.TimelineRuler.prototype.set secondsPerPixel):
1328         (WebInspector.TimelineRuler.prototype.set selectionStartTime):
1329         (WebInspector.TimelineRuler.prototype.set selectionEndTime):
1330         (WebInspector.TimelineRuler.prototype.set duration): Deleted.
1331         The ruler duration and "pinned" state are controlled by setting an end
1332         time. Removed since it wasn't being used, and there shouldn't be two
1333         ways to the exact same thing.
1334
1335         * UserInterface/Views/TimelineView.js:
1336         (WebInspector.TimelineView.prototype.set zeroTime):
1337         (WebInspector.TimelineView.prototype.set startTime):
1338         (WebInspector.TimelineView.prototype.set endTime):
1339
1340 2015-12-04  Commit Queue  <commit-queue@webkit.org>
1341
1342         Unreviewed, rolling out r193486.
1343         https://bugs.webkit.org/show_bug.cgi?id=151904
1344
1345         Causes Infinite Recursion in Timeline Recording (Requested by
1346         JoePeck on #webkit).
1347
1348         Reverted changeset:
1349
1350         "Web Inspector: when a marked-dirty subview is attached to a
1351         parent View, dirtyDescendantsCount gets out of sync"
1352         https://bugs.webkit.org/show_bug.cgi?id=151876
1353         http://trac.webkit.org/changeset/193486
1354
1355 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
1356
1357         Web Inspector: Uncaught Exception with Reload shortcut in JSContext Inspector
1358         https://bugs.webkit.org/show_bug.cgi?id=151896
1359
1360         Reviewed by Timothy Hatcher.
1361
1362         * UserInterface/Base/Main.js:
1363         (WebInspector.contentLoaded):
1364         Do not implicitly prevent default on these keyboard shortcuts
1365         so we can system beep if we do not do anything.
1366
1367         (WebInspector._reloadPage):
1368         (WebInspector._reloadPageIgnoringCache):
1369         Bail if there is no PageAgent without preventing default for
1370         a beep system beep. Prevent default if we did something.
1371
1372 2015-12-04  Matt Baker  <mattbaker@apple.com>
1373
1374         Web Inspector: when a marked-dirty subview is attached to a parent View, dirtyDescendantsCount gets out of sync
1375         https://bugs.webkit.org/show_bug.cgi?id=151876
1376
1377         Reviewed by Brian Burg.
1378
1379         * UserInterface/Views/NewTabContentView.js:
1380         (WebInspector.NewTabContentView.prototype._updateShownTabs):
1381         Removed workaround added in https://bugs.webkit.org/show_bug.cgi?id=151594.
1382
1383         * UserInterface/Views/View.js:
1384         (WebInspector.View._scheduleLayoutForView):
1385         Always perform a synchronous layout when a view that isn't descended from the
1386         root view schedules a layout.
1387
1388 2015-12-04  Brian Burg  <bburg@apple.com>
1389
1390         Web Inspector: support runtime registration of tab type associations
1391         https://bugs.webkit.org/show_bug.cgi?id=151594
1392
1393         Reviewed by Joseph Pecoraro.
1394
1395         We want to add special tabs that only exist in engineering builds
1396         for debugging purposes. Though the relevant models and views can be
1397         put in the Debug/ directory to exclude them from production builds,
1398         there's no way to register tabs conditionally at runtime; tabs are
1399         hardcoded.
1400
1401         This patch makes it possible to register new tab types at runtime.
1402         First, WebInspector keeps a map of known, registered tab classes.
1403         Details that were hardcoded before---whether to show in New Tab,
1404         whether a tab can be instantiated given the active domains, UI text,
1405         etc.---are now static methods on the base TabContentView or overidden
1406         in its subclasses. Lastly, a public method allows code in Bootstrap.js
1407         to register tabs at runtime. Doing so sends a notification so the
1408         NewTabContentView can show the newly available tab item.
1409
1410         * UserInterface/Base/Main.js:
1411         (WebInspector.contentLoaded):
1412         (WebInspector.isTabTypeAllowed):
1413         (WebInspector.knownTabClasses): Added, used by NewTabContentView.
1414         (WebInspector._createTabContentViewForType): Renamed from _tabContentViewForType.
1415         (WebInspector._rememberOpenTabs):
1416         (WebInspector._updateNewTabButtonState):
1417         (WebInspector._tryToRestorePendingTabs): Added.
1418
1419         Whenever a new tab is registered, try to restore pending tabs, since
1420         an extra tab won't be added initially when production tabs are added.
1421         But, it could have been saved in the Setting for opened tabs.
1422
1423         (WebInspector.showNewTabTab):
1424         (WebInspector.isNewTabWithTypeAllowed):
1425         (WebInspector.createNewTabWithType):
1426         (WebInspector._tabContentViewForType): Deleted.
1427         * UserInterface/Base/Object.js:
1428         * UserInterface/Views/ConsoleTabContentView.js:
1429         (WebInspector.ConsoleTabContentView):
1430         (WebInspector.ConsoleTabContentView.tabInfo): Added.
1431         * UserInterface/Views/DebuggerTabContentView.js:
1432         (WebInspector.DebuggerTabContentView):
1433         (WebInspector.DebuggerTabContentView.tabInfo): Added.
1434         * UserInterface/Views/ElementsTabContentView.js:
1435         (WebInspector.ElementsTabContentView):
1436         (WebInspector.ElementsTabContentView.tabInfo): Added.
1437         (WebInspector.ElementsTabContentView.isTabAllowed): Added.
1438         * UserInterface/Views/NetworkTabContentView.js:
1439         (WebInspector.NetworkTabContentView):
1440         (WebInspector.NetworkTabContentView.tabInfo): Added.
1441         (WebInspector.NetworkTabContentView.isTabAllowed): Added.
1442         * UserInterface/Views/NewTabContentView.js:
1443
1444         Keep a list of shown tab items, so we don't have to query the DOM
1445         to update enabled/disabled state. Put tree construction inside a
1446         layout() override and dirty the view whenever known tab types change.
1447
1448         (WebInspector.NewTabContentView):
1449         (WebInspector.NewTabContentView.tabInfo): Added.
1450         (WebInspector.NewTabContentView.isEphemeral): Added.
1451         (WebInspector.NewTabContentView.shouldSaveTab): Added.
1452         (WebInspector.NewTabContentView.prototype.layout): Added.
1453         (WebInspector.NewTabContentView.prototype._updateShownTabs): Added.
1454         (WebInspector.NewTabContentView.prototype._allowableTabTypes):
1455         (WebInspector.NewTabContentView.prototype._updateTabItems):
1456         (WebInspector.NewTabContentView.prototype.get tabItemElements): Deleted.
1457         * UserInterface/Views/ResourcesTabContentView.js:
1458         (WebInspector.ResourcesTabContentView):
1459         (WebInspector.ResourcesTabContentView.tabInfo): Added.
1460         * UserInterface/Views/SearchTabContentView.js:
1461         (WebInspector.SearchTabContentView):
1462         (WebInspector.SearchTabContentView.tabInfo): Added.
1463         (WebInspector.SearchTabContentView.isEphemeral): Added.
1464         * UserInterface/Views/SettingsTabContentView.js:
1465         (WebInspector.SettingsTabContentView.isTabAllowed): Added.
1466         (WebInspector.SettingsTabContentView.shouldSaveTab): Added.
1467         * UserInterface/Views/StorageTabContentView.js:
1468         (WebInspector.StorageTabContentView):
1469         (WebInspector.StorageTabContentView.tabInfo): Added.
1470         (WebInspector.StorageTabContentView.isTabAllowed): Added.
1471         * UserInterface/Views/TabBrowser.js:
1472         (WebInspector.TabBrowser.showTabForContentView):
1473
1474         Add a workaround for <https://webkit.org/b/151876>. This bug is
1475         revealed by the changes to NewTabContentView in this patch.
1476
1477         * UserInterface/Views/TabContentView.js:
1478         (WebInspector.TabContentView.isTabAllowed): Added.
1479         (WebInspector.TabContentView.isEphemeral): Added.
1480         (WebInspector.TabContentView.shouldSaveTab): Added.
1481         * UserInterface/Views/TimelineTabContentView.js:
1482         (WebInspector.TimelineTabContentView):
1483         (WebInspector.TimelineTabContentView.tabInfo): Added.
1484         (WebInspector.TimelineTabContentView.isTabAllowed): Added.
1485
1486 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
1487
1488         Web Inspector: Remove untested and unused Worker inspection
1489         https://bugs.webkit.org/show_bug.cgi?id=151848
1490
1491         Reviewed by Brian Burg.
1492
1493         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
1494         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
1495         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
1496         * Versions/Inspector-iOS-7.0.json:
1497         * Versions/Inspector-iOS-8.0.json:
1498         * Versions/Inspector-iOS-9.0.json:
1499         Since this was untested in older releases as well, remove
1500         the protocol interfaces for legacy versions.
1501
1502 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
1503
1504         Web Inspector: Specifically Identify the Global Lexical Environment Scope
1505         https://bugs.webkit.org/show_bug.cgi?id=151828
1506
1507         Reviewed by Brian Burg.
1508
1509         * Localizations/en.lproj/localizedStrings.js:
1510         * UserInterface/Controllers/DebuggerManager.js:
1511         (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
1512         * UserInterface/Models/ScopeChainNode.js:
1513         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1514         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1515         Include a new scope type and give it a localized string.
1516
1517 2015-12-03  Anders Carlsson  <andersca@apple.com>
1518
1519         Remove Objective-C GC support
1520         https://bugs.webkit.org/show_bug.cgi?id=151819
1521         rdar://problem/23746991
1522
1523         Reviewed by Dan Bernstein.
1524
1525         * Configurations/Base.xcconfig:
1526
1527 2015-12-03  Matt Baker  <mattbaker@apple.com>
1528
1529         Uncaught Exception in Web Inspector: TypeError: null is not an object (evaluating 'dataGridNode.element.classList')
1530         https://bugs.webkit.org/show_bug.cgi?id=151790
1531
1532         Reviewed by Timothy Hatcher.
1533
1534         * UserInterface/Views/DataGrid.js:
1535         (WebInspector.DataGridNode):
1536         (WebInspector.DataGridNode.prototype.get hidden):
1537         (WebInspector.DataGridNode.prototype.set hidden):
1538         Make hidden a property, so it can be set before the grid node's DOM element exists.
1539         (WebInspector.DataGridNode.prototype.get selectable):
1540         (WebInspector.DataGridNode.prototype.get element):
1541         Add hidden style, if needed, when element is created.
1542
1543         * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
1544         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
1545         (WebInspector.TreeOutlineDataGridSynchronizer):
1546         Don't access the grid node's element directly, since it may not exist yet.
1547
1548 2015-12-02  Joseph Pecoraro  <pecoraro@apple.com>
1549
1550         Web Inspector: Handle YieldExpressions in the ScriptSyntaxTree
1551         https://bugs.webkit.org/show_bug.cgi?id=151730
1552
1553         Reviewed by Brian Burg.
1554
1555         * UserInterface/Models/NativeFunctionParameters.js:
1556         Add the Generator API.
1557
1558         * UserInterface/Models/ScriptSyntaxTree.js:
1559         (WebInspector.ScriptSyntaxTree.prototype._recurse):
1560         (WebInspector.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
1561         Handle YieldExpressions.
1562
1563 2015-12-01  Matt Baker  <mattbaker@apple.com>
1564
1565         Web Inspector: TreeOutline should just dispatch events via WebInspector.Object
1566         https://bugs.webkit.org/show_bug.cgi?id=148067
1567
1568         Reviewed by Timothy Hatcher.
1569
1570         TreeOutline now dispatches most events via WebInspector.Object. The onselect and
1571         ondeselect callbacks are replaced by a SelectionDidChange event, which includes
1572         both the selected and deselected elements in its event data. The onexpand and oncollapse
1573         callbacks are replaced by an ElementDisclosureDidChange event. This is consistent with the
1574         behavior of onhidden, which had no corresponding onvisible callback.
1575
1576         Alas, TimelineView and TreeOutlineDataGridSynchronizer depended on the order in which
1577         TreeOutline.onselect callbacks were chained together. The synchronizer added its
1578         callback after the timeline view, which ensured that the tree and grid were in sync
1579         before the view handled onselect and dispatched a SelectionPathComponentsDidChange.
1580         The change notification causes the view's path components to be read, and timeline
1581         views need the grid selection to be in a valid state to build path components.
1582
1583         This is addressed by having timeline views dispatch SelectionPathComponentsDidChange
1584         events when the grid selection changes, instead of the tree selection. The change
1585         required that the synchronizer no longer suppress notifications when selecting grid nodes.
1586
1587         * UserInterface/Views/DebuggerSidebarPanel.js:
1588         (WebInspector.DebuggerSidebarPanel):
1589         (WebInspector.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
1590         (WebInspector.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
1591
1592         * UserInterface/Views/NavigationSidebarPanel.js:
1593         (WebInspector.NavigationSidebarPanel.prototype.createContentTreeOutline):
1594         (WebInspector.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
1595
1596         * UserInterface/Views/NetworkGridContentView.js:
1597         (WebInspector.NetworkGridContentView):
1598         (WebInspector.NetworkGridContentView.prototype._treeSelectionDidChange):
1599
1600         * UserInterface/Views/ResourceSidebarPanel.js:
1601         (WebInspector.ResourceSidebarPanel):
1602         (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
1603         (WebInspector.ResourceSidebarPanel.prototype._treeElementSelected): Deleted.
1604
1605         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1606         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateCallFramesSection):
1607         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._generateWatchExpressionsSection):
1608         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementAdded):
1609         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._treeElementDisclosureDidChange):
1610         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeExpandHandler): Deleted.
1611         (WebInspector.ScopeChainDetailsSidebarPanel.prototype._objectTreeCollapseHandler): Deleted.
1612
1613         * UserInterface/Views/SearchSidebarPanel.js:
1614         (WebInspector.SearchSidebarPanel):
1615         (WebInspector.SearchSidebarPanel.prototype._treeSelectionDidChange):
1616         (WebInspector.SearchSidebarPanel.prototype._treeElementSelected): Deleted.
1617
1618         * UserInterface/Views/StorageSidebarPanel.js:
1619         (WebInspector.StorageSidebarPanel):
1620         (WebInspector.StorageSidebarPanel._treeSelectionDidChange):
1621
1622         * UserInterface/Views/TimelineDataGrid.js:
1623         (WebInspector.TimelineDataGrid.prototype._createPopoverContent):
1624         (WebInspector.TimelineDataGrid.prototype._popoverCallStackTreeSelectionDidChange):
1625         (WebInspector.TimelineDataGrid):
1626
1627         * UserInterface/Views/TimelineSidebarPanel.js:
1628         (WebInspector.TimelineSidebarPanel):
1629         (WebInspector.TimelineSidebarPanel.prototype._recordingsTreeSelectionDidChange):
1630         (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeSelectionDidChange):
1631         (WebInspector.TimelineSidebarPanel.prototype._timelinesTreeElementSelected): Deleted.
1632
1633         * UserInterface/Views/TimelineView.js:
1634         (WebInspector.TimelineView):
1635         (WebInspector.TimelineView.prototype._treeSelectionDidChange):
1636         (WebInspector.TimelineView.prototype.treeElementSelected):
1637         Don't dispatch SelectionPathComponentsDidChange. Timeline views already do this
1638         in response to grid selection events.
1639
1640         * UserInterface/Views/TreeOutline.js:
1641         (WebInspector.TreeOutline.prototype.appendChild):
1642         (WebInspector.TreeOutline.prototype.insertChild):
1643         (WebInspector.TreeOutline.prototype.removeChildAtIndex):
1644         (WebInspector.TreeOutline.prototype.removeChildren):
1645         (WebInspector.TreeOutline.prototype.removeChildrenRecursive):
1646         (WebInspector.TreeOutline.prototype._treeElementDidChange):
1647         (WebInspector.TreeElement.prototype.set hidden):
1648         (WebInspector.TreeElement.prototype.collapse):
1649         (WebInspector.TreeElement.prototype.expand):
1650         (WebInspector.TreeElement.prototype.select):
1651         (WebInspector.TreeElement.prototype.deselect):
1652         (WebInspector.TreeElement.prototype.get childrenListElement): Deleted.
1653         Removed dead code.
1654
1655         * UserInterface/Views/TreeOutlineDataGridSynchronizer.js:
1656         (WebInspector.TreeOutlineDataGridSynchronizer):
1657         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeSelectionDidChange):
1658         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementAdded):
1659         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementRemoved):
1660         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementDisclosureDidChange):
1661         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementVisibilityDidChange):
1662         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onadd): Deleted.
1663         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onremove): Deleted.
1664         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onexpand): Deleted.
1665         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.oncollapse): Deleted.
1666         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onhidden): Deleted.
1667         (WebInspector.TreeOutlineDataGridSynchronizer.treeOutline.onselect): Deleted.
1668         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementSelected): Deleted.
1669         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementExpanded): Deleted.
1670         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementCollapsed): Deleted.
1671         (WebInspector.TreeOutlineDataGridSynchronizer.prototype._treeElementHiddenChanged): Deleted.
1672
1673         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
1674         (WebInspector.VisualStyleCommaSeparatedKeywordEditor):
1675         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeSelectionDidChange):
1676         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype._treeElementSelected): Deleted.
1677
1678 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
1679
1680         Web Inspector: Timestamp in Tooltip of Event Markers is incorrect
1681         https://bugs.webkit.org/show_bug.cgi?id=151722
1682
1683         Reviewed by Timothy Hatcher.
1684
1685         * UserInterface/Views/TimelineRuler.js:
1686         (WebInspector.TimelineRuler.prototype.addMarker):
1687         Convert the marker's time, to be relative to the start of the recording.
1688
1689 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
1690
1691         Unreviewed common typo fix "occurance" => "occurrence".
1692
1693         * Scripts/combine-resources.pl:
1694         (concatenateFiles):
1695
1696 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
1697
1698         Web Inspector: Spacebar to toggle Timeline recording doesn't work in Timeline tab after reloading the page
1699         https://bugs.webkit.org/show_bug.cgi?id=151530
1700
1701         Reviewed by Timothy Hatcher.
1702
1703         If reloading the page caused the console to clear, that was triggering
1704         the console prompt to be focused. When the console prompt is focused,
1705         keyboard input like Spacebar, was just inputing characters instead of
1706         triggering the keyboard shortcut that was expected.
1707
1708         This also means that console.clear() in the inspected page would cause
1709         the inspector to focus the console. That is unexpected as well.
1710
1711         Focusing the console prompt whenever the console log is cleared
1712         is not ideal. If we do want to focus the prompt the caller should
1713         make that determination, not clear.
1714
1715         * UserInterface/Controllers/JavaScriptLogViewController.js:
1716         (WebInspector.JavaScriptLogViewController.prototype.clear):
1717
1718 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
1719
1720         Web Inspector: Update Timeline UI based on the Instruments in the Active Recording
1721         https://bugs.webkit.org/show_bug.cgi?id=151374
1722
1723         Reviewed by Brian Burg.
1724
1725         * UserInterface/Views/TimelineRecordingContentView.js:
1726         (WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
1727         Modernize as I was in this code while looking into this patch.
1728
1729         * UserInterface/Views/TimelineSidebarPanel.css:
1730         (.sidebar > .panel.navigation.timeline > .title-bar.timeline-events): Deleted.
1731         (.sidebar > .panel.navigation.timeline > .timelines-content): Deleted.
1732         These defaults are no longer necessary, the UI overrides them anyways.
1733
1734         * UserInterface/Views/TimelineSidebarPanel.js:
1735         (WebInspector.TimelineSidebarPanel):
1736         Include both the basic and rendering frames toolbars. They will be
1737         mutually exclusive based on if the FPSIntrument is available.
1738
1739         (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
1740         (WebInspector.TimelineSidebarPanel.prototype._clearInstruments):
1741         When loading a new Recording clear the UI.
1742
1743         (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
1744         (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
1745         (WebInspector.TimelineSidebarPanel.prototype._addedFPSInstrument):
1746         (WebInspector.TimelineSidebarPanel.prototype._removedFPSInstrument):
1747         Handle toggling the toolbars when the FPS instrument is added/removed.
1748
1749         (WebInspector.TimelineSidebarPanel.prototype._timelineCountChanged):
1750         (WebInspector.TimelineSidebarPanel.prototype._updateTimelineOverviewHeight):
1751         (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
1752         Properly update the sidebar's understanding of the TimelineOverview size.
1753
1754 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
1755
1756         Web Inspector: Initial support for variable timelines
1757         https://bugs.webkit.org/show_bug.cgi?id=151372
1758
1759         Reviewed by Brian Burg.
1760
1761         * UserInterface/Controllers/TimelineManager.js:
1762         (WebInspector.TimelineManager.defaultInstruments):
1763         (WebInspector.TimelineManager.prototype._loadNewRecording):
1764         Keep the status quo which is the same set of instruments for each recording.
1765
1766         (WebInspector.TimelineManager.prototype.startCapturing):
1767         (WebInspector.TimelineManager.prototype.stopCapturing):
1768         Push responsibility of capturing to the Recording, which has a specific set
1769         of instruments that know what they need to turn on an off from the backend.
1770         
1771         * UserInterface/Main.html:
1772         * UserInterface/Models/Instrument.js: Added.
1773         (WebInspector.Instrument):
1774         (WebInspector.Instrument.startLegacyTimelineAgent):
1775         (WebInspector.Instrument.stopLegacyTimelineAgent):
1776         (WebInspector.Instrument.prototype.get timelineRecordType):
1777         (WebInspector.Instrument.prototype.startInstrumentation):
1778         (WebInspector.Instrument.prototype.stopInstrumentation):
1779         New class representing something that can be turned on and off
1780         from the backend and produces a set of Timeline record types.
1781         Currently instruments are 1-to-1 to a Timeline type.
1782
1783         * UserInterface/Models/LayoutInstrument.js: Added.
1784         (WebInspector.LayoutInstrument.prototype.get timelineRecordType):
1785         (WebInspector.LayoutInstrument):
1786         * UserInterface/Models/NetworkInstrument.js: Added.
1787         (WebInspector.NetworkInstrument.prototype.get timelineRecordType):
1788         (WebInspector.NetworkInstrument.prototype.startInstrumentation):
1789         (WebInspector.NetworkInstrument.prototype.stopInstrumentation):
1790         (WebInspector.NetworkInstrument):
1791         * UserInterface/Models/ScriptInstrument.js: Added.
1792         (WebInspector.ScriptInstrument.prototype.get timelineRecordType):
1793         (WebInspector.ScriptInstrument):
1794         The default set of instruments. Currently they all enable the TimelineAgent,
1795         so they share code to enable/disable in the base class to avoid duplication.
1796
1797         * UserInterface/Models/FPSInstrument.js: Added.
1798         (WebInspector.FPSInstrument):
1799         (WebInspector.FPSInstrument.supported):
1800         (WebInspector.FPSInstrument.prototype.get timelineRecordType):
1801         Provide a "supported" static method and simplify other code that
1802         checks whether or not RenderingFrames is available or not.
1803
1804
1805         * UserInterface/Models/Timeline.js:
1806         (WebInspector.Timeline.prototype.get displayName): Deleted.
1807         (WebInspector.Timeline.prototype.get iconClassName): Deleted.
1808         Move these to a View class, as this is primarily View logic.
1809
1810         * UserInterface/Models/TimelineRecording.js:
1811         (WebInspector.TimelineRecording):
1812         (WebInspector.TimelineRecording.prototype.get instruments):
1813         (WebInspector.TimelineRecording.prototype.start):
1814         (WebInspector.TimelineRecording.prototype.stop):
1815         (WebInspector.TimelineRecording.prototype.timelineForInstrument):
1816         (WebInspector.TimelineRecording.prototype.addInstrument):
1817         (WebInspector.TimelineRecording.prototype.removeInstrument):
1818         (WebInspector.TimelineRecording.prototype.addEventMarker):
1819         (WebInspector.TimelineRecording.prototype.addTimeline): Deleted.
1820         (WebInspector.TimelineRecording.prototype.removeTimeline): Deleted.
1821         A recording now has a set of Instruments and its own start/stop
1822         which starts/stops its set of Instruments! Treat Instruments as
1823         the variable property of a Recording instead of Timelines.
1824     
1825         * UserInterface/Views/TimelineOverview.js:
1826         (WebInspector.TimelineOverview):
1827         (WebInspector.TimelineOverview.prototype._instrumentAdded):
1828         (WebInspector.TimelineOverview.prototype._instrumentRemoved):
1829         (WebInspector.TimelineOverview.prototype._timelineAdded): Deleted.
1830         (WebInspector.TimelineOverview.prototype._timelineRemoved): Deleted.
1831         * UserInterface/Views/TimelineRecordingContentView.js:
1832         (WebInspector.TimelineRecordingContentView):
1833         (WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
1834         (WebInspector.TimelineRecordingContentView.prototype._instrumentRemoved):
1835         (WebInspector.TimelineRecordingContentView.prototype._timelineAdded): Deleted.
1836         (WebInspector.TimelineRecordingContentView.prototype._timelineRemoved): Deleted.
1837         * UserInterface/Views/TimelineSidebarPanel.js:
1838         (WebInspector.TimelineSidebarPanel):
1839         (WebInspector.TimelineSidebarPanel.displayNameForTimeline):
1840         (WebInspector.TimelineSidebarPanel.iconClassNameForTimeline):
1841         (WebInspector.TimelineSidebarPanel.prototype.updateFrameSelection):
1842         (WebInspector.TimelineSidebarPanel.prototype.restoreStateFromCookie):
1843         (WebInspector.TimelineSidebarPanel.prototype._recordingSelected):
1844         (WebInspector.TimelineSidebarPanel.prototype._instrumentAdded):
1845         (WebInspector.TimelineSidebarPanel.prototype._instrumentRemoved):
1846         (WebInspector.TimelineSidebarPanel.prototype._changeViewMode):
1847         (WebInspector.TimelineSidebarPanel.prototype._timelineAdded): Deleted.
1848         (WebInspector.TimelineSidebarPanel.prototype._timelineRemoved): Deleted.
1849         Update all TimelineAdded/TimelineRemoved clients to instead check
1850         InstrumentAdded/InstrumentRemoved. Immediately convert from an Instrument
1851         to a Timeline to keep the patch simple.
1852
1853 2015-12-01  Joseph Pecoraro  <pecoraro@apple.com>
1854
1855         Web Inspector: Broken Inspector when resources are minified
1856         https://bugs.webkit.org/show_bug.cgi?id=151711
1857
1858         Reviewed by Timothy Hatcher.
1859
1860         * Scripts/combine-resources.pl:
1861         (concatenateFiles):
1862         Provide a way to just strip resources matches a pattern.
1863
1864         * Scripts/copy-user-interface-resources.pl:
1865         Strip "Debug/" resources before combining / minifying others.
1866
1867         * UserInterface/Views/View.js:
1868         (WebInspector.View.prototype.makeRootView):
1869         (WebInspector.View.prototype.didDetach):
1870         Address warnings from the console.assert stripping phase
1871         for console.assert statements lacking a trailing semicolon.
1872
1873 2015-11-30  Brian Burg  <bburg@apple.com>
1874
1875         Web Inspector: show something useful when the inspector frontend fails to load
1876         https://bugs.webkit.org/show_bug.cgi?id=151643
1877
1878         Reviewed by Timothy Hatcher.
1879
1880         When a parse error or other early error happens before the inspector
1881         is fully loaded, we can't use the second-level inspector to tell what's
1882         going on. It would be better to catch any early errors and list them.
1883
1884         This patch adds an error page that shows the early errors that happened
1885         during loading. It provides a list of errors, a link to reload the
1886         inspector, and a link to submit a pre-filled bug report about the error.
1887
1888         For now, this page only shows up in engineering builds because it's
1889         located in the Debug/ directory. We can move it later when it works
1890         better in all cases. Follow-up patches can address smaller issues,
1891         such as the transparent title bar and broken text selection.
1892
1893          * UserInterface/Debug/CatchEarlyErrors.css: Added.
1894          * UserInterface/Debug/CatchEarlyErrors.js: Added.
1895          * UserInterface/Main.html:
1896          * UserInterface/Main.js: Abort setting up the UI if something happened.
1897
1898 2015-11-30  Brian Burg  <bburg@apple.com>
1899
1900         Web Inspector: delete-by-word and similar shortcuts should add text to the WebCore kill ring
1901         https://bugs.webkit.org/show_bug.cgi?id=151312
1902
1903         Reviewed by Darin Adler.
1904
1905         Add support for other kill ring-eligible keybindinsg, such as
1906         deleting by word, group, or line forwards and backwards.
1907
1908         * UserInterface/Controllers/CodeMirrorTextKillController.js:
1909         (WebInspector.CodeMirrorTextKillController):
1910         (WebInspector.CodeMirrorTextKillController.prototype._handleTextKillCommand): Renamed from _handleKillLine.
1911
1912             Parameterize the function so it can handle any keybinding and
1913             command. Take a kill ring insertion mode argument, too.
1914
1915         (WebInspector.CodeMirrorTextKillController.prototype._handleTextChange):
1916
1917             Add some special casing for changes received from Delete Line
1918             (Cmd-D) so the right text is added to the kill ring. Thread the
1919             kill ring insertion mode to the frontend host call.
1920
1921         (WebInspector.CodeMirrorTextKillController.prototype._handleKillLine): Deleted.
1922
1923 2015-11-29  Brian Burg  <bburg@apple.com>
1924
1925         Web Inspector: Add context menu item to Reload the Inspector
1926         https://bugs.webkit.org/show_bug.cgi?id=141742
1927
1928         Reviewed by Timothy Hatcher.
1929
1930         Add a global context menu and global shortcut (Cmd-Opt-Shift-R) to
1931         reload the Web Inspector frontend without closing the browser.
1932
1933         This should make it possible to more quickly fix typos, small nits,
1934         etc. without having to relaunch. It might also make state
1935         restoration bugs more visible in engineering builds, since there
1936         is hardly any delay between seeing the old and reloaded frontends.
1937
1938         Note that this functionality reloads scripts from the configuration's
1939         build directory, so you still need to "build" WebInspectorUI to ensure
1940         that any changed files are properly minified and staged.
1941
1942         * UserInterface/Base/Main.js:
1943         (WebInspector.unlocalizedString):
1944
1945             Added. Make it obvious when strings are intentionally not localized.
1946
1947         (WebInspector._contextMenuRequested):
1948
1949             If the "Show Debug UI" setting is available and true, add
1950             a global "Reload Web Inspector" menu item to every context
1951             menu. Otherwise, don't eagerly create a context menu.
1952         * UserInterface/Debug/Bootstrap.js: Add Cmd-Opt-Shift-R shortcut.
1953
1954 2015-11-29  Brian Burg  <bburg@apple.com>
1955
1956         Web Inspector: allow multiple UI components to add menu items upon getting a "contextmenu" event
1957         https://bugs.webkit.org/show_bug.cgi?id=151629
1958
1959         Reviewed by Timothy Hatcher.
1960
1961         The existing Context Menu system assumes that only one UI component
1962         will need to provide context menu items. But in some scenarios, there
1963         are multiple UI components that could provide relevant menu items. For
1964         example, right-clicking on an DOM element in the console should show
1965         menu items relevant to 1) the DOM element, 2) the console in general,
1966         and 3) global menu items. Existing code shows menu items provided by
1967         the first object that handles the event and calls ContextMenu.show().
1968
1969         This patch changes behavior so that a context menu can be built up
1970         by multiple 'contextmenu' event handlers. A ContextMenu instance is
1971         hidden on the 'contextmenu' event object; client code calls a
1972         factory method that digs out this existing context menu or creates a
1973         new one as needed. To actually show the context menu through the
1974         InspectorFrontendHost methods, the top-level app controller adds a
1975         bubbling listener for 'contextmenu' and shows the event's context
1976         menu if one has been created.
1977
1978         Along the way, do some cleanup. Do s/var/let/, arrowize some functions,
1979         use Array.{map,some}, and simplify some other code as a result.
1980
1981         No new tests yet, since we can't trigger context menu easily from
1982         an inspector test. All affected context menus were manually verified.
1983
1984         * UserInterface/Base/Main.js:
1985         (WebInspector.contentLoaded):
1986         * UserInterface/Controllers/BreakpointPopoverController.js:
1987         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems):
1988         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.editBreakpoint): Deleted.
1989         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.removeBreakpoint): Deleted.
1990         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleBreakpoint): Deleted.
1991         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.toggleAutoContinue): Deleted.
1992         (WebInspector.BreakpointPopoverController.prototype.appendContextMenuItems.revealOriginalSourceCodeLocation): Deleted.
1993         * UserInterface/Views/BreakpointTreeElement.js:
1994         (WebInspector.BreakpointTreeElement.prototype.oncontextmenu):
1995         * UserInterface/Views/CSSStyleDeclarationSection.js:
1996         * UserInterface/Views/ContextMenu.js:
1997         (WebInspector.ContextMenuItem.prototype._buildDescriptor):
1998         (WebInspector.ContextMenuItem):
1999         (WebInspector.ContextSubMenuItem.prototype.appendItem):
2000         (WebInspector.ContextSubMenuItem.prototype.appendSubMenuItem):
2001         (WebInspector.ContextSubMenuItem.prototype.appendCheckboxItem):
2002         (WebInspector.ContextSubMenuItem.prototype._pushItem):
2003         (WebInspector.ContextSubMenuItem.prototype._buildDescriptor):
2004         (WebInspector.ContextSubMenuItem):
2005         (WebInspector.ContextMenu.createFromEvent):
2006         (WebInspector.ContextMenu.prototype.show):
2007         (WebInspector.ContextMenu.prototype.handleEvent):
2008         (WebInspector.ContextMenu.prototype._buildDescriptor):
2009         * UserInterface/Views/DOMTreeOutline.js:
2010         (WebInspector.DOMTreeOutline.prototype._contextMenuEventFired):
2011         (WebInspector.DOMTreeOutline.prototype._populateContextMenu.logElement):
2012         (WebInspector.DOMTreeOutline.prototype._populateContextMenu):
2013         * UserInterface/Views/DataGrid.js:
2014         (WebInspector.DataGrid.prototype._contextMenuInDataTable):
2015         * UserInterface/Views/DebuggerSidebarPanel.js:
2016         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
2017         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.removeAllResourceBreakpoints): Deleted.
2018         (WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement.toggleAllResourceBreakpoints): Deleted.
2019         * UserInterface/Views/LogContentView.js:
2020         (WebInspector.LogContentView.prototype._handleContextMenuEvent):
2021         * UserInterface/Views/ObjectPreviewView.js:
2022         (WebInspector.ObjectPreviewView.prototype._contextMenuHandler):
2023         (WebInspector.ObjectPreviewView):
2024         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
2025         (WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler):
2026         (WebInspector.ObjectTreeBaseTreeElement.prototype._appendMenusItemsForObject):
2027         (WebInspector.ObjectTreeBaseTreeElement):
2028         * UserInterface/Views/SourceCodeTextEditor.js:
2029         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
2030         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.continueToLocation): Deleted.
2031         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.addBreakpoint): Deleted.
2032         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.revealInSidebar): Deleted.
2033         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.removeBreakpoints): Deleted.
2034         (WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu.toggleBreakpoints): Deleted.
2035         * UserInterface/Views/TabBarItem.js:
2036         (WebInspector.TabBarItem.prototype._handleContextMenuEvent):
2037         (WebInspector.TabBarItem):
2038         (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeTab): Deleted.
2039         (WebInspector.TabBarItem.prototype._handleContextMenuEvent.closeOtherTabs): Deleted.
2040         * UserInterface/Views/TimelineSidebarPanel.js:
2041         (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar):
2042         (WebInspector.TimelineSidebarPanel.prototype._contextMenuNavigationBarOrStatusBar.toggleReplayInterface): Deleted.
2043         * UserInterface/Views/Toolbar.js:
2044         (WebInspector.Toolbar.prototype._handleContextMenuEvent):
2045         * UserInterface/Views/VisualStyleSelectorTreeItem.js:
2046         (WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent):
2047
2048 2015-11-28  Devin Rousso  <dcrousso+webkit@gmail.com>
2049
2050         Web Inspector: Styles sidebar placeholder is misaligned
2051         https://bugs.webkit.org/show_bug.cgi?id=151638
2052
2053         Reviewed by Brian Burg.
2054
2055         * UserInterface/Views/CSSStyleDeclarationTextEditor.css:
2056         (.css-style-text-editor > .CodeMirror .CodeMirror-placeholder):
2057
2058 2015-11-28  Devin Rousso  <dcrousso+webkit@gmail.com>
2059
2060         Web Inspector: REGRESSION: "Duplicate Selector" context menu item doesn't work
2061         https://bugs.webkit.org/show_bug.cgi?id=151628
2062
2063         Reviewed by Brian Burg.
2064
2065         Merged the two "add rule" functions inside DOMNodeStyles to create a
2066         new rule with the given selector and use the generated best selector
2067         for that node otherwise. This also preserves all fallbacks across all
2068         functions for creating new CSS rules.
2069
2070         * UserInterface/Models/DOMNodeStyles.js:
2071         (WebInspector.DOMNodeStyles.prototype.addEmptyRule): Deleted.
2072         (WebInspector.DOMNodeStyles.prototype.addRuleWithSelector): Deleted.
2073         (WebInspector.DOMNodeStyles.prototype.addRule):
2074         Creates a new CSS rule using either the provided selector or the best
2075         selector for the current node.
2076
2077         * UserInterface/Views/CSSStyleDeclarationSection.js:
2078         (WebInspector.CSSStyleDeclarationSection.prototype._handleContextMenuEvent):
2079         * UserInterface/Views/RulesStyleDetailsPanel.js:
2080         (WebInspector.RulesStyleDetailsPanel.prototype.newRuleButtonClicked):
2081         * UserInterface/Views/VisualStyleSelectorSection.js:
2082         (WebInspector.VisualStyleSelectorSection.prototype._addNewRule):
2083
2084 2015-11-24  Brian Burg  <bburg@apple.com>
2085
2086         Web Inspector: save Inspector's breakpoints to localStorage whenever they are modified
2087         https://bugs.webkit.org/show_bug.cgi?id=151581
2088
2089         Reviewed by Timothy Hatcher.
2090
2091         Serialize all breakpoints to the "breakpoints" Setting in local storage
2092         whenever any breakpoint model object is added, removed, or modified.
2093
2094         Remove the old listener that attempted to save breakpoints on the
2095         pagehide event. It did not fire in important scenarios like exiting
2096         the browser via Cmd-Q or killing the process via Ctrl-C / SIGKILL.
2097
2098         This is not expected to be a performance problem because most people
2099         do not keep thousands of breakpoints active, and breakpoints are not
2100         set very often. If it's a problem, we can mitigate it with coalescing.
2101
2102         * UserInterface/Controllers/DebuggerManager.js:
2103         (WebInspector.DebuggerManager.prototype.addBreakpoint):
2104         (WebInspector.DebuggerManager.prototype.removeBreakpoint):
2105         (WebInspector.DebuggerManager.prototype._breakpointDisabledStateDidChange):
2106         (WebInspector.DebuggerManager.prototype._saveBreakpoints):
2107         (WebInspector.DebuggerManager.prototype._inspectorClosing): Deleted.
2108
2109 2015-11-24  Brian Burg  <bburg@apple.com>
2110
2111         Web Inspector: Cmd-1 to Cmd-9 shortcuts should select tabs by ordinal
2112         https://bugs.webkit.org/show_bug.cgi?id=151577
2113
2114         Reviewed by Timothy Hatcher.
2115
2116         The shortcuts only work if a tab at the specified ordinal exists.
2117
2118         * UserInterface/Base/Main.js:
2119         (WebInspector.contentLoaded):
2120
2121 2015-11-23  Brian Burg  <bburg@apple.com>
2122
2123         Web Inspector: Add a keyboard shortcut to restore the default zoom level
2124         https://bugs.webkit.org/show_bug.cgi?id=151237
2125
2126         Reviewed by Timothy Hatcher.
2127
2128         The Cmd-0 shortcut matches the keybindings of Safari and other browsers.
2129
2130         * UserInterface/Base/Main.js:
2131         (WebInspector.contentLoaded):
2132
2133 2015-11-23  Brian Burg  <bburg@apple.com>
2134
2135         Web Inspector: inspector settings should not be shared between different inspection levels
2136         https://bugs.webkit.org/show_bug.cgi?id=151151
2137
2138         Reviewed by Timothy Hatcher.
2139
2140         It's really annoying to have shared settings between Inspector^1 and Inspector^2, because
2141         they are not designed to respond to external changes to local storage keys. As a result,
2142         the two inspectors seemingly have different settings while both are open, but the settings
2143         clobber each other depending on which inspector is closed first. On the next inspector
2144         being opened, it has settings that reflect whichever inspector closed last.
2145
2146         To fix this, alter the local storage key prefix to incude the inspection level when it is
2147         greater than 1 (i.e., inspecting the inspector). The storage prefix becomes
2148         "com.apple.WebInspector-${inspectionLevel}." in this case.
2149         This is backwards-compatible for normal Inspector, who keeps the same storage prefix. 
2150
2151         Alternate approaches that were considered and abandoned:
2152
2153          - Use separate WKWebSiteDataStores for each inspection level. This API (as it currently is)
2154         does not support multiple on-disk storage locations. We don't want to add an entirely new
2155         Library directory for each inspector level, and sharing a single location doesn't fix the
2156         shared-settings bug. Changing storage location would lose all existing Inspector settings.
2157
2158          - Sync settings between multiple open Inspectors. This would be catastrophic, as changing
2159         the active tab on one inspector would immediately propagate to the other open inspectors.
2160
2161         * UserInterface/Models/Setting.js:
2162         (WebInspector.Setting):
2163         * UserInterface/Protocol/InspectorFrontendHostStub.js:
2164         (window.InspectorFrontendHost.WebInspector.InspectorFrontendHostStub.prototype.inspectionLevel):
2165
2166 2015-11-23  Brian Burg  <bburg@apple.com>
2167
2168         Web Inspector: use Cmd-Option-L and Cmd-Option-R for toggling navigation and details sidebars
2169         https://bugs.webkit.org/show_bug.cgi?id=151572
2170
2171         Reviewed by Timothy Hatcher.
2172
2173         The previous shortcuts were Cmd-0 and Cmd-Option-0, but these didn't match Safari's
2174         sidebar shortcuts and conflict with Cmd-0 as the cross-browser way to reset page zoom.
2175
2176         * UserInterface/Base/Main.js:
2177         (WebInspector.contentLoaded):
2178
2179 2015-11-23  Brian Burg  <bburg@apple.com>
2180
2181         Web Inspector: when inspecting the inspector, add the inspection level to the title bar
2182         https://bugs.webkit.org/show_bug.cgi?id=151555
2183
2184         Reviewed by Timothy Hatcher.
2185
2186         Drive-by update to remove some localization strings that are no longer used.
2187
2188         * Localizations/en.lproj/localizedStrings.js:
2189
2190 2015-11-22  Matt Baker  <mattbaker@apple.com>
2191
2192         Web Inspector: Clean up FolderizedTreeElement folder settings
2193         https://bugs.webkit.org/show_bug.cgi?id=151539
2194
2195         Reviewed by Brian Burg.
2196
2197         The expanded state for each folder was stored as an external property on the folder
2198         tree element. Now FolderizedTreeElement keeps a map of folders to settings.
2199
2200         * UserInterface/Views/FolderizedTreeElement.js:
2201         (WebInspector.FolderizedTreeElement):
2202         (WebInspector.FolderizedTreeElement.prototype.removeChildren):
2203         (WebInspector.FolderizedTreeElement.prototype._parentTreeElementForRepresentedObject):
2204         (WebInspector.FolderizedTreeElement.prototype._folderTreeElementExpandedStateChange):
2205
2206 == Rolled over to ChangeLog-2015-11-21 ==