Web Inspector: Network: detail view shouldn't stay open when the related entry is...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-06-18  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Network: detail view shouldn't stay open when the related entry is removed
4         https://bugs.webkit.org/show_bug.cgi?id=198951
5
6         Reviewed by Joseph Pecoraro.
7
8         * UserInterface/Views/NetworkTableContentView.js:
9         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
10         Hide the detail view if the main resource changes and we aren't preserving the log.
11
12         * UserInterface/Views/Table.js:
13         (WI.Table.prototype.reloadVisibleColumnCells):
14         Only attempt to populate cells for rows that the `_dataSource` actually has. Without this,
15         the `_delegate` may be asked to populate a cell for a row it doesn't have, which would error.
16
17 2019-06-18  Devin Rousso  <drousso@apple.com>
18
19         Web Inspector: parseQueryParameters fails to successfully parse query parameter values that contain "="
20         https://bugs.webkit.org/show_bug.cgi?id=198971
21         <rdar://problem/51852782>
22
23         Reviewed by Joseph Pecoraro.
24
25         * UserInterface/Base/URLUtilities.js:
26         (parseQueryString):
27
28 2019-06-18  Devin Rousso  <drousso@apple.com>
29
30         Web Inspector: REGRESSION: Heap: subsequent snapshots taken manually don't appear in the list
31         https://bugs.webkit.org/show_bug.cgi?id=198941
32
33         Reviewed by Joseph Pecoraro.
34
35         Since heap snapshot records can be added at any time, including when not actively recording,
36         when the "Entire Recording" range is selected, make sure to set the `filterEndTime` to be an
37         effectively infinite number so that records added later aren't filtered out.
38
39         This isn't done for other timeline views as they may have graphs that don't expect to render
40         from time 0 till infinity, not to mention being unable to add records when not recording.
41
42         * UserInterface/Views/TimelineRecordingContentView.js:
43         (WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
44
45 2019-06-18  Devin Rousso  <drousso@apple.com>
46
47         Web Inspector: REGRESSION: Canvas: cannot select saved recordings
48         https://bugs.webkit.org/show_bug.cgi?id=198953
49
50         Reviewed by Joseph Pecoraro.
51
52         * UserInterface/Views/TreeElement.js:
53         (WI.TreeElement.treeElementToggled):
54         Don't early return if the `TreeElement` isn't `selectable` as the owner `TreeOutline` may
55         want to dispatch an event that it was clicked.
56
57 2019-06-18  Devin Rousso  <drousso@apple.com>
58
59         Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
60         https://bugs.webkit.org/show_bug.cgi?id=198952
61
62         Reviewed by Joseph Pecoraro.
63
64         Prevent any content from being generated until `initialLayout` is called, as otherwise it's
65         possible for the `CanvasNavigationSidebar` to update the current action index before the
66         preview element has been created, which would throw an error.
67
68         * UserInterface/Views/RecordingContentView.js:
69         (WI.RecordingContentView.prototype.updateActionIndex):
70         (WI.RecordingContentView.prototype.initialLayout):
71         (WI.RecordingContentView.prototype._updateSliderValue):
72         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
73         Drive-by: update the slider max each time the selected action index is changed.
74
75 2019-06-18  Devin Rousso  <drousso@apple.com>
76
77         Web Inspector: Canvas: imported recordings aren't selectable from the overview if there are no canvases in the page
78         https://bugs.webkit.org/show_bug.cgi?id=198955
79
80         Reviewed by Joseph Pecoraro.
81
82         * UserInterface/Views/CanvasOverviewContentView.js:
83         (WI.CanvasOverviewContentView.prototype._addSavedRecording):
84         Hide the content placeholder when a recording is imported. It won't be shown again because
85         the `subviews` list will never be empty, as there's no way to remove an imported recording.
86
87         * UserInterface/Views/CollectionContentView.js:
88         (WI.CollectionContentView.prototype.addContentViewForItem):
89         (WI.CollectionContentView.prototype.removeContentViewForItem):
90         (WI.CollectionContentView.prototype.showContentPlaceholder): Added.
91         (WI.CollectionContentView.prototype.hideContentPlaceholder): Added.
92         (WI.CollectionContentView.prototype.initialLayout):
93         (WI.CollectionContentView.prototype._selectItem):
94         (WI.CollectionContentView.prototype._showContentPlaceholder): Deleted.
95         (WI.CollectionContentView.prototype._hideContentPlaceholder): Deleted.
96         Make `showContentPlaceholder`/`hideContentPlaceholder` protected for any subclasses to call.
97
98 2019-06-17  Matt Baker  <mattbaker@apple.com>
99
100         Web Inspector: Elements: remove ellipses from "Break on" context menu item title
101         https://bugs.webkit.org/show_bug.cgi?id=198944
102
103         Reviewed by Devin Rousso.
104
105         Update context menu title to comply with Apple HI guidelines.
106
107         * Localizations/en.lproj/localizedStrings.js:
108         * UserInterface/Views/ContextMenuUtilities.js:
109
110 2019-06-17  Devin Rousso  <drousso@apple.com>
111
112         Web Inspector: Debugger: adding a DOM/Event/URL breakpoint should enable breakpoints
113         https://bugs.webkit.org/show_bug.cgi?id=198932
114
115         Reviewed by Matt Baker.
116
117         Match the behavior of JavaScript breakpoints, which enable breakpoints globally when a new
118         breakpoint is set or an existing breakpoint is enabled.
119
120         This avoids the situation where setting a DOM breakpoint or a specific event listener
121         breakpoint appears to not "work" because breakpoints are globally disabled. There is no
122         "breakpoints disabled" banner in the Elements tab, so the user could be completely unaware
123         of this, and therefore be confused as to why these breakpoints aren't being hit.
124
125         * UserInterface/Controllers/DOMManager.js:
126         (WI.DOMManager.prototype._updateEventBreakpoint):
127
128         * UserInterface/Controllers/DOMDebuggerManager.js:
129         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
130         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
131         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
132
133 2019-06-17  Devin Rousso  <drousso@apple.com>
134
135         Web Inspector: Sources: remove extra space above Breakpoints section when breakpoints are disabled
136         https://bugs.webkit.org/show_bug.cgi?id=198933
137
138         Reviewed by Matt Baker.
139
140         * UserInterface/Views/DebuggerSidebarPanel.css:
141         (.sidebar > .panel.navigation.debugger .warning-banner):
142         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
143         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
144
145 2019-06-17  Devin Rousso  <drousso@apple.com>
146
147         Web Inspector: Settings: split the General panel into sub panels so it's less crowded
148         https://bugs.webkit.org/show_bug.cgi?id=198803
149
150         Reviewed by Timothy Hatcher.
151
152         * UserInterface/Views/SettingsTabContentView.js:
153         (WI.SettingsTabContentView.prototype.initialLayout):
154         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
155         Many of the settings in General only affect a specific part of Web Inspector, and therefore
156         aren't really "general".
157
158         (WI.SettingsTabContentView.prototype._createElementsSettingsView): Added.
159          - Element Selection
160          - CSS Changes
161
162         (WI.SettingsTabContentView.prototype._createSourcesSettingsView): Added.
163          - Debugger
164          - Source Maps
165
166         (WI.SettingsTabContentView.prototype._createConsoleSettingsView): Added.
167          - Traces (renamed from "Console")
168          - WebRTC Logging
169          - Media Logging
170          - MSE Logging
171
172         * Localizations/en.lproj/localizedStrings.js:
173
174 2019-06-17  Devin Rousso  <drousso@apple.com>
175
176         Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
177         https://bugs.webkit.org/show_bug.cgi?id=198860
178
179         Reviewed by Timothy Hatcher.
180
181         * UserInterface/Controllers/CSSManager.js:
182         (WI.CSSManager.prototype.get styleSheets):
183         (WI.CSSManager.prototype.inspectorStyleSheetsForFrame):
184         (WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
185         (WI.CSSManager.prototype._inspectorStyleSheetsForFrame): Deleted.
186         Expose a way to fetch all inspector stylesheets for a given frame.
187         Make sure to associate inspector stylesheets with their frame.
188
189         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
190         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
191         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
192         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
193         Add paths for inspector stylesheet creation/fetching when grouping by path.
194         Sort inspector stylesheets as the first item of an origin/frame when grouping by path.
195
196 2019-06-17  Jamal Nasser  <jamaln@mail.com>
197
198         Web Inspector: Go To Line dialog is white when in Dark Mode
199         https://bugs.webkit.org/show_bug.cgi?id=198596
200
201         Reviewed by Timothy Hatcher.
202
203         * UserInterface/Views/GoToLineDialog.css:
204         (@media (prefers-color-scheme: dark)):
205         (.go-to-line-dialog):
206         (.go-to-line-dialog > div > input):
207         (.go-to-line-dialog > div > input::placeholder):
208         (.go-to-line-dialog > div::before):
209
210 2019-06-17  Devin Rousso  <drousso@apple.com>
211
212         Web Inspector: Sources: searching doesn't use the case sensitive or regex global settings
213         https://bugs.webkit.org/show_bug.cgi?id=198897
214
215         Reviewed by Joseph Pecoraro.
216
217         * UserInterface/Views/SourceCodeTextEditor.js:
218         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
219
220 2019-06-13  Devin Rousso  <drousso@apple.com>
221
222         Web Inspector: REGRESSION(r246178): extra spaces added in at-rules when formatting CSS
223         https://bugs.webkit.org/show_bug.cgi?id=198806
224
225         Reviewed by Joseph Pecoraro.
226
227         * UserInterface/Workers/Formatter/CSSFormatter.js:
228         (CSSFormatter.prototype._format):
229         Add more specific tests for at-rules, and add/remove whitespace depending on the type of
230         at-rule (e.g. `@supports` vs `@media`), as well as where the scanner is in the parameters of
231         the at at-rule (e.g. `@supports |` vs `@media (|`).
232
233         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
234         (FormatterContentBuilder):
235         (FormatterContentBuilder.prototype.get lastToken): Added.
236         (FormatterContentBuilder.prototype.get currentLine):
237         (FormatterContentBuilder.prototype.removeLastNewline):
238         (FormatterContentBuilder.prototype.removeLastWhitespace):
239         (FormatterContentBuilder.prototype._popFormattedContent):
240         (FormatterContentBuilder.prototype._append):
241         Update `lastTokenWasNewline` and `lastTokenWasWhitespace` when removing newlines/whitespace.
242         Memoize the `currentLine` so it's less expensive to re-fetch.
243
244 2019-06-13  Devin Rousso  <drousso@apple.com>
245
246         Web Inspector: Settings: indent type and size settings aren't respected everywhere
247         https://bugs.webkit.org/show_bug.cgi?id=198804
248
249         Reviewed by Timothy Hatcher.
250
251         * UserInterface/Views/CodeMirrorEditor.js:
252         (WI.CodeMirrorEditor.create):
253         When creating a `CodeMirror` instance, default to using the global `Setting`s as the options.
254         If an override is specified in `options`, it will take precedence and the `CodeMirror` will
255         ignore any changes to the `Setting` as well.
256
257         * UserInterface/Views/TextEditor.js:
258         (WI.TextEditor):
259         (WI.TextEditor.prototype.close): Deleted.
260
261         * UserInterface/Views/AuditTestCaseContentView.js:
262         (WI.AuditTestCaseContentView.prototype.layout):
263         * UserInterface/Views/BreakpointActionView.js:
264         (WI.BreakpointActionView.prototype._updateBody):
265         * UserInterface/Views/ConsolePrompt.js:
266         (WI.ConsolePrompt):
267         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
268         (WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
269         Remove overrides that aren't necessary for `CodeMirror` to fit in the container element:
270          - `showWhitespaceCharacters`
271          - `indentWithTabs`
272          - `indentUnit`
273
274         * UserInterface/Views/SourceCodeTextEditor.js:
275         (WI.SourceCodeTextEditor.prototype.close):
276         * UserInterface/Views/ShaderProgramContentView.js:
277         (WI.ShaderProgramContentView.prototype.closed): Deleted.
278         * UserInterface/Views/TextContentView.js:
279         (WI.TextContentView.prototype.closed): Deleted.
280         * UserInterface/Views/TextResourceContentView.js:
281         (WI.TextResourceContentView.prototype.closed):
282         Delete the logic for removing event listeners from global `Setting`, as it didn't work
283         anyways, since none of the event listeners were added using a `thisObject`.
284
285 2019-06-13  Devin Rousso  <drousso@apple.com>
286
287         Web Inspector: Settings: sticky header disappears when over scrolling
288         https://bugs.webkit.org/show_bug.cgi?id=198833
289
290         Reviewed by Joseph Pecoraro.
291
292         * UserInterface/Views/SettingsTabContentView.css:
293         (.content-view.settings .navigation-bar):
294         (.content-view.settings > .settings-view): Added.
295         (.content-view.settings): Deleted.
296
297 2019-06-10  Devin Rousso  <drousso@apple.com>
298
299         Web Inspector: Timelines: imported recordings do not have JavaScript call trees
300         https://bugs.webkit.org/show_bug.cgi?id=197490
301         <rdar://problem/50589158>
302
303         Reviewed by Joseph Pecoraro.
304
305         * UserInterface/Models/TimelineRecording.js:
306         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
307         Make sure to actually save the provided stack traces and samples in the export data.
308
309         * UserInterface/Models/ScriptTimelineRecord.js:
310         (WI.ScriptTimelineRecord.fromJSON):
311         (WI.ScriptTimelineRecord.prototype.toJSON):
312         Drive-by: include `extraDetails`, which contains useful information like "default prevented".
313
314 2019-06-10  Nikita Vasilyev  <nvasilyev@apple.com>
315
316         REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work
317         https://bugs.webkit.org/show_bug.cgi?id=198508
318         <rdar://problem/51375503>
319
320         Reviewed by Matt Baker.
321
322         It didn't work because the detached sidebar panel tried to access its parent view (this.parentSidebar).
323
324         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
325         (WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Added.
326         (WI.ComputedStyleDetailsSidebarPanel):
327         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
328         (WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Deleted.
329         Move computedStyleDetailsPanelShowProperty to ComputedStyleDetailsSidebarPanel since it's the only
330         panel where it's needed.
331
332 2019-06-10  Alexey Shvayka  <shvaikalesh@gmail.com>
333
334         Web Inspector: "Copy Path to Property" doesn't work with multiline keys
335         https://bugs.webkit.org/show_bug.cgi?id=198691
336
337         Reviewed by Matt Baker.
338
339         Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
340
341         * UserInterface/Base/Utilities.js: Use JSON.stringify.
342
343 2019-06-10  Devin Rousso  <drousso@apple.com>
344
345         Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
346         https://bugs.webkit.org/show_bug.cgi?id=198721
347
348         Reviewed by Joseph Pecoraro.
349
350         * UserInterface/Views/ObjectTreeView.css:
351         (.object-tree.properties-only.json-only .object-tree-property.prototype-property): Added.
352         (.object-tree.properties-only.json-only .object-tree-property .prototype-property): Deleted.
353
354 2019-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
355
356         Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough
357         https://bugs.webkit.org/show_bug.cgi?id=198629
358         <rdar://problem/51504160>
359
360         Reviewed by Devin Rousso.
361
362         Longhand CSS properties (e.g. "font-size") overriden by shorthands (e.g. "font") now have strikethroughs.
363
364         * UserInterface/Models/CSSProperty.js:
365         (WI.CSSProperty.prototype.set overridingProperty):
366         (WI.CSSProperty):
367
368         * UserInterface/Models/DOMNodeStyles.js:
369         (WI.DOMNodeStyles.prototype._updateStyleCascade):
370         Call _associateRelatedProperties before _markOverriddenProperties because
371         _associateRelatedProperties sets relatedShorthandProperty property, which
372         is now used by _markOverriddenProperties.
373
374         (WI.DOMNodeStyles.prototype._markOverriddenProperties.isOverriddenBy):
375         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
376
377 2019-06-06  Devin Rousso  <drousso@apple.com>
378
379         Web Inspector: Timelines: remove always disabled details sidebar navigation item
380         https://bugs.webkit.org/show_bug.cgi?id=198393
381
382         Reviewed by Timothy Hatcher.
383
384         * UserInterface/Views/TimelineTabContentView.js:
385         (WI.TimelineTabContentView):
386
387 2019-06-06  Devin Rousso  <drousso@apple.com>
388
389         Web Inspector: REGRESSION(r245833): Timelines: CPU: JavaScript label is missing and JavaScript section of pie chart is black
390         https://bugs.webkit.org/show_bug.cgi?id=198627
391
392         Reviewed by Joseph Pecoraro.
393
394         * UserInterface/Views/CPUTimelineView.js:
395         (WI.CPUTimelineView.displayNameForSampleType):
396         * UserInterface/Views/CPUTimelineView.css:
397         (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript):
398         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-javascript): Added.
399         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script): Deleted.
400         * UserInterface/Views/CPUUsageCombinedView.css:
401         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-javascript): Added.
402         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-script): Deleted.
403         Use the enum string added in r245833 (`sample-type-javascript`) instead of what was there
404         before (`sample-type-script`).
405
406         * UserInterface/Views/Variables.css:
407         (:root):
408         Rename `--cpu-script-*` to `--cpu-javascript-*`.
409
410 2019-06-06  Devin Rousso  <drousso@apple.com>
411
412         Web Inspector: Formatter: pretty-print CSS using a Worker
413         https://bugs.webkit.org/show_bug.cgi?id=197829
414         <rdar://problem/36891532>
415
416         Reviewed by Timothy Hatcher.
417
418         * UserInterface/Proxies/FormatterWorkerProxy.js:
419         (WI.FormatterWorkerProxy.prototype.formatCSS): Added.
420         * UserInterface/Workers/Formatter/FormatterWorker.js:
421         (FormatterWorker.prototype.formatCSS): Added.
422         * UserInterface/Workers/Formatter/CSSFormatter.js: Added.
423         (CSSFormatter):
424         (CSSFormatter.prototype.get success):
425         (CSSFormatter.prototype.get formattedText):
426         (CSSFormatter.prototype.get sourceMapData):
427         (CSSFormatter.prototype._format):
428
429         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
430         (FormatterContentBuilder.prototype.get currentLine): Added.
431
432         * UserInterface/Views/TextEditor.js:
433         (WI.TextEditor.prototype._canUseFormatterWorker):
434         (WI.TextEditor.prototype._startWorkerPrettyPrint):
435
436         * .eslintrc:
437
438 2019-06-06  Devin Rousso  <drousso@apple.com>
439
440         Web Inspector: Elements: print/rulers/compositing/paint navigation items shouldn't be visible if the inspected target doesn't have a PageAgent
441         https://bugs.webkit.org/show_bug.cgi?id=198410
442
443         Reviewed by Timothy Hatcher.
444
445         * UserInterface/Views/DOMTreeContentView.js:
446         (WI.DOMTreeContentView):
447         (WI.DOMTreeContentView.prototype.get navigationItems):
448         (WI.DOMTreeContentView.prototype._showRulersChanged):
449
450 == Rolled over to ChangeLog-2019-06-05 ==