3084aae31d5f394cbf6e1ff706266420e20d3d4f
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2017-09-22  Matt Baker  <mattbaker@apple.com>
2
3         Web Inspector: View should automatically layout when it becomes attached to the DOM
4         https://bugs.webkit.org/show_bug.cgi?id=177189
5
6         Reviewed by Devin Rousso.
7
8         This guarantees that a layout is always scheduled as soon as a view is
9         attached to the DOM. Now that nearly all views are created lazily, it
10         is safe to make this change even without having a visibility concept in
11         the View class that would prevent layouts for background views.
12
13         * UserInterface/Views/View.js:
14         (WI.View):
15         Remove `this._needsLayoutWhenAttachedToRoot` flag, which is now implicit.
16         This was set if a layout was requested before the view had been attached
17         to the DOM.
18
19         (WI.View.prototype.get element):
20         (WI.View.prototype.get layoutPending):
21         (WI.View.prototype.get parentView):
22         (WI.View.prototype.get subviews):
23         (WI.View.prototype.get isAttached):
24         (WI.View.prototype.insertSubviewBefore):
25         (WI.View.prototype.removeSubview):
26         (WI.View.prototype.removeAllSubviews):
27         (WI.View.prototype.attached):
28         (WI.View.prototype.detached):
29         Hooks for subclasses to define behavior added or removed from the DOM.
30         (WI.View.prototype._didMoveToParent):
31         (WI.View.prototype._didMoveToWindow):
32         (WI.View._scheduleLayoutForView):
33         (WI.View.prototype.didMoveToWindow): Deleted.
34         (WI.View.prototype.didMoveToParent): Deleted.
35         These were only used by View, and have been made private.
36
37 2017-09-22  Nikita Vasilyev  <nvasilyev@apple.com>
38
39         Web Inspector: Styles Redesign: support toggling properties
40         https://bugs.webkit.org/show_bug.cgi?id=176643
41
42         Reviewed by Joseph Pecoraro.
43
44         Add a primitive UI to make CSS property names and values editable. Autocomplete, syntax highlighting,
45         and proper keyboard navigation will be added later.
46
47         Display !important when it's specified. Before this patch !important wasn't shown in the redesigned
48         styles sidebar.
49
50         * UserInterface/Models/CSSProperty.js:
51         (WI.CSSProperty.prototype.update):
52         (WI.CSSProperty.prototype.get name):
53         (WI.CSSProperty.prototype.set name):
54         (WI.CSSProperty.prototype.get value):
55         (WI.CSSProperty.prototype.get rawValue):
56         (WI.CSSProperty.prototype.set rawValue):
57         CSSProperty.prototype.value returns the same value as before. !important remains stripped.
58         CSSProperty.prototype.rawValue returns a raw value from the payload. It may include !important.
59
60         (WI.CSSProperty.prototype._updateStyle):
61         (WI.CSSProperty.prototype._updateOwnerStyleText):
62         (WI.CSSProperty):
63         * UserInterface/Models/DOMNodeStyles.js:
64         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
65         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
66         (.spreadsheet-style-declaration-editor :matches(.name, .value):focus):
67         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
68         (WI.SpreadsheetStyleProperty.prototype._update):
69         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
70         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
71         (WI.SpreadsheetStyleProperty):
72
73 2017-09-22  Matt Baker  <mattbaker@apple.com>
74
75         Web Inspector: NavigationBar should coalesce consecutive dividers when items are hidden
76         https://bugs.webkit.org/show_bug.cgi?id=177379
77
78         Reviewed by Joseph Pecoraro.
79
80         * UserInterface/Views/NavigationBar.js:
81         (WI.NavigationBar.prototype.layout):
82
83 2017-09-22  Tim Horton  <timothy_horton@apple.com>
84
85         Add env() as an alias of constant()
86         https://bugs.webkit.org/show_bug.cgi?id=177371
87
88         Reviewed by Simon Fraser.
89
90         * UserInterface/Models/CSSKeywordCompletions.js:
91         (WI.CSSKeywordCompletions.forProperty):
92         (WI.CSSKeywordCompletions.forFunction):
93         Add autocomplete support for env().
94
95 2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
96
97         Web Inspector: Add autocompletion suggestions for CSS functions (constant(), linear-gradient(), etc)
98         https://bugs.webkit.org/show_bug.cgi?id=177264
99
100         Reviewed by Matt Baker.
101
102         * UserInterface/Controllers/CodeMirrorCompletionController.js:
103         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
104         Detect when we are inside of functions and provide completion suggestions
105         for the relevant function.
106
107         * UserInterface/Models/CSSCompletions.js:
108         Syntax highlight "constant()" like we do for "var()".
109
110         * UserInterface/Models/CSSKeywordCompletions.js:
111         (WI.CSSKeywordCompletions.forProperty):
112         Always suggest "constant()" everywhere, like we do for "var()".
113
114         (WI.CSSKeywordCompletions.forFunction):
115         Provide suggestions for some CSS functions.
116
117 2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
118
119         Web Inspector: Remove support for CSS Regions
120         https://bugs.webkit.org/show_bug.cgi?id=177287
121
122         Reviewed by Matt Baker.
123
124         * UserInterface/Protocol/CSSObserver.js:
125         (WI.CSSObserver.prototype.namedFlowCreated):
126         (WI.CSSObserver.prototype.namedFlowRemoved):
127         (WI.CSSObserver.prototype.regionLayoutUpdated):
128         (WI.CSSObserver.prototype.regionOversetChanged):
129         (WI.CSSObserver.prototype.registeredNamedFlowContentElement):
130         (WI.CSSObserver.prototype.unregisteredNamedFlowContentElement):
131         Leave observer functions in for older backends that will send
132         these messages, but we just ignore them.
133
134         * UserInterface/Base/Main.js:
135         * UserInterface/Controllers/DOMTreeManager.js:
136         (WI.DOMTreeManager):
137         (WI.DOMTreeManager.prototype._unbind):
138         (WI.DOMTreeManager._flowPayloadHashKey): Deleted.
139         (WI.DOMTreeManager.prototype._createContentFlowFromPayload): Deleted.
140         (WI.DOMTreeManager.prototype._updateContentFlowFromPayload): Deleted.
141         (WI.DOMTreeManager.prototype.getNamedFlowCollection.onNamedFlowCollectionAvailable): Deleted.
142         (WI.DOMTreeManager.prototype.getNamedFlowCollection): Deleted.
143         (WI.DOMTreeManager.prototype.namedFlowCreated): Deleted.
144         (WI.DOMTreeManager.prototype.namedFlowRemoved): Deleted.
145         (WI.DOMTreeManager.prototype._sendNamedFlowUpdateEvents): Deleted.
146         (WI.DOMTreeManager.prototype.regionOversetChanged): Deleted.
147         (WI.DOMTreeManager.prototype.registeredNamedFlowContentElement): Deleted.
148         (WI.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Deleted.
149         (WI.DOMTreeManager.prototype.unregisteredNamedFlowContentElement): Deleted.
150         (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes.nodeRequested): Deleted.
151         (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes): Deleted.
152         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.regionNodesAvailable): Deleted.
153         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable): Deleted.
154         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getComputedProperty): Deleted.
155         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getContentFlowName): Deleted.
156         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo): Deleted.
157         * UserInterface/Images/ContentFlow.svg: Removed.
158         * UserInterface/Images/gtk/ContentFlow.svg: Removed.
159         * UserInterface/Main.html:
160         * UserInterface/Models/Collection.js:
161         * UserInterface/Models/ContentFlow.js: Removed.
162         * UserInterface/Models/DOMTree.js:
163         (WI.DOMTree):
164         (WI.DOMTree.prototype.get frame):
165         (WI.DOMTree.prototype._framePageExecutionContextChanged):
166         (WI.DOMTree.prototype.get contentFlowCollection): Deleted.
167         (WI.DOMTree.prototype.requestContentFlowList): Deleted.
168         (WI.DOMTree.prototype._isContentFlowInCurrentDocument): Deleted.
169         (WI.DOMTree.prototype._contentFlowListWasUpdated): Deleted.
170         (WI.DOMTree.prototype._contentFlowWasAdded): Deleted.
171         (WI.DOMTree.prototype._contentFlowWasRemoved): Deleted.
172         * UserInterface/Test.html:
173         * UserInterface/Views/CollectionContentView.js:
174         (WI.CollectionContentView):
175         * UserInterface/Views/ComputedStyleDetailsPanel.css:
176         (.details-section > .content > .group > .row.simple.content-flow-link > .value > span > .icon): Deleted.
177         * UserInterface/Views/ComputedStyleDetailsPanel.js:
178         (WI.ComputedStyleDetailsPanel.prototype.refresh):
179         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
180         (WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged):
181         (WI.ComputedStyleDetailsPanel):
182         (WI.ComputedStyleDetailsPanel.prototype.get regionFlow): Deleted.
183         (WI.ComputedStyleDetailsPanel.prototype.set regionFlow): Deleted.
184         (WI.ComputedStyleDetailsPanel.prototype.get contentFlow): Deleted.
185         (WI.ComputedStyleDetailsPanel.prototype.set contentFlow): Deleted.
186         (WI.ComputedStyleDetailsPanel.prototype.get containerRegions): Deleted.
187         (WI.ComputedStyleDetailsPanel.prototype.set containerRegions): Deleted.
188         (WI.ComputedStyleDetailsPanel.prototype.sizeDidChange): Deleted.
189         (WI.ComputedStyleDetailsPanel.prototype._updateFlowNamesSectionVisibility): Deleted.
190         (WI.ComputedStyleDetailsPanel.prototype._resetFlowDetails): Deleted.
191         (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady): Deleted.
192         (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails): Deleted.
193         (WI.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked): Deleted.
194         (WI.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked): Deleted.
195         * UserInterface/Views/ContentFlowDOMTreeContentView.js: Removed.
196         * UserInterface/Views/ContentFlowIcon.css: Removed.
197         * UserInterface/Views/ContentFlowTreeElement.js: Removed.
198         * UserInterface/Views/ContentView.js:
199         (WI.ContentView.createFromRepresentedObject):
200         (WI.ContentView.isViewable):
201         * UserInterface/Views/FrameTreeElement.js:
202         (WI.FrameTreeElement.prototype.onpopulate):
203         (WI.FrameTreeElement.prototype.onexpand):
204         (WI.FrameTreeElement.prototype._childContentFlowWasAdded): Deleted.
205         (WI.FrameTreeElement.prototype._childContentFlowWasRemoved): Deleted.
206         (WI.FrameTreeElement.prototype._rootDOMNodeInvalidated): Deleted.
207         * UserInterface/Views/ResourceSidebarPanel.js:
208         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
209         * UserInterface/Views/ResourcesTabContentView.js:
210         (WI.ResourcesTabContentView):
211         (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
212
213 2017-09-21  Ross Kirsling  <ross.kirsling@sony.com>
214
215         Web Inspector: Add details sidebar to Layers tab.
216         https://bugs.webkit.org/show_bug.cgi?id=177115
217
218         Reviewed by Devin Rousso.
219
220         * Localizations/en.lproj/localizedStrings.js:
221         * UserInterface/Main.html:
222         * UserInterface/Views/LayerDetailsSidebarPanel.css: Added.
223         * UserInterface/Views/LayerDetailsSidebarPanel.js: Added.
224         New files and strings for sidebar.
225
226         * UserInterface/Base/Utilities.js:
227         Add global identifier for "×" character.
228         
229         * UserInterface/Models/Layer.js: Added.
230         Add a model class for layers so that we can instanceof-check them.
231
232         * UserInterface/Controllers/LayerTreeManager.js:
233         (WI.LayerTreeManager.prototype.layersForNode):
234         Utilize model class WI.Layer.
235
236         * UserInterface/Views/Layers3DContentView.js:
237         (WI.Layers3DContentView):
238         (WI.Layers3DContentView.prototype.get supplementalRepresentedObjects):
239         (WI.Layers3DContentView.prototype.layout):
240         (WI.Layers3DContentView.prototype._addLayer):
241         Pass layer data to sidebar and utilize model class WI.Layer.
242
243         * UserInterface/Views/LayersTabContentView.js:
244         (WI.LayersTabContentView):
245         Attach details sidebar.
246
247 2017-09-21  Brian Burg  <bburg@apple.com>
248
249         Web Inspector: keyboard shortcut for "Reload page from origin" doesn't match Safari, and doesn't work
250         https://bugs.webkit.org/show_bug.cgi?id=177010
251         <rdar://problem/33134548>
252
253         Reviewed by Joseph Pecoraro.
254
255         I seem to have broken reload from origin via Web Inspector in a previous
256         patch, because the parameter is 'ignoreCache' instead of 'shouldIgnoreCache'.
257
258         * Localizations/en.lproj/localizedStrings.js:
259         Modernize tooltip text.
260
261         * UserInterface/Base/Main.js:
262         (WI.contentLoaded):
263         Disambiguate two locals with the same name. Modernize the tooltip.
264         Make the shortcut Cmd-Opt-R to match Safari. Fix wrong parameter usage.
265
266         * UserInterface/Test/FrontendTestHarness.js:
267         (FrontendTestHarness.prototype.reloadPage):
268         Fix wrong parameter.
269
270 2017-09-19  Joseph Pecoraro  <pecoraro@apple.com>
271
272         Web Inspector: Adopt named groups in complex regexes
273         https://bugs.webkit.org/show_bug.cgi?id=177117
274
275         Reviewed by Matt Baker.
276
277         * UserInterface/Base/URLUtilities.js:
278         (parseSecurityOrigin):
279         (parseDataURL):
280         (parseURL):
281         * UserInterface/Models/Color.js:
282         (WI.Color.fromString):
283
284 2017-09-19  Joseph Pecoraro  <pecoraro@apple.com>
285
286         REGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab
287         https://bugs.webkit.org/show_bug.cgi?id=177114
288         <rdar://problem/34505265>
289
290         Reviewed by Brian Burg.
291
292         * UserInterface/Base/Main.js:
293         (WI.loaded):
294         We need to register the settings change handler regardless of what the
295         initial value of the setting is.
296
297 2017-09-18  Matt Baker  <mattbaker@apple.com>
298
299         Web Inspector: RemoteObject.resolveNode should return a Promise
300         https://bugs.webkit.org/show_bug.cgi?id=177042
301
302         Reviewed by Joseph Pecoraro.
303
304         Update RemoteObject.resolveNode to return a promise instead of taking a
305         callback. If the promise is fulfilled, `remoteObject` will be non-null.
306
307         * UserInterface/Controllers/DOMTreeManager.js:
308         (WI.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
309         (WI.DOMTreeManager.prototype.inspectNodeObject):
310         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved): Deleted.
311
312         * UserInterface/Models/DOMNode.js:
313         (WI.DOMNode.prototype.toggleClass.WI.RemoteObject.resolveNode.then):
314         (WI.DOMNode.prototype.toggleClass):
315         (WI.DOMNode.prototype.scrollIntoView.WI.RemoteObject.resolveNode.then):
316         (WI.DOMNode.prototype.scrollIntoView):
317         (WI.DOMNode.prototype.toggleClass.resolvedNode.inspectedPage_node_toggleClass): Deleted.
318         (WI.DOMNode.prototype.toggleClass.resolvedNode): Deleted.
319         (WI.DOMNode.prototype.scrollIntoView.resolvedNode.inspectedPage_node_scrollIntoView): Deleted.
320         (WI.DOMNode.prototype.scrollIntoView.resolvedNode): Deleted.
321
322         * UserInterface/Protocol/RemoteObject.js:
323         (WI.RemoteObject.resolveNode):
324
325         * UserInterface/Views/BoxModelDetailsSectionRow.js:
326         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.WI.RemoteObject.resolveNode.then):
327         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
328         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.toggleInlineStyleProperty): Deleted.
329         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.didToggle): Deleted.
330         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode): Deleted.
331         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
332
333         * UserInterface/Views/ContextMenuUtilities.js:
334         (WI.appendContextMenuItemsForDOMNode):
335
336         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
337         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.inspectedPage_node_collectPrototypes): Deleted.
338         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Deleted.
339         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Deleted.
340
341         * UserInterface/Views/DOMTreeElement.js:
342         (WI.DOMTreeElement.prototype._createTooltipForNode.WI.RemoteObject.resolveNode.then):
343         (WI.DOMTreeElement.prototype._createTooltipForNode):
344         (WI.DOMTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions): Deleted.
345         (WI.DOMTreeElement.prototype._createTooltipForNode.resolvedNode): Deleted.
346
347         * UserInterface/Views/DOMTreeOutline.js:
348         (WI.DOMTreeOutline.prototype._hideElement.injectStyleAndToggleClass):
349         (WI.DOMTreeOutline.prototype._hideElement):
350         (WI.DOMTreeOutline):
351         (WI.DOMTreeOutline.prototype._hideElement.resolvedNode.injectStyleAndToggleClass): Deleted.
352         (WI.DOMTreeOutline.prototype._hideElement.resolvedNode): Deleted.
353
354 2017-09-18  Brian Burg  <bburg@apple.com>
355
356         Web Inspector: introduce an AppController class and shared instance of it
357         https://bugs.webkit.org/show_bug.cgi?id=177024
358
359         Reviewed by Matt Baker.
360
361         WebInspectorUI currently has an app controller singleton that's distributed
362         among many properties on the WI object, which also serves as a namespace for
363         classes, enums, and other frontend objects. The singleton should be a proper
364         class so that we can think more easily about what state is global.
365
366         In the process of moving pieces of Main.js into AppController, I intend to move
367         most UI related code into a view controller class for the top level view.
368         AppController really shouldn't be doing anything to the view hierarchy or DOM.
369         It is yet to be determined how responsibility for global DOM events, such as
370         those for keyboard shortcuts, will be handled.
371
372         This larger refactoring project will let us more easily do things like connect
373         to multiple debuggables in the same Inspector instance, and switch between views
374         of different debuggable targets. Even if this never comes to pass, the code will
375         be a lot easier to reason about and maintain in the future.
376
377         For the first patch, introduce {AppController, TestAppController} <: AppControllerBase.
378         Shared code goes in the base class. In the Main.html and Test.html files, first
379         construct the AppController and then call .initialize() to avoid cyclic dependencies
380         on the global singleton WI.sharedApp.
381
382         * UserInterface/Main.html:
383         * UserInterface/Test.html:
384         * UserInterface/Test/Test.js:
385         (WI.loaded):
386         * UserInterface/Base/Main.js:
387         (WI.loaded):
388         Move some shared code out of here into AppControllerBase.constructor.
389         Eventually WI.loaded should not exist, and its code will move elsewhere.
390
391         (WI.contentLoaded):
392         Adopt global reference.
393
394         * UserInterface/Controllers/AppControllerBase.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/MainTarget.js.
395         (WI.AppControllerBase):
396         (WI.AppControllerBase.prototype.get hasExtraDomains):
397         (WI.AppControllerBase.prototype.get debuggableType):
398         (WI.AppControllerBase.prototype.initialize):
399
400         * UserInterface/Controllers/AppController.js: New.
401         (WI.AppController):
402         (WI.AppController.prototype.get hasExtraDomains):
403         (WI.AppController.prototype.get debuggableType):
404         (WI.AppController.prototype.activateExtraDomains):
405
406         * UserInterface/Test/TestAppController.js: New.
407         (WI.TestAppController):
408         (WI.TestAppController.prototype.get hasExtraDomains):
409         (WI.TestAppController.prototype.get debuggableType):
410
411         * UserInterface/Controllers/TimelineManager.js:
412         (WI.TimelineManager.defaultTimelineTypes):
413         (WI.TimelineManager.availableTimelineTypes):
414         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
415         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
416         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
417         * UserInterface/Models/TimelineRecording.js:
418         (WI.TimelineRecording.sourceCodeTimelinesSupported):
419         * UserInterface/Protocol/InspectorObserver.js:
420         (WI.InspectorObserver.prototype.inspect):
421         (WI.InspectorObserver.prototype.activateExtraDomains):
422         (WI.InspectorObserver):
423         * UserInterface/Protocol/MainTarget.js:
424         (WI.MainTarget):
425         (WI.MainTarget.prototype.get displayName):
426         * UserInterface/Views/ResourceSidebarPanel.js:
427         (WI.ResourceSidebarPanel):
428         (WI.ResourceSidebarPanel.prototype.initialLayout):
429         (WI.ResourceSidebarPanel.prototype._addScript):
430         (WI.ResourceSidebarPanel.prototype._extraDomainsActivated):
431         * UserInterface/Views/Toolbar.js:
432         Use WI.sharedApp.{debuggableType, hasExtraDomains}.
433
434 2017-09-18  Matt Baker  <mattbaker@apple.com>
435
436         Web Inspector: console.assert messages shouldn't end in an exclamation point
437         https://bugs.webkit.org/show_bug.cgi?id=177054
438
439         Reviewed by Joseph Pecoraro.
440
441         * UserInterface/Base/EventListener.js:
442         * UserInterface/Base/EventListenerSet.js:
443         (WI.EventListenerSet.prototype.register):
444         Drive-by: make assertions the same in both.
445
446         * UserInterface/Views/LayoutTimelineView.js:
447         (WI.LayoutTimelineView.prototype._processPendingRecords):
448
449         * UserInterface/Views/Resizer.js:
450         (WI.Resizer.prototype._currentPosition):
451
452 2017-09-18  Devin Rousso  <webkit@devinrousso.com>
453
454         Web Inspector: REGRESSION(r221901): Single frame recordings don't reset the recording navigation item
455         https://bugs.webkit.org/show_bug.cgi?id=176893
456
457         Reviewed by Matt Baker.
458
459         * UserInterface/Controllers/CanvasManager.js:
460         (WI.CanvasManager.prototype.recordingFinished):
461         Set the `_recordingCanvas` to null whenever a recording has finished and been sent to the
462         frontend. It is also necessary to do this inside `stopRecording`, as it is possible for the
463         user to start and stop a recording before any actions are recorded, meaning that no
464         recording would be sent to the frontend and this function will never get called.
465
466 2017-09-17  Nikita Vasilyev  <nvasilyev@apple.com>
467
468         Web Inspector: Styles Redesign: support toggling properties
469         https://bugs.webkit.org/show_bug.cgi?id=176643
470
471         Reviewed by Matt Baker.
472
473         Add checkboxes to toggle (comment/uncomment) CSS properties.
474
475         * UserInterface/Base/Utilities.js:
476         (String.prototype.get lineCount):
477         (String.prototype.get lastLine):
478         Add string methods that are used by WI.CSSProperty.prototype._updateOwnerStyleText.
479
480         * UserInterface/Models/CSSProperty.js:
481         (WI.CSSProperty.prototype.commentOut):
482         (WI.CSSProperty.prototype.set text):
483         (WI.CSSProperty.prototype.get editable):
484         (WI.CSSProperty.prototype._updateOwnerStyleText):
485         Add methods necessary for property toggling.
486
487         * UserInterface/Models/CSSStyleDeclaration.js:
488         (WI.CSSStyleDeclaration):
489         (WI.CSSStyleDeclaration.prototype.get allVisibleProperties):
490         Add a getter that is used by SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesToRender.
491
492         (WI.CSSStyleDeclaration.prototype.get visibleProperties):
493         * UserInterface/Models/TextRange.js:
494         (WI.TextRange.prototype.clone):
495         (WI.TextRange.prototype.cloneAndModify):
496         (WI.TextRange.prototype.relativeTo):
497         Add methods that are used by WI.CSSProperty.prototype._updateOwnerStyleText.
498
499         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
500         (.spreadsheet-style-declaration-editor):
501         (.spreadsheet-style-declaration-editor .property-toggle):
502         (.spreadsheet-css-declaration:matches(:hover, :focus) .property-toggle,):
503         (.spreadsheet-style-declaration-editor .property.disabled,):
504         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
505         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
506         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style):
507         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender):
508         (WI.SpreadsheetCSSStyleDeclarationEditor):
509         (WI.SpreadsheetStyleProperty):
510         (WI.SpreadsheetStyleProperty.prototype.get element):
511         (WI.SpreadsheetStyleProperty.prototype._update):
512         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
513         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
514         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
515         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
516         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
517         (WI.SpreadsheetRulesStyleDetailsPanel):
518         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
519         (.cm-s-default .cm-comment,):
520         * UserInterface/Views/Variables.css:
521         (:root):
522         Make comment color a CSS variable.
523
524 2017-09-15  Devin Rousso  <webkit@devinrousso.com>
525
526         Web Inspector: REGRESSION(r222057): recording state doesn't update when changing actions
527         https://bugs.webkit.org/show_bug.cgi?id=176988
528
529         Reviewed by Matt Baker.
530
531         Replace `updateActionIndex` with `updateAction`, where the currently selected RecordingAction
532         is passed to the DetailsSidebarPanel. Also remove the call to `this._recording.actions` in
533         order to ensure that all logic performed by both DetailsSidebarPanel is synchronous.
534
535         * Localizations/en.lproj/localizedStrings.js:
536
537         * UserInterface/Views/RecordingTabContentView.js:
538         (WI.RecordingTabContentView.prototype._updateActionIndex):
539
540         * UserInterface/Views/RecordingContentView.js:
541         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
542         (WI.RecordingContentView.prototype.async._generateContentCanvasWebGL):
543
544         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
545         (WI.RecordingStateDetailsSidebarPanel):
546         (WI.RecordingStateDetailsSidebarPanel.prototype.set recording):
547         (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction):
548         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
549         (WI.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex): Deleted.
550
551         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
552         (WI.RecordingTraceDetailsSidebarPanel):
553         (WI.RecordingTraceDetailsSidebarPanel.prototype.set recording):
554         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction):
555         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex): Deleted.
556
557 2017-09-15  Matt Baker  <mattbaker@apple.com>
558
559         Web Inspector: Canvas: recording parameters that include colors should show an InlineSwatch (2D canvas)
560         https://bugs.webkit.org/show_bug.cgi?id=176822
561         <rdar://problem/34402170>
562
563         Reviewed by Devin Rousso.
564
565         Show inline swatches in the canvas recording action and state sidebars.
566
567         * UserInterface/Models/Color.js:
568         Added helpers for dealing with CMYK and normalized RGB. The latter is
569         for RGB components scaled to the range [0, 1]. Also improved handling
570         for 8-bit channel values.
571         (WI.Color.rgb2hsv):
572         (WI.Color.cmyk2rgb):
573         (WI.Color.normalized2rgb):
574         (WI.Color._eightBitChannel):
575         (WI.Color.prototype._toRGBString):
576         (WI.Color.prototype._toRGBAString):
577         (WI.Color.prototype._componentToHexValue):
578         (WI.Color.prototype._rgbToHSL):
579         (WI.Color.prototype._componentToNumber): Deleted.
580         Replaced by _eightBitChannel.
581
582         * UserInterface/Models/RecordingAction.js:
583         (WI.RecordingAction):
584         (WI.RecordingAction.prototype.getColorParameters):
585         Get a subset of parameters that describe a color. This can be an array
586         containing one value (e.g. fillStyle), or multiple values, as is the
587         case with non-standard API functions that describe color using multiple
588         parameters (e.g. setFillColor).
589
590         * UserInterface/Views/InlineSwatch.css:
591         (.inline-swatch:not(.read-only):hover > span):
592         (.inline-swatch:hover > span): Deleted.
593         * UserInterface/Views/InlineSwatch.js:
594         (WI.InlineSwatch):
595         Read-only colors shouldn't show a context menu or hover effects.
596
597         * UserInterface/Views/RecordingActionTreeElement.css:
598         (.tree-outline:matches(:focus, .force-focus) .item.action > .titles .parameters > .inline-swatch):
599
600         * UserInterface/Views/RecordingActionTreeElement.js:
601         (WI.RecordingActionTreeElement._generateDOM.createParameterElement):
602         (WI.RecordingActionTreeElement._generateDOM):
603         (WI.RecordingActionTreeElement._createSwatchForColorParameters):
604
605         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css:
606         (.sidebar > .panel.details.recording-state > .content > .data-grid .inline-swatch):
607
608         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
609         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.isColorProperty):
610         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D.createInlineSwatch):
611         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
612         (WI.RecordingStateDetailsSidebarPanel):
613
614 2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
615
616         Unreviewed rollout r222036.
617         
618         The LayoutTests added with this change is flaky.
619
620         This left in the Test.js, Test.html, InspectorBackend changes
621         needed by later patches. They are independent of the flakey test.
622
623         Reverted changeset
624         Web Inspector: Timeline should show when events preventDefault() was called on an event or not
625         https://bugs.webkit.org/show_bug.cgi?id=176824
626         http://trac.webkit.org/changeset/222036
627
628 2017-09-14  Devin Rousso  <webkit@devinrousso.com>
629
630         Web Inspector: make recording swizzle async
631         https://bugs.webkit.org/show_bug.cgi?id=176936
632
633         Reviewed by Joseph Pecoraro.
634
635         Move all swizzle functions, and all logic that depends on swizzled values, to async
636         functions so that await can be used to pause execution while objects load. This was
637         necessary primarily for swizzling Image values, as the Image is not able to be used (such as
638         for creating a CanvasPattern) until its "load" event has fired. Any callers of a Recording's
639         actions getter must now adapt to working with a promise that will resolve once all swizzling
640         has finished across all actions within that recording.
641
642         * .eslintrc:
643
644         * UserInterface/Models/Recording.js:
645         (WI.Recording):
646         (WI.Recording.prototype.async swizzle):
647         (WI.Recording.prototype.swizzle): Deleted.
648         Drive-by: currently, no data is added to the JSON for WebGL objects, so don't try to swizzle
649         them and return the placeholder value (0) instead.
650
651         * UserInterface/Models/RecordingAction.js:
652         (WI.RecordingAction):
653         (WI.RecordingAction.prototype.swizzle):
654         (WI.RecordingAction.prototype.toJSON):
655         (WI.RecordingAction.prototype.async _swizzle.swizzleParameter):
656         (WI.RecordingAction.prototype.async _swizzle.async swizzleCallFrame):
657         (WI.RecordingAction.prototype.async _swizzle):
658
659         * UserInterface/Models/RecordingInitialStateAction.js:
660         (WI.RecordingInitialStateAction):
661
662         * UserInterface/Views/RecordingContentView.js:
663         (WI.RecordingContentView.prototype.updateActionIndex):
664         (WI.RecordingContentView.prototype.async _generateContentCanvas2D):
665         (WI.RecordingContentView.prototype.async _generateContentCanvasWebGL):
666         (WI.RecordingContentView.prototype._updateCanvasPath):
667         (WI.RecordingContentView.prototype._generateContentCanvas2D): Deleted.
668         (WI.RecordingContentView.prototype._generateContentCanvasWebGL): Deleted.
669
670         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
671         (WI.RecordingNavigationSidebarPanel.prototype.set recording):
672         (WI.RecordingNavigationSidebarPanel.prototype.updateActionIndex):
673
674         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
675         (WI.RecordingStateDetailsSidebarPanel):
676         (WI.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex):
677         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
678
679         * UserInterface/Views/RecordingTabContentView.js:
680         (WI.RecordingTabContentView.prototype.showRepresentedObject):
681
682         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
683         (WI.RecordingTraceDetailsSidebarPanel):
684         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex):
685
686 2017-09-14  Matt Baker  <mattbaker@apple.com>
687
688         Web Inspector: Color created from an RGB/HSL triplet returns bad component arrays
689         https://bugs.webkit.org/show_bug.cgi?id=176811
690         <rdar://problem/34397529>
691
692         Reviewed by Joseph Pecoraro.
693
694         A Color constructed from a format and RGB/HSL triplet should set its
695         alpha component to 1 instead of leaving it undefined. Color properties
696         and member functions expect the components array to have a length of four.
697
698         * UserInterface/Models/Color.js:
699         (WI.Color):
700
701 2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
702
703         Layout test inspector/debugger/breakpoints/resolved-dump-all-pause-locations.html is flaky.
704         https://bugs.webkit.org/show_bug.cgi?id=176952
705
706         Reviewed by Matt Baker.
707
708         * UserInterface/Protocol/InspectorBackend.js:
709         (InspectorBackend.Agent.prototype.dispatchEvent):
710         Include the event name since that may be useful in understanding what happened.
711
712         * UserInterface/Test.html:
713         * UserInterface/Test/Test.js:
714         (WI.loaded):
715         Register a MemoryObserver and include potentially necessary Model objects
716         for the Memory domain.
717
718 2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
719
720         Web Inspector: Timeline should show when events preventDefault() was called on an event or not
721         https://bugs.webkit.org/show_bug.cgi?id=176824
722         <rdar://problem/34290931>
723
724         Reviewed by Devin Rousso.
725
726         * Localizations/en.lproj/localizedStrings.js:
727         New string.
728
729         * UserInterface/Controllers/TimelineManager.js:
730         (WI.TimelineManager.prototype._processRecord):
731         Include the whole data object as extra details.
732
733         * UserInterface/Models/ScriptTimelineRecord.js:
734         (WI.ScriptTimelineRecord):
735         (WI.ScriptTimelineRecord.prototype.get extraDetails):
736         Wholesale copy of the extra data instead of just a single property.
737
738         * UserInterface/Views/ScriptDetailsTimelineView.js:
739         (WI.ScriptDetailsTimelineView):
740         Give the name column more initial space, there is still extra space
741         after this adjustment but name is comfortably larger (and the most
742         likely to be expanded).
743
744         * UserInterface/Views/ScriptTimelineDataGridNode.js:
745         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
746         Include "default prevented" as the event's subtitle if it was prevented.
747
748         * UserInterface/Protocol/InspectorBackend.js:
749         (InspectorBackend.Agent.prototype.dispatchEvent):
750         (InspectorBackend.Agent):
751         * UserInterface/Test.html:
752         * UserInterface/Test/Test.js:
753         (WI.loaded):
754         Add the ScriptProfilerObserver to tests since it is on by default for Timelines.
755
756 2017-09-14  Ryan Haddad  <ryanhaddad@apple.com>
757
758         Unreviewed, rolling out r222015.
759
760         The LayoutTests added with this change are flaky.
761
762         Reverted changeset:
763
764         "Web Inspector: Timeline should show when events
765         preventDefault() was called on an event or not"
766         https://bugs.webkit.org/show_bug.cgi?id=176824
767         http://trac.webkit.org/changeset/222015
768
769 2017-09-14  Joseph Pecoraro  <pecoraro@apple.com>
770
771         Web Inspector: Timeline should show when events preventDefault() was called on an event or not
772         https://bugs.webkit.org/show_bug.cgi?id=176824
773         <rdar://problem/34290931>
774
775         Reviewed by Devin Rousso.
776
777         * Localizations/en.lproj/localizedStrings.js:
778         New string.
779
780         * UserInterface/Controllers/TimelineManager.js:
781         (WI.TimelineManager.prototype._processRecord):
782         Include the whole data object as extra details.
783
784         * UserInterface/Models/ScriptTimelineRecord.js:
785         (WI.ScriptTimelineRecord):
786         (WI.ScriptTimelineRecord.prototype.get extraDetails):
787         Wholesale copy of the extra data instead of just a single property.
788
789         * UserInterface/Views/ScriptDetailsTimelineView.js:
790         (WI.ScriptDetailsTimelineView):
791         Give the name column more initial space, there is still extra space
792         after this adjustment but name is comfortably larger (and the most
793         likely to be expanded).
794
795         * UserInterface/Views/ScriptTimelineDataGridNode.js:
796         (WI.ScriptTimelineDataGridNode.prototype.get subtitle):
797         Include "default prevented" as the event's subtitle if it was prevented.
798
799         * UserInterface/Protocol/InspectorBackend.js:
800         (InspectorBackend.Agent.prototype.dispatchEvent):
801         (InspectorBackend.Agent):
802         * UserInterface/Test.html:
803         * UserInterface/Test/Test.js:
804         (WI.loaded):
805         Add the ScriptProfilerObserver to tests since it is on by default for Timelines.
806
807 2017-09-13  Devin Rousso  <webkit@devinrousso.com>
808
809         Web Inspector: allow recordings to be saved via ⌘-S in the Recording tab
810         https://bugs.webkit.org/show_bug.cgi?id=175284
811
812         Reviewed by Matt Baker.
813
814         * UserInterface/Views/RecordingContentView.js:
815         (WI.RecordingContentView.prototype.get supportsSave):
816         (WI.RecordingContentView.prototype.get saveData):
817
818         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
819         (WI.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked):
820         Use the current content view's saveData when exporting.
821
822 2017-09-13  Devin Rousso  <webkit@devinrousso.com>
823
824         Web Inspector: Event Listeners section does not update when listeners are added/removed
825         https://bugs.webkit.org/show_bug.cgi?id=170570
826         <rdar://problem/31501645>
827
828         Reviewed by Joseph Pecoraro.
829
830         * UserInterface/Protocol/DOMObserver.js:
831         (WI.DOMObserver.prototype.didAddEventListener):
832         (WI.DOMObserver.prototype.willRemoveEventListener):
833
834         * UserInterface/Controllers/DOMTreeManager.js:
835         (WI.DOMTreeManager.prototype.didAddEventListener):
836         (WI.DOMTreeManager.prototype.willRemoveEventListener):
837
838         * UserInterface/Models/DOMNode.js:
839         Add "EventListenersChanged" event. Fired when an event listener is added or removed.
840
841         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
842         (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners):
843         (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners):
844         (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
845         Refresh the event listeners section whenever a node's event listeners change.
846
847 2017-09-13  Joseph Pecoraro  <pecoraro@apple.com>
848
849         Web Inspector: Sort by size issues with Cookies and ApplicationCache DataGrids
850         https://bugs.webkit.org/show_bug.cgi?id=176879
851         <rdar://problem/34237096>
852
853         Reviewed by Matt Baker.
854
855         * UserInterface/Views/ApplicationCacheFrameContentView.js:
856         (WI.ApplicationCacheFrameContentView.prototype._sortDataGrid):
857         (WI.ApplicationCacheFrameContentView.prototype._populateDataGrid):
858         This uses very dumb DataGridNodes with a pure data object. In that
859         object `size` is a bytes string not a number. Include the number size
860         in this data object that can be used during sorting.
861
862         * UserInterface/Views/CookieStorageContentView.js:
863         (WI.CookieStorageContentView.prototype._rebuildTable):
864         Simplify creation. Also don't reset sort options. Note that here the
865         DataGridNodes have access to the Cookie object and can already sort size
866         using the cookie's size (a number) and not the data's size (string).
867
868         * UserInterface/Views/DataGrid.js:
869         (WI.DataGrid.prototype.sortNodes):
870         (WI.DataGrid.prototype._sortNodesCallback):
871         If sortNodes was called twice, it would defer the sort and actually
872         do the sort with the first comparator and not the latest, preferred
873         comparator. Make it use the latest comparator.
874
875 2017-09-13  Nikita Vasilyev  <nvasilyev@apple.com>
876
877         Web Inspector: Styles Redesign: display @media section headers
878         https://bugs.webkit.org/show_bug.cgi?id=176289
879         <rdar://problem/34228389>
880
881         Reviewed by Devin Rousso.
882
883         Prepend CSS media query selectors to every matching rule.
884
885         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
886         (.spreadsheet-css-declaration .media-label):
887         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
888         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
889         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader):
890         Don't localize "@media" since it's CSS code.
891         Don't display "all" or "screen" media query selectors. One of the goals of the
892         Styles sidebar redesign is to fit more data.
893
894 2017-09-13  Nikita Vasilyev  <nvasilyev@apple.com>
895
896         Web Inspector: Frontend should be made to expect and handle disabled properties
897         https://bugs.webkit.org/show_bug.cgi?id=166787
898         <rdar://problem/34379593>
899
900         Reviewed by Joseph Pecoraro.
901
902         This change introduces WI.CSSStyleDeclaration.prototype.allProperties getter,
903         that includes both enabled and disabled (commented out) CSS properties.
904
905         The existing WI.CSSStyleDeclaration.prototype.properties getter only includes enabled CSS properties,
906         same as before the backend change.
907
908         There is no behaviour change in the current styles sidebar. The new redesigned styles sidebar will
909         use disabled properties and display them as commented out.
910
911         * UserInterface/Models/CSSProperty.js:
912         (WI.CSSProperty.prototype.get attached):
913         Rename `enabled` to `attached`, as it didn't correspond to `_enabled` property. Attached means that the property
914         is enabled and has a ownerStyle with a set index (unless it's a computed style, where index is not applicable).
915
916         (WI.CSSProperty.prototype.get enabled):
917         * UserInterface/Models/CSSStyleDeclaration.js:
918         (WI.CSSStyleDeclaration.prototype.get allProperties):
919         Add allProperties getter that will be used in the new styles sidebar.
920
921         * UserInterface/Models/DOMNodeStyles.js:
922         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
923         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
924         (WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty.propertiesMatch):
925         Rename "enabled" to "attached" without any behavior change.
926
927 2017-09-13  Joseph Pecoraro  <pecoraro@apple.com>
928
929         Web Inspector: Escape in global search field should clear it
930         https://bugs.webkit.org/show_bug.cgi?id=176764
931
932         Reviewed by Timothy Hatcher.
933
934         * UserInterface/Views/QuickConsole.js:
935         (WI.QuickConsole.prototype._toggleOrFocus):
936         Don't implicitly prevent default. So if we didn't cause an action we
937         can let the default system action happen.
938
939         * UserInterface/Views/SearchBar.js:
940         (WI.SearchBar):
941         Remove unused keyboard shortcuts.
942
943 2017-09-12  Joseph Pecoraro  <pecoraro@apple.com>
944
945         Web Inspector: Add Experimental setting for new Network tab
946         https://bugs.webkit.org/show_bug.cgi?id=176750
947
948         Reviewed by Matt Baker.
949
950         * Localizations/en.lproj/localizedStrings.js:
951         * UserInterface/Main.html:
952         * UserInterface/Base/Main.js:
953         (WI.contentLoaded):
954         New files and strings.
955
956         * UserInterface/Base/Setting.js:
957         New experimental setting.
958
959         * UserInterface/Views/LegacyNetworkTabContentView.js:
960         (WI.LegacyNetworkTabContentView.isTabAllowed):
961         Legacy tab availability depends on the setting.
962
963         * UserInterface/Views/NetworkTabContentView.js:
964         (WI.NetworkTabContentView):
965         (WI.NetworkTabContentView.isTabAllowed):
966         (WI.NetworkTabContentView.prototype.get contentBrowser):
967         (WI.NetworkTabContentView.prototype.get type):
968         (WI.NetworkTabContentView.prototype.canShowRepresentedObject):
969         (WI.NetworkTabContentView.prototype.get supportsSplitContentBrowser):
970         Modern network tab. Only difference right now is it allows the split console.
971
972         * UserInterface/Views/NetworkTableContentView.js: Added.
973         (WI.NetworkTableContentView):
974         (WI.NetworkTableContentView.prototype.get selectionPathComponents):
975         (WI.NetworkTableContentView.prototype.get navigationItems):
976         (WI.NetworkTableContentView.prototype.shown):
977         (WI.NetworkTableContentView.prototype.hidden):
978         (WI.NetworkTableContentView.prototype.closed):
979         (WI.NetworkTableContentView.prototype.reset):
980         (WI.NetworkTableContentView.prototype.layout):
981         (WI.NetworkTableContentView.prototype.handleClearShortcut):
982         (WI.NetworkTableContentView.prototype._resourceCachingDisabledSettingChanged):
983         (WI.NetworkTableContentView.prototype._toggleDisableResourceCache):
984         Add a stubbed out ContentView. This will be implemented next.
985
986         * UserInterface/Views/SettingsTabContentView.js:
987         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
988         Add an experimental setting to toggle the new network tab. Only
989         show the experimental settings that relate to the debuggable target.
990         For JSContext targets, none of the settings are applicable, so don't
991         even show the experimental section.
992
993         * UserInterface/Views/TabBrowser.js:
994         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
995         Treat all network tabs the same.
996
997 2017-09-11  Matt Baker  <mattbaker@apple.com>
998
999         Web Inspector: Canvas: improve recording controls and state management
1000         https://bugs.webkit.org/show_bug.cgi?id=176762
1001         <rdar://problem/34382294>
1002
1003         Reviewed by Devin Rousso.
1004
1005         CanvasManager should be responsible for starting/stopping recordings
1006         and tracking state. Fixing this layering issue lets CanvasContentView
1007         better manage its recording UI.
1008
1009         * UserInterface/Controllers/CanvasManager.js:
1010         (WI.CanvasManager):
1011         (WI.CanvasManager.prototype.get recordingCanvas):
1012         (WI.CanvasManager.prototype.startRecording):
1013         (WI.CanvasManager.prototype.stopRecording):
1014
1015         * UserInterface/Models/Canvas.js:
1016         (WI.Canvas.prototype.get isRecording):
1017         (WI.Canvas.prototype.toggleRecording): Deleted.
1018
1019         * UserInterface/Views/CanvasContentView.css:
1020         (.navigation-bar > .item.canvas-record.disabled):
1021
1022         * UserInterface/Views/CanvasContentView.js:
1023         (WI.CanvasContentView.prototype.shown):
1024         (WI.CanvasContentView.prototype._toggleRecording):
1025         (WI.CanvasContentView.prototype._recordingFinished):
1026         (WI.CanvasContentView.prototype._updateRecordNavigationItem):
1027
1028 2017-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1029
1030         Web Inspector: Cleanup and test MIMETypeUtilities
1031         https://bugs.webkit.org/show_bug.cgi?id=176731
1032
1033         Reviewed by Matt Baker.
1034
1035         * UserInterface/Base/FileUtilities.js:
1036         (WI.saveDataToFile):
1037         * UserInterface/Models/SourceMapResource.js:
1038         (WI.SourceMapResource):
1039         Update callers to handle new return values.
1040
1041         * UserInterface/Base/MIMETypeUtilities.js:
1042         (WI.fileExtensionForURL):
1043         Return null in error cases.
1044         Only provide the content after the last period.
1045
1046         (WI.fileExtensionForMIMEType):
1047         Handle generic "+json" and "+xml" cases.
1048
1049         * UserInterface/Test.html:
1050         Include MIMETypeUtilities for testing.
1051
1052 2017-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1053
1054         Web Inspector: Rename NetworkTab / NetworkSidebar to LegacyNetwork*
1055         https://bugs.webkit.org/show_bug.cgi?id=176739
1056
1057         Reviewed by Matt Baker.
1058
1059         * UserInterface/Main.html:
1060         * UserInterface/Views/LegacyNetworkSidebarPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.css.
1061         * UserInterface/Views/LegacyNetworkSidebarPanel.js: Renamed from Source/WebInspectorUI/UserInterface/Views/NetworkSidebarPanel.js.
1062         * UserInterface/Views/LegacyNetworkTabContentView.js: Renamed from Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js.
1063         Rename resources.
1064
1065         * UserInterface/Base/Main.js:
1066         (WI.contentLoaded):
1067         * UserInterface/Views/NetworkGridContentView.js:
1068         (WI.NetworkGridContentView):
1069         (WI.NetworkGridContentView.prototype._networkTimelineRecordAdded):
1070         * UserInterface/Views/TabBrowser.js:
1071         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1072         Update names at callsites.
1073
1074 2017-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1075
1076         Web Inspector: Remove unused parameter to UIString
1077         https://bugs.webkit.org/show_bug.cgi?id=176738
1078
1079         Reviewed by Matt Baker.
1080
1081         * UserInterface/Base/LoadLocalizedStrings.js:
1082         (WI.UIString):
1083         Remove unused parameter. We moved to String.format for this behavior a while ago.
1084
1085 2017-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1086
1087         Web Inspector: Do not allow the split console in the Settings tab
1088         https://bugs.webkit.org/show_bug.cgi?id=176726
1089
1090         Reviewed by Matt Baker.
1091
1092         * UserInterface/Views/SettingsTabContentView.js:
1093         (WI.SettingsTabContentView.prototype.get supportsSplitContentBrowser):
1094
1095 2017-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1096
1097         Web Inspector: Include a DebugContentView for debugging
1098         https://bugs.webkit.org/show_bug.cgi?id=176733
1099
1100         Reviewed by Matt Baker.
1101
1102         Provide a DebugContentView which can be used to debug lifecycle
1103         events of a ContentView (shown, hidden, closed), and displays a
1104         provided string. It can be created like so:
1105
1106             `new WI.DebugContentView("Name")`
1107
1108         * UserInterface/Debug/DebugContentView.css: Added.
1109         (.content-view.debug):
1110         * UserInterface/Debug/DebugContentView.js: Added.
1111         (WI.DebugContentView):
1112         (WI.DebugContentView.prototype.shown):
1113         (WI.DebugContentView.prototype.hidden):
1114         (WI.DebugContentView.prototype.closed):
1115         Log events for debugging.
1116
1117         * UserInterface/Main.html:
1118         Include new Debug resources.
1119
1120 2017-09-11  Joseph Pecoraro  <pecoraro@apple.com>
1121
1122         Web Inspector: Make Dashboard Timeline icon and Timeline tab icon more similar
1123         https://bugs.webkit.org/show_bug.cgi?id=176582
1124
1125         Reviewed by Timothy Hatcher.
1126
1127         * UserInterface/Images/Time.svg:
1128         Change the clock hands to match the time of Timelines.svg.
1129
1130 2017-09-10  Matt Baker  <mattbaker@apple.com>
1131
1132         Web Inspector: change style of RecordingNavigationSidebarPanel
1133         https://bugs.webkit.org/show_bug.cgi?id=175451
1134         <rdar://problem/34040769>
1135
1136         Reviewed by Devin Rousso.
1137
1138         This patch adds UI polish to the Canvas recording navigation sidebar:
1139          - New icons for Canvas2D operations
1140          - Removed extraneous colors: zebra striping, frame element background color
1141          - Visual action color changed to match details sidebar "changed" color
1142          - Make tree item indent a convenient multiple of the base indent
1143          - Move RecordingActionTreeElement styles to a separate file
1144
1145         * UserInterface/Images/Clip.svg: Added.
1146         * UserInterface/Images/Composite.svg: Added.
1147         * UserInterface/Images/Fill.svg: Added.
1148         * UserInterface/Images/LineStyle.svg: Added.
1149         * UserInterface/Images/Palette.svg: Added.
1150         * UserInterface/Images/PathArc.svg: Added.
1151         * UserInterface/Images/PathCurve.svg: Added.
1152         * UserInterface/Images/PathEllipse.svg: Added.
1153         * UserInterface/Images/PathLineTo.svg: Added.
1154         * UserInterface/Images/PathMoveTo.svg: Added.
1155         * UserInterface/Images/PathRect.svg: Added.
1156         * UserInterface/Images/Pixels.svg: Added.
1157         * UserInterface/Images/PointInPath.svg: Added.
1158         * UserInterface/Images/PointInStroke.svg: Added.
1159         * UserInterface/Images/Shadow.svg: Added.
1160         * UserInterface/Images/Stroke.svg: Added.
1161         * UserInterface/Images/Text.svg: Added.
1162         * UserInterface/Images/Transform.svg: Added.
1163         New icons for Canvas2D operations.
1164
1165         * UserInterface/Main.html:
1166         New file.
1167
1168         * UserInterface/Views/GeneralTreeElement.js:
1169         (WI.GeneralTreeElement.prototype.customTitleTooltip):
1170         (WI.GeneralTreeElement.prototype._updateTitleTooltip):
1171         Allow derived classes to supply a custom tooltip, when
1172         simply getting the title element text is insufficient.
1173
1174         * UserInterface/Views/RecordingActionTreeElement.css: Added.
1175         (.item.action.initial-state > .icon):
1176         (.tree-outline:not(:focus, .force-focus) .item.action:not(.initial-state, .parent, .invalid) > .icon):
1177         (.item.action:not(.initial-state)::before):
1178         (body[dir=ltr] .item.action::before):
1179         (body[dir=rtl] .item.action::before):
1180         (.tree-outline:matches(:focus, .force-focus) .item.action.selected:not(.initial-state, .invalid) > .icon):
1181         (body:not(.window-inactive, .window-docked-inactive) :matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,):
1182         (.tree-outline[data-indent="1"] .item.action::before,):
1183         (.tree-outline[data-indent="3"] .item.action::before):
1184         (.tree-outline[data-indent="4"] .item.action::before):
1185         (.tree-outline[data-indent="5"] .item.action::before):
1186         (.tree-outline[data-indent="6"] .item.action::before):
1187         (.tree-outline[data-indent="7"] .item.action::before):
1188         (body[dir=ltr] .tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon):
1189         (body[dir=rtl] .tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon):
1190         (.item.action.visual:not(.selected, .invalid)):
1191         (.item.action.attribute > .titles .parameters::before):
1192         (.item.action:not(.attribute) > .titles .parameters::before):
1193         (.item.action:not(.attribute) > .titles .parameters::after):
1194         (.item.action > .titles .parameter:not(:last-child)::after):
1195         (.item.action:not(.selected) > .titles .parameter.swizzled):
1196         (.item.action.composite > .icon):
1197         (.item.action.fill > .icon):
1198         (.item.action.image > .icon):
1199         (.item.action.line-style > .icon):
1200         (.item.action.shadow > .icon):
1201         (.item.action.stroke > .icon):
1202         (.item.action.style > .icon):
1203         (.item.action.text > .icon):
1204         (.item.action.transform > .icon):
1205         (.item.action.arc > .icon):
1206         (.item.action.clip > .icon):
1207         (.item.action.curve > .icon):
1208         (.item.action.ellipse > .icon):
1209         (.item.action.line-to > .icon):
1210         (.item.action.move-to > .icon):
1211         (.item.action.point-in-path > .icon):
1212         (.item.action.point-in-stroke > .icon):
1213         (.item.action.rect > .icon):
1214         (.item.action.restore > .icon):
1215         (.item.action.save > .icon):
1216         (.item.action.invalid > .icon):
1217
1218         * UserInterface/Views/RecordingActionTreeElement.js:
1219         (WI.RecordingActionTreeElement):
1220         (WI.RecordingActionTreeElement._generateDOM.createParameterElement):
1221         (WI.RecordingActionTreeElement._generateDOM):
1222         (WI.RecordingActionTreeElement._getClassNames):
1223         Broke out into its own helper, to simplify _generateDOM which had
1224         too many responsibilities.
1225
1226         (WI.RecordingActionTreeElement._classNameForAction.classNameForActionName):
1227         (WI.RecordingActionTreeElement._classNameForAction):
1228         Get an icon for the action "type". Actions are grouped by similar
1229         operations. For example, lineCap, lineDash, lineJoin, lineWidth, and
1230         miterLimit are assigned the icon LineStyle.svg.
1231
1232         (WI.RecordingActionTreeElement.prototype.customTitleTooltip):
1233
1234         * UserInterface/Views/RecordingNavigationSidebarPanel.css:
1235         (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.folder-icon > .icon):
1236         (.sidebar > .panel.navigation.recording > .content > .tree-outline:not(:empty)): Deleted.
1237         (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action, .selected).expanded): Deleted.
1238         (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): Deleted.
1239         (body[dir=ltr] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): Deleted.
1240         (body[dir=rtl] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before): Deleted.
1241         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="2"] .item.action:not(.initial-state)::before): Deleted.
1242         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="3"] .item.action:not(.initial-state)::before): Deleted.
1243         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="4"] .item.action:not(.initial-state)::before): Deleted.
1244         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="5"] .item.action:not(.initial-state)::before): Deleted.
1245         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="6"] .item.action:not(.initial-state)::before): Deleted.
1246         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="7"] .item.action:not(.initial-state)::before): Deleted.
1247         (.sidebar > .panel.navigation.recording > .content .action > .icon): Deleted.
1248         (.sidebar > .panel.navigation.recording > .content .action.function > .icon): Deleted.
1249         (.sidebar > .panel.navigation.recording > .content .action.attribute.getter > .icon): Deleted.
1250         (.sidebar > .panel.navigation.recording > .content .tree-outline:matches(:focus, .force-focus) .action.attribute.getter.selected > .icon): Deleted.
1251         (.sidebar > .panel.navigation.recording > .content .action.attribute.boolean > .icon): Deleted.
1252         (.sidebar > .panel.navigation.recording > .content .action.attribute.number > .icon): Deleted.
1253         (.sidebar > .panel.navigation.recording > .content .action.attribute.object > .icon): Deleted.
1254         (.sidebar > .panel.navigation.recording > .content .action.attribute.string > .icon): Deleted.
1255         (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action) > .icon): Deleted.
1256         (.sidebar > .panel.navigation.recording > .content .action:matches(.invalid, .missing) > .icon): Deleted.
1257         (body[dir=ltr] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): Deleted.
1258         (body[dir=rtl] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon): Deleted.
1259         (.sidebar > .panel.navigation.recording > .content .action.visual:not(.selected, .invalid)): Deleted.
1260         (.sidebar > .panel.navigation.recording > .content .action:not(.selected, .initial-state) > .titles .parameter.swizzled): Deleted.
1261         (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid)): Deleted.
1262         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
1263
1264 2017-09-08  Joseph Pecoraro  <pecoraro@apple.com>
1265
1266         Uncaught Exception: TypeError: this._heapSnapshot.addEventListener is not a function.
1267         https://bugs.webkit.org/show_bug.cgi?id=176633
1268
1269         Reviewed by Michael Saboff.
1270
1271         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
1272         (WI.HeapSnapshotDiffProxy):
1273         This class has listeners of another object's events. It should extend WI.Object.
1274
1275 2017-09-08  Devin Rousso  <webkit@devinrousso.com>
1276
1277         Web Inspector: Canvas: changes to currentX/currentY aren't highlighted in the details sidebar
1278         https://bugs.webkit.org/show_bug.cgi?id=176569
1279
1280         Reviewed by Matt Baker.
1281
1282         * UserInterface/Models/RecordingAction.js:
1283         Add entries to WI.RecordingAction._stateModifiers for each path function.
1284
1285 2017-09-07  Joseph Pecoraro  <pecoraro@apple.com>
1286
1287         Augmented Inspector: Provide a way to inspect a DOM Node (DOM.inspect)
1288         https://bugs.webkit.org/show_bug.cgi?id=176563
1289         <rdar://problem/19639583>
1290
1291         Reviewed by Matt Baker.
1292
1293         * UserInterface/Base/Main.js:
1294         (WI.contentLoaded):
1295         Always create the element search toolbar icon. Only show it if the DOM domain
1296         is available. With augmented agents the DOM domain may be activated later.
1297
1298         * UserInterface/Protocol/DOMObserver.js:
1299         (WI.DOMObserver.prototype.inspect):
1300         Select the node in the DOM tree outline.
1301
1302 2017-09-07  Devin Rousso  <webkit@devinrousso.com>
1303
1304         Web Inspector: Canvas RecordingAction tree outline virtualization is broken
1305         https://bugs.webkit.org/show_bug.cgi?id=176547
1306
1307         Reviewed by Joseph Pecoraro.
1308
1309         * UserInterface/Views/TreeOutline.js:
1310         (WI.TreeOutline.prototype.updateVirtualizedElements.walk):
1311         (WI.TreeOutline.prototype.updateVirtualizedElements):
1312         Pass the current `count` to each recursive call of `walk` so that the cumulative index of a
1313         TreeElement in any given sub-tree is correct.
1314         Drive-by: if there is a focused TreeElement when scrolling, only change the current
1315         `scrollTop` if it is not already visible. Also rewrote some loops for clarity.
1316
1317 2017-09-07  Devin Rousso  <webkit@devinrousso.com>
1318
1319         Unreviewed, change my copyright email.
1320
1321         * Scripts/copy-user-interface-resources.pl:
1322         * UserInterface/Controllers/CodeMirrorSpringEditingController.js:
1323         * UserInterface/Images/AnimationPlayStatePaused.svg:
1324         * UserInterface/Images/AnimationPlayStateRunning.svg:
1325         * UserInterface/Images/CSSVariable.svg:
1326         * UserInterface/Images/ListStylePositionInside.svg:
1327         * UserInterface/Images/ListStylePositionOutside.svg:
1328         * UserInterface/Images/StyleRule.svg:
1329         * UserInterface/Images/StyleRulePseudoElement.svg:
1330         * UserInterface/Models/Collection.js:
1331         * UserInterface/Models/ResourceCollection.js:
1332         * UserInterface/Views/CollectionContentView.css:
1333         * UserInterface/Views/CollectionContentView.js:
1334         * UserInterface/Views/ContextMenuUtilities.js:
1335         * UserInterface/Views/GeneralTabBarItem.js:
1336         * UserInterface/Views/GradientEditor.css:
1337         * UserInterface/Views/GradientEditor.js:
1338         * UserInterface/Views/InlineSwatch.css:
1339         * UserInterface/Views/InlineSwatch.js:
1340         * UserInterface/Views/PinnedTabBarItem.js:
1341         * UserInterface/Views/SettingsTabContentView.css:
1342         * UserInterface/Views/SettingsTabContentView.js:
1343         * UserInterface/Views/SpringEditor.css:
1344         * UserInterface/Views/SpringEditor.js:
1345         * UserInterface/Views/StyleRuleIcons.css:
1346         * UserInterface/Views/TabBarItem.js:
1347         * UserInterface/Views/TitleView.css:
1348         * UserInterface/Views/TitleView.js:
1349         * UserInterface/Views/VisualStyleBackgroundPicker.css:
1350         * UserInterface/Views/VisualStyleBackgroundPicker.js:
1351         * UserInterface/Views/VisualStyleBasicInput.js:
1352
1353 2017-09-06  Matt Baker  <mattbaker@apple.com>
1354
1355         Web Inspector: Relax the maximum sidebar width
1356         https://bugs.webkit.org/show_bug.cgi?id=175808
1357         <rdar://problem/34005339>
1358
1359         Reviewed by Devin Rousso.
1360
1361         This patch introduces a constant, `minimumContentBrowserWidth`, which
1362         constrains the maximum width of either sidebar:
1363
1364         maxSidebarWidth = window.innerWidth - minimumContentBrowserWidth - otherSidebarWidth
1365
1366         A value of 100px for `minimumContentBrowserWidth` leaves enough space for
1367         three NavigationItems at their minimum width (32px), with a few pixels
1368         left over for good measure. For most tabs this will ensure that the buttons
1369         for showing the sidebars will be visible, along with an addition button.
1370
1371         * UserInterface/Base/Main.js:
1372         * UserInterface/Views/Sidebar.js:
1373         (WI.Sidebar.prototype.get maximumWidth):
1374
1375 2017-09-06  Devin Rousso  <webkit@devinrousso.com>
1376
1377         Web Inspector: Support overloaded CanvasRenderingContext2D actions with identical parameter counts
1378         https://bugs.webkit.org/show_bug.cgi?id=176178
1379         <rdar://problem/34192229>
1380
1381         Reviewed by Matt Baker.
1382
1383         * UserInterface/Models/Recording.js:
1384         (WI.Recording.displayNameForSwizzleType):
1385         (WI.Recording.prototype.swizzle):
1386         Replace WI.Recording.Swizzle with an object of swizzle type keys to int values. This object
1387         matches the values in WebCore::RecordingSwizzleTypes.h.
1388
1389         * UserInterface/Models/RecordingAction.js:
1390         (WI.RecordingAction):
1391         (WI.RecordingAction.fromPayload):
1392         (WI.RecordingAction.prototype.get swizzleTypes):
1393         (WI.RecordingAction.prototype.swizzle):
1394         (WI.RecordingAction.prototype.toJSON):
1395         (WI.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex): Deleted.
1396         Replace WI.RecordingAction._parameterSwizzleTypeForTypeAtIndex with an array of parameter
1397         types sent in the payload. This gives more control over the swizzling to the JSON, but also
1398         simplifies the way we regenerate the data in the frontend.
1399
1400         * UserInterface/Views/RecordingActionTreeElement.js:
1401         (WI.RecordingActionTreeElement._generateDOM):
1402
1403         * UserInterface/Views/RecordingContentView.js:
1404         (WI.RecordingContentView.prototype._generateContentCanvas2D):
1405         (WI.RecordingContentView.prototype._applyAction):
1406
1407         * UserInterface/Views/RecordingNavigationSidebarPanel.css:
1408         (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles :matches(.name, .parameter.invalid)):
1409         (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,): Deleted.
1410
1411 2017-09-06  Joseph Pecoraro  <pecoraro@apple.com>
1412
1413         Web Inspector: ⌘E and ⌘G do not work in main content area when quick console drawer is open
1414         https://bugs.webkit.org/show_bug.cgi?id=176433
1415
1416         Reviewed by Brian Burg.
1417
1418         Make the ⌘E and ⌘G keyboard shortcuts behave more like the global ⌘K clear shortcut.
1419         Instead of keeping them inside of FindBanner, and enabling/disabling them when they
1420         make sense to apply, we make a single global instance of the keyboard shortcut and
1421         apply it to whatever content view / content browser is active. This avoids conflicts
1422         in situations where there are two ContentViews that are visible and each can handle
1423         the keyboard shortcut.
1424
1425         * UserInterface/Base/Main.js:
1426         (WI.contentLoaded):
1427         New keyboard shortcuts.
1428
1429         (WI._populateFind):
1430         (WI._findNext):
1431         (WI._findPrevious):
1432         Perform the shortcut on the active content view or content browser.
1433
1434         * UserInterface/Views/ContentBrowser.js:
1435         (WI.ContentBrowser.prototype.shown):
1436         (WI.ContentBrowser.prototype.hidden):
1437         (WI.ContentBrowser.prototype.handlePopulateFindShortcut):
1438         (WI.ContentBrowser.prototype.handleFindNextShortcut):
1439         (WI.ContentBrowser.prototype.handleFindPreviousShortcut):
1440         (WI.ContentBrowser.prototype.findBannerSearchQueryForSelection): Deleted.
1441         * UserInterface/Views/LogContentView.js:
1442         (WI.LogContentView.prototype.handlePopulateFindShortcut):
1443         (WI.LogContentView.prototype.handleFindNextShortcut):
1444         (WI.LogContentView.prototype.handleFindPreviousShortcut):
1445         ContentBrowser and LogContentView (the only content view with a custom find banner)
1446         now each handle the global keyboard shortcut handlers to do the right thing for
1447         their respective cases.
1448
1449         * UserInterface/Views/FindBanner.js:
1450         (WI.FindBanner.prototype.enableKeyboardShortcuts): Deleted.
1451         (WI.FindBanner.prototype.disableKeyboardShortcuts): Deleted.
1452         (WI.FindBanner.prototype._populateSearchQueryFromSelection): Deleted.
1453         Move keyboard shortcut handling up to Main.js to be global.
1454
1455         * UserInterface/Views/ContentView.js:
1456         (WI.ContentView.prototype.searchQueryWithSelection):
1457         Default implementation should grab the selected text from the selection.
1458         Previously shortcut selections only worked for selections in text editors.
1459
1460 2017-09-05  Nikita Vasilyev  <nvasilyev@apple.com>
1461
1462         Web Inspector: Styles Redesign: display "Inherited From" section headers
1463         https://bugs.webkit.org/show_bug.cgi?id=176033
1464         <rdar://problem/34116930>
1465
1466         Reviewed by Devin Rousso.
1467
1468         Compared to the old styles sidebar, the new "Inherited From" sections are more compact.
1469         One of the goals of the styles redesign is to make it fit more data vertically.
1470
1471         The contrast is inceased. The text is darker while the background stayed the same.
1472
1473         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css:
1474         (.spreadsheet-style-panel .section-inherited):
1475         (.spreadsheet-style-panel .section-inherited .node-link):
1476         (.spreadsheet-style-panel .section-inherited .node-link:hover):
1477         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1478         (WI.SpreadsheetRulesStyleDetailsPanel):
1479         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
1480         Don't show two identical "Inherited From" sections.
1481
1482 2017-09-05  Nikita Vasilyev  <nvasilyev@apple.com>
1483
1484         Web Inspector: Layout flashing for internal View.prototype.layout
1485         https://bugs.webkit.org/show_bug.cgi?id=176389
1486
1487         Reviewed by Matt Baker.
1488
1489         Add a checkbox to Settings (Debug panel) to draw an orange outline around an element every time View.prototype.layout is called.
1490         This is similar to paint flashing, except this is only for View.prototype.layout.
1491
1492         * UserInterface/Base/Setting.js:
1493         * UserInterface/Views/SettingsTabContentView.js:
1494         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
1495         * UserInterface/Views/View.js:
1496         (WI.View.prototype._layoutSubtree):
1497         (WI.View.prototype._drawLayoutFlashingOutline):
1498
1499 2017-09-04  Nikita Vasilyev  <nvasilyev@apple.com>
1500
1501         Web Inspector: Styles Redesign: hook up real data to spreadsheet style editor
1502         https://bugs.webkit.org/show_bug.cgi?id=175343
1503         <rdar://problem/33784793>
1504
1505         Reviewed by Devin Rousso.
1506
1507         Replace static HTML added in <https://webkit.org/b/174838> with actual data.
1508
1509         Addressed in this patch:
1510         - CSS rules can be copied.
1511         - Source links work as expected.
1512         - Nonmatching selectors are grayed out.
1513
1514         Known limitations:
1515         - Neither CSS selectors nor CSS properties are editable.
1516         - "Inherited from" and media query section headers are missing.
1517         - No syntax highlighting of complex CSS values, e.g. hsl(0, 0%, 70%).
1518
1519         * UserInterface/Main.html:
1520         * UserInterface/Models/CSSStyleDeclaration.js:
1521         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1522         (WI.CSSStyleDeclarationTextEditor):
1523         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
1524         (WI.CSSStyleDetailsSidebarPanel):
1525         * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: Removed.
1526         Rename RulesStyleSpreadsheetDetailsPanel to SpreadsheetRulesStyleDetailsPanel. All files related to the spreadsheet editor start with "Spreadsheet" now.
1527
1528         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: Added.
1529         (.spreadsheet-style-declaration-editor):
1530         (.spreadsheet-style-declaration-editor .name):
1531         (.spreadsheet-style-declaration-editor .value):
1532         (.spreadsheet-style-declaration-editor.no-properties):
1533         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: Added.
1534         (WI.SpreadsheetCSSStyleDeclarationEditor):
1535         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1536         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get delegate):
1537         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set delegate):
1538         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get style):
1539         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style):
1540         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender):
1541         Similar condition is commonly used in CSSStyleDeclarationTextEditor. Abstact it out to its own method.
1542
1543         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._renderProperty):
1544         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css: Copied from Source/WebInspectorUI/UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css.
1545         (.spreadsheet-css-declaration):
1546         (.spreadsheet-css-declaration .origin):
1547         (.spreadsheet-css-declaration.locked .origin::after):
1548         (.spreadsheet-css-declaration .origin .go-to-link):
1549         (.spreadsheet-css-declaration .origin .go-to-link:hover):
1550         (.spreadsheet-css-declaration .styles-source):
1551         (.spreadsheet-css-declaration .selector.style-attribute):
1552         (.spreadsheet-css-declaration .selector > span):
1553         (.spreadsheet-css-declaration .selector > .matched):
1554         (.spreadsheet-css-declaration .properties):
1555         (.spreadsheet-css-declaration.locked):
1556         (.spreadsheet-css-declaration .locked-icon):
1557         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js: Added.
1558         (WI.SpreadsheetCSSStyleDeclarationSection):
1559         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get element):
1560         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get style):
1561         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1562         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
1563         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorFocused):
1564         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get locked):
1565         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get selectorEditable):
1566         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.css: Renamed from Source/WebInspectorUI/UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css.
1567         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js: Added.
1568         (WI.SpreadsheetRulesStyleDetailsPanel):
1569         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
1570         * UserInterface/Views/StyleDetailsPanel.js:
1571         (WI.StyleDetailsPanel.prototype.filterDidChange):
1572
1573         * UserInterface/Views/View.js:
1574         (WI.View.prototype.removeAllSubviews):
1575         Add a method to remove all subviews more efficiently.
1576
1577 2017-08-29  Matt Baker  <mattbaker@apple.com>
1578
1579         Web Inspector: Critical content browser toolbar buttons are hidden at narrow widths
1580         https://bugs.webkit.org/show_bug.cgi?id=175999
1581
1582         Reviewed by Devin Rousso.
1583
1584         This patch adds a VisibilityPriority concept to NavigationItems. If a
1585         NavigationBar cannot fit all of its items in the available space, items
1586         are hidden to make room, starting with the lowest priority item. Consecutive
1587         dividers are then collapsed, as well as leading and trailing dividers.
1588
1589         * UserInterface/Main.html:
1590         New file.
1591
1592         * UserInterface/Views/CanvasContentView.js:
1593         (WI.CanvasContentView):
1594         * UserInterface/Views/ConsoleDrawer.js:
1595         (WI.ConsoleDrawer):
1596         * UserInterface/Views/ContentBrowser.js:
1597         (WI.ContentBrowser):
1598         * UserInterface/Views/ContentBrowserTabContentView.js:
1599         (WI.ContentBrowserTabContentView):
1600         * UserInterface/Views/DOMTreeContentView.js:
1601         (WI.DOMTreeContentView):
1602         Set `High` and `Low` priorities, and group the back/forward buttons.
1603
1604         * UserInterface/Views/GroupNavigationItem.js: Added.
1605         (WI.GroupNavigationItem):
1606         (WI.GroupNavigationItem.prototype.get navigationItems):
1607         (WI.GroupNavigationItem.prototype.get minimumWidth):
1608         (WI.GroupNavigationItem.prototype.updateLayout):
1609         (WI.GroupNavigationItem.prototype.didAttach):
1610         (WI.GroupNavigationItem.prototype.didDetach):
1611         NavigationItem groups. Grouped items are shown/hidden together.
1612
1613         * UserInterface/Views/HierarchicalPathNavigationItem.js:
1614         (WI.HierarchicalPathNavigationItem.prototype.updateLayout):
1615         * UserInterface/Views/ImageResourceContentView.js:
1616         (WI.ImageResourceContentView):
1617         * UserInterface/Views/IndexedDatabaseObjectStoreContentView.js:
1618         (WI.IndexedDatabaseObjectStoreContentView):
1619         * UserInterface/Views/LogContentView.js:
1620         (WI.LogContentView):
1621         Set `High` and `Low` priorities.
1622
1623         * UserInterface/Views/NavigationBar.css:
1624         (.navigation-bar .item.force-hidden):
1625         New hidden class, which must be tracked separately from ".hidden".
1626         The former is an implementation detail of NavigationBar, while the
1627         latter is set by the client.
1628
1629         * UserInterface/Views/NavigationBar.js:
1630         (WI.NavigationBar.prototype.insertNavigationItem):
1631         (WI.NavigationBar.prototype.removeNavigationItem):
1632         (WI.NavigationBar.prototype.findNavigationItem.matchingSelfOrChild):
1633         (WI.NavigationBar.prototype.findNavigationItem):
1634         (WI.NavigationBar.prototype.layout.forceItemHidden):
1635         (WI.NavigationBar.prototype.layout.isDivider):
1636         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
1637         (WI.NavigationBar.prototype.layout):
1638         (WI.NavigationBar.prototype._calculateMinimumWidth):
1639         (WI.NavigationBar.prototype.get _visibleNavigationItems):
1640         (WI.NavigationBar):
1641
1642         * UserInterface/Views/NavigationItem.js:
1643         Add support for visibility priority, an integer value that determines the
1644         order in which items are hidden when the NavigationBar becomes too narrow
1645         to fit all of items child items. NavigationIte3m defines constants for
1646         Low, Normal (the default), and High priority.
1647
1648         (WI.NavigationItem):
1649         (WI.NavigationItem.prototype.get minimumWidth):
1650         (WI.NavigationItem.prototype.get width):
1651         (WI.NavigationItem.prototype.get visibilityPriority):
1652         (WI.NavigationItem.prototype.set visibilityPriority):
1653         (WI.NavigationItem.prototype.updateLayout):
1654         (WI.NavigationItem.prototype.didAttach):
1655         (WI.NavigationItem.prototype.didDetach):
1656         Encapsulate the setting of the parent NavigationBar. Needed so that
1657         GroupNavigationItem can forward this action to its children.
1658
1659         * UserInterface/Views/NetworkGridContentView.js:
1660         (WI.NetworkGridContentView):
1661         * UserInterface/Views/RadioButtonNavigationItem.js:
1662         (WI.RadioButtonNavigationItem.prototype.updateLayout):
1663         * UserInterface/Views/RecordingContentView.js:
1664         (WI.RecordingContentView):
1665         * UserInterface/Views/ScriptContentView.js:
1666         (WI.ScriptContentView):
1667         * UserInterface/Views/TextContentView.js:
1668         (WI.TextContentView):
1669         * UserInterface/Views/TextResourceContentView.js:
1670         (WI.TextResourceContentView):
1671         * UserInterface/Views/TimelineRecordingContentView.js:
1672         (WI.TimelineRecordingContentView):
1673         * UserInterface/Views/TimelineTabContentView.js:
1674         (WI.TimelineTabContentView):
1675         Set `High` and `Low` priorities, and group Timeline view mode buttons.
1676
1677 2017-08-29  Joseph Pecoraro  <pecoraro@apple.com>
1678
1679         REGRESSION(r220235): Web Inspector: Global search should not happen incrementally
1680         https://bugs.webkit.org/show_bug.cgi?id=176063
1681
1682         Reviewed by Devin Rousso.
1683
1684         * UserInterface/Base/Main.js:
1685         (WI.contentLoaded):
1686         * UserInterface/Views/SearchBar.js:
1687         (WI.SearchBar):
1688         (WI.SearchBar.prototype._handleKeydownEvent):
1689         Remove delegate and simplify setting incremental.
1690
1691 2017-08-29  Nikita Vasilyev  <nvasilyev@apple.com>
1692
1693         Web Inspector: Convert all methods in Utilities.js to ECMAScript 2015 shorthand syntax
1694         https://bugs.webkit.org/show_bug.cgi?id=176067
1695
1696         Reviewed by Joseph Pecoraro.
1697
1698         * UserInterface/Base/Utilities.js:
1699         (get return):
1700         (addStringToken):
1701         (prettyFunctionName):
1702         (warn):
1703         (error):
1704         (isEmptyObject):
1705         (isEnterKey):
1706         (resolveDotsInPath):
1707         (parseMIMEType):
1708         (simpleGlobStringToRegExp):
1709         (defaultComparator):
1710         (get Object):
1711         (appendWebInspectorSourceURL):
1712         (appendWebInspectorConsoleEvaluationSourceURL):
1713         (isWebInspectorInternalScript):
1714         (isWebInspectorConsoleEvaluationScript):
1715         (isWebKitInjectedScript):
1716         (isWebKitInternalScript):
1717         (isFunctionStringNativeCode):
1718         (isTextLikelyMinified):
1719         (doubleQuotedString):
1720         (insertionIndexForObjectInListSortedByFunction):
1721         (insertObjectIntoSortedArray):
1722         (decodeBase64ToBlob):
1723
1724 2017-08-29  Nikita Vasilyev  <nvasilyev@apple.com>
1725
1726         Web Inspector: Optimize View.prototype.removeSubview
1727         https://bugs.webkit.org/show_bug.cgi?id=176041
1728
1729         Reviewed by Matt Baker.
1730
1731         Look up a subview in an array only once, not twice.
1732
1733         * UserInterface/Base/Utilities.js:
1734         (Array.prototype.removeAll):
1735         (Array.prototype.remove):
1736         Split Array.propotype.remove(value, onlyFirst) into Array.propotype.removeAll(value) and
1737         Array.propotype.remove(value).
1738
1739         * UserInterface/Controllers/DebuggerManager.js:
1740         (WI.DebuggerManager.prototype._debuggerBreakpointOptions):
1741         * UserInterface/Views/ContentViewContainer.js:
1742         (WI.ContentViewContainer.prototype._clearTombstonesForContentView):
1743         (WI.ContentViewContainer.prototype._disassociateFromContentView):
1744         * UserInterface/Views/View.js:
1745         (WI.View.prototype.removeSubview):
1746
1747 2017-08-28  Joseph Pecoraro  <pecoraro@apple.com>
1748
1749         Web Inspector: Remove some unused DataGrid code
1750         https://bugs.webkit.org/show_bug.cgi?id=176029
1751
1752         Reviewed by Matt Baker.
1753
1754         * UserInterface/Views/DataGrid.js:
1755         (WI.DataGrid.prototype.get copyTextDelimiter):
1756         (WI.DataGrid.prototype.set copyTextDelimiter):
1757         (WI.DataGrid.prototype.resizerDragging):
1758         (WI.DataGrid.prototype.columnWidthsMap): Deleted.
1759         (WI.DataGrid.prototype.applyColumnWidthsMap): Deleted.
1760         (WI.DataGrid.prototype.get resizeMethod): Deleted.
1761         (WI.DataGrid.prototype.set resizeMethod): Deleted.
1762
1763 2017-08-27  Devin Rousso  <webkit@devinrousso.com>
1764
1765         Web Inspector: Record actions performed on WebGLRenderingContext
1766         https://bugs.webkit.org/show_bug.cgi?id=174483
1767         <rdar://problem/34040722>
1768
1769         Reviewed by Matt Baker.
1770
1771         * UserInterface/Models/Recording.js:
1772         (WI.Recording):
1773         (WI.Recording.fromPayload):
1774         (WI.Recording.prototype.swizzle):
1775         Add swizzle types for WebGL parameters.
1776
1777         * UserInterface/Models/RecordingAction.js:
1778         (WI.RecordingAction):
1779         (WI.RecordingAction.fromPayload):
1780         (WI.RecordingAction.prototype.get snapshot):
1781         (WI.RecordingAction.prototype.swizzle):
1782         (WI.RecordingAction.prototype.toJSON):
1783         Include an optional fourth parameter `snapshot` that will be sent for visual actions when
1784         recording WebGL canvas contexts.
1785
1786         * UserInterface/Views/RecordingContentView.js:
1787         (WI.RecordingContentView):
1788         (WI.RecordingContentView.prototype.get navigationItems):
1789         (WI.RecordingContentView.prototype.updateActionIndex):
1790         (WI.RecordingContentView.prototype.shown):
1791         (WI.RecordingContentView.prototype._generateContentCanvasWebGL):
1792         * UserInterface/Views/RecordingContentView.css:
1793         (.content-view:not(.tab).recording :matches(img, canvas)):
1794         (.content-view:not(.tab).recording canvas): Deleted.
1795         Instead of regenerating the canvas context in the WebInspector frontend, just display the
1796         snapshot image for the last visual action.
1797
1798         * UserInterface/Views/CanvasContentView.js:
1799         (WI.CanvasContentView):
1800
1801         * UserInterface/Views/RecordingActionTreeElement.js:
1802         (WI.RecordingActionTreeElement._generateDOM):
1803
1804 2017-08-24  Devin Rousso  <webkit@devinrousso.com>
1805
1806         Web Inspector: add filter for draw actions in Recordings
1807         https://bugs.webkit.org/show_bug.cgi?id=175448
1808         <rdar://problem/34040764>
1809
1810         Reviewed by Matt Baker.
1811
1812         * Localizations/en.lproj/localizedStrings.js:
1813         
1814         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
1815         (WI.RecordingNavigationSidebarPanel.prototype.initialLayout):
1816         (WI.RecordingNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
1817         Add button to filter visual actions.
1818         Drive-by fix: ensure that frame folders are still visible when filtering.
1819
1820         * UserInterface/Images/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/PaintFlashing.svg.
1821         * UserInterface/Images/gtk/Paint.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/PaintFlashing.svg.
1822         * UserInterface/Views/DOMTreeContentView.js:
1823         (WI.DOMTreeContentView):
1824         Rename PaintFlashing.svg to Paint.svg.
1825
1826 2017-08-24  Ross Kirsling  <ross.kirsling@sony.com>
1827
1828         Web Inspector: Create experimental Layers tab
1829         https://bugs.webkit.org/show_bug.cgi?id=175728
1830
1831         Reviewed by Devin Rousso.
1832
1833         * Localizations/en.lproj/localizedStrings.js:
1834         * UserInterface/Base/Main.js:
1835         * UserInterface/Base/Setting.js:
1836         * UserInterface/Images/Layers.svg: Added.
1837         * UserInterface/Main.html:
1838         * UserInterface/Views/Layers3DContentView.js: Added.
1839         * UserInterface/Views/LayersTabContentView.js: Added.
1840         * UserInterface/Views/SettingsTabContentView.js:
1841
1842 2017-08-24  Devin Rousso  <webkit@devinrousso.com>
1843
1844         Web Inspector: Table grid shouldn't show behind empty state
1845         https://bugs.webkit.org/show_bug.cgi?id=175943
1846
1847         Reviewed by Brian Burg.
1848
1849         * UserInterface/Views/RecordingNavigationSidebarPanel.css:
1850         (.sidebar > .panel.navigation.recording > .content > .tree-outline):
1851         (.sidebar > .panel.navigation.recording > .content > .tree-outline:not(:empty)):
1852         Only apply the background when the TreeOutline has children.
1853
1854 2017-08-23  Nikita Vasilyev  <nvasilyev@apple.com>
1855
1856         Web Inspector: Make lock icon crispier
1857         https://bugs.webkit.org/show_bug.cgi?id=175868
1858
1859         Reviewed by Matt Baker.
1860
1861         * UserInterface/Images/Locked.svg:
1862
1863 2017-08-22  Devin Rousso  <webkit@devinrousso.com>
1864
1865         Web Inspector: provide way for ShaderPrograms to be enabled/disabled
1866         https://bugs.webkit.org/show_bug.cgi?id=175400
1867
1868         Reviewed by Matt Baker.
1869
1870         Adds a status element to ShaderProgramTreeElement that, when clicked, will toggle the
1871         disabled state of the corresponding ShaderProgram. Disabled shader programs will not draw
1872         anything to the context.
1873
1874         * Localizations/en.lproj/localizedStrings.js:
1875         * UserInterface/Main.html:
1876
1877         * UserInterface/Models/ShaderProgram.js:
1878         (WI.ShaderProgram):
1879         (WI.ShaderProgram.prototype.get disabled):
1880         (WI.ShaderProgram.prototype.toggleDisabled):
1881
1882         * UserInterface/Views/ShaderProgramTreeElement.js:
1883         (WI.ShaderProgramTreeElement):
1884         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown):
1885         (WI.ShaderProgramTreeElement.prototype._disabledImageElementClicked):
1886         * UserInterface/Views/ShaderProgramTreeElement.css: Added.
1887         (.item.shader-program .status > img):
1888         (.item.shader-program:not(:hover, .selected, .disabled) .status > img):
1889         (.tree-outline:matches(:focus, .force-focus) .item.shader-program.selected .status > img):
1890         (.item.shader-program.disabled > *):
1891
1892 2017-08-21  Devin Rousso  <webkit@devinrousso.com>
1893
1894         Web Inspector: Can't copy text from "View variable value" popover in Styles sidebar
1895         https://bugs.webkit.org/show_bug.cgi?id=175758
1896
1897         Reviewed by Matt Baker.
1898
1899         * UserInterface/Views/InlineSwatch.js:
1900         (WI.InlineSwatch.prototype._swatchElementClicked):
1901         Change CodeMirror readOnly from "nocursor" to true. The former prevents the editor from
1902         being focused during selection, therefore preventing the content from being copied.
1903
1904 2017-08-17  Matt Baker  <mattbaker@apple.com>
1905
1906         Web Inspector: create better icon for Canvas Path navigation item
1907         https://bugs.webkit.org/show_bug.cgi?id=175274
1908
1909         Reviewed by Joseph Pecoraro.
1910
1911         * UserInterface/Images/Path.svg: Added.
1912         * UserInterface/Views/RecordingContentView.js:
1913         (WI.RecordingContentView):
1914
1915 2017-08-17  Nikita Vasilyev  <nvasilyev@apple.com>
1916
1917         Web Inspector: Styles: replace "Enter Class Name" with "Add New Class"
1918         https://bugs.webkit.org/show_bug.cgi?id=175686
1919
1920         Reviewed by Matt Baker.
1921
1922         "Enter Class Name" isn't very descriptive. It doesn't suggest what's going to happen after you enter a class name.
1923
1924         * Localizations/en.lproj/localizedStrings.js:
1925         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
1926         (WI.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
1927
1928 2017-08-17  Ross Kirsling  <ross.kirsling@sony.com>
1929
1930         Web Inspector: Ensure three.js gets minified properly for production builds.
1931         https://bugs.webkit.org/show_bug.cgi?id=175452
1932
1933         Reviewed by Brian Burg.
1934
1935         * Scripts/copy-user-interface-resources.pl:
1936
1937 2017-08-14  Simon Fraser  <simon.fraser@apple.com>
1938
1939         Remove Proximity Events and related code
1940         https://bugs.webkit.org/show_bug.cgi?id=175545
1941
1942         Reviewed by Daniel Bates.
1943
1944         No platform enables Proximity Events, so remove code inside ENABLE(PROXIMITY_EVENTS)
1945         and other related code.
1946
1947         * UserInterface/Models/ScriptTimelineRecord.js:
1948         (WI.ScriptTimelineRecord.EventType.displayName):
1949
1950 2017-08-14  Matt Baker  <mattbaker@apple.com>
1951
1952         Web Inspector: Remove text-shadow and gradient backgrounds
1953         https://bugs.webkit.org/show_bug.cgi?id=175430
1954
1955         Reviewed by Brian Burg.
1956
1957         Inspector should more closely match flat system look. Remove text-shadow
1958         embossing and replace linear gradients in popover backgrounds and selected
1959         tree item background color.
1960
1961         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
1962         (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label):
1963         * UserInterface/Views/CompletionSuggestionsView.css:
1964         (.completion-suggestions-container:not(:active) > .item.selected,):
1965         * UserInterface/Views/DebuggerDashboardView.css:
1966         (.toolbar .dashboard.debugger):
1967         * UserInterface/Views/HierarchicalPathComponent.css:
1968         (.hierarchical-path-component > .title):
1969         * UserInterface/Views/Main.css:
1970         (.bouncy-highlight):
1971         * UserInterface/Views/NavigationSidebarPanel.css:
1972         (.sidebar > .panel.navigation > .content .empty-content-placeholder > .message):
1973         * UserInterface/Views/Popover.js:
1974         (WI.Popover.prototype._drawBackground):
1975         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css:
1976         (.sidebar > .details.recording-trace > .content > .no-trace-data > .message):
1977         * UserInterface/Views/RulesStyleDetailsPanel.css:
1978         (.sidebar > .panel.details.css-style .rules .label):
1979         (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules.filter-non-matching > .no-filter-results > .no-filter-results-message):
1980         (@media (-webkit-min-device-pixel-ratio: 2)): Deleted.
1981         (.sidebar > .panel.details.css-style > .content.filter-in-progress > .rules .label.filter-matching-label,): Deleted.
1982         * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css:
1983         (.style-spreadsheet .inherited):
1984         * UserInterface/Views/TimelineDataGrid.css:
1985         (.tree-outline.timeline-data-grid .item:hover):
1986         * UserInterface/Views/TimelineDataGrid.js:
1987         (WI.TimelineDataGrid.prototype._createPopoverContent):
1988         * UserInterface/Views/Variables.css:
1989         (:root):
1990
1991 2017-08-11  Nikita Vasilyev  <nvasilyev@apple.com>
1992
1993         Web Inspector: Clicking on suggestion hint should apply it, not dismiss
1994         https://bugs.webkit.org/show_bug.cgi?id=175409
1995
1996         Reviewed by Matt Baker.
1997
1998         Make clicking on the suggestion hint apply the completion, and place the text caret after it.
1999
2000         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2001         (WI.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
2002
2003 2017-08-11  Nikita Vasilyev  <nvasilyev@apple.com>
2004
2005         Web Inspector: Styles: Update the filter icon to match Xcode
2006         https://bugs.webkit.org/show_bug.cgi?id=175458
2007         <rdar://problem/33838660>
2008
2009         Reviewed by Matt Baker.
2010
2011         * UserInterface/Images/FilterFieldGlyph.svg:
2012         Half-pixel transform is necessary for a cleaner rasterisation.
2013
2014         * UserInterface/Views/FilterBar.css:
2015         (.filter-bar > input[type="search"]::-webkit-search-decoration):        
2016         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter):
2017         ::-webkit-search-decoration is a flexbox item. Remove `vertical-align: bottom`,
2018         since it didn't do anything for it.
2019
2020         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
2021         * UserInterface/Views/FilterBar.js:
2022         (WI.FilterBar):        
2023         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
2024         (WI.CSSStyleDetailsSidebarPanel.prototype.initialLayout):
2025         * UserInterface/Views/DebuggerSidebarPanel.js:
2026         * UserInterface/Views/LogContentView.js:
2027         (WI.LogContentView):
2028         * UserInterface/Views/NetworkSidebarPanel.js:
2029         (WI.NetworkSidebarPanel):
2030         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
2031         (WI.RecordingNavigationSidebarPanel):
2032         * UserInterface/Views/ResourceSidebarPanel.js:
2033         (WI.ResourceSidebarPanel):
2034         * UserInterface/Views/SearchSidebarPanel.js:
2035         (WI.SearchSidebarPanel):
2036         * UserInterface/Views/StorageSidebarPanel.js:
2037         (WI.StorageSidebarPanel):
2038         * UserInterface/Views/TimelineRecordingContentView.js:
2039         (WI.TimelineRecordingContentView):
2040         * Localizations/en.lproj/localizedStrings.js:        
2041         Replace placeholder text for all filter fields with "Filter".
2042
2043 2017-08-10  Ross Kirsling  <ross.kirsling@sony.com>
2044
2045         Web Inspector: Add three.js in preparation for layer visualization.
2046         https://bugs.webkit.org/show_bug.cgi?id=174798
2047
2048         Reviewed by Brian Burg.
2049
2050         * UserInterface/External/three.js/LICENSE: Added.
2051         * UserInterface/External/three.js/OrbitControls.js: Added.
2052         * UserInterface/External/three.js/three.js: Added.
2053
2054 2017-08-09  Nikita Vasilyev  <nvasilyev@apple.com>
2055
2056         Web Inspector: Styles: Add pre-populated data to spreadsheet-style view
2057         https://bugs.webkit.org/show_bug.cgi?id=174838
2058         <rdar://problem/33523220>
2059
2060         Reviewed by Matt Baker.
2061
2062         This patch adds static content to the experimental RulesStyleSpreadsheetDetailsPanel.
2063         The static content will be replaced with actual data in the follow up patches.
2064
2065         * UserInterface/Main.html:
2066         * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.css: Added.
2067         (.style-spreadsheet .style-rule):
2068         (.style-spreadsheet .selector-line):
2069         (.style-spreadsheet .selector):
2070         (.style-spreadsheet :matches(.selector .matched, .selector:focus)):
2071         (.style-spreadsheet .name):
2072         (.style-spreadsheet .value):
2073         (.style-spreadsheet :matches(.selector, .name, .value)):
2074         (.style-spreadsheet :matches(.selector, .name, .value):focus):
2075         (.style-spreadsheet .selector-inline):
2076         (.style-spreadsheet .property):
2077         (.style-spreadsheet .property-disabled,):
2078         (.style-spreadsheet .property-disabled :matches(.name, .value)):
2079         (.style-spreadsheet .styles-source):
2080         (.style-spreadsheet :matches(a, .node-link)):
2081         (.style-spreadsheet :matches(a, .node-link):hover):
2082         (.style-spreadsheet .inherited):
2083         (.style-spreadsheet .declarations):
2084         (.style-spreadsheet input[type="checkbox"]):
2085         (.style-spreadsheet input[type="checkbox"]:not(:checked)):
2086         (.style-spreadsheet .declarations:hover input[type="checkbox"]):
2087         * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js:
2088
2089 2017-08-08  Devin Rousso  <drousso@apple.com>
2090
2091         Web Inspector: Canvas: support editing WebGL shaders
2092         https://bugs.webkit.org/show_bug.cgi?id=124211
2093         <rdar://problem/15448958>
2094
2095         Reviewed by Matt Baker.
2096
2097         * UserInterface/Models/ShaderProgram.js:
2098         (WI.ShaderProgram.prototype.updateVertexShader):
2099         (WI.ShaderProgram.prototype.updateFragmentShader):
2100         (WI.ShaderProgram.prototype._updateShader):
2101
2102         * UserInterface/Views/ShaderProgramContentView.js:
2103         (WI.ShaderProgramContentView):
2104         (WI.ShaderProgramContentView.prototype._contentDidChange):
2105
2106 2017-08-07  Devin Rousso  <drousso@apple.com>
2107
2108         Web Inspector: Preview Canvas path when viewing a recording
2109         https://bugs.webkit.org/show_bug.cgi?id=174967
2110
2111         Reviewed by Brian Burg.
2112
2113         * Localizations/en.lproj/localizedStrings.js:
2114         * UserInterface/Base/Setting.js:
2115
2116         * UserInterface/Views/RecordingContentView.js:
2117         (WI.RecordingContentView):
2118         (WI.RecordingContentView.supportsCanvasPathDebugging):
2119         (WI.RecordingContentView.prototype.get navigationItems):
2120         (WI.RecordingContentView.prototype.shown):
2121         (WI.RecordingContentView.prototype._generateContentCanvas2D):
2122         (WI.RecordingContentView.prototype._actionModifiesPath):
2123         (WI.RecordingContentView.prototype._updateCanvasPath):
2124         (WI.RecordingContentView.prototype._showPathButtonClicked):
2125         Show each segment of the current path as an overlay when the setting is enabled.
2126         Drive-by: fix forgotten function rename.
2127
2128         * UserInterface/Views/RecordingContentView.css:
2129         (.content-view:not(.tab).recording canvas.path):
2130
2131         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2132         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2133         Show the currentX/currentY in the current state.
2134
2135         * UserInterface/Models/RecordingAction.js:
2136         (WI.RecordingAction.isFunctionForType):
2137         (WI.RecordingAction.prototype.swizzle):
2138         Use Sets for better performance.
2139
2140 2017-08-04  Devin Rousso  <drousso@apple.com>
2141
2142         Web Inspector: add source view for WebGL shader programs
2143         https://bugs.webkit.org/show_bug.cgi?id=138593
2144         <rdar://problem/18936194>
2145
2146         Reviewed by Matt Baker.
2147
2148         Shader programs are now listed in the Resources sidebar as items within the owner Canvas
2149         context. When selected, the shown content view has two editors, one for the Vertex shader
2150         and one for the Fragment shader. These editors use CodeMirror's "clike" mode for GLSL syntax.
2151
2152         * Localizations/en.lproj/localizedStrings.js:
2153         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj:
2154         * WebInspectorUI.vcxproj/WebInspectorUI.vcxproj.filters:
2155         * UserInterface/Main.html:
2156
2157         * UserInterface/Controllers/CanvasManager.js:
2158         (WI.CanvasManager):
2159         (WI.CanvasManager.prototype.canvasRemoved):
2160         (WI.CanvasManager.prototype.programCreated):
2161         (WI.CanvasManager.prototype.programDeleted):
2162         (WI.CanvasManager.prototype._mainResourceDidChange):
2163
2164         * UserInterface/Models/Collection.js:
2165         * UserInterface/Models/Canvas.js:
2166         (WI.Canvas.prototype.get shaderProgramCollection)
2167
2168         * UserInterface/Models/ShaderProgram.js:
2169         (WI.ShaderProgram.prototype.requestVertexShaderSource):
2170         (WI.ShaderProgram.prototype.requestFragmentShaderSource):
2171         (WI.ShaderProgram.prototype._requestShaderSource):
2172
2173         * UserInterface/Views/CanvasTreeElement.js:
2174         (WI.CanvasTreeElement):
2175         (WI.CanvasTreeElement.prototype.onattach):
2176         (WI.CanvasTreeElement.prototype.ondetach):
2177         (WI.CanvasTreeElement.prototype.onpopulate):
2178         (WI.CanvasTreeElement.prototype._shaderProgramAdded):
2179         (WI.CanvasTreeElement.prototype._shaderProgramRemoved):
2180
2181         * UserInterface/Views/ShaderProgramTreeElement.js: Added.
2182         (WI.ShaderProgramTreeElement):
2183
2184         * UserInterface/Views/ShaderProgramContentView.js: Added.
2185         (WI.ShaderProgramContentView):
2186         (WI.ShaderProgramContentView.prototype.shown):
2187         (WI.ShaderProgramContentView.prototype.hidden):
2188         (WI.ShaderProgramContentView.prototype.closed):
2189         (WI.ShaderProgramContentView.prototype.get supportsSave):
2190         (WI.ShaderProgramContentView.prototype.get saveData):
2191         (WI.ShaderProgramContentView.prototype.get supportsSearch):
2192         (WI.ShaderProgramContentView.prototype.get numberOfSearchResults):
2193         (WI.ShaderProgramContentView.prototype.get hasPerformedSearch):
2194         (WI.ShaderProgramContentView.prototype.set automaticallyRevealFirstSearchResult):
2195         (WI.ShaderProgramContentView.prototype.performSearch):
2196         (WI.ShaderProgramContentView.prototype.searchCleared):
2197         (WI.ShaderProgramContentView.prototype.searchQueryWithSelection):
2198         (WI.ShaderProgramContentView.prototype.revealPreviousSearchResult):
2199         (WI.ShaderProgramContentView.prototype.revealNextSearchResult):
2200         (WI.ShaderProgramContentView.prototype.revealPosition):
2201         (WI.ShaderProgramContentView.prototype._editorFocused):
2202         (WI.ShaderProgramContentView.prototype._numberOfSearchResultsDidChange):
2203         * UserInterface/Views/ShaderProgramContentView.css: Added.
2204         (.content-view.shader-program > .text-editor.shader):
2205         (body[dir=ltr] .content-view.shader-program > .text-editor.shader.vertex,):
2206         (body[dir=ltr] .content-view.shader-program > .text-editor.shader.fragment,):
2207         (body[dir=ltr] .content-view.shader-program > .text-editor.shader + .text-editor.shader):
2208         (body[dir=rtl] .content-view.shader-program > .text-editor.shader + .text-editor.shader):
2209         (.content-view.shader-program > .text-editor.shader > .type-title):
2210         (.content-view.shader-program > .text-editor.shader > .CodeMirror):
2211
2212         * UserInterface/Images/DocumentGL.png: Added.
2213         * UserInterface/Images/DocumentGL@2x.png: Added.
2214         * UserInterface/Views/ResourceIcons.css:
2215         (.shader-program .icon):
2216
2217         * UserInterface/Base/Main.js:
2218         * UserInterface/Views/ContentView.js:
2219         (WI.ContentView.createFromRepresentedObject):
2220         (WI.ContentView.isViewable):
2221         * UserInterface/Views/ResourceSidebarPanel.js:
2222         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
2223         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
2224         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
2225         * UserInterface/Views/ResourcesTabContentView.js:
2226         (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
2227         Plumbing for displaying ShaderProgram content.
2228
2229         * UserInterface/Views/TextEditor.js:
2230         (WebInspector.TextEditor):
2231         (WebInspector.TextEditor.prototype._editorFocused):
2232
2233         * Scripts/update-codemirror-resources.rb:
2234         * UserInterface/External/CodeMirror/clike.js: Added.
2235         Add C-like mode for highlighting GLSL.
2236
2237 2017-08-03  Joseph Pecoraro  <pecoraro@apple.com>
2238
2239         JSContext Inspector: Scripts sometimes do not show in resources tab
2240         https://bugs.webkit.org/show_bug.cgi?id=175153
2241         <rdar://problem/33708683>
2242
2243         Reviewed by Matt Baker.
2244
2245         * UserInterface/Views/ResourceSidebarPanel.js:
2246         (WI.ResourceSidebarPanel.prototype.initialLayout):
2247         When the ResourceSidebar is lazily created, be sure to add any scripts
2248         to the sidebar that are not backed by Resources.
2249
2250         (WI.ResourceSidebarPanel.prototype._scriptWasAdded):
2251         (WI.ResourceSidebarPanel.prototype._addScript):
2252         Extract so it can be used outside of an event handler.
2253
2254 2017-08-03  Devin Rousso  <drousso@apple.com>
2255
2256         Web Inspector: add button to open Inspector^2
2257         https://bugs.webkit.org/show_bug.cgi?id=175108
2258
2259         Reviewed by Brian Burg.
2260
2261         * UserInterface/Debug/Bootstrap.js:
2262         (updateDebugUI):
2263         (WI.runBootstrapOperations):
2264
2265         * UserInterface/Views/ButtonToolbarItem.js:
2266         (WI.ButtonToolbarItem):
2267         (WI.ButtonToolbarItem.prototype.get label): Deleted.
2268         (WI.ButtonToolbarItem.prototype.set label): Deleted.
2269         * UserInterface/Views/ButtonToolbarItem.css:
2270         (.toolbar .item.button):
2271         (.toolbar .item.button:not(.disabled):active):
2272         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
2273         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)):
2274         (.toolbar .item.button > .glyph):
2275         (.toolbar .item.button:not(.disabled):active > .glyph): Deleted.
2276         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated) > .glyph): Deleted.
2277         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated) > .glyph): Deleted.
2278         (.toolbar .item.button > .label): Deleted.
2279         * UserInterface/Views/ActivateButtonToolbarItem.js:
2280         (WI.ActivateButtonToolbarItem):
2281         (WI.ActivateButtonToolbarItem.prototype.get label): Deleted.
2282         (WI.ActivateButtonToolbarItem.prototype.set label): Deleted.
2283         * UserInterface/Base/Main.js:
2284         (WI.contentLoaded):
2285         Remove unused `label` parameter from Toolbar objects.
2286
2287 2017-08-03  Matt Baker  <mattbaker@apple.com>
2288
2289         Web Inspector: Instrument WebGLProgram created/deleted
2290         https://bugs.webkit.org/show_bug.cgi?id=175059
2291
2292         Reviewed by Devin Rousso.
2293
2294         This patch adds frontend support for shader program instrumentation.
2295         The frontend creates a ShaderProgram model object for each WebGLProgram.
2296         Since only canvases with a WebGL context have programs, the Canvas model
2297         object does not contain any logic specific to programs. CanvasManager
2298         dispatches program added/removed events, and the parent Canvas can be
2299         accessed from ShaderProgram but not the other way around.
2300
2301         * UserInterface/Controllers/CanvasManager.js:
2302         (WI.CanvasManager):
2303         (WI.CanvasManager.prototype.get shaderPrograms):
2304         (WI.CanvasManager.prototype.canvasRemoved):
2305         (WI.CanvasManager.prototype.programCreated):
2306         (WI.CanvasManager.prototype.programDeleted):
2307         (WI.CanvasManager.prototype._mainResourceDidChange):
2308         (WI.CanvasManager.prototype._dispatchShaderProgramRemoved):
2309
2310         * UserInterface/Main.html:
2311
2312         * UserInterface/Models/Canvas.js:
2313         (WI.Canvas.prototype.nextShaderProgramDisplayNumber):
2314         (WI.Canvas):
2315
2316         * UserInterface/Models/ShaderProgram.js: Added.
2317         (WI.ShaderProgram):
2318         (WI.ShaderProgram.prototype.get identifier):
2319         (WI.ShaderProgram.prototype.get canvas):
2320         (WI.ShaderProgram.prototype.get displayName):
2321
2322         * UserInterface/Protocol/CanvasObserver.js:
2323         (WI.CanvasObserver.prototype.programCreated):
2324         (WI.CanvasObserver.prototype.programDeleted):
2325         (WI.CanvasObserver):
2326
2327         * UserInterface/Test.html:
2328
2329 2017-08-03  Joseph Pecoraro  <pecoraro@apple.com>
2330
2331         JSContext Inspector: Recording tab should not be available in New Tab picker
2332         https://bugs.webkit.org/show_bug.cgi?id=175155
2333
2334         Reviewed by Brian Burg.
2335
2336         * UserInterface/Views/RecordingTabContentView.js:
2337         (WI.RecordingTabContentView.isTabAllowed):
2338         Only allow the Recording Tab if we have a CanvasAgent.
2339
2340 2017-08-02  Devin Rousso  <drousso@apple.com>
2341
2342         Web Inspector: add stack trace information for each RecordingAction
2343         https://bugs.webkit.org/show_bug.cgi?id=174663
2344
2345         Reviewed by Joseph Pecoraro.
2346
2347         * Localizations/en.lproj/localizedStrings.js:
2348         * UserInterface/Main.html:
2349
2350         * UserInterface/Models/Recording.js:
2351         (WI.Recording.prototype.swizzle):
2352         Add Array type for swizzling array values.
2353
2354         * UserInterface/Models/RecordingAction.js:
2355         (WI.RecordingAction):
2356         (WI.RecordingAction.fromPayload):
2357         (WI.RecordingAction.prototype.get trace):
2358         (WI.RecordingAction.prototype.swizzle):
2359         (WI.RecordingAction.prototype.toJSON):
2360
2361         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js: Added.
2362         (WI.RecordingTraceDetailsSidebarPanel):
2363         (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass):
2364         (WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
2365         (WI.RecordingTraceDetailsSidebarPanel.prototype.set recording):
2366         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateActionIndex):
2367         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.css: Added.
2368         (.sidebar > .panel.details.recording-trace > .content > .call-frame):
2369         (.sidebar > .details.recording-trace > .content > .no-trace-data):
2370         (.sidebar > .details.recording-trace > .content > .no-trace-data > .message):
2371
2372         * UserInterface/Views/RecordingTabContentView.js:
2373         (WI.RecordingTabContentView):
2374
2375         * UserInterface/Views/RecordingActionTreeElement.js:
2376         (WI.RecordingActionTreeElement.prototype.populateContextMenu):
2377
2378         * UserInterface/Views/CallFrameView.css:
2379         (.call-frame):
2380         (body[dir=ltr] .call-frame .icon):
2381         (body[dir=rtl] .call-frame .icon):
2382         Apply the same trailing margin for CallFrameView icons as TreeElement.
2383
2384 2017-08-02  Devin Rousso  <drousso@apple.com>
2385
2386         Web Inspector: add TreeElement virtualization for the Recording tab
2387         https://bugs.webkit.org/show_bug.cgi?id=174968
2388
2389         Reviewed by Joseph Pecoraro.
2390
2391         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
2392         (WI.RecordingNavigationSidebarPanel):
2393
2394         * UserInterface/Views/TreeOutline.js:
2395         (WI.TreeOutline):
2396         (WI.TreeOutline.prototype.get virtualized):
2397         (WI.TreeOutline.prototype.registerScrollVirtualizer):
2398         (WI.TreeOutline.prototype.updateVirtualizedElements.walk):
2399         (WI.TreeOutline.prototype.updateVirtualizedElements):
2400         Add spacer elements before and after the TreeOutline element that will size to ensure that
2401         the TreeOutline node still takes up the same amount of space after some of the TreeElements
2402         are removed. Whenever the scroll of the container view changes, recalculate the visible area
2403         and add/remove TreeElements based on whether they would be in that. This is only possible if
2404         every TreeElement has the same vertical height, which is given when setting up the scroll
2405         listener on the container view.
2406
2407         * UserInterface/Views/TreeElement.js:
2408         (WI.TreeElement.prototype.set hidden):
2409         (WI.TreeElement.prototype._attach):
2410         (WI.TreeElement.prototype.collapse):
2411         (WI.TreeElement.prototype.expand):
2412         (WI.TreeElement.prototype.reveal):
2413         If the TreeOutline is being virtualized, don't add each TreeElement's node to the DOM. They
2414         will be added at the end of the frame (via setTimeout) if they are within the visible + padding
2415         area of the TreeOutline.
2416
2417 2017-08-01  Devin Rousso  <drousso@apple.com>
2418
2419         Web Inspector: simplify WebInspector with WI
2420         https://bugs.webkit.org/show_bug.cgi?id=175058
2421
2422         Reviewed by Joseph Pecoraro.
2423
2424         * .eslintrc:
2425
2426         * Tools/PrettyPrinting/FormatterDebug.js:
2427         * Tools/PrettyPrinting/index.html:
2428
2429         * UserInterface/Main.html:
2430         * UserInterface/Test.html:
2431
2432         * UserInterface/Base/*.js:
2433         * UserInterface/Controllers/*.js:
2434         * UserInterface/Debug/*.js:
2435         * UserInterface/Models/*.js:
2436         * UserInterface/Protocol/*.js:
2437         * UserInterface/Proxies/*.js:
2438         * UserInterface/Test/*.js:
2439         * UserInterface/Views/*.js:
2440
2441 2017-08-01  Devin Rousso  <drousso@apple.com>
2442
2443         Web Inspector: create Recording tab for displaying recordings
2444         https://bugs.webkit.org/show_bug.cgi?id=174484
2445
2446         Reviewed by Joseph Pecoraro.
2447
2448         * Localizations/en.lproj/localizedStrings.js:
2449         * UserInterface/Main.html:
2450         * UserInterface/Test.html:
2451
2452         * UserInterface/Controllers/CanvasManager.js:
2453         (WebInspector.CanvasManager.prototype.recordingFinished):
2454         * UserInterface/Models/Canvas.js:
2455         (WebInspector.Canvas.prototype.toggleRecording):
2456
2457         * UserInterface/Models/Recording.js:
2458         (WebInspector.Recording):
2459         (WebInspector.Recording.synthesizeError):
2460         (WebInspector.Recording.prototype.get actions):
2461         (WebInspector.Recording.prototype.get source):
2462         (WebInspector.Recording.prototype.set source):
2463         (WebInspector.Recording.prototype.swizzle):
2464
2465         * UserInterface/Models/RecordingAction.js:
2466         (WebInspector.RecordingAction):
2467         (WebInspector.RecordingAction.isFunctionForType):
2468         (WebInspector.RecordingAction.get name):
2469         (WebInspector.RecordingAction.get parameters):
2470         (WebInspector.RecordingAction.prototype.get valid):
2471         (WebInspector.RecordingAction.prototype.set valid):
2472         (WebInspector.RecordingAction.get isFunction):
2473         (WebInspector.RecordingAction.get isGetter):
2474         (WebInspector.RecordingAction.get isVisual):
2475         (WebInspector.RecordingAction.get stateModifiers):
2476         (WebInspector.RecordingAction.prototype.swizzle):
2477         (WebInspector.RecordingAction.prototype.parameterSwizzleTypeForTypeAtIndex):
2478
2479         * UserInterface/Models/RecordingInitialStateAction.js: Added.
2480         (WebInspector.RecordingInitialStateAction):
2481
2482         * UserInterface/Views/RecordingTabContentView.js: Added.
2483         (WebInspector.RecordingTabContentView):
2484         (WebInspector.RecordingTabContentView.tabInfo):
2485         (WebInspector.RecordingTabContentView.prototype.get type):
2486         (WebInspector.RecordingTabContentView.prototype.canShowRepresentedObject):
2487         (WebInspector.RecordingTabContentView.prototype.showRepresentedObject):
2488         (WebInspector.RecordingTabContentView.prototype.restoreStateFromCookie):
2489         (WebInspector.RecordingTabContentView.prototype.saveStateToCookie):
2490         (WebInspector.RecordingTabContentView.prototype.closed):
2491         (WebInspector.RecordingTabContentView.prototype._updateActionIndex):
2492         (WebInspector.RecordingTabContentView.prototype._scrubberNavigationItemValueChanged):
2493         (WebInspector.RecordingTabContentView.prototype._navigationSidebarImport):
2494         (WebInspector.RecordingTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged):
2495
2496         * UserInterface/Views/RecordingContentView.js: Added.
2497         (WebInspector.RecordingContentView):
2498         (WebInspector.RecordingContentView.prototype.get navigationItems):
2499         (WebInspector.RecordingContentView.prototype.updateActionIndex):
2500         (WebInspector.RecordingContentView.prototype.shown):
2501         (WebInspector.RecordingContentView.prototype.get supplementalRepresentedObjects):
2502         (WebInspector.RecordingContentView.prototype._generateContentCanvas2D):
2503         (WebInspector.RecordingContentView.prototype._applyAction):
2504         (WebInspector.RecordingContentView.prototype._updateImageGrid):
2505         (WebInspector.RecordingContentView.prototype._showGridButtonClicked):
2506         * UserInterface/Views/RecordingContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/CanvasContentView.css.
2507         (.content-view:not(.tab).recording):
2508         (.content-view:not(.tab).recording > .preview-container):
2509         (.content-view:not(.tab).recording canvas):
2510
2511         * UserInterface/Views/RecordingNavigationSidebarPanel.js: Added.
2512         (WebInspector.RecordingNavigationSidebarPanel):
2513         (WebInspector.RecordingNavigationSidebarPanel.disallowInstanceForClass):
2514         (WebInspector.RecordingNavigationSidebarPanel.prototype.set recording):
2515         (WebInspector.RecordingNavigationSidebarPanel.prototype.updateActionIndex):
2516         (WebInspector.RecordingNavigationSidebarPanel.prototype.initialLayout):
2517         (WebInspector.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked):
2518         (WebInspector.RecordingNavigationSidebarPanel.prototype._exportNavigationItemClicked):
2519         * UserInterface/Views/RecordingNavigationSidebarPanel.css: Added.
2520         (.sidebar > .panel.navigation.recording > :matches(.content, .empty-content-placeholder)):
2521         (.sidebar > .panel.navigation.recording > .content > .tree-outline):
2522         (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action, .selected).expanded):
2523         (.sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before):
2524         (body[dir=ltr] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before):
2525         (body[dir=rtl] .sidebar > .panel.navigation.recording > .content > .tree-outline .item.action:not(.initial-state)::before):
2526         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="2"] .item.action:not(.initial-state)::before):
2527         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="3"] .item.action:not(.initial-state)::before):
2528         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="4"] .item.action:not(.initial-state)::before):
2529         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="5"] .item.action:not(.initial-state)::before):
2530         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="6"] .item.action:not(.initial-state)::before):
2531         (.sidebar > .panel.navigation.recording > .content > .tree-outline[data-indent="7"] .item.action:not(.initial-state)::before):
2532         (.sidebar > .panel.navigation.recording > .content .action > .icon):
2533         (.sidebar > .panel.navigation.recording > .content .action.function > .icon):
2534         (.sidebar > .panel.navigation.recording > .content .action.attribute.getter > .icon):
2535         (.sidebar > .panel.navigation.recording > .content .tree-outline:matches(:focus, .force-focus) .action.attribute.getter.selected > .icon):
2536         (.sidebar > .panel.navigation.recording > .content .action.attribute.boolean > .icon):
2537         (.sidebar > .panel.navigation.recording > .content .action.attribute.number > .icon):
2538         (.sidebar > .panel.navigation.recording > .content .action.attribute.object > .icon):
2539         (.sidebar > .panel.navigation.recording > .content .action.attribute.string > .icon):
2540         (.sidebar > .panel.navigation.recording > .content > .tree-outline > .item.parent:not(.action) > .icon):
2541         (.sidebar > .panel.navigation.recording > .content .action:matches(.invalid, .missing) > .icon):
2542         (body[dir=ltr] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon):
2543         (body[dir=rtl] .sidebar > .panel.navigation.recording > .content .action:not(.initial-state) > .icon):
2544         (.sidebar > .panel.navigation.recording > .content .action.visual:not(.selected, .invalid)):
2545         (.sidebar > .panel.navigation.recording > .content .action:not(.selected, .initial-state) > .titles .parameter.swizzled):
2546         (.sidebar > .panel.navigation.recording > .content .action.invalid:not(.selected, .initial-state) > .titles .name,):
2547
2548         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js: Added.
2549         (WebInspector.RecordingStateDetailsSidebarPanel):
2550         (WebInspector.RecordingStateDetailsSidebarPanel.disallowInstanceForClass):
2551         (WebInspector.RecordingStateDetailsSidebarPanel.prototype.inspect):
2552         (WebInspector.RecordingStateDetailsSidebarPanel.prototype.set recording):
2553         (WebInspector.RecordingStateDetailsSidebarPanel.prototype.updateActionIndex):
2554         (WebInspector.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2555         * UserInterface/Views/RecordingStateDetailsSidebarPanel.css: Added.
2556         (.sidebar > .panel.details.recording-state > .content > .data-grid):
2557         (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified):
2558         (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected).non-standard):
2559         (.sidebar > .panel.details.recording-state > .content > .data-grid tr:not(.selected) .unavailable):
2560
2561         * UserInterface/Views/RecordingActionTreeElement.js: Added.
2562         (WebInspector.RecordingActionTreeElement):
2563         (WebInspector.RecordingActionTreeElement._generateDOM):
2564         (WebInspector.RecordingActionTreeElement.prototype.get index):
2565         (WebInspector.RecordingActionTreeElement.get filterableData):
2566         (WebInspector.RecordingActionTreeElement.prototype.get filterableData):
2567         (WebInspector.RecordingActionTreeElement.prototype.onattach):
2568         (WebInspector.RecordingActionTreeElement.prototype.populateContextMenu):
2569
2570         * UserInterface/Base/Main.js:
2571         (WebInspector.contentLoaded):
2572         (WebInspector.instanceForClass):
2573
2574         * UserInterface/Base/FileUtilites.js: Added.
2575         (WebInspector.saveDataToFile): Moved from UserInterface/Base/Main.js
2576         (WebInspector.loadDataFromFile):
2577
2578         * UserInterface/Views/ButtonNavigationItem.js:
2579         (WebInspector.ButtonNavigationItem.prototype._mouseClicked):
2580         Send the native event as part of the data.
2581
2582         * UserInterface/Views/CanvasContentView.js:
2583         (WebInspector.CanvasContentView):
2584         (WebInspector.CanvasContentView.prototype.get navigationItems):
2585         (WebInspector.CanvasContentView.prototype.initialLayout):
2586         (WebInspector.CanvasContentView.prototype.closed):
2587         (WebInspector.CanvasContentView.prototype._toggleRecording):
2588         (WebInspector.CanvasContentView.prototype._recordingFinished):
2589         * UserInterface/Views/CanvasContentView.css:
2590         (.content-view.canvas):
2591
2592         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
2593         (WebInspector.CanvasDetailsSidebarPanel.prototype.inspect):
2594
2595         * UserInterface/Views/ContentBrowser.js:
2596         (WebInspector.ContentBrowser):
2597         (WebInspector.ContentBrowser.prototype._updateContentViewNavigationItems):
2598         * UserInterface/Views/ContentBrowserTabContentView.js:
2599         (WebInspector.ContentBrowserTabContentView):
2600         * UserInterface/Views/ContentView.js:
2601         (WebInspector.ContentView.createFromRepresentedObject):
2602         (WebInspector.ContentView.isViewable):
2603         * UserInterface/Views/ScrubberNavigationItem.js: Added.
2604         (WebInspector.ScrubberNavigationItem):
2605         (WebInspector.ScrubberNavigationItem.prototype.get value):
2606         (WebInspector.ScrubberNavigationItem.prototype.set value):
2607         (WebInspector.ScrubberNavigationItem.prototype.get min):
2608         (WebInspector.ScrubberNavigationItem.prototype.set min):
2609         (WebInspector.ScrubberNavigationItem.prototype.get max):
2610         (WebInspector.ScrubberNavigationItem.prototype.set max):
2611         (WebInspector.ScrubberNavigationItem.prototype.set disabled):
2612         (WebInspector.ScrubberNavigationItem.prototype.get additionalClassNames):
2613         (WebInspector.ScrubberNavigationItem.prototype._sliderChanged):
2614         * UserInterface/Views/ScrubberNavigationItem.css: Added.
2615         (.navigation-bar .item.scrubber):
2616         (.navigation-bar .item.scrubber > input):
2617         (.navigation-bar .item.scrubber > input[disabled]):
2618         Allow the flexible space to be replaced with a navigation item at construction.
2619
2620         * UserInterface/Views/DataGridNode.js:
2621         (WebInspector.DataGridNode):
2622         (WebInspector.DataGridNode.prototype.get element):
2623         Allow a list of CSS classes to be added to the node's element.
2624
2625         * UserInterface/Views/SettingsTabContentView.js:
2626         (WebInspector.SettingsTabContentView.prototype.initialLayout):
2627         (WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView.listenForChange):
2628         (WebInspector.SettingsTabContentView.prototype._createExperimentalSettingsView):
2629         (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):
2630         Move experimental settings to their own panel.
2631
2632         * UserInterface/Views/TabContentView.js:
2633         (WebInspector.TabContentView.prototype.get navigationSidebarPanel):
2634         Save the NavigationSidebarPanel after it's constructed.
2635
2636         * UserInterface/Base/Utilities.js:
2637         (Number.countDigits):
2638
2639         * UserInterface/Images/Recording.svg: Added.
2640         * UserInterface/Images/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/TimelineRecordRenderingFrame.svg.
2641         * UserInterface/Images/gtk/RenderingFrame.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/gtk/TimelineRecordRenderingFrame.svg.
2642         * UserInterface/Views/TimelineIcons.css:
2643         (.rendering-frame-record .icon):
2644
2645         * UserInterface/Views/DOMTreeOutline.css:
2646         (@keyframes node-state-changed):
2647         * UserInterface/Views/Main.css:
2648         (:matches(img, canvas).show-grid):
2649         (img.show-grid): Deleted.
2650         * UserInterface/Views/NavigationBar.css:
2651         (.navigation-bar):
2652         * UserInterface/Views/NetworkSidebarPanel.css:
2653         (.sidebar > .panel.navigation.network.network-grid-content-view-showing > .content > .tree-outline):
2654         * UserInterface/Views/TimelineTabContentView.css:
2655         (.timeline.tab.content-view .navigation-bar > .item.radio):
2656         * UserInterface/Views/TimelineView.css:
2657         (.panel.navigation.timeline.timeline-recording-content-view-showing > .content > .tree-outline):
2658         * UserInterface/Views/Variables.css:
2659         (:root):
2660         Create CSS variables for the DOM modification flash color and the color striping.
2661
2662 2017-07-28  Devin Rousso  <drousso@apple.com>
2663
2664         Web Inspector: Cleanup unused/invalid parameters for TreeElements
2665         https://bugs.webkit.org/show_bug.cgi?id=173987
2666
2667         Reviewed by Brian Burg.
2668
2669         * UserInterface/Views/TreeElement.js:
2670         * UserInterface/Views/GeneralTreeElement.js:
2671
2672         * UserInterface/Views/ApplicationCacheFrameTreeElement.js:
2673         * UserInterface/Views/BreakpointTreeElement.js:
2674         * UserInterface/Views/CSSStyleSheetTreeElement.js:
2675         * UserInterface/Views/CallFrameTreeElement.js:
2676         * UserInterface/Views/ContentFlowTreeElement.js:
2677         * UserInterface/Views/DOMNodeTreeElement.js:
2678         * UserInterface/Views/DatabaseTableTreeElement.js:
2679         * UserInterface/Views/DatabaseTreeElement.js:
2680         * UserInterface/Views/FolderTreeElement.js:
2681         * UserInterface/Views/FolderizedTreeElement.js:
2682         * UserInterface/Views/FrameTreeElement.js:
2683         * UserInterface/Views/IndexedDatabaseObjectStoreIndexTreeElement.js:
2684         * UserInterface/Views/IndexedDatabaseObjectStoreTreeElement.js:
2685         * UserInterface/Views/IndexedDatabaseTreeElement.js:
2686         * UserInterface/Views/IssueTreeElement.js:
2687         * UserInterface/Views/ObjectTreeBaseTreeElement.js:
2688         * UserInterface/Views/ProfileNodeTreeElement.js:
2689         * UserInterface/Views/ResourceTreeElement.js:
2690         * UserInterface/Views/ScriptTreeElement.js:
2691         * UserInterface/Views/SearchResultTreeElement.js:
2692         * UserInterface/Views/SourceCodeTreeElement.js:
2693         * UserInterface/Views/SourceMapResourceTreeElement.js:
2694         * UserInterface/Views/StorageTreeElement.js:
2695         * UserInterface/Views/TimelineRecordTreeElement.js:
2696         * UserInterface/Views/TypeTreeElement.js:
2697
2698 2017-07-26  Devin Rousso  <drousso@apple.com>
2699
2700         Uncaught Exception: undefined is not an object (evaluating 'this._memoryRow.value = Number.bytesToString(this._canvas.memoryCost)')
2701         https://bugs.webkit.org/show_bug.cgi?id=174823
2702
2703         Reviewed by Joseph Pecoraro.
2704
2705         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
2706         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
2707         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
2708         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):
2709         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection):
2710         (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
2711         Early return if the view has not called initialLayout, as the rows might not have been
2712         constructed yet.
2713
2714         * UserInterface/Views/View.js:
2715         (WebInspector.View.prototype.get didInitialLayout): Added.
2716
2717 2017-07-26  Devin Rousso  <drousso@apple.com>
2718
2719         Web Inspector: create protocol for recording Canvas contexts
2720         https://bugs.webkit.org/show_bug.cgi?id=174481
2721
2722         Reviewed by Joseph Pecoraro.
2723
2724         Create model objects that effectively mirror the protocol objects sent for Canvas recordings.
2725
2726         * .eslintrc:
2727         * UserInterface/Main.html:
2728         * UserInterface/Test.html:
2729
2730         * UserInterface/Controllers/CanvasManager.js:
2731         (WebInspector.CanvasManager.prototype.recordingFinished):
2732         * UserInterface/Protocol/CanvasObserver.js:
2733         (WebInspector.CanvasObserver.prototype.recordingFinished):
2734
2735         * UserInterface/Models/Recording.js: Added.
2736         (WebInspector.Recording):
2737         (WebInspector.Recording.fromPayload):
2738         (WebInspector.Recording.prototype.get type):
2739         (WebInspector.Recording.prototype.get initialState):
2740         (WebInspector.Recording.prototype.get frames):
2741         (WebInspector.Recording.prototype.get data):
2742         (WebInspector.Recording.prototype.toJSON):
2743
2744         * UserInterface/Models/RecordingAction.js: Added.
2745         (WebInspector.RecordingAction):
2746         (WebInspector.RecordingAction.fromPayload):
2747         (WebInspector.RecordingAction.prototype.get name):
2748         (WebInspector.RecordingAction.prototype.get parameters):
2749         (WebInspector.RecordingAction.prototype.toJSON):
2750
2751         * UserInterface/Models/RecordingFrame.js: Added.
2752         (WebInspector.RecordingFrame):
2753         (WebInspector.RecordingFrame.fromPayload):
2754         (WebInspector.RecordingFrame.prototype.get actions):
2755         (WebInspector.RecordingFrame.prototype.get incomplete):
2756         (WebInspector.RecordingFrame.prototype.toJSON):
2757
2758 2017-07-26  Brian Burg  <bburg@apple.com>
2759
2760         Remove WEB_TIMING feature flag
2761         https://bugs.webkit.org/show_bug.cgi?id=174795
2762
2763         Reviewed by Alex Christensen.
2764
2765         Remove fallback for ports that lack WEB_TIMING.
2766
2767         * UserInterface/Base/Utilities.js:
2768         (timestamp): Deleted.
2769         * UserInterface/Protocol/Connection.js:
2770         (InspectorBackend.Connection.prototype._dispatchResponse):
2771         (InspectorBackend.Connection.prototype._dispatchEvent):
2772         (InspectorBackend.Connection.prototype._sendCommandToBackendWithCallback):
2773         (InspectorBackend.Connection.prototype._sendCommandToBackendExpectingPromise):
2774         * UserInterface/Protocol/MessageDispatcher.js:
2775         (WebInspector.dispatchNextQueuedMessageFromBackend):
2776
2777 2017-07-25  Joseph Pecoraro  <pecoraro@apple.com>
2778
2779         Web Inspector: Don't output "No message" for multi-value logs like console.log(x, y)
2780         https://bugs.webkit.org/show_bug.cgi?id=174842
2781
2782         Reviewed by Matt Baker.
2783
2784         * Localizations/en.lproj/localizedStrings.js:
2785         Removed "No message".
2786
2787         * UserInterface/Views/ConsoleMessageView.js:
2788         (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
2789         Track whether or not outputting the next parameter will need a divider
2790         in front of it or not.
2791
2792 2017-07-25  Joseph Pecoraro  <pecoraro@apple.com>
2793
2794         Web Inspector: Fix warnings about console.assert lines without semicolons
2795         https://bugs.webkit.org/show_bug.cgi?id=174840
2796
2797         Reviewed by Brian Burg.
2798
2799         * UserInterface/Views/SettingsTabContentView.js:
2800         (WebInspector.SettingsTabContentView.prototype.set selectedSettingsView):
2801         (WebInspector.SettingsTabContentView.prototype.setSettingsViewVisible):
2802         Add semicolon to assert lines so they can be stripped in optimized builds.
2803
2804 2017-07-25  Joseph Pecoraro  <pecoraro@apple.com>
2805
2806         Web Inspector: Inline multiple console log values if they are simple
2807         https://bugs.webkit.org/show_bug.cgi?id=174746
2808         <rdar://problem/33469376>
2809
2810         Reviewed by Matt Baker.
2811
2812         * UserInterface/Models/IssueMessage.js:
2813         * UserInterface/Protocol/RemoteObject.js:
2814         (WebInspector.RemoteObject.type): Deleted.
2815         Remove this as it isn't as useful as directly checking the type.
2816
2817         * UserInterface/Views/ConsoleMessageView.js:
2818         (WebInspector.ConsoleMessageView.prototype._appendExtraParameters):
2819         (WebInspector.ConsoleMessageView.prototype._appendFormattedArguments):
2820         (WebInspector.ConsoleMessageView.prototype._hasSimpleDisplay):
2821         (WebInspector.ConsoleMessageView.prototype._isStackTrace):
2822         For leading primitive/simple values, display them inline on the console message.
2823
2824         * UserInterface/Views/FormattedValue.js:
2825         (WebInspector.FormattedValue.hasSimpleDisplay):
2826         Provide a helper to determine if a formatted value will be simple.
2827
2828 2017-07-25  Nikita Vasilyev  <nvasilyev@apple.com>
2829
2830         Web Inspector: Styles: Add a switch for Spreadsheet model style editor to experimental settings
2831         https://bugs.webkit.org/show_bug.cgi?id=174741
2832         <rdar://problem/33467954>
2833
2834         Reviewed by Brian Burg.
2835
2836         Show a blank panel when Spreadsheet Style Editor is enabled.
2837
2838         * UserInterface/Base/Setting.js:
2839         * UserInterface/Main.html:
2840         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
2841         (WebInspector.CSSStyleDetailsSidebarPanel):
2842         (WebInspector.CSSStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
2843         * UserInterface/Views/RulesStyleSpreadsheetDetailsPanel.js: Added.
2844         (WebInspector.RulesStyleSpreadsheetDetailsPanel):
2845         (WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.filterDidChange):
2846         (WebInspector.RulesStyleSpreadsheetDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
2847
2848         * UserInterface/Views/SettingsTabContentView.css:
2849         (.content-view.settings > .settings-view > .container.hidden):
2850         (.content-view.settings > .settings-view > .container-centered):
2851         (.content-view.settings > .settings-view > .container button):
2852         * UserInterface/Views/SettingsTabContentView.js:
2853         (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):
2854         * UserInterface/Views/SettingsView.js:
2855         (WebInspector.SettingsView.prototype.addCenteredContainer):
2856         (WebInspector.SettingsView):
2857         Show "Reload Web Inspector" button when Spreadsheet Style Editor setting is modified.
2858
2859 2017-07-25  Devin Rousso  <drousso@apple.com>
2860
2861         Web Inspector: add context menu item for taking a screenshot of a node
2862         https://bugs.webkit.org/show_bug.cgi?id=174754
2863
2864         Reviewed by Brian Burg.
2865
2866         * Localizations/en.lproj/localizedStrings.js:
2867         * UserInterface/Views/ContextMenuUtilities.js:
2868         (WebInspector.appendContextMenuItemsForDOMNode):
2869         Add "Capture Element Screenshot " context menu item that opens a save dialog with a picture of the node.
2870
2871         * UserInterface/Base/Main.js:
2872         (WebInspector.saveDataToFile):
2873         Allow the saveData to specify whether the contained content is base64Encoded, instead of
2874         having to go through a Blob to save base64 data.
2875
2876         * UserInterface/Base/Utilities.js:
2877         Add Number.pad to add leading zeros up to a certain width.
2878
2879         Drive-by: fix failing test for Number.constrain.
2880
2881         * UserInterface/Models/DOMNode.js:
2882         (WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode.scrollIntoView): Added.
2883         (WebInspector.DOMNode.prototype.scrollIntoView.resolvedNode): Added.
2884         (WebInspector.DOMNode.prototype.scrollIntoView): Added.
2885         * UserInterface/Views/DOMTreeElement.js:
2886         (WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
2887         (WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode.scrollIntoView): Deleted.
2888         (WebInspector.DOMTreeElement.prototype._scrollIntoView.resolvedNode): Deleted.
2889         (WebInspector.DOMTreeElement.prototype._scrollIntoView): Deleted.
2890         * UserInterface/Views/DOMTreeOutline.js:
2891         (WebInspector.DOMTreeOutline.prototype.populateContextMenu):
2892         Drive-by: move "Scroll Into View" context menu command to WebInspector.appendContextMenuItemsForDOMNode
2893         so that it can be triggered from more places than just the DOM tree.
2894
2895 2017-07-24  Nikita Vasilyev  <me@elv1s.ru>
2896
2897         Web Inspector: Settings: Some controls overlay settings header
2898         https://bugs.webkit.org/show_bug.cgi?id=174804
2899
2900         Reviewed by Matt Baker.
2901
2902         * UserInterface/Views/SettingsTabContentView.css:
2903         (.content-view.settings .navigation-bar):
2904
2905 2017-07-24  Matt Baker  <mattbaker@apple.com>
2906
2907         Web Inspector: should only show Canvases in resource type filter if debug setting enabled
2908         https://bugs.webkit.org/show_bug.cgi?id=174765
2909         <rdar://problem/33479009>
2910
2911         Reviewed by Devin Rousso.
2912
2913         * UserInterface/Views/ResourceSidebarPanel.js:
2914         (WebInspector.ResourceSidebarPanel):
2915
2916 2017-07-21  Joseph Pecoraro  <pecoraro@apple.com>
2917
2918         Web Inspector: inspect(aFunction) should jump to function definition
2919         https://bugs.webkit.org/show_bug.cgi?id=149344
2920         <rdar://problem/11563607>
2921
2922         Reviewed by Matt Baker.
2923
2924         * UserInterface/Protocol/InspectorObserver.js:
2925         (WebInspector.InspectorObserver.prototype.inspect):
2926         If we receive a function remote object jump to its location if available.
2927
2928 2017-07-21  Joseph Pecoraro  <pecoraro@apple.com>
2929
2930         Web Inspector: Avoid subclassing WebInspector.Object if we do not need to
2931         https://bugs.webkit.org/show_bug.cgi?id=174703
2932
2933         Reviewed by Brian Burg.
2934
2935         * UserInterface/Models/LogObject.js:
2936         (WebInspector.LogObject):
2937         (WebInspector.LogObject.prototype.get startDate): Deleted.
2938         Remove unused startDate property as well.
2939
2940         * UserInterface/Base/YieldableTask.js:
2941         * UserInterface/Debug/ProtocolTrace.js:
2942         * UserInterface/Models/AnalyzerMessage.js:
2943         * UserInterface/Models/ApplicationCacheFrame.js:
2944         * UserInterface/Models/ApplicationCacheManifest.js:
2945         * UserInterface/Models/BackForwardEntry.js:
2946         * UserInterface/Models/Branch.js:
2947         * UserInterface/Models/BreakpointAction.js:
2948         * UserInterface/Models/CSSMedia.js:
2949         * UserInterface/Models/CSSSelector.js:
2950         * UserInterface/Models/CallFrame.js:
2951         * UserInterface/Models/CallingContextTree.js:
2952         * UserInterface/Models/CallingContextTreeNode.js:
2953         * UserInterface/Models/CollectionEntry.js:
2954         * UserInterface/Models/CollectionEntryPreview.js:
2955         * UserInterface/Models/ConsoleMessage.js:
2956         * UserInterface/Models/DOMSearchMatchObject.js:
2957         * UserInterface/Models/DatabaseObject.js:
2958         * UserInterface/Models/DatabaseTableObject.js:
2959         * UserInterface/Models/DebuggerDashboard.js:
2960         * UserInterface/Models/DebuggerData.js:
2961         * UserInterface/Models/ExecutionContext.js:
2962         * UserInterface/Models/ExecutionContextList.js:
2963         * UserInterface/Models/GarbageCollection.js:
2964         * UserInterface/Models/HeapSnapshotRootPath.js:
2965         * UserInterface/Models/IndexedDatabase.js:
2966         * UserInterface/Models/IndexedDatabaseObjectStore.js:
2967         * UserInterface/Models/IndexedDatabaseObjectStoreIndex.js:
2968         * UserInterface/Models/Instrument.js:
2969         * UserInterface/Models/KeyboardShortcut.js:
2970         * UserInterface/Models/LineWidget.js:
2971         * UserInterface/Models/MemoryCategory.js:
2972         * UserInterface/Models/MemoryPressureEvent.js:
2973         * UserInterface/Models/ObjectPreview.js:
2974         * UserInterface/Models/Probe.js:
2975         * UserInterface/Models/ProbeSetDataFrame.js:
2976         * UserInterface/Models/Profile.js:
2977         * UserInterface/Models/ProfileNode.js:
2978         * UserInterface/Models/ProfileNodeCall.js:
2979         * UserInterface/Models/PropertyDescriptor.js:
2980         * UserInterface/Models/PropertyPath.js:
2981         * UserInterface/Models/PropertyPreview.js:
2982         * UserInterface/Models/ResourceQueryMatch.js:
2983         * UserInterface/Models/ResourceQueryResult.js:
2984         * UserInterface/Models/ResourceTimingData.js:
2985         * UserInterface/Models/Revision.js:
2986         * UserInterface/Models/ScopeChainNode.js:
2987         * UserInterface/Models/ScriptSyntaxTree.js:
2988         * UserInterface/Models/SourceCodePosition.js:
2989         * UserInterface/Models/SourceCodeSearchMatchObject.js:
2990         * UserInterface/Models/SourceMap.js:
2991         * UserInterface/Models/StackTrace.js:
2992         * UserInterface/Models/StructureDescription.js:
2993         * UserInterface/Models/TextMarker.js:
2994         * UserInterface/Models/TextRange.js:
2995         * UserInterface/Models/TimelineRange.js:
2996         * UserInterface/Models/TypeDescription.js:
2997         * UserInterface/Models/TypeSet.js:
2998         * UserInterface/Protocol/ProtocolTracer.js:
2999         * UserInterface/Proxies/FormatterWorkerProxy.js:
3000         * UserInterface/Proxies/HeapSnapshotDiffProxy.js:
3001         * UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
3002         * UserInterface/Test/TestSuite.js:
3003
3004 2017-07-19  Chris Dumez  <cdumez@apple.com>
3005
3006         Drop SQLException type
3007         https://bugs.webkit.org/show_bug.cgi?id=174665
3008
3009         Reviewed by Sam Weinig.
3010
3011         Use SQLError instead of SQLException, this is what the script should really
3012         use here since it is checking the code of an SQLError.
3013
3014         * .eslintrc:
3015         * UserInterface/Models/DatabaseObject.js:
3016         (WebInspector.DatabaseObject.prototype.executeSQL.queryCallback):
3017         (WebInspector.DatabaseObject.prototype.executeSQL):
3018         (WebInspector.DatabaseObject):
3019
3020 2017-07-18  Andy Estes  <aestes@apple.com>
3021
3022         [Xcode] Enable CLANG_WARN_RANGE_LOOP_ANALYSIS
3023         https://bugs.webkit.org/show_bug.cgi?id=174631
3024
3025         Reviewed by Tim Horton.
3026
3027         * Configurations/Base.xcconfig:
3028
3029 2017-07-18  Andy Estes  <aestes@apple.com>
3030
3031         [Xcode] Enable CLANG_WARN_OBJC_LITERAL_CONVERSION
3032         https://bugs.webkit.org/show_bug.cgi?id=174631
3033
3034         Reviewed by Sam Weinig.
3035
3036         * Configurations/Base.xcconfig:
3037
3038 2017-07-18  Brian Burg  <bburg@apple.com>
3039
3040         Web Inspector: adjust wording of "clear when page {navigates -> loads}"
3041         https://bugs.webkit.org/show_bug.cgi?id=174589
3042         <rdar://problem/32797981>
3043
3044         Reviewed by Joseph Pecoraro.
3045
3046         * Localizations/en.lproj/localizedStrings.js:
3047         * UserInterface/Views/SettingsTabContentView.js:
3048         (WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView):
3049
3050 2017-07-18  Andy Estes  <aestes@apple.com>
3051
3052         [Xcode] Enable CLANG_WARN_NON_LITERAL_NULL_CONVERSION
3053         https://bugs.webkit.org/show_bug.cgi?id=174631
3054
3055         Reviewed by Dan Bernstein.
3056
3057         * Configurations/Base.xcconfig:
3058
3059 2017-07-18  Andy Estes  <aestes@apple.com>
3060
3061         [Xcode] Enable CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING
3062         https://bugs.webkit.org/show_bug.cgi?id=174631
3063
3064         Reviewed by Darin Adler.
3065
3066         * Configurations/Base.xcconfig:
3067
3068 2017-07-13  Joseph Pecoraro  <pecoraro@apple.com>
3069
3070         Web Inspector: Remove unused and untested Page domain commands
3071         https://bugs.webkit.org/show_bug.cgi?id=174429
3072
3073         Reviewed by Timothy Hatcher.
3074
3075         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
3076         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
3077         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js:
3078         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
3079         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3080         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
3081         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
3082         * Versions/Inspector-iOS-10.0.json:
3083         * Versions/Inspector-iOS-10.3.json:
3084         * Versions/Inspector-iOS-11.0.json:
3085         * Versions/Inspector-iOS-7.0.json:
3086         * Versions/Inspector-iOS-8.0.json:
3087         * Versions/Inspector-iOS-9.0.json:
3088         * Versions/Inspector-iOS-9.3.json:
3089
3090 2017-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3091
3092         Web Inspector: Correct a typo in the .eslintrc
3093         https://bugs.webkit.org/show_bug.cgi?id=174389
3094
3095         Reviewed by Matt Baker.
3096
3097         * .eslintrc:
3098
3099 2017-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3100
3101         Web Inspector: Node Sidebar - Improve wording for Potential Custom Element lacking a Custom definition
3102         https://bugs.webkit.org/show_bug.cgi?id=174346
3103
3104         Reviewed by Matt Baker.
3105
3106         * Localizations/en.lproj/localizedStrings.js:
3107         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3108         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._customElementState):
3109         The text "Waiting to be upgraded" is poor. Any non-standard element with dashes
3110         in the name is considered custom, but does not need to be upgraded. Lets use
3111         different wording to indicate that it is detected as custom, and lacks a
3112         specific Custom Element definition.
3113
3114 2017-07-10  Devin Rousso  <drousso@apple.com>
3115
3116         Web Inspector: Highlight matching CSS canvas clients when hovering contexts in the Resources tab
3117         https://bugs.webkit.org/show_bug.cgi?id=174279
3118
3119         Reviewed by Matt Baker.
3120
3121         * UserInterface/Controllers/DOMTreeManager.js:
3122         (WebInspector.DOMTreeManager.prototype.highlightDOMNodeList):
3123         (WebInspector.DOMTreeManager.prototype.highlightSelector):
3124         * UserInterface/Views/CanvasTreeElement.js:
3125         (WebInspector.CanvasTreeElement.prototype._handleMouseOver):
3126
3127 2017-07-03  Brian Burg  <bburg@apple.com>
3128
3129         Web Replay: remove some unused code
3130         https://bugs.webkit.org/show_bug.cgi?id=173903
3131
3132         Rubber-stamped by Joseph Pecoraro.
3133
3134         * .eslintrc:
3135         * UserInterface/Base/Main.js:
3136         (WebInspector.loaded):
3137         * UserInterface/Controllers/DashboardManager.js:
3138         (WebInspector.DashboardManager):
3139         * UserInterface/Controllers/ReplayManager.js: Removed.
3140         * UserInterface/Images/ReplayPauseButton.svg: Removed.
3141         * UserInterface/Images/ReplayPlayButton.svg: Removed.
3142         * UserInterface/Images/ReplayRecordingButton.svg: Removed.
3143         * UserInterface/Images/gtk/ReplayPauseButton.svg: Removed.
3144         * UserInterface/Images/gtk/ReplayPlayButton.svg: Removed.
3145         * UserInterface/Images/gtk/ReplayRecordingButton.svg: Removed.
3146         * UserInterface/Main.html:
3147         * UserInterface/Models/ReplayDashboard.js: Removed.
3148         * UserInterface/Models/ReplaySession.js: Removed.
3149         * UserInterface/Models/ReplaySessionSegment.js: Removed.
3150         * UserInterface/Protocol/ReplayObserver.js: Removed.
3151         * UserInterface/Test.html:
3152         * UserInterface/Test/Test.js:
3153         (WebInspector.loaded):
3154         * UserInterface/Views/DashboardView.js:
3155         (WebInspector.DashboardView.create):
3156         * UserInterface/Views/ReplayDashboardView.css: Removed.
3157         * UserInterface/Views/ReplayDashboardView.js: Removed.
3158         * UserInterface/Views/TimelineRecordingContentView.js:
3159         (WebInspector.TimelineRecordingContentView.prototype._debuggerPaused):
3160         (WebInspector.TimelineRecordingContentView.prototype._debuggerResumed):
3161
3162 2017-07-07  Devin Rousso  <drousso@apple.com>
3163
3164         Web Inspector: Resources are sometimes missing from the tree outline right before folderizing
3165         https://bugs.webkit.org/show_bug.cgi?id=174277
3166
3167         Reviewed by Joseph Pecoraro.
3168
3169         * UserInterface/Views/TreeElement.js:
3170         (WebInspector.TreeElement.prototype.expand):
3171
3172 2017-07-07  Devin Rousso  <drousso@apple.com>
3173
3174         Web Inspector: REGRESSION(r217258): WebSocket resource tree elements don't show the connection status
3175         https://bugs.webkit.org/show_bug.cgi?id=174274
3176
3177         Reviewed by Brian Burg.
3178
3179         * UserInterface/Views/FrameTreeElement.js:
3180         (WebInspector.FrameTreeElement):
3181         * UserInterface/Views/ResourceTreeElement.js:
3182         (WebInspector.ResourceTreeElement.prototype.populateContextMenu):
3183         * UserInterface/Views/WebSocketResourceTreeElement.js:
3184         (WebInspector.WebSocketResourceTreeElement.prototype.populateContextMenu):
3185         Move "Log WebSocket" context menu item to WebSocketResourceTreeElement.
3186
3187 2017-07-07  Devin Rousso  <drousso@apple.com>
3188
3189         Web Inspector: Show all elements currently using a given CSS Canvas
3190         https://bugs.webkit.org/show_bug.cgi?id=173965
3191
3192         Reviewed by Joseph Pecoraro.
3193
3194         * UserInterface/Controllers/CanvasManager.js:
3195         (WebInspector.CanvasManager.prototype.cssCanvasClientNodesChanged):
3196         * UserInterface/Models/Canvas.js:
3197         (WebInspector.Canvas.prototype.requestCSSCanvasClientNodes):
3198         (WebInspector.Canvas.prototype.cssCanvasClientNodesChanged):
3199         * UserInterface/Protocol/CanvasObserver.js:
3200         (WebInspector.CanvasObserver.prototype.cssCanvasClientNodesChanged):
3201
3202         * Localizations/en.lproj/localizedStrings.js:
3203         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3204         (WebInspector.CanvasDetailsSidebarPanel):
3205         (WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas):
3206         (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
3207         (WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
3208         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshCSSCanvasSection):
3209         (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
3210         Add CSS section for CSS canvases. Currently displays a list of node links, each of which is
3211         using the selected canvas via -webkit-canvas.
3212
3213         * UserInterface/Main.html:
3214         * UserInterface/Views/CanvasDetailsSidebarPanel.css: Added.
3215         (.sidebar > .panel.details.canvas .details-section > .content .row.simple > .value > .node-link):
3216
3217         * UserInterface/Controllers/DOMTreeManager.js:
3218         (WebInspector.DOMTreeManager.prototype.ensureDocument):
3219         * UserInterface/Models/Canvas.js:
3220         (WebInspector.Canvas.prototype.requestNode):
3221         * UserInterface/Views/SearchSidebarPanel.js:
3222         (WebInspector.SearchSidebarPanel.prototype.performSearch):
3223         Add convenience function that will call DOMAgent.getDocument with an empty function. Should
3224         be used when it is necessary that the document has been sent to the frontend, but the
3225         document node itself is not needed.
3226
3227 2017-07-07  Joseph Pecoraro  <pecoraro@apple.com>
3228
3229         Web Inspector: Clean up some unnecessary constructors
3230         https://bugs.webkit.org/show_bug.cgi?id=174236
3231
3232         Reviewed by Brian Burg.
3233
3234         * UserInterface/Controllers/CodeMirrorBezierEditingController.js:
3235         * UserInterface/Controllers/CodeMirrorColorEditingController.js:
3236         * UserInterface/Controllers/CodeMirrorGradientEditingController.js:
3237         * UserInterface/Views/DividerNavigationItem.js:
3238         * UserInterface/Views/FlexibleSpaceNavigationItem.js:
3239         * UserInterface/Views/IdleTreeElement.js:
3240
3241 2017-07-06  Devin Rousso  <drousso@apple.com>
3242
3243         Web Inspector: Highlight matching canvas element when hovering contexts in the Resources tab
3244         https://bugs.webkit.org/show_bug.cgi?id=174209
3245
3246         Reviewed by Joseph Pecoraro.
3247
3248         * UserInterface/Views/CanvasTreeElement.js:
3249         (WebInspector.CanvasTreeElement.prototype.onattach):
3250         (WebInspector.CanvasTreeElement.prototype._handleMouseOver):
3251         (WebInspector.CanvasTreeElement.prototype._handleMouseOut):
3252
3253 2017-07-06  Joseph Pecoraro  <pecoraro@apple.com>
3254
3255         Web Inspector: Add another Protocol Version
3256         https://bugs.webkit.org/show_bug.cgi?id=174193
3257         <rdar://problem/33150053>
3258
3259         Reviewed by Brian Burg.
3260
3261         * UserInterface/Protocol/Legacy/11.0/InspectorBackendCommands.js: Added.
3262         * Versions/Inspector-iOS-11.0.json: Added.
3263
3264 2017-07-05  Devin Rousso  <drousso@apple.com>
3265
3266         Web Inspector: Group Inspector Style Sheets as part of the Stylesheets folder
3267         https://bugs.webkit.org/show_bug.cgi?id=173435
3268
3269         Reviewed by Joseph Pecoraro.
3270
3271         * UserInterface/Views/ResourceSidebarPanel.js:
3272         (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
3273         Add special case for CSSStyleSheetTreeElement.
3274
3275 2017-07-05  Devin Rousso  <drousso@apple.com>
3276
3277         Web Inspector: Split Canvas.svg into icons for 2D and 3D
3278         https://bugs.webkit.org/show_bug.cgi?id=174057
3279
3280         Reviewed by Matt Baker.
3281
3282         * UserInterface/Images/Canvas2D.svg: Added.
3283         * UserInterface/Images/Canvas3D.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/Canvas.svg.
3284         * UserInterface/Views/ResourceIcons.css:
3285         (.canvas.canvas-2d .icon):
3286         (.canvas:matches(.webgl, .webgl2, .webgpu) .icon):
3287         (.canvas .icon): Deleted.
3288
3289 2017-07-05  Devin Rousso  <drousso@apple.com>
3290
3291         Web Inspector: Allow users to log any tracked canvas context
3292         https://bugs.webkit.org/show_bug.cgi?id=173397
3293         <rdar://problem/33111581>
3294
3295         Reviewed by Joseph Pecoraro.
3296
3297         * Localizations/en.lproj/localizedStrings.js:
3298         * UserInterface/Protocol/RemoteObject.js:
3299         (WebInspector.RemoteObject.resolveCanvasContext):
3300         * UserInterface/Views/CanvasTreeElement.js:
3301         (WebInspector.CanvasTreeElement.prototype.populateContextMenu):
3302
3303 2017-07-03  Devin Rousso  <drousso@apple.com>
3304
3305         Web Inspector: Support listing WebGL2 and WebGPU contexts
3306         https://bugs.webkit.org/show_bug.cgi?id=173396
3307
3308         Reviewed by Joseph Pecoraro.
3309
3310         * UserInterface/Models/Canvas.js:
3311         (WebInspector.Canvas.fromPayload):
3312         (WebInspector.Canvas.displayNameForContextType):
3313
3314 2017-07-01  Dan Bernstein  <mitz@apple.com>
3315
3316         [macOS] Remove code only needed when building for OS X Yosemite
3317         https://bugs.webkit.org/show_bug.cgi?id=174067
3318
3319         Reviewed by Tim Horton.
3320
3321         * Configurations/Base.xcconfig:
3322         * Configurations/DebugRelease.xcconfig:
3323         * Configurations/Version.xcconfig:
3324
3325 2017-06-30  Joseph Pecoraro  <pecoraro@apple.com>
3326
3327         Web Inspector: Type token background color in debugger looks poor
3328         https://bugs.webkit.org/show_bug.cgi?id=174063
3329
3330         Reviewed by Devin Rousso.
3331
3332         * UserInterface/Views/TextEditor.css:
3333         CodeMirror widgets do not get range styles like our (.execution-range-highlight).
3334         Make a best effort to carry over the styles to widgets. It isn't perfect, but it
3335         covers all common situations unless a selection ends inside the widget. The
3336         ultimate solution would be to get the expected range styles.
3337
3338 2017-06-30  Joseph Pecoraro  <pecoraro@apple.com>
3339
3340         Web Inspector: Initial search is sometimes performed twice, produces duplicate results
3341         https://bugs.webkit.org/show_bug.cgi?id=174047
3342
3343         Reviewed by Devin Rousso.
3344
3345         * UserInterface/Views/SearchTabContentView.js:
3346         (WebInspector.SearchTabContentView.prototype.performSearch):
3347         The initial layout of the tab content view was setting state to force a search
3348         which may happen after a delay, however the global search field was causing
3349         its own search to happen. We can clear the flag when a search is being performed
3350         to prevent duplicating the search.
3351
3352 2017-06-30  Devin Rousso  <drousso@apple.com>
3353
3354         Web Inspector: Add small delay before showing the progress spinner when loading resources
3355         https://bugs.webkit.org/show_bug.cgi?id=173437
3356
3357         Reviewed by Joseph Pecoraro.
3358
3359         * UserInterface/Views/ResourceContentView.js:
3360         (WebInspector.ResourceContentView):
3361         (WebInspector.ResourceContentView.prototype.removeLoadingIndicator): Added.
3362         (WebInspector.ResourceContentView.prototype._contentError):
3363         (WebInspector.ResourceContentView.prototype._hasContent):
3364         Delay the creation of the spinner for 100ms.  If the content is available before then, just
3365         clear the timeout and the spinner will never be created/shown.
3366
3367         We measured an average of 35ms to load and display images with slow cases being around 55ms.
3368         100ms was chosen for the timeout to give some room to allow for abnormally slow loading
3369         while not being too long as to be outright noticable.
3370
3371         * UserInterface/Views/FontResourceContentView.js:
3372         (WebInspector.FontResourceContentView.prototype.contentAvailable):
3373         * UserInterface/Views/ImageResourceContentView.js:
3374         (WebInspector.ImageResourceContentView.prototype.contentAvailable):
3375         * UserInterface/Views/TextResourceContentView.js:
3376         (WebInspector.TextResourceContentView.prototype._contentWillPopulate):
3377         Calls the new protected function removeLoadingIndicator to ensure that the spinner (and any
3378         other element) is removed.
3379
3380         This is necessary because TextResourceContentView effectively has two phases of loading its
3381         content: getting the content and formatting it for display.  The first follows the same path
3382         as the other ResourceContentView subclasses, the second waits for the ContentWillPopulate
3383         event on SourceCodeTextEditor before it actually adds the content as a subview.  In this
3384         case, the spinner should only be removed right before the content is actually added, not
3385         once it's ready.
3386
3387 2017-06-30  Commit Queue  <commit-queue@webkit.org>
3388
3389         Unreviewed, rolling out r218983.
3390         https://bugs.webkit.org/show_bug.cgi?id=174042
3391
3392         Broke Debugger Call Stack TreeOutline (Requested by drousso on
3393         #webkit).
3394
3395         Reverted changeset:
3396
3397         "Web Inspector: Remove unnecessary hasChildren from
3398         TreeOutline"
3399         https://bugs.webkit.org/show_bug.cgi?id=173986
3400         http://trac.webkit.org/changeset/218983
3401
3402 2017-06-30  Devin Rousso  <drousso@apple.com>
3403
3404         Web Inspector: Default string comparisons to treat numeric characters as numbers
3405         https://bugs.webkit.org/show_bug.cgi?id=173984
3406
3407         Reviewed by Joseph Pecoraro.
3408
3409         * UserInterface/Base/Utilities.js:
3410         (String.prototype.extendedLocaleCompare):
3411         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3412         (WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare):
3413         * UserInterface/Controllers/ResourceQueryController.js:
3414         (WebInspector.ResourceQueryController.prototype.executeQuery):
3415         * UserInterface/Views/ApplicationCacheFrameContentView.js:
3416         (WebInspector.ApplicationCacheFrameContentView.prototype._sortDataGrid.localeCompare):
3417         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3418         (WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):
3419         * UserInterface/Views/CookieStorageContentView.js:
3420         (WebInspector.CookieStorageContentView.prototype._sortDataGrid.localeCompare):
3421         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3422         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes):
3423         (WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):
3424         * UserInterface/Views/DOMStorageContentView.js:
3425         (WebInspector.DOMStorageContentView.prototype._sortDataGrid.comparator):
3426         * UserInterface/Views/DebuggerSidebarPanel.js:
3427         (WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):
3428         * UserInterface/Views/FolderizedTreeElement.js:
3429         (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
3430         * UserInterface/Views/HeapSnapshotDataGridTree.js:
3431         (WebInspector.HeapSnapshotDataGridTree.buildSortComparator):
3432         * UserInterface/Views/NetworkTimelineView.js:
3433         (WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):
3434         * UserInterface/Views/NewTabContentView.js:
3435         (WebInspector.NewTabContentView.prototype._updateShownTabs):
3436         * UserInterface/Views/OverviewTimelineView.js:
3437         (WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime):
3438         * UserInterface/Views/ProbeDetailsSidebarPanel.js:
3439         (WebInspector.ProbeDetailsSidebarPanel.prototype.inspect):
3440         * UserInterface/Views/QuickConsole.js:
3441         (WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):
3442         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3443         (WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator):
3444         * UserInterface/Views/ResourceSidebarPanel.js:
3445         (WebInspector.ResourceSidebarPanel.prototype._compareTreeElements):
3446         * UserInterface/Views/ResourceTreeElement.js:
3447         (WebInspector.ResourceTreeElement.compareResourceTreeElements):
3448         (WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements):
3449         * UserInterface/Views/ScriptDetailsTimelineView.js:
3450         (WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator):
3451         * UserInterface/Views/StorageSidebarPanel.js:
3452         (WebInspector.StorageSidebarPanel.prototype._compareTreeElements):
3453         * UserInterface/Views/TimelineDataGrid.js:
3454         (WebInspector.TimelineDataGrid.prototype._sortComparator):
3455
3456 2017-06-29  Devin Rousso  <drousso@apple.com>
3457
3458         Web Inspector: Provide a way for creating a new tab but not making it immediately selected
3459         https://bugs.webkit.org/show_bug.cgi?id=173983
3460
3461         Reviewed by Joseph Pecoraro.
3462
3463         * UserInterface/Views/TabBar.js:
3464         (WebInspector.TabBar):
3465         (WebInspector.TabBar.prototype.addTabBarItem):
3466         (WebInspector.TabBar.prototype.insertTabBarItem):
3467         (WebInspector.TabBar.prototype.removeTabBarItem):
3468         (WebInspector.TabBar.prototype._handleClick):
3469         (WebInspector.TabBar.prototype._handleNewTabClick):
3470         * UserInterface/Views/TabBrowser.js:
3471         (WebInspector.TabBrowser.prototype.addTabForContentView):
3472         (WebInspector.TabBrowser.prototype.showTabForContentView):
3473         (WebInspector.TabBrowser.prototype.closeTabForContentView):
3474         * UserInterface/Base/Main.js:
3475         (WebInspector.contentLoaded):
3476         (WebInspector._openDefaultTab):
3477         (WebInspector._tryToRestorePendingTabs):
3478         (WebInspector.showNewTabTab):
3479         (WebInspector.createNewTabWithType):
3480         Add `options` dictionaries instead of optional parameters.
3481
3482         (WebInspector.tabContentViewClassForRepresentedObject):
3483         Drive-by fix: remove incorrect placement of WebInspector.Collection check. This function
3484         determines TabContentView classes, not ContentView.
3485
3486 2017-06-29  Devin Rousso  <drousso@apple.com>
3487
3488         Web Inspector: Remove unnecessary hasChildren from TreeOutline
3489         https://bugs.webkit.org/show_bug.cgi?id=173986
3490
3491         Reviewed by Joseph Pecoraro.
3492
3493         * UserInterface/Views/TreeOutline.js:
3494         (WebInspector.TreeOutline):
3495         (WebInspector.TreeOutline.prototype.appendChild):
3496         (WebInspector.TreeOutline.prototype.insertChild):
3497         (WebInspector.TreeOutline.prototype.removeChildAtIndex):
3498         (WebInspector.TreeOutline.prototype.removeChild):
3499         (WebInspector.TreeOutline.prototype.get selectedTreeElementIndex):
3500
3501         * UserInterface/Views/NavigationSidebarPanel.js:
3502         (WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):
3503         * UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:
3504         (WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get value):
3505
3506 2017-06-29  Devin Rousso  <drousso@apple.com>
3507
3508         Web Inspector: Cleanup unused/invalid parameters for SidebarPanels
3509         https://bugs.webkit.org/show_bug.cgi?id=173985
3510
3511         Reviewed by Joseph Pecoraro.
3512
3513         * UserInterface/Views/SidebarPanel.js:
3514         * UserInterface/Views/NavigationSidebarPanel.js:
3515         * UserInterface/Views/NavigationSidebarPanel.css:
3516         (.sidebar > .panel.navigation > .overflow-shadow.top): Deleted.
3517         * UserInterface/Views/DetailsSidebarPanel.js:
3518
3519         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
3520         * UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
3521         * UserInterface/Views/DOMDetailsSidebarPanel.js:
3522         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3523         * UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js:
3524         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
3525         * UserInterface/Views/ProbeDetailsSidebarPanel.js:
3526         * UserInterface/Views/ResourceDetailsSidebarPanel.js:
3527         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
3528         * UserInterface/Views/StorageSidebarPanel.js:
3529
3530 2017-06-29  Devin Rousso  <drousso@apple.com>
3531
3532         Web Inspector: Create a single -webkit-canvas for use inside popovers
3533         https://bugs.webkit.org/show_bug.cgi?id=173820
3534
3535         Reviewed by Matt Baker.
3536
3537         * UserInterface/Views/Popover.css:
3538         (.popover):
3539         * UserInterface/Views/Popover.js:
3540         (WebInspector.Popover):
3541         (WebInspector.Popover.prototype._drawBackground):
3542
3543 2017-06-28  Devin Rousso  <drousso@apple.com>
3544
3545         Web Inspector: Instrument active pixel memory used by canvases
3546         https://bugs.webkit.org/show_bug.cgi?id=173087
3547         <rdar://problem/32719261>
3548
3549         Reviewed by Joseph Pecoraro.
3550
3551         * .eslintrc:
3552         * UserInterface/Controllers/CanvasManager.js:
3553         (WebInspector.CanvasManager.prototype.canvasMemoryChanged):
3554         * UserInterface/Models/Canvas.js:
3555         (WebInspector.Canvas.fromPayload):
3556         (WebInspector.Canvas.prototype.get memoryCost):
3557         (WebInspector.Canvas.prototype.set memoryCost):
3558         * UserInterface/Protocol/CanvasObserver.js:
3559         (WebInspector.CanvasObserver.prototype.canvasMemoryChanged):
3560         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3561         (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
3562         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
3563         (WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
3564         (WebInspector.CanvasDetailsSidebarPanel.prototype._canvasMemoryChanged):
3565
3566         * Localizations/en.lproj/localizedStrings.js:
3567         * UserInterface/Base/Utilities.js:
3568         (Number.bytesToString.value):
3569         Add support for gigabyte numbers.
3570
3571 2017-06-27  Joseph Pecoraro  <pecoraro@apple.com>
3572
3573         Web Inspector: Remove unused Inspector domain events
3574         https://bugs.webkit.org/show_bug.cgi?id=173905
3575
3576         Reviewed by Matt Baker.
3577
3578         * UserInterface/Protocol/InspectorObserver.js:
3579         (WebInspector.InspectorObserver.prototype.detached): Deleted.
3580
3581         * UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
3582         * UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
3583         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
3584         * UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
3585         * UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
3586         * UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
3587         * Versions/Inspector-iOS-10.0.json:
3588         * Versions/Inspector-iOS-10.3.json:
3589         * Versions/Inspector-iOS-7.0.json:
3590         * Versions/Inspector-iOS-8.0.json:
3591         * Versions/Inspector-iOS-9.0.json:
3592         * Versions/Inspector-iOS-9.3.json:
3593         Remove from legacy backends as well since they did not send it.
3594
3595 2017-06-27  Matt Baker  <mattbaker@apple.com>
3596
3597         Web Inspector: no discoverable way to dismiss the split console
3598         https://bugs.webkit.org/show_bug.cgi?id=167034
3599         <rdar://problem/30023436>
3600
3601         Reviewed by Devin Rousso.
3602
3603         This patch adds an Xcode-style toggle button to the left of the
3604         split console navigation bar. Additionally, the split console code
3605         has been broken out into it's own class to reduce the clutter in
3606         Main.js/css, and simplify future console maintenance.
3607
3608         * Localizations/en.lproj/localizedStrings.js:
3609
3610         * UserInterface/Base/Main.js:
3611         (WebInspector.loaded):
3612         Replace the "split" ContentBrowser with a new ConsoleDrawer class,
3613         which encapsulates the drawer height setting and resize behavior.
3614         (WebInspector.contentLoaded):
3615         The console drawer manages its own height.
3616
3617         * UserInterface/Images/HideConsoleDrawer.svg: Added.
3618         * UserInterface/Images/ShowConsoleDrawer.svg: Added.
3619         Console drawer toggle button images. Styled after corresponding Xcode button.
3620
3621         * UserInterface/Main.html:
3622
3623         * UserInterface/Views/ConsoleDrawer.css: Added.
3624         Moved old #split-content-browser styles over from Main.css.
3625         (.console-drawer):
3626         (.console-drawer > .navigation-bar):
3627         (.console-drawer > .navigation-bar > .item.button:not(.clear-log)):
3628         Make button spacing less cramped.
3629         (.console-drawer > .navigation-bar > .item:not(.flexible-space)):
3630         (.console-drawer > .navigation-bar > :matches(.item.button, .log-scope-bar)):
3631         (.console-drawer > .navigation-bar > .item > .glyph,):
3632
3633         * UserInterface/Views/ConsoleDrawer.js: Added.
3634         New class responsible for console drawer expand / collapse and resizer
3635         dragging, which was previously part of Main.js. The console drawer toolbar
3636         now has a toggle button, debugging controls, and a call frames path item.
3637         The "Show Console Tab" button has been removed.
3638
3639         (WebInspector.ConsoleDrawer):
3640         (WebInspector.ConsoleDrawer.prototype.get collapsed):
3641         (WebInspector.ConsoleDrawer.prototype.set collapsed):
3642         (WebInspector.ConsoleDrawer.prototype.get height):
3643         (WebInspector.ConsoleDrawer.prototype.shown):
3644         (WebInspector.ConsoleDrawer.prototype.layout):
3645         (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDrag):
3646         (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDragEnd):
3647         (WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown):
3648         (WebInspector.ConsoleDrawer.prototype._restoreDrawerHeight):
3649         (WebInspector.ConsoleDrawer.prototype._updateDrawerHeight):
3650         (WebInspector.ConsoleDrawer.prototype._selectedTabContentViewDidChange):
3651         When switching to a tab that doesn't support showing the console drawer,
3652         hide it without altering the collapsed state.
3653
3654         * UserInterface/Views/LogContentView.js:
3655         (WebInspector.LogContentView.prototype.get navigationItems):
3656
3657         * UserInterface/Views/Main.css:
3658         Renamed #split-content-browser to #console-drawer, and moved related
3659         styles to ConsoleDrawer.css.
3660
3661         (#split-content-browser): Deleted.
3662         (#split-content-browser > .navigation-bar): Deleted.
3663         (#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)): Deleted.
3664         (#split-content-browser > .navigation-bar .item): Deleted.
3665         (#split-content-browser > .navigation-bar .item:not(.flexible-space)): Deleted.
3666         (#split-content-browser .hierarchical-path-component.log-icon .icon): Deleted.
3667         (#split-content-browser .hierarchical-path-component.log-icon .title): Deleted.
3668         (#split-content-browser .hierarchical-path-component.log-icon select): Deleted.
3669         (#split-content-browser > .navigation-bar > :matches(.hierarchical-path, .log-scope-bar)): Deleted.
3670         (#split-content-browser > .navigation-bar > .log-scope-bar > li): Deleted.
3671
3672         * UserInterface/Views/QuickConsole.js:
3673         (WebInspector.QuickConsole):
3674         (WebInspector.QuickConsole.prototype._toggleOrFocus):
3675         (WebInspector.QuickConsole.prototype._updateStyles):
3676         Update top border style in response to change in selected TabBrowser
3677         tab or the console drawer collapsed state.
3678
3679         (WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Deleted.
3680         (WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled): Deleted.
3681
3682 2017-06-24  Joseph Pecoraro  <pecoraro@apple.com>
3683
3684         Remove Reflect.enumerate
3685         https://bugs.webkit.org/show_bug.cgi?id=173806
3686
3687         Reviewed by Yusuke Suzuki.
3688
3689         * UserInterface/Models/NativeFunctionParameters.js:
3690
3691 2017-06-23  Joseph Pecoraro  <pecoraro@apple.com>
3692
3693         Web Inspector: Script Timeline bubbles sometimes appear to miss large events
3694         https://bugs.webkit.org/show_bug.cgi?id=173746
3695         <rdar://problem/32950808>
3696
3697         Reviewed by Brian Burg.
3698
3699         * UserInterface/Models/Timeline.js:
3700         (WebInspector.Timeline.prototype.addRecord):
3701         (WebInspector.Timeline.prototype._tryInsertInSortedOrder):
3702         The list of records is assumed to be sorted by the code that draws bubbles
3703         however the order in which we receive them may not be sorted. Make a quick
3704         effort to sort recent records so that as we are drawing the timeline it is
3705         more accurate.
3706
3707 2017-06-23  Brian Burg  <bburg@apple.com>
3708
3709         Web Inspector: RTL: flip all go-to-arrow instances
3710         https://bugs.webkit.org/show_bug.cgi?id=173794
3711         <rdar://problem/32221912>
3712
3713         Reviewed by Joseph Pecoraro.
3714
3715         Move the flipping transform so it applies to all go-to arrows.
3716
3717         * UserInterface/Views/DataGrid.css:
3718         (body[dir=rtl] .data-grid td .go-to-arrow):
3719         * UserInterface/Views/Main.css:
3720         (body[dir=rtl] .go-to-arrow):
3721
3722 2017-06-22  Joseph Pecoraro  <pecoraro@apple.com>
3723
3724         Web Inspector: Pausing with a deep call stack can be very slow, avoid eagerly generating object previews
3725         https://bugs.webkit.org/show_bug.cgi?id=173698
3726
3727         Reviewed by Matt Baker.
3728
3729         Introduce RemoteObject.prototype.updatePreview which can be used to update
3730         the preview of a RemoteObject with a current view for the object. Currently
3731         we only use this to fetch the preview that we did not have for the `thisObject`
3732         in the scope chain sidebar. However this could be used generically to update
3733         a RemoteObject's preview (ObjectPreview) at any time.
3734
3735         * UserInterface/Protocol/RemoteObject.js:
3736         (WebInspector.RemoteObject.prototype.canLoadPreview):
3737         (WebInspector.RemoteObject.prototype.updatePreview):
3738         Allow a RemoteObject to update its preview property. Since this only makes
3739         sense on certain Object values include a helper to know when it is appropriate
3740         to fetch a preview.
3741
3742         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
3743         (WebInspector.ObjectTreePropertyTreeElement.prototype._createTitlePropertyStyle):
3744         (WebInspector.ObjectTreePropertyTreeElement.prototype._loadPreviewLazilyIfNeeded):
3745         If the object being shown in the sidebar does not have a preview but can load a
3746         preview then attempt to load it lazily. This is the case for the `thisObject`
3747         which is injected into an ObjectTree in the scope chain sidebar.
3748
3749 2017-06-22  Fujii Hironori  <Hironori.Fujii@sony.com>
3750
3751         [GTK] Web Inspector: Add icon for Canvas.svg
3752         https://bugs.webkit.org/show_bug.cgi?id=173580
3753
3754         Reviewed by Carlos Garcia Campos.
3755
3756         * UserInterface/Images/gtk/Canvas.svg: Added.
3757
3758 2017-06-21  Fujii Hironori  <Hironori.Fujii@sony.com>
3759
3760         [GTK] Web Inspector: Add NavigationItemCheckers.svg
3761         https://bugs.webkit.org/show_bug.cgi?id=173692
3762
3763         Reviewed by Carlos Garcia Campos.
3764
3765         * UserInterface/Images/gtk/NavigationItemCheckers.svg: Added.
3766
3767 2017-06-20  Devin Rousso  <drousso@apple.com>
3768
3769         Web Inspector: change the selected ScopeBarItem on mousedown instead of click
3770         https://bugs.webkit.org/show_bug.cgi?id=173586
3771
3772         Reviewed by Matt Baker.
3773
3774         Both the Tab bar and Sidebar navigation bar switch the active item on "mousedown" instead of
3775         on "click". ScopeBarItem should follow this pattern, as it is faster and keeps consistency.
3776
3777         * UserInterface/Views/MultipleScopeBarItem.js:
3778         (WebInspector.MultipleScopeBarItem):
3779         (WebInspector.MultipleScopeBarItem.prototype._handleMouseDown):
3780         (WebInspector.MultipleScopeBarItem.prototype._clicked): Deleted.
3781         * UserInterface/Views/ScopeBarItem.js:
3782         (WebInspector.ScopeBarItem):
3783         (WebInspector.ScopeBarItem.prototype._handleMouseDown):
3784         (WebInspector.ScopeBarItem.prototype._clicked): Deleted.
3785
3786 2017-06-20  Devin Rousso  <drousso@apple.com>
3787
3788         Web Inspector: Send context attributes for tracked canvases
3789         https://bugs.webkit.org/show_bug.cgi?id=173327
3790
3791         Reviewed by Joseph Pecoraro.
3792
3793         * UserInterface/Models/Canvas.js:
3794         (WebInspector.Canvas.fromPayload):
3795         (WebInspector.Canvas.prototype.get contextAttributes):
3796         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3797         (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
3798         (WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
3799         (WebInspector.CanvasDetailsSidebarPanel.prototype.sizeDidChange):
3800         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshAttributesSection):
3801
3802         * UserInterface/Views/DataGridNode.js:
3803         (WebInspector.DataGridNode.prototype.createCellContent):
3804         Instead of checking if the value of the cell is falsy, check that the key exists in the data.
3805         This allows values like `false` to be displayed.
3806
3807 2017-06-19  Devin Rousso  <drousso@apple.com>
3808
3809         Web Inspector: create canvas content view and details sidebar panel
3810         https://bugs.webkit.org/show_bug.cgi?id=138941
3811         <rdar://problem/19051672>
3812
3813         Reviewed by Joseph Pecoraro.
3814
3815         * UserInterface/Models/Canvas.js:
3816         (WebInspector.Canvas):
3817         (WebInspector.Canvas.fromPayload):
3818         (WebInspector.Canvas.prototype.get displayName):
3819         (WebInspector.Canvas.requestNode): Added.
3820         (WebInspector.Canvas.prototype.requestContent): Added.
3821         (WebInspector.Canvas.prototype.saveIdentityToCookie):
3822
3823         * UserInterface/Controllers/CanvasManager.js:
3824         (WebInspector.CanvasManager.prototype.canvasAdded):
3825         (WebInspector.CanvasManager.prototype.canvasRemoved):
3826         * UserInterface/Models/Collection.js:
3827         * UserInterface/Models/Frame.js:
3828         (WebInspector.Frame):
3829         (WebInspector.Frame.prototype.get canvasCollection):
3830         (WebInspector.Frame.prototype.commitProvisionalLoad):
3831         Create a Collection for Canvas in each Frame, and modify it when canvas events are fired.
3832
3833         * UserInterface/Views/CanvasContentView.css: Added.
3834         (.content-view.canvas > .preview):
3835         (.content-view.canvas > .preview > img):
3836         * UserInterface/Views/CanvasContentView.js: Added.
3837         (WebInspector.CanvasContentView):
3838         (WebInspector.CanvasContentView.prototype.get navigationItems):
3839         (WebInspector.CanvasContentView.prototype.shown):
3840         (WebInspector.CanvasContentView.prototype.hidden):
3841         (WebInspector.CanvasContentView.prototype._showPreview):
3842         (WebInspector.CanvasContentView.prototype._updateImageGrid):
3843         (WebInspector.CanvasContentView.prototype._showGridButtonClicked):
3844         * UserInterface/Views/CanvasDetailsSidebarPanel.js: Added.
3845         (WebInspector.CanvasDetailsSidebarPanel):
3846         (WebInspector.CanvasDetailsSidebarPanel.prototype.inspect):
3847         (WebInspector.CanvasDetailsSidebarPanel.prototype.get canvas):
3848         (WebInspector.CanvasDetailsSidebarPanel.prototype.set canvas):
3849         (WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
3850         (WebInspector.CanvasDetailsSidebarPanel.prototype.layout):
3851         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
3852         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.):
3853         (WebInspector.CanvasDetailsSidebarPanel.prototype._refreshSourceSection):
3854         * UserInterface/Views/CanvasTreeElement.js: Added.
3855         (WebInspector.CanvasTreeElement):
3856
3857         * UserInterface/Views/FrameTreeElement.js:
3858         (WebInspector.FrameTreeElement.prototype.onattach):
3859         (WebInspector.FrameTreeElement.prototype.ondetach):
3860         (WebInspector.FrameTreeElement.prototype.onpopulate):
3861         (WebInspector.FrameTreeElement.prototype._canvasWasAdded):
3862         (WebInspector.FrameTreeElement.prototype._canvasWasRemoved):
3863         (WebInspector.FrameTreeElement):
3864         * UserInterface/Base/Main.js:
3865         * UserInterface/Views/ContentView.js:
3866         (WebInspector.ContentView.createFromRepresentedObject):
3867         (WebInspector.ContentView.isViewable):
3868         * UserInterface/Views/ResourceSidebarPanel.js:
3869         (WebInspector.ResourceSidebarPanel):
3870         (WebInspector.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
3871         (WebInspector.ResourceSidebarPanel.prototype._treeSelectionDidChange):
3872         * UserInterface/Views/ResourcesTabContentView.js:
3873         (WebInspector.ResourcesTabContentView):
3874         (WebInspector.ResourcesTabContentView.prototype.canShowRepresentedObject):
3875         Show Canvas objects and tie them to the correct ContentView and TreeElement subclasses.
3876
3877         * Localizations/en.lproj/localizedStrings.js:
3878         * UserInterface/Main.html:
3879         * UserInterface/Images/Canvas.svg: Added.
3880         * UserInterface/Views/ResourceIcons.css:
3881         (.canvas .icon):
3882         Added new files/rules/strings related to Canvas UI.
3883
3884         * UserInterface/Views/SettingsTabContentView.css:
3885         (.content-view.settings .navigation-bar):
3886
3887         * UserInterface/Base/Setting.js:
3888         * UserInterface/Views/SettingsTabContentView.js:
3889         (WebInspector.SettingsTabContentView.prototype.initialLayout):
3890         (WebInspector.SettingsTabContentView.prototype._createGeneralSettingsView):
3891         (WebInspector.SettingsTabContentView.prototype._createDebugSettingsView):
3892         Add an experimental settings toggle in the Debug view for showing canvas contexts.
3893
3894         * UserInterface/Views/FolderizedTreeElement.js:
3895         (WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):
3896         Drive-by fix: ensure that sorting also includes numbers, so that 1 < 2 < 10.
3897
3898         * UserInterface/Views/ImageResourceContentView.js:
3899         (WebInspector.ImageResourceContentView.prototype.shown):
3900         (WebInspector.ImageResourceContentView.prototype.hidden):
3901         (WebInspector.ImageResourceContentView.prototype._updateImageGrid):
3902         (WebInspector.ImageResourceContentView.prototype._showGridButtonClicked):
3903         (WebInspector.ImageResourceContentView):
3904         Drive-by fix: change the activated state of the Show Grid navigation item if it changes
3905         in another view.
3906
3907 2017-06-19  Devin Rousso  <drousso@apple.com>
3908
3909         Web Inspector:&nbs