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