04a001d7758c3ebb650cdd4b28335d5e286ce221
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
2
3         Web Inspector: Canvas Tab: clicking on a canvas card causes details sidebar to show and mess up card arrangement
4         https://bugs.webkit.org/show_bug.cgi?id=178803
5         <rdar://problem/35176082>
6
7         Reviewed by Brian Burg.
8
9         * Localizations/en.lproj/localizedStrings.js:
10         * UserInterface/Views/CanvasDetailsSidebarPanel.css:
11         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder):
12         (.sidebar > .panel.details.canvas > .content > .empty-content-placeholder > .message):
13         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
14         (WI.CanvasDetailsSidebarPanel):
15         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
16         (WI.CanvasDetailsSidebarPanel.prototype.initialLayout):
17         (WI.CanvasDetailsSidebarPanel.prototype.layout):
18
19         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
20         (WI.RecordingNavigationSidebarPanel.disallowInstanceForClass): Deleted.
21         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
22         (WI.RecordingStateDetailsSidebarPanel.disallowInstanceForClass): Deleted.
23         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
24         (WI.RecordingTraceDetailsSidebarPanel.disallowInstanceForClass): Deleted.
25         Drive-by: these sidebar panels are now only used by the Canvas tab, so we no longer need to
26         provide support for multiple instances of them.
27
28 2017-10-25  Joseph Pecoraro  <pecoraro@apple.com>
29
30         Web Inspector: Display fetch() initiated loads as "fetch" instead of "xhr" in the Network Tab
31         https://bugs.webkit.org/show_bug.cgi?id=178826
32
33         Reviewed by Youenn Fablet.
34
35         * UserInterface/Views/NetworkTableContentView.js:
36         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
37         Fetch and XHR loads are still grouped under the succinct "XHR" filter, but
38         at least display the better type name in the "Type" column of the table.
39
40 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
41
42         Web Inspector: Canvas Tab: selected canvas card loses selection outline style while recording
43         https://bugs.webkit.org/show_bug.cgi?id=178814
44         <rdar://problem/35177317>
45
46         Reviewed by Brian Burg.
47
48         * UserInterface/Views/CanvasOverviewContentView.css:
49         (.content-view.canvas-overview .content-view.canvas):
50         (.content-view.canvas-overview .content-view.canvas > :matches(header, .preview, footer)):
51         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.preview, footer),):
52         (.content-view.canvas-overview .content-view.canvas > header):
53         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
54         (.content-view.canvas-overview .content-view.canvas > .preview):
55         (.content-view.canvas-overview .content-view.canvas > footer):
56         (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)): Deleted.
57         Instead of applying the border to the entire element, apply parts of the border to each of
58         its children so that we can choose what colors to use for each part.
59
60 2017-10-25  Nikita Vasilyev  <nvasilyev@apple.com>
61
62         Web Inspector: [PARITY] Styles Redesign: Add color gradient, bezier curve, and spring inline widgets
63         https://bugs.webkit.org/show_bug.cgi?id=178404
64         <rdar://problem/35035992>
65
66         Reviewed by Devin Rousso.
67
68         Add inline widgets for the following CSS values:
69         - Gradients, e.g. `background-image: linear-gradient(yellow, orange)`
70         - Bezier curves, e.g. `transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55)`
71         - Spring functions, e.g. `transition-timing-function: spring(1, 2, 2, 4)`
72
73         * UserInterface/Models/Color.js:
74         (WI.Color.prototype.toString):
75         Don't throw. The are never try/catch blocks on the callsites.
76
77         * UserInterface/Views/SpreadsheetStyleProperty.js:
78         (WI.SpreadsheetStyleProperty.prototype._renderValue):
79         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
80         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
81         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
82         (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
83
84 2017-10-25  Nikita Vasilyev  <nvasilyev@apple.com>
85
86         Web Inspector: Styles Redesign: Newly added invalid property isn't immediately shown as invalid
87         https://bugs.webkit.org/show_bug.cgi?id=178488
88
89         Reviewed by Brian Burg.
90
91         * UserInterface/Models/CSSStyleDeclaration.js:
92         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
93         Call this.update to update _properties, _allProperties, _visibleProperties, and _allVisibleProperties.
94
95         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
96         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled)):
97         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled)):
98         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .value):
99         When the property name is valid, but the value isn't, display red line-through only for the value.
100         This is how it works in the old styles sidebar as well.
101
102         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
103         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
104         (WI.SpreadsheetCSSStyleDeclarationEditor):
105         * UserInterface/Views/SpreadsheetStyleProperty.js:
106         (WI.SpreadsheetStyleProperty):
107         (WI.SpreadsheetStyleProperty.prototype.updateClassNames):
108         (WI.SpreadsheetStyleProperty.prototype._update):
109         Introduce updateClassNames method. Unlike _update, it doesn't change text selection or focus and
110         can be safely called on a property while it's being edited.
111
112 2017-10-25  Devin Rousso  <webkit@devinrousso.com>
113
114         Web Inspector: preserve Recordings for each Canvas after closing the Canvas tab
115         https://bugs.webkit.org/show_bug.cgi?id=178767
116         <rdar://problem/35167239>
117
118         Reviewed by Brian Burg.
119
120         * UserInterface/Test.html:
121         Include CollectionTypes for tests.
122
123         * UserInterface/Controllers/CanvasManager.js:
124         (WI.CanvasManager.prototype.recordingFinished):
125
126         * UserInterface/Models/Canvas.js:
127         (WI.Canvas):
128         (WI.Canvas.prototype.get recordingCollection):
129
130         * UserInterface/Models/CollectionTypes.js:
131         (WI.CanvasCollection):
132         (WI.RecordingCollection):
133
134         * UserInterface/Views/CanvasContentView.js:
135         (WI.CanvasContentView.prototype.initialLayout):
136         (WI.CanvasContentView.prototype._addRecording):
137         (WI.CanvasContentView.prototype._recordingStopped):
138
139         * UserInterface/Views/CanvasTabContentView.js:
140         (WI.CanvasTabContentView.prototype.attached):
141         (WI.CanvasTabContentView.prototype._recordingAdded):
142
143 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
144
145         REGRESSION(r222181): Web Inspector: Augmenting Agents Domains are not getting activated
146         https://bugs.webkit.org/show_bug.cgi?id=178768
147         <rdar://problem/35081334>
148
149         Reviewed by Brian Burg.
150
151         * UserInterface/Base/Main.js:
152         Simplify event dispatch.
153
154         * UserInterface/Controllers/AppController.js:
155         (WI.AppController.prototype.activateExtraDomains):
156         Pass the domains on.
157
158 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
159
160         Web Inspector: Console Drawer resizing doesn't match cursor position
161         https://bugs.webkit.org/show_bug.cgi?id=178753
162         <rdar://problem/35160484>
163
164         Reviewed by Brian Burg.
165
166         * UserInterface/Views/ConsoleDrawer.js:
167         (WI.ConsoleDrawer.prototype._updateDrawerHeight):
168         Drive-by fix an early return that would never have worked.
169
170         * UserInterface/Views/Main.css:
171         (#content):
172         Give the #content a flex grow of 1. This causes the space to grow as it
173         already was but now it does not affect the size of the fixed height sibling.
174
175 2017-10-24  Eric Carlson  <eric.carlson@apple.com>
176
177         Web Inspector: Enable WebKit logging configuration and display
178         https://bugs.webkit.org/show_bug.cgi?id=177027
179         <rdar://problem/33964767>
180
181         Reviewed by Joseph Pecoraro.
182
183         * Localizations/en.lproj/localizedStrings.js: Add new localized strings.
184
185         * UserInterface/Controllers/LogManager.js:
186         (WI.LogManager): Initialize _loggingChannelSources, fetch _customLoggingChannels.
187         (WI.LogManager.supportsLogChannels): New.
188         (WI.LogManager.prototype.get customLoggingChannels): New.
189         (WI.LogManager.prototype.get logChannelSources): New.
190
191         * UserInterface/Main.html:
192         * UserInterface/Models/ConsoleMessage.js: Add Media and WebRTC.
193
194         * UserInterface/Models/IssueMessage.js:
195         (WI.IssueMessage): Add media and webrtc.
196
197         * UserInterface/Models/LoggingChannel.js: Added.
198         (WI.LoggingChannel):
199         (WI.LoggingChannel.fromPayload):
200         (WI.LoggingChannel.prototype.get source):
201         (WI.LoggingChannel.prototype.get level):
202
203         * UserInterface/Views/LogContentView.js:
204         (WI.LogContentView): Add new scope buttons for "Log", "Info", and "Debug". Create log channel
205             scope buttons once logging has started.
206         (WI.LogContentView.prototype.get navigationItems): Add the log message scope bar when necessary.
207         (WI.LogContentView.prototype._scopeFromMessageSource): New.
208         (WI.LogContentView.prototype._scopeFromMessageLevel): Don't group Info, Log, and Debug.
209         (WI.LogContentView.prototype._messageAdded): Force a UI update the first time a WebKit log
210             message is added.
211
212         (WI.LogContentView.prototype._messageShouldBeVisible): New, deal with message source bar buttons.
213         (WI.LogContentView.prototype._messageSourceBarSelectionDidChange): New.
214         (WI.LogContentView.prototype._filterMessageElements): Deal with message source bar buttons.
215
216         * UserInterface/Views/SettingsTabContentView.js:
217         (WI.SettingsTabContentView.prototype._createGeneralSettingsView): Create and initialize menus
218             for each log channel.
219
220 2017-10-24  Joseph Pecoraro  <pecoraro@apple.com>
221
222         Uncaught Exception: TypeError: null is not an object (evaluating 'this.treeOutline.isXMLMimeType')
223         https://bugs.webkit.org/show_bug.cgi?id=178745
224
225         Reviewed by Brian Burg.
226
227         * UserInterface/Views/DOMTreeUpdater.js:
228         (WI.DOMTreeUpdater.prototype._updateModifiedNodes):
229         An earlier tree element update might have caused this other tree element's
230         waiting to be updated to actually be removed. So just skip past them.
231
232 2017-10-24  Fujii Hironori  <Hironori.Fujii@sony.com>
233
234         [GTK] Web Inspector: Add Recording.svg
235         https://bugs.webkit.org/show_bug.cgi?id=175045
236
237         Reviewed by Brian Burg.
238
239         * UserInterface/Images/gtk/Recording.svg: Added.
240
241 2017-10-24  Devin Rousso  <webkit@devinrousso.com>
242
243         Web Inspector: allow ShaderProgram to be shown in CanvasContentView
244         https://bugs.webkit.org/show_bug.cgi?id=178714
245
246         Reviewed by Brian Burg.
247
248         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
249         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
250         Allow ShaderProgram to show the related Canvas information.
251
252         * UserInterface/Views/CanvasTabContentView.js:
253         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
254         (WI.CanvasTabContentView.prototype.showRepresentedObject):
255         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
256         If a ShaderProgram is selected in the path component, display a ShaderProgramContentView.
257
258 2017-10-24  Devin Rousso  <webkit@devinrousso.com>
259
260         Web Inspector: remove canvases from Resources and experimental setting/UI
261         https://bugs.webkit.org/show_bug.cgi?id=178711
262
263         Reviewed by Brian Burg.
264
265         * UserInterface/Base/Main.js:
266         (WI.tabContentViewClassForRepresentedObject):
267         * UserInterface/Base/Setting.js:
268         * UserInterface/Controllers/CanvasManager.js:
269         (WI.CanvasManager.prototype.canvasAdded):
270         (WI.CanvasManager.prototype.canvasRemoved):
271         * UserInterface/Models/Canvas.js:
272         * UserInterface/Models/Frame.js:
273         (WI.Frame):
274         (WI.Frame.prototype.get extraScriptCollection):
275         (WI.Frame.prototype.commitProvisionalLoad):
276         (WI.Frame.prototype.get canvasCollection): Deleted.
277         * UserInterface/Views/CanvasTabContentView.js:
278         (WI.CanvasTabContentView.isTabAllowed):
279         * UserInterface/Views/FrameTreeElement.js:
280         (WI.FrameTreeElement):
281         (WI.FrameTreeElement.prototype.onattach):
282         (WI.FrameTreeElement.prototype.ondetach):
283         (WI.FrameTreeElement.prototype.onpopulate):
284         (WI.FrameTreeElement.prototype._styleSheetAdded):
285         (WI.FrameTreeElement.prototype._canvasWasAdded): Deleted.
286         (WI.FrameTreeElement.prototype._canvasWasRemoved): Deleted.
287         * UserInterface/Views/ResourceSidebarPanel.js:
288         (WI.ResourceSidebarPanel):
289         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
290         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
291         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
292         * UserInterface/Views/ResourcesTabContentView.js:
293         (WI.ResourcesTabContentView):
294         (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
295         * UserInterface/Views/SettingsTabContentView.js:
296         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
297
298 2017-10-24  Devin Rousso  <webkit@devinrousso.com>
299
300         Web Inspector: Show recordings in CanvasTabContentView
301         https://bugs.webkit.org/show_bug.cgi?id=177606
302         <rdar://problem/34715819>
303
304         Reviewed by Brian Burg.
305
306         Original patch by Matt Baker <mattbaker@apple.com>.
307
308         This patch folds canvas recordings into the new Canvas tab, which now
309         supports showing both CanvasCollections and Recordings.
310
311         When viewing recordings, a back button is shown at the start of the
312         navigation bar, allowing the user to return to the overview. It has been
313         styled with a back arrow, to make its function as clear as possible.
314         Like other navigation path components, the item for the recording can
315         clicked to select another recording taken from the same canvas.
316
317         The recording action scrubber has been moved from the content browser's
318         navigation bar to a more prominent location in the recording content view.
319         Selecting a frame tree element in the navigation sidebar no longer selects
320         the last action for that frame. This was changed to prevent the scrubber
321         position from behaving non-monotonically when selecting actions in sequential
322         order.
323
324         While this patch retains support for importing recordings, the feature
325         is not polished. Currently it is not possible to return to an imported
326         recording after leaving closing the view. In the future we may want to
327         consider including a navigation sidebar panel for the overview, which
328         could list canvas recordings (and eventually shaders).
329
330         * .eslintrc:
331         Drive-by: remove duplicate key.
332
333         * Localizations/en.lproj/localizedStrings.js:
334         * UserInterface/Base/Main.js:
335         (WI.contentLoaded):
336         (WI.tabContentViewClassForRepresentedObject):
337         * UserInterface/Main.html:
338         * UserInterface/Views/RecordingTabContentView.js: Removed.
339         Remove RecordingTabContentView.
340
341         * UserInterface/Images/Recording.svg:
342         New recording icon, used for tree elements and canvas preview UI.
343
344         * UserInterface/Models/Recording.js:
345         (WI.Recording):
346         (WI.Recording.prototype.get visualActionIndexes):
347         Visual action indexes should be computed by the recording.
348
349         * UserInterface/Views/CanvasContentView.js:
350         (WI.CanvasContentView):
351         (WI.CanvasContentView.prototype.refresh):
352         (WI.CanvasContentView.prototype.initialLayout):
353         (WI.CanvasContentView.prototype.attached):
354         (WI.CanvasContentView.prototype._recordingStopped):
355         (WI.CanvasContentView.prototype._handleRecordingSelectElementChange):
356         New UI for showing CanvasContentView as a CollectionView item. Includes
357         recordings button and select for choosing a recording to view.
358
359         * UserInterface/Views/CanvasOverviewContentView.css:
360         (.content-view.canvas-overview .content-view.canvas > header):
361         Switch to 13px, which is more frequently used.
362
363         (.content-view.canvas-overview .content-view.canvas > header .subtitle::before):
364         Switch to literal em dash. Surrounding spaces were ignored when using
365         the backslash-escaped character.
366
367         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar):
368         (.content-view.canvas-overview .content-view.canvas > footer > .recordings):
369         (.content-view.canvas-overview .content-view.canvas > footer > .recordings::before):
370         (.content-view.canvas-overview .content-view.canvas > footer > .recordings > select):
371         (.content-view.canvas-overview .content-view.canvas > footer .recordings > select:focus):
372         (.content-view.canvas-overview .content-view.canvas > footer > .flexible-space):
373         (.popover-content > .tree-outline .item.recording > .icon):
374         (.popover-content > .tree-outline .item.recording:hover):
375         (.popover-content > .tree-outline .item.recording:hover > .icon):
376         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar): Deleted.
377         (.content-view.canvas-overview .content-view.canvas > footer): Deleted.
378         New styles for the recording picker.
379
380         * UserInterface/Views/CanvasOverviewContentView.js:
381         (WI.CanvasOverviewContentView):
382         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents):
383         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
384         (WI.CanvasOverviewContentView.prototype.contentViewRemoved):
385         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
386         (WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged): Deleted.
387         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent): Deleted.
388         Canvas tree elements are now managed by CanvasTabContentView, which is
389         now responsible for maintaining the tree of canvas objects. For now the
390         tree holds canvases and recordings, but will eventually include shader programs.
391
392         * UserInterface/Views/CanvasTabContentView.css:
393         (.content-view.tab.canvas .navigation-bar > .item .recording > .icon):
394         (.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon): Deleted.
395         Add styles for recording path components.
396
397         * UserInterface/Views/CanvasTabContentView.js:
398         (WI.CanvasTabContentView):
399         (WI.CanvasTabContentView.prototype.treeElementForRepresentedObject):
400         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
401         (WI.CanvasTabContentView.prototype.showRepresentedObject):
402         (WI.CanvasTabContentView.prototype.shown):
403         (WI.CanvasTabContentView.prototype.restoreStateFromCookie):
404         (WI.CanvasTabContentView.prototype.attached):
405         (WI.CanvasTabContentView.prototype.detached):
406         (WI.CanvasTabContentView.prototype._canvasAdded):
407         (WI.CanvasTabContentView.prototype._canvasRemoved):
408         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
409         (WI.CanvasTabContentView.prototype._recordingStopped):
410         (WI.CanvasTabContentView.prototype._navigationSidebarImport):
411         (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged):
412         (WI.CanvasTabContentView.prototype._recordingAdded):
413         (WI.CanvasTabContentView.prototype._recordingActionIndexChanged):
414         (WI.CanvasTabContentView.prototype._updateActionIndex):
415         (WI.CanvasTabContentView.prototype.restoreFromCookie): Deleted.
416         (WI.CanvasTabContentView.prototype._overviewPathComponentClicked): Deleted.
417
418         * UserInterface/Views/ContentView.js:
419         (WI.ContentView.createFromRepresentedObject):
420
421         * UserInterface/Views/RecordingActionTreeElement.css:
422         (body:not(.window-inactive, .window-docked-inactive) .tree-outline:matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,):
423         (body:not(.window-inactive, .window-docked-inactive) :matches(:focus, .force-focus) .item.action.selected > .titles .parameter.swizzled,): Deleted.
424
425         * UserInterface/Views/RecordingContentView.css:
426         (.content-view:not(.tab).recording):
427         (.content-view:not(.tab).recording > header):
428         (.content-view:not(.tab).recording > header > .slider-container):
429         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
430         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-runnable-track):
431         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]::-webkit-slider-thumb):
432         (.content-view:not(.tab).recording > .preview-container):
433
434         * UserInterface/Views/RecordingContentView.js:
435         (WI.RecordingContentView):
436         (WI.RecordingContentView.prototype.updateActionIndex):
437         (WI.RecordingContentView.prototype.initialLayout):
438         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
439         (WI.RecordingContentView.prototype._updateSliderValue):
440         (WI.RecordingContentView.prototype._sliderChanged):
441         (WI.RecordingContentView.prototype.get supplementalRepresentedObjects): Deleted.
442
443         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
444         (WI.RecordingNavigationSidebarPanel.prototype.set recording):
445         (WI.RecordingNavigationSidebarPanel.prototype.updateActionIndex):
446
447         * UserInterface/Views/ResourceIcons.css:
448         (.canvas .icon):
449         (.canvas.canvas-2d .icon): Deleted.
450         (.canvas:matches(.webgl, .webgl2, .webgpu) .icon): Deleted.
451
452 2017-10-24  Ross Kirsling  <ross.kirsling@sony.com>
453
454         Web Inspector: Layer mutations should be purely based on layerId, not based on nodeId
455         https://bugs.webkit.org/show_bug.cgi?id=178554
456
457         Reviewed by Devin Rousso.
458
459         * UserInterface/Controllers/LayerTreeManager.js:
460         (WI.LayerTreeManager.prototype.layerTreeMutations):
461         Looking for special cases involving nodeIds is incorrect, as nodeIds need not be unique in the layer list (such
462         as when an element and a pseudo-element thereof each give rise to a layer). A layer object marked "preserved" in
463         this way shares no data with its predecessor, meaning that no consumer can act upon this so-called preservation.
464         A preserved layer should be nothing more or less than a recycled layerId (the thing that *is* unique).
465
466 2017-10-23  Nikita Vasilyev  <nvasilyev@apple.com>
467
468         Web Inspector: Styles Redesign: Inline widgets don't hide when starting editing by tabbing from property name
469         https://bugs.webkit.org/show_bug.cgi?id=178638
470
471         Reviewed by Joseph Pecoraro.
472
473         * UserInterface/Views/SpreadsheetStyleProperty.js:
474         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
475         Blur event on the property name text field caused WI.SpreadsheetStyleProperty.prototype._renderValue,
476         which displayed inline swatches. Display inline swatches only after blur event on the property value.
477
478 2017-10-23  Joseph Pecoraro  <pecoraro@apple.com>
479
480         Web Inspector: Please support HAR Export for network traffic
481         https://bugs.webkit.org/show_bug.cgi?id=146692
482         <rdar://problem/7463672>
483
484         Reviewed by Brian Burg.
485
486         * UserInterface/Main.html:
487         * UserInterface/Test.html:
488         New resources.
489
490         * UserInterface/Base/Platform.js:
491         Include a build number as well.
492         
493         * UserInterface/Base/URLUtilities.js:
494         (parseLocationQueryParameters): Deleted.
495         Remove unused function.
496
497         * UserInterface/Controllers/FrameResourceManager.js:
498         (WI.FrameResourceManager.prototype.frameDidNavigate):
499         (WI.FrameResourceManager.prototype.resourceRequestWillBeSent):
500         (WI.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
501         (WI.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
502         (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
503         Pass along a walltime.
504
505         * UserInterface/Protocol/NetworkObserver.js:
506         (WI.NetworkObserver.prototype.requestWillBeSent):
507         Pass along a walltime. This new parameter shifts old parameters.
508
509         * UserInterface/Controllers/HARBuilder.js: Added.
510         (WI.HARBuilder.async.buildArchive):
511         (WI.HARBuilder.creator):
512         (WI.HARBuilder.pages):
513         (WI.HARBuilder.pageTimings):
514         (WI.HARBuilder.entry):
515         (WI.HARBuilder.request):
516         (WI.HARBuilder.response):
517         (WI.HARBuilder.cookies):
518         (WI.HARBuilder.headers):
519         (WI.HARBuilder.content):
520         (WI.HARBuilder.postData):
521         (WI.HARBuilder.cache):
522         (WI.HARBuilder.timings):
523         (WI.HARBuilder.ipAddress):
524         (WI.HARBuilder.date):
525         (WI.HARBuilder.fetchType):
526         HAR construction and helpers.
527
528         * UserInterface/Models/Cookie.js:
529         (WI.Cookie.prototype.expirationDate):
530         * UserInterface/Models/Resource.js:
531         (WI.Resource.prototype.get queryStringParameters):
532         (WI.Resource.prototype.get requestFormParameters):
533         (WI.Resource.prototype.get requestSentWalltime):
534         (WI.Resource.prototype.get requestSentDate):
535         (WI.Resource.prototype.hasRequestFormParameters):
536         Helpers for HAR generation and sub-sets of data.
537
538         * UserInterface/Models/SourceCode.js:
539         (WI.SourceCode.prototype._processContent):
540         Capture the raw, unmodified, base64 encoded flag and content. This ends
541         up getting used by HAR generation and is otherwise lost.
542
543         * UserInterface/Test/TestHarness.js:
544         (TestHarness.prototype.json):
545         Helper for just logging JSON data with a filter. This defaults to
546         a reasonable 2 space indent for JSON logs in our test output.
547
548         * UserInterface/Views/DOMTreeContentView.js:
549         (WI.DOMTreeContentView.prototype.get saveData):
550         (WI.DOMTreeContentView.get saveData.saveHandler): Deleted.
551         Drive-by simplify while looking at other save handlers.
552
553         * UserInterface/Views/NetworkTableContentView.js:
554         (WI.NetworkTableContentView.prototype.get supportsSave):
555         (WI.NetworkTableContentView.prototype.get saveData):
556         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
557         (WI.NetworkTableContentView.prototype._HARResources):
558         (WI.NetworkTableContentView.prototype._exportHAR):
559         Provide a context menu and save keyboard handler to export a HAR.
560         This matches other browsers.
561
562         * UserInterface/Views/ResourceClusterContentView.js:
563         (WI.ResourceClusterContentView.prototype._canShowRequestContentView):
564         Use code that is now available in Resource.
565
566 2017-10-20  Matt Baker  <mattbaker@apple.com>
567
568         Web Inspector: scrolling the editor while debugging shouldn't trigger popovers
569         https://bugs.webkit.org/show_bug.cgi?id=178325
570
571         Reviewed by Devin Rousso.
572
573         Ignore the next "mousemove" event immediately following a "mousewheel",
574         when determining the hovered item for purposes of triggering a popover.
575
576         * UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
577         (WI.CodeMirrorTokenTrackingController):
578         (WI.CodeMirrorTokenTrackingController.prototype._startTracking):
579         (WI.CodeMirrorTokenTrackingController.prototype._stopTracking):
580         (WI.CodeMirrorTokenTrackingController.prototype.handleEvent):
581         (WI.CodeMirrorTokenTrackingController.prototype._mouseMovedOverEditor):
582
583 2017-10-20  Joseph Pecoraro  <pecoraro@apple.com>
584
585         Web Inspector: preview content view for MIME type application/json should be a collapsible tree outline
586         https://bugs.webkit.org/show_bug.cgi?id=158938
587         <rdar://problem/26891128>
588
589         Reviewed by Brian Burg.
590
591         * Localizations/en.lproj/localizedStrings.js:
592         * UserInterface/Main.html:
593         New files and strings.
594
595         * UserInterface/Views/JSONResourceContentView.css: Added.
596         (.content-view.resource.json):
597         (.content-view.resource.json .object-tree .prototype-property):
598         Some padding and scrolling for the JSON content view.
599
600         * UserInterface/Views/JSONResourceContentView.js: Added.
601         (WI.JSONResourceContentView):
602         (WI.JSONResourceContentView.customContentViewDisplayName):
603         (WI.JSONResourceContentView.prototype.contentAvailable):
604         (WI.JSONResourceContentView.prototype.closed):
605         JSON view evaluates the JSON content on the page and shows an ObjectTree
606         for the resulting object.
607
608         * UserInterface/Views/ResourceClusterContentView.js:
609         (WI.ResourceClusterContentView):
610         (WI.ResourceClusterContentView.prototype.get customResponseContentView):
611         (WI.ResourceClusterContentView.prototype.get selectionPathComponents):
612         (WI.ResourceClusterContentView.prototype.restoreFromCookie):
613         (WI.ResourceClusterContentView.prototype.showResponse):
614         (WI.ResourceClusterContentView.prototype._canShowRequestContentView):
615         (WI.ResourceClusterContentView.prototype._canShowCustomResponseContentView):
616         (WI.ResourceClusterContentView.prototype._pathComponentForContentView):
617         (WI.ResourceClusterContentView.prototype._identifierForContentView):
618         (WI.ResourceClusterContentView.prototype._showContentViewForIdentifier):
619         (WI.ResourceClusterContentView.prototype._resourceTypeDidChange):
620         (WI.ResourceClusterContentView.prototype._resourceLoadingDidFinish):
621         (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
622         (WI.ResourceClusterContentView.prototype._customContentViewConstructorForResource):
623         Allow a custom content view to be used for a resource based on the response.
624         Currently the only custom content view is the JSON content view.
625
626 2017-10-20  Joseph Pecoraro  <pecoraro@apple.com>
627
628         Web Inspector: Network Tab - Turn on the new tab by default, remove the legacy network tab
629         https://bugs.webkit.org/show_bug.cgi?id=178559
630         <rdar://problem/34985503>
631
632         Reviewed by Matt Baker.
633
634         * Localizations/en.lproj/localizedStrings.js:
635         * UserInterface/Base/Main.js:
636         (WI.contentLoaded):
637         * UserInterface/Base/Setting.js:
638         * UserInterface/Main.html:
639         * UserInterface/Views/LegacyNetworkSidebarPanel.css: Removed.
640         * UserInterface/Views/LegacyNetworkSidebarPanel.js: Removed.
641         * UserInterface/Views/LegacyNetworkTabContentView.js: Removed.
642         * UserInterface/Views/NetworkGridContentView.css: Removed.
643         * UserInterface/Views/NetworkGridContentView.js: Removed.
644         * UserInterface/Views/TabBrowser.js:
645         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
646         Remove LegacyNetwork tab, its NetworkGridContentView, and associated content.
647
648         * UserInterface/Views/NetworkTabContentView.js:
649         (WI.NetworkTabContentView.isTabAllowed):
650         Simplify now that this is the only Network tab.
651
652         * UserInterface/Views/SettingsTabContentView.js:
653         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
654         Remove experimental setting.
655
656
657 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
658
659         Unreviewed localized strings update.
660
661         * Localizations/en.lproj/localizedStrings.js:
662         Add missing string after r223735.
663
664 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
665
666         Web Inspector: Network Tab: Metrics Detail View
667         https://bugs.webkit.org/show_bug.cgi?id=178323
668         <rdar://problem/34071929>
669
670         Reviewed by Devin Rousso.
671
672         Provide a Metrics detail view for resources in the Network tab.
673         This detail view shows:
674         
675           - Transfer Size information (Header + Body bytes)
676           - Resource Size information (Compression, MIME)
677           - Timing information (ResourceTiming, Waterfall breakdown)
678
679         The display of timing information isn't quite final. But this
680         is a good starting point for all the information.
681
682         * Localizations/en.lproj/localizedStrings.js:
683         * UserInterface/Main.html:
684         New resources and strings.
685
686         * UserInterface/Base/MIMETypeUtilities.js:
687         (WI.shouldTreatMIMETypeAsText):
688         Helper for detecting text resources.
689
690         * UserInterface/Images/Receiving.svg: Added.
691         * UserInterface/Images/Sending.svg: Added.
692         * UserInterface/Images/gtk/Receiving.svg: Added.
693         * UserInterface/Images/gtk/Sending.svg: Added.
694         Same images for main and linux ports with different licenses.
695
696         * UserInterface/Views/NetworkResourceDetailView.js:
697         (WI.NetworkResourceDetailView):
698         (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToHeaders):
699         (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToRequestBody):
700         (WI.NetworkResourceDetailView.prototype.metricsContentViewGoToResponseBody):
701         (WI.NetworkResourceDetailView.prototype.initialLayout):
702         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
703         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
704         Replace "Timing" and "Details" stubs with a single "Metrics" section.
705         Handle delegate cases from the Metrics content view.
706
707         * UserInterface/Views/NetworkTableContentView.js:
708         (WI.NetworkTableContentView.displayNameForResource):
709         (WI.NetworkTableContentView.prototype._displayType): Deleted.
710         (WI.NetworkTableContentView.prototype._entryForResource):
711         Promote this to a static helper in case anyone else wants it.
712
713         (WI.NetworkTableContentView.prototype.closed):
714         (WI.NetworkTableContentView.prototype.reset):
715         (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
716         Reorder code a bit to reduce work since hiding the detail view currently
717         forces a layout.
718
719         * UserInterface/Views/ResourceHeadersContentView.js:
720         (WI.ResourceHeadersContentView):
721         (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
722         (WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
723         (WI.ResourceHeadersContentView.prototype._goToRequestDataClicked): Deleted.
724         Simplify by making the delegate required.
725
726         * UserInterface/Views/ResourceMetricsContentView.css: Added.
727         (.resource-metrics):
728         (.resource-metrics > .content):
729         (.resource-metrics > .content .label):
730         General metrics styles.
731
732         (.resource-metrics > .content > section):
733         (.resource-metrics > .content > section .subtitle):
734         (.resource-metrics > .content > section:not(:last-of-type)):
735         (.resource-metrics > .content > section.split):
736         (.resource-metrics > .content > section.split > .subsection):
737         (.resource-metrics > .content > section.split > .subsection > table):
738         (.resource-metrics > .content > section.split > .divider):
739         (.resource-metrics > .content > section.network > .subsection > .container):
740         (.resource-metrics > .content > section.network .bytes-group):
741         (.resource-metrics > .content > section.network .bytes):
742         (body[dir=ltr] .resource-metrics > .content > section.network table > tr > td.label):
743         (body[dir=rtl] .resource-metrics > .content > section.network table > tr > td.label):
744         (.resource-metrics > .content > section.network .suffix):
745         (.resource-metrics > .content > section.network img):
746         (.resource-metrics > .content > section.network .go-to-arrow):
747         (.resource-metrics > .content > section.network .warning):
748         Styles for Sizes sections.
749
750         (.resource-metrics > .content > section.timing):
751         (.resource-metrics > .content > section.timing .subtitle):
752         (.resource-metrics > .content > section.timing > ul):
753         (.resource-metrics > .content > section.timing > ul > li):
754         (.resource-metrics > .content > section.timing > .waterfall):
755         (.resource-metrics > .content > section.timing > .waterfall .block):
756         (.resource-metrics > .content > section.timing > ul > li > .row-label):
757         (body[dir=ltr] .resource-metrics > .content > section.timing > ul > li > .row-label):
758         (body[dir=rtl] .resource-metrics > .content > section.timing > ul > li > .row-label):
759         (.resource-metrics > .content > section.timing > ul > li > .time-label):
760         (.resource-metrics > .content > section.timing > ul > li.total .block):
761         (.resource-metrics > .content > section.timing > ul > li.total .time-label):
762         (.resource-metrics > .content > section.timing .indeterminate-progress-spinner):
763         (.resource-metrics > .content > section.timing .empty):
764         Styles for Timing section.
765
766         * UserInterface/Views/ResourceMetricsContentView.js: Added.
767         (WI.ResourceMetricsContentView):
768         (WI.ResourceMetricsContentView.prototype.initialLayout.createSizeComponents):
769         (WI.ResourceMetricsContentView.prototype.initialLayout):
770         (WI.ResourceMetricsContentView.prototype.layout):
771         (WI.ResourceMetricsContentView.prototype.closed):
772         (WI.ResourceMetricsContentView.prototype._sizeComponents):
773         (WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections.appendGoToArrow):
774         (WI.ResourceMetricsContentView.prototype._refreshTransferSizeSections):
775         (WI.ResourceMetricsContentView.prototype._refreshResourceSizeSection):
776         (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createBlock):
777         (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createTimeLabel):
778         (WI.ResourceMetricsContentView.prototype._refreshTimingSection.createRow):
779         (WI.ResourceMetricsContentView.prototype._refreshTimingSection):
780         (WI.ResourceMetricsContentView.prototype._resourceSizeDidChange):
781         (WI.ResourceMetricsContentView.prototype._resourceTransferSizeDidChange):
782         (WI.ResourceMetricsContentView.prototype._resourceMetricsDidChange):
783         (WI.ResourceMetricsContentView.prototype._resourceTimestampsDidChange):
784         Metrics content. This just creates all of the elements, and saves a
785         few to get populated with data later on.
786
787 2017-10-19  Joseph Pecoraro  <pecoraro@apple.com>
788
789         Web Inspector: Network Tab - Improve graphical representation of network waterfall
790         https://bugs.webkit.org/show_bug.cgi?id=147897
791         <rdar://problem/27482198>
792
793         Reviewed by Brian Burg.
794
795         * Localizations/en.lproj/localizedStrings.js:
796         * UserInterface/Main.html:
797         New strings and resources.
798
799         * UserInterface/Views/Variables.css:
800         (:root):
801         Global styles.
802
803         * UserInterface/Views/NetworkTableContentView.css:
804         (.network-table .header .cell.waterfall):
805         (.network-table .timeline-ruler):
806         (.network-table .timeline-ruler > .header):
807         Styles for having a TimelineRuler in the Waterfall's table header.
808
809         (.network-table :not(.header) .cell.waterfall):
810         (.network-table :not(.header) .cell.waterfall .waterfall-container):
811         (.waterfall .block):
812         (.waterfall .block.request,):
813         (.waterfall .block.mouse):
814         (.waterfall .block.queue):
815         (.waterfall .block.dns):
816         (.waterfall .block.connect):
817         (.waterfall .block.secure):
818         (.waterfall .block.request):
819         (.waterfall .block.response):
820         Waterfall styles inside the Network Table.
821
822         * UserInterface/Views/NetworkTableContentView.js:
823         (WI.NetworkTableContentView):
824         (WI.NetworkTableContentView.prototype.reset):
825         (WI.NetworkTableContentView.prototype.tablePopulateCell):
826         (WI.NetworkTableContentView.prototype.initialLayout):
827         (WI.NetworkTableContentView.prototype._updateWaterfallTimelineRuler):
828         (WI.NetworkTableContentView.prototype._updateEntryForResource):
829         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
830         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
831         (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
832         (WI.NetworkTableContentView.prototype._tableWaterfallColumnDidChangeWidth):
833         Update the TimelineRuler and Waterfall column when the column's
834         size changes or the time bounds change. The time bounds right now
835         are the earliest and latest time of resources. Later we hope to
836         bound this by a timeline selection.
837
838         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
839         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
840         (WI.NetworkTableContentView.prototype._populateWaterfallGraph.appendBlock):
841         (WI.NetworkTableContentView.prototype._populateWaterfallGraph):
842         (WI.NetworkTableContentView.prototype._hidePopover):
843         Create and manage a popover for the waterfall column.
844
845         * UserInterface/Views/Popover.js:
846         (WI.Popover):
847         (WI.Popover.prototype.get element):
848         (WI.Popover.prototype.get visible):
849         (WI.Popover.prototype.get backgroundStyle):
850         (WI.Popover.prototype.set backgroundStyle):
851         (WI.Popover.prototype._drawBackground):
852         Provide an option to have a white background popover.
853
854         * UserInterface/Views/ResourceTimingBreakdownView.css: Added.
855         (.resource-timing-breakdown):
856         (.resource-timing-breakdown .waterfall):
857         (.resource-timing-breakdown .waterfall .block):
858         (.resource-timing-breakdown .waterfall .block.request):
859         (body[dir=ltr] .resource-timing-breakdown .waterfall .block.queue,):
860         (body[dir=ltr] .resource-timing-breakdown .waterfall .block.response):
861         (body[dir=rtl] .resource-timing-breakdown .waterfall .block.queue,):
862         (body[dir=rtl] .resource-timing-breakdown .waterfall .block.response):
863         (.resource-timing-breakdown .numbers):
864         (body[dir=ltr] .resource-timing-breakdown .numbers):
865         (body[dir=rtl] .resource-timing-breakdown .numbers):
866         Waterfall styles and sizes in the popover's breakdown view.
867
868         (.resource-timing-breakdown .numbers > p):
869         (.resource-timing-breakdown .numbers > p > .swatch):
870         (.resource-timing-breakdown .numbers .swatch.queue):
871         (.resource-timing-breakdown .numbers .swatch.dns):
872         (.resource-timing-breakdown .numbers .swatch.connect):
873         (.resource-timing-breakdown .numbers .swatch.secure):
874         (.resource-timing-breakdown .numbers .swatch.request):
875         (.resource-timing-breakdown .numbers .swatch.response):
876         (.resource-timing-breakdown .numbers > p > .label):
877         (.resource-timing-breakdown .numbers > p.total):
878         Number and label styles in the popover's breakdown view.
879
880         * UserInterface/Views/ResourceTimingBreakdownView.js: Added.
881         (WI.ResourceTimingBreakdownView):
882         (WI.ResourceTimingBreakdownView.prototype.initialLayout):
883         (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendBlock):
884         (WI.ResourceTimingBreakdownView.prototype.initialLayout.appendRow):
885         Show a section for a waterfall visualization and a section for the numbers.
886
887         * UserInterface/Views/Table.js:
888         (WI.Table.prototype.reloadVisibleColumnCells):
889         (WI.Table.prototype.cellForRowAndColumn):
890         (WI.Table.prototype.addColumn):
891         (WI.Table.prototype.showColumn):
892         (WI.Table.prototype.hideColumn):
893         (WI.Table.prototype.resizerDragging):
894         (WI.Table.prototype.resizerDragEnded):
895         (WI.Table.prototype._resizeColumnsAndFiller):
896         (WI.Table.prototype._applyColumnWidths):
897         (WI.Table.prototype._positionHeaderViews):
898         * UserInterface/Views/TableColumn.js:
899         (WI.TableColumn.prototype.get headerView):
900         Provide a way to include a WI.View with a TableColumn Header. This
901         matches what we do with DataGrid, and ends up being pretty concise.
902
903         * UserInterface/Views/TimelineRuler.css:
904         (.timeline-ruler > .header):
905         Make the height a variable so that other code can work off of it.
906
907 2017-10-19  Ross Kirsling  <ross.kirsling@sony.com>
908
909         Web Inspector: Remove superfluous file External/.eslintrc
910         https://bugs.webkit.org/show_bug.cgi?id=178474
911
912         Reviewed by Joseph Pecoraro.
913
914         * UserInterface/External/.eslintrc: Removed.
915
916 2017-10-19  Adrian Perez de Castro  <aperez@igalia.com>
917
918         [GTK] Inspector UI does not use system font despite -webkit-system-font being supported
919         https://bugs.webkit.org/show_bug.cgi?id=178388
920
921         Reviewed by Joseph Pecoraro.
922
923         Change ocurrences of the "-apple-system" generic font name to
924         "-webkit-system-font", which is also implemented by the GTK+ port.
925
926         * UserInterface/Views/CodeMirrorOverrides.css:
927         (.CodeMirror .CodeMirror-linenumber):
928         (.CodeMirror .CodeMirror-placeholder):
929         * UserInterface/Views/ConsoleMessageView.css:
930         (.console-user-command.special-user-log > .console-message-text):
931         (.console-message .console-message-extra-parameters-container > li::before):
932         (.console-message .console-message-location):
933         * UserInterface/Views/DataGrid.css:
934         (.data-grid td):
935         * UserInterface/Views/DefaultDashboardView.css:
936         (.toolbar .dashboard.default > .item):
937         * UserInterface/Views/HeapSnapshotInstancesContentView.css:
938         (.heap-snapshot-instance-popover-content > .title):
939         * UserInterface/Views/HierarchicalPathComponent.css:
940         (.hierarchical-path-component):
941         * UserInterface/Views/LogContentView.css:
942         (.console-messages):
943         * UserInterface/Views/Main.css:
944         (body):
945         * UserInterface/Views/ObjectTreeArrayIndexTreeElement.css:
946         (.object-tree-array-index .index-name):
947         * UserInterface/Views/ObjectTreePropertyTreeElement.css:
948         (.object-tree-property .property-name,):
949         * UserInterface/Views/ObjectTreeView.css:
950         (.tree-outline.object li .empty-message):
951         * UserInterface/Views/RecordingActionTreeElement.css:
952         (.item.action:not(.initial-state)::before):
953         * UserInterface/Views/SourceCodeTextEditor.css:
954         (.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
955         (.popover .debugger-popover-content > .title):
956         * UserInterface/Views/TypeTreeView.css:
957         (.type-tree):
958         * UserInterface/Views/VisualStyleFontFamilyTreeElement.js:
959
960 2017-10-18  Ross Kirsling  <ross.kirsling@sony.com>
961
962         Web Inspector: Layers sidebar footer should not have white background with full-width quick console
963         https://bugs.webkit.org/show_bug.cgi?id=178493
964
965         Reviewed by Matt Baker.
966
967         * UserInterface/Views/LayerDetailsSidebarPanel.css:
968         Update CSS for new sidebar.
969
970         * UserInterface/Views/LayerTreeDetailsSidebarPanel.css:
971         Update CSS for legacy sidebar.
972
973 2017-10-18  Fujii Hironori  <Hironori.Fujii@sony.com>
974
975         [GTK] Web Inspector: Add Layers.svg
976         https://bugs.webkit.org/show_bug.cgi?id=178430
977
978         Reviewed by Michael Catanzaro.
979
980         * UserInterface/Images/gtk/Layers.svg: Added.
981
982 2017-10-18  Commit Queue  <commit-queue@webkit.org>
983
984         Unreviewed, rolling out r223321.
985         https://bugs.webkit.org/show_bug.cgi?id=178476
986
987         This protocol change broke some internal builds (Requested by
988         brrian__ on #webkit).
989
990         Reverted changeset:
991
992         "Web Inspector: provide a way to enable/disable event
993         listeners"
994         https://bugs.webkit.org/show_bug.cgi?id=177451
995         https://trac.webkit.org/changeset/223321
996
997 2017-10-17  Nikita Vasilyev  <nvasilyev@apple.com>
998
999         Web Inspector: [PARITY] Styles Redesign: Add color picker inline widget
1000         https://bugs.webkit.org/show_bug.cgi?id=178354
1001
1002         Reviewed by Joseph Pecoraro.
1003
1004         Show color picker using the existing WI.InlineSwatch.
1005
1006         * UserInterface/Models/Color.js:
1007         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1008         (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-comment):
1009         Syntax highlight comments in values.
1010
1011         * UserInterface/Views/SpreadsheetStyleProperty.js:
1012         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1013         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
1014         Find colors in CodeMirror tokens and replace them with color token elements.
1015
1016 2017-10-17  Nikita Vasilyev  <nvasilyev@apple.com>
1017
1018         Web Inspector: Styles: Command-click on a property name should jump to definition in Resources tab
1019         https://bugs.webkit.org/show_bug.cgi?id=174329
1020         <rdar://problem/33225564>
1021
1022         Reviewed by Joseph Pecoraro.
1023
1024         * UserInterface/Base/Main.js:
1025         Add "meta-key-pressed" class to <body> when Command key is pressed.
1026
1027         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1028         (.meta-key-pressed .spreadsheet-css-declaration:not(.locked) :matches(.name, .value):not(.editing):hover):
1029         Use the same styles as in CodeMirrorTokenTrackingController.css.
1030
1031         * UserInterface/Views/SpreadsheetStyleProperty.js:
1032         (WI.SpreadsheetStyleProperty.prototype._update):
1033         (WI.SpreadsheetStyleProperty.prototype._setupJumpToSymbol):
1034         This is very similar to WI.CSSStyleDeclarationTextEditor.prototype.tokenTrackingControllerHighlightedRangeWasClicked,
1035         except it doesn't include special cases for CSS variables and links yet.
1036
1037 2017-10-16  Nikita Vasilyev  <nvasilyev@apple.com>
1038
1039         Web Inspector: Styles Redesign: apply syntax highlighting to property values
1040         https://bugs.webkit.org/show_bug.cgi?id=178176
1041
1042         Reviewed by Matt Baker.
1043
1044         - Highlight links blue and CSS strings dark red.
1045         - Truncate URLs and strings over 150 characters.
1046
1047         * UserInterface/Views/CodeMirrorAdditions.js:
1048         Parse CSS values using CodeMirror.
1049
1050         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1051         (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-link):
1052         (.spreadsheet-style-declaration-editor .property:not(.disabled) .token-string):
1053
1054         * UserInterface/Views/SpreadsheetStyleProperty.js:
1055         (WI.SpreadsheetStyleProperty.prototype._update):
1056         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldWillStartEditing):
1057         Replace trancated values with their full version.
1058
1059         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
1060         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
1061         (WI.SpreadsheetStyleProperty.prototype._renderValue):
1062         Highlight links and CSS strings in values when not editing.
1063
1064         * UserInterface/Views/SpreadsheetTextField.js:
1065         (WI.SpreadsheetTextField.prototype.startEditing):
1066         Disabling of syntax highlighting moved to spreadsheetTextFieldWillStartEditing.
1067
1068         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
1069         (.syntax-highlighted a):
1070         * UserInterface/Views/Variables.css:
1071         (:root):
1072         Make link color a variable.
1073
1074 2017-10-16  Ross Kirsling  <ross.kirsling@sony.com>
1075
1076         Web Inspector: Layers tab mistakenly throws out the root element's layer.
1077         https://bugs.webkit.org/show_bug.cgi?id=178222
1078
1079         Reviewed by Brian Burg.
1080
1081         * UserInterface/Controllers/LayerTreeManager.js:
1082         (WI.LayerTreeManager.prototype.layersForNode):
1083         Fix the issue at the manager level.
1084
1085         * UserInterface/Views/Layers3DContentView.js:
1086         (WI.Layers3DContentView.prototype.layout):
1087         Update new sidebar based on simplified manager API.
1088
1089         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
1090         (WI.LayerTreeDetailsSidebarPanel.prototype.layout):
1091         Move overtailored code from manager to legacy sidebar.
1092
1093 2017-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
1094
1095         Web Inspector: Modify CSS number values with up key and down key
1096         https://bugs.webkit.org/show_bug.cgi?id=170779
1097         <rdar://problem/33170633>
1098
1099         Reviewed by Matt Baker.
1100
1101         Up key increments a number, Down key decrements it.
1102
1103         Holding modifier keys changes the step value:
1104         - Option modifies the value by 0.1
1105         - Shift modifies the value by 10
1106         - Command modifies the value by 100
1107
1108         * UserInterface/Test.html:
1109         * UserInterface/Views/EditingSupport.js:
1110         (WI.incrementElementValue):
1111         Abstract away incrementElementValue into a public method.
1112
1113         * UserInterface/Views/SpreadsheetTextField.js:
1114         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1115
1116 2017-10-15  Devin Rousso  <webkit@devinrousso.com>
1117
1118         Web Inspector: show warning when recorded Canvas action caused no visual change
1119         https://bugs.webkit.org/show_bug.cgi?id=175282
1120
1121         Reviewed by Joseph Pecoraro.
1122
1123         * Localizations/en.lproj/localizedStrings.js:
1124
1125         * UserInterface/Models/RecordingAction.js:
1126         (WI.RecordingAction):
1127         (WI.RecordingAction.prototype.get valid):
1128         (WI.RecordingAction.prototype.get hasVisibleEffect):
1129         (WI.RecordingAction.prototype.markInvalid):
1130         (WI.RecordingAction.prototype.apply):
1131         (WI.RecordingAction.prototype.async._swizzle):
1132         If the selected action is visual, save a copy of the preview canvas' dataURL before
1133         applying the action and compare it to its dataURL after. If there is no difference, the
1134         action had no visual effect.
1135
1136         * UserInterface/Models/Recording.js:
1137         (WI.Recording):
1138
1139         * UserInterface/Views/RecordingActionTreeElement.js:
1140         (WI.RecordingActionTreeElement):
1141         (WI.RecordingActionTreeElement.prototype._handleValidityChanged):
1142         (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged):
1143         * UserInterface/Views/RecordingActionTreeElement.css:
1144         (.item.action.visual.no-visible-effect:not(.invalid) > .status > .warning):
1145
1146         * UserInterface/Views/RecordingContentView.js:
1147         (WI.RecordingContentView):
1148         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
1149         (WI.RecordingContentView.prototype._applyAction): Deleted.
1150
1151 2017-10-15  Nikita Vasilyev  <nvasilyev@apple.com>
1152
1153         Web Inspector: [PARITY] Styles Redesign: clicking on the go-to arrow in Computed tab should work
1154         https://bugs.webkit.org/show_bug.cgi?id=178286
1155         <rdar://problem/34986379>
1156
1157         Reviewed by Joseph Pecoraro.
1158
1159         Highlight the matching property using a yellow background and focus on the property value
1160         if the property is editable (e.g., not a User Agent style).
1161
1162         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1163         (.spreadsheet-style-declaration-editor):
1164         (.spreadsheet-style-declaration-editor .property):
1165         Move left padding to the property element so there's no awkward gap on the left side
1166         when the property is highlighted.
1167
1168         (.spreadsheet-style-declaration-editor .property.highlighted):
1169         (@keyframes style-property-highlight):
1170         Use the same animation duration as we used in `.text-editor > .CodeMirror .highlighted`.
1171         The highlight color was changed from light blue to yellow.
1172
1173         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1174         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
1175         Use the same logic as in WI.CSSStyleDeclarationTextEditor.prototype.highlightProperty
1176         to find matching style property to highlight.
1177
1178         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1179         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.highlightProperty):
1180         Use the same logic as in WI.CSSStyleDeclarationSection.prototype.highlightProperty.
1181
1182         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1183         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
1184         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.nodeStylesRefreshed):
1185         Copied from WI.RulesStyleDetailsPanel.
1186
1187         * UserInterface/Views/SpreadsheetStyleProperty.js:
1188         (WI.SpreadsheetStyleProperty):
1189         (WI.SpreadsheetStyleProperty.prototype.detached):
1190         (WI.SpreadsheetStyleProperty.prototype.highlight):
1191
1192 2017-10-14  Nikita Vasilyev  <nvasilyev@apple.com>
1193
1194         REGRESSION (r223310): Web Inspector: Class list container is transparent and unreadable
1195         https://bugs.webkit.org/show_bug.cgi?id=178311
1196
1197         Reviewed by Devin Rousso.
1198
1199         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
1200         (.sidebar > .panel.details.css-style > .content ~ .class-list-container):
1201         Fix 1px hole below the class container.
1202
1203 2017-10-14  Matt Baker  <mattbaker@apple.com>
1204
1205         Web Inspector: Canvas tab: recordings should have a unique name
1206         https://bugs.webkit.org/show_bug.cgi?id=178188
1207         <rdar://problem/34943364>
1208
1209         Reviewed by Devin Rousso.
1210
1211         * Localizations/en.lproj/localizedStrings.js:
1212         New format string "Recording %d".
1213
1214         * UserInterface/Base/FileUtilities.js:
1215         (WI.loadDataFromFile):
1216         Pass chosen filename to callback.
1217
1218         * UserInterface/Controllers/CanvasManager.js:
1219         (WI.CanvasManager.prototype.recordingFinished):
1220         Create a unique name for the recording.
1221
1222         * UserInterface/Models/Recording.js:
1223         (WI.Recording):
1224         (WI.Recording.fromPayload):
1225         (WI.Recording.prototype.get displayName):
1226         (WI.Recording.prototype.createDisplayName):
1227
1228         * UserInterface/Views/RecordingContentView.js:
1229         (WI.RecordingContentView.prototype.get saveData):
1230         Use encodeURI so that special characters can be used in filenames, and
1231         to be consistent with other `saveData` implementations.
1232
1233         * UserInterface/Views/RecordingNavigationSidebarPanel.js:
1234         (WI.RecordingNavigationSidebarPanel.prototype.set recording):
1235         (WI.RecordingNavigationSidebarPanel.prototype._importNavigationItemClicked):
1236         Drive-by fix: wait until actions are resolved before updating UI.
1237
1238         * UserInterface/Views/RecordingTabContentView.js:
1239         (WI.RecordingTabContentView.prototype._navigationSidebarImport):
1240         Try to use the imported filename as the recording name. If the name
1241         collides with that of another imported recording, append a unique suffix.
1242
1243 2017-10-14  Devin Rousso  <webkit@devinrousso.com>
1244
1245         Web Inspector: provide a way to enable/disable event listeners
1246         https://bugs.webkit.org/show_bug.cgi?id=177451
1247
1248         Reviewed by Joseph Pecoraro.
1249
1250         * Localizations/en.lproj/localizedStrings.js:
1251
1252         * UserInterface/Controllers/DOMTreeManager.js:
1253         (WI.DOMTreeManager.prototype.setEventListenerDisabled):
1254
1255         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1256         (WI.DOMNodeDetailsSidebarPanel.prototype.attached):
1257         (WI.DOMNodeDetailsSidebarPanel.prototype.detached):
1258         (WI.DOMNodeDetailsSidebarPanel.prototype._eventListenersChanged):
1259         (WI.DOMNodeDetailsSidebarPanel.prototype.addEventListeners): Deleted.
1260         (WI.DOMNodeDetailsSidebarPanel.prototype.removeEventListeners): Deleted.
1261         Listen for `WI.DOMNode.Event.EventListenersChanged` on all instances of WI.DOMNode, since we
1262         will still want to refresh the event listeners section in the event that an event listener
1263         is removed from a parent node.
1264
1265         * UserInterface/Views/EventListenerSectionGroup.js:
1266         (WI.EventListenerSectionGroup):
1267         (WI.EventListenerSectionGroup.prototype._eventText):
1268         (WI.EventListenerSectionGroup.prototype._nodeTextOrLink):
1269         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement):
1270         (WI.EventListenerSectionGroup.prototype._createDisabledToggleElement.updateTitle):
1271         * UserInterface/Views/EventListenerSectionGroup.css:
1272         (.event-listener-section > .content input[type="checkbox"]):
1273
1274         * UserInterface/Views/DetailsSectionSimpleRow.js:
1275         (WI.DetailsSectionSimpleRow.prototype.get label):
1276         (WI.DetailsSectionSimpleRow.prototype.set label):
1277
1278 2017-10-13  Devin Rousso  <webkit@devinrousso.com>
1279
1280         Web Inspector: make split console full width of view
1281         https://bugs.webkit.org/show_bug.cgi?id=176635
1282
1283         Reviewed by Timothy Hatcher.
1284
1285         * UserInterface/Main.html:
1286         * UserInterface/Views/Main.css:
1287         (#main):
1288         (#content):
1289         * UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
1290         (.sidebar > .panel.details.css-style > .content ~ :matches(.options-container, .class-list-container)):
1291         (.sidebar > .panel.details.css-style > .content ~ .options-container):
1292
1293 2017-10-13  Devin Rousso  <webkit@devinrousso.com>
1294
1295         Web Inspector: fix ESLint errors
1296         https://bugs.webkit.org/show_bug.cgi?id=175065
1297
1298         Reviewed by Joseph Pecoraro.
1299
1300         Removed trailing whitespace, extra parenthesis, and some unnecessary escape characters.
1301         Added missing semicolons, spacing around default values for parameters, and changed `==` to
1302         `===` where applicable.
1303
1304         Specific changes to each file were removed for brevity.
1305
1306         * .eslintrc:
1307         Alphabetize each list of global variables and add some missing utility functions.
1308
1309         * UserInterface/Base/EventListener.js:
1310         * UserInterface/Base/EventListenerSet.js:
1311         * UserInterface/Base/Main.js:
1312         * UserInterface/Base/Setting.js:
1313         * UserInterface/Base/TextUtilities.js:
1314         * UserInterface/Base/URLUtilities.js:
1315         * UserInterface/Base/Utilities.js:
1316         * UserInterface/Base/YieldableTask.js:
1317         * UserInterface/Controllers/AppControllerBase.js:
1318         * UserInterface/Controllers/CanvasManager.js:
1319         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1320         * UserInterface/Controllers/DOMDebuggerManager.js:
1321         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
1322         * UserInterface/Controllers/RuntimeManager.js:
1323         * UserInterface/Controllers/SourceMapManager.js:
1324         * UserInterface/Debug/DebugContentView.js:
1325         * UserInterface/Debug/UncaughtExceptionReporter.js:
1326         * UserInterface/Models/CSSKeywordCompletions.js:
1327         * UserInterface/Models/DOMNode.js:
1328         * UserInterface/Models/DOMNodeStyles.js:
1329         * UserInterface/Models/KeyboardShortcut.js:
1330         * UserInterface/Models/ProfileNode.js:
1331         * UserInterface/Models/Resource.js:
1332         * UserInterface/Models/ResourceCollection.js:
1333         * UserInterface/Models/Script.js:
1334         * UserInterface/Models/ScriptSyntaxTree.js:
1335         * UserInterface/Models/ScriptTimelineRecord.js:
1336         * UserInterface/Protocol/Connection.js:
1337         * UserInterface/Test/FrontendTestHarness.js:
1338         * UserInterface/Test/TestHarness.js:
1339         * UserInterface/Views/CSSStyleDeclarationSection.js:
1340         * UserInterface/Views/ChartDetailsSectionRow.js:
1341         * UserInterface/Views/CodeMirrorAdditions.js:
1342         * UserInterface/Views/CodeMirrorFormatters.js:
1343         * UserInterface/Views/CodeMirrorRegexMode.js:
1344         * UserInterface/Views/ContentBrowserTabContentView.js:
1345         * UserInterface/Views/DataGrid.js:
1346         * UserInterface/Views/DataGridNode.js:
1347         * UserInterface/Views/FindBanner.js:
1348         * UserInterface/Views/GroupNavigationItem.js:
1349         * UserInterface/Views/HierarchicalPathNavigationItem.js:
1350         * UserInterface/Views/NetworkTableContentView.js:
1351         * UserInterface/Views/NetworkTimelineView.js:
1352         * UserInterface/Views/ObjectTreePropertyTreeElement.js:
1353         * UserInterface/Views/ObjectTreeView.js:
1354         * UserInterface/Views/RecordingContentView.js:
1355         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1356         * UserInterface/Views/ResourceCookiesContentView.js:
1357         * UserInterface/Views/ResourceDetailsSection.js:
1358         * UserInterface/Views/ResourceHeadersContentView.js:
1359         * UserInterface/Views/ResourceTimelineDataGridNode.js:
1360         * UserInterface/Views/SettingEditor.js:
1361         * UserInterface/Views/Sidebar.js:
1362         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1363         * UserInterface/Views/Table.js:
1364         * UserInterface/Views/TextEditor.js:
1365         * UserInterface/Views/TimelineDataGridNode.js:
1366         * UserInterface/Views/TreeElement.js:
1367         * UserInterface/Views/TreeOutline.js:
1368         * UserInterface/Views/WebSocketDataGridNode.js:
1369         * UserInterface/Workers/Formatter/EsprimaFormatter.js:
1370         * UserInterface/Workers/Formatter/FormatterWorker.js:
1371
1372 2017-10-13  Nikita Vasilyev  <nvasilyev@apple.com>
1373
1374         Web Inspector: Styles Redesign: hook up autocompletion to property names and values
1375         https://bugs.webkit.org/show_bug.cgi?id=177313
1376         <rdar://problem/34577057>
1377
1378         Reviewed by Joseph Pecoraro.
1379
1380         - Arrow Right accept the current completion item and places the text caret after it.
1381         - Arrow Left hides the completion popover.
1382         - Arrow Up selects the previous completion item.
1383         - Arrow Down selects the next completion item.
1384         - Enter and Tab accept the current completion item and navigate to the next focusable item.
1385         - Escape hides the completion popover, if there is one.
1386
1387         * UserInterface/Views/CompletionSuggestionsView.js:
1388         (WI.CompletionSuggestionsView):
1389         (WI.CompletionSuggestionsView.prototype._mouseDown):
1390         Add a preventBlur option so clicking on an completion item doesn't change the focus and
1391         doesn't cause "blur" event on the target text field.
1392
1393         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1394         (.spreadsheet-style-declaration-editor .completion-hint):
1395         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1396         (WI.SpreadsheetCSSStyleDeclarationEditor):
1397         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1398         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
1399         Call detached on every SpreadsheetTextField to hide CompletionSuggestionsView once
1400         SpreadsheetCSSStyleDeclarationEditor is removed from the DOM.
1401
1402         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty):
1403         Remove index argument since it is no longer used.
1404
1405         * UserInterface/Views/SpreadsheetStyleProperty.js:
1406         (WI.SpreadsheetStyleProperty):
1407         (WI.SpreadsheetStyleProperty.prototype.detached):
1408         (WI.SpreadsheetStyleProperty.prototype._remove):
1409         (WI.SpreadsheetStyleProperty.prototype._update):
1410         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1411         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1412         Add an extra parameter to SpreadsheetTextField to pass a completion data provider.
1413
1414         * UserInterface/Views/SpreadsheetTextField.js:
1415         (WI.SpreadsheetTextField):
1416         (WI.SpreadsheetTextField.prototype.get suggestionHint):
1417         (WI.SpreadsheetTextField.prototype.set suggestionHint):
1418         (WI.SpreadsheetTextField.prototype.startEditing):
1419         (WI.SpreadsheetTextField.prototype.stopEditing):
1420         (WI.SpreadsheetTextField.prototype.detached):
1421         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1422         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1423         (WI.SpreadsheetTextField.prototype._getPrefix):
1424         (WI.SpreadsheetTextField.prototype._handleBlur):
1425         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1426         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1427         (WI.SpreadsheetTextField.prototype._handleInput):
1428         (WI.SpreadsheetTextField.prototype._updateCompletions):
1429         (WI.SpreadsheetTextField.prototype._getCaretRect):
1430         (WI.SpreadsheetTextField.prototype._getCompletionPrefix):
1431         (WI.SpreadsheetTextField.prototype._applyCompletionHint):
1432         (WI.SpreadsheetTextField.prototype._hideCompletions):
1433         Provide text completion based on the existing CompletionSuggestionsView when completionProvider is passed to SpreadsheetTextField.
1434
1435 2017-10-12  Joseph Pecoraro  <pecoraro@apple.com>
1436
1437         Web Inspector: Switch Clear navigation item back to the Trash icon (Console, Timelines, Network)
1438         https://bugs.webkit.org/show_bug.cgi?id=178244
1439         <rdar://problem/34966525>
1440
1441         Reviewed by Brian Burg.
1442
1443         * UserInterface/Images/NavigationItemClear.svg: Removed.
1444         * UserInterface/Images/gtk/NavigationItemClear.svg: Removed.
1445         * UserInterface/Views/LogContentView.js:
1446         (WI.LogContentView):
1447         * UserInterface/Views/NetworkGridContentView.js:
1448         (WI.NetworkGridContentView):
1449         * UserInterface/Views/NetworkTableContentView.js:
1450         (WI.NetworkTableContentView):
1451         * UserInterface/Views/TimelineRecordingContentView.js:
1452         (WI.TimelineRecordingContentView):
1453         Many users found the new Clear icon confusing. Revert to the Trash icon.
1454
1455 2017-10-11  Ross Kirsling  <ross.kirsling@sony.com>
1456
1457         Web Inspector: Make 3D objects selectable in Layers visualization
1458         https://bugs.webkit.org/show_bug.cgi?id=178136
1459
1460         Reviewed by Devin Rousso.
1461
1462         * UserInterface/Views/Layers3DContentView.js:
1463         (WI.Layers3DContentView):
1464         (WI.Layers3DContentView.prototype.initialLayout):
1465         (WI.Layers3DContentView.prototype._canvasMouseDown):
1466         (WI.Layers3DContentView.prototype._updateLayerGroupSelection):
1467         Implement selection of 3D layer objects.
1468         
1469         (WI.Layers3DContentView.prototype._addLayerGroup): Renamed from _addLayer.
1470         (WI.Layers3DContentView.prototype._updateLayerGroupPosition):
1471         (WI.Layers3DContentView.prototype._createLayerMesh):
1472         Refactor -- one group per layer (visible plane and composited outline), not groups by shape.
1473
1474         (WI.Layers3DContentView.prototype.layout):
1475         (WI.Layers3DContentView.prototype._updateLayers):
1476         (WI.Layers3DContentView.prototype._clearLayers): Deleted.
1477         Don't destroy all 3D objects on every LayerTreeDidChange; make use of layerTreeMutations.
1478         (Not only a performance improvement, but also necessary to properly preserve highlighting.) 
1479         
1480         (WI.Layers3DContentView.prototype.selectLayerById):
1481         Allow selection to be updated from the outside.
1482
1483         * UserInterface/Views/LayerDetailsSidebarPanel.js:
1484         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
1485         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
1486         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
1487         Allow selection to be updated from the outside.
1488
1489         (WI.LayerDetailsSidebarPanel.prototype.inspect):
1490         (WI.LayerDetailsSidebarPanel.prototype._updateLayers): Renamed from _updateDisplayWithLayers.
1491         (WI.LayerDetailsSidebarPanel.prototype._updateDataGrid):
1492         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
1493         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover):
1494         (WI.LayerDetailsSidebarPanel.prototype._dataGridNodeForLayer): Deleted.
1495         Cleanup.
1496         
1497         * UserInterface/Views/LayersTabContentView.js:
1498         (WI.LayersTabContentView):
1499         (WI.LayersTabContentView.prototype._detailsSidebarSelectedLayerChanged):
1500         (WI.LayersTabContentView.prototype._contentViewSelectedLayerChanged):
1501         Orchestrate communication of selection state between visualization and sidebar.
1502
1503 2017-10-11  Joseph Pecoraro  <pecoraro@apple.com>
1504
1505         Web Inspector: Avoid "100.00ms" vs "100.0ms" jitter in TimelineRuler labels
1506         https://bugs.webkit.org/show_bug.cgi?id=178143
1507
1508         Reviewed by Brian Burg.
1509
1510         * UserInterface/Base/Utilities.js:
1511         Allow a small slop factor that wouldn't have changed the display value's
1512         significant figures anyways. This addresses cases where 100.0000000000001
1513         were being treated slightly differently from 100.0.
1514
1515 2017-10-11  Joseph Pecoraro  <pecoraro@apple.com>
1516
1517         Web Inspector: Network Tab - Show initially loaded resources even if network info not logged
1518         https://bugs.webkit.org/show_bug.cgi?id=178098
1519         <rdar://problem/34073529>
1520
1521         Reviewed by Devin Rousso.
1522
1523         * UserInterface/Models/Resource.js:
1524         (WI.Resource.prototype.hasResponse):
1525         Resources loaded by Page.getFrameTree have a response but no status code data.
1526         So include finished resources as having a resource.
1527
1528         * UserInterface/Views/NetworkTableContentView.js:
1529         (WI.NetworkTableContentView):
1530         (WI.NetworkTableContentView.prototype.closed):
1531         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
1532         (WI.NetworkTableContentView.prototype._mainFrameDidChange):
1533         Listen for the first main frame change to perform an initial population.
1534
1535         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
1536         This path is not currently taken when table is null, but change the code so
1537         that if it is reached without the table it would behave gracefully.
1538
1539         * UserInterface/Views/ResourceHeadersContentView.js:
1540         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
1541         On first open none of the resources have a statusCode. Show an emDash.
1542
1543 2017-10-10  Brian Burg  <bburg@apple.com>
1544
1545         Web Inspector: Quick Open: source mapped files are not shown as search results
1546         https://bugs.webkit.org/show_bug.cgi?id=178151
1547         <rdar://problem/31561718>
1548
1549         Reviewed by Joseph Pecoraro.
1550
1551         * UserInterface/Views/OpenResourceDialog.js:
1552         (WI.OpenResourceDialog.prototype._addResource):
1553         Also consider matching the query string against SourceMapResources
1554         attached to a resource's source maps.
1555
1556 2017-10-10  Joseph Pecoraro  <pecoraro@apple.com>
1557
1558         Web Inspector: Network Tab - Set column initial widths to try allow waterfall column to expand more by default
1559         https://bugs.webkit.org/show_bug.cgi?id=178142
1560         <rdar://problem/34918233>
1561
1562         Reviewed by Brian Burg.
1563
1564         * UserInterface/Views/NetworkTableContentView.js:
1565         (WI.NetworkTableContentView.prototype.initialLayout):
1566         Provide initial widths for many columns where the max could fit
1567         but we'd prefer a smaller than max initial width in wide cases.
1568
1569         * UserInterface/Views/Table.js:
1570         (WI.Table.prototype._resizeColumnsAndFiller):
1571         When auto sizing all columns use the preferred initial widths.
1572
1573         * UserInterface/Views/TableColumn.js:
1574         (WI.TableColumn.prototype.get preferredInitialWidth):
1575         Save the initial width.
1576
1577 2017-10-10  Ross Kirsling  <ross.kirsling@sony.com>
1578
1579         Web Inspector: Views should explicitly remove event listeners from managers/Frame
1580         https://bugs.webkit.org/show_bug.cgi?id=175951
1581
1582         Reviewed by Brian Burg.
1583
1584         * UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
1585         (WI.ApplicationCacheDetailsSidebarPanel.prototype.closed):
1586         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1587         (WI.DOMNodeDetailsSidebarPanel.prototype.closed):
1588         * UserInterface/Views/DebuggerDashboardView.js:
1589         (WI.DebuggerDashboardView.prototype.closed):
1590         * UserInterface/Views/LogContentView.js:
1591         (WI.LogContentView.prototype.closed):
1592         * UserInterface/Views/NetworkGridContentView.js:
1593         (WI.NetworkGridContentView.prototype.closed):
1594         * UserInterface/Views/ProbeDetailsSidebarPanel.js:
1595         (WI.ProbeDetailsSidebarPanel.prototype.closed):
1596         * UserInterface/Views/QuickConsole.js:
1597         (WI.QuickConsole.prototype.closed):
1598         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1599         (WI.ScopeChainDetailsSidebarPanel.prototype.closed):
1600         * UserInterface/Views/TimelineOverview.js:
1601         (WI.TimelineOverview.prototype.closed):
1602
1603 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1604
1605         Web Inspector: Network Tab - Include remote address in the Headers view
1606         https://bugs.webkit.org/show_bug.cgi?id=178094
1607         <rdar://problem/34895221>
1608
1609         Reviewed by Devin Rousso.
1610
1611         * Localizations/en.lproj/localizedStrings.js:
1612         * UserInterface/Views/ResourceHeadersContentView.js:
1613         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
1614         (WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):
1615
1616 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1617
1618         Unreviewed, minified WebInspector opens blank.
1619         <rdar://problem/34892307>
1620
1621         * UserInterface/Views/ResourceHeadersContentView.js:
1622         (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
1623         Regression introduced in r223006. The minified build has a SyntaxError
1624         causing WebInspector top open blank. Add the missing semicolon.
1625
1626 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1627
1628         Web Inspector: Network Tab - Filter resources based on URL / Text Content
1629         https://bugs.webkit.org/show_bug.cgi?id=178071
1630         <rdar://problem/34071562>
1631
1632         Reviewed by Brian Burg.
1633
1634         * Localizations/en.lproj/localizedStrings.js:
1635         New strings.
1636
1637         * UserInterface/Views/FilterBar.css:
1638         (.filter-bar.active > input[type="search"]::-webkit-search-decoration):
1639         (.filter-bar.indicating-progress > input[type="search"]::-webkit-search-decoration):
1640         New icon for progress / active states.
1641
1642         * UserInterface/Views/FilterBar.js:
1643         (WI.FilterBar.prototype.get inputField):
1644         (WI.FilterBar.prototype.get placeholder):
1645         (WI.FilterBar.prototype.set placeholder):
1646         (WI.FilterBar.prototype.get incremental):
1647         (WI.FilterBar.prototype.set incremental):
1648         (WI.FilterBar.prototype.get indicatingProgress):
1649         (WI.FilterBar.prototype.set indicatingProgress):
1650         (WI.FilterBar.prototype.get indicatingActive):
1651         (WI.FilterBar.prototype.set indicatingActive):
1652         (WI.FilterBar.prototype._handleFilterInputEvent):
1653         When incremental is set to false on the FilterBar still dispatch an
1654         event when the textfield clears.
1655
1656         * UserInterface/Images/FilterFieldActiveGlyph.svg: Added.
1657         * UserInterface/Images/gtk/FilterFieldActiveGlyph.svg: Added.
1658         New blue icon for active state.
1659
1660         * UserInterface/Controllers/FrameResourceManager.js:
1661         (WI.FrameResourceManager.prototype.resourceForIdentifier):
1662         Accessor for arbitrary resource.
1663
1664         * UserInterface/Views/NetworkTableContentView.css:
1665         (.content-view.network .navigation-bar .filter-bar):
1666         (.content-view.network .warning-banner):
1667         (body[dir=ltr] .content-view.network .warning-banner):
1668         (body[dir=rtl] .content-view.network .warning-banner):
1669         (.content-view.network .warning-banner > a):
1670         Warning banner when the filter produces no results. This matches the
1671         warning in the Debugger tab when breakpoints are disabled.
1672
1673         * UserInterface/Views/ScopeBar.js:
1674         (WI.ScopeBar.prototype.resetToDefault):
1675         Provide a way to easily reset a scope bar to the default item.
1676
1677         * UserInterface/Views/RadioButtonNavigationItem.css:
1678         (.navigation-bar .item.radio.button.text-only:active):
1679         * UserInterface/Views/ScopeBar.css:
1680         (.scope-bar > li:active):
1681         Cleanup some styles that should be using a variable.
1682
1683         * UserInterface/Views/NetworkTableContentView.js:
1684         (WI.NetworkTableContentView):
1685         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
1686         (WI.NetworkTableContentView.prototype.layout):
1687         (WI.NetworkTableContentView.prototype._processPendingEntries):
1688         (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFinishedResource):
1689         (WI.NetworkTableContentView.prototype._checkTextFilterAgainstFailedResource):
1690         (WI.NetworkTableContentView.prototype._updateTextFilterActiveIndicator):
1691         (WI.NetworkTableContentView.prototype._updateEmptyFilterResultsWarning):
1692         (WI.NetworkTableContentView.prototype._showEmptyFilterResultsWarning):
1693         (WI.NetworkTableContentView.prototype._hideEmptyFilterResultsWarning):
1694         (WI.NetworkTableContentView.prototype._positionEmptyFilterMessage):
1695         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
1696         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
1697         (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
1698         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
1699         (WI.NetworkTableContentView.prototype._hasTypeFilter):
1700         (WI.NetworkTableContentView.prototype._hasTextFilter):
1701         (WI.NetworkTableContentView.prototype._hasActiveFilter):
1702         (WI.NetworkTableContentView.prototype._passTypeFilter):
1703         (WI.NetworkTableContentView.prototype._passTextFilter):
1704         (WI.NetworkTableContentView.prototype._passFilter):
1705         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
1706         (WI.NetworkTableContentView.prototype._resetFilters):
1707         (WI.NetworkTableContentView.prototype._textFilterDidChange):
1708         (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
1709         There are now two filters.
1710
1711           - FilterBar - Filters URL and Full Text Content
1712           - ScopeBar  - Filters Resource Type
1713
1714         The text content filter is asynchronous. We reuse the existing Search
1715         functionality when filtering on text. We need to defer text content
1716         filtering until the resource finishes loading.
1717
1718 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1719
1720         Web Inspector: Network Tab: Row wrapping (waterfall displaying behind next row's name)
1721         https://bugs.webkit.org/show_bug.cgi?id=178015
1722         <rdar://problem/34858720>
1723
1724         Reviewed by Brian Burg.
1725
1726         * UserInterface/Views/Table.css:
1727         (.table > .header):
1728         (.table > .data-container > .data-list > li):
1729         Disallow wrapping.
1730
1731 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1732
1733         Web Inspector: Network Tab - Cookies Detail View
1734         https://bugs.webkit.org/show_bug.cgi?id=177988
1735         <rdar://problem/34071927>
1736
1737         Reviewed by Brian Burg.
1738
1739         * Localizations/en.lproj/localizedStrings.js:
1740         * UserInterface/Main.html:
1741         * UserInterface/Test.html:
1742         New strings and resources.
1743
1744         * UserInterface/Models/Cookie.js: Added.
1745         (WI.Cookie):
1746         (WI.Cookie.parseCookieRequestHeader):
1747         (WI.Cookie.parseSetCookieResponseHeader):
1748         Encapsulation for Cookie attributes.
1749
1750         * UserInterface/Models/Resource.js:
1751         (WI.Resource.prototype.get requestCookies):
1752         (WI.Resource.prototype.get responseCookies):
1753         (WI.Resource.prototype.updateForRedirectResponse):
1754         (WI.Resource.prototype.updateForResponse):
1755         (WI.Resource.prototype.updateWithMetrics):
1756         New computed accessors for requestCookies and responseCookies.
1757
1758         * UserInterface/Views/NetworkResourceDetailView.js:
1759         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
1760         Show the new Cookie View.
1761
1762         * UserInterface/Views/NetworkTableContentView.css:
1763         (.content-view.network .network-table .icon):
1764         (.network-table li:not(.filler) .cell.name):
1765         (.network-table .cache-type):
1766         (.network-table .error):
1767         (body[dir=ltr] .network-table .cell.name > .status):
1768         (body[dir=rtl] .network-table .cell.name > .status):
1769         (.network-table .cell.name > .status .indeterminate-progress-spinner):
1770         (.showing-detail .network-table .cell:not(.name)):
1771         (.showing-detail .network-table .resizer:not(:first-of-type)):
1772         (.network-table :not(.header) .cell:first-of-type):
1773         Rework these styles to be specific to the .network-table.
1774
1775         * UserInterface/Views/Table.css:
1776         (.table :not(.header) .cell:first-of-type): Deleted.
1777         Move this to the network table styles, it shouldn't apply to all tables. 
1778
1779         * UserInterface/Views/ResourceCookiesContentView.css:
1780         (.resource-cookies > section > .details.has-table):
1781         (.resource-cookies .table):
1782         (.resource-cookies .table > .header):
1783         Styles for Cookies view and table.
1784
1785         * UserInterface/Views/ResourceCookiesContentView.js: Added.
1786         (WI.ResourceCookiesContentView):
1787         (WI.ResourceCookiesContentView.prototype.tableNumberOfRows):
1788         (WI.ResourceCookiesContentView.prototype.tableSortChanged):
1789         (WI.ResourceCookiesContentView.prototype.tablePopulateCell):
1790         (WI.ResourceCookiesContentView.prototype.initialLayout):
1791         (WI.ResourceCookiesContentView.prototype._incompleteSectionWithMessage):
1792         (WI.ResourceCookiesContentView.prototype._incompleteSectionWithLoadingIndicator):
1793         (WI.ResourceCookiesContentView.prototype._dataSourceForTable):
1794         (WI.ResourceCookiesContentView.prototype._generateSortComparator):
1795         (WI.ResourceCookiesContentView.prototype._refreshRequestCookiesSection):
1796         (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
1797         (WI.ResourceCookiesContentView.prototype._sizeForTable):
1798         (WI.ResourceCookiesContentView.prototype._resourceRequestHeadersDidChange):
1799         (WI.ResourceCookiesContentView.prototype._resourceResponseReceived):
1800         Tables for Request and Response cookies. They are simliar with slightly different columns.
1801         Handle simple display and sorting for the tables.
1802
1803         * UserInterface/Views/ResourceHeadersContentView.js:
1804         (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
1805         Break out Set-Cookie headers as multiple headers. THey should never be combined.
1806
1807         * UserInterface/Views/Table.js:
1808         (WI.Table.prototype.showColumn):
1809         (WI.Table.prototype.hideColumn):
1810         (WI.Table.prototype._handleHeaderContextMenu):
1811         * UserInterface/Views/TableColumn.js:
1812         (WI.TableColumn.prototype.get hideable):
1813         (WI.TableColumn.prototype.set hidden):
1814         (WI.TableColumn):
1815         (WI.TableColumn.prototype.setHidden): Deleted.
1816         Make it so some columns can not be hidden. For example the "value" column
1817         in the Cookie tables.
1818
1819 2017-10-09  Joseph Pecoraro  <pecoraro@apple.com>
1820
1821         Web Inspector: Network Tab - Search Headers Detail View
1822         https://bugs.webkit.org/show_bug.cgi?id=177981
1823
1824         Reviewed by Brian Burg.
1825
1826         * UserInterface/Base/Main.js:
1827         * UserInterface/Views/LogContentView.js:
1828         (WI.LogContentView.prototype.performSearch):
1829         Rename "Dom" to "DOM" in utility function.
1830
1831         * UserInterface/Views/ResourceHeadersContentView.css:
1832         (.resource-headers.showing-find-banner .search-highlight):
1833         Search highlight styles.
1834
1835         * UserInterface/Views/ResourceHeadersContentView.js:
1836         (WI.ResourceHeadersContentView.prototype.get supportsSearch):
1837         (WI.ResourceHeadersContentView.prototype.get numberOfSearchResults):
1838         (WI.ResourceHeadersContentView.prototype.get hasPerformedSearch):
1839         (WI.ResourceHeadersContentView.prototype.set automaticallyRevealFirstSearchResult):
1840         (WI.ResourceHeadersContentView.prototype.performSearch):
1841         (WI.ResourceHeadersContentView.prototype.searchCleared):
1842         (WI.ResourceHeadersContentView.prototype.revealPreviousSearchResult):
1843         (WI.ResourceHeadersContentView.prototype.revealNextSearchResult):
1844         (WI.ResourceHeadersContentView.prototype._perfomSearchOnKeyValuePairs):
1845         (WI.ResourceHeadersContentView.prototype._revealSearchResult):
1846         Implement ContentView search behavior.
1847
1848 2017-10-08  Devin Rousso  <webkit@devinrousso.com>
1849
1850         Web Inspector: add autocompletion for min/max within a CSS calc
1851         https://bugs.webkit.org/show_bug.cgi?id=178068
1852
1853         Reviewed by Joseph Pecoraro.
1854
1855         * UserInterface/Models/CSSKeywordCompletions.js:
1856         (WI.CSSKeywordCompletions.forFunction):
1857
1858 2017-10-06  Matt Baker  <mattbaker@apple.com>
1859
1860         Web Inspector: Add Canvas tab and CanvasOverviewContentView
1861         https://bugs.webkit.org/show_bug.cgi?id=177604
1862         <rdar://problem/34714650>
1863
1864         Reviewed by Devin Rousso.
1865
1866         This patch adds experimental feature support for the Canvas tab. Initially
1867         the tab provides only an overview of the canvases in the page, and will
1868         exist side-by-side with the existing experimental Canvas UI.
1869
1870         * Localizations/en.lproj/localizedStrings.js:
1871         * UserInterface/Base/Main.js:
1872         (WI.contentLoaded):
1873         * UserInterface/Base/Setting.js:
1874
1875         * UserInterface/Images/Canvas.svg: Added.
1876         * UserInterface/Images/CanvasOverview.svg: Added.
1877         * UserInterface/Main.html:
1878         Add new art and canvas UI classes.
1879
1880         * UserInterface/Models/Canvas.js:
1881         (WI.Canvas.requestNode):
1882         (WI.Canvas.prototype.requestContent):
1883         (WI.Canvas.prototype.requestCSSCanvasClientNodes):
1884         (WI.Canvas.prototype.requestSize.calculateSize.getAttributeValue):
1885         (WI.Canvas.prototype.requestSize.calculateSize):
1886         (WI.Canvas.prototype.requestSize.getPropertyValue):
1887         (WI.Canvas.prototype.requestSize):
1888         Use promises to retrieve canvas data asynchronously.
1889
1890         * UserInterface/Models/CollectionTypes.js: Added.
1891         (WI.CanvasCollection):
1892         New location for concrete collection types. Having a class to type check
1893         makes using a collection as a represented object a bit simpler.
1894
1895         * UserInterface/Views/CanvasContentView.css:
1896         (.content-view.canvas:not(.tab)):
1897         (.content-view.canvas:not(.tab) > .preview):
1898         (.content-view.canvas:not(.tab) > .preview > img):
1899         (.content-view.canvas:not(.tab) > :matches(header, footer)):
1900         (.content-view.canvas): Deleted.
1901         (.content-view.canvas > .preview): Deleted.
1902         (.content-view.canvas > .preview > img): Deleted.
1903         During the transition to the new Canvas tab, CanvasContentView needs to
1904         support being shown as a full-size content view, and as an item in a
1905         CollectionContentView. Hide header and footer elements by default.
1906
1907         * UserInterface/Views/CanvasContentView.js:
1908         (WI.CanvasContentView):
1909         (WI.CanvasContentView.prototype.refresh):
1910         (WI.CanvasContentView.prototype.initialLayout):
1911         (WI.CanvasContentView.prototype.layout):
1912         (WI.CanvasContentView.prototype.shown):
1913         (WI.CanvasContentView.prototype.attached):
1914         (WI.CanvasContentView.prototype.detached):
1915         (WI.CanvasContentView.prototype._showError):
1916         (WI.CanvasContentView.prototype._refreshPixelSize):
1917         (WI.CanvasContentView.prototype._showGridButtonClicked):
1918         (WI.CanvasContentView.prototype._updateImageGrid):
1919         (WI.CanvasContentView.prototype._updateMemoryCost):
1920         (WI.CanvasContentView.prototype._updatePixelSize):
1921         (WI.CanvasContentView.prototype._updateRecordNavigationItem):
1922         (WI.CanvasContentView.prototype.hidden): Deleted.
1923         (WI.CanvasContentView.prototype.closed): Deleted.
1924         (WI.CanvasContentView.prototype._showPreview): Deleted.
1925         Added new UI for display in the Canvas overview. These elements are always
1926         created, but only appear when the canvas is viewed as a "card".
1927
1928         Canvas previews are no longer shown as soon as they are available from
1929         the backend. Instead, once the canvas content is ready a layout is scheduled.
1930         This guarantees that refreshing all canvases at once causes no flicker,
1931         and introduces no perceptible delay.
1932
1933         Finally, the "Cancel recording" tooltip has been renamed "Stop recording",
1934         to match the behavior of the command.
1935
1936         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
1937         (WI.CanvasDetailsSidebarPanel.prototype._refreshSourceSection.this._canvas.requestNode.): Deleted.
1938         Canvas.prototype.requestNode now returns a promise.
1939
1940         * UserInterface/Views/CanvasOverviewContentView.css: Added.
1941         (.content-view.canvas-overview):
1942         (.content-view.canvas-overview .content-view.canvas):
1943         (.content-view.canvas-overview .content-view.canvas.selected:not(.is-recording)):
1944         (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
1945         (.content-view.canvas-overview .content-view.canvas > header):
1946         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
1947         (.content-view.canvas-overview .content-view.canvas > header > .titles,):
1948         (.content-view.canvas-overview .content-view.canvas > header > .titles > .title):
1949         (.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,):
1950         (.content-view.canvas-overview .content-view.canvas > header .subtitle::before):
1951         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .title):
1952         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle):
1953         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .navigation-bar > .item):
1954         (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
1955         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording) > header > .navigation-bar):
1956         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop.disabled):
1957         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop):
1958         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):hover):
1959         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop:not(.disabled):active):
1960         (.content-view.canvas-overview .content-view.canvas > .preview):
1961         (.content-view.canvas-overview .content-view.canvas > .preview > img):
1962         (.content-view.canvas-overview .content-view.canvas > .preview > .message-text-view):
1963         (.content-view.canvas-overview .content-view.canvas > footer):
1964         (.content-view.canvas-overview .content-view.canvas > footer .memory-cost):
1965         Add header, navigation bar, and footer styles to CanvasContentView when
1966         it is being shown as an item in a CollectionContentView.
1967
1968         * UserInterface/Views/CanvasOverviewContentView.js: Added.
1969         (WI.CanvasOverviewContentView):
1970         (WI.CanvasOverviewContentView.prototype.get navigationItems):
1971         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents):
1972         (WI.CanvasOverviewContentView.prototype.hidden):
1973         (WI.CanvasOverviewContentView.prototype.contentViewAdded):
1974         (WI.CanvasOverviewContentView.prototype.contentViewRemoved):
1975         (WI.CanvasOverviewContentView.prototype.attached):
1976         (WI.CanvasOverviewContentView.prototype.detached):
1977         (WI.CanvasOverviewContentView.prototype._refreshPreviews):
1978         (WI.CanvasOverviewContentView.prototype._selectedPathComponentChanged):
1979         (WI.CanvasOverviewContentView.prototype._showGridButtonClicked):
1980         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange.createCanvasPathComponent):
1981         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange):
1982         (WI.CanvasOverviewContentView.prototype._updateNavigationItems):
1983         (WI.CanvasOverviewContentView.prototype._updateShowImageGrid):
1984         (WI.CanvasOverviewContentView.prototype._contentViewMouseEnter):
1985         (WI.CanvasOverviewContentView.prototype._contentViewMouseLeave):
1986         The overview extends CollectionContentView, adding buttons for global canvas actions
1987         (refresh all and show/hide grid for all), and maintains a non-visible
1988         outline of CanvasTreeElements to facilitate display of the hierarchical
1989         path in the navigation bar.
1990
1991         * UserInterface/Views/CanvasTabContentView.css: Added.
1992         (.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon):
1993         (.content-view.tab.canvas .navigation-bar > .item > .canvas-overview > .icon):
1994         (.content-view.tab.canvas .navigation-bar > .item .canvas .icon):
1995
1996         * UserInterface/Views/CanvasTabContentView.js: Added.
1997         (WI.CanvasTabContentView):
1998         (WI.CanvasTabContentView.tabInfo):
1999         (WI.CanvasTabContentView.isTabAllowed):
2000         (WI.CanvasTabContentView.prototype.get type):
2001         (WI.CanvasTabContentView.prototype.get supportsSplitContentBrowser):
2002         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
2003         (WI.CanvasTabContentView.prototype.shown):
2004         (WI.CanvasTabContentView.prototype.treeElementForRepresentedObject):
2005         (WI.CanvasTabContentView.prototype.restoreFromCookie):
2006         (WI.CanvasTabContentView.prototype.saveStateToCookie):
2007         (WI.CanvasTabContentView.prototype.attached):
2008         (WI.CanvasTabContentView.prototype.detached):
2009         (WI.CanvasTabContentView.prototype._canvasAdded):
2010         (WI.CanvasTabContentView.prototype._canvasRemoved):
2011         (WI.CanvasTabContentView.prototype._overviewPathComponentClicked):
2012         (WI.CanvasTabContentView.prototype._mainResourceDidChange):
2013
2014         * UserInterface/Views/CollectionContentView.js:
2015         (WI.CollectionContentView):
2016         (WI.CollectionContentView.prototype.setSelectedItem):
2017         (WI.CollectionContentView.prototype.addContentViewForItem):
2018         (WI.CollectionContentView.prototype.removeContentViewForItem):
2019         (WI.CollectionContentView.prototype.initialLayout):
2020         (WI.CollectionContentView.prototype._showContentPlaceholder):
2021         (WI.CollectionContentView.prototype._hideContentPlaceholder):
2022         Placeholder content should be created lazily, and shown after a slight delay
2023         to give represented objects a chance to load. Make sure to call the
2024         shown or hidden method after adding or removing a content view.
2025
2026         * UserInterface/Views/SettingsTabContentView.js:
2027         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2028
2029         * UserInterface/Views/Variables.css:
2030         (:root):
2031         (body.window-inactive *):
2032
2033         * UserInterface/Views/View.js:
2034         (WI.View.fromElement):
2035
2036 2017-10-06  Joseph Pecoraro  <pecoraro@apple.com>
2037
2038         Web Inspector: Network Tab - Headers Detail View
2039         https://bugs.webkit.org/show_bug.cgi?id=177896
2040         <rdar://problem/34071924>
2041
2042         Reviewed by Devin Rousso.
2043
2044         * Localizations/en.lproj/localizedStrings.js:
2045         * UserInterface/Main.html:
2046         New resources and strings.
2047
2048         * UserInterface/Base/URLUtilities.js:
2049         (parseURL):
2050         (WI.h2Authority):
2051         (WI.h2Path):
2052         Utility methods to get the :authority and :path pseudo-headers from a URL.
2053         This required adding user info (user:pass@) support to URL parsing.
2054
2055         * UserInterface/Views/NetworkTabContentView.js:
2056         (WI.NetworkTabContentView):
2057         * UserInterface/Views/NetworkTableContentView.js:
2058         (WI.NetworkTableContentView.prototype.get navigationItems):
2059         (WI.NetworkTableContentView.prototype.get filterNavigationItems):
2060         Move the NetworkTab's filter controls to the left. Since these are not
2061         dynamic just vend them from the TableContentView and place them in the
2062         navigation bar.
2063
2064         * UserInterface/Models/Resource.js:
2065         (WI.Resource.prototype.updateWithMetrics):
2066         New event whenever metrics change. This is the first event that will allow
2067         a client to react to a resource.protocol change.
2068
2069         * UserInterface/Views/NetworkResourceDetailView.css:
2070         (.content-view.resource-details):
2071         Base styles for the sub detail views.
2072
2073         * UserInterface/Views/NetworkResourceDetailView.js:
2074         (WI.NetworkResourceDetailView):
2075         (WI.NetworkResourceDetailView.prototype.headersContentViewGoToRequestData):
2076         (WI.NetworkResourceDetailView.prototype.initialLayout):
2077         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
2078         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
2079         Create a Header view and provide a way to switch to a particular view. This wil
2080         be useful to jump from the Header's Request Data directly to the Preview's
2081         Request ContentView.
2082
2083         * UserInterface/Views/ResourceDetailsSection.css:
2084         (.resource-details > section):
2085         (.resource-details > section > .title):
2086         (.resource-details > section > .details):
2087         (.resource-details > section > .details > p):
2088         (.resource-details > section.incomplete > .details):
2089         * UserInterface/Views/ResourceDetailsSection.js:
2090         (WI.ResourceDetailsSection):
2091         (WI.ResourceDetailsSection.prototype.get element):
2092         (WI.ResourceDetailsSection.prototype.get titleElement):
2093         (WI.ResourceDetailsSection.prototype.get detailsElement):
2094         (WI.ResourceDetailsSection.prototype.toggleIncomplete):
2095         (WI.ResourceDetailsSection.prototype.toggleError):
2096         Simple sections with a title and details div with a border.
2097         It may be common to have an incomplete load / error so this
2098         provides some APIs and styles for sections marked incomplete
2099         or with errors.
2100
2101         * UserInterface/Views/ResourceHeadersContentView.css:
2102         (.resource-headers > section > .details):
2103         (.resource-headers > section.headers > .details):
2104         (.resource-headers > section.error > .details):
2105         (.resource-headers > section.error .key):
2106         Style the left border different colors for different sections or cases.
2107
2108         (.resource-headers .details):
2109         (.resource-headers .details .pair):
2110         (.resource-headers .details .key):
2111         (.resource-headers .value):
2112         (.resource-headers .header > .key):
2113         (.resource-headers .h1-status > .key):
2114         (.resource-headers .h2-pseudo-header > .key):
2115         Wrapped text for key/value pairs and different colors for different
2116         sections or cases.
2117
2118         (.resource-headers .go-to-arrow):
2119         Go-to arrow styles for a request data section.
2120
2121         * UserInterface/Views/ResourceHeadersContentView.js: Added.
2122         (WI.ResourceHeadersContentView):
2123         (WI.ResourceHeadersContentView.prototype.initialLayout):
2124         (WI.ResourceHeadersContentView.prototype.layout):
2125         (WI.ResourceHeadersContentView.prototype._incompleteSectionWithMessage):
2126         (WI.ResourceHeadersContentView.prototype._incompleteSectionWithLoadingIndicator):
2127         (WI.ResourceHeadersContentView.prototype._appendKeyValuePair):
2128         (WI.ResourceHeadersContentView.prototype._responseSourceDisplayString):
2129         (WI.ResourceHeadersContentView.prototype._refreshSummarySection):
2130         (WI.ResourceHeadersContentView.prototype._refreshRequestHeadersSection):
2131         (WI.ResourceHeadersContentView.prototype._refreshResponseHeadersSection):
2132         (WI.ResourceHeadersContentView.prototype._refreshQueryStringSection):
2133         (WI.ResourceHeadersContentView.prototype._refreshRequestDataSection):
2134         (WI.ResourceHeadersContentView.prototype._resourceMetricsDidChange):
2135         (WI.ResourceHeadersContentView.prototype._resourceRequestHeadersDidChange):
2136         (WI.ResourceHeadersContentView.prototype._resourceResponseReceived):
2137         (WI.ResourceHeadersContentView.prototype._goToRequestDataClicked):
2138         Summary, Request, Response, Query String, and Request Data sections.
2139         The sections refresh as data becomes available.
2140
2141         * UserInterface/Views/Table.css:
2142         (.table):
2143         These variables are already defined globally.
2144
2145         * UserInterface/Views/Variables.css:
2146         (:root):
2147         New variables for the colors we use. They closely match, and are
2148         sometimes identical to ones used in Timelines / Memory views.
2149
2150 2017-10-06  Joseph Pecoraro  <pecoraro@apple.com>
2151
2152         Web Inspector: Network Tab - Make selection in the table more reliable (mousedown instead of click)
2153         https://bugs.webkit.org/show_bug.cgi?id=177990
2154
2155         Reviewed by Brian Burg.
2156
2157         * UserInterface/Views/NetworkTableContentView.js:
2158         (WI.NetworkTableContentView.prototype.tableCellClicked): Deleted.
2159         * UserInterface/Views/Table.js:
2160         (WI.Table.prototype._handleMouseDown):
2161         (WI.Table.prototype._handleClick): Deleted.
2162         Switch to mousedown.
2163
2164 2017-10-06  Joseph Pecoraro  <pecoraro@apple.com>
2165
2166         Web Inspector: Improve setting the default / initial sort of a Table
2167         https://bugs.webkit.org/show_bug.cgi?id=177989
2168
2169         Reviewed by Brian Burg.
2170
2171         * UserInterface/Views/NetworkTableContentView.js:
2172         (WI.NetworkTableContentView.prototype.initialLayout):
2173         Set the default / initial sort.
2174
2175         * UserInterface/Views/Table.js:
2176         (WI.Table):
2177         (WI.Table.prototype.set sortOrder):
2178         (WI.Table.prototype.set sortColumnIdentifier):
2179         During setup we should always update header views.
2180
2181 2017-10-05  Nikita Vasilyev  <nvasilyev@apple.com>
2182
2183         Web Inspector: Styles Redesign: Add support for keyboard navigation (Tab, Shift-Tab, Enter, Esc)
2184         https://bugs.webkit.org/show_bug.cgi?id=177711
2185
2186         Reviewed by Joseph Pecoraro.
2187
2188         Enter, Tab, Shift-Tab should commit changes.
2189         Escape should discard changes.
2190
2191         Tab and Enter should navigate forward (focus on the next field).
2192         Shift-Tab should navigate backward (focus on the previous field).
2193         Esc should not change the focus.
2194
2195         When navigating forward from:
2196
2197         - Selector: Focus on the first property name. If it doesn’t exist, create a blank property.
2198
2199         - Property name:
2200           - If property name is blank, discard the property and focus on the next editable field (property name or selector of the next rule).
2201           - If property is not blank, focus on the value.
2202
2203         - Property value:
2204           - If the last value in the rule, create a blank property and focus on its name.
2205           - If not the last value in the rule, focus on the next editable field (property name or selector of the next rule).
2206
2207         When navigating backward from:
2208
2209         - Selector: create a blank property on the previous editable rule and focus on its name.
2210
2211         - Property name:
2212           - Focus on the rule's selector.
2213
2214         - Property value:
2215           - Focus on the property name.
2216
2217         * UserInterface/Base/Utilities.js:
2218         (Event.prototype.stop):
2219         * UserInterface/Main.html:
2220         Add new files. Keep one class per file.
2221
2222         * UserInterface/Models/CSSProperty.js:
2223         (WI.CSSProperty.prototype.remove):
2224         (WI.CSSProperty.prototype.set name):
2225         (WI.CSSProperty.prototype.set rawValue):
2226         (WI.CSSProperty.prototype.get editable):
2227         (WI.CSSProperty.prototype._updateStyleText):
2228         (WI.CSSProperty.prototype._updateOwnerStyleText):
2229         Update indices and ranges of properties following the edited one to prevent data corruption.
2230
2231         * UserInterface/Models/CSSStyleDeclaration.js:
2232         (WI.CSSStyleDeclaration.prototype.get selectorEditable):
2233         (WI.CSSStyleDeclaration.prototype.set text):
2234         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
2235         (WI.CSSStyleDeclaration.prototype.shiftPropertiesAfter):
2236         (WI.CSSStyleDeclaration.prototype._rangeAfterPropertyAtIndex):
2237         Implement adding new blank properties.
2238
2239         * UserInterface/Models/TextRange.js:
2240         (WI.TextRange.prototype.cloneAndModify):
2241         Add an assert to catch negative number errors.
2242
2243         (WI.TextRange.prototype.collapseToEnd):
2244         Add a utility function akin Selection.prototype.collapseToEnd.
2245
2246         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
2247         (WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey):
2248         (WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey):
2249         (WI.CSSStyleDeclarationTextEditor.prototype._formattedContent):
2250         Move PrefixWhitespace from a view to a model (WI.CSSStyleDeclaration.PrefixWhitespace),
2251         since it's already used in the model.
2252
2253         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2254         (.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
2255         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2256         (WI.SpreadsheetCSSStyleDeclarationEditor):
2257         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2258         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
2259         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
2260         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
2261         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2262         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender):
2263         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty):
2264         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._isFocused):
2265         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
2266         Give SpreadsheetCSSStyleDeclarationEditor a delegate so that it can move focus to a CSS selector, or previous and next CSS rules.
2267
2268         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2269         (WI.SpreadsheetCSSStyleDeclarationSection):
2270         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get propertiesEditor):
2271         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get editable):
2272         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2273         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
2274         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorStartEditingRuleSelector):
2275         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
2276         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule):
2277         Give SpreadsheetCSSStyleDeclarationSection a delegate so that it can move focus to previous and next CSS rules.
2278
2279         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2280         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
2281         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule):
2282         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule):
2283         (WI.SpreadsheetRulesStyleDetailsPanel):
2284         Implement focusing on the next and previous CSS rules.
2285
2286         * UserInterface/Views/SpreadsheetSelectorField.js: Added.
2287         (WI.SpreadsheetSelectorField):
2288         (WI.SpreadsheetSelectorField.prototype.get editing):
2289         (WI.SpreadsheetSelectorField.prototype.startEditing):
2290         (WI.SpreadsheetSelectorField.prototype.stopEditing):
2291         (WI.SpreadsheetSelectorField.prototype._selectText):
2292         (WI.SpreadsheetSelectorField.prototype._handleClick):
2293         (WI.SpreadsheetSelectorField.prototype._handleFocus):
2294         (WI.SpreadsheetSelectorField.prototype._handleBlur):
2295         (WI.SpreadsheetSelectorField.prototype._handleKeyDown):
2296         Move SpreadsheetSelectorField into its own file.
2297
2298         * UserInterface/Views/SpreadsheetStyleProperty.js: Added.
2299         (WI.SpreadsheetStyleProperty):
2300         (WI.SpreadsheetStyleProperty.prototype.get element):
2301         (WI.SpreadsheetStyleProperty.prototype.get nameTextField):
2302         (WI.SpreadsheetStyleProperty.prototype.get valueTextField):
2303         (WI.SpreadsheetStyleProperty.prototype._remove):
2304         (WI.SpreadsheetStyleProperty.prototype._update):
2305         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):
2306         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
2307         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
2308         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
2309         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
2310         Move SpreadsheetStyleProperty into its own file.
2311
2312         * UserInterface/Views/SpreadsheetTextField.js: Added.
2313         (WI.SpreadsheetTextField):
2314         (WI.SpreadsheetTextField.prototype.get element):
2315         (WI.SpreadsheetTextField.prototype.get editing):
2316         (WI.SpreadsheetTextField.prototype.get value):
2317         (WI.SpreadsheetTextField.prototype.set value):
2318         (WI.SpreadsheetTextField.prototype.startEditing):
2319         (WI.SpreadsheetTextField.prototype.stopEditing):
2320         (WI.SpreadsheetTextField.prototype._selectText):
2321         (WI.SpreadsheetTextField.prototype._discardChange):
2322         (WI.SpreadsheetTextField.prototype._handleFocus):
2323         (WI.SpreadsheetTextField.prototype._handleBlur):
2324         (WI.SpreadsheetTextField.prototype._handleKeyDown):
2325         (WI.SpreadsheetTextField.prototype._handleInput):
2326         Introduce SpreadsheetTextField that is used for editing CSS property names and values.
2327
2328 2017-10-05  Joseph Pecoraro  <pecoraro@apple.com>
2329
2330         REGRESSION(r222868): Web Inspector: Timeline ScopeBar Navigation Bar items too large
2331         https://bugs.webkit.org/show_bug.cgi?id=177979
2332
2333         Reviewed by Matt Baker.
2334
2335         * UserInterface/Views/ButtonNavigationItem.css:
2336         (.navigation-bar .item.button.text-only):
2337         Make the height of text-only items the size of the text, not 100%.
2338
2339 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
2340
2341         Web Inspector: When scrolled Network Table reduces the number of rows it may appear as blank
2342         https://bugs.webkit.org/show_bug.cgi?id=177914
2343         <rdar://problem/34827613>
2344
2345         Reviewed by Matt Baker.
2346
2347         * UserInterface/Views/Table.js:
2348         (WI.Table.prototype._updateVisibleRows):
2349         (WI.Table.prototype._updateFillerRowWithNewHeight):
2350         Reduce the scrollTop when the table was scrolled and was then reloaded with a
2351         smaller number of rows. This can happen in two ways. Either the number of rows
2352         was reduced so much that we enter non-scrollable mode with a non-zero filler
2353         row. This can always reset the scrollTop to 0. Or when a large number of rows
2354         is reduced to a smaller number than our current scrollTop but still more than
2355         fit on one screen. In that case we can reduce the scrollTop to whatever would
2356         scroll the table to its max position.
2357
2358 2017-10-04  Matt Baker  <mattbaker@apple.com>
2359
2360         Web Inspector: Improve CanvasManager recording events
2361         https://bugs.webkit.org/show_bug.cgi?id=177762
2362
2363         Reviewed by Devin Rousso.
2364
2365         * UserInterface/Controllers/CanvasManager.js:
2366         (WI.CanvasManager.prototype.startRecording):
2367         (WI.CanvasManager.prototype.stopRecording):
2368         (WI.CanvasManager.prototype.recordingFinished):
2369         Replace the RecordingFinished event with a pair of events. RecordingStarted
2370         is sent when CanvasAgent.startRecording succeeds. RecordingStopped is
2371         sent when a recordingFinished event is received from the backend, or
2372         when a call to CanvasAgent.stopRecording fails.
2373
2374         * UserInterface/Views/CanvasContentView.js:
2375         (WI.CanvasContentView.prototype.initialLayout):
2376         (WI.CanvasContentView.prototype._toggleRecording):
2377         (WI.CanvasContentView.prototype._recordingStarted):
2378         (WI.CanvasContentView.prototype._recordingFinished): Deleted.
2379         Update recording status when CanvasManager fires recording events,
2380         instead of immediately after clicking the record button.
2381
2382 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
2383
2384         Web Inspector: Detail Views for resources in Network Tab
2385         https://bugs.webkit.org/show_bug.cgi?id=177553
2386
2387         Reviewed by Devin Rousso.
2388
2389         * Localizations/en.lproj/localizedStrings.js:
2390         * UserInterface/Main.html:
2391         New strings and resources.
2392
2393         * UserInterface/Base/Main.js:
2394         (WI._focusedContentBrowser):
2395         Detect nested content browsers instead of only top level tab content browsers.
2396
2397         * UserInterface/Base/Setting.js:
2398         Add a new global setting for which Network Detail view is preferred.
2399
2400         * UserInterface/Views/ContentBrowser.css:
2401         (.content-browser > .navigation-bar .item):
2402         (.content-browser > .navigation-bar > .item): Deleted.
2403         Generalize a navigation item style so it works on items nested inside a group.
2404
2405         * UserInterface/Views/ContentBrowser.js:
2406         (WI.ContentBrowser.prototype._updateContentViewSelectionPathNavigationItem):
2407         (WI.ContentBrowser.prototype._updateContentViewNavigationItems):
2408         (WI.ContentBrowser.prototype._removeAllNavigationItems):
2409         Give ContentBrowser a way to group all ContentView specific navigation items
2410         inside a GroupNavigationItem. This lets the client decide what to do with
2411         those navigation items, instead of default behavior in the navigation bar.
2412
2413         * UserInterface/Views/ContentViewContainer.js:
2414         (WI.ContentViewContainer.prototype.showContentView):
2415         Avoid a flash when showContentView is called with the current content view.
2416
2417         * UserInterface/Views/FlexibleSpaceNavigationItem.css:
2418         (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-start > .item):
2419         (:matches(.navigation-bar, .toolbar) .item.flexible-space.align-end > .item):
2420         When containing a navigation item decide where you want the items to align to.
2421
2422         * UserInterface/Views/FlexibleSpaceNavigationItem.js:
2423         (WI.FlexibleSpaceNavigationItem):
2424         (WI.FlexibleSpaceNavigationItem.prototype.updateLayout):
2425         Provide an option to embed a NavigationItem within a FlexibleSpace. Its behavior right
2426         now is rather simple. If the embedded Item fits in the current available space it is
2427         shown. If it doesn't fit, it is hidden and we have just a flexible space. This is used
2428         in the network detail view's navigation bar to keep the main navigation items centered
2429         while allowing for buttons to show up on the side without affecting the centering.
2430
2431         * UserInterface/Views/NavigationBar.js:
2432         (WI.NavigationBar):
2433         (WI.NavigationBar.prototype._mouseDown):
2434         (WI.NavigationBar.prototype._mouseUp):
2435         Simplify event registration. This would also help avoid cases where we
2436         might have registered multiple mousedown handlers.
2437
2438         * UserInterface/Views/GroupNavigationItem.js:
2439         (WI.GroupNavigationItem):
2440         (WI.GroupNavigationItem.prototype.get navigationItems):
2441         (WI.GroupNavigationItem.prototype.set navigationItems):
2442         (WI.GroupNavigationItem.prototype.get width):
2443         (WI.GroupNavigationItem.prototype.get minimumWidth):
2444         (WI.GroupNavigationItem.prototype._updateItems):
2445         * UserInterface/Views/HierarchicalPathNavigationItem.js:
2446         (WI.HierarchicalPathNavigationItem):
2447         (WI.HierarchicalPathNavigationItem.prototype.set components):
2448         (WI.HierarchicalPathNavigationItem.prototype.updateLayout):
2449         (WI.HierarchicalPathNavigationItem.prototype._updateComponentsIfNeeded):
2450         Defer DOM modifications until layout for NavigationItems container classes
2451         that change items/components dynamically. This reduces UI flashing in the
2452         bar when items/components change by coalescing all DOM updates at the same
2453         time; when the NavigationBar does its next layout.
2454
2455         * UserInterface/Views/NetworkResourceDetailView.css:
2456         (.network-resource-detail):
2457         (.network-resource-detail .navigation-bar):
2458         (.network-resource-detail .item.close > .glyph):
2459         (.network-resource-detail .item.close > .glyph:hover):
2460         (.network-resource-detail .item.close > .glyph:active):
2461         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only):
2462         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected):
2463         (.network-resource-detail > .content-browser):
2464         Styles for the detail view's navigation bar.
2465
2466         * UserInterface/Views/NetworkResourceDetailView.js: Added.
2467         (WI.NetworkResourceDetailView):
2468         (WI.NetworkResourceDetailView.prototype.get resource):
2469         (WI.NetworkResourceDetailView.prototype.shown):
2470         (WI.NetworkResourceDetailView.prototype.hidden):
2471         (WI.NetworkResourceDetailView.prototype.dispose):
2472         (WI.NetworkResourceDetailView.prototype.initialLayout):
2473         (WI.NetworkResourceDetailView.prototype._showPreferredContentView):
2474         (WI.NetworkResourceDetailView.prototype._showContentViewForNavigationItem):
2475         (WI.NetworkResourceDetailView.prototype._navigationItemSelected):
2476         (WI.NetworkResourceDetailView.prototype._handleCloseButton):
2477         ContentBrowser with customized navigation bar. This container has a fixed
2478         list of ContentViews all relating to the Resource. The detail view has
2479         a single delegate method for its close button. Since it maintains a
2480         ContentBrowser it needs to expose shown/hidden/dispose logic to ensure
2481         proper ContentView lifecycle events.
2482
2483         * UserInterface/Views/NetworkTableContentView.css:
2484         (.showing-detail .table .cell:not(.name)):
2485         (.showing-detail .table .resizer:not(:first-of-type)):
2486         * UserInterface/Views/NetworkTableContentView.js:
2487         (WI.NetworkTableContentView):
2488         (WI.NetworkTableContentView.prototype.shown):
2489         (WI.NetworkTableContentView.prototype.hidden):
2490         (WI.NetworkTableContentView.prototype.closed):
2491         (WI.NetworkTableContentView.prototype.reset):
2492         (WI.NetworkTableContentView.prototype.networkResourceDetailViewClose):
2493         (WI.NetworkTableContentView.prototype.tableSortChanged):
2494         (WI.NetworkTableContentView.prototype.tableCellClicked):
2495         (WI.NetworkTableContentView.prototype.tableSelectedRowChanged):
2496         (WI.NetworkTableContentView.prototype.layout):
2497         (WI.NetworkTableContentView.prototype._hideResourceDetailView):
2498         (WI.NetworkTableContentView.prototype._showResourceDetailView):
2499         (WI.NetworkTableContentView.prototype._positionDetailView):
2500         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
2501         (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
2502         (WI.NetworkTableContentView.prototype._restoreSelectedRow):
2503         (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
2504         Behavior for selecting a row and showing / hiding the detail view.
2505         The detail view is positioned beside the Network Table's "name" column
2506         and resizes when that column resizes.
2507
2508         * UserInterface/Views/Resizer.css:
2509         (.resizer):
2510         * UserInterface/Views/Table.css:
2511         (.table > .resizers):
2512         * UserInterface/Views/Table.js:
2513         (WI.Table):
2514         (WI.Table.prototype.get scrollContainer):
2515         (WI.Table.prototype._positionResizerElements):
2516         To let clients customize the table a bit, put resizers into their own
2517         container and expose the scroll container.
2518
2519         * UserInterface/Views/Variables.css:
2520         (:root):
2521         Add a new button hover color, slightly lighter than the existing button active color.
2522
2523 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
2524
2525         Web Inspector: Fix Beacon and Ping folderization issues
2526         https://bugs.webkit.org/show_bug.cgi?id=177885
2527
2528         Reviewed by Matt Baker.
2529
2530         * Localizations/en.lproj/localizedStrings.js:
2531         * UserInterface/Views/NetworkTableContentView.js:
2532         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
2533         Use common capitalized UIString "Ping". It gets lowercased later.
2534
2535         * UserInterface/Models/ResourceCollection.js:
2536         Add missing verifier.
2537
2538 2017-10-04  Matt Baker  <mattbaker@apple.com>
2539
2540         Web Inspector: Remove unused `representedObject` parameter from GeneralTreeElementPathComponent constructor
2541         https://bugs.webkit.org/show_bug.cgi?id=177561
2542
2543         Reviewed by Joseph Pecoraro.
2544
2545         * UserInterface/Views/GeneralTreeElementPathComponent.js:
2546         (WI.GeneralTreeElementPathComponent):
2547         (WI.GeneralTreeElementPathComponent.prototype.get generalTreeElement):
2548         (WI.GeneralTreeElementPathComponent.prototype.get previousSibling):
2549         (WI.GeneralTreeElementPathComponent.prototype.get nextSibling):
2550
2551 2017-10-04  Joseph Pecoraro  <pecoraro@apple.com>
2552
2553         Web Inspector: After enabling the new Network Tab in experimental settings, the network tab disappears
2554         https://bugs.webkit.org/show_bug.cgi?id=177774
2555         <rdar://problem/34771647>
2556
2557         Reviewed by Devin Rousso.
2558
2559         * UserInterface/Views/SettingsTabContentView.js:
2560         When enabling the new network tab, ensure it gets added to the list of open tabs.
2561         Place it where the old network tab was so the UI is as consistent as possible.
2562
2563 2017-10-03  Ross Kirsling  <ross.kirsling@sony.com>
2564
2565         Web Inspector: Layers tab sidebar's DOM highlight should be by row hover, not row selection
2566         https://bugs.webkit.org/show_bug.cgi?id=177690
2567
2568         Reviewed by Devin Rousso.
2569
2570         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2571         (WI.LayerDetailsSidebarPanel):
2572         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
2573         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
2574         (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseMove):
2575         (WI.LayerDetailsSidebarPanel.prototype._dataGridMouseLeave):
2576         (WI.LayerDetailsSidebarPanel.prototype._hideDOMNodeHighlight):
2577         (WI.LayerDetailsSidebarPanel.prototype._dataGridFocused): Deleted.
2578         (WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred): Deleted.
2579         (WI.LayerDetailsSidebarPanel.prototype._highlightSelectedNode): Deleted.
2580
2581 2017-10-03  Nikita Vasilyev  <nvasilyev@apple.com>
2582
2583         Web Inspector: Styles Redesign: support editing of rule selectors
2584         https://bugs.webkit.org/show_bug.cgi?id=177012
2585
2586         Reviewed by Matt Baker.
2587
2588         Clicking or focusing (by tabbing from another field) on a CSS selector should select the text and make the selector
2589         field editable.
2590
2591         Keyboard behavior while editing:
2592         - Enter should commit changes.
2593         - Escape should discard changes.
2594         - Tab should commit changes and navigate to the first property name.
2595         - Shift-Tab should commit changes and navigate to the last rule's property value, if there's one.
2596
2597         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2598         (WI.SpreadsheetStyleProperty.prototype._update):
2599         Add tabIndex so the keyboard navigation (Tab & Shift-Tab) to and from selectors works as expected.
2600
2601         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
2602         (.spreadsheet-css-declaration .selector:focus,):
2603         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field):
2604         (.spreadsheet-css-declaration .selector.spreadsheet-selector-field.editing):
2605         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2606         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.get selectorEditable):
2607         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
2608         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.layout):
2609         Split layout into _renderOrigin and _renderSelector, so selector field can be updated separately
2610         from everything else.
2611
2612         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationTextEditorFocused):
2613         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
2614         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidDiscard):
2615         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._discardSelectorChange):
2616         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
2617         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderOrigin):
2618
2619         (WI.SpreadsheetSelectorField):
2620         (WI.SpreadsheetSelectorField.prototype.get editing):
2621         (WI.SpreadsheetSelectorField.prototype.startEditing):
2622         (WI.SpreadsheetSelectorField.prototype.stopEditing):
2623         (WI.SpreadsheetSelectorField.prototype._handleClick):
2624         (WI.SpreadsheetSelectorField.prototype._handleFocus):
2625         (WI.SpreadsheetSelectorField.prototype._handleBlur):
2626         (WI.SpreadsheetSelectorField.prototype._handleKeyDown):
2627
2628 2017-10-03  Matt Baker  <mattbaker@apple.com>
2629
2630         Web Inspector: Add View layout tests, make views more testable
2631         https://bugs.webkit.org/show_bug.cgi?id=161274
2632         <rdar://problem/28038615>
2633
2634         Reviewed by Devin Rousso.
2635
2636         This patch adds support for View testing. Since view layouts are scheduled
2637         using requestAnimationFrame, FrontendTestHarness now provides a timer-based
2638         polyfill, to allow nonintrusive testing of the frontend View hierarchy.
2639
2640         * UserInterface/Test.html:
2641         Make WI.View available to tests.
2642
2643         * UserInterface/Test/FrontendTestHarness.js:
2644         (FrontendTestHarness.prototype.redirectRequestAnimationFrame):
2645
2646         * UserInterface/Views/View.js:
2647         (WI.View.rootView):
2648         (WI.View.prototype.replaceSubview):
2649         (WI.View.prototype._didMoveToWindow):
2650         (WI.View._cancelScheduledLayoutForView):
2651         Fixed issues caught while writing tests for the expected View behavior.
2652
2653 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
2654
2655         Web Inspector: Escape more characters in posix string conversion
2656         https://bugs.webkit.org/show_bug.cgi?id=177761
2657         <rdar://problem/34506832>
2658
2659         Reviewed by Brian Burg.
2660
2661         * UserInterface/Models/Resource.js:
2662         (WI.Resource.prototype.generateCURLCommand.escapeStringPosix):
2663         Escape '!' to '\041' in posix strings ($'...') since '!' may have special behavior at times.
2664
2665 2017-10-02  Ross Kirsling  <ross.kirsling@sony.com>
2666
2667         Web Inspector: Selecting child layers with keyboard causes Compositing Reason popover to become misaligned
2668         https://bugs.webkit.org/show_bug.cgi?id=150551
2669
2670         Reviewed by Matt Baker.
2671
2672         `content` setter should only be used when NOT repositioning the popover.
2673         `presentNewContentWithFrame` exists to update content and position at once.
2674
2675         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2676         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode):
2677         (WI.LayerDetailsSidebarPanel.prototype._presentPopover):
2678         Fix new sidebar.
2679
2680         * UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
2681         (WI.LayerTreeDetailsSidebarPanel.prototype._updatePopoverForSelectedNode):
2682         Fix legacy sidebar.
2683
2684 2017-10-02  Ross Kirsling  <ross.kirsling@sony.com>
2685
2686         Web Inspector: Ensure popovers are not malformed on window resize.
2687         https://bugs.webkit.org/show_bug.cgi?id=177771
2688
2689         Reviewed by Joseph Pecoraro.
2690
2691         * UserInterface/Views/Popover.js:
2692         Ensure stale `arrow-*` CSS classes are removed on update, even if our content didn't change.
2693
2694 2017-10-02  Joseph Pecoraro  <pecoraro@apple.com>
2695
2696         Web Inspector: Include Beacon and Ping requests in Network tab
2697         https://bugs.webkit.org/show_bug.cgi?id=177641
2698         <rdar://problem/33086839>
2699
2700         Reviewed by Chris Dumez.
2701
2702         * Localizations/en.lproj/localizedStrings.js:
2703         New strings for Beacon/Ping.
2704
2705         * UserInterface/Images/Beacon.svg: Added.
2706         * UserInterface/Views/ResourceIcons.css:
2707         (.resource-icon.resource-type-ping .icon,):
2708         (body:not(.mac-platform, .windows-platform) .resource-icon.resource-type-ping .icon,):
2709         (body:not(.mac-platform, .windows-platform) .large .resource-icon.resource-type-ping .icon,):
2710         New icon for Beacon/Ping. They share an icon since they are similiar in concept:
2711         a request that is sent and the page doesn't expect a response.
2712
2713         * UserInterface/Controllers/FrameResourceManager.js:
2714         (WI.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
2715         When a sub-resource and a main-resource have the same URL we were not
2716         distinguishing them. Use the resource type to distinguish them better.
2717
2718         * UserInterface/Models/SourceCode.js:
2719         (WI.SourceCode.prototype._processContent):
2720         Safer handling if the body was base64 encoded but an empty string.
2721
2722         * UserInterface/Models/Resource.js:
2723         (WI.Resource.displayNameForType):
2724         * UserInterface/Models/ResourceCollection.js:
2725         (WI.ResourceCollection.verifierForType):
2726         * UserInterface/Views/NetworkTableContentView.js:
2727         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
2728         * UserInterface/Views/ResourceClusterContentView.js:
2729         (WI.ResourceClusterContentView.prototype.get responseContentView):
2730         New resource types.
2731
2732         * UserInterface/Views/ResourceContentView.js:
2733         (WI.ResourceContentView.prototype.showMessage):
2734         * UserInterface/Views/TextResourceContentView.js:
2735         (WI.TextResourceContentView.prototype._contentDidPopulate):
2736         Nicer display for empty content, which may be common for these requests.
2737
2738 2017-09-29  Nikita Vasilyev  <nvasilyev@apple.com>
2739
2740         Web Inspector: Styles Redesign: support undo/redo of manual edits
2741         https://bugs.webkit.org/show_bug.cgi?id=177314
2742
2743         Reviewed by Joseph Pecoraro.
2744
2745         Make sure Command-Z and Command-Shift-Z undo changes in the styles sidebar
2746         when not focused on a contentEditable field.
2747
2748         * UserInterface/Views/EditingSupport.js:
2749         (WI.isEventTargetAnEditableField):
2750         Make sure WI._undoKeyboardShortcut doesn't call WI.undo() when editing inside of a contentEditable element.
2751
2752         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2753         (WI.SpreadsheetCSSStyleDeclarationEditor):
2754         Call style setter to setup event listeners during instantiation.
2755
2756         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style):
2757         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
2758         Update style declaration section when it isn't focused.
2759         This is the same logic as in the old styles sidebar (CSSStyleDeclarationTextEditor style setter).
2760
2761 2017-09-29  Joseph Pecoraro  <pecoraro@apple.com>
2762
2763         Web Inspector: Open Resource Dialog icons are blurry (24x24 instead of 32x32)
2764         https://bugs.webkit.org/show_bug.cgi?id=177631
2765         <rdar://problem/34729636>
2766
2767         Reviewed by Matt Baker.
2768
2769         * UserInterface/Views/OpenResourceDialog.css:
2770         (.open-resource-dialog > .tree-outline.large .item):
2771         (.open-resource-dialog > .tree-outline.large .item .icon):
2772         (.open-resource-dialog .tree-outline.large .item .titles):
2773         Make the rows large enough to fit the full 32x32 icon instead of a blurry 24x24.
2774
2775 2017-09-29  Joseph Pecoraro  <pecoraro@apple.com>
2776
2777         Web Inspector: Uncaught exception with populate find keyboard shortcut
2778         https://bugs.webkit.org/show_bug.cgi?id=177672
2779
2780         Reviewed by Matt Baker.
2781
2782         * UserInterface/Base/Main.js:
2783         The focusedContentView can be null so bail if that is the case.
2784
2785 2017-09-28  Devin Rousso  <webkit@devinrousso.com>
2786
2787         WebInspector: Uncaught Exception: TypeError: this._delegate.completionControllerCSSFunctionValuesNeeded is not a function.
2788         https://bugs.webkit.org/show_bug.cgi?id=177619
2789
2790         Reviewed by Joseph Pecoraro.
2791
2792         * UserInterface/Controllers/CodeMirrorCompletionController.js:
2793         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
2794         Remove accidental `typeof` keyword.
2795
2796 2017-09-28  Joseph Pecoraro  <pecoraro@apple.com>
2797
2798         Web Inspector: Remove Error icon in error message for resources it looks poor
2799         https://bugs.webkit.org/show_bug.cgi?id=177613
2800
2801         Reviewed by Matt Baker.
2802
2803         * UserInterface/Views/Main.css:
2804         (.message-text-view.error::before): Deleted.
2805
2806 2017-09-28  Tim Horton  <timothy_horton@apple.com>
2807
2808         Remove constant() in favor of env()
2809         https://bugs.webkit.org/show_bug.cgi?id=177581
2810         <rdar://problem/34701321>
2811
2812         Reviewed by Dean Jackson.
2813
2814         * UserInterface/Models/CSSCompletions.js:
2815         * UserInterface/Models/CSSKeywordCompletions.js:
2816         (WI.CSSKeywordCompletions.forProperty):
2817         (WI.CSSKeywordCompletions.forFunction):
2818
2819 2017-09-27  Joseph Pecoraro  <pecoraro@apple.com>
2820
2821         Uncaught Exception: Attempted to assign to readonly property (at ContentView.js:​206:​34)​
2822         https://bugs.webkit.org/show_bug.cgi?id=177587
2823
2824         Reviewed by Matt Baker.
2825
2826         We allow a representedObject to be a string. In strict mode attempting to set
2827         a property on a string results in a TypeError. So we should be careful not to
2828         do this in the rare cases where our representedObject is the a string.
2829
2830         * UserInterface/Views/ContentView.js:
2831         (WI.ContentView.contentViewForRepresentedObject):
2832         (WI.ContentView.closedContentViewForRepresentedObject):
2833         Avoid setting a property on strings. ContentViews backed by a String aren't typically
2834         shared anyways, so the property case would not be useful. If a client really wants
2835         to share they could use `new String(...)` as the representedObject.
2836
2837 2017-09-27  Matt Baker  <mattbaker@apple.com>
2838
2839         Web Inspector: Missing checks in DebuggerSidebarPanel for DOM debugging support
2840         https://bugs.webkit.org/show_bug.cgi?id=177574
2841
2842         Reviewed by Joseph Pecoraro.
2843
2844         Check before using class members that are conditionally constructed based
2845         on DOM debugging support.
2846
2847         * UserInterface/Views/DebuggerSidebarPanel.js:
2848         (WI.DebuggerSidebarPanel.prototype.closed):
2849         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
2850
2851 2017-09-27  Matt Baker  <mattbaker@apple.com>
2852
2853         Web Inspector: Create ResourceCollectionContentView and make CollectionContentView easier to extend
2854         https://bugs.webkit.org/show_bug.cgi?id=177419
2855
2856         Reviewed by Devin Rousso.
2857
2858         CollectionContentView should be generic, work with any represented object
2859         Collection, and not perform any type checking. It should just map items
2860         to ContentViews using the provided ContentView constructor.
2861
2862         The behavior when clicking a ContentView in the collection has been extended.
2863         If selection is enabled, clicking a ContentView will cause a "selected" class
2864         to be applied to its element, and a SupplementalRepresentedObjectsDidChange
2865         event is dispatched.
2866
2867         * Localizations/en.lproj/localizedStrings.js:
2868         * UserInterface/Main.html:
2869         New file, move CollectionContentView above subclasses.
2870
2871         * UserInterface/Models/ResourceCollection.js:
2872         (WI.ResourceCollection.prototype.get resourceType):
2873         Make resource type publicly available.
2874
2875         * UserInterface/Views/CollectionContentView.js:
2876         Move type checking of the collection out of the base class and assert
2877         that ContentViews are created when invoking `contentViewConstructor`.
2878         (WI.CollectionContentView):
2879         (WI.CollectionContentView.titleForCollection):
2880         (WI.CollectionContentView.prototype.get supplementalRepresentedObjects):
2881         (WI.CollectionContentView.prototype.get selectionEnabled):
2882         (WI.CollectionContentView.prototype.set selectionEnabled):
2883         (WI.CollectionContentView.prototype.addContentViewForItem):
2884         (WI.CollectionContentView.prototype.removeContentViewForItem):
2885         (WI.CollectionContentView.prototype.contentViewAdded):
2886         (WI.CollectionContentView.prototype.contentViewRemoved):
2887         (WI.CollectionContentView.prototype.initialLayout):
2888         (WI.CollectionContentView.prototype.attached):
2889         (WI.CollectionContentView.prototype.detached):
2890         (WI.CollectionContentView.prototype._handleItemAdded):
2891         (WI.CollectionContentView.prototype._handleItemRemoved):
2892         (WI.CollectionContentView.prototype._selectItem):
2893         (WI.CollectionContentView.prototype._addContentViewForItem): Deleted.
2894         (WI.CollectionContentView.prototype._removeContentViewForItem): Deleted.
2895
2896         * UserInterface/Views/ContentView.js:
2897         (WI.ContentView.createFromRepresentedObject):
2898         Create a ResourceCollectionContentView. In the future, additional
2899         Collection types can be mapped to their associated CollectionContentView.
2900
2901         * UserInterface/Views/ResourceCollectionContentView.js: Added.
2902         New class for resource-specific logic previously in CollectionContentView.
2903         (WI.ResourceCollectionContentView):
2904         (WI.ResourceCollectionContentView.prototype.contentViewAdded):
2905         (WI.ResourceCollectionContentView.prototype._handleContentError):
2906         Remove ContentView without removing the resource from its collection.
2907
2908 2017-09-27  Ross Kirsling  <ross.kirsling@sony.com>
2909
2910         Web Inspector: Fix Layers tab sidebar popover.
2911         https://bugs.webkit.org/show_bug.cgi?id=177477
2912
2913         Reviewed by Matt Baker.
2914
2915         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2916         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Added.
2917         (WI.LayerDetailsSidebarPanel.prototype._buildDataGrid):
2918         (WI.LayerDetailsSidebarPanel.prototype._sortDataGrid):
2919         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
2920         (WI.LayerDetailsSidebarPanel.prototype._dataGridFocused):
2921         (WI.LayerDetailsSidebarPanel.prototype._dataGridBlurred):
2922         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Refactored.
2923         (WI.LayerDetailsSidebarPanel.prototype._presentPopover):
2924         (WI.LayerDetailsSidebarPanel.prototype._dataGridClicked): Deleted -- not actually desired behavior.
2925         (WI.LayerDetailsSidebarPanel.prototype._updatePopoverForSelectedNode): Deleted -- code simplification.
2926         (WI.LayerDetailsSidebarPanel.prototype._hidePopover): Deleted -- no longer needed.
2927
2928 2017-09-27  Fujii Hironori  <Hironori.Fujii@sony.com>
2929
2930         [GTK] Web Inspector: Add Canvas2D.svg and Canvas3D.svg
2931         https://bugs.webkit.org/show_bug.cgi?id=175364
2932
2933         Reviewed by Carlos Garcia Campos.
2934
2935         Add more free icons.
2936
2937         * UserInterface/Images/gtk/Canvas2D.svg: Copied from Source/WebInspectorUI/UserInterface/Images/gtk/Canvas.svg.
2938         * UserInterface/Images/gtk/Canvas3D.svg: Added.
2939
2940 2017-09-26  Nikita Vasilyev  <nvasilyev@apple.com>
2941
2942         Web Inspector: Styles Redesign: Style unused, overridden, and invalid properties differently
2943         https://bugs.webkit.org/show_bug.cgi?id=177461
2944
2945         Reviewed by Matt Baker.
2946
2947         Style properties the same way as in the current styles sidebar with two minor changes:
2948         - Commented out properties are never strikethrough.
2949         - Non-inherited properties of inherited rules are no longer strikethrough (but still semi-transparent).
2950
2951         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2952         (.spreadsheet-style-declaration-editor .property:matches(.invalid, .other-vendor, .overridden):not(.disabled)):
2953         Use the same styles as in the old sidebar, with exception of `-webkit-text-stroke-width: 0.000000000000001px`
2954         hack, which was replaced by -webkit-text-decoration-color.
2955
2956         (.spreadsheet-style-declaration-editor .property.invalid:not(.disabled)):
2957         (.spreadsheet-style-declaration-editor .property.not-inherited):
2958         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2959         (WI.SpreadsheetStyleProperty):
2960         (WI.SpreadsheetStyleProperty.prototype._update):
2961
2962 2017-09-26  Joseph Pecoraro  <pecoraro@apple.com>
2963
2964         Web Inspector: Improve Table scrolling performance
2965         https://bugs.webkit.org/show_bug.cgi?id=177468
2966
2967         Reviewed by Brian Burg.
2968
2969         This reduces work during scrolling updates in two ways.
2970
2971         1. Avoid recalculating the width/height of the Table on scroll.
2972           - We only need to recalculate sizes if the view changes size.
2973         2. Avoid resetting sizes on all cells if the sizes did not change.
2974           - Enumerating and setting style.width values was showing up in profiles.
2975
2976         * UserInterface/Views/Table.js:
2977         (WI.Table):
2978         New member variables for a cached width/height of the scrollable region.
2979         _cachedWidth is the same as _cachedScrollableHeight but they could be
2980         different so I just kept them separate for now. Also switch to
2981         getBoundingClientRect which gets us a better value then
2982         offsetWidth/offsetHeight.
2983
2984         (WI.Table.prototype.resize):
2985         Clear cached size and relayout.
2986
2987         (WI.Table.prototype.layout):
2988         If we did not resize, layout without recalculating sizes.
2989
2990         (WI.Table.prototype.resizerDragging):
2991         (WI.Table.prototype._getOrCreateRow):
2992         When column widths change increment the width generation. This will let
2993         us quickly check if a row's cells are appropriately sized or not.
2994
2995         (WI.Table.prototype._resizeColumnsAndFiller):
2996         Cache width values after recalculating. Provide a fast path if values
2997         have not changed.
2998
2999         (WI.Table.prototype._updateVisibleRows):
3000         (WI.Table.prototype._updateFillerRowWithNewHeight):
3001         Factor out updating the filler row into a function.
3002         
3003         (WI.Table.prototype._applyColumnWidths):
3004         Always update the width generation of a row after setting its cell widths.
3005
3006         (WI.Table.prototype._applyColumnWidthsToColumnsIfNeeded):
3007         Fast path only updates row cell widths if they need to change.
3008
3009 2017-09-25  Devin Rousso  <webkit@devinrousso.com>
3010
3011         Web Inspector: move Console.addInspectedNode to DOM.setInspectedNode
3012         https://bugs.webkit.org/show_bug.cgi?id=176827
3013
3014         Reviewed by Joseph Pecoraro.
3015
3016         * UserInterface/Controllers/DOMTreeManager.js:
3017         (WI.DOMTreeManager):
3018         (WI.DOMTreeManager.prototype.setInspectedNode):
3019
3020         * UserInterface/Views/DOMTreeContentView.js:
3021         (WI.DOMTreeContentView.prototype._selectedNodeDidChange):
3022
3023 2017-09-25  Joseph Pecoraro  <pecoraro@apple.com>
3024
3025         Web Inspector: Add loading indicator next to resources in the Network Tab
3026         https://bugs.webkit.org/show_bug.cgi?id=177469
3027
3028         Reviewed by Matt Baker.
3029
3030         * UserInterface/Models/Resource.js:
3031         (WI.Resource.prototype.isLoading):
3032         Provide a useful accessor to check if the Resource is considered loading or not.
3033
3034         * UserInterface/Views/NetworkGridContentView.js:
3035         (WI.NetworkGridContentView.prototype._networkTimelineRecordAdded):
3036         * UserInterface/Views/ResourceTimelineDataGridNode.js:
3037         (WI.ResourceTimelineDataGridNode.prototype._updateStatus):
3038         * UserInterface/Views/ResourceTreeElement.js:
3039         (WI.ResourceTreeElement.prototype._updateStatus):
3040         Switch existing code to use the new isLoading() function and make the similiar
3041         code more consistent.
3042
3043         * UserInterface/Views/NetworkTableContentView.css:
3044         (body[dir=ltr] .content-view.network .table .cell.name > .status):
3045         (body[dir=rtl] .content-view.network .table .cell.name > .status):
3046         (.content-view.network .table .cell.name > .status .indeterminate-progress-spinner):
3047         * UserInterface/Views/NetworkTableContentView.js:
3048         (WI.NetworkTableContentView.prototype._populateNameCell):
3049         Add a loading indicator to the Name column in the Network tab.
3050         It is sized the same as the loading indicator in the Resource tab.
3051
3052 2017-09-25  Ross Kirsling  <ross.kirsling@sony.com>
3053
3054         Web Inspector: Elements tab's Layers sidebar should disappear when Layers tab is present.
3055         https://bugs.webkit.org/show_bug.cgi?id=177476
3056
3057         Reviewed by Devin Rousso.
3058
3059         * UserInterface/Views/ElementsTabContentView.js:
3060         (WI.ElementsTabContentView):
3061
3062 2017-09-25  Devin Rousso  <webkit@devinrousso.com>
3063
3064         Web Inspector: Add autocompletion suggestions for CSS attr based on the selected element's attributes
3065         https://bugs.webkit.org/show_bug.cgi?id=177346
3066
3067         Reviewed by Joseph Pecoraro.
3068
3069         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3070         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
3071         Provide a way for delegates to add completion items for CSS functions based on the name of
3072         the function.
3073
3074         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
3075         (WI.CSSStyleDeclarationTextEditor.prototype.completionControllerCSSFunctionValuesNeeded):
3076         If the function name is "attr", also return a list of the names of all the selected node's
3077         attributes.
3078
3079 2017-09-25  Joseph Pecoraro  <pecoraro@apple.com>
3080
3081         Unreviewed follow-up to r222470.
3082
3083         * UserInterface/Main.html:
3084         Remove reference to css file that doesn't exist yet.
3085
3086 2017-09-22  Joseph Pecoraro  <pecoraro@apple.com>
3087
3088         Web Inspector: Include a table in New Network Tab
3089         https://bugs.webkit.org/show_bug.cgi?id=177206
3090
3091         Reviewed by Matt Baker and Brian Burg.
3092
3093         This includes an initial implementation of the NetworkTableContentView,
3094         and a generic Table / TableColumn implementation ported from DataGrid.
3095
3096         * Localizations/en.lproj/localizedStrings.js:
3097         * UserInterface/Main.html:
3098         New strings and files.
3099
3100         * UserInterface/Views/NetworkGridContentView.css:
3101         (.content-view:matches(.network, .network-grid) > .data-grid .cache-type):
3102         (.cache-type): Deleted.
3103         * UserInterface/Views/ResourceDetailsSidebarPanel.css:
3104         (.sidebar > .panel.resource-details .cache-type):
3105         Make the .cache-type selector more specific for the legacy cases.
3106
3107         * UserInterface/Views/NetworkTabContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css.
3108         (.content-view.network > .content-browser):
3109         * UserInterface/Views/NetworkTabContentView.js:
3110         (WI.NetworkTabContentView.prototype.shown):
3111         (WI.NetworkTabContentView.prototype.hidden):
3112         (WI.NetworkTabContentView.prototype.closed):
3113         NetworkTabContentView has a ContentBrowser so it should be passing
3114         ContentBrowser lifecycle events (shown, hidden, closed) through to
3115         the sub-content browser.
3116
3117         * UserInterface/Views/TableColumn.js: Added.
3118         (WI.TableColumn.prototype.get identifier):
3119         (WI.TableColumn.prototype.get name):
3120         (WI.TableColumn.prototype.get width):
3121         (WI.TableColumn.prototype.get minWidth):
3122         (WI.TableColumn.prototype.get maxWidth):
3123         (WI.TableColumn.prototype.get hidden):
3124         (WI.TableColumn.prototype.get defaultHidden):
3125         (WI.TableColumn.prototype.get sortable):
3126         (WI.TableColumn.prototype.get align):
3127         (WI.TableColumn.prototype.get locked):
3128         (WI.TableColumn.prototype.get flexible):
3129         (WI.TableColumn.prototype.setWidth):
3130         (WI.TableColumn.prototype.setHidden):
3131         Model object for a column. Values are getter only. Columns may express
3132         size constraints (min width / max width) that are respected as much as
3133         possible. When a column is resized it dispatches an event.
3134
3135         * UserInterface/Views/Table.js: Added.
3136         (WI.Table):
3137         (WI.Table.prototype.get element):
3138         (WI.Table.prototype.get identifier):
3139         (WI.Table.prototype.get dataSource):
3140         (WI.Table.prototype.get delegate):
3141         (WI.Table.prototype.get rowHeight):
3142         (WI.Table.prototype.get selectedRow):
3143         (WI.Table.prototype.get sortOrder):
3144         (WI.Table.prototype.set sortOrder):
3145         (WI.Table.prototype.get sortColumnIdentifier):
3146         (WI.Table.prototype.set sortColumnIdentifier):
3147         (WI.Table.prototype.resize):
3148         (WI.Table.prototype.reloadData):
3149         (WI.Table.prototype.reloadDataAddedToEndOnly):
3150         (WI.Table.prototype.reloadRow):
3151         (WI.Table.prototype.reloadCell):
3152         (WI.Table.prototype.selectRow):
3153         (WI.Table.prototype.clearSelectedRow):
3154         (WI.Table.prototype.columnWithIdentifier):
3155         (WI.Table.prototype.addColumn):
3156         (WI.Table.prototype.showColumn):
3157         (WI.Table.prototype.hideColumn):
3158         (WI.Table.prototype.restoreScrollPosition):
3159         (WI.Table.prototype.initialLayout):
3160         (WI.Table.prototype.layout):
3161         (WI.Table.prototype.resizerDragStarted):
3162         (WI.Table.prototype.resizerDragging.growableSize):
3163         (WI.Table.prototype.resizerDragging.shrinkableSize):
3164         (WI.Table.prototype.resizerDragging.canGrow):
3165         (WI.Table.prototype.resizerDragging.canShrink):
3166         (WI.Table.prototype.resizerDragging.columnToResize):
3167         (WI.Table.prototype.resizerDragging):
3168         (WI.Table.prototype.resizerDragEnded):
3169         (WI.Table.prototype._needsLayout):
3170         (WI.Table.prototype._createHeaderCell):
3171         (WI.Table.prototype._createFillerCell):
3172         (WI.Table.prototype._createCell):
3173         (WI.Table.prototype._getOrCreateRow):
3174         (WI.Table.prototype._populatedCellForColumnAndRow):
3175         (WI.Table.prototype._populateRow):
3176         (WI.Table.prototype._resizeColumnsAndFiller.distributeRemainingPixels):
3177         (WI.Table.prototype._resizeColumnsAndFiller.bestFit):
3178         (WI.Table.prototype._resizeColumnsAndFiller):
3179         (WI.Table.prototype._updateVisibleRows):
3180         (WI.Table.prototype._applyColumnWidths):
3181         (WI.Table.prototype._positionResizerElements):
3182         (WI.Table.prototype._isRowVisible):
3183         (WI.Table.prototype._indexToInsertColumn):
3184         (WI.Table.prototype._handleScroll):
3185         (WI.Table.prototype._handleKeyDown):
3186         (WI.Table.prototype._handleClick):
3187         (WI.Table.prototype._handleContextMenu):
3188         (WI.Table.prototype._handleHeaderCellClicked):
3189         (WI.Table.prototype._handleHeaderContextMenu):
3190         Table is mostly a re-implementation of DataGrid. Much of its functionality
3191         was a direct copy that was then modified and simplified for a smaller
3192         and simpler feature set.
3193         
3194         Table behaves more like Cocoa's NSTableView. A datasource supplies the
3195         number of rows, which Table uses to resize appropriately. A delegate is
3196         then called to populate cells in a row when they become visible. Table
3197         does minimal caching, and in the event of data source changes
3198         (resorting, adding rows, modifying rows, etc) the visible rows are
3199         simply recreated from scratch. Clients should therefore make generating
3200         a cell's contents as simple and performant as possible.
3201
3202         Unlike DataGrid, rows are just an <li> with a bunch of cells. Since the
3203         number of rows are limited to (roughly) those that are visible, most
3204         operations, like resizing, creates / modifies each of the visible cells.
3205
3206         Finally, Table's resizing operations behave more like flexible content
3207         than DataGrid's neighbor only approach. This makes resizing the table
3208         generally easier to do, but may need refinement to decide which columns
3209         we would prefer to distribute columns during resizing.
3210
3211         * UserInterface/Views/Table.css: Added.
3212         (.table):
3213         (.table > .header):
3214         (.table > .header > .sortable:active):
3215         (.table > .header > :matches(.sort-ascending, .sort-descending)):
3216         (.table > .header > :matches(.sort-ascending, .sort-descending)::after):
3217         (body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)):
3218         (body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)):
3219         (body[dir=ltr] .table > .header > :matches(.sort-ascending, .sort-descending)::after):
3220         (body[dir=rtl] .table > .header > :matches(.sort-ascending, .sort-descending)::after):
3221         (.table > .header > .sort-ascending::after):
3222         (.table > .header > .sort-descending::after):
3223         (.table > .data-container):
3224         (.table > .data-container.not-scrollable):
3225         (.table > .data-container > .data-list):
3226         (.table > .data-container > .data-list.odd-first-zebra-stripe):
3227         (.table > .data-container > .data-list > li):
3228         (.table > .data-container > .data-list > li.selected):
3229         (.table:focus > .data-container > .data-list li.selected):
3230         (.table .cell):
3231         (body[dir=ltr] .table .cell:not(:last-child)):
3232         (body[dir=rtl] .table .cell:not(:last-child)):
3233         (body[dir=ltr] .table .cell:first-child):
3234         (body[dir=rtl] .table .cell:first-child):
3235         (.table :not(.header) .cell:first-of-type):
3236         (.table .cell.align-right):
3237         (.table .cell.align-left):
3238         (.table .cell.align-center):
3239         Styles mostly taken from DataGrid with a few minor tweaks.
3240
3241         * UserInterface/Views/NetworkTableContentView.css: Copied from Source/WebInspectorUI/UserInterface/Views/NetworkGridContentView.css.
3242         (.content-view.network .table .icon):
3243         (body[dir=ltr] .content-view.network .table .icon):
3244         (body[dir=rtl] .content-view.network .table .icon):
3245         (.content-view.network .table li:not(.filler) .cell.name):
3246         (.content-view.network .table .cache-type):
3247         (.content-view.network .table .error):
3248         * UserInterface/Views/NetworkTableContentView.js:
3249         (WI.NetworkTableContentView):
3250         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
3251         (WI.NetworkTableContentView.prototype.get navigationItems):
3252         (WI.NetworkTableContentView.prototype.shown):
3253         (WI.NetworkTableContentView.prototype.closed):
3254         (WI.NetworkTableContentView.prototype.reset):
3255         (WI.NetworkTableContentView.prototype.tableNumberOfRows):
3256         (WI.NetworkTableContentView.prototype.tableSortChanged):
3257         (WI.NetworkTableContentView.prototype.tableCellClicked):
3258         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
3259         (WI.NetworkTableContentView.prototype.tableSelectedRowChanged):
3260         (WI.NetworkTableContentView.prototype.tablePopulateCell):
3261         (WI.NetworkTableContentView.prototype._populateNameCell):
3262         (WI.NetworkTableContentView.prototype._populateTransferSizeCell):
3263         (WI.NetworkTableContentView.prototype._generateSortComparator):
3264         (WI.NetworkTableContentView.prototype.initialLayout):
3265         (WI.NetworkTableContentView.prototype.layout):
3266         (WI.NetworkTableContentView.prototype._processPendingEntries):
3267         (WI.NetworkTableContentView.prototype._rowIndexForResource):
3268         (WI.NetworkTableContentView.prototype._updateEntryForResource):
3269         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
3270         (WI.NetworkTableContentView.prototype._resourceLoadingDidFinish):
3271         (WI.NetworkTableContentView.prototype._resourceLoadingDidFail):
3272         (WI.NetworkTableContentView.prototype._resourceTransferSizeDidChange):
3273         (WI.NetworkTableContentView.prototype._networkTimelineRecordAdded):
3274         (WI.NetworkTableContentView.prototype._isDefaultSort):
3275         (WI.NetworkTableContentView.prototype._insertResourceAndReloadTable):
3276         (WI.NetworkTableContentView.prototype._displayType):
3277         (WI.NetworkTableContentView.prototype._entryForResource):
3278         (WI.NetworkTableContentView.prototype._passFilter):
3279         (WI.NetworkTableContentView.prototype._updateSortAndFilteredEntries):
3280         (WI.NetworkTableContentView.prototype._updateFilteredEntries):
3281         (WI.NetworkTableContentView.prototype._generateTypeFilter):
3282         (WI.NetworkTableContentView.prototype._areFilterListsIdentical):
3283         (WI.NetworkTableContentView.prototype._typeFilterScopeBarSelectionChanged):
3284         (WI.NetworkTableContentView.prototype._tableNameColumnDidChangeWidth):
3285         The NetworkTableContentView has a Table and it is the table's data source
3286         and delegate. It contains a complete list of entries, and a filtered list
3287         of entries, which is the backing list of rows for the table. As entries
3288         are created, updated, or filters modified, this generally modifies
3289         entries, sorts, filters, and reloads the table. As much as possible it
3290         batches operations in the usual layout loop.
3291
3292 2017-09-24  Joseph Pecoraro  <pecoraro@apple.com>
3293
3294         Web Inspector: Reduce work during resizing
3295         https://bugs.webkit.org/show_bug.cgi?id=177402
3296
3297         Reviewed by Matt Baker.
3298
3299         * UserInterface/Views/ConsolePrompt.js:
3300         (WI.ConsolePrompt.prototype.layout):
3301         In the most common case there is no text so avoid doing work in CodeMirror.
3302
3303 2017-09-22  Matt Baker  <mattbaker@apple.com>
3304
3305         Web Inspector: Remove SidebarPanel show/hide and added/removed
3306         https://bugs.webkit.org/show_bug.cgi?id=177387
3307
3308         Reviewed by Devin Rousso.
3309
3310         * UserInterface/Views/DebuggerTabContentView.js:
3311         (WI.DebuggerTabContentView.prototype.showDetailsSidebarPanels):
3312         * UserInterface/Views/SearchSidebarPanel.js:
3313         (WI.SearchSidebarPanel.prototype.focusSearchField):
3314         * UserInterface/Views/Sidebar.js:
3315         (WI.Sidebar.prototype.insertSidebarPanel):
3316         (WI.Sidebar.prototype.removeSidebarPanel):
3317         * UserInterface/Views/SidebarPanel.js:
3318         (WI.SidebarPanel.prototype.show): Deleted.
3319         (WI.SidebarPanel.prototype.hide): Deleted.
3320         (WI.SidebarPanel.prototype.added): Deleted.
3321         (WI.SidebarPanel.prototype.removed): Deleted.
3322
3323 2017-09-22  Matt Baker  <mattbaker@apple.com>
3324
3325         Web Inspector: View should automatically layout when it becomes attached to the DOM
3326         https://bugs.webkit.org/show_bug.cgi?id=177189
3327
3328         Reviewed by Devin Rousso.
3329
3330         This guarantees that a layout is always scheduled as soon as a view is
3331         attached to the DOM. Now that nearly all views are created lazily, it
3332         is safe to make this change even without having a visibility concept in
3333         the View class that would prevent layouts for background views.
3334
3335         * UserInterface/Views/View.js:
3336         (WI.View):
3337         Remove `this._needsLayoutWhenAttachedToRoot` flag, which is now implicit.
3338         This was set if a layout was requested before the view had been attached
3339         to the DOM.
3340
3341         (WI.View.prototype.get element):
3342         (WI.View.prototype.get layoutPending):
3343         (WI.View.prototype.get parentView):
3344         (WI.View.prototype.get subviews):
3345         (WI.View.prototype.get isAttached):
3346         (WI.View.prototype.insertSubviewBefore):
3347         (WI.View.prototype.removeSubview):
3348         (WI.View.prototype.removeAllSubviews):
3349         (WI.View.prototype.attached):
3350         (WI.View.prototype.detached):
3351         Hooks for subclasses to define behavior added or removed from the DOM.
3352         (WI.View.prototype._didMoveToParent):
3353         (WI.View.prototype._didMoveToWindow):
3354         (WI.View._scheduleLayoutForView):
3355         (WI.View.prototype.didMoveToWindow): Deleted.
3356         (WI.View.prototype.didMoveToParent): Deleted.
3357         These were only used by View, and have been made private.
3358
3359 2017-09-22  Nikita Vasilyev  <nvasilyev@apple.com>
3360
3361         Web Inspector: Styles Redesign: support toggling properties
3362         https://bugs.webkit.org/show_bug.cgi?id=176643
3363
3364         Reviewed by Joseph Pecoraro.
3365
3366         Add a primitive UI to make CSS property names and values editable. Autocomplete, syntax highlighting,
3367         and proper keyboard navigation will be added later.
3368
3369         Display !important when it's specified. Before this patch !important wasn't shown in the redesigned
3370         styles sidebar.
3371
3372         * UserInterface/Models/CSSProperty.js:
3373         (WI.CSSProperty.prototype.update):
3374         (WI.CSSProperty.prototype.get name):
3375         (WI.CSSProperty.prototype.set name):
3376         (WI.CSSProperty.prototype.get value):
3377         (WI.CSSProperty.prototype.get rawValue):
3378         (WI.CSSProperty.prototype.set rawValue):
3379         CSSProperty.prototype.value returns the same value as before. !important remains stripped.
3380         CSSProperty.prototype.rawValue returns a raw value from the payload. It may include !important.
3381
3382         (WI.CSSProperty.prototype._updateStyle):
3383         (WI.CSSProperty.prototype._updateOwnerStyleText):
3384         (WI.CSSProperty):
3385         * UserInterface/Models/DOMNodeStyles.js:
3386         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
3387         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3388         (.spreadsheet-style-declaration-editor :matches(.name, .value):focus):
3389         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3390         (WI.SpreadsheetStyleProperty.prototype._update):
3391         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
3392         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
3393         (WI.SpreadsheetStyleProperty):
3394
3395 2017-09-22  Matt Baker  <mattbaker@apple.com>
3396
3397         Web Inspector: NavigationBar should coalesce consecutive dividers when items are hidden
3398         https://bugs.webkit.org/show_bug.cgi?id=177379
3399
3400         Reviewed by Joseph Pecoraro.
3401
3402         * UserInterface/Views/NavigationBar.js:
3403         (WI.NavigationBar.prototype.layout):
3404
3405 2017-09-22  Tim Horton  <timothy_horton@apple.com>
3406
3407         Add env() as an alias of constant()
3408         https://bugs.webkit.org/show_bug.cgi?id=177371
3409
3410         Reviewed by Simon Fraser.
3411
3412         * UserInterface/Models/CSSKeywordCompletions.js:
3413         (WI.CSSKeywordCompletions.forProperty):
3414         (WI.CSSKeywordCompletions.forFunction):
3415         Add autocomplete support for env().
3416
3417 2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
3418
3419         Web Inspector: Add autocompletion suggestions for CSS functions (constant(), linear-gradient(), etc)
3420         https://bugs.webkit.org/show_bug.cgi?id=177264
3421
3422         Reviewed by Matt Baker.
3423
3424         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3425         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
3426         Detect when we are inside of functions and provide completion suggestions
3427         for the relevant function.
3428
3429         * UserInterface/Models/CSSCompletions.js:
3430         Syntax highlight "constant()" like we do for "var()".
3431
3432         * UserInterface/Models/CSSKeywordCompletions.js:
3433         (WI.CSSKeywordCompletions.forProperty):
3434         Always suggest "constant()" everywhere, like we do for "var()".
3435
3436         (WI.CSSKeywordCompletions.forFunction):
3437         Provide suggestions for some CSS functions.
3438
3439 2017-09-21  Joseph Pecoraro  <pecoraro@apple.com>
3440
3441         Web Inspector: Remove support for CSS Regions
3442         https://bugs.webkit.org/show_bug.cgi?id=177287
3443
3444         Reviewed by Matt Baker.
3445
3446         * UserInterface/Protocol/CSSObserver.js:
3447         (WI.CSSObserver.prototype.namedFlowCreated):
3448         (WI.CSSObserver.prototype.namedFlowRemoved):
3449         (WI.CSSObserver.prototype.regionLayoutUpdated):
3450         (WI.CSSObserver.prototype.regionOversetChanged):
3451         (WI.CSSObserver.prototype.registeredNamedFlowContentElement):
3452         (WI.CSSObserver.prototype.unregisteredNamedFlowContentElement):
3453         Leave observer functions in for older backends that will send
3454         these messages, but we just ignore them.
3455
3456         * UserInterface/Base/Main.js:
3457         * UserInterface/Controllers/DOMTreeManager.js:
3458         (WI.DOMTreeManager):
3459         (WI.DOMTreeManager.prototype._unbind):
3460         (WI.DOMTreeManager._flowPayloadHashKey): Deleted.
3461         (WI.DOMTreeManager.prototype._createContentFlowFromPayload): Deleted.
3462         (WI.DOMTreeManager.prototype._updateContentFlowFromPayload): Deleted.
3463         (WI.DOMTreeManager.prototype.getNamedFlowCollection.onNamedFlowCollectionAvailable): Deleted.
3464         (WI.DOMTreeManager.prototype.getNamedFlowCollection): Deleted.
3465         (WI.DOMTreeManager.prototype.namedFlowCreated): Deleted.
3466         (WI.DOMTreeManager.prototype.namedFlowRemoved): Deleted.
3467         (WI.DOMTreeManager.prototype._sendNamedFlowUpdateEvents): Deleted.
3468         (WI.DOMTreeManager.prototype.regionOversetChanged): Deleted.
3469         (WI.DOMTreeManager.prototype.registeredNamedFlowContentElement): Deleted.
3470         (WI.DOMTreeManager.prototype._removeContentNodeFromFlowIfNeeded): Deleted.
3471         (WI.DOMTreeManager.prototype.unregisteredNamedFlowContentElement): Deleted.
3472         (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes.nodeRequested): Deleted.
3473         (WI.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes): Deleted.
3474         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.regionNodesAvailable): Deleted.
3475         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable): Deleted.
3476         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getComputedProperty): Deleted.
3477         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.inspectedPage_node_getFlowInfo.getContentFlowName): Deleted.
3478         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo): Deleted.
3479         * UserInterface/Images/ContentFlow.svg: Removed.
3480         * UserInterface/Images/gtk/ContentFlow.svg: Removed.
3481         * UserInterface/Main.html:
3482         * UserInterface/Models/Collection.js:
3483         * UserInterface/Models/ContentFlow.js: Removed.
3484         * UserInterface/Models/DOMTree.js:
3485         (WI.DOMTree):
3486         (WI.DOMTree.prototype.get frame):
3487         (WI.DOMTree.prototype._framePageExecutionContextChanged):
3488         (WI.DOMTree.prototype.get contentFlowCollection): Deleted.
3489         (WI.DOMTree.prototype.requestContentFlowList): Deleted.
3490         (WI.DOMTree.prototype._isContentFlowInCurrentDocument): Deleted.
3491         (WI.DOMTree.prototype._contentFlowListWasUpdated): Deleted.
3492         (WI.DOMTree.prototype._contentFlowWasAdded): Deleted.
3493         (WI.DOMTree.prototype._contentFlowWasRemoved): Deleted.
3494         * UserInterface/Test.html:
3495         * UserInterface/Views/CollectionContentView.js:
3496         (WI.CollectionContentView):
3497         * UserInterface/Views/ComputedStyleDetailsPanel.css:
3498         (.details-section > .content > .group > .row.simple.content-flow-link > .value > span > .icon): Deleted.
3499         * UserInterface/Views/ComputedStyleDetailsPanel.js:
3500         (WI.ComputedStyleDetailsPanel.prototype.refresh):
3501         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
3502         (WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged):
3503         (WI.ComputedStyleDetailsPanel):
3504         (WI.ComputedStyleDetailsPanel.prototype.get regionFlow): Deleted.
3505         (WI.ComputedStyleDetailsPanel.prototype.set regionFlow): Deleted.
3506         (WI.ComputedStyleDetailsPanel.prototype.get contentFlow): Deleted.
3507         (WI.ComputedStyleDetailsPanel.prototype.set contentFlow): Deleted.
3508         (WI.ComputedStyleDetailsPanel.prototype.get containerRegions): Deleted.
3509         (WI.ComputedStyleDetailsPanel.prototype.set containerRegions): Deleted.
3510         (WI.ComputedStyleDetailsPanel.prototype.sizeDidChange): Deleted.
3511         (WI.ComputedStyleDetailsPanel.prototype._updateFlowNamesSectionVisibility): Deleted.
3512         (WI.ComputedStyleDetailsPanel.prototype._resetFlowDetails): Deleted.
3513         (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails.contentFlowInfoReady): Deleted.
3514         (WI.ComputedStyleDetailsPanel.prototype._refreshFlowDetails): Deleted.
3515         (WI.ComputedStyleDetailsPanel.prototype._goToRegionFlowArrowWasClicked): Deleted.
3516         (WI.ComputedStyleDetailsPanel.prototype._goToContentFlowArrowWasClicked): Deleted.
3517         * UserInterface/Views/ContentFlowDOMTreeContentView.js: Removed.
3518         * UserInterface/Views/ContentFlowIcon.css: Removed.
3519         * UserInterface/Views/ContentFlowTreeElement.js: Removed.
3520         * UserInterface/Views/ContentView.js:
3521         (WI.ContentView.createFromRepresentedObject):
3522         (WI.ContentView.isViewable):
3523         * UserInterface/Views/FrameTreeElement.js:
3524         (WI.FrameTreeElement.prototype.onpopulate):
3525         (WI.FrameTreeElement.prototype.onexpand):
3526         (WI.FrameTreeElement.prototype._childContentFlowWasAdded): Deleted.
3527         (WI.FrameTreeElement.prototype._childContentFlowWasRemoved): Deleted.
3528         (WI.FrameTreeElement.prototype._rootDOMNodeInvalidated): Deleted.
3529         * UserInterface/Views/ResourceSidebarPanel.js:
3530         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
3531         * UserInterface/Views/ResourcesTabContentView.js:
3532         (WI.ResourcesTabContentView):
3533         (WI.ResourcesTabContentView.prototype.canShowRepresentedObject):
3534
3535 2017-09-21  Ross Kirsling  <ross.kirsling@sony.com>
3536
3537         Web Inspector: Add details sidebar to Layers tab.
3538         https://bugs.webkit.org/show_bug.cgi?id=177115
3539
3540         Reviewed by Devin Rousso.
3541
3542         * Localizations/en.lproj/localizedStrings.js:
3543         * UserInterface/Main.html:
3544         * UserInterface/Views/LayerDetailsSidebarPanel.css: Added.
3545         * UserInterface/Views/LayerDetailsSidebarPanel.js: Added.
3546         New files and strings for sidebar.
3547
3548         * UserInterface/Base/Utilities.js:
3549         Add global identifier for "×" character.
3550         
3551         * UserInterface/Models/Layer.js: Added.
3552         Add a model class for layers so that we can instanceof-check them.
3553
3554         * UserInterface/Controllers/LayerTreeManager.js:
3555         (WI.LayerTreeManager.prototype.layersForNode):
3556         Utilize model class WI.Layer.
3557
3558         * UserInterface/Views/Layers3DContentView.js:
3559         (WI.Layers3DContentView):
3560         (WI.Layers3DContentView.prototype.get supplementalRepresentedObjects):
3561         (WI.Layers3DContentView.prototype.layout):
3562         (WI.Layers3DContentView.prototype._addLayer):
3563         Pass layer data to sidebar and utilize model class WI.Layer.
3564
3565         * UserInterface/Views/LayersTabContentView.js:
3566         (WI.LayersTabContentView):
3567         Attach details sidebar.
3568
3569 2017-09-21  Brian Burg  <bburg@apple.com>
3570
3571         Web Inspector: keyboard shortcut for "Reload page from origin" doesn't match Safari, and doesn't work
3572         https://bugs.webkit.org/show_bug.cgi?id=177010
3573         <rdar://problem/33134548>
3574
3575         Reviewed by Joseph Pecoraro.
3576
3577         I seem to have broken reload from origin via Web Inspector in a previous
3578         patch, because the parameter is 'ignoreCache' instead of 'shouldIgnoreCache'.
3579
3580         * Localizations/en.lproj/localizedStrings.js:
3581         Modernize tooltip text.
3582
3583         * UserInterface/Base/Main.js:
3584         (WI.contentLoaded):
3585         Disambiguate two locals with the same name. Modernize the tooltip.
3586         Make the shortcut Cmd-Opt-R to match Safari. Fix wrong parameter usage.
3587
3588         * UserInterface/Test/FrontendTestHarness.js:
3589         (FrontendTestHarness.prototype.reloadPage):
3590         Fix wrong parameter.
3591
3592 2017-09-19  Joseph Pecoraro  <pecoraro@apple.com>
3593
3594         Web Inspector: Adopt named groups in complex regexes
3595         https://bugs.webkit.org/show_bug.cgi?id=177117
3596
3597         Reviewed by Matt Baker.
3598
3599         * UserInterface/Base/URLUtilities.js:
3600         (parseSecurityOrigin):
3601         (parseDataURL):
3602         (parseURL):
3603         * UserInterface/Models/Color.js:
3604         (WI.Color.fromString):
3605
3606 2017-09-19  Joseph Pecoraro  <pecoraro@apple.com>
3607
3608         REGRESSION(r214494): Web Inspector: Ignore cache button does not work in Network tab
3609         https://bugs.webkit.org/show_bug.cgi?id=177114
3610         <rdar://problem/34505265>
3611
3612         Reviewed by Brian Burg.
3613
3614         * UserInterface/Base/Main.js:
3615         (WI.loaded):
3616         We need to register the settings change handler regardless of what the
3617         initial value of the setting is.
3618
3619 2017-09-18  Matt Baker  <mattbaker@apple.com>
3620
3621         Web Inspector: RemoteObject.resolveNode should return a Promise
3622         https://bugs.webkit.org/show_bug.cgi?id=177042
3623
3624         Reviewed by Joseph Pecoraro.
3625
3626         Update RemoteObject.resolveNode to return a promise instead of taking a
3627         callback. If the promise is fulfilled, `remoteObject` will be non-null.
3628
3629         * UserInterface/Controllers/DOMTreeManager.js:
3630         (WI.DOMTreeManager.prototype.inspectNodeObject.nodeAvailable):
3631         (WI.DOMTreeManager.prototype.inspectNodeObject):
3632         (WI.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved): Deleted.
3633
3634         * UserInterface/Models/DOMNode.js:
3635         (WI.DOMNode.prototype.toggleClass.WI.RemoteObject.resolveNode.then):
3636         (WI.DOMNode.prototype.toggleClass):
3637         (WI.DOMNode.prototype.scrollIntoView.WI.RemoteObject.resolveNode.then):
3638         (WI.DOMNode.prototype.scrollIntoView):
3639         (WI.DOMNode.prototype.toggleClass.resolvedNode.inspectedPage_node_toggleClass): Deleted.
3640         (WI.DOMNode.prototype.toggleClass.resolvedNode): Deleted.
3641         (WI.DOMNode.prototype.scrollIntoView.resolvedNode.inspectedPage_node_scrollIntoView): Deleted.
3642         (WI.DOMNode.prototype.scrollIntoView.resolvedNode): Deleted.
3643
3644         * UserInterface/Protocol/RemoteObject.js:
3645         (WI.RemoteObject.resolveNode):
3646
3647         * UserInterface/Views/BoxModelDetailsSectionRow.js:
3648         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.WI.RemoteObject.resolveNode.then):
3649         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
3650         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.toggleInlineStyleProperty): Deleted.
3651         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode.didToggle): Deleted.
3652         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.resolvedNode): Deleted.
3653         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
3654
3655         * UserInterface/Views/ContextMenuUtilities.js:
3656         (WI.appendContextMenuItemsForDOMNode):
3657
3658         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
3659         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved.inspectedPage_node_collectPrototypes): Deleted.
3660         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodeResolved): Deleted.
3661         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshProperties.nodePrototypesReady): Deleted.
3662
3663         * UserInterface/Views/DOMTreeElement.js:
3664         (WI.DOMTreeElement.prototype._createTooltipForNode.WI.RemoteObject.resolveNode.then):
3665         (WI.DOMTreeElement.prototype._createTooltipForNode):
3666         (WI.DOMTreeElement.prototype._createTooltipForNode.resolvedNode.dimensions): Deleted.
3667         (WI.DOMTreeElement.prototype._createTooltipForNode.resolvedNode): Deleted.
3668
3669         * UserInterface/Views/DOMTreeOutline.js:
3670         (WI.DOMTreeOutline.prototype._hideElement.injectStyleAndToggleClass):
3671         (WI.DOMTreeOutline.prototype._hideElement):
3672         (WI.DOMTreeOutline):
3673         (WI.DOMTreeOutline.prototype._hideElement.resolvedNode.injectStyleAndToggleClass): Deleted.
3674         (WI.DOMTreeOutline.prototype._hideElement.resolvedNode): Deleted.
3675
3676 2017-09-18  Brian Burg  <bburg@apple.com>
3677
3678         Web Inspector: introduce an AppController class and shared instance of it
3679         https://bugs.webkit.org/show_bug.cgi?id=177024
3680
3681         Reviewed by Matt Baker.
3682
3683         WebInspectorUI currently has an app controller singleton that's distributed
3684         among many properties on the WI object, which also serves as a namespace for
3685         classes, enums, and other frontend objects. The singleton should be a proper
3686         class so that we can think more easily about what state is global.
3687
3688         In the process of moving pieces of Main.js into AppController, I intend to move
3689         most UI related code into a view controller class for the top level view.
3690         AppController really shouldn't be doing anything to the view hierarchy or DOM.
3691         It is yet to be determined how responsibility for global DOM events, such as
3692         those for keyboard shortcuts, will be handled.
3693
3694         This larger refactoring project will let us more easily do things like connect
3695         to multiple debuggables in the same Inspector instance, and switch between views
3696         of different debuggable targets. Even if this never comes to pass, the code will
3697         be a lot easier to reason about and maintain in the future.
3698
3699         For the first patch, introduce {AppController, TestAppController} <: AppControllerBase.
3700         Shared code goes in the base class. In the Main.html and Test.html files, first
3701         construct the AppController and then call .initialize() to avoid cyclic dependencies
3702         on the global singleton WI.sharedApp.
3703
3704         * UserInterface/Main.html:
3705         * UserInterface/Test.html:
3706         * UserInterface/Test/Test.js:
3707         (WI.loaded):
3708         * UserInterface/Base/Main.js:
3709         (WI.loaded):
3710         Move some shared code out of here into AppControllerBase.constructor.
3711         Eventually WI.loaded should not exist, and its code will move elsewhere.
3712
3713         (WI.contentLoaded):
3714         Adopt global reference.
3715
3716         * UserInterface/Controllers/AppControllerBase.js: Copied from Source/WebInspectorUI/UserInterface/Protocol/MainTarget.js.
3717         (WI.AppControllerBase):
3718         (WI.AppControllerBase.prototype.get hasExtraDomains):
3719         (WI.AppControllerBase.prototype.get debuggableType):
3720         (WI.AppControllerBase.prototype.initialize):
3721
3722         * UserInterface/Controllers/AppController.js: New.
3723         (WI.AppController):
3724         (WI.AppController.prototype.get hasExtraDomains):
3725         (WI.AppController.prototype.get debuggableType):
3726         (WI.AppController.prototype.activateExtraDomains):
3727
3728         * UserInterface/Test/TestAppController.js: New.
3729         (WI.TestAppController):
3730         (WI.TestAppController.prototype.get hasExtraDomains):
3731         (WI.TestAppController.prototype.get debuggableType):
3732
3733         * UserInterface/Controllers/TimelineManager.js:
3734         (WI.TimelineManager.defaultTimelineTypes):
3735         (WI.TimelineManager.availableTimelineTypes):
3736         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStarted):
3737         (WI.TimelineManager.prototype.scriptProfilerProgrammaticCaptureStopped):
3738         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
3739         * UserInterface/Models/TimelineRecording.js:
3740         (WI.TimelineRecording.sourceCodeTimelinesSupported):
3741         * UserInterface/Protocol/InspectorObserver.js:
3742         (WI.InspectorObserver.prototype.inspect):
3743         (WI.InspectorObserver.prototype.activateExtraDomains):
3744         (WI.InspectorObserver):
3745         * UserInterface/Protocol/MainTarget.js:
3746         (WI.MainTarget):
3747         (WI.MainTarget.prototype.get displayName):
3748         * UserInterface/Views/ResourceSidebarPanel.js:
3749         (WI.ResourceSidebarPanel):
3750         (WI.ResourceSidebarPanel.prototype.initialLayout):
3751         (WI.ResourceSidebarPanel.prototype._addScript):
3752         (WI.ResourceSidebarPanel.prototype._extraDomainsActivated):
3753         * UserInterface/Views/Toolbar.js:
3754         Use WI.sharedApp.{debuggableType, hasExtraDomains}.
3755
3756 2017-09-18  Matt Baker  <mattbaker@apple.com>
3757
3758         Web Inspector: console.assert messages shouldn't end in an exclamation point
3759         https://bugs.webkit.org/show_bug.cgi?id=177054
3760
3761         Reviewed by Joseph Pecoraro.
3762
3763         * UserInterface/Base/EventListener.js:
3764         * UserInterface/Base/EventListenerSet.js:
3765         (WI.EventListenerSet.prototype.register):
3766         Drive-by: make assertions the same in both.
3767
3768         * UserInterface/Views/LayoutTimelineView.js:
3769         (WI.LayoutTimelineView.prototype._processPendingRecords):
3770
3771         * UserInterface/Views/Resizer.js:
3772         (WI.Resizer.prototype._currentPosition):
3773
3774 2017-09-18  Devin Rousso  <webkit@devinrousso.com>
3775
3776         Web Inspector: REGRESSION(r221901): Single frame recordings don't reset the recording navigation item
3777         https://bugs.webkit.org/show_bug.cgi?id=176893
3778
3779         Reviewed by Matt Baker.
3780
3781         * UserInterface/Controllers/CanvasManager.js:
3782         (WI.CanvasManager.prototype.recordingFinished):
3783         Set the `_recordingCanvas` to null whenever a recording has finished and been sent to the
3784         frontend. It is also necessary to do this inside `stopRecording`, as it is possible for the
3785         user to start and stop a recording before any actions are recorded, meaning that no
3786         recording would be sent to the frontend and this function will never get called.
3787
3788 2017-09-17  Nikita Vasilyev  <nvasilyev@apple.com>
3789
3790         Web Inspector: Styles Redesign: support toggling properties
3791         https://bugs.webkit.org/show_bug.cgi?id=176643
3792
3793         Reviewed by Matt Baker.
3794
3795         Add checkboxes to toggle (comment/uncomment) CSS properties.
3796
3797         * UserInterface/Base/Utilities.js:
3798         (String.prototype.get lineCount):
3799         (String.prototype.get lastLine):
3800         Add string methods that are used by WI.CSSProperty.prototype._updateOwnerStyleText.
3801
3802         * UserInterface/Models/CSSProperty.js:
3803         (WI.CSSProperty.prototype.commentOut):
3804         (WI.CSSProperty.prototype.set text):
3805         (WI.CSSProperty.prototype.get editable):
3806         (WI.CSSProperty.prototype._updateOwnerStyleText):
3807         Add methods necessary for property toggling.
3808
3809         * UserInterface/Models/CSSStyleDeclaration.js:
3810         (WI.CSSStyleDeclaration):
3811         (WI.CSSStyleDeclaration.prototype.get allVisibleProperties):
3812         Add a getter that is used by SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesToRender.
3813
3814         (WI.CSSStyleDeclaration.prototype.get visibleProperties):
3815         * UserInterface/Models/TextRange.js:
3816         (WI.TextRange.prototype.clone):
3817         (WI.TextRange.prototype.cloneAndModify):
3818         (WI.TextRange.prototype.relativeTo):
3819         Add methods that are used by WI.CSSProperty.prototype._updateOwnerStyleText.
3820
3821         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3822         (.spreadsheet-style-declaration-editor):
3823         (.spreadsheet-style-declaration-editor .property-toggle):
3824         (.spreadsheet-css-declaration:matches(:hover, :focus) .property-toggle,):
3825         (.spreadsheet-style-declaration-editor .property.disabled,):
3826         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3827         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3828         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set style):
3829         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get _propertiesToRender):
3830         (WI.SpreadsheetCSSStyleDeclarationEditor):
3831         (WI.SpreadsheetStyleProperty):
3832         (WI.SpreadsheetStyleProperty.prototype.get element):
3833         (WI.SpreadsheetStyleProperty.prototype._update):
3834         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
3835         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3836         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
3837         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3838         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
3839         (WI.SpreadsheetRulesStyleDetailsPanel):
3840         * UserInterface/Views/SyntaxHighlightingDefaultTheme.css:
3841         (.cm-s-default .cm-comment,):
3842         * UserInterface/Views/Variables.css:
3843         (:root):
3844         Make comment color a CSS variable.
3845
3846 2017-09-15  Devin Rousso  <webkit@devinrousso.com>
3847
3848         Web Inspector: REGRESSION(r222057): recording state doesn't update when changing actions
3849         https://bugs.webkit.org/show_bug.cgi?id=176988
3850
3851         Reviewed by Matt Baker.
3852
3853         Replace `updateActionIndex` with `updateAction`, where the currently selected RecordingAction
3854         is passed to the DetailsSidebarPanel. Also remove the call to `this._recording.actions` in
3855         order to ensure that all logic performed by both DetailsSidebarPanel is synchronous.
3856
3857         * Localizations/en.lproj/localizedStrings.js:
3858
3859         * UserInterface/Views/RecordingTabContentView.js: