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