Web Inspector: Display "Resource has no content" for about:blank iframes instead...
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
2
3         Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error
4         https://bugs.webkit.org/show_bug.cgi?id=198029
5
6         Reviewed by Devin Rousso.
7
8         Display "about:blank" in the middle of the content view when selecting "about:blank" resources.
9         Previoulsly, we showed a misleading "An error occurred trying to load the resource" error
10         message.
11
12         * UserInterface/Models/CSSStyleSheet.js:
13         (WI.CSSStyleSheet.prototype.requestContentFromBackend):
14         * UserInterface/Models/Resource.js:
15         (WI.Resource.prototype.requestContentFromBackend):
16         * UserInterface/Models/Script.js:
17         (WI.Script.prototype.requestContentFromBackend):
18         * UserInterface/Models/SourceCode.js:
19         (WI.SourceCode.generateSpecialContentForURL):
20         (WI.SourceCode.prototype._processContent):
21         (WI.SourceCode):
22         * UserInterface/Views/ResourceContentView.js:
23         (WI.ResourceContentView.prototype._contentAvailable):
24
25         * UserInterface/Views/SourceCodeTextEditor.js:
26         (WI.SourceCodeTextEditor.prototype._contentAvailable):
27         (WI.SourceCodeTextEditor.prototype._showMessage):
28         * UserInterface/Views/TextResourceContentView.js:
29         (WI.TextResourceContentView.prototype._contentDidPopulate):
30         Display empty text editor when it has no content instead of "Resource has no content" message.
31
32 2019-07-22  Devin Rousso  <drousso@apple.com>
33
34         Web Inspector: Uncaught Exception: Breakpoint at specified location already exists.
35         https://bugs.webkit.org/show_bug.cgi?id=197034
36         <rdar://problem/50049004>
37
38         Reviewed by Joseph Pecoraro.
39
40         When "adjusting" a `WI.Breakpoint` (e.g. removing and then re-adding with a different
41         configuration), make sure to only re-add the `WI.Breakpoint` to the `WI.Target` it was just
42         removed from, rather to all `WI.targets`.
43
44         Since we iterate over `WI.targets` in both `WI.DebuggerManager.prototype._setBreakpoint` and
45         `WI.DebuggerManager.prototype._removeBreakpoint`, we ended up iterating `WI.targets` twice.
46
47         Each time the `WI.Breakpoint` is removed from a `WI.Target`, pass the `WI.Target` to the
48         `callback` given to `WI.DebuggerManager.prototype._removeBreakpoint`, so that the eventual
49         call to `WI.DebuggerManager.prototype._setBreakpoint` can reuse it as the `specificTarget`,
50         instead of iterating `WI.targets` (meaning we only iterate it once).
51
52         * UserInterface/Controllers/DebuggerManager.js:
53         (WI.DebuggerManager.prototype.addBreakpoint):
54         (WI.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
55         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
56         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
57
58 2019-07-22  Devin Rousso  <drousso@apple.com>
59
60         Localization: change fps to FPS
61         <rdar://problem/53342508>
62
63         Rubber-stamped by Joseph Pecoraro.
64
65         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
66         (WI.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition):
67
68         * Localizations/en.lproj/localizedStrings.js:
69
70 2019-07-19  Devin Rousso  <drousso@apple.com>
71
72         Web Inspector: Issues toggling multiple breakpoints on one line
73         https://bugs.webkit.org/show_bug.cgi?id=199918
74
75         Reviewed by Joseph Pecoraro.
76
77         * UserInterface/Views/SourceCodeTextEditor.js:
78         (WI.SourceCodeTextEditor):
79         (WI.SourceCodeTextEditor.prototype.close):
80         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
81         (WI.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
82         (WI.SourceCodeTextEditor.prototype._handleFormatterDidChange): Added.
83         Listen for `WI.SourceCode.Event.FormatterDidChange` events as there may be multiple content
84         views for the same `WI.SourceCode`. Previously, if there were, only the active one would
85         properly update it's "line -> column -> breakpoint" mapping, causing an error to be thrown
86         when the non-active content views tried to retrieve the breakpoint for the new line/column.
87
88 2019-07-17  Olivier Blin  <olivier.blin@softathome.com>
89
90         Web Inspector: application/xml content not shown
91         https://bugs.webkit.org/show_bug.cgi?id=199861
92
93         Reviewed by Devin Rousso.
94
95         application/xml content from XHR requests was not shown in the
96         inspector, an error message was displayed instead.
97
98         application/xml content should be treated as text, since
99         application/xml is the standard mimetype for XML content.
100         Apache serves XML content with the application/xml mimetype by
101         default.
102
103         * UserInterface/Base/MIMETypeUtilities.js:
104         (WI.fileExtensionForMIMEType):
105         Report "xml" extension for "application/xml" mimetype.
106         (WI.shouldTreatMIMETypeAsText):
107         Treat XML files as text.
108
109 2019-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
110
111         Web Inspector: Changes panel should be strictly LTR
112         https://bugs.webkit.org/show_bug.cgi?id=199767
113
114         Reviewed by Joseph Pecoraro.
115
116         Changes panel is primarily CSS code and CSS is strictly LTR.
117
118         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
119         (WI.ChangesDetailsSidebarPanel):
120
121 2019-07-15  Youenn Fablet  <youenn@apple.com>
122
123         Enable a debug WebRTC mode without any encryption
124         https://bugs.webkit.org/show_bug.cgi?id=199177
125         <rdar://problem/52074986>
126
127         Reviewed by Eric Carlson.
128
129         * Localizations/en.lproj/localizedStrings.js:
130         * UserInterface/Base/Main.js:
131
132 2019-07-15  Greg Doolittle <gr3g@apple.com>
133
134         Web Inspector: AXI: Audit: Typos in Accessibility audits
135         https://bugs.webkit.org/show_bug.cgi?id=199716
136         <rdar://problem/52721711>
137
138         Reviewed by Devin Rousso.
139
140         * UserInterface/Controllers/AuditManager.js:
141
142 2019-07-15  Devin Rousso  <drousso@apple.com>
143
144         Web Inspector: Device Settings: update Safari user agent from 12.2 to 13.0
145         https://bugs.webkit.org/show_bug.cgi?id=199758
146
147         Reviewed by Maciej Stachowiak.
148
149         * UserInterface/Base/Main.js:
150         (WI._handleDeviceSettingsToolbarButtonClicked):
151
152 2019-07-12  Nikita Vasilyev  <nvasilyev@apple.com>
153
154         Web Inspector: Changes: dismissing a blank property makes style rule to show in Changes panel
155         https://bugs.webkit.org/show_bug.cgi?id=199760
156
157         Reviewed by Devin Rousso.
158
159         * UserInterface/Models/CSSProperty.js:
160         (WI.CSSProperty.prototype._updateOwnerStyleText):
161         Call updatePropertiesModifiedState even when _updateOwnerStyleText returns early.
162
163 2019-07-12  Devin Rousso  <drousso@apple.com>
164
165         Web Inspector: Elements: always show all navigation bar items, but disable those that wouldn't work
166         https://bugs.webkit.org/show_bug.cgi?id=199594
167
168         Reviewed by Ross Kirsling.
169
170         Reorder the navigation items of the Elements tab (left to right):
171          - Show rulers
172          - Force print media styles
173          - Force Dark Appearance / Force Light Appearance
174          - Show compositing borders
175          - Enable paint flashing
176          - Show shadow DOM nodes
177         This way, "related" (e.g. print styles and dark/light appearance both relate to CSS media)
178         toggles are grouped closer together.
179
180         * UserInterface/Views/DOMTreeContentView.js:
181         (WI.DOMTreeContentView):
182         (WI.DOMTreeContentView.prototype.get navigationItems):
183         (WI.DOMTreeContentView.prototype._defaultAppearanceDidChange):
184         (WI.DOMTreeContentView.prototype._toggleAppearance):
185
186         * Localizations/en.lproj/localizedStrings.js:
187
188 2019-07-11  Devin Rousso  <drousso@apple.com>
189
190         Web Inspector: Layers: Uncaught Exception: Request with id = 2 failed. {"code":-32601,"message":"'Page' domain was not found","data":[{"code":-32601,"message":"'Page' domain was not found"}]}
191         https://bugs.webkit.org/show_bug.cgi?id=199555
192
193         Reviewed by Joseph Pecoraro.
194
195         Use modern inspected target support checking, and defer agent commands until a target is
196         available.
197
198         * UserInterface/Views/Layers3DContentView.js:
199         (WI.Layers3DContentView):
200         (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
201         (WI.Layers3DContentView.prototype._updateCompositingBordersButtonState):
202         (WI.Layers3DContentView.prototype._toggleCompositingBorders):
203
204         * UserInterface/Views/DOMTreeContentView.js:
205         (WI.DOMTreeContentView):
206         (WI.DOMTreeContentView.prototype._toggleCompositingBorders):
207         (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
208         (WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
209         (WI.DOMTreeContentView.prototype._showPrintStylesChanged):
210         (WI.DOMTreeContentView.prototype._showRulersChanged):
211         Drive-by: apply the same changes to the Elements tab for when the Layers tab isn't enabled.
212
213 2019-07-09  Devin Rousso  <drousso@apple.com>
214
215         Web Inspector: Canvas: replace WTF::Vector with std::initializer_list in CallTracer to avoid dynamic allocations
216         https://bugs.webkit.org/show_bug.cgi?id=199611
217
218         Reviewed by Joseph Pecoraro.
219
220         * UserInterface/Models/Recording.js:
221         (WI.Recording.prototype.async swizzle):
222         Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
223                   would otherwise be treated as an array of numbers.
224
225 2019-07-09  Joseph Pecoraro  <pecoraro@apple.com>
226
227         Web Inspector: Add another Protocol Version (iOS 13.0)
228         https://bugs.webkit.org/show_bug.cgi?id=199631
229         <rdar://problem/47538193>
230
231         Reviewed by Devin Rousso.
232
233         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js: Added.
234         * Versions/Inspector-iOS-13.0.json: Added.
235
236 2019-07-08  Devin Rousso  <drousso@apple.com>
237
238         Web Inspector: Debugger: special breakpoints and event targets should be sorted into separate "areas"
239         https://bugs.webkit.org/show_bug.cgi?id=199554
240
241         Reviewed by Joseph Pecoraro.
242
243         Move the special All Requests breakpoint down to be right above all other URL breakpoints.
244         Move the `window` object tree element below other DOM node tree elements.
245
246         * UserInterface/Views/DebuggerSidebarPanel.js:
247         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
248         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
249         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
250
251 2019-07-08  Devin Rousso  <drousso@apple.com>
252
253         Web Inspector: DOM Debugger: there should be different icons for each type of DOM breakpoint
254         https://bugs.webkit.org/show_bug.cgi?id=199552
255
256         Reviewed by Joseph Pecoraro.
257
258         [S] for Subtree Modified
259         [A] for Attribute Modified
260         [R] for Node Removed
261
262         * UserInterface/Views/DOMBreakpointTreeElement.js:
263         (WI.DOMBreakpointTreeElement):
264         * UserInterface/Views/DOMBreakpointTreeElement.css: Added.
265         (.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
266         (.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
267         (.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
268
269         * UserInterface/Main.html:
270         * UserInterface/Images/DOMBreakpointAttributeModified.svg: Added.
271         * UserInterface/Images/DOMBreakpointNodeRemoved.svg: Added.
272         * UserInterface/Images/DOMBreakpointSubtreeModified.svg: Added.
273
274 2019-07-08  Devin Rousso  <drousso@apple.com>
275
276         Uncaught Exception: Unexpected enum value: CPU
277         https://bugs.webkit.org/show_bug.cgi?id=199564
278
279         Reviewed by Joseph Pecoraro.
280
281         * UserInterface/Controllers/TimelineManager.js:
282         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
283         Filter the list of auto-capture instruments based on what's actually supported, instead of
284         directly using the saved list from the `WI.Setting`.
285
286 2019-07-08  Devin Rousso  <drousso@apple.com>
287
288         Enabling the Layers tab hides the paint flashing button
289         https://bugs.webkit.org/show_bug.cgi?id=199549
290
291         Reviewed by Joseph Pecoraro.
292
293         Still show the Compositing Borders and Paint Flashing navigation items in the Elements tab
294         even when the Layers tab is enabled (just like the Layers details sidebar).
295
296         * UserInterface/Views/DOMTreeContentView.js:
297         (WI.DOMTreeContentView.prototype.get navigationItems):
298         (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
299
300 2019-07-08  Devin Rousso  <drousso@apple.com>
301
302         Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a text node to the DOM tree
303         https://bugs.webkit.org/show_bug.cgi?id=199588
304
305         Reviewed by Joseph Pecoraro.
306
307         * UserInterface/Base/Main.js:
308         (WI._paste):
309         Bail if `event.defaultPrevented`, as that means that something else has handled (and likely
310         overrode) this event.
311
312 2019-07-08  Devin Rousso  <drousso@apple.com>
313
314         Web Inspector: the "x" in the Exception icon overlaps the border
315         https://bugs.webkit.org/show_bug.cgi?id=199553
316
317         Reviewed by Joseph Pecoraro.
318
319         * UserInterface/Images/Exception.svg:
320         * UserInterface/Images/Function.svg:
321         * UserInterface/Images/TailDeletedFunction.svg:
322
323 2019-07-08  Devin Rousso  <drousso@apple.com>
324
325         Web Inspector: Debugger: there should be a different icon for URL breakpoints
326         https://bugs.webkit.org/show_bug.cgi?id=199550
327
328         Reviewed by Joseph Pecoraro.
329
330         Use the same (down|up) arrow icon for the Network Tab and the Network timeline.
331
332         * UserInterface/Views/URLBreakpointTreeElement.js:
333         (WI.URLBreakpointTreeElement):
334         * UserInterface/Views/URLBreakpointTreeElement.css:
335         (.breakpoint.url:not(.breakpoint-paused-icon) .icon): Added.
336
337         * UserInterface/Views/DebuggerSidebarPanel.js:
338         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
339         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
340         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
341
342         * UserInterface/Images/URLBreakpoint.svg: Added.
343
344 2019-07-08  Devin Rousso  <drousso@apple.com>
345
346         Web Inspector: Timelines: CPU: the Duration string isn't localized
347         https://bugs.webkit.org/show_bug.cgi?id=199582
348         <rdar://problem/51698165>
349
350         Reviewed by Joseph Pecoraro.
351
352         * UserInterface/Views/CPUTimelineView.js:
353         (WI.CPUTimelineView.prototype._layoutEnergyChart):
354
355         * Localizations/en.lproj/localizedStrings.js:
356
357 2019-07-06  Nikita Vasilyev  <nvasilyev@apple.com>
358
359         Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
360         https://bugs.webkit.org/show_bug.cgi?id=199090
361         <rdar://problem/51965431>
362
363         Reviewed by Devin Rousso.
364
365         `}` gets added by WI.tokenizeCSSValue (called by SpreadsheetStyleProperty.prototype._renderValue)
366         when it encounters unbalanced quotes. Fix unbalanced quotes by re-rendering the value from the model,
367         not the DOM content.
368
369         * UserInterface/Views/SpreadsheetStyleProperty.js:
370         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
371         For consistency, render property name from the model as well.
372
373 2019-07-05  Devin Rousso  <drousso@apple.com>
374
375         Web Inspector: current call frame indicator not visible in dark mode
376         https://bugs.webkit.org/show_bug.cgi?id=199047
377         <rdar://problem/51922895>
378
379         Reviewed by Timothy Hatcher.
380
381         * UserInterface/Views/CallFrameTreeElement.css:
382         (.tree-outline .item.call-frame .status > .status-image):
383         (.tree-outline .item.call-frame.selected .status > .status-image):
384         Replace the CSS variables used for `fill` with their actual color value (in `light` mode),
385         as the semantic "name" of the variable doesn't really match its usage. As an example, the
386         current call frame shouldn't rely on the value of `--border-color`, as it's not a "border".
387
388 2019-07-05  Matt Baker  <mattbaker@apple.com>
389
390         Web Inspector: Elements: use a CSS transition when showing/hiding DOM breakpoint gutter
391         https://bugs.webkit.org/show_bug.cgi?id=199411
392
393         Reviewed by Devin Rousso.
394
395         * UserInterface/Views/DOMTreeContentView.css:
396         (.content-view.dom-tree .tree-outline.dom):
397
398 2019-07-02  Devin Rousso  <drousso@apple.com>
399
400         Web Inspector: Elements: allow nodes to be copied and pasted
401         https://bugs.webkit.org/show_bug.cgi?id=199182
402
403         Reviewed by Matt Baker.
404
405         Copy is already supported, so there's nothing that needs to be done there.
406
407         Pasting is as simple as calling `insertAdjacentHTML("afterend", ...)` on the selected node.
408
409         * UserInterface/Base/Main.js:
410         (WI.contentLoaded):
411         (WI._paste): Added.
412
413         * UserInterface/Views/DOMTreeContentView.js:
414         (WI.DOMTreeContentView.prototype.handlePasteEvent): Added.
415
416 2019-07-02  Devin Rousso  <drousso@apple.com>
417
418         Web Inspector: DOM Debugger: descendant breakpoints should be able to be enabled/disabled/deleted from a collapsed parent
419         https://bugs.webkit.org/show_bug.cgi?id=199332
420
421         Reviewed by Matt Baker.
422
423         * UserInterface/Controllers/DOMDebuggerManager.js:
424         (WI.DOMDebuggerManager.prototype.get domBreakpoints):
425         (WI.DOMDebuggerManager.prototype.domBreakpointsForNode):
426         (WI.DOMDebuggerManager.prototype.domBreakpointsInSubtree): Added.
427         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
428         (WI.DOMDebuggerManager.prototype._detachDOMBreakpoint):
429         (WI.DOMDebuggerManager.prototype._detachBreakpointsForFrame):
430         (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
431         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
432         Provide a way of getting a "summary" array of `DOMBreakpoint`s for all descendant nodes.
433         Rework the data structure for holding `DOMBreakpoint`s to use a `Multimap` so no duplicates
434         can be added (it uses a `Set` instead of an `Array`).
435
436         * UserInterface/Views/DOMTreeElement.js:
437         (WI.DOMTreeElement):
438         (WI.DOMTreeElement.prototype.get hasBreakpoint):
439         (WI.DOMTreeElement.prototype.set breakpointStatus):
440         (WI.DOMTreeElement.prototype.bindRevealDescendantBreakpointsMenuItemHandler): Added.
441         (WI.DOMTreeElement.prototype._subtreeBreakpointChanged): Added.
442         (WI.DOMTreeElement.prototype._updateBreakpointStatus):
443         (WI.DOMTreeElement.prototype._statusImageContextmenu):
444         (WI.DOMTreeElement.prototype.subtreeBreakpointCountDidChange): Deleted.
445         * UserInterface/Views/DOMTreeOutline.js:
446         (WI.DOMTreeOutline.prototype.populateContextMenu):
447         * UserInterface/Views/ContextMenuUtilities.js:
448         (WI.appendContextMenuItemsForDOMNode):
449         (WI.appendContextMenuItemsForDOMNodeBreakpoints):
450         Keep track of the actual descendant `DOMNodeTreeElement` that have breakpoints, rather than
451         just a count, so that the "Reveal Descendant Breakpoints" action is able to access them.
452         Change "Reveal Descendant Breakpoints" to reveal and select all descendant breakpoints
453         instead of just the first one.
454         Drive-by: don't remove specific (event) listener breakpoints when invoking the
455                   "Delete Descendant Breakpoints" action, as that's not obvious from the UI.
456
457         * UserInterface/Controllers/BreakpointPopoverController.js:
458         (WI.BreakpointPopoverController.prototype.appendContextMenuItems):
459         * UserInterface/Views/DOMBreakpointTreeElement.js:
460         (WI.DOMBreakpointTreeElement.prototype.populateContextMenu):
461         * UserInterface/Views/DOMNodeTreeElement.js:
462         (WI.DOMNodeTreeElement.prototype.populateContextMenu):
463         * UserInterface/Views/EventBreakpointTreeElement.js:
464         (WI.EventBreakpointTreeElement.prototype.populateContextMenu):
465         * UserInterface/Views/URLBreakpointTreeElement.js:
466         (WI.URLBreakpointTreeElement.prototype.populateContextMenu):
467         Remove the separator before "Delete Breakpoint" so all breakpoint actions are in the same section.
468
469         * Localizations/en.lproj/localizedStrings.js:
470         * UserInterface/Base/Multimap.js:
471         (Multimap.prototype.get size): Added.
472
473 2019-07-02  Matt Baker  <mattbaker@apple.com>
474
475         REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on Network Table
476         https://bugs.webkit.org/show_bug.cgi?id=193841
477         <rdar://problem/47559124>
478
479         Reviewed by Devin Rousso.
480
481         Selecting and revealing a row after reloading Table data, but before the
482         layout that populates visible rows, could cause the Table to always be
483         scrolled so that the revealed row is first.
484
485         This patch fixes `revealRow` by calculating the position of the row being
486         revealed in the absence of its DOM element, so that the Table is only
487         scrolled when necessary.
488
489         * UserInterface/Views/Table.js:
490         (WI.Table.prototype.revealRow):
491         (WI.Table.prototype._resizeColumnsAndFiller):
492         Drive-by fix: use realOffsetWidth for consistency.
493         (WI.Table.prototype._updateVisibleRows):
494         (WI.Table.prototype._calculateOffsetHeight):
495         (WI.Table.prototype._calculateScrollTop):
496
497 2019-07-02  Devin Rousso  <drousso@apple.com>
498
499         Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side
500         https://bugs.webkit.org/show_bug.cgi?id=198956
501
502         Reviewed by Matt Baker.
503
504         * UserInterface/Base/Main.js:
505         (WI.reset): Added.
506
507         * UserInterface/Views/SettingsTabContentView.js:
508         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
509
510 2019-07-02  Devin Rousso  <drousso@apple.com>
511
512         Web Inspector: Audit: missing demo audits for WebInspectorAudit functions
513         https://bugs.webkit.org/show_bug.cgi?id=198719
514
515         Reviewed by Matt Baker.
516
517         Other than the LayoutTests, there's no way to see an example of the functionality of many of
518         the exposed `WebInspectorAudit` functions. There should be a demo audit for every exposed
519         function so they're more discoverable.
520
521         * UserInterface/Controllers/AuditManager.js:
522         (WI.AuditManager.prototype._addDefaultTests):
523         (WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Added.
524         Move all demo audit test functions to be actual JavaScript functions, which are then
525         stringified and stripped of unnecessary white-space.
526
527         * Localizations/en.lproj/localizedStrings.js:
528
529 2019-07-01  Devin Rousso  <drousso@apple.com>
530
531         Web Inspector: REGRESSION(r245498): Timelines: CPU: discontinuities are filled in by the next record
532         https://bugs.webkit.org/show_bug.cgi?id=198927
533
534         Reviewed by Matt Baker.
535
536         * UserInterface/Controllers/TimelineManager.js:
537         (WI.TimelineManager.prototype.capturingStarted):
538         (WI.TimelineManager.prototype.capturingStopped):
539         * UserInterface/Models/TimelineRecording.js:
540         (WI.TimelineRecording):
541         (WI.TimelineRecording.prototype.start):
542         (WI.TimelineRecording.prototype.capturingStarted): Added.
543         (WI.TimelineRecording.prototype.capturingStopped): Added.
544         (WI.TimelineRecording.prototype.reset):
545         (WI.TimelineRecording.prototype.addRecord):
546         (WI.TimelineRecording.prototype.discontinuitiesInTimeRange):
547         (WI.TimelineRecording.prototype.addDiscontinuity): Deleted.
548         Notify the `TimelineRecording` when capturing has started/stopped.
549         Adjust the first record after a discontinuity to have it's `startTime` match the `endTime`
550         of the most recent discontinuity.
551
552         * UserInterface/Models/Timeline.js:
553         (WI.Timeline.prototype.addRecord):
554         * UserInterface/Models/CPUTimeline.js:
555         (WI.CPUTimeline.prototype.addRecord):
556         * UserInterface/Models/CPUTimelineRecord.js:
557         (WI.CPUTimelineRecord.prototype.adjustStartTime): Added.
558         (WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted.
559         * UserInterface/Models/MemoryTimeline.js:
560         (WI.MemoryTimeline.prototype.addRecord):
561         * UserInterface/Models/MemoryTimelineRecord.js:
562         (WI.MemoryTimelineRecord.prototype.adjustStartTime): Added.
563         (WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted.
564         * UserInterface/Models/NetworkTimeline.js:
565         (WI.NetworkTimeline.prototype.addRecord):
566
567         * UserInterface/Views/CPUTimelineView.js:
568         (WI.CPUTimelineView.prototype.layout):
569         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
570         (WI.MemoryTimelineOverviewGraph.prototype.layout):
571         * UserInterface/Views/MemoryTimelineView.js:
572         (WI.MemoryTimelineView.prototype.layout):
573         Include discontinuities that exactly match the start/end time of the record immediately
574         before/after the discontinuity.
575
576         * UserInterface/Views/TimelineRecordingContentView.js:
577         (WI.TimelineRecordingContentView):
578         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged):
579         (WI.TimelineRecordingContentView.prototype._recordingReset):
580         Move the logic for handling discontinuity start/end times to the `TimelineRecording`.
581
582         * UserInterface/Base/Utilities.js:
583
584 2019-06-29  Nikita Vasilyev  <nvasilyev@apple.com>
585
586         Web Inspector: Remove trailing white-space
587         https://bugs.webkit.org/show_bug.cgi?id=199346
588
589         Reviewed by Matt Baker.
590
591         * UserInterface/Controllers/NetworkManager.js:
592         (WI.NetworkManager.prototype._initiatorCallFramesFromPayload):
593         * UserInterface/Images/Import.svg:
594         * UserInterface/Views/CanvasOverviewContentView.css:
595         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
596         * UserInterface/Views/DataGrid.css:
597         (.data-grid .resizer):
598         * UserInterface/Views/DatabaseContentView.css:
599         (.storage-view):
600         * UserInterface/Views/GoToLineDialog.css:
601         (@media (prefers-color-scheme: dark)):
602         * UserInterface/Views/GradientSlider.css:
603         (.gradient-slider > .add-area):
604         (.gradient-slider-knob > :matches(img, div)):
605         * UserInterface/Views/ResourceDetailsSection.css:
606         * UserInterface/Views/ScrubberNavigationItem.css:
607         (.navigation-bar .item.scrubber > input[disabled]):
608         * UserInterface/Views/SourceCodeTextEditor.css:
609         (.popover .expandable):
610         * UserInterface/Views/TimelineRecordBar.css:
611         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment,):
612         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
613         (HeapSnapshotWorker.prototype.createSnapshot):
614
615 2019-06-29  Nikita Vasilyev  <nvasilyev@apple.com>
616
617         Remove duplicate "Private" section and fix white space
618
619         Unreviewed code style fix.
620
621         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
622         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
623
624 2019-06-27  Beth Dakin  <bdakin@apple.com>
625
626         Upstream use of MACCATALYST
627         https://bugs.webkit.org/show_bug.cgi?id=199245
628         rdar://problem/51687723
629
630         Reviewed by Tim Horton.
631
632         * Configurations/Base.xcconfig:
633         * Configurations/SDKVariant.xcconfig:
634
635 2019-06-27  Devin Rousso  <drousso@apple.com>
636
637         Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString
638         https://bugs.webkit.org/show_bug.cgi?id=199252
639
640         Reviewed by Joseph Pecoraro.
641
642         Add entries for `console.countReset` and `console.timeLog`.
643
644         Rename `title` to `label` for `console.time`, `console.timeLog`, and `console.timeEnd` to
645         better match the spec.
646
647         * UserInterface/Models/NativeFunctionParameters.js:
648
649 2019-06-26  Joseph Pecoraro  <pecoraro@apple.com>
650
651         Web Inspector: Update legacy backend commands after enum name change
652         https://bugs.webkit.org/show_bug.cgi?id=199250
653
654         Reviewed by Devin Rousso.
655
656         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
657         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
658         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
659
660 2019-06-26  Devin Rousso  <drousso@apple.com>
661
662         Web Inspector: REGRESSION: Elements: the forced pseudo-class indicator isn't visible when hovering
663         https://bugs.webkit.org/show_bug.cgi?id=199166
664
665         Reviewed by Matt Baker.
666
667         Make the pseudo-class indicator into its own element instead of being a `::before`.
668
669         * UserInterface/Views/DOMTreeElement.js:
670         (WI.DOMTreeElement):
671         (WI.DOMTreeElement.prototype.updateSelectionArea):
672         (WI.DOMTreeElement.prototype.updateTitle):
673         (WI.DOMTreeElement.prototype._updatePseudoClassIndicator): Added.
674         (WI.DOMTreeElement.prototype.get pseudoClassesEnabled): Deleted.
675         (WI.DOMTreeElement.prototype._nodePseudoClassesDidChange): Deleted.
676
677         * UserInterface/Views/DOMTreeOutline.css:
678         (.tree-outline.dom):
679         (.tree-outline.dom li .pseudo-class-indicator): Added.
680         (body[dir=ltr] .tree-outline.dom li .pseudo-class-indicator): Added.
681         (body[dir=rtl] .tree-outline.dom li .pseudo-class-indicator): Added.
682         (.tree-outline.dom:focus li.selected .pseudo-class-indicator): Added.
683         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
684         (body[dir=ltr] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
685         (body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
686         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before): Deleted.
687
688         * UserInterface/Views/FormattedValue.css:
689         (.formatted-node > .tree-outline.dom):
690         Adjust the indent of any `DOMTreeOutline` so there's more room for the pseudo-class
691         indicator, such as in the Console.
692
693 2019-06-25  Matt Baker  <mattbaker@apple.com>
694
695         Web Inspector: Elements: show shadow DOM by default
696         https://bugs.webkit.org/show_bug.cgi?id=199128
697
698         Reviewed by Devin Rousso.
699
700         * UserInterface/Base/Setting.js:
701
702         * UserInterface/Test/Test.js:
703         (WI.loaded):
704         Overriding the default value isn't necessary since the default is now true.
705
706 2019-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
707
708         REGRESSION(r246621): Web Inspector: Styles: property may get removed when editing after deleting value
709         https://bugs.webkit.org/show_bug.cgi?id=199143
710         <rdar://problem/52042815>
711
712         Reviewed by Matt Baker.
713
714         r246621 affected when WI.CSSStyleDeclaration.Event.PropertiesChanged event is fired, which caused
715         SpreadsheetCSSStyleDeclarationEditor to possibly enter a state when `focused` property is
716         incorrectly set to false.
717
718         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
719         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved): Removed.
720         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyWillRemove): Added.
721         Renamed from "removed" to "willRemove" since we need to call it before the property DOM element
722         is detached from the document.
723
724         * UserInterface/Views/SpreadsheetStyleProperty.js:
725         (WI.SpreadsheetStyleProperty.prototype.remove):
726         Don't set focused to false when the removed property wasn't focused.
727         This code need to exist because removing focused element from the DOM doesn't trigger blur event.
728
729 2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
730
731         Web Inspector: Implement console.timeLog
732         https://bugs.webkit.org/show_bug.cgi?id=199184
733
734         Reviewed by Devin Rousso.
735
736         * UserInterface/Views/ConsoleMessageView.js:
737         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
738         Time messages (like timeLog) do not include their messageText
739         in their parameters list. So to behave more like normal logs
740         build a parameter list that includes it at the front.
741
742 2019-06-23  Matt Baker  <mattbaker@apple.com>
743
744         Web Inspector: REGRESSION (r246684): Dark Mode: dashboard buttons should have no background
745         https://bugs.webkit.org/show_bug.cgi?id=199136
746         <rdar://problem/52035798>
747
748         Reviewed by Joseph Pecoraro.
749
750         * UserInterface/Views/DefaultDashboardView.css:
751         (@media (prefers-color-scheme: dark)):
752         (.toolbar .dashboard .item.button,):
753
754 2019-06-23  Nikita Vasilyev  <nvasilyev@apple.com>
755
756         Web Inspector: Styles: show green highlight for newly added properties only when name and value are present
757         https://bugs.webkit.org/show_bug.cgi?id=199131
758
759         Reviewed by Matt Baker.
760
761         * UserInterface/Views/SpreadsheetStyleProperty.js:
762         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
763
764 2019-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
765
766         REGRESSION(r241980): Web Inspector: Styles: Pressing Tab/Enter on last property no longer focuses on selector on next rule
767         https://bugs.webkit.org/show_bug.cgi?id=199125
768         <rdar://problem/52011182>
769
770         Reviewed by Matt Baker.
771
772         Since SpreadsheetSelectorField's focus handler was removed in r241980, focusing on the selector element
773         doesn't start editing it.
774
775         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
776         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
777
778 2019-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
779
780         Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
781         https://bugs.webkit.org/show_bug.cgi?id=199090
782         <rdar://problem/51965431>
783
784         Reviewed by Matt Baker.
785
786         * UserInterface/Views/SpreadsheetStyleProperty.js:
787         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
788         Unbalanced quotes and parenthesis are fixed inside of CSSProperty's rawValue setter.
789         Render the value from the model, not the view.
790
791 2019-06-21  Matt Baker  <mattbaker@apple.com>
792
793         Web Inspector: remove unused DataGrid style .force-focus
794         https://bugs.webkit.org/show_bug.cgi?id=199112
795         <rdar://problem/51993412>
796
797         Reviewed by Timothy Hatcher.
798
799         * UserInterface/Views/HeapAllocationsTimelineView.css:
800         (.timeline-view.heap-allocations > .data-grid:not(:focus) tr.selected.invalid):
801         (.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid): Deleted.
802
803         * UserInterface/Views/ResourceTreeElement.css:
804         (.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open,):
805         (.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting,):
806         Missed in https://bugs.webkit.org/show_bug.cgi?id=190480.
807
808 2019-06-21  Matt Baker  <mattbaker@apple.com>
809
810         Web Inspector: remove .legacy-mac/.latest-mac CSS classes, standardize on .latest-mac UI
811         https://bugs.webkit.org/show_bug.cgi?id=199109
812         <rdar://problem/51991129>
813
814         Reviewed by Timothy Hatcher.
815
816         Drop legacy macOS version support from Web Inspector UI.
817
818         * UserInterface/Base/Main.js:
819
820         * UserInterface/Views/DefaultDashboardView.css:
821         (@media (prefers-color-scheme: dark)):
822         (body.latest-mac .toolbar .dashboard .item.button): Deleted.
823
824         * UserInterface/Views/Toolbar.css:
825         (.toolbar):
826         (.toolbar .item.button,):
827         (.toolbar .search-bar > input[type="search"]):
828         (.toolbar .search-bar > input[type="search"]:focus):
829         (@media (-webkit-min-device-pixel-ratio: 2)):
830         (.toolbar .item.button:active):
831         (body.window-inactive .toolbar .item.button,):
832         (@media (prefers-color-scheme: dark)):
833         (.toolbar .search-bar > input[type="search"]::placeholder):
834         (body.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
835         (body.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
836         (.toolbar .dashboard-container):
837         (body .toolbar): Deleted.
838         (body.legacy-mac .toolbar .item.button,): Deleted.
839         (body.legacy-mac .toolbar .search-bar > input[type="search"]): Deleted.
840         (body.legacy-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
841         (body.legacy-mac .toolbar .item.button:active): Deleted.
842         (body.window-inactive.legacy-mac .toolbar .item.button,): Deleted.
843         (body.latest-mac .toolbar .item.button,): Deleted.
844         (body.latest-mac .toolbar .search-bar > input[type="search"]): Deleted.
845         (body.latest-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
846         (body.latest-mac .toolbar .item.button:active): Deleted.
847         (body.latest-mac.window-inactive .toolbar .item.button,): Deleted.
848         (body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
849         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
850         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.
851         (body.latest-mac .toolbar .dashboard-container): Deleted.
852
853 2019-06-20  Matt Baker  <mattbaker@apple.com>
854
855         Web Inspector: rename shadowRootPushed parameter to match protocol
856         https://bugs.webkit.org/show_bug.cgi?id=199098
857
858         Reviewed by Devin Rousso.
859
860         * UserInterface/Protocol/DOMObserver.js:
861         (WI.DOMObserver.prototype.shadowRootPushed):
862
863 2019-06-20  Devin Rousso  <drousso@apple.com>
864
865         Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint
866         https://bugs.webkit.org/show_bug.cgi?id=199082
867
868         Reviewed by Matt Baker.
869
870         * UserInterface/Views/SourceCodeTextEditor.js:
871         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
872         The script syntax tree may be fetched even if the resource hasn't finished parsing (or had
873         a syntax error), so it's possible for it to be `null`.
874
875 2019-06-20  Devin Rousso  <drousso@apple.com>
876
877         Web Inspector: Dark Mode: inactive tab bar item should get darker on hover
878         https://bugs.webkit.org/show_bug.cgi?id=199022
879
880         Reviewed by Darin Adler.
881
882         * UserInterface/Views/TabBar.css:
883         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
884         (@media not (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
885         (@media (prefers-color-scheme: dark) .tab-bar):
886         (@media (prefers-color-scheme: dark) .tab-bar > .item):
887         (@media (prefers-color-scheme: dark) .tab-bar > .item:not(.disabled).selected):
888         (@media (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected):hover):
889         (@media (prefers-color-scheme: dark) body.window-inactive .tab-bar):
890         (@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item):
891         (@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item.selected):
892
893         * UserInterface/Views/Toolbar.css:
894         (@media (prefers-color-scheme: dark) body .toolbar):
895
896 2019-06-20  Devin Rousso  <drousso@apple.com>
897
898         Web Inspector: Debugger: setting a breakpoint on a non-JavaScript line should immediately show as unresolved
899         https://bugs.webkit.org/show_bug.cgi?id=199033
900
901         Reviewed by Matt Baker.
902
903         Remove the `shouldSpeculativelyResolve` parameter, as it was resolving breakpoints even in
904         the case that there were no resolved locations for the given breakpoint.
905
906         In the case that there are resolved locations, the breakpoint would've already been resolved
907         by the time that `shouldSpeculativelyResolve` would've taken effect, so it's unnecessary.
908
909         This parameter was only used when setting a breakpoint from a `SourceCodeTextEditor` gutter.
910
911         * UserInterface/Controllers/DebuggerManager.js:
912         (WI.DebuggerManager.prototype.addBreakpoint):
913         (WI.DebuggerManager.prototype._setBreakpoint):
914         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
915
916         * UserInterface/Views/SourceCodeTextEditor.js:
917         (WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
918
919 2019-06-20  Devin Rousso  <drousso@apple.com>
920
921         Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
922         https://bugs.webkit.org/show_bug.cgi?id=199052
923         <rdar://problem/51923906>
924
925         Reviewed by Matt Baker.
926
927         * UserInterface/Views/DOMTreeElement.js:
928         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
929          - Don't show an "Edit > Tag" for <html>, <head>, and <body> nodes
930          - Disable any "Edit" submenu item if it's target is already being edited
931          - Prevent "Add" submenu items from being shown for text nodes
932
933 2019-06-19  Devin Rousso  <drousso@apple.com>
934
935         Web Inspector: REGRESSION: Debugger: current call frame indicator isn't vertically centered
936         https://bugs.webkit.org/show_bug.cgi?id=199015
937
938         Reviewed by Matt Baker.
939
940         * UserInterface/Views/CallFrameTreeElement.css:
941         (.tree-outline .item.call-frame .status):
942
943 2019-06-19  Nikita Vasilyev  <nvasilyev@apple.com>
944
945         REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
946         https://bugs.webkit.org/show_bug.cgi?id=198505
947         <rdar://problem/51374780>
948
949         Reviewed by Matt Baker.
950
951         Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
952         When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
953         without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.
954
955         * UserInterface/Models/CSSStyleDeclaration.js:
956         (WI.CSSStyleDeclaration):
957         (WI.CSSStyleDeclaration.prototype.set text):
958
959 2019-06-19  Matt Baker  <mattbaker@apple.com>
960
961         Web Inspector: Remove unused _pendingFilter from NetworkTableContentView
962         https://bugs.webkit.org/show_bug.cgi?id=199026
963
964         Reviewed by Devin Rousso.
965
966         This flag is no longer set as of https://trac.webkit.org/changeset/225895.
967
968         * UserInterface/Views/NetworkTableContentView.js:
969         (WI.NetworkTableContentView):
970         (WI.NetworkTableContentView.prototype._processPendingEntries):
971
972 2019-06-19  Devin Rousso  <drousso@apple.com>
973
974         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'sourceCodePosition.lineNumber')
975         https://bugs.webkit.org/show_bug.cgi?id=199019
976
977         Reviewed by Matt Baker.
978
979         * UserInterface/Base/Main.js:
980         (WI.linkifyLocation):
981
982 2019-06-19  Zhifei Fang  <zhifei_fang@apple.com>
983
984         Correct the error object link color in dark mode.
985         https://bugs.webkit.org/show_bug.cgi?id=198033
986
987         Reviewed by Devin Rousso.
988
989         * UserInterface/Views/ErrorObjectView.css:
990         (@media (prefers-dark-interface)):
991         (.error-object-link-container):
992
993 2019-06-18  Devin Rousso  <drousso@apple.com>
994
995         Web Inspector: Network: detail view shouldn't stay open when the related entry is removed
996         https://bugs.webkit.org/show_bug.cgi?id=198951
997
998         Reviewed by Joseph Pecoraro.
999
1000         * UserInterface/Views/NetworkTableContentView.js:
1001         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
1002         Hide the detail view if the main resource changes and we aren't preserving the log.
1003
1004         * UserInterface/Views/Table.js:
1005         (WI.Table.prototype.reloadVisibleColumnCells):
1006         Only attempt to populate cells for rows that the `_dataSource` actually has. Without this,
1007         the `_delegate` may be asked to populate a cell for a row it doesn't have, which would error.
1008
1009 2019-06-18  Devin Rousso  <drousso@apple.com>
1010
1011         Web Inspector: parseQueryParameters fails to successfully parse query parameter values that contain "="
1012         https://bugs.webkit.org/show_bug.cgi?id=198971
1013         <rdar://problem/51852782>
1014
1015         Reviewed by Joseph Pecoraro.
1016
1017         * UserInterface/Base/URLUtilities.js:
1018         (parseQueryString):
1019
1020 2019-06-18  Devin Rousso  <drousso@apple.com>
1021
1022         Web Inspector: REGRESSION: Heap: subsequent snapshots taken manually don't appear in the list
1023         https://bugs.webkit.org/show_bug.cgi?id=198941
1024
1025         Reviewed by Joseph Pecoraro.
1026
1027         Since heap snapshot records can be added at any time, including when not actively recording,
1028         when the "Entire Recording" range is selected, make sure to set the `filterEndTime` to be an
1029         effectively infinite number so that records added later aren't filtered out.
1030
1031         This isn't done for other timeline views as they may have graphs that don't expect to render
1032         from time 0 till infinity, not to mention being unable to add records when not recording.
1033
1034         * UserInterface/Views/TimelineRecordingContentView.js:
1035         (WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
1036
1037 2019-06-18  Devin Rousso  <drousso@apple.com>
1038
1039         Web Inspector: REGRESSION: Canvas: cannot select saved recordings
1040         https://bugs.webkit.org/show_bug.cgi?id=198953
1041
1042         Reviewed by Joseph Pecoraro.
1043
1044         * UserInterface/Views/TreeElement.js:
1045         (WI.TreeElement.treeElementToggled):
1046         Don't early return if the `TreeElement` isn't `selectable` as the owner `TreeOutline` may
1047         want to dispatch an event that it was clicked.
1048
1049 2019-06-18  Devin Rousso  <drousso@apple.com>
1050
1051         Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
1052         https://bugs.webkit.org/show_bug.cgi?id=198952
1053
1054         Reviewed by Joseph Pecoraro.
1055
1056         Prevent any content from being generated until `initialLayout` is called, as otherwise it's
1057         possible for the `CanvasNavigationSidebar` to update the current action index before the
1058         preview element has been created, which would throw an error.
1059
1060         * UserInterface/Views/RecordingContentView.js:
1061         (WI.RecordingContentView.prototype.updateActionIndex):
1062         (WI.RecordingContentView.prototype.initialLayout):
1063         (WI.RecordingContentView.prototype._updateSliderValue):
1064         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
1065         Drive-by: update the slider max each time the selected action index is changed.
1066
1067 2019-06-18  Devin Rousso  <drousso@apple.com>
1068
1069         Web Inspector: Canvas: imported recordings aren't selectable from the overview if there are no canvases in the page
1070         https://bugs.webkit.org/show_bug.cgi?id=198955
1071
1072         Reviewed by Joseph Pecoraro.
1073
1074         * UserInterface/Views/CanvasOverviewContentView.js:
1075         (WI.CanvasOverviewContentView.prototype._addSavedRecording):
1076         Hide the content placeholder when a recording is imported. It won't be shown again because
1077         the `subviews` list will never be empty, as there's no way to remove an imported recording.
1078
1079         * UserInterface/Views/CollectionContentView.js:
1080         (WI.CollectionContentView.prototype.addContentViewForItem):
1081         (WI.CollectionContentView.prototype.removeContentViewForItem):
1082         (WI.CollectionContentView.prototype.showContentPlaceholder): Added.
1083         (WI.CollectionContentView.prototype.hideContentPlaceholder): Added.
1084         (WI.CollectionContentView.prototype.initialLayout):
1085         (WI.CollectionContentView.prototype._selectItem):
1086         (WI.CollectionContentView.prototype._showContentPlaceholder): Deleted.
1087         (WI.CollectionContentView.prototype._hideContentPlaceholder): Deleted.
1088         Make `showContentPlaceholder`/`hideContentPlaceholder` protected for any subclasses to call.
1089
1090 2019-06-17  Matt Baker  <mattbaker@apple.com>
1091
1092         Web Inspector: Elements: remove ellipses from "Break on" context menu item title
1093         https://bugs.webkit.org/show_bug.cgi?id=198944
1094
1095         Reviewed by Devin Rousso.
1096
1097         Update context menu title to comply with Apple HI guidelines.
1098
1099         * Localizations/en.lproj/localizedStrings.js:
1100         * UserInterface/Views/ContextMenuUtilities.js:
1101
1102 2019-06-17  Devin Rousso  <drousso@apple.com>
1103
1104         Web Inspector: Debugger: adding a DOM/Event/URL breakpoint should enable breakpoints
1105         https://bugs.webkit.org/show_bug.cgi?id=198932
1106
1107         Reviewed by Matt Baker.
1108
1109         Match the behavior of JavaScript breakpoints, which enable breakpoints globally when a new
1110         breakpoint is set or an existing breakpoint is enabled.
1111
1112         This avoids the situation where setting a DOM breakpoint or a specific event listener
1113         breakpoint appears to not "work" because breakpoints are globally disabled. There is no
1114         "breakpoints disabled" banner in the Elements tab, so the user could be completely unaware
1115         of this, and therefore be confused as to why these breakpoints aren't being hit.
1116
1117         * UserInterface/Controllers/DOMManager.js:
1118         (WI.DOMManager.prototype._updateEventBreakpoint):
1119
1120         * UserInterface/Controllers/DOMDebuggerManager.js:
1121         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
1122         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
1123         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
1124
1125 2019-06-17  Devin Rousso  <drousso@apple.com>
1126
1127         Web Inspector: Sources: remove extra space above Breakpoints section when breakpoints are disabled
1128         https://bugs.webkit.org/show_bug.cgi?id=198933
1129
1130         Reviewed by Matt Baker.
1131
1132         * UserInterface/Views/DebuggerSidebarPanel.css:
1133         (.sidebar > .panel.navigation.debugger .warning-banner):
1134         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
1135         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
1136
1137 2019-06-17  Devin Rousso  <drousso@apple.com>
1138
1139         Web Inspector: Settings: split the General panel into sub panels so it's less crowded
1140         https://bugs.webkit.org/show_bug.cgi?id=198803
1141
1142         Reviewed by Timothy Hatcher.
1143
1144         * UserInterface/Views/SettingsTabContentView.js:
1145         (WI.SettingsTabContentView.prototype.initialLayout):
1146         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
1147         Many of the settings in General only affect a specific part of Web Inspector, and therefore
1148         aren't really "general".
1149
1150         (WI.SettingsTabContentView.prototype._createElementsSettingsView): Added.
1151          - Element Selection
1152          - CSS Changes
1153
1154         (WI.SettingsTabContentView.prototype._createSourcesSettingsView): Added.
1155          - Debugger
1156          - Source Maps
1157
1158         (WI.SettingsTabContentView.prototype._createConsoleSettingsView): Added.
1159          - Traces (renamed from "Console")
1160          - WebRTC Logging
1161          - Media Logging
1162          - MSE Logging
1163
1164         * Localizations/en.lproj/localizedStrings.js:
1165
1166 2019-06-17  Devin Rousso  <drousso@apple.com>
1167
1168         Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
1169         https://bugs.webkit.org/show_bug.cgi?id=198860
1170
1171         Reviewed by Timothy Hatcher.
1172
1173         * UserInterface/Controllers/CSSManager.js:
1174         (WI.CSSManager.prototype.get styleSheets):
1175         (WI.CSSManager.prototype.inspectorStyleSheetsForFrame):
1176         (WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
1177         (WI.CSSManager.prototype._inspectorStyleSheetsForFrame): Deleted.
1178         Expose a way to fetch all inspector stylesheets for a given frame.
1179         Make sure to associate inspector stylesheets with their frame.
1180
1181         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1182         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
1183         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
1184         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
1185         Add paths for inspector stylesheet creation/fetching when grouping by path.
1186         Sort inspector stylesheets as the first item of an origin/frame when grouping by path.
1187
1188 2019-06-17  Jamal Nasser  <jamaln@mail.com>
1189
1190         Web Inspector: Go To Line dialog is white when in Dark Mode
1191         https://bugs.webkit.org/show_bug.cgi?id=198596
1192
1193         Reviewed by Timothy Hatcher.
1194
1195         * UserInterface/Views/GoToLineDialog.css:
1196         (@media (prefers-color-scheme: dark)):
1197         (.go-to-line-dialog):
1198         (.go-to-line-dialog > div > input):
1199         (.go-to-line-dialog > div > input::placeholder):
1200         (.go-to-line-dialog > div::before):
1201
1202 2019-06-17  Devin Rousso  <drousso@apple.com>
1203
1204         Web Inspector: Sources: searching doesn't use the case sensitive or regex global settings
1205         https://bugs.webkit.org/show_bug.cgi?id=198897
1206
1207         Reviewed by Joseph Pecoraro.
1208
1209         * UserInterface/Views/SourceCodeTextEditor.js:
1210         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
1211
1212 2019-06-13  Devin Rousso  <drousso@apple.com>
1213
1214         Web Inspector: REGRESSION(r246178): extra spaces added in at-rules when formatting CSS
1215         https://bugs.webkit.org/show_bug.cgi?id=198806
1216
1217         Reviewed by Joseph Pecoraro.
1218
1219         * UserInterface/Workers/Formatter/CSSFormatter.js:
1220         (CSSFormatter.prototype._format):
1221         Add more specific tests for at-rules, and add/remove whitespace depending on the type of
1222         at-rule (e.g. `@supports` vs `@media`), as well as where the scanner is in the parameters of
1223         the at at-rule (e.g. `@supports |` vs `@media (|`).
1224
1225         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
1226         (FormatterContentBuilder):
1227         (FormatterContentBuilder.prototype.get lastToken): Added.
1228         (FormatterContentBuilder.prototype.get currentLine):
1229         (FormatterContentBuilder.prototype.removeLastNewline):
1230         (FormatterContentBuilder.prototype.removeLastWhitespace):
1231         (FormatterContentBuilder.prototype._popFormattedContent):
1232         (FormatterContentBuilder.prototype._append):
1233         Update `lastTokenWasNewline` and `lastTokenWasWhitespace` when removing newlines/whitespace.
1234         Memoize the `currentLine` so it's less expensive to re-fetch.
1235
1236 2019-06-13  Devin Rousso  <drousso@apple.com>
1237
1238         Web Inspector: Settings: indent type and size settings aren't respected everywhere
1239         https://bugs.webkit.org/show_bug.cgi?id=198804
1240
1241         Reviewed by Timothy Hatcher.
1242
1243         * UserInterface/Views/CodeMirrorEditor.js:
1244         (WI.CodeMirrorEditor.create):
1245         When creating a `CodeMirror` instance, default to using the global `Setting`s as the options.
1246         If an override is specified in `options`, it will take precedence and the `CodeMirror` will
1247         ignore any changes to the `Setting` as well.
1248
1249         * UserInterface/Views/TextEditor.js:
1250         (WI.TextEditor):
1251         (WI.TextEditor.prototype.close): Deleted.
1252
1253         * UserInterface/Views/AuditTestCaseContentView.js:
1254         (WI.AuditTestCaseContentView.prototype.layout):
1255         * UserInterface/Views/BreakpointActionView.js:
1256         (WI.BreakpointActionView.prototype._updateBody):
1257         * UserInterface/Views/ConsolePrompt.js:
1258         (WI.ConsolePrompt):
1259         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
1260         (WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
1261         Remove overrides that aren't necessary for `CodeMirror` to fit in the container element:
1262          - `showWhitespaceCharacters`
1263          - `indentWithTabs`
1264          - `indentUnit`
1265
1266         * UserInterface/Views/SourceCodeTextEditor.js:
1267         (WI.SourceCodeTextEditor.prototype.close):
1268         * UserInterface/Views/ShaderProgramContentView.js:
1269         (WI.ShaderProgramContentView.prototype.closed): Deleted.
1270         * UserInterface/Views/TextContentView.js:
1271         (WI.TextContentView.prototype.closed): Deleted.
1272         * UserInterface/Views/TextResourceContentView.js:
1273         (WI.TextResourceContentView.prototype.closed):
1274         Delete the logic for removing event listeners from global `Setting`, as it didn't work
1275         anyways, since none of the event listeners were added using a `thisObject`.
1276
1277 2019-06-13  Devin Rousso  <drousso@apple.com>
1278
1279         Web Inspector: Settings: sticky header disappears when over scrolling
1280         https://bugs.webkit.org/show_bug.cgi?id=198833
1281
1282         Reviewed by Joseph Pecoraro.
1283
1284         * UserInterface/Views/SettingsTabContentView.css:
1285         (.content-view.settings .navigation-bar):
1286         (.content-view.settings > .settings-view): Added.
1287         (.content-view.settings): Deleted.
1288
1289 2019-06-10  Devin Rousso  <drousso@apple.com>
1290
1291         Web Inspector: Timelines: imported recordings do not have JavaScript call trees
1292         https://bugs.webkit.org/show_bug.cgi?id=197490
1293         <rdar://problem/50589158>
1294
1295         Reviewed by Joseph Pecoraro.
1296
1297         * UserInterface/Models/TimelineRecording.js:
1298         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
1299         Make sure to actually save the provided stack traces and samples in the export data.
1300
1301         * UserInterface/Models/ScriptTimelineRecord.js:
1302         (WI.ScriptTimelineRecord.fromJSON):
1303         (WI.ScriptTimelineRecord.prototype.toJSON):
1304         Drive-by: include `extraDetails`, which contains useful information like "default prevented".
1305
1306 2019-06-10  Nikita Vasilyev  <nvasilyev@apple.com>
1307
1308         REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work
1309         https://bugs.webkit.org/show_bug.cgi?id=198508
1310         <rdar://problem/51375503>
1311
1312         Reviewed by Matt Baker.
1313
1314         It didn't work because the detached sidebar panel tried to access its parent view (this.parentSidebar).
1315
1316         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
1317         (WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Added.
1318         (WI.ComputedStyleDetailsSidebarPanel):
1319         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
1320         (WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Deleted.
1321         Move computedStyleDetailsPanelShowProperty to ComputedStyleDetailsSidebarPanel since it's the only
1322         panel where it's needed.
1323
1324 2019-06-10  Alexey Shvayka  <shvaikalesh@gmail.com>
1325
1326         Web Inspector: "Copy Path to Property" doesn't work with multiline keys
1327         https://bugs.webkit.org/show_bug.cgi?id=198691
1328
1329         Reviewed by Matt Baker.
1330
1331         Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
1332
1333         * UserInterface/Base/Utilities.js: Use JSON.stringify.
1334
1335 2019-06-10  Devin Rousso  <drousso@apple.com>
1336
1337         Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
1338         https://bugs.webkit.org/show_bug.cgi?id=198721
1339
1340         Reviewed by Joseph Pecoraro.
1341
1342         * UserInterface/Views/ObjectTreeView.css:
1343         (.object-tree.properties-only.json-only .object-tree-property.prototype-property): Added.
1344         (.object-tree.properties-only.json-only .object-tree-property .prototype-property): Deleted.
1345
1346 2019-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
1347
1348         Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough
1349         https://bugs.webkit.org/show_bug.cgi?id=198629
1350         <rdar://problem/51504160>
1351
1352         Reviewed by Devin Rousso.
1353
1354         Longhand CSS properties (e.g. "font-size") overriden by shorthands (e.g. "font") now have strikethroughs.
1355
1356         * UserInterface/Models/CSSProperty.js:
1357         (WI.CSSProperty.prototype.set overridingProperty):
1358         (WI.CSSProperty):
1359
1360         * UserInterface/Models/DOMNodeStyles.js:
1361         (WI.DOMNodeStyles.prototype._updateStyleCascade):
1362         Call _associateRelatedProperties before _markOverriddenProperties because
1363         _associateRelatedProperties sets relatedShorthandProperty property, which
1364         is now used by _markOverriddenProperties.
1365
1366         (WI.DOMNodeStyles.prototype._markOverriddenProperties.isOverriddenBy):
1367         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
1368
1369 2019-06-06  Devin Rousso  <drousso@apple.com>
1370
1371         Web Inspector: Timelines: remove always disabled details sidebar navigation item
1372         https://bugs.webkit.org/show_bug.cgi?id=198393
1373
1374         Reviewed by Timothy Hatcher.
1375
1376         * UserInterface/Views/TimelineTabContentView.js:
1377         (WI.TimelineTabContentView):
1378
1379 2019-06-06  Devin Rousso  <drousso@apple.com>
1380
1381         Web Inspector: REGRESSION(r245833): Timelines: CPU: JavaScript label is missing and JavaScript section of pie chart is black
1382         https://bugs.webkit.org/show_bug.cgi?id=198627
1383
1384         Reviewed by Joseph Pecoraro.
1385
1386         * UserInterface/Views/CPUTimelineView.js:
1387         (WI.CPUTimelineView.displayNameForSampleType):
1388         * UserInterface/Views/CPUTimelineView.css:
1389         (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript):
1390         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-javascript): Added.
1391         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script): Deleted.
1392         * UserInterface/Views/CPUUsageCombinedView.css:
1393         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-javascript): Added.
1394         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-script): Deleted.
1395         Use the enum string added in r245833 (`sample-type-javascript`) instead of what was there
1396         before (`sample-type-script`).
1397
1398         * UserInterface/Views/Variables.css:
1399         (:root):
1400         Rename `--cpu-script-*` to `--cpu-javascript-*`.
1401
1402 2019-06-06  Devin Rousso  <drousso@apple.com>
1403
1404         Web Inspector: Formatter: pretty-print CSS using a Worker
1405         https://bugs.webkit.org/show_bug.cgi?id=197829
1406         <rdar://problem/36891532>
1407
1408         Reviewed by Timothy Hatcher.
1409
1410         * UserInterface/Proxies/FormatterWorkerProxy.js:
1411         (WI.FormatterWorkerProxy.prototype.formatCSS): Added.
1412         * UserInterface/Workers/Formatter/FormatterWorker.js:
1413         (FormatterWorker.prototype.formatCSS): Added.
1414         * UserInterface/Workers/Formatter/CSSFormatter.js: Added.
1415         (CSSFormatter):
1416         (CSSFormatter.prototype.get success):
1417         (CSSFormatter.prototype.get formattedText):
1418         (CSSFormatter.prototype.get sourceMapData):
1419         (CSSFormatter.prototype._format):
1420
1421         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
1422         (FormatterContentBuilder.prototype.get currentLine): Added.
1423
1424         * UserInterface/Views/TextEditor.js:
1425         (WI.TextEditor.prototype._canUseFormatterWorker):
1426         (WI.TextEditor.prototype._startWorkerPrettyPrint):
1427
1428         * .eslintrc:
1429
1430 2019-06-06  Devin Rousso  <drousso@apple.com>
1431
1432         Web Inspector: Elements: print/rulers/compositing/paint navigation items shouldn't be visible if the inspected target doesn't have a PageAgent
1433         https://bugs.webkit.org/show_bug.cgi?id=198410
1434
1435         Reviewed by Timothy Hatcher.
1436
1437         * UserInterface/Views/DOMTreeContentView.js:
1438         (WI.DOMTreeContentView):
1439         (WI.DOMTreeContentView.prototype.get navigationItems):
1440         (WI.DOMTreeContentView.prototype._showRulersChanged):
1441
1442 == Rolled over to ChangeLog-2019-06-05 ==