Web Inspector: Page: don't allow the domain to be disabled
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2019-08-08  Devin Rousso  <drousso@apple.com>
2
3         Web Inspector: Page: don't allow the domain to be disabled
4         https://bugs.webkit.org/show_bug.cgi?id=200109
5
6         Reviewed by Brian Burg.
7
8         The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
9         sense to support the ability to "disable" (as well as "enable") the agent.
10
11         When the first frontend connects, we should treat the `PageAgent` as active and available.
12
13         * UserInterface/Controllers/NetworkManager.js:
14         (WI.NetworkManager.prototype.initializeTarget):
15
16         * Test/Test.js:
17         (WI.loaded):
18         (WI.initializeBackendTarget):
19         (WI.contentLoaded):
20         (WI.targetsAvailable): Added.
21         (WI.whenTargetsAvailable): Added.
22         * Test/TestStub.js:
23         Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
24         messages being sent to the frontend are batched.
25
26 2019-08-08  Devin Rousso  <drousso@apple.com>
27
28         Web Inspector: rename `queryObjects` to `queryInstances` for clarity
29         https://bugs.webkit.org/show_bug.cgi?id=200520
30
31         Reviewed by Brian Burg.
32
33         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
34
35 2019-08-07  Devin Rousso  <drousso@apple.com>
36
37         Fix construction of `WI.EventBreakpoint` after r248201
38
39         Reviewed by Joseph Pecoraro.
40
41         * UserInterface/Controllers/DOMManager.js:
42         (WI.DOMManager.prototype.setBreakpointForEventListener):
43
44 2019-08-07  Devin Rousso  <drousso@apple.com>
45
46         Web Inspector: Settings: add an Engineering pane to expose useful settings for other WebKit engineers
47         https://bugs.webkit.org/show_bug.cgi?id=200492
48
49         Reviewed by Joseph Pecoraro.
50
51         Other WebKit engineers might find being able to see internal objects or pause in internal
52         scripts useful, so we should allow them to do so without having to enable Web Inspector's
53         debug "mode".
54
55         A new "Engineering" pane is added to the Settings Tab:
56          - Debugging
57             - Show WebKit-internal scripts
58             - Pause in WebKit-internal scripts
59          - Heap Snapshot
60             - Show Internal Objects
61             - Show Private Symbols
62
63         * UserInterface/Base/Setting.js:
64         * UserInterface/Views/SettingsTabContentView.js:
65         (WI.SettingsTabContentView.prototype.initialLayout):
66         (WI.SettingsTabContentView.prototype._createEngineeringSettingsView): Added.
67         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
68
69         * UserInterface/Base/Main.js:
70         (WI.resolvedLayoutDirection):
71         (WI.setLayoutDirection):
72         * UserInterface/Base/Object.js:
73
74         * UserInterface/Protocol/InspectorBackend.js:
75         (InspectorBackendClass):
76         (InspectorBackendClass.prototype.set dumpInspectorProtocolMessages):
77         (InspectorBackendClass.prototype.get dumpInspectorProtocolMessages):
78         (InspectorBackendClass.prototype.set dumpInspectorTimeStats):
79         (InspectorBackendClass.prototype.get dumpInspectorTimeStats):
80         (InspectorBackendClass.prototype.set filterMultiplexingBackendInspectorProtocolMessages):
81         (InspectorBackendClass.prototype.get filterMultiplexingBackendInspectorProtocolMessages):
82         * UserInterface/Protocol/RemoteObject.js:
83         (WI.RemoteObject.prototype.findFunctionSourceCodeLocation):
84         * UserInterface/Debug/Bootstrap.js:
85         (WI.runBootstrapOperations):
86         * UserInterface/Debug/UncaughtExceptionReporter.js:
87         (handleUncaughtExceptionRecord):
88         * UserInterface/Models/CSSProperty.js:
89         (WI.CSSProperty.prototype._updateOwnerStyleText):
90         * UserInterface/Models/CSSStyleDeclaration.js:
91         (WI.CSSStyleDeclaration.prototype.update):
92         * UserInterface/Controllers/DebuggerManager.js:
93         (WI.DebuggerManager):
94         (WI.DebuggerManager.prototype.initializeTarget):
95         (WI.DebuggerManager.prototype.get knownNonResourceScripts):
96         (WI.DebuggerManager.prototype.debuggerDidPause):
97         (WI.DebuggerManager.prototype.scriptDidParse):
98         (WI.DebuggerManager.prototype._handleEngineeringShowInternalScriptsSettingChanged): Added.
99         (WI.DebuggerManager.prototype._handleEngineeringPauseForInternalScriptsSettingChanged): Added.
100         (WI.DebuggerManager.prototype._pauseForInternalScriptsDidChange): Deleted.
101         (WI.DebuggerManager.prototype._debugUIEnabledDidChange): Deleted.
102         * UserInterface/Views/ConsoleMessageView.js:
103         (WI.ConsoleMessageView.prototype._appendLocationLink):
104         * UserInterface/Views/HeapSnapshotDataGridTree.js:
105         (WI.HeapSnapshotInstancesDataGridTree.prototype.populateTopLevel):
106         * UserInterface/Views/OpenResourceDialog.js:
107         (WI.OpenResourceDialog.prototype._addScriptsForTarget):
108         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
109         (WI.SpreadsheetCSSStyleDeclarationEditor):
110         * UserInterface/Views/StackTraceView.js:
111         (WI.StackTraceView):
112         * UserInterface/Views/View.js:
113         (WI.View.prototype._layoutSubtree):
114
115 2019-08-07  Nikita Vasilyev  <nvasilyev@apple.com>
116
117         Web Inspector: RTL: content of Variables section should always be LTR
118         https://bugs.webkit.org/show_bug.cgi?id=200481
119
120         Reviewed by Devin Rousso.
121
122         * UserInterface/Views/ComputedStyleDetailsPanel.js:
123         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
124
125 2019-08-07  Devin Rousso  <drousso@apple.com>
126
127         Web Inspector: Uncaught Exception: TimelineAgent already enabled
128         https://bugs.webkit.org/show_bug.cgi?id=200513
129
130         Reviewed by Joseph Pecoraro.
131
132         Update some incorrect compatibility comments from r248286.
133
134         * UserInterface/Protocol/InspectorFrontendAPI.js:
135         * UserInterface/Controllers/TimelineManager.js:
136
137 2019-08-06  Devin Rousso  <drousso@apple.com>
138
139         Web Inspector: Show radius values in box model metrics view
140         https://bugs.webkit.org/show_bug.cgi?id=160993
141         <rdar://problem/27919035>
142
143         Reviewed by Brian Burg.
144
145         * UserInterface/Views/BoxModelDetailsSectionRow.js:
146         (WI.BoxModelDetailsSectionRow.prototype._getPropertyValue): Added.
147         (WI.BoxModelDetailsSectionRow.prototype._getPropertyValueAsPx):
148         (WI.BoxModelDetailsSectionRow.prototype._getBox):
149         (WI.BoxModelDetailsSectionRow.prototype._getComponentPrefix): Added.
150         (WI.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
151         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
152         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
153         (WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
154         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput):
155         (WI.BoxModelDetailsSectionRow.prototype._applyUserInput.inspectedPage_node_toggleInlineStyleProperty):
156         * UserInterface/Views/BoxModelDetailsSectionRow.css:
157         (.details-section .row.box-model .box): Added.
158         (.details-section .row.box-model .box > .label): Added.
159         (.details-section .row.box-model .box.position): Added.
160         (.details-section .row.box-model .box.margin): Added.
161         (.details-section .row.box-model:not(.hovered) .box.margin, .details-section .row.box-model .box.margin.active): Added.
162         (.details-section .row.box-model .box.border): Added.
163         (.details-section .row.box-model:not(.hovered) .box.border, .details-section .row.box-model .box.border.active): Added.
164         (.details-section .row.box-model .box.border > .label): Added.
165         (.details-section .row.box-model .box.border.has-top-left-radius, .details-section .row.box-model .box.border.has-top-left-radius .box): Added.
166         (.details-section .row.box-model .box.border.has-top-right-radius, .details-section .row.box-model .box.border.has-top-right-radius .box): Added.
167         (.details-section .row.box-model .box.border.has-bottom-right-radius, .details-section .row.box-model .box.border.has-bottom-right-radius .box): Added.
168         (.details-section .row.box-model .box.border.has-bottom-left-radius, .details-section .row.box-model .box.border.has-bottom-left-radius .box): Added.
169         (.details-section .row.box-model .box.padding): Added.
170         (.details-section .row.box-model:not(.hovered) .box.padding, .details-section .row.box-model .box.padding.active): Added.
171         (.details-section .row.box-model .box.content): Added.
172         (.details-section .row.box-model:not(.hovered) .box.content, .details-section .row.box-model .box.content.active): Added.
173         (.details-section .row.box-model :matches(.top, .right, .bottom, .left)): Added.
174         (.details-section .row.box-model :matches(.top, .right, .bottom, .left):not(.editing), .details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
175         (.details-section .row.box-model :matches(.top-left, .top-right, .bottom-right, .bottom-left)): Added.
176         (.details-section .row.box-model :matches(.top-left, .top-right)): Added.
177         (.details-section .row.box-model :matches(.bottom-left, .bottom-right):not(.editing)): Added.
178         (.details-section .row.box-model :matches(.bottom-left, .bottom-right).editing): Added.
179         (.details-section .row.box-model :matches(.top-left, .bottom-left):not(.editing)): Added.
180         (.details-section .row.box-model :matches(.top-left, .bottom-left).editing): Added.
181         (.details-section .row.box-model :matches(.top-right, .bottom-right):not(.editing)): Added.
182         (.details-section .row.box-model :matches(.top-right, .bottom-right).editing): Added.
183         (@media (prefers-color-scheme: dark) .details-section .row.box-model .box): Added.
184         (@media (prefers-color-scheme: dark) .details-section .row.box-model:not(.hovered) .box:matches(.margin, .border, .padding, .content), .details-section .row.box-model .box.active:matches(.margin, .border, .padding, .content)): Added.
185         (@media (prefers-color-scheme: dark) .details-section .row.box-model .box.margin): Added.
186         (@media (prefers-color-scheme: dark) .details-section .row.box-model .box.border): Added.
187         (.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)): Deleted.
188         (.details-section .row.box-model .position): Deleted.
189         (.details-section .row.box-model .margin): Deleted.
190         (.details-section .row.box-model:not(.hovered) .margin, .details-section .row.box-model .margin.active): Deleted.
191         (.details-section .row.box-model .border): Deleted.
192         (.details-section .row.box-model:not(.hovered) .border, .details-section .row.box-model .border.active): Deleted.
193         (.details-section .row.box-model .padding): Deleted.
194         (.details-section .row.box-model:not(.hovered) .padding, .details-section .row.box-model .padding.active): Deleted.
195         (.details-section .row.box-model .content): Deleted.
196         (.details-section .row.box-model:not(.hovered) .content, .details-section .row.box-model .content.active): Deleted.
197         (.details-section .row.box-model :matches(.content span, .top, .right, .bottom, .left)): Deleted.
198         (.details-section .row.box-model :matches(.right, .left)): Deleted.
199         (.details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content), .details-section .row.box-model .active:matches(.margin, .border, .padding, .content)): Deleted.
200
201         * UserInterface/Models/CSSProperty.js:
202         (WI.CSSProperty.prototype.update):
203         Ensure that the `_value` is updated whenever the `_rawValue` is updated.
204
205 2019-08-06  Commit Queue  <commit-queue@webkit.org>
206
207         Unreviewed, rolling out r248289.
208         https://bugs.webkit.org/show_bug.cgi?id=200488
209
210         Broke internal builds (Requested by drousso on #webkit).
211
212         Reverted changeset:
213
214         "Web Inspector: Styles: show @supports CSS groupings"
215         https://bugs.webkit.org/show_bug.cgi?id=200419
216         https://trac.webkit.org/changeset/248289
217
218 2019-08-06  Nikita Vasilyev  <nvasilyev@apple.com>
219
220         Web Inspector: RTL: go-to arrows and expand triangles in Computed panel should match their context
221         https://bugs.webkit.org/show_bug.cgi?id=200449
222
223         Reviewed by Joseph Pecoraro.
224
225         * UserInterface/Views/ComputedStyleSection.css:
226         (body[dir=rtl] .computed-style-section .computed-property-item .disclosure-button): Deleted.
227
228         * UserInterface/Views/Main.css:
229         (body[dir=rtl] [dir=ltr] .go-to-arrow): Added.
230         In the RTL mode, LTR "islands" should have their contents to be still LTR.
231
232 2019-08-05  Devin Rousso  <drousso@apple.com>
233
234         Web Inspector: Styles: show @supports CSS groupings
235         https://bugs.webkit.org/show_bug.cgi?id=200419
236
237         Reviewed by Joseph Pecoraro.
238
239         * UserInterface/Models/CSSGrouping.js: Renamed from Source/WebInspectorUI/UserInterface/Models/CSSMedia.js.
240         (WI.CSSGrouping):
241         (WI.CSSGrouping.prototype.get type):
242         (WI.CSSGrouping.prototype.get text):
243         (WI.CSSGrouping.prototype.get sourceCodeLocation):
244         (WI.CSSGrouping.prototype.get isMedia): Added.
245         (WI.CSSGrouping.prototype.get isSupports): Added.
246         (WI.CSSGrouping.prototype.get prefix): Added.
247
248         * UserInterface/Models/CSSStyleDeclaration.js:
249         (WI.CSSStyleDeclaration.prototype.get groupings): Added.
250         (WI.CSSStyleDeclaration.prototype.generateCSSRuleString):
251         (WI.CSSStyleDeclaration.prototype.get mediaList): Deleted.
252
253         * UserInterface/Models/CSSRule.js:
254         (WI.CSSRule):
255         (WI.CSSRule.prototype.get groupings): Added.
256         (WI.CSSRule.prototype.update):
257         (WI.CSSRule.prototype._selectorResolved):
258         (WI.CSSRule.prototype.get mediaList): Deleted.
259
260         * UserInterface/Models/DOMNodeStyles.js:
261         (WI.DOMNodeStyles.prototype._parseRulePayload):
262         (WI.DOMNodeStyles.prototype.rulesForSelector): Deleted.
263
264         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
265         (WI.SpreadsheetCSSStyleDeclarationSection):
266         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
267         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleEditorFilterApplied):
268         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._createMediaHeader): Deleted.
269         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
270         (.spreadsheet-css-declaration :matches(.header, .header-groupings)): Added.
271         (.spreadsheet-css-declaration :matches(.header, .header-groupings):first-child): Added.
272         (.spreadsheet-css-declaration .header-groupings > .grouping): Added.
273         (.spreadsheet-css-declaration .header-groupings + .header > .selector > .icon): Added.
274         (.spreadsheet-css-declaration :matches(.header, .header-media)): Deleted.
275         (.spreadsheet-css-declaration :matches(.header, .header-media):first-child): Deleted.
276         (.spreadsheet-css-declaration .media-label): Deleted.
277
278         * UserInterface/Controllers/CSSManager.js:
279         (WI.CSSManager.protocolGroupingTypeToEnum): Added.
280         (WI.CSSManager.protocolMediaSourceToEnum): Deleted.
281
282         * UserInterface/Main.html:
283         * UserInterface/Test.html:
284
285 2019-08-05  Devin Rousso  <drousso@apple.com>
286
287         Can't use $0, $1 etc when inspecting Google Docs pages because the content uses these for function names
288         https://bugs.webkit.org/show_bug.cgi?id=195834
289
290         Reviewed by Joseph Pecoraro.
291
292         Allow the user to alias saved results by providing a different prefix (e.g. "$") from within
293         Web Inspector. When changing the alias, all existing saved results will update to be
294         reference-able from the new alias.
295
296         * UserInterface/Controllers/RuntimeManager.js:
297         (WI.RuntimeManager):
298         (WI.RuntimeManager.preferredSavedResultPrefix): Added.
299         (WI.RuntimeManager.prototype.initializeTarget):
300         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
301         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
302
303         * UserInterface/Base/Setting.js:
304         * UserInterface/Base/Main.js:
305         (WI.contentLoaded):
306         (WI.contentLoaded.updateConsoleSavedResultPrefixCSSVariable): Added.
307         * UserInterface/Views/ConsoleMessageView.js:
308         (WI.ConsoleMessageView.prototype.toClipboardString):
309         (WI.ConsoleMessageView.prototype.removeEventListeners): Added.
310         (WI.ConsoleMessageView.prototype._appendSavedResultIndex):
311         (WI.ConsoleMessageView.prototype._appendSavedResultIndex.updateSavedVariableText): Added.
312         (WI.ConsoleMessageView.prototype._rootPropertyPathForObject):
313         (WI.ConsoleMessageView.prototype._rootPropertyPathForObject.prefixSavedResultIndex): Added.
314         * UserInterface/Views/LogContentView.js:
315         (WI.LogContentView.prototype._sessionStarted):
316         (WI.LogContentView.prototype._logCleared):
317         * UserInterface/Views/DOMTreeOutline.css:
318         (.tree-outline.dom.show-last-selected li.last-selected > span::after):
319         * UserInterface/Views/QuickConsole.js:
320         (WI.QuickConsole):
321         (WI.QuickConsole.prototype.closed):
322         (WI.QuickConsole.prototype._updateAutomaticExecutionContextPathComponentTooltip): Added.
323         Listen for changes to the setting that holds the current saved result alias and update any
324         related UI accordingly.
325
326         * UserInterface/Views/SettingsTabContentView.js:
327         (WI.SettingsTabContentView.prototype._createConsoleSettingsView):
328         * UserInterface/Views/SettingsTabContentView.css:
329         (.content-view.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Added.
330         * UserInterface/Views/SettingsGroup.js:
331         (WI.SettingsGroup.prototype.addCustomEditor): Added.
332         Add an input to the Settings tab that controls the saved result prefix alias. Only allow
333         [a-zA-Z0-9_$] as values (but [0-9] cannot be used as the start).
334
335         * UserInterface/Models/PropertyPath.js:
336         (WI.PropertyPath.prototype.set pathComponent): Added.
337         Miscellaneous getters/setters.
338
339         * Localizations/en.lproj/localizedStrings.js:
340
341         * UserInterface/Test/TestHarness.js:
342         (TestHarness.prototype.newline): Added.
343         Convenience function for adding newlines to test results.
344
345 2019-08-05  Devin Rousso  <drousso@apple.com>
346
347         Web Inspector: Timelines: disable related agents when the tab is closed
348         https://bugs.webkit.org/show_bug.cgi?id=200118
349
350         Reviewed by Joseph Pecoraro.
351
352         Rework how `enable`/`disable` is used for timeline-related agents so that events are not sent
353         and data isn't kept alive when the Timelines tab isn't enabled.
354
355         * UserInterface/Controllers/TimelineManager.js:
356         (WI.TimelineManager):
357         (WI.TimelineManager.prototype.get domains): Added.
358         (WI.TimelineManager.prototype.activateExtraDomain): Added.
359         (WI.TimelineManager.prototype.initializeTarget):
360         (WI.TimelineManager.prototype.reset):
361         (WI.TimelineManager.prototype.set autoCaptureOnPageLoad):
362         (WI.TimelineManager.prototype.enable): Added.
363         (WI.TimelineManager.prototype.disable): Added.
364         (WI.TimelineManager.prototype.startCapturing):
365         (WI.TimelineManager.prototype.stopCapturing):
366         (WI.TimelineManager.prototype.async processJSON):
367         (WI.TimelineManager.prototype.capturingStarted):
368         (WI.TimelineManager.prototype.capturingStopped):
369         (WI.TimelineManager.prototype.autoCaptureStarted):
370         (WI.TimelineManager.prototype.eventRecorded):
371         (WI.TimelineManager.prototype.pageDOMContentLoadedEventFired):
372         (WI.TimelineManager.prototype.pageLoadEventFired):
373         (WI.TimelineManager.prototype.cpuProfilerTrackingUpdated):
374         (WI.TimelineManager.prototype.memoryTrackingUpdated):
375         (WI.TimelineManager.prototype.heapTrackingStarted):
376         (WI.TimelineManager.prototype.heapTrackingCompleted):
377         (WI.TimelineManager.prototype.heapSnapshotAdded):
378         (WI.TimelineManager.prototype._loadNewRecording):
379         (WI.TimelineManager.prototype._legacyAttemptStartAutoCapturingForFrame):
380         (WI.TimelineManager.prototype._provisionalLoadStarted):
381         (WI.TimelineManager.prototype._mainResourceDidChange):
382         (WI.TimelineManager.prototype._resourceWasAdded):
383         (WI.TimelineManager.prototype._garbageCollected):
384         (WI.TimelineManager.prototype._memoryPressure):
385         (WI.TimelineManager.prototype.scriptProfilerTrackingUpdated):
386         (WI.TimelineManager.prototype.scriptProfilerTrackingCompleted):
387         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
388         (WI.TimelineManager.prototype._handleDOMNodeDidFireEvent):
389         (WI.TimelineManager.prototype._handleDOMNodePowerEfficientPlaybackStateChanged):
390         * UserInterface/Models/Instrument.js:
391         (WI.Instrument.startLegacyTimelineAgent):
392         (WI.Instrument.stopLegacyTimelineAgent):
393
394         * UserInterface/Controllers/HeapManager.js:
395         (WI.HeapManager): Added.
396         (WI.HeapManager.prototype.get domains): Added.
397         (WI.HeapManager.prototype.activateExtraDomain): Added.
398         (WI.HeapManager.prototype.initializeTarget):
399         (WI.HeapManager.prototype.enable): Added.
400         (WI.HeapManager.prototype.disable): Added.
401         (WI.HeapManager.prototype.snapshot): Added.
402         (WI.HeapManager.prototype.getPreview): Added.
403         (WI.HeapManager.prototype.getRemoteObject): Added.
404         (WI.HeapManager.prototype.garbageCollected):
405
406         * UserInterface/Controllers/MemoryManager.js:
407         (WI.MemoryManager): Added.
408         (WI.MemoryManager.prototype.get domains): Added.
409         (WI.MemoryManager.prototype.activateExtraDomain): Added.
410         (WI.MemoryManager.prototype.initializeTarget):
411         (WI.MemoryManager.prototype.enable): Added.
412         (WI.MemoryManager.prototype.disable): Added.
413         (WI.MemoryManager.prototype.memoryPressure):
414
415         * UserInterface/Views/TimelineTabContentView.js:
416         (WI.TimelineTabContentView):
417         (WI.TimelineTabContentView.prototype.closed):
418
419         * UserInterface/Models/HeapAllocationsInstrument.js:
420         (WI.HeapAllocationsInstrument):
421         (WI.HeapAllocationsInstrument.prototype._takeHeapSnapshot):
422         * UserInterface/Views/HeapAllocationsTimelineView.js:
423         (WI.HeapAllocationsTimelineView.prototype._takeHeapSnapshotClicked):
424         * UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
425         (WI.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
426         (WI.HeapSnapshotInstanceDataGridNode.prototype._populatePreview):
427         (WI.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
428         Go through the `HeapManager` for `HeapAgent` commands so it can better manage state.
429
430         * UserInterface/Test/Test.js:
431         (WI.contentLoaded):
432
433 2019-08-05  Nikita Vasilyev  <nvasilyev@apple.com>
434
435         Web Inspector: brotli-compressed resources have "Compressed: No" in Resources details sidebar
436         https://bugs.webkit.org/show_bug.cgi?id=200452
437
438         Reviewed by Joseph Pecoraro.
439
440         * UserInterface/Models/Resource.js:
441         (WI.Resource.prototype.get compressed):
442         Add "br" - Brotli content encoding.
443
444 2019-08-05  Devin Rousso  <drousso@apple.com>
445
446         Web Inspector: Styles: variable swatch not shown for var() with a fallback
447         https://bugs.webkit.org/show_bug.cgi?id=200237
448
449         Reviewed by Joseph Pecoraro.
450
451         * UserInterface/Views/SpreadsheetStyleProperty.js:
452         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
453         (WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens): Added.
454         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
455         (WI.SpreadsheetStyleProperty.prototype._addColorTokens):
456         (WI.SpreadsheetStyleProperty.prototype._addTimingFunctionTokens):
457         (WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
458         Check to see if there's a fallback value in the `var()` and tokenize it if there is. Mark
459         the property as invalid if the `var()` doesn't end up resolving to anything.
460
461         * UserInterface/Views/InlineSwatch.js:
462         (WI.InlineSwatch):
463         (WI.InlineSwatch.prototype.get value):
464         (WI.InlineSwatch.prototype._updateSwatch):
465         (WI.InlineSwatch.prototype._handleContextMenuEvent):
466         (WI.InlineSwatch.prototype._getNextValidHEXFormat.hexMatchesCurrentColor):
467         (WI.InlineSwatch.prototype._getNextValidHEXFormat):
468         Allow the `value` to be a function. In that case, use the getter `this.value` instead of the
469         value `this._value` directly so that the function is invoked.
470         This is needed for variable swatches because the fallback value could change after the
471         swatch has been created (e.g. another swatch in a CSS property value that just modifies the
472         text, rather than re-renders the entire CSS property value).
473
474         * UserInterface/Models/CSSStyleDeclaration.js:
475         (WI.CSSStyleDeclaration.prototype.resolveVariableValue): Added.
476         Follow the variable chain until an ultimate value is reached.
477
478         * UserInterface/Models/CSSKeywordCompletions.js:
479         (WI.CSSKeywordCompletions.isColorAwareProperty):
480         (WI.CSSKeywordCompletions.isTimingFunctionAwareProperty): Added.
481         Limit `cubic-bezier` and `spring` tokens to only be shown for timing function properties.
482
483 2019-08-05  Devin Rousso  <drousso@apple.com>
484
485         Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
486         https://bugs.webkit.org/show_bug.cgi?id=200422
487
488         Reviewed by Joseph Pecoraro.
489
490         * Localizations/en.lproj/localizedStrings.js:
491
492         * UserInterface/Controllers/CSSManager.js:
493         (WI.CSSManager.prototype._resourceAdded):
494         (WI.CSSManager.prototype._resourceTypeDidChange):
495         (WI.CSSManager.prototype._clearStyleSheetsForResource):
496         (WI.CSSManager.prototype._updateResourceContent.fetchedStyleSheetContent):
497         * UserInterface/Models/CSSStyleSheet.js:
498         (WI.CSSStyleSheet.prototype.get displayName):
499         * UserInterface/Models/CollectionTypes.js:
500         (WI.CSSStyleSheetCollection.prototype.get displayName):
501         * UserInterface/Models/Resource.js:
502         (WI.Resource.displayNameForType):
503         (WI.Resource.prototype.get syntheticMIMEType):
504         * UserInterface/Models/ResourceCollection.js:
505         (WI.ResourceCollection.prototype.objectIsRequiredType):
506         * UserInterface/Views/NetworkTableContentView.js:
507         (WI.NetworkTableContentView):
508         (WI.NetworkTableContentView.shortDisplayNameForResourceType):
509         * UserInterface/Views/ResourceClusterContentView.js:
510         (WI.ResourceClusterContentView.prototype._contentViewForResourceType):
511         * UserInterface/Views/ResourceSidebarPanel.js:
512         (WI.ResourceSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
513         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
514         (WI.SourcesNavigationSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
515         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
516         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._save):
517         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
518         * UserInterface/Views/StyleOriginView.js:
519         (WI.StyleOriginView.prototype.update):
520         * UserInterface/Views/TextResourceContentView.js:
521         (WI.TextResourceContentView.prototype._shouldBeEditable):
522
523         * UserInterface/Views/CSSStyleSheetTreeElement.js:
524         (WI.CSSStyleSheetTreeElement):
525         * UserInterface/Views/ResourceIcons.css:
526         (:matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
527         (.source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
528         (.large :matches(.resource-icon.resource-type-style-sheet, .style-sheet-icon) .icon): Added.
529         (.large .source-map-resource.resource-icon.resource-type-style-sheet .icon): Added.
530         (:matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
531         (.source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
532         (.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon): Deleted.
533         (.large .source-map-resource.resource-icon.resource-type-stylesheet .icon): Deleted.
534
535 2019-08-03  Devin Rousso  <drousso@apple.com>
536
537         Web Inspector: Elements: Styles: move psuedo-selector rules before inherited rules
538         https://bugs.webkit.org/show_bug.cgi?id=199950
539
540         Reviewed by Joseph Pecoraro.
541
542         Since pseudo-selector rules (usually) affect the selected element, or are related to its
543         content, it's more useful to have them near that element's rules instead of after all of
544         it's inherited rules.
545
546         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
547         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
548
549 2019-08-03  Devin Rousso  <drousso@apple.com>
550
551         Web Inspector: Elements: Styles: add icons for various CSS rule types
552         https://bugs.webkit.org/show_bug.cgi?id=199946
553
554         Reviewed by Joseph Pecoraro.
555
556         * UserInterface/Controllers/CSSManager.js:
557         (WI.CSSManager.displayNameForPseudoId):
558         Add hardcoded pseudo-selector identifiers for older backends.
559
560         * UserInterface/Models/CSSSelector.js:
561         (WI.CSSSelector.prototype.isPseudoSelector): Added.
562         (WI.CSSSelector.prototype.isPseudoElementSelector): Deleted.
563         There are more types of pseudo-selectors than just `:{before|after}`.
564
565         * UserInterface/Models/CSSStyleDeclaration.js:
566         (WI.CSSStyleDeclaration.prototype.generateCSSRuleString): Added.
567
568         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
569         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionAddNewRule): Added.
570         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
571         Provide a delegate method for adding a new rule, so the `WI.SpreadsheetRulesStyleDetailsPanel`
572         can know what selector to focus once the new rule gets added.
573
574         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
575         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
576         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._renderSelector):
577         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu): Added.
578         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.css:
579         (.spreadsheet-css-declaration .header.editing-selector .selector): Added.
580         (.spreadsheet-css-declaration .selector > .icon): Added.
581         (.spreadsheet-css-declaration .selector > .icon + *): Added.
582         (.spreadsheet-css-declaration .selector.style-attribute > span): Added.
583         When "mousedown" (or "contextmenu") on the icon, show a context menu with helpful actions:
584          - Copy Rule
585          - {Disable|Enable} Rule
586          - Duplicate Selector
587          - Add :{active|focus|hover|visited} Rule
588          - Create ::{before|after} Rule
589          - Reveal in {Resources Tab|Sources Tab|Stylesheet}
590         Drive-by: add an extra 0.5px of initial margin before the Style Attribute selector (which is
591         sans-serif) so it properly aligns with the other selectors (which are monospaced).
592
593         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
594         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
595         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
596         (.spreadsheet-style-declaration-editor:empty): Added.
597         (.spreadsheet-style-declaration-editor.no-properties): Deleted.
598         Add some extra space when there's no inline style so it looks a bit less cramped.
599
600         * UserInterface/Main.html:
601         * UserInterface/Views/StyleRuleIcons.css: Added.
602         (.author-style-rule-icon .icon):
603         (.author-style-rule-icon.pseudo-selector .icon):
604         (.user-style-rule-icon .icon):
605         (.user-style-rule-icon.pseudo-selector .icon):
606         (.user-agent-style-rule-icon .icon):
607         (.user-agent-style-rule-icon.pseudo-selector .icon):
608         (.inspector-style-rule-icon .icon):
609         (.inspector-style-rule-icon.pseudo-selector .icon):
610         (.inherited-style-rule-icon .icon):
611         (.inherited-element-style-rule-icon .icon):
612         * UserInterface/Images/StyleRule.svg: Added.
613         * UserInterface/Images/StyleRuleInheritedElement.svg: Added.
614         * UserInterface/Images/StyleRulePseudo.svg: Added.
615         Add generic icon classes for style rule icons.
616
617         * UserInterface/Base/Setting.js:
618         * UserInterface/Views/SettingsTabContentView.js:
619         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
620         Add experimental setting.
621
622         * Localizations/en.lproj/localizedStrings.js:
623
624 2019-08-03  Devin Rousso  <drousso@apple.com>
625
626         Web Inspector: DOM: add a special breakpoint for "All Events"
627         https://bugs.webkit.org/show_bug.cgi?id=200285
628
629         Reviewed by Joseph Pecoraro.
630
631         Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
632         that would pause for any DOM event, regardless of the event's name. This is useful for
633         situations where the event name isn't known, or where one simply want's to pause on the next
634         entry to the event loop.
635
636         Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
637         event breakpoints into special breakpoints that can be added/removed via the create
638         breakpoint context menu. This simplifies the process for setting these breakpoints, and also
639         makes them more discoverable (most people wouldn't consider them to be "events").
640
641         * UserInterface/Models/EventBreakpoint.js:
642         (WI.EventBreakpoint):
643         (WI.EventBreakpoint.deserialize):
644         (WI.EventBreakpoint.prototype.saveIdentityToCookie):
645         (WI.EventBreakpoint.prototype.toJSON):
646
647         * UserInterface/Controllers/DebuggerManager.js:
648         (WI.DebuggerManager.prototype._pauseReasonFromPayload):
649
650         * UserInterface/Controllers/DOMDebuggerManager.js:
651         (WI.DOMDebuggerManager):
652         (WI.DOMDebuggerManager.prototype.initializeTarget):
653         (WI.DOMDebuggerManager.supportsDOMBreakpoints): Added.
654         (WI.DOMDebuggerManager.supportsEventBreakpoints):
655         (WI.DOMDebuggerManager.supportsEventListenerBreakpoints): Added.
656         (WI.DOMDebuggerManager.supportsURLBreakpoints):
657         (WI.DOMDebuggerManager.supportsXHRBreakpoints): Added.
658         (WI.DOMDebuggerManager.supportsAllListenersBreakpoint): Added.
659         (WI.DOMDebuggerManager.prototype.get allAnimationFramesBreakpoint): Added.
660         (WI.DOMDebuggerManager.prototype.get allIntervalsBreakpoint): Added.
661         (WI.DOMDebuggerManager.prototype.get allListenersBreakpoint): Added.
662         (WI.DOMDebuggerManager.prototype.get allTimeoutsBreakpoint): Added.
663         (WI.DOMDebuggerManager.prototype.get listenerBreakpoints): Added.
664         (WI.DOMDebuggerManager.prototype.isBreakpointSpecial):
665         (WI.DOMDebuggerManager.prototype.listenerBreakpointForEventName): Added.
666         (WI.DOMDebuggerManager.prototype.addEventBreakpoint):
667         (WI.DOMDebuggerManager.prototype.removeEventBreakpoint):
668         (WI.DOMDebuggerManager.prototype.addURLBreakpoint):
669         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
670         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
671         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
672         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
673         (WI.DOMDebuggerManager.prototype._handleDOMBreakpointDisabledStateChanged):
674         (WI.DOMDebuggerManager.prototype._handleEventBreakpointDisabledStateChanged):
675         (WI.DOMDebuggerManager.prototype._handleURLBreakpointDisabledStateChanged):
676         (WI.DOMDebuggerManager.prototype.get eventBreakpoints): Deleted.
677         (WI.DOMDebuggerManager.prototype.eventBreakpointForTypeAndEventName): Deleted.
678         Add additional target compatibility checks.
679
680         * UserInterface/Views/EventBreakpointPopover.js:
681         (WI.EventBreakpointPopover.prototype.show):
682         (WI.EventBreakpointPopover.prototype.dismiss):
683         (WI.EventBreakpointPopover.prototype._handleTypeSelectChange): Deleted.
684         * UserInterface/Views/EventBreakpointPopover.css:
685         (.popover .event-breakpoint-content > input): Added.
686         (.popover .event-breakpoint-content > input::placeholder): Added.
687         (.popover .event-breakpoint-content > .event-type): Deleted.
688         (.popover .event-breakpoint-content > .event-type > input): Deleted.
689         (.popover .event-breakpoint-content > .event-type > input::placeholder): Deleted.
690
691         * UserInterface/Views/EventBreakpointTreeElement.css:
692         (.breakpoint.event.breakpoint-for-interval:not(.breakpoint-paused-icon) .icon): Added.
693         (.breakpoint.event.breakpoint-for-timeout:not(.breakpoint-paused-icon) .icon): Added.
694         (.breakpoint.event.breakpoint-for-timer:not(.breakpoint-paused-icon) .icon): Deleted.
695
696         * UserInterface/Views/DebuggerSidebarPanel.js:
697         (WI.DebuggerSidebarPanel):
698         (WI.DebuggerSidebarPanel.prototype.saveStateToCookie):
699         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
700         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
701         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
702         (WI.DebuggerSidebarPanel.prototype._updatePauseReasonSection):
703         (WI.DebuggerSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
704         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
705         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu):
706         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
707         (WI.SourcesNavigationSidebarPanel):
708         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
709         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
710         (WI.SourcesNavigationSidebarPanel.prototype._updatePauseReasonSection):
711         (WI.SourcesNavigationSidebarPanel.prototype._handleBreakpointElementAddedOrRemoved):
712         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu.addToggleForSpecialEventBreakpoint): Added.
713         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu):
714         Add create breakpoint context menu items (also sort the breakpoints in this order):
715          - "All Animation Frames"  =>  [A] All Animation Frames
716          - "All Timeouts"          =>  [T] All Timeouts
717          - "All Intervals"         =>  [I] All Intervals
718          - "All Events"            =>  [E] All Events
719
720         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
721         (WI.JavaScriptRuntimeCompletionProvider.completionControllerCompletionsNeeded.receivedPropertyNames):
722
723         * UserInterface/Base/Setting.js:
724         * UserInterface/Images/EventBreakpointInterval.svg: Added.
725         * UserInterface/Images/EventBreakpointTimeout.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/EventBreakpointTimer.svg.
726         * Localizations/en.lproj/localizedStrings.js:
727
728 2019-08-03  Devin Rousso  <drousso@apple.com>
729
730         Web Inspector: Heap Snapshot Views should be searchable
731         https://bugs.webkit.org/show_bug.cgi?id=157582
732         <rdar://problem/26228629>
733
734         Reviewed by Joseph Pecoraro.
735
736         Without the ability to filter/search, it's far more difficult to find objects of interest.
737         Rather than spending time scrolling through the entire heap snapshot or sorting by "Name",
738         a simple filter/search (which also uses the global search settings) is almost instant.
739
740         * UserInterface/Views/HeapAllocationsTimelineView.js:
741         (WI.HeapAllocationsTimelineView.prototype.updateFilter): Addded.
742         (WI.HeapAllocationsTimelineView.prototype.get showsFilterBar): Deleted.
743         * UserInterface/Views/HeapSnapshotClusterContentView.js:
744         (WI.HeapSnapshotClusterContentView.prototype.updateFilter): Added.
745         * UserInterface/Views/HeapSnapshotContentView.js:
746         (WI.HeapSnapshotContentView):
747         (WI.HeapSnapshotContentView.prototype.updateFilter): Added.
748         (WI.HeapSnapshotContentView.prototype.dataGridMatchNodeAgainstCustomFilters): Added.
749         (WI.HeapSnapshotContentView.prototype.dataGridMatchShouldPopulateWhenFilteringNode): Added.
750         * UserInterface/Views/DataGrid.js:
751         (WI.DataGrid.prototype._updateFilter.createIteratorForNodesToBeFiltered):
752         Don't attempt to populate each heap snapshot `WI.DataGridNode` when filtering, as that can
753         quickly exhaust memory due to the sheer size of a heap snapshot.
754
755         * UserInterface/Base/Main.js:
756         (WI._find):
757         * UserInterface/Views/TimelineTabContentView.js:
758         (WI.TimelineTabContentView.prototype.get canHandleFindEvent): Added.
759         (WI.TimelineTabContentView.prototype.handleFindEvent): Added.
760         * UserInterface/Views/TimelineRecordingContentView.js:
761         (WI.TimelineRecordingContentView.prototype.get canFocusFilterBar): Added.
762         (WI.TimelineRecordingContentView.prototype.focusFilterBar): Added.
763         * UserInterface/Views/FilterBar.js:
764         (WI.FilterBar.prototype.focus): Added.
765         Allow the current tab to intercept the find shortcut and do something custom. In the case
766         of a `WI.TimelineTabContentView`, declare that it can handle the find event if the displayed
767         content view (`WI.TimelineRecordingContentView`) can focus it's filter bar. If so, when the
768         find shortcut is triggered, focus the filter bar.
769
770 2019-08-03  Devin Rousso  <drousso@apple.com>
771
772         Web Inspector: CSS Formatter: comments with an escape character aren't formatted
773         https://bugs.webkit.org/show_bug.cgi?id=200168
774
775         Reviewed by Joseph Pecoraro.
776
777         Don't allow escaping of the "*" in CSS comments (e.g. `\*/`).
778
779         Add additional pretty printing rules for comments so that there's always some space between
780         them and the surrounding text. This ensures that they don't interfere with readability.
781
782         * UserInterface/Workers/Formatter/CSSFormatter.js:
783         (CSSFormatter.prototype._format):
784
785         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
786         (FormatterContentBuilder.prototype.get indented): Added.
787
788 2019-08-03  Devin Rousso  <drousso@apple.com>
789
790         Web Inspector: Console: execution context picker doesn't update when switching to the inferred context from auto
791         https://bugs.webkit.org/show_bug.cgi?id=200279
792
793         Reviewed by Joseph Pecoraro.
794
795         The `representedObject` of the "auto" execution context path component is shared with that
796         execution context's actual path component, meaning that if the user switches from "auto" to
797         that execution context's path component, the underlying `representedObject` wouldn't change,
798         and therfore the `RuntimeManager.Event.ActiveExecutionContextChanged` wouldn't fire. In this
799         case, update the visible ("selected") execution context path component manually.
800
801         * UserInterface/Views/QuickConsole.js:
802         (WI.QuickConsole.prototype._selectExecutionContext):
803         (WI.QuickConsole.prototype._pathComponentSelected):
804
805 2019-08-02  Devin Rousso  <drousso@apple.com>
806
807         Web Inspector: Console: all navigation items should be shown in the split console
808         https://bugs.webkit.org/show_bug.cgi?id=200280
809
810         Reviewed by Joseph Pecoraro.
811
812         * UserInterface/Views/LogContentView.js:
813         (WI.LogContentView):
814         (WI.LogContentView.prototype.get navigationItems):
815         Adjust the `visibilityPriority` of each `navigationItems` so that the filter/scope bars are
816         kept visible for longer than the "Preserve Log"/"Emulate User Gesture" toggles.
817
818         * UserInterface/Views/FindBanner.js:
819         (WI.FindBanner):
820         * UserInterface/Views/FindBanner.css:
821         (.find-banner.console-find-banner > input[type="search"]):
822         (.find-banner.console-find-banner > :matches(input[type="search"], button)):
823         (.find-banner.console-find-banner > input[type="search"]:focus, .find-banner.console-find-banner > input[type="search"]:focus ~ button, .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown), .find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown) ~ button ): Added.
824         (.find-banner.console-find-banner > input[type="search"]::placeholder): Deleted.
825         (.find-banner.console-find-banner > input[type="search"]:focus): Deleted.
826         (.find-banner.console-find-banner > input[type="search"]:not(:placeholder-shown)): Deleted.
827         (@media (prefers-color-scheme: dark) .find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)): Deleted.
828         Make the `WI.FindBanner` blend in with the surrounding content when it's not focused or has
829         no content.
830
831 2019-08-02  Devin Rousso  <drousso@apple.com>
832
833         Web Inspector: Storage: disable related agents when the tab is closed
834         https://bugs.webkit.org/show_bug.cgi?id=200117
835
836         Reviewed by Joseph Pecoraro.
837
838         Rework how `enable`/`disable` is used for storage-related agents so that events are not sent
839         and data isn't kept alive when the Storage tab isn't enabled.
840
841         * UserInterface/Controllers/ApplicationCacheManager.js:
842         (WI.ApplicationCacheManager):
843         (WI.ApplicationCacheManage.prototype.get domains): Added.
844         (WI.ApplicationCacheManage.prototype.activateExtraDomain): Added.
845         (WI.ApplicationCacheManager.prototype.initializeTarget):
846         (WI.ApplicationCacheManager.prototype.enable): Added.
847         (WI.ApplicationCacheManager.prototype.disable): Added.
848         (WI.ApplicationCacheManager.prototype.networkStateUpdated):
849         (WI.ApplicationCacheManager.prototype.applicationCacheStatusUpdated):
850         (WI.ApplicationCacheManager.prototype._reset): Added.
851         (WI.ApplicationCacheManager.prototype._mainResourceDidChange):
852         (WI.ApplicationCacheManager.prototype._manifestForFrameLoaded):
853         (WI.ApplicationCacheManager.prototype._framesWithManifestsLoaded):
854         (WI.ApplicationCacheManager.prototype.initialize): Deleted.
855
856         * UserInterface/Controllers/DOMStorageManager.js:
857         (WI.DOMStorageManager):
858         (WI.DOMStorageManager.prototype.get domains): Added.
859         (WI.DOMStorageManager.prototype.activateExtraDomain): Added.
860         (WI.DOMStorageManager.prototype.initializeTarget):
861         (WI.DOMStorageManager.prototype.enable): Added.
862         (WI.DOMStorageManager.prototype.disable): Added.
863         (WI.DOMStorageManager.prototype.itemsCleared):
864         (WI.DOMStorageManager.prototype.itemRemoved):
865         (WI.DOMStorageManager.prototype.itemAdded):
866         (WI.DOMStorageManager.prototype.itemUpdated):
867         (WI.DOMStorageManager.prototype.inspectDOMStorage):
868         (WI.DOMStorageManager.prototype._reset): Added.
869         (WI.DOMStorageManager.prototype._addDOMStorageIfNeeded):
870         (WI.DOMStorageManager.prototype._addCookieStorageIfNeeded):
871         (WI.DOMStorageManager.prototype._mainResourceDidChange):
872         (WI.DOMStorageManager.prototype.initialize): Deleted.
873         (WI.DOMStorageManager.prototype.domStorageWasAdded): Deleted.
874
875         * UserInterface/Controllers/DatabaseManager.js:
876         (WI.DatabaseManager):
877         (WI.DatabaseManager.prototype.get domains): Added.
878         (WI.DatabaseManager.prototype.activateExtraDomain): Added.
879         (WI.DatabaseManager.prototype.initializeTarget):
880         (WI.DatabaseManager.prototype.enable): Added.
881         (WI.DatabaseManager.prototype.disable): Added.
882         (WI.DatabaseManager.prototype.databaseWasAdded):
883         (WI.DatabaseManager.prototype.inspectDatabase):
884         (WI.DatabaseManager.prototype._reset): Added.
885         (WI.DatabaseManager.prototype._mainResourceDidChange):
886         (WI.DatabaseManager.prototype.initialize): Deleted.
887
888         * UserInterface/Controllers/IndexedDBManager.js:
889         (WI.IndexedDBManager):
890         (WI.IndexedDBManager.prototype.get domains): Added.
891         (WI.IndexedDBManager.prototype.activateExtraDomain): Added.
892         (WI.IndexedDBManager.prototype.initializeTarget):
893         (WI.IndexedDBManager.prototype.enable): Added.
894         (WI.IndexedDBManager.prototype.disable): Added.
895         (WI.IndexedDBManager.prototype.clearObjectStore):
896         (WI.IndexedDBManager.prototype._reset): Added.
897         (WI.IndexedDBManager.prototype._mainResourceDidChange):
898         (WI.IndexedDBManager.prototype.initialize): Deleted.
899
900         * UserInterface/Controllers/AppController.js:
901         (WI.AppController.prototype.activateExtraDomains):
902         * UserInterface/Controllers/CanvasManager.js:
903         (WI.CanvasManager.prototype.get domains): Added.
904         (WI.CanvasManager.prototype.activateExtraDomain): Added.
905         Only call `enable` on any extra agents if the domain is not controlled by a manager.
906
907         * UserInterface/Views/StorageTabContentView.js:
908         (WI.StorageTabContentView):
909         (WI.StorageTabContentView.static isTabAllowed):
910         (WI.StorageTabContentView.prototype.canShowRepresentedObject):
911         (WI.StorageTabContentView.prototype.closed): Added.
912
913         * UserInterface/Test.html:
914         * UserInterface/Test/Test.js:
915         (WI.loaded):
916         (WI.contentLoaded):
917
918 2019-08-02  Devin Rousso  <drousso@apple.com>
919
920         Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window
921         https://bugs.webkit.org/show_bug.cgi?id=200125
922         <rdar://problem/53543008>
923
924         Reviewed by Brian Burg.
925
926         Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops.
927         Notify the UIProcess whenever the timeline recording state changes.
928
929         * UserInterface/Protocol/InspectorFrontendAPI.js:
930         (InspectorFrontendAPI.setTimelineProfilingEnabled):
931
932 2019-08-02  Devin Rousso  <drousso@apple.com>
933
934         Web Inspector: "Inspector.initialized" happens before breakpoints are set
935         https://bugs.webkit.org/show_bug.cgi?id=200364
936
937         Reviewed by Joseph Pecoraro.
938
939         Allow managers to register a promise that will delay `Inspector.initialized`. This is needed
940         when restoring breakpoints so that "Automatically Show Web Inspector for JSContexts" can set
941         them before any scripts have evaluated, ensuring that no breakpoints are "skipped".
942
943         * UserInterface/Protocol/Target.js:
944         (WI.Target.prototype.initialize):
945         (WI.Target.registerInitializationPromise): Added.
946
947         * UserInterface/Controllers/DOMDebuggerManager.js:
948         (WI.DOMDebuggerManager):
949         * UserInterface/Controllers/DebuggerManager.js:
950         (WI.DebuggerManager):
951
952 2019-08-01  Devin Rousso  <drousso@apple.com>
953
954         Unreviewed, remove `emulateUserGesture` parameter from `Debugger.evaluateOnCallFrame` for iOS 13
955
956         Rubber-stamped by Joseph Pecoraro.
957
958         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
959         * Versions/Inspector-iOS-13.0.json:
960         The iOS 13 protocol has already been decided, so these shouldn't have been added unless they
961         were cherry-picked in.
962
963 2019-07-31  Devin Rousso  <drousso@apple.com>
964
965         Web Inspector: Debugger: support emulateUserGesture parameter in Debugger.evaluateOnCallFrame
966         https://bugs.webkit.org/show_bug.cgi?id=200272
967
968         Reviewed by Joseph Pecoraro.
969
970         When paused, evaluating in the console should still respect the "Emulate User Gesture" checkbox.
971
972         * UserInterface/Controllers/RuntimeManager.js:
973         (WI.RuntimeManager.prototype.evaluateInInspectedWindow):
974
975         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js:
976         * Versions/Inspector-iOS-13.0.json:
977
978 2019-07-31  Devin Rousso  <drousso@apple.com>
979
980         Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'issueMessage.sourceCodeLocation.sourceCode')
981         https://bugs.webkit.org/show_bug.cgi?id=200296
982
983         Reviewed by Joseph Pecoraro.
984
985         When fetching all `WI.IssueMessage`s for a given `WI.SourceCode`, the `WI.IssueMessage` may
986         be associated in a different way (e.g. by url, instead of `WI.SourceCodeLocation`). As such,
987         we should pass the `WI.SourceCode` along, and use it when adding the `WI.IssueTreeElement`.
988
989         * UserInterface/Views/DebuggerSidebarPanel.js:
990         (WI.DebuggerSidebarPanel.prototype._addIssuesForSourceCode):
991         (WI.DebuggerSidebarPanel.prototype._addIssue):
992
993         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
994         (WI.SourcesNavigationSidebarPanel.prototype._addIssue):
995         (WI.SourcesNavigationSidebarPanel.prototype._addIssuesForSourceCode):
996
997 2019-07-31  Devin Rousso  <drousso@apple.com>
998
999         Web Inspector: DOM: provide a way to disable/breakpoint all event listeners for a given DOM node or event type
1000         https://bugs.webkit.org/show_bug.cgi?id=200233
1001
1002         Reviewed by Joseph Pecoraro.
1003
1004         Often, when trying to debug issues with DOM events, it's extremely tedious to have to go
1005         through event listeners one by one and disable them (or set a breakpoint). This patch adds
1006         a way of performing these "state modifications" in batch operations, based on the current
1007         grouping method of the Event Listeners section.
1008
1009         * UserInterface/Controllers/DOMManager.js:
1010         (WI.DOMManager.supportsDisablingEventListeners): Added.
1011         (WI.DOMManager.supportsEventListenerBreakpoints): Added.
1012         Common convenience functions for checking for protocol support.
1013
1014         * UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
1015         (WI.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.createEventListenerSection):
1016         * UserInterface/Views/DOMNodeDetailsSidebarPanel.css:
1017         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section > .header > .event-listener-options): Added.
1018         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners .details-section.event-listener-section:hover > .header > .event-listener-options): Added.
1019         Add an options element that shows a context menu:
1020          - "Disable Event Listeners"/"Enable Event Listeners"
1021          - "Add Breakpoints"/"Delete Breakpoints"
1022         Each action applies the corresponding state to all event listeners in that section.
1023
1024         * UserInterface/Views/EventListenerSectionGroup.js:
1025         (WI.EventListenerSectionGroup):
1026         (WI.EventListenerSectionGroup.prototype.get supportsStateModification): Added.
1027         (WI.EventListenerSectionGroup.prototype.get isEventListenerDisabled): Added.
1028         (WI.EventListenerSectionGroup.prototype.set isEventListenerDisabled): Added.
1029         (WI.EventListenerSectionGroup.prototype.get hasEventListenerBreakpoint): Added.
1030         (WI.EventListenerSectionGroup.prototype.set hasEventListenerBreakpoint): Added.
1031         (WI.EventListenerSectionGroup.prototype._updateDisabledToggle): Added.
1032         (WI.EventListenerSectionGroup.prototype._updateBreakpointToggle): Added.
1033         (WI.EventListenerSectionGroup.prototype._createDisabledToggleRow): Deleted.
1034         (WI.EventListenerSectionGroup.prototype._createBreakpointToggleRow): Deleted.
1035         Expose a way to modify the event listener's state so that the UI (e.g. checkbox and title)
1036         also get's updated.
1037
1038         * Localizations/en.lproj/localizedStrings.js:
1039
1040 2019-07-30  Nikita Vasilyev  <nvasilyev@apple.com>
1041
1042         Web Inspector: Resources: Display outline around images when viewing image collections
1043         https://bugs.webkit.org/show_bug.cgi?id=200212
1044
1045         Reviewed by Devin Rousso.
1046
1047         * UserInterface/Views/CollectionContentView.css:
1048         (.content-view.collection .resource.image img):
1049         (.content-view.collection .resource.image img:hover):
1050
1051 2019-07-29  Devin Rousso  <drousso@apple.com>
1052
1053         Web Inspector: Resources: add a "Show Grid" navigation item for the Images collection
1054         https://bugs.webkit.org/show_bug.cgi?id=200260
1055
1056         Reviewed by Joseph Pecoraro.
1057
1058         Each subview `WI.ImageResourceContentView` already listens for changes to the underlying
1059         `WI.settings.showImageGrid` and adds the `.show-grid` class if enabled. As such, this change
1060         just adds a `WI.ButtonNavigationItem` for toggling `WI.settings.showImageGrid` from the
1061         Images "folder".
1062
1063         * UserInterface/Views/ResourceCollectionContentView.js:
1064         (WI.ResourceCollectionContentView):
1065         (WI.ResourceCollectionContentView.prototype.get navigationItems):
1066         (WI.ResourceCollectionContentView.prototype.attached): Added.
1067         (WI.ResourceCollectionContentView.prototype.detached): Added.
1068         (WI.ResourceCollectionContentView.prototype._updateImageTypeScopeBar):
1069         Drive-by: hide the image type `WI.ScopeBar` if there's only one type of image.
1070         (WI.ResourceCollectionContentView.prototype._handleShowGridButtonClicked): Added.
1071         (WI.ResourceCollectionContentView.prototype._handleShowImageGridSettingChanged): Added.
1072
1073 2019-07-29  Devin Rousso  <drousso@apple.com>
1074
1075         Web Inspector: add -webkit-* keywords for *-height CSS properties
1076         https://bugs.webkit.org/show_bug.cgi?id=200240
1077
1078         Reviewed by Joseph Pecoraro.
1079
1080         * UserInterface/Models/CSSKeywordCompletions.js:
1081
1082         * UserInterface/Views/Main.css:
1083         (.message-text-view):
1084         * UserInterface/Views/Toolbar.css:
1085         (.toolbar .control-section):
1086         (.toolbar .item-section):
1087         Replace `-webkit-min-content` with `min-content`.
1088
1089 2019-07-26  Greg Doolittle  <gr3g@apple.com>
1090
1091         Web Inspector: AXI: Audit: Typo of "some" as "somee"
1092         https://bugs.webkit.org/show_bug.cgi?id=200166
1093
1094         Reviewed by Devin Rousso.
1095
1096         * Localizations/en.lproj/localizedStrings.js:
1097         * UserInterface/Controllers/AuditManager.js:
1098         (WI.AuditManager.prototype._addDefaultTests):
1099         (WI.AuditManager):
1100
1101 2019-07-24  Devin Rousso  <drousso@apple.com>
1102
1103         Web Inspector: REGRESSION: no context menu items work when context menu clicking on "Add Breakpoint"
1104         https://bugs.webkit.org/show_bug.cgi?id=199953
1105
1106         Reviewed by Joseph Pecoraro.
1107
1108         * UserInterface/Views/ContextMenuUtilities.js:
1109         (WI.addMouseDownContextMenuHandlers): Added.
1110         Create a helper function for managing elements that show a context menu on "mousedown".
1111
1112         * UserInterface/Base/SearchUtilities.js:
1113         (WI.SearchUtilities.createSettingsButton):
1114         * UserInterface/Views/CanvasContentView.js:
1115         (WI.CanvasContentView.prototype.initialLayout):
1116         (WI.CanvasContentView.prototype._populateCanvasElementButtonContextMenu): Added.
1117         (WI.CanvasContentView.prototype._populateViewShaderButtonContextMenu): Added.
1118         (WI.CanvasContentView.prototype._populateViewRecordingButtonContextMenu): Added.
1119         (WI.CanvasContentView.prototype._handleCanvasElementButtonMouseDown): Deleted.
1120         (WI.CanvasContentView.prototype._handleViewShaderButtonMouseDown): Deleted.
1121         (WI.CanvasContentView.prototype._handleViewRecordingButtonMouseDown): Deleted.
1122         * UserInterface/Views/DebuggerSidebarPanel.js:
1123         (WI.DebuggerSidebarPanel):
1124         (WI.DebuggerSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
1125         (WI.DebuggerSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
1126         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1127         (WI.SourcesNavigationSidebarPanel):
1128         (WI.SourcesNavigationSidebarPanel.prototype._populateResourceGroupingModeContextMenu): Added.
1129         (WI.SourcesNavigationSidebarPanel.prototype._populateCreateBreakpointContextMenu): Added.
1130         (WI.SourcesNavigationSidebarPanel.prototype._handleResourceGroupingModeMouseDown): Deleted.
1131         (WI.SourcesNavigationSidebarPanel.prototype._handleCreateBreakpointMouseDown): Deleted.
1132
1133         * UserInterface/Views/TabBar.js:
1134         (WI.TabBar):
1135         (WI.TabBar.prototype._handleTabPickerTabContextMenu): Deleted.
1136         * UserInterface/Views/LegacyTabBar.js:
1137         (WI.LegacyTabBar):
1138         (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu): Deleted.
1139         Remove the "contextmenu" handler on the tab picker, as that's already used by the entire
1140         tab bar to show/hide tabs.
1141
1142 2019-07-24  Devin Rousso  <drousso@apple.com>
1143
1144         Web Inspector: print the target of `console.screenshot` last so the target is the closest item to the image
1145         https://bugs.webkit.org/show_bug.cgi?id=199308
1146
1147         Reviewed by Joseph Pecoraro.
1148
1149         * UserInterface/Views/ConsoleMessageView.js:
1150         (WI.ConsoleMessageView.prototype.render):
1151         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
1152         (WI.ConsoleMessageView.prototype._handleContextMenu):
1153         * UserInterface/Views/ConsoleMessageView.css:
1154         (.console-image > .console-message-body > :matches(hr, img)): Added.
1155         (.console-image > .console-message-body > hr): Added.
1156         (.console-image > .console-message-body > img): Added.
1157         (.console-log-level.console-image::before): Added.
1158         (.console-message-body > .console-image): Deleted.
1159         (.console-log-level.console-image-container::before): Deleted.
1160         Allow `ConsoleMessage.MessageType.Image` to be an `ConsoleMessage.MessageLevel.Error`, and
1161         print the message (and extra parameters) in that case.
1162         Drive-by: reorganize the switch-case so all paths have the same `default` case.
1163
1164         * Localizations/en.lproj/localizedStrings.js:
1165
1166 2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
1167
1168         Web Inspector: Styles: Command-X should cut selected properties
1169         https://bugs.webkit.org/show_bug.cgi?id=199341
1170
1171         Reviewed by Devin Rousso.
1172
1173         Implement cutting of selected CSS properties in the style editor.
1174         Unify cutting and copying logic wherever possible.
1175
1176         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1177         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
1178         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.placeTextCaretInFocusedProperty): Added.
1179         Cut/copy events could only fire on SpreadsheetCSSStyleDeclarationEditor element if it
1180         has selection inside of it. Placing text caret at the beginning of the focused property
1181         ensures that.
1182
1183         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyCopy): Deleted.
1184         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._handleKeyDown):
1185         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._copySelectedProperties): Added.
1186         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._removeSelectedProperties): Added.
1187         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1188         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._stopSelection):
1189         * UserInterface/Views/SpreadsheetStyleProperty.js:
1190         Remove old copying logic.
1191
1192 2019-07-23  Nikita Vasilyev  <nvasilyev@apple.com>
1193
1194         Web Inspector: Display "Resource has no content" for about:blank iframes instead of an error
1195         https://bugs.webkit.org/show_bug.cgi?id=198029
1196
1197         Reviewed by Devin Rousso.
1198
1199         Display "about:blank" in the middle of the content view when selecting "about:blank" resources.
1200         Previoulsly, we showed a misleading "An error occurred trying to load the resource" error
1201         message.
1202
1203         * UserInterface/Models/CSSStyleSheet.js:
1204         (WI.CSSStyleSheet.prototype.requestContentFromBackend):
1205         * UserInterface/Models/Resource.js:
1206         (WI.Resource.prototype.requestContentFromBackend):
1207         * UserInterface/Models/Script.js:
1208         (WI.Script.prototype.requestContentFromBackend):
1209         * UserInterface/Models/SourceCode.js:
1210         (WI.SourceCode.generateSpecialContentForURL):
1211         (WI.SourceCode.prototype._processContent):
1212         (WI.SourceCode):
1213         * UserInterface/Views/ResourceContentView.js:
1214         (WI.ResourceContentView.prototype._contentAvailable):
1215
1216         * UserInterface/Views/SourceCodeTextEditor.js:
1217         (WI.SourceCodeTextEditor.prototype._contentAvailable):
1218         (WI.SourceCodeTextEditor.prototype._showMessage):
1219         * UserInterface/Views/TextResourceContentView.js:
1220         (WI.TextResourceContentView.prototype._contentDidPopulate):
1221         Display empty text editor when it has no content instead of "Resource has no content" message.
1222
1223 2019-07-22  Devin Rousso  <drousso@apple.com>
1224
1225         Web Inspector: Uncaught Exception: Breakpoint at specified location already exists.
1226         https://bugs.webkit.org/show_bug.cgi?id=197034
1227         <rdar://problem/50049004>
1228
1229         Reviewed by Joseph Pecoraro.
1230
1231         When "adjusting" a `WI.Breakpoint` (e.g. removing and then re-adding with a different
1232         configuration), make sure to only re-add the `WI.Breakpoint` to the `WI.Target` it was just
1233         removed from, rather to all `WI.targets`.
1234
1235         Since we iterate over `WI.targets` in both `WI.DebuggerManager.prototype._setBreakpoint` and
1236         `WI.DebuggerManager.prototype._removeBreakpoint`, we ended up iterating `WI.targets` twice.
1237
1238         Each time the `WI.Breakpoint` is removed from a `WI.Target`, pass the `WI.Target` to the
1239         `callback` given to `WI.DebuggerManager.prototype._removeBreakpoint`, so that the eventual
1240         call to `WI.DebuggerManager.prototype._setBreakpoint` can reuse it as the `specificTarget`,
1241         instead of iterating `WI.targets` (meaning we only iterate it once).
1242
1243         * UserInterface/Controllers/DebuggerManager.js:
1244         (WI.DebuggerManager.prototype.addBreakpoint):
1245         (WI.DebuggerManager.prototype._removeBreakpoint.didRemoveBreakpoint):
1246         (WI.DebuggerManager.prototype._breakpointDisplayLocationDidChange):
1247         (WI.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
1248
1249 2019-07-22  Devin Rousso  <drousso@apple.com>
1250
1251         Localization: change fps to FPS
1252         <rdar://problem/53342508>
1253
1254         Rubber-stamped by Joseph Pecoraro.
1255
1256         * UserInterface/Views/RenderingFrameTimelineOverviewGraph.js:
1257         (WI.RenderingFrameTimelineOverviewGraph.prototype._updateDividers.createDividerAtPosition):
1258
1259         * Localizations/en.lproj/localizedStrings.js:
1260
1261 2019-07-19  Devin Rousso  <drousso@apple.com>
1262
1263         Web Inspector: Issues toggling multiple breakpoints on one line
1264         https://bugs.webkit.org/show_bug.cgi?id=199918
1265
1266         Reviewed by Joseph Pecoraro.
1267
1268         * UserInterface/Views/SourceCodeTextEditor.js:
1269         (WI.SourceCodeTextEditor):
1270         (WI.SourceCodeTextEditor.prototype.close):
1271         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1272         (WI.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
1273         (WI.SourceCodeTextEditor.prototype._handleFormatterDidChange): Added.
1274         Listen for `WI.SourceCode.Event.FormatterDidChange` events as there may be multiple content
1275         views for the same `WI.SourceCode`. Previously, if there were, only the active one would
1276         properly update it's "line -> column -> breakpoint" mapping, causing an error to be thrown
1277         when the non-active content views tried to retrieve the breakpoint for the new line/column.
1278
1279 2019-07-17  Olivier Blin  <olivier.blin@softathome.com>
1280
1281         Web Inspector: application/xml content not shown
1282         https://bugs.webkit.org/show_bug.cgi?id=199861
1283
1284         Reviewed by Devin Rousso.
1285
1286         application/xml content from XHR requests was not shown in the
1287         inspector, an error message was displayed instead.
1288
1289         application/xml content should be treated as text, since
1290         application/xml is the standard mimetype for XML content.
1291         Apache serves XML content with the application/xml mimetype by
1292         default.
1293
1294         * UserInterface/Base/MIMETypeUtilities.js:
1295         (WI.fileExtensionForMIMEType):
1296         Report "xml" extension for "application/xml" mimetype.
1297         (WI.shouldTreatMIMETypeAsText):
1298         Treat XML files as text.
1299
1300 2019-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
1301
1302         Web Inspector: Changes panel should be strictly LTR
1303         https://bugs.webkit.org/show_bug.cgi?id=199767
1304
1305         Reviewed by Joseph Pecoraro.
1306
1307         Changes panel is primarily CSS code and CSS is strictly LTR.
1308
1309         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
1310         (WI.ChangesDetailsSidebarPanel):
1311
1312 2019-07-15  Youenn Fablet  <youenn@apple.com>
1313
1314         Enable a debug WebRTC mode without any encryption
1315         https://bugs.webkit.org/show_bug.cgi?id=199177
1316         <rdar://problem/52074986>
1317
1318         Reviewed by Eric Carlson.
1319
1320         * Localizations/en.lproj/localizedStrings.js:
1321         * UserInterface/Base/Main.js:
1322
1323 2019-07-15  Greg Doolittle <gr3g@apple.com>
1324
1325         Web Inspector: AXI: Audit: Typos in Accessibility audits
1326         https://bugs.webkit.org/show_bug.cgi?id=199716
1327         <rdar://problem/52721711>
1328
1329         Reviewed by Devin Rousso.
1330
1331         * UserInterface/Controllers/AuditManager.js:
1332
1333 2019-07-15  Devin Rousso  <drousso@apple.com>
1334
1335         Web Inspector: Device Settings: update Safari user agent from 12.2 to 13.0
1336         https://bugs.webkit.org/show_bug.cgi?id=199758
1337
1338         Reviewed by Maciej Stachowiak.
1339
1340         * UserInterface/Base/Main.js:
1341         (WI._handleDeviceSettingsToolbarButtonClicked):
1342
1343 2019-07-12  Nikita Vasilyev  <nvasilyev@apple.com>
1344
1345         Web Inspector: Changes: dismissing a blank property makes style rule to show in Changes panel
1346         https://bugs.webkit.org/show_bug.cgi?id=199760
1347
1348         Reviewed by Devin Rousso.
1349
1350         * UserInterface/Models/CSSProperty.js:
1351         (WI.CSSProperty.prototype._updateOwnerStyleText):
1352         Call updatePropertiesModifiedState even when _updateOwnerStyleText returns early.
1353
1354 2019-07-12  Devin Rousso  <drousso@apple.com>
1355
1356         Web Inspector: Elements: always show all navigation bar items, but disable those that wouldn't work
1357         https://bugs.webkit.org/show_bug.cgi?id=199594
1358
1359         Reviewed by Ross Kirsling.
1360
1361         Reorder the navigation items of the Elements tab (left to right):
1362          - Show rulers
1363          - Force print media styles
1364          - Force Dark Appearance / Force Light Appearance
1365          - Show compositing borders
1366          - Enable paint flashing
1367          - Show shadow DOM nodes
1368         This way, "related" (e.g. print styles and dark/light appearance both relate to CSS media)
1369         toggles are grouped closer together.
1370
1371         * UserInterface/Views/DOMTreeContentView.js:
1372         (WI.DOMTreeContentView):
1373         (WI.DOMTreeContentView.prototype.get navigationItems):
1374         (WI.DOMTreeContentView.prototype._defaultAppearanceDidChange):
1375         (WI.DOMTreeContentView.prototype._toggleAppearance):
1376
1377         * Localizations/en.lproj/localizedStrings.js:
1378
1379 2019-07-11  Devin Rousso  <drousso@apple.com>
1380
1381         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"}]}
1382         https://bugs.webkit.org/show_bug.cgi?id=199555
1383
1384         Reviewed by Joseph Pecoraro.
1385
1386         Use modern inspected target support checking, and defer agent commands until a target is
1387         available.
1388
1389         * UserInterface/Views/Layers3DContentView.js:
1390         (WI.Layers3DContentView):
1391         (WI.Layers3DContentView.prototype._showPaintRectsSettingChanged):
1392         (WI.Layers3DContentView.prototype._updateCompositingBordersButtonState):
1393         (WI.Layers3DContentView.prototype._toggleCompositingBorders):
1394
1395         * UserInterface/Views/DOMTreeContentView.js:
1396         (WI.DOMTreeContentView):
1397         (WI.DOMTreeContentView.prototype._toggleCompositingBorders):
1398         (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
1399         (WI.DOMTreeContentView.prototype._showPaintRectsSettingChanged):
1400         (WI.DOMTreeContentView.prototype._showPrintStylesChanged):
1401         (WI.DOMTreeContentView.prototype._showRulersChanged):
1402         Drive-by: apply the same changes to the Elements tab for when the Layers tab isn't enabled.
1403
1404 2019-07-09  Devin Rousso  <drousso@apple.com>
1405
1406         Web Inspector: Canvas: replace WTF::Vector with std::initializer_list in CallTracer to avoid dynamic allocations
1407         https://bugs.webkit.org/show_bug.cgi?id=199611
1408
1409         Reviewed by Joseph Pecoraro.
1410
1411         * UserInterface/Models/Recording.js:
1412         (WI.Recording.prototype.async swizzle):
1413         Drive-by: handle the situation where a parameter is an array of deduplicated strings, which
1414                   would otherwise be treated as an array of numbers.
1415
1416 2019-07-09  Joseph Pecoraro  <pecoraro@apple.com>
1417
1418         Web Inspector: Add another Protocol Version (iOS 13.0)
1419         https://bugs.webkit.org/show_bug.cgi?id=199631
1420         <rdar://problem/47538193>
1421
1422         Reviewed by Devin Rousso.
1423
1424         * UserInterface/Protocol/Legacy/13.0/InspectorBackendCommands.js: Added.
1425         * Versions/Inspector-iOS-13.0.json: Added.
1426
1427 2019-07-08  Devin Rousso  <drousso@apple.com>
1428
1429         Web Inspector: Debugger: special breakpoints and event targets should be sorted into separate "areas"
1430         https://bugs.webkit.org/show_bug.cgi?id=199554
1431
1432         Reviewed by Joseph Pecoraro.
1433
1434         Move the special All Requests breakpoint down to be right above all other URL breakpoints.
1435         Move the `window` object tree element below other DOM node tree elements.
1436
1437         * UserInterface/Views/DebuggerSidebarPanel.js:
1438         (WI.DebuggerSidebarPanel.prototype._addTreeElement):
1439         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1440         (WI.SourcesNavigationSidebarPanel.prototype._insertDebuggerTreeElement):
1441
1442 2019-07-08  Devin Rousso  <drousso@apple.com>
1443
1444         Web Inspector: DOM Debugger: there should be different icons for each type of DOM breakpoint
1445         https://bugs.webkit.org/show_bug.cgi?id=199552
1446
1447         Reviewed by Joseph Pecoraro.
1448
1449         [S] for Subtree Modified
1450         [A] for Attribute Modified
1451         [R] for Node Removed
1452
1453         * UserInterface/Views/DOMBreakpointTreeElement.js:
1454         (WI.DOMBreakpointTreeElement):
1455         * UserInterface/Views/DOMBreakpointTreeElement.css: Added.
1456         (.breakpoint.dom.breakpoint-for-subtree-modified:not(.breakpoint-paused-icon) .icon):
1457         (.breakpoint.dom.breakpoint-for-attribute-modified:not(.breakpoint-paused-icon) .icon):
1458         (.breakpoint.dom.breakpoint-for-node-removed:not(.breakpoint-paused-icon) .icon):
1459
1460         * UserInterface/Main.html:
1461         * UserInterface/Images/DOMBreakpointAttributeModified.svg: Added.
1462         * UserInterface/Images/DOMBreakpointNodeRemoved.svg: Added.
1463         * UserInterface/Images/DOMBreakpointSubtreeModified.svg: Added.
1464
1465 2019-07-08  Devin Rousso  <drousso@apple.com>
1466
1467         Uncaught Exception: Unexpected enum value: CPU
1468         https://bugs.webkit.org/show_bug.cgi?id=199564
1469
1470         Reviewed by Joseph Pecoraro.
1471
1472         * UserInterface/Controllers/TimelineManager.js:
1473         (WI.TimelineManager.prototype._updateAutoCaptureInstruments):
1474         Filter the list of auto-capture instruments based on what's actually supported, instead of
1475         directly using the saved list from the `WI.Setting`.
1476
1477 2019-07-08  Devin Rousso  <drousso@apple.com>
1478
1479         Enabling the Layers tab hides the paint flashing button
1480         https://bugs.webkit.org/show_bug.cgi?id=199549
1481
1482         Reviewed by Joseph Pecoraro.
1483
1484         Still show the Compositing Borders and Paint Flashing navigation items in the Elements tab
1485         even when the Layers tab is enabled (just like the Layers details sidebar).
1486
1487         * UserInterface/Views/DOMTreeContentView.js:
1488         (WI.DOMTreeContentView.prototype.get navigationItems):
1489         (WI.DOMTreeContentView.prototype._updateCompositingBordersButtonToMatchPageSettings):
1490
1491 2019-07-08  Devin Rousso  <drousso@apple.com>
1492
1493         Web Inspector: REGRESSION: Elements: pasting in the Styles sidebar adds a text node to the DOM tree
1494         https://bugs.webkit.org/show_bug.cgi?id=199588
1495
1496         Reviewed by Joseph Pecoraro.
1497
1498         * UserInterface/Base/Main.js:
1499         (WI._paste):
1500         Bail if `event.defaultPrevented`, as that means that something else has handled (and likely
1501         overrode) this event.
1502
1503 2019-07-08  Devin Rousso  <drousso@apple.com>
1504
1505         Web Inspector: the "x" in the Exception icon overlaps the border
1506         https://bugs.webkit.org/show_bug.cgi?id=199553
1507
1508         Reviewed by Joseph Pecoraro.
1509
1510         * UserInterface/Images/Exception.svg:
1511         * UserInterface/Images/Function.svg:
1512         * UserInterface/Images/TailDeletedFunction.svg:
1513
1514 2019-07-08  Devin Rousso  <drousso@apple.com>
1515
1516         Web Inspector: Debugger: there should be a different icon for URL breakpoints
1517         https://bugs.webkit.org/show_bug.cgi?id=199550
1518
1519         Reviewed by Joseph Pecoraro.
1520
1521         Use the same (down|up) arrow icon for the Network Tab and the Network timeline.
1522
1523         * UserInterface/Views/URLBreakpointTreeElement.js:
1524         (WI.URLBreakpointTreeElement):
1525         * UserInterface/Views/URLBreakpointTreeElement.css:
1526         (.breakpoint.url:not(.breakpoint-paused-icon) .icon): Added.
1527
1528         * UserInterface/Views/DebuggerSidebarPanel.js:
1529         (WI.DebuggerSidebarPanel.prototype._addBreakpoint):
1530         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
1531         (WI.SourcesNavigationSidebarPanel.prototype._addBreakpoint):
1532
1533         * UserInterface/Images/URLBreakpoint.svg: Added.
1534
1535 2019-07-08  Devin Rousso  <drousso@apple.com>
1536
1537         Web Inspector: Timelines: CPU: the Duration string isn't localized
1538         https://bugs.webkit.org/show_bug.cgi?id=199582
1539         <rdar://problem/51698165>
1540
1541         Reviewed by Joseph Pecoraro.
1542
1543         * UserInterface/Views/CPUTimelineView.js:
1544         (WI.CPUTimelineView.prototype._layoutEnergyChart):
1545
1546         * Localizations/en.lproj/localizedStrings.js:
1547
1548 2019-07-06  Nikita Vasilyev  <nvasilyev@apple.com>
1549
1550         Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
1551         https://bugs.webkit.org/show_bug.cgi?id=199090
1552         <rdar://problem/51965431>
1553
1554         Reviewed by Devin Rousso.
1555
1556         `}` gets added by WI.tokenizeCSSValue (called by SpreadsheetStyleProperty.prototype._renderValue)
1557         when it encounters unbalanced quotes. Fix unbalanced quotes by re-rendering the value from the model,
1558         not the DOM content.
1559
1560         * UserInterface/Views/SpreadsheetStyleProperty.js:
1561         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
1562         For consistency, render property name from the model as well.
1563
1564 2019-07-05  Devin Rousso  <drousso@apple.com>
1565
1566         Web Inspector: current call frame indicator not visible in dark mode
1567         https://bugs.webkit.org/show_bug.cgi?id=199047
1568         <rdar://problem/51922895>
1569
1570         Reviewed by Timothy Hatcher.
1571
1572         * UserInterface/Views/CallFrameTreeElement.css:
1573         (.tree-outline .item.call-frame .status > .status-image):
1574         (.tree-outline .item.call-frame.selected .status > .status-image):
1575         Replace the CSS variables used for `fill` with their actual color value (in `light` mode),
1576         as the semantic "name" of the variable doesn't really match its usage. As an example, the
1577         current call frame shouldn't rely on the value of `--border-color`, as it's not a "border".
1578
1579 2019-07-05  Matt Baker  <mattbaker@apple.com>
1580
1581         Web Inspector: Elements: use a CSS transition when showing/hiding DOM breakpoint gutter
1582         https://bugs.webkit.org/show_bug.cgi?id=199411
1583
1584         Reviewed by Devin Rousso.
1585
1586         * UserInterface/Views/DOMTreeContentView.css:
1587         (.content-view.dom-tree .tree-outline.dom):
1588
1589 2019-07-02  Devin Rousso  <drousso@apple.com>
1590
1591         Web Inspector: Elements: allow nodes to be copied and pasted
1592         https://bugs.webkit.org/show_bug.cgi?id=199182
1593
1594         Reviewed by Matt Baker.
1595
1596         Copy is already supported, so there's nothing that needs to be done there.
1597
1598         Pasting is as simple as calling `insertAdjacentHTML("afterend", ...)` on the selected node.
1599
1600         * UserInterface/Base/Main.js:
1601         (WI.contentLoaded):
1602         (WI._paste): Added.
1603
1604         * UserInterface/Views/DOMTreeContentView.js:
1605         (WI.DOMTreeContentView.prototype.handlePasteEvent): Added.
1606
1607 2019-07-02  Devin Rousso  <drousso@apple.com>
1608
1609         Web Inspector: DOM Debugger: descendant breakpoints should be able to be enabled/disabled/deleted from a collapsed parent
1610         https://bugs.webkit.org/show_bug.cgi?id=199332
1611
1612         Reviewed by Matt Baker.
1613
1614         * UserInterface/Controllers/DOMDebuggerManager.js:
1615         (WI.DOMDebuggerManager.prototype.get domBreakpoints):
1616         (WI.DOMDebuggerManager.prototype.domBreakpointsForNode):
1617         (WI.DOMDebuggerManager.prototype.domBreakpointsInSubtree): Added.
1618         (WI.DOMDebuggerManager.prototype.removeDOMBreakpoint):
1619         (WI.DOMDebuggerManager.prototype._detachDOMBreakpoint):
1620         (WI.DOMDebuggerManager.prototype._detachBreakpointsForFrame):
1621         (WI.DOMDebuggerManager.prototype._speculativelyResolveDOMBreakpointsForURL):
1622         (WI.DOMDebuggerManager.prototype._resolveDOMBreakpoint):
1623         Provide a way of getting a "summary" array of `DOMBreakpoint`s for all descendant nodes.
1624         Rework the data structure for holding `DOMBreakpoint`s to use a `Multimap` so no duplicates
1625         can be added (it uses a `Set` instead of an `Array`).
1626
1627         * UserInterface/Views/DOMTreeElement.js:
1628         (WI.DOMTreeElement):
1629         (WI.DOMTreeElement.prototype.get hasBreakpoint):
1630         (WI.DOMTreeElement.prototype.set breakpointStatus):
1631         (WI.DOMTreeElement.prototype.bindRevealDescendantBreakpointsMenuItemHandler): Added.
1632         (WI.DOMTreeElement.prototype._subtreeBreakpointChanged): Added.
1633         (WI.DOMTreeElement.prototype._updateBreakpointStatus):
1634         (WI.DOMTreeElement.prototype._statusImageContextmenu):
1635         (WI.DOMTreeElement.prototype.subtreeBreakpointCountDidChange): Deleted.
1636         * UserInterface/Views/DOMTreeOutline.js:
1637         (WI.DOMTreeOutline.prototype.populateContextMenu):
1638         * UserInterface/Views/ContextMenuUtilities.js:
1639         (WI.appendContextMenuItemsForDOMNode):
1640         (WI.appendContextMenuItemsForDOMNodeBreakpoints):
1641         Keep track of the actual descendant `DOMNodeTreeElement` that have breakpoints, rather than
1642         just a count, so that the "Reveal Descendant Breakpoints" action is able to access them.
1643         Change "Reveal Descendant Breakpoints" to reveal and select all descendant breakpoints
1644         instead of just the first one.
1645         Drive-by: don't remove specific (event) listener breakpoints when invoking the
1646                   "Delete Descendant Breakpoints" action, as that's not obvious from the UI.
1647
1648         * UserInterface/Controllers/BreakpointPopoverController.js:
1649         (WI.BreakpointPopoverController.prototype.appendContextMenuItems):
1650         * UserInterface/Views/DOMBreakpointTreeElement.js:
1651         (WI.DOMBreakpointTreeElement.prototype.populateContextMenu):
1652         * UserInterface/Views/DOMNodeTreeElement.js:
1653         (WI.DOMNodeTreeElement.prototype.populateContextMenu):
1654         * UserInterface/Views/EventBreakpointTreeElement.js:
1655         (WI.EventBreakpointTreeElement.prototype.populateContextMenu):
1656         * UserInterface/Views/URLBreakpointTreeElement.js:
1657         (WI.URLBreakpointTreeElement.prototype.populateContextMenu):
1658         Remove the separator before "Delete Breakpoint" so all breakpoint actions are in the same section.
1659
1660         * Localizations/en.lproj/localizedStrings.js:
1661         * UserInterface/Base/Multimap.js:
1662         (Multimap.prototype.get size): Added.
1663
1664 2019-07-02  Matt Baker  <mattbaker@apple.com>
1665
1666         REGRESSION (r238563): Web Inspector: Selection is erratic when holding Up/Down on Network Table
1667         https://bugs.webkit.org/show_bug.cgi?id=193841
1668         <rdar://problem/47559124>
1669
1670         Reviewed by Devin Rousso.
1671
1672         Selecting and revealing a row after reloading Table data, but before the
1673         layout that populates visible rows, could cause the Table to always be
1674         scrolled so that the revealed row is first.
1675
1676         This patch fixes `revealRow` by calculating the position of the row being
1677         revealed in the absence of its DOM element, so that the Table is only
1678         scrolled when necessary.
1679
1680         * UserInterface/Views/Table.js:
1681         (WI.Table.prototype.revealRow):
1682         (WI.Table.prototype._resizeColumnsAndFiller):
1683         Drive-by fix: use realOffsetWidth for consistency.
1684         (WI.Table.prototype._updateVisibleRows):
1685         (WI.Table.prototype._calculateOffsetHeight):
1686         (WI.Table.prototype._calculateScrollTop):
1687
1688 2019-07-02  Devin Rousso  <drousso@apple.com>
1689
1690         Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side
1691         https://bugs.webkit.org/show_bug.cgi?id=198956
1692
1693         Reviewed by Matt Baker.
1694
1695         * UserInterface/Base/Main.js:
1696         (WI.reset): Added.
1697
1698         * UserInterface/Views/SettingsTabContentView.js:
1699         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
1700
1701 2019-07-02  Devin Rousso  <drousso@apple.com>
1702
1703         Web Inspector: Audit: missing demo audits for WebInspectorAudit functions
1704         https://bugs.webkit.org/show_bug.cgi?id=198719
1705
1706         Reviewed by Matt Baker.
1707
1708         Other than the LayoutTests, there's no way to see an example of the functionality of many of
1709         the exposed `WebInspectorAudit` functions. There should be a demo audit for every exposed
1710         function so they're more discoverable.
1711
1712         * UserInterface/Controllers/AuditManager.js:
1713         (WI.AuditManager.prototype._addDefaultTests):
1714         (WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Added.
1715         Move all demo audit test functions to be actual JavaScript functions, which are then
1716         stringified and stripped of unnecessary white-space.
1717
1718         * Localizations/en.lproj/localizedStrings.js:
1719
1720 2019-07-01  Devin Rousso  <drousso@apple.com>
1721
1722         Web Inspector: REGRESSION(r245498): Timelines: CPU: discontinuities are filled in by the next record
1723         https://bugs.webkit.org/show_bug.cgi?id=198927
1724
1725         Reviewed by Matt Baker.
1726
1727         * UserInterface/Controllers/TimelineManager.js:
1728         (WI.TimelineManager.prototype.capturingStarted):
1729         (WI.TimelineManager.prototype.capturingStopped):
1730         * UserInterface/Models/TimelineRecording.js:
1731         (WI.TimelineRecording):
1732         (WI.TimelineRecording.prototype.start):
1733         (WI.TimelineRecording.prototype.capturingStarted): Added.
1734         (WI.TimelineRecording.prototype.capturingStopped): Added.
1735         (WI.TimelineRecording.prototype.reset):
1736         (WI.TimelineRecording.prototype.addRecord):
1737         (WI.TimelineRecording.prototype.discontinuitiesInTimeRange):
1738         (WI.TimelineRecording.prototype.addDiscontinuity): Deleted.
1739         Notify the `TimelineRecording` when capturing has started/stopped.
1740         Adjust the first record after a discontinuity to have it's `startTime` match the `endTime`
1741         of the most recent discontinuity.
1742
1743         * UserInterface/Models/Timeline.js:
1744         (WI.Timeline.prototype.addRecord):
1745         * UserInterface/Models/CPUTimeline.js:
1746         (WI.CPUTimeline.prototype.addRecord):
1747         * UserInterface/Models/CPUTimelineRecord.js:
1748         (WI.CPUTimelineRecord.prototype.adjustStartTime): Added.
1749         (WI.CPUTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted.
1750         * UserInterface/Models/MemoryTimeline.js:
1751         (WI.MemoryTimeline.prototype.addRecord):
1752         * UserInterface/Models/MemoryTimelineRecord.js:
1753         (WI.MemoryTimelineRecord.prototype.adjustStartTime): Added.
1754         (WI.MemoryTimelineRecord.prototype.adjustStartTimeToLastRecord): Deleted.
1755         * UserInterface/Models/NetworkTimeline.js:
1756         (WI.NetworkTimeline.prototype.addRecord):
1757
1758         * UserInterface/Views/CPUTimelineView.js:
1759         (WI.CPUTimelineView.prototype.layout):
1760         * UserInterface/Views/MemoryTimelineOverviewGraph.js:
1761         (WI.MemoryTimelineOverviewGraph.prototype.layout):
1762         * UserInterface/Views/MemoryTimelineView.js:
1763         (WI.MemoryTimelineView.prototype.layout):
1764         Include discontinuities that exactly match the start/end time of the record immediately
1765         before/after the discontinuity.
1766
1767         * UserInterface/Views/TimelineRecordingContentView.js:
1768         (WI.TimelineRecordingContentView):
1769         (WI.TimelineRecordingContentView.prototype._handleTimelineCapturingStateChanged):
1770         (WI.TimelineRecordingContentView.prototype._recordingReset):
1771         Move the logic for handling discontinuity start/end times to the `TimelineRecording`.
1772
1773         * UserInterface/Base/Utilities.js:
1774
1775 2019-06-29  Nikita Vasilyev  <nvasilyev@apple.com>
1776
1777         Web Inspector: Remove trailing white-space
1778         https://bugs.webkit.org/show_bug.cgi?id=199346
1779
1780         Reviewed by Matt Baker.
1781
1782         * UserInterface/Controllers/NetworkManager.js:
1783         (WI.NetworkManager.prototype._initiatorCallFramesFromPayload):
1784         * UserInterface/Images/Import.svg:
1785         * UserInterface/Views/CanvasOverviewContentView.css:
1786         (.navigation-bar > .item.canvas-recording-auto-capture > label > input):
1787         * UserInterface/Views/DataGrid.css:
1788         (.data-grid .resizer):
1789         * UserInterface/Views/DatabaseContentView.css:
1790         (.storage-view):
1791         * UserInterface/Views/GoToLineDialog.css:
1792         (@media (prefers-color-scheme: dark)):
1793         * UserInterface/Views/GradientSlider.css:
1794         (.gradient-slider > .add-area):
1795         (.gradient-slider-knob > :matches(img, div)):
1796         * UserInterface/Views/ResourceDetailsSection.css:
1797         * UserInterface/Views/ScrubberNavigationItem.css:
1798         (.navigation-bar .item.scrubber > input[disabled]):
1799         * UserInterface/Views/SourceCodeTextEditor.css:
1800         (.popover .expandable):
1801         * UserInterface/Views/TimelineRecordBar.css:
1802         (.timeline-record-bar.timeline-record-type-script.garbage-collected > .segment,):
1803         * UserInterface/Workers/HeapSnapshot/HeapSnapshotWorker.js:
1804         (HeapSnapshotWorker.prototype.createSnapshot):
1805
1806 2019-06-29  Nikita Vasilyev  <nvasilyev@apple.com>
1807
1808         Remove duplicate "Private" section and fix white space
1809
1810         Unreviewed code style fix.
1811
1812         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1813         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1814
1815 2019-06-27  Beth Dakin  <bdakin@apple.com>
1816
1817         Upstream use of MACCATALYST
1818         https://bugs.webkit.org/show_bug.cgi?id=199245
1819         rdar://problem/51687723
1820
1821         Reviewed by Tim Horton.
1822
1823         * Configurations/Base.xcconfig:
1824         * Configurations/SDKVariant.xcconfig:
1825
1826 2019-06-27  Devin Rousso  <drousso@apple.com>
1827
1828         Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString
1829         https://bugs.webkit.org/show_bug.cgi?id=199252
1830
1831         Reviewed by Joseph Pecoraro.
1832
1833         Add entries for `console.countReset` and `console.timeLog`.
1834
1835         Rename `title` to `label` for `console.time`, `console.timeLog`, and `console.timeEnd` to
1836         better match the spec.
1837
1838         * UserInterface/Models/NativeFunctionParameters.js:
1839
1840 2019-06-26  Joseph Pecoraro  <pecoraro@apple.com>
1841
1842         Web Inspector: Update legacy backend commands after enum name change
1843         https://bugs.webkit.org/show_bug.cgi?id=199250
1844
1845         Reviewed by Devin Rousso.
1846
1847         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js:
1848         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js:
1849         * UserInterface/Protocol/Legacy/12.2/InspectorBackendCommands.js:
1850
1851 2019-06-26  Devin Rousso  <drousso@apple.com>
1852
1853         Web Inspector: REGRESSION: Elements: the forced pseudo-class indicator isn't visible when hovering
1854         https://bugs.webkit.org/show_bug.cgi?id=199166
1855
1856         Reviewed by Matt Baker.
1857
1858         Make the pseudo-class indicator into its own element instead of being a `::before`.
1859
1860         * UserInterface/Views/DOMTreeElement.js:
1861         (WI.DOMTreeElement):
1862         (WI.DOMTreeElement.prototype.updateSelectionArea):
1863         (WI.DOMTreeElement.prototype.updateTitle):
1864         (WI.DOMTreeElement.prototype._updatePseudoClassIndicator): Added.
1865         (WI.DOMTreeElement.prototype.get pseudoClassesEnabled): Deleted.
1866         (WI.DOMTreeElement.prototype._nodePseudoClassesDidChange): Deleted.
1867
1868         * UserInterface/Views/DOMTreeOutline.css:
1869         (.tree-outline.dom):
1870         (.tree-outline.dom li .pseudo-class-indicator): Added.
1871         (body[dir=ltr] .tree-outline.dom li .pseudo-class-indicator): Added.
1872         (body[dir=rtl] .tree-outline.dom li .pseudo-class-indicator): Added.
1873         (.tree-outline.dom:focus li.selected .pseudo-class-indicator): Added.
1874         (.tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
1875         (body[dir=ltr] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
1876         (body[dir=rtl] .tree-outline.dom li.pseudo-class-enabled > .selection-area::before): Deleted.
1877         (.tree-outline.dom:focus li.selected.pseudo-class-enabled > .selection-area::before): Deleted.
1878
1879         * UserInterface/Views/FormattedValue.css:
1880         (.formatted-node > .tree-outline.dom):
1881         Adjust the indent of any `DOMTreeOutline` so there's more room for the pseudo-class
1882         indicator, such as in the Console.
1883
1884 2019-06-25  Matt Baker  <mattbaker@apple.com>
1885
1886         Web Inspector: Elements: show shadow DOM by default
1887         https://bugs.webkit.org/show_bug.cgi?id=199128
1888
1889         Reviewed by Devin Rousso.
1890
1891         * UserInterface/Base/Setting.js:
1892
1893         * UserInterface/Test/Test.js:
1894         (WI.loaded):
1895         Overriding the default value isn't necessary since the default is now true.
1896
1897 2019-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
1898
1899         REGRESSION(r246621): Web Inspector: Styles: property may get removed when editing after deleting value
1900         https://bugs.webkit.org/show_bug.cgi?id=199143
1901         <rdar://problem/52042815>
1902
1903         Reviewed by Matt Baker.
1904
1905         r246621 affected when WI.CSSStyleDeclaration.Event.PropertiesChanged event is fired, which caused
1906         SpreadsheetCSSStyleDeclarationEditor to possibly enter a state when `focused` property is
1907         incorrectly set to false.
1908
1909         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1910         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved): Removed.
1911         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyWillRemove): Added.
1912         Renamed from "removed" to "willRemove" since we need to call it before the property DOM element
1913         is detached from the document.
1914
1915         * UserInterface/Views/SpreadsheetStyleProperty.js:
1916         (WI.SpreadsheetStyleProperty.prototype.remove):
1917         Don't set focused to false when the removed property wasn't focused.
1918         This code need to exist because removing focused element from the DOM doesn't trigger blur event.
1919
1920 2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
1921
1922         Web Inspector: Implement console.timeLog
1923         https://bugs.webkit.org/show_bug.cgi?id=199184
1924
1925         Reviewed by Devin Rousso.
1926
1927         * UserInterface/Views/ConsoleMessageView.js:
1928         (WI.ConsoleMessageView.prototype._appendMessageTextAndArguments):
1929         Time messages (like timeLog) do not include their messageText
1930         in their parameters list. So to behave more like normal logs
1931         build a parameter list that includes it at the front.
1932
1933 2019-06-23  Matt Baker  <mattbaker@apple.com>
1934
1935         Web Inspector: REGRESSION (r246684): Dark Mode: dashboard buttons should have no background
1936         https://bugs.webkit.org/show_bug.cgi?id=199136
1937         <rdar://problem/52035798>
1938
1939         Reviewed by Joseph Pecoraro.
1940
1941         * UserInterface/Views/DefaultDashboardView.css:
1942         (@media (prefers-color-scheme: dark)):
1943         (.toolbar .dashboard .item.button,):
1944
1945 2019-06-23  Nikita Vasilyev  <nvasilyev@apple.com>
1946
1947         Web Inspector: Styles: show green highlight for newly added properties only when name and value are present
1948         https://bugs.webkit.org/show_bug.cgi?id=199131
1949
1950         Reviewed by Matt Baker.
1951
1952         * UserInterface/Views/SpreadsheetStyleProperty.js:
1953         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1954
1955 2019-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
1956
1957         REGRESSION(r241980): Web Inspector: Styles: Pressing Tab/Enter on last property no longer focuses on selector on next rule
1958         https://bugs.webkit.org/show_bug.cgi?id=199125
1959         <rdar://problem/52011182>
1960
1961         Reviewed by Matt Baker.
1962
1963         Since SpreadsheetSelectorField's focus handler was removed in r241980, focusing on the selector element
1964         doesn't start editing it.
1965
1966         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1967         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
1968
1969 2019-06-22  Nikita Vasilyev  <nvasilyev@apple.com>
1970
1971         Web Inspector: Styles: unbalanced quotes and parenthesis aren't displayed as property closed after editing values
1972         https://bugs.webkit.org/show_bug.cgi?id=199090
1973         <rdar://problem/51965431>
1974
1975         Reviewed by Matt Baker.
1976
1977         * UserInterface/Views/SpreadsheetStyleProperty.js:
1978         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
1979         Unbalanced quotes and parenthesis are fixed inside of CSSProperty's rawValue setter.
1980         Render the value from the model, not the view.
1981
1982 2019-06-21  Matt Baker  <mattbaker@apple.com>
1983
1984         Web Inspector: remove unused DataGrid style .force-focus
1985         https://bugs.webkit.org/show_bug.cgi?id=199112
1986         <rdar://problem/51993412>
1987
1988         Reviewed by Timothy Hatcher.
1989
1990         * UserInterface/Views/HeapAllocationsTimelineView.css:
1991         (.timeline-view.heap-allocations > .data-grid:not(:focus) tr.selected.invalid):
1992         (.timeline-view.heap-allocations > .data-grid:not(:focus, .force-focus) tr.selected.invalid): Deleted.
1993
1994         * UserInterface/Views/ResourceTreeElement.css:
1995         (.item.resource.resource-type-websocket:not(.selected) .status .ready-state.open,):
1996         (.item.resource.resource-type-websocket:not(.selected) .status .ready-state.connecting,):
1997         Missed in https://bugs.webkit.org/show_bug.cgi?id=190480.
1998
1999 2019-06-21  Matt Baker  <mattbaker@apple.com>
2000
2001         Web Inspector: remove .legacy-mac/.latest-mac CSS classes, standardize on .latest-mac UI
2002         https://bugs.webkit.org/show_bug.cgi?id=199109
2003         <rdar://problem/51991129>
2004
2005         Reviewed by Timothy Hatcher.
2006
2007         Drop legacy macOS version support from Web Inspector UI.
2008
2009         * UserInterface/Base/Main.js:
2010
2011         * UserInterface/Views/DefaultDashboardView.css:
2012         (@media (prefers-color-scheme: dark)):
2013         (body.latest-mac .toolbar .dashboard .item.button): Deleted.
2014
2015         * UserInterface/Views/Toolbar.css:
2016         (.toolbar):
2017         (.toolbar .item.button,):
2018         (.toolbar .search-bar > input[type="search"]):
2019         (.toolbar .search-bar > input[type="search"]:focus):
2020         (@media (-webkit-min-device-pixel-ratio: 2)):
2021         (.toolbar .item.button:active):
2022         (body.window-inactive .toolbar .item.button,):
2023         (@media (prefers-color-scheme: dark)):
2024         (.toolbar .search-bar > input[type="search"]::placeholder):
2025         (body.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
2026         (body.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
2027         (.toolbar .dashboard-container):
2028         (body .toolbar): Deleted.
2029         (body.legacy-mac .toolbar .item.button,): Deleted.
2030         (body.legacy-mac .toolbar .search-bar > input[type="search"]): Deleted.
2031         (body.legacy-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
2032         (body.legacy-mac .toolbar .item.button:active): Deleted.
2033         (body.window-inactive.legacy-mac .toolbar .item.button,): Deleted.
2034         (body.latest-mac .toolbar .item.button,): Deleted.
2035         (body.latest-mac .toolbar .search-bar > input[type="search"]): Deleted.
2036         (body.latest-mac .toolbar .search-bar > input[type="search"]:focus): Deleted.
2037         (body.latest-mac .toolbar .item.button:active): Deleted.
2038         (body.latest-mac.window-inactive .toolbar .item.button,): Deleted.
2039         (body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
2040         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder): Deleted.
2041         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button): Deleted.
2042         (body.latest-mac .toolbar .dashboard-container): Deleted.
2043
2044 2019-06-20  Matt Baker  <mattbaker@apple.com>
2045
2046         Web Inspector: rename shadowRootPushed parameter to match protocol
2047         https://bugs.webkit.org/show_bug.cgi?id=199098
2048
2049         Reviewed by Devin Rousso.
2050
2051         * UserInterface/Protocol/DOMObserver.js:
2052         (WI.DOMObserver.prototype.shadowRootPushed):
2053
2054 2019-06-20  Devin Rousso  <drousso@apple.com>
2055
2056         Web Inspector: Error "null is not an object (evaluating 'syntaxTree.containersOfPosition')" when setting a breakpoint
2057         https://bugs.webkit.org/show_bug.cgi?id=199082
2058
2059         Reviewed by Matt Baker.
2060
2061         * UserInterface/Views/SourceCodeTextEditor.js:
2062         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
2063         The script syntax tree may be fetched even if the resource hasn't finished parsing (or had
2064         a syntax error), so it's possible for it to be `null`.
2065
2066 2019-06-20  Devin Rousso  <drousso@apple.com>
2067
2068         Web Inspector: Dark Mode: inactive tab bar item should get darker on hover
2069         https://bugs.webkit.org/show_bug.cgi?id=199022
2070
2071         Reviewed by Darin Adler.
2072
2073         * UserInterface/Views/TabBar.css:
2074         (.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
2075         (@media not (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
2076         (@media (prefers-color-scheme: dark) .tab-bar):
2077         (@media (prefers-color-scheme: dark) .tab-bar > .item):
2078         (@media (prefers-color-scheme: dark) .tab-bar > .item:not(.disabled).selected):
2079         (@media (prefers-color-scheme: dark) .tab-bar:not(.animating) > .item:not(.selected):hover):
2080         (@media (prefers-color-scheme: dark) body.window-inactive .tab-bar):
2081         (@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item):
2082         (@media (prefers-color-scheme: dark) body.window-inactive .tab-bar > .item.selected):
2083
2084         * UserInterface/Views/Toolbar.css:
2085         (@media (prefers-color-scheme: dark) body .toolbar):
2086
2087 2019-06-20  Devin Rousso  <drousso@apple.com>
2088
2089         Web Inspector: Debugger: setting a breakpoint on a non-JavaScript line should immediately show as unresolved
2090         https://bugs.webkit.org/show_bug.cgi?id=199033
2091
2092         Reviewed by Matt Baker.
2093
2094         Remove the `shouldSpeculativelyResolve` parameter, as it was resolving breakpoints even in
2095         the case that there were no resolved locations for the given breakpoint.
2096
2097         In the case that there are resolved locations, the breakpoint would've already been resolved
2098         by the time that `shouldSpeculativelyResolve` would've taken effect, so it's unnecessary.
2099
2100         This parameter was only used when setting a breakpoint from a `SourceCodeTextEditor` gutter.
2101
2102         * UserInterface/Controllers/DebuggerManager.js:
2103         (WI.DebuggerManager.prototype.addBreakpoint):
2104         (WI.DebuggerManager.prototype._setBreakpoint):
2105         (WI.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
2106
2107         * UserInterface/Views/SourceCodeTextEditor.js:
2108         (WI.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
2109
2110 2019-06-20  Devin Rousso  <drousso@apple.com>
2111
2112         Web Inspector: Edit -> Tag doesn't do anything for html, head, and body elements
2113         https://bugs.webkit.org/show_bug.cgi?id=199052
2114         <rdar://problem/51923906>
2115
2116         Reviewed by Matt Baker.
2117
2118         * UserInterface/Views/DOMTreeElement.js:
2119         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
2120          - Don't show an "Edit > Tag" for <html>, <head>, and <body> nodes
2121          - Disable any "Edit" submenu item if it's target is already being edited
2122          - Prevent "Add" submenu items from being shown for text nodes
2123
2124 2019-06-19  Devin Rousso  <drousso@apple.com>
2125
2126         Web Inspector: REGRESSION: Debugger: current call frame indicator isn't vertically centered
2127         https://bugs.webkit.org/show_bug.cgi?id=199015
2128
2129         Reviewed by Matt Baker.
2130
2131         * UserInterface/Views/CallFrameTreeElement.css:
2132         (.tree-outline .item.call-frame .status):
2133
2134 2019-06-19  Nikita Vasilyev  <nvasilyev@apple.com>
2135
2136         REGRESSION(r240946): Web Inspector: Styles: Pasting multiple properties has issues
2137         https://bugs.webkit.org/show_bug.cgi?id=198505
2138         <rdar://problem/51374780>
2139
2140         Reviewed by Matt Baker.
2141
2142         Since r240946, setting WI.CSSStyleDeclaration.prototype.text updates the text immediately.
2143         When WI.CSSStyleDeclaration.prototype.update gets called after setting text, it exits early
2144         without firing WI.CSSStyleDeclaration.Event.PropertiesChanged.
2145
2146         * UserInterface/Models/CSSStyleDeclaration.js:
2147         (WI.CSSStyleDeclaration):
2148         (WI.CSSStyleDeclaration.prototype.set text):
2149
2150 2019-06-19  Matt Baker  <mattbaker@apple.com>
2151
2152         Web Inspector: Remove unused _pendingFilter from NetworkTableContentView
2153         https://bugs.webkit.org/show_bug.cgi?id=199026
2154
2155         Reviewed by Devin Rousso.
2156
2157         This flag is no longer set as of https://trac.webkit.org/changeset/225895.
2158
2159         * UserInterface/Views/NetworkTableContentView.js:
2160         (WI.NetworkTableContentView):
2161         (WI.NetworkTableContentView.prototype._processPendingEntries):
2162
2163 2019-06-19  Devin Rousso  <drousso@apple.com>
2164
2165         Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'sourceCodePosition.lineNumber')
2166         https://bugs.webkit.org/show_bug.cgi?id=199019
2167
2168         Reviewed by Matt Baker.
2169
2170         * UserInterface/Base/Main.js:
2171         (WI.linkifyLocation):
2172
2173 2019-06-19  Zhifei Fang  <zhifei_fang@apple.com>
2174
2175         Correct the error object link color in dark mode.
2176         https://bugs.webkit.org/show_bug.cgi?id=198033
2177
2178         Reviewed by Devin Rousso.
2179
2180         * UserInterface/Views/ErrorObjectView.css:
2181         (@media (prefers-dark-interface)):
2182         (.error-object-link-container):
2183
2184 2019-06-18  Devin Rousso  <drousso@apple.com>
2185
2186         Web Inspector: Network: detail view shouldn't stay open when the related entry is removed
2187         https://bugs.webkit.org/show_bug.cgi?id=198951
2188
2189         Reviewed by Joseph Pecoraro.
2190
2191         * UserInterface/Views/NetworkTableContentView.js:
2192         (WI.NetworkTableContentView.prototype._mainResourceDidChange):
2193         Hide the detail view if the main resource changes and we aren't preserving the log.
2194
2195         * UserInterface/Views/Table.js:
2196         (WI.Table.prototype.reloadVisibleColumnCells):
2197         Only attempt to populate cells for rows that the `_dataSource` actually has. Without this,
2198         the `_delegate` may be asked to populate a cell for a row it doesn't have, which would error.
2199
2200 2019-06-18  Devin Rousso  <drousso@apple.com>
2201
2202         Web Inspector: parseQueryParameters fails to successfully parse query parameter values that contain "="
2203         https://bugs.webkit.org/show_bug.cgi?id=198971
2204         <rdar://problem/51852782>
2205
2206         Reviewed by Joseph Pecoraro.
2207
2208         * UserInterface/Base/URLUtilities.js:
2209         (parseQueryString):
2210
2211 2019-06-18  Devin Rousso  <drousso@apple.com>
2212
2213         Web Inspector: REGRESSION: Heap: subsequent snapshots taken manually don't appear in the list
2214         https://bugs.webkit.org/show_bug.cgi?id=198941
2215
2216         Reviewed by Joseph Pecoraro.
2217
2218         Since heap snapshot records can be added at any time, including when not actively recording,
2219         when the "Entire Recording" range is selected, make sure to set the `filterEndTime` to be an
2220         effectively infinite number so that records added later aren't filtered out.
2221
2222         This isn't done for other timeline views as they may have graphs that don't expect to render
2223         from time 0 till infinity, not to mention being unable to add records when not recording.
2224
2225         * UserInterface/Views/TimelineRecordingContentView.js:
2226         (WI.TimelineRecordingContentView.prototype._updateTimelineViewTimes):
2227
2228 2019-06-18  Devin Rousso  <drousso@apple.com>
2229
2230         Web Inspector: REGRESSION: Canvas: cannot select saved recordings
2231         https://bugs.webkit.org/show_bug.cgi?id=198953
2232
2233         Reviewed by Joseph Pecoraro.
2234
2235         * UserInterface/Views/TreeElement.js:
2236         (WI.TreeElement.treeElementToggled):
2237         Don't early return if the `TreeElement` isn't `selectable` as the owner `TreeOutline` may
2238         want to dispatch an event that it was clicked.
2239
2240 2019-06-18  Devin Rousso  <drousso@apple.com>
2241
2242         Web Inspector: Canvas: the initial state should be selected when processing a new/imported recording if the navigation sidebar is collapsed
2243         https://bugs.webkit.org/show_bug.cgi?id=198952
2244
2245         Reviewed by Joseph Pecoraro.
2246
2247         Prevent any content from being generated until `initialLayout` is called, as otherwise it's
2248         possible for the `CanvasNavigationSidebar` to update the current action index before the
2249         preview element has been created, which would throw an error.
2250
2251         * UserInterface/Views/RecordingContentView.js:
2252         (WI.RecordingContentView.prototype.updateActionIndex):
2253         (WI.RecordingContentView.prototype.initialLayout):
2254         (WI.RecordingContentView.prototype._updateSliderValue):
2255         (WI.RecordingContentView.prototype._handleRecordingProcessedAction):
2256         Drive-by: update the slider max each time the selected action index is changed.
2257
2258 2019-06-18  Devin Rousso  <drousso@apple.com>
2259
2260         Web Inspector: Canvas: imported recordings aren't selectable from the overview if there are no canvases in the page
2261         https://bugs.webkit.org/show_bug.cgi?id=198955
2262
2263         Reviewed by Joseph Pecoraro.
2264
2265         * UserInterface/Views/CanvasOverviewContentView.js:
2266         (WI.CanvasOverviewContentView.prototype._addSavedRecording):
2267         Hide the content placeholder when a recording is imported. It won't be shown again because
2268         the `subviews` list will never be empty, as there's no way to remove an imported recording.
2269
2270         * UserInterface/Views/CollectionContentView.js:
2271         (WI.CollectionContentView.prototype.addContentViewForItem):
2272         (WI.CollectionContentView.prototype.removeContentViewForItem):
2273         (WI.CollectionContentView.prototype.showContentPlaceholder): Added.
2274         (WI.CollectionContentView.prototype.hideContentPlaceholder): Added.
2275         (WI.CollectionContentView.prototype.initialLayout):
2276         (WI.CollectionContentView.prototype._selectItem):
2277         (WI.CollectionContentView.prototype._showContentPlaceholder): Deleted.
2278         (WI.CollectionContentView.prototype._hideContentPlaceholder): Deleted.
2279         Make `showContentPlaceholder`/`hideContentPlaceholder` protected for any subclasses to call.
2280
2281 2019-06-17  Matt Baker  <mattbaker@apple.com>
2282
2283         Web Inspector: Elements: remove ellipses from "Break on" context menu item title
2284         https://bugs.webkit.org/show_bug.cgi?id=198944
2285
2286         Reviewed by Devin Rousso.
2287
2288         Update context menu title to comply with Apple HI guidelines.
2289
2290         * Localizations/en.lproj/localizedStrings.js:
2291         * UserInterface/Views/ContextMenuUtilities.js:
2292
2293 2019-06-17  Devin Rousso  <drousso@apple.com>
2294
2295         Web Inspector: Debugger: adding a DOM/Event/URL breakpoint should enable breakpoints
2296         https://bugs.webkit.org/show_bug.cgi?id=198932
2297
2298         Reviewed by Matt Baker.
2299
2300         Match the behavior of JavaScript breakpoints, which enable breakpoints globally when a new
2301         breakpoint is set or an existing breakpoint is enabled.
2302
2303         This avoids the situation where setting a DOM breakpoint or a specific event listener
2304         breakpoint appears to not "work" because breakpoints are globally disabled. There is no
2305         "breakpoints disabled" banner in the Elements tab, so the user could be completely unaware
2306         of this, and therefore be confused as to why these breakpoints aren't being hit.
2307
2308         * UserInterface/Controllers/DOMManager.js:
2309         (WI.DOMManager.prototype._updateEventBreakpoint):
2310
2311         * UserInterface/Controllers/DOMDebuggerManager.js:
2312         (WI.DOMDebuggerManager.prototype._updateDOMBreakpoint):
2313         (WI.DOMDebuggerManager.prototype._updateEventBreakpoint):
2314         (WI.DOMDebuggerManager.prototype._updateURLBreakpoint):
2315
2316 2019-06-17  Devin Rousso  <drousso@apple.com>
2317
2318         Web Inspector: Sources: remove extra space above Breakpoints section when breakpoints are disabled
2319         https://bugs.webkit.org/show_bug.cgi?id=198933
2320
2321         Reviewed by Matt Baker.
2322
2323         * UserInterface/Views/DebuggerSidebarPanel.css:
2324         (.sidebar > .panel.navigation.debugger .warning-banner):
2325         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2326         (.sidebar > .panel.navigation.sources > .content > .warning-banner):
2327
2328 2019-06-17  Devin Rousso  <drousso@apple.com>
2329
2330         Web Inspector: Settings: split the General panel into sub panels so it's less crowded
2331         https://bugs.webkit.org/show_bug.cgi?id=198803
2332
2333         Reviewed by Timothy Hatcher.
2334
2335         * UserInterface/Views/SettingsTabContentView.js:
2336         (WI.SettingsTabContentView.prototype.initialLayout):
2337         (WI.SettingsTabContentView.prototype._createGeneralSettingsView):
2338         Many of the settings in General only affect a specific part of Web Inspector, and therefore
2339         aren't really "general".
2340
2341         (WI.SettingsTabContentView.prototype._createElementsSettingsView): Added.
2342          - Element Selection
2343          - CSS Changes
2344
2345         (WI.SettingsTabContentView.prototype._createSourcesSettingsView): Added.
2346          - Debugger
2347          - Source Maps
2348
2349         (WI.SettingsTabContentView.prototype._createConsoleSettingsView): Added.
2350          - Traces (renamed from "Console")
2351          - WebRTC Logging
2352          - Media Logging
2353          - MSE Logging
2354
2355         * Localizations/en.lproj/localizedStrings.js:
2356
2357 2019-06-17  Devin Rousso  <drousso@apple.com>
2358
2359         Web Inspector: Sources: the Inspector Style Sheet is missing when grouped by path
2360         https://bugs.webkit.org/show_bug.cgi?id=198860
2361
2362         Reviewed by Timothy Hatcher.
2363
2364         * UserInterface/Controllers/CSSManager.js:
2365         (WI.CSSManager.prototype.get styleSheets):
2366         (WI.CSSManager.prototype.inspectorStyleSheetsForFrame):
2367         (WI.CSSManager.prototype.preferredInspectorStyleSheetForFrame):
2368         (WI.CSSManager.prototype._inspectorStyleSheetsForFrame): Deleted.
2369         Expose a way to fetch all inspector stylesheets for a given frame.
2370         Make sure to associate inspector stylesheets with their frame.
2371
2372         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
2373         (WI.SourcesNavigationSidebarPanel.prototype._compareTreeElements):
2374         (WI.SourcesNavigationSidebarPanel.prototype._addResourcesRecursivelyForFrame):
2375         (WI.SourcesNavigationSidebarPanel.prototype._handleCSSStyleSheetAdded):
2376         Add paths for inspector stylesheet creation/fetching when grouping by path.
2377         Sort inspector stylesheets as the first item of an origin/frame when grouping by path.
2378
2379 2019-06-17  Jamal Nasser  <jamaln@mail.com>
2380
2381         Web Inspector: Go To Line dialog is white when in Dark Mode
2382         https://bugs.webkit.org/show_bug.cgi?id=198596
2383
2384         Reviewed by Timothy Hatcher.
2385
2386         * UserInterface/Views/GoToLineDialog.css:
2387         (@media (prefers-color-scheme: dark)):
2388         (.go-to-line-dialog):
2389         (.go-to-line-dialog > div > input):
2390         (.go-to-line-dialog > div > input::placeholder):
2391         (.go-to-line-dialog > div::before):
2392
2393 2019-06-17  Devin Rousso  <drousso@apple.com>
2394
2395         Web Inspector: Sources: searching doesn't use the case sensitive or regex global settings
2396         https://bugs.webkit.org/show_bug.cgi?id=198897
2397
2398         Reviewed by Joseph Pecoraro.
2399
2400         * UserInterface/Views/SourceCodeTextEditor.js:
2401         (WI.SourceCodeTextEditor.prototype.customPerformSearch):
2402
2403 2019-06-13  Devin Rousso  <drousso@apple.com>
2404
2405         Web Inspector: REGRESSION(r246178): extra spaces added in at-rules when formatting CSS
2406         https://bugs.webkit.org/show_bug.cgi?id=198806
2407
2408         Reviewed by Joseph Pecoraro.
2409
2410         * UserInterface/Workers/Formatter/CSSFormatter.js:
2411         (CSSFormatter.prototype._format):
2412         Add more specific tests for at-rules, and add/remove whitespace depending on the type of
2413         at-rule (e.g. `@supports` vs `@media`), as well as where the scanner is in the parameters of
2414         the at at-rule (e.g. `@supports |` vs `@media (|`).
2415
2416         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
2417         (FormatterContentBuilder):
2418         (FormatterContentBuilder.prototype.get lastToken): Added.
2419         (FormatterContentBuilder.prototype.get currentLine):
2420         (FormatterContentBuilder.prototype.removeLastNewline):
2421         (FormatterContentBuilder.prototype.removeLastWhitespace):
2422         (FormatterContentBuilder.prototype._popFormattedContent):
2423         (FormatterContentBuilder.prototype._append):
2424         Update `lastTokenWasNewline` and `lastTokenWasWhitespace` when removing newlines/whitespace.
2425         Memoize the `currentLine` so it's less expensive to re-fetch.
2426
2427 2019-06-13  Devin Rousso  <drousso@apple.com>
2428
2429         Web Inspector: Settings: indent type and size settings aren't respected everywhere
2430         https://bugs.webkit.org/show_bug.cgi?id=198804
2431
2432         Reviewed by Timothy Hatcher.
2433
2434         * UserInterface/Views/CodeMirrorEditor.js:
2435         (WI.CodeMirrorEditor.create):
2436         When creating a `CodeMirror` instance, default to using the global `Setting`s as the options.
2437         If an override is specified in `options`, it will take precedence and the `CodeMirror` will
2438         ignore any changes to the `Setting` as well.
2439
2440         * UserInterface/Views/TextEditor.js:
2441         (WI.TextEditor):
2442         (WI.TextEditor.prototype.close): Deleted.
2443
2444         * UserInterface/Views/AuditTestCaseContentView.js:
2445         (WI.AuditTestCaseContentView.prototype.layout):
2446         * UserInterface/Views/BreakpointActionView.js:
2447         (WI.BreakpointActionView.prototype._updateBody):
2448         * UserInterface/Views/ConsolePrompt.js:
2449         (WI.ConsolePrompt):
2450         * UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
2451         (WI.ScopeChainDetailsSidebarPanel.prototype._addWatchExpressionButtonClicked):
2452         Remove overrides that aren't necessary for `CodeMirror` to fit in the container element:
2453          - `showWhitespaceCharacters`
2454          - `indentWithTabs`
2455          - `indentUnit`
2456
2457         * UserInterface/Views/SourceCodeTextEditor.js:
2458         (WI.SourceCodeTextEditor.prototype.close):
2459         * UserInterface/Views/ShaderProgramContentView.js:
2460         (WI.ShaderProgramContentView.prototype.closed): Deleted.
2461         * UserInterface/Views/TextContentView.js:
2462         (WI.TextContentView.prototype.closed): Deleted.
2463         * UserInterface/Views/TextResourceContentView.js:
2464         (WI.TextResourceContentView.prototype.closed):
2465         Delete the logic for removing event listeners from global `Setting`, as it didn't work
2466         anyways, since none of the event listeners were added using a `thisObject`.
2467
2468 2019-06-13  Devin Rousso  <drousso@apple.com>
2469
2470         Web Inspector: Settings: sticky header disappears when over scrolling
2471         https://bugs.webkit.org/show_bug.cgi?id=198833
2472
2473         Reviewed by Joseph Pecoraro.
2474
2475         * UserInterface/Views/SettingsTabContentView.css:
2476         (.content-view.settings .navigation-bar):
2477         (.content-view.settings > .settings-view): Added.
2478         (.content-view.settings): Deleted.
2479
2480 2019-06-10  Devin Rousso  <drousso@apple.com>
2481
2482         Web Inspector: Timelines: imported recordings do not have JavaScript call trees
2483         https://bugs.webkit.org/show_bug.cgi?id=197490
2484         <rdar://problem/50589158>
2485
2486         Reviewed by Joseph Pecoraro.
2487
2488         * UserInterface/Models/TimelineRecording.js:
2489         (WI.TimelineRecording.prototype.initializeCallingContextTrees):
2490         Make sure to actually save the provided stack traces and samples in the export data.
2491
2492         * UserInterface/Models/ScriptTimelineRecord.js:
2493         (WI.ScriptTimelineRecord.fromJSON):
2494         (WI.ScriptTimelineRecord.prototype.toJSON):
2495         Drive-by: include `extraDetails`, which contains useful information like "default prevented".
2496
2497 2019-06-10  Nikita Vasilyev  <nvasilyev@apple.com>
2498
2499         REGRESSION(r244268): Web Inspector: Styles: navigating from Computed to Styles doesn't work
2500         https://bugs.webkit.org/show_bug.cgi?id=198508
2501         <rdar://problem/51375503>
2502
2503         Reviewed by Matt Baker.
2504
2505         It didn't work because the detached sidebar panel tried to access its parent view (this.parentSidebar).
2506
2507         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
2508         (WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Added.
2509         (WI.ComputedStyleDetailsSidebarPanel):
2510         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
2511         (WI.GeneralStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty): Deleted.
2512         Move computedStyleDetailsPanelShowProperty to ComputedStyleDetailsSidebarPanel since it's the only
2513         panel where it's needed.
2514
2515 2019-06-10  Alexey Shvayka  <shvaikalesh@gmail.com>
2516
2517         Web Inspector: "Copy Path to Property" doesn't work with multiline keys
2518         https://bugs.webkit.org/show_bug.cgi?id=198691
2519
2520         Reviewed by Matt Baker.
2521
2522         Correctly escape line terminators to prevent doubleQuotedString from returning malformed strings.
2523
2524         * UserInterface/Base/Utilities.js: Use JSON.stringify.
2525
2526 2019-06-10  Devin Rousso  <drousso@apple.com>
2527
2528         Web Inspector: REGRESSION(r246025): prototypes in object previews are visible even when setting `showOnlyJSON`
2529         https://bugs.webkit.org/show_bug.cgi?id=198721
2530
2531         Reviewed by Joseph Pecoraro.
2532
2533         * UserInterface/Views/ObjectTreeView.css:
2534         (.object-tree.properties-only.json-only .object-tree-property.prototype-property): Added.
2535         (.object-tree.properties-only.json-only .object-tree-property .prototype-property): Deleted.
2536
2537 2019-06-07  Nikita Vasilyev  <nvasilyev@apple.com>
2538
2539         Web Inspector: longhand CSS properties overridden by shorthands miss strikethrough
2540         https://bugs.webkit.org/show_bug.cgi?id=198629
2541         <rdar://problem/51504160>
2542
2543         Reviewed by Devin Rousso.
2544
2545         Longhand CSS properties (e.g. "font-size") overriden by shorthands (e.g. "font") now have strikethroughs.
2546
2547         * UserInterface/Models/CSSProperty.js:
2548         (WI.CSSProperty.prototype.set overridingProperty):
2549         (WI.CSSProperty):
2550
2551         * UserInterface/Models/DOMNodeStyles.js:
2552         (WI.DOMNodeStyles.prototype._updateStyleCascade):
2553         Call _associateRelatedProperties before _markOverriddenProperties because
2554         _associateRelatedProperties sets relatedShorthandProperty property, which
2555         is now used by _markOverriddenProperties.
2556
2557         (WI.DOMNodeStyles.prototype._markOverriddenProperties.isOverriddenBy):
2558         (WI.DOMNodeStyles.prototype._markOverriddenProperties):
2559
2560 2019-06-06  Devin Rousso  <drousso@apple.com>
2561
2562         Web Inspector: Timelines: remove always disabled details sidebar navigation item
2563         https://bugs.webkit.org/show_bug.cgi?id=198393
2564
2565         Reviewed by Timothy Hatcher.
2566
2567         * UserInterface/Views/TimelineTabContentView.js:
2568         (WI.TimelineTabContentView):
2569
2570 2019-06-06  Devin Rousso  <drousso@apple.com>
2571
2572         Web Inspector: REGRESSION(r245833): Timelines: CPU: JavaScript label is missing and JavaScript section of pie chart is black
2573         https://bugs.webkit.org/show_bug.cgi?id=198627
2574
2575         Reviewed by Joseph Pecoraro.
2576
2577         * UserInterface/Views/CPUTimelineView.js:
2578         (WI.CPUTimelineView.displayNameForSampleType):
2579         * UserInterface/Views/CPUTimelineView.css:
2580         (.timeline-view.cpu > .content > .overview .legend > .row > .swatch.sample-type-javascript):
2581         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-javascript): Added.
2582         (.timeline-view.cpu .circle-chart > svg > path.segment.sample-type-script): Deleted.
2583         * UserInterface/Views/CPUUsageCombinedView.css:
2584         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-javascript): Added.
2585         (.cpu-usage-combined-view > .graph > .range-chart .sample-type-script): Deleted.
2586         Use the enum string added in r245833 (`sample-type-javascript`) instead of what was there
2587         before (`sample-type-script`).
2588
2589         * UserInterface/Views/Variables.css:
2590         (:root):
2591         Rename `--cpu-script-*` to `--cpu-javascript-*`.
2592
2593 2019-06-06  Devin Rousso  <drousso@apple.com>
2594
2595         Web Inspector: Formatter: pretty-print CSS using a Worker
2596         https://bugs.webkit.org/show_bug.cgi?id=197829
2597         <rdar://problem/36891532>
2598
2599         Reviewed by Timothy Hatcher.
2600
2601         * UserInterface/Proxies/FormatterWorkerProxy.js:
2602         (WI.FormatterWorkerProxy.prototype.formatCSS): Added.
2603         * UserInterface/Workers/Formatter/FormatterWorker.js:
2604         (FormatterWorker.prototype.formatCSS): Added.
2605         * UserInterface/Workers/Formatter/CSSFormatter.js: Added.
2606         (CSSFormatter):
2607         (CSSFormatter.prototype.get success):
2608         (CSSFormatter.prototype.get formattedText):
2609         (CSSFormatter.prototype.get sourceMapData):
2610         (CSSFormatter.prototype._format):
2611
2612         * UserInterface/Workers/Formatter/FormatterContentBuilder.js:
2613         (FormatterContentBuilder.prototype.get currentLine): Added.
2614
2615         * UserInterface/Views/TextEditor.js:
2616         (WI.TextEditor.prototype._canUseFormatterWorker):
2617         (WI.TextEditor.prototype._startWorkerPrettyPrint):
2618
2619         * .eslintrc:
2620
2621 2019-06-06  Devin Rousso  <drousso@apple.com>
2622
2623         Web Inspector: Elements: print/rulers/compositing/paint navigation items shouldn't be visible if the inspected target doesn't have a PageAgent
2624         https://bugs.webkit.org/show_bug.cgi?id=198410
2625
2626         Reviewed by Timothy Hatcher.
2627
2628         * UserInterface/Views/DOMTreeContentView.js:
2629         (WI.DOMTreeContentView):
2630         (WI.DOMTreeContentView.prototype.get navigationItems):
2631         (WI.DOMTreeContentView.prototype._showRulersChanged):
2632
2633 == Rolled over to ChangeLog-2019-06-05 ==