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