Unreviewed, reverting r288400.
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2022-01-21  Nikita Vasilyev  <nvasilyev@apple.com>
2
3         Web Inspector: Make alignment editor accessible
4         https://bugs.webkit.org/show_bug.cgi?id=235395
5         <rdar://problem/87851989>
6
7         Reviewed by Patrick Angle.
8
9         Make alignment editor icons focusable, and annotate elements so VoiceOver could correctly read what is selected.
10
11         * UserInterface/Views/AlignmentEditor.css:
12         (.alignment-editor .glyph:focus):
13         (.alignment-editor .glyph:not(:focus-visible)):
14         * UserInterface/Views/AlignmentEditor.js:
15         (WI.AlignmentEditor):
16         (WI.AlignmentEditor.prototype.set alignment):
17         (WI.AlignmentEditor.prototype._removePreviouslySelected):
18         (WI.AlignmentEditor.prototype._updateSelected):
19
20 2022-01-19  Devin Rousso  <drousso@apple.com>
21
22         Web Inspector: fully blackboxed stack traces don't show the right top call frame
23         https://bugs.webkit.org/show_bug.cgi?id=235381
24
25         Reviewed by Patrick Angle.
26
27         * UserInterface/Models/StackTrace.js:
28         (WI.StackTrace):
29         (WI.StackTrace.fromPayload):
30         (WI.StackTrace.prototype.get firstNonNativeNonAnonymousNotBlackboxedCallFrame):
31         Only assign to `firstNonNativeNonAnonymousCallFrame` once.
32         Drive-by: Don't re-fetch the blackbox data for the `WI.SourceCode` of the `WI.CallFrame`.
33         Drive-by: Combine optional parameters into an `options = {}` for current code cleanliness
34                   and greater flexibility for future changes.
35
36         * UserInterface/Models/CallFrame.js:
37         (WI.CallFrame):
38         (WI.CallFrame.fromDebuggerPayload):
39         (WI.CallFrame.fromPayload):
40         * UserInterface/Views/ThreadTreeElement.js:
41         (WI.ThreadTreeElement.prototype.refresh):
42         Drive-by: Combine optional parameters into an `options = {}` for current code cleanliness
43                   and greater flexibility for future changes.
44
45         * UserInterface/Views/CallFrameTreeElement.js:
46         (WI.CallFrameTreeElement):
47         (WI.CallFrameTreeElement.prototype.onattach):
48         * UserInterface/Views/CallFrameView.js:
49         (WI.CallFrameView):
50         Drive-by: Don't re-fetch the blackbox data for the `WI.SourceCode` of the `WI.CallFrame`.
51
52 2022-01-19  Devin Rousso  <drousso@apple.com>
53
54         Web Inspector: blackboxed call frames should be grouped everywhere
55         https://bugs.webkit.org/show_bug.cgi?id=234648
56         <rdar://problem/87018103>
57
58         Reviewed by Patrick Angle.
59
60         * UserInterface/Controllers/CallFrameTreeController.js:
61         (WI.CallFrameTreeController.prototype.groupBlackboxedCallFrames): Added.
62         (WI.CallFrameTreeController.prototype.groupBlackboxedCallFrames.displayable): Added.
63         (WI.CallFrameTreeController.prototype.set callFrames): Added.
64         * UserInterface/Views/StackTraceView.js:
65         (WI.StackTraceView):
66         * UserInterface/Views/ThreadTreeElement.js:
67         (WI.ThreadTreeElement.prototype.refresh):
68         * UserInterface/Views/TimelineDataGrid.js:
69         (WI.TimelineDataGrid.prototype._createPopoverContent):
70         (WI.TimelineDataGrid.prototype._popoverCallStackTreeElementRemoved):
71         Centralize code for creating stack trace views so that the logic that groups blackboxed call
72         frames (and the associated `WI.BlackboxedGroupTreeElement`/`WI.BlackboxedGroupView`) can be
73         shared without duplication.
74
75         * UserInterface/Views/BlackboxedGroupTreeElement.js:
76         (WI.BlackboxedGroupTreeElement):
77         (WI.BlackboxedGroupTreeElement.prototype.expand):
78         (WI.BlackboxedGroupTreeElement.prototype.customTitleTooltip): Added.
79         Add a parameter to control whether to remember when expanding blackboxed call frame groups
80         so that they can later be auto-expanded. This is needed because that feature is intended so
81         that stepping doesn't re-collapse previously expanded blackboxed call frame groups. A more
82         technical reason is that non-debugging call stacks can live (i.e. be shown) for a long time
83         and therefore there's no good way to clear the remembered state, and we probably don't want
84         to have a previous expansion in the Timelines Tab or Canvas Tab suddenly cause all matching
85         blackboxed call frame groups in the Sources Tab to always be expanded.
86         Drive-by: Override the tooltip to explain that clicking shows the blackboxed call frames.
87
88         * UserInterface/Views/BlackboxedGroupView.js: Added.
89         (WI.BlackboxedGroupView):
90         (WI.BlackboxedGroupView.generateTitle):
91         (WI.BlackboxedGroupView.generateSubtitle):
92         (WI.BlackboxedGroupView.generateTooltip):
93         * UserInterface/Views/BlackboxedGroupView.css: Added.
94         (.blackboxed-group):
95         (.blackboxed-group > *):
96         (.blackboxed-group .icon):
97         (.blackboxed-group .subtitle):
98         (.blackboxed-group .separator):
99         (@media (prefers-color-scheme: dark) .blackboxed-group .icon):
100         (@media (prefers-color-scheme: dark) .blackboxed-group .subtitle):
101         (@media (prefers-color-scheme: dark) .blackboxed-group .separator):
102         Add a non-tree UI class for showing blackboxed call frame groups (just like how there's
103         `WI.CallFrameTreeElement` for tree UIs and `WI.CallFrameView` for non-tree UIs). Also
104         centralize the UI strings for all blackboxed call frame group UIs as `static` methods.
105
106         * UserInterface/Views/BlackboxedGroupTreeElement.css:
107         (.tree-outline .item.blackboxed-group.selected > *): Added.
108         (.tree-outline:not(:focus-within) .item.blackboxed-group.selected > *, body:is(.window-inactive, .window-docked-inactive) .tree-outline .item.blackboxed-group.selected > *): Added.
109         (.tree-outline .item.blackboxed-group): Deleted.
110         (.tree-outline .item.blackboxed-group:not(.selected) > *, .tree-outline:not(:focus-within) .item.blackboxed-group.selected > *, body:is(.window-inactive, .window-docked-inactive) .tree-outline .item.blackboxed-group.selected > *): Deleted.
111         (.tree-outline .item.blackboxed-group .icon): Deleted.
112         (@media (prefers-color-scheme: dark) .tree-outline .item.blackboxed-group .icon): Deleted.
113         Share styles from `UserInterface/Views/BlackboxedGroupView.css` since both share `.blackboxed-group`.
114
115         * UserInterface/Views/CallFrameTreeElement.js:
116         Drive-by: Combine optional parameters into an `options = {}` for current code cleanliness
117                   and greater flexibility for future changes.
118
119         * UserInterface/Views/Variables.css:
120         (:root):
121         * UserInterface/Views/CallFrameTreeElement.css:
122         (.tree-outline .item.call-frame.blackboxed:not(.selected)):
123         * UserInterface/Views/CallFrameView.css:
124         (.call-frame.blackboxed > .title,):
125         Drive-by: Rename `--blackboxed-tree-item-opacity` since it's now also used outside trees.
126
127         * UserInterface/Main.html:
128         * Localizations/en.lproj/localizedStrings.js:
129
130 2022-01-18  Alex Christensen  <achristensen@webkit.org>
131
132         Use c++2a instead of gnu++2a for Cocoa builds
133         https://bugs.webkit.org/show_bug.cgi?id=234936
134
135         Reviewed by Sam Weinig.
136
137         * Configurations/Base.xcconfig:
138
139 2022-01-14  Devin Rousso  <drousso@apple.com>
140
141         Web Inspector: Sources: cannot copy grouping of blackboxed call frames
142         https://bugs.webkit.org/show_bug.cgi?id=234615
143         <rdar://problem/86989248>
144
145         Reviewed by Patrick Angle.
146
147         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
148         (WI.SourcesNavigationSidebarPanel.prototype.handleCopyEvent):
149         (WI.SourcesNavigationSidebarPanel.prototype.handleCopyEvent.addCallFrame): Added.
150         Include every `WI.CallFrame` managed by any selected `WI.BlackboxedGroupTreeElement` when
151         copying. Also make sure that any async boundaries are taken into account.
152
153         * UserInterface/Views/BlackboxedGroupTreeElement.js:
154         (WI.BlackboxedGroupTreeElement):
155         (WI.BlackboxedGroupTreeElement.prototype.get callFrames): Added.
156         (WI.BlackboxedGroupTreeElement.prototype.get expandable): Added.
157         (WI.BlackboxedGroupTreeElement.prototype.onenter): Added.
158         (WI.BlackboxedGroupTreeElement.prototype.onspace): Added.
159         Make `WI.BlackboxedGroupTreeElement` selectable, and add extra action handlers for expansion.
160
161         * UserInterface/Views/BlackboxedGroupTreeElement.css:
162         (.tree-outline .item.blackboxed-group):
163         (.tree-outline .item.blackboxed-group:not(.selected) > *, .tree-outline:not(:focus-within) .item.blackboxed-group.selected > *, body:is(.window-inactive, .window-docked-inactive) .tree-outline .item.blackboxed-group.selected > *): Added.
164         (body:not(.window-inactive, .window-docked-inactive) .tree-outline:focus-within .item.blackboxed-group.selected .icon): Added.
165         Only make the content more transparent if not `.selected` (when the window/tree has focus).
166
167         * UserInterface/Views/TreeElement.js:
168         (WI.TreeElement.prototype.get expandable): Added.
169         (WI.TreeElement.treeElementToggled):
170         Allow `toggleOnClick` to be used when `selectable` too. This allows `WI.BlackboxedGroupTreeElement`
171         to `expand` on click while also being able to be selected (e.g. shift-up, command-A, etc.).
172         All other uses of `toggleOnClick` set `this.selectable = false;` anyways, so this will have
173         no effect to other clients.
174
175         * UserInterface/Views/TreeOutline.js:
176         (WI.TreeOutline.prototype.insertChild):
177         (WI.TreeOutline.prototype._treeKeyDown):
178         * UserInterface/Views/DOMTreeOutline.js:
179         (WI.DOMTreeOutline.prototype.update):
180         Add a helper `get expandable` instead of assuming it from `get hasChildren`. This allows
181         `WI.BlackboxedGroupTreeElement` to override it and always be `true`, since there is no
182         situation where we would disallow expansion (which shows the grouped blackboxed call frames).
183
184         * UserInterface/Models/CallFrame.js:
185         (WI.CallFrame.prototype.get displayName): Added.
186         * UserInterface/Views/CallFrameView.js:
187         (WI.CallFrameView):
188         * UserInterface/Views/CallFrameTreeElement.js:
189         (WI.CallFrameTreeElement):
190         * UserInterface/Views/ConsoleMessageView.js:
191         (WI.ConsoleMessageView.prototype.toClipboardString):
192         Add a helper `get displayName` to avoid repeated specialized logic.
193
194 2022-01-14  Devin Rousso  <drousso@apple.com>
195
196         Web Inspector: add a contextmenu item to create a URL Breakpoint for resources initiated by script
197         https://bugs.webkit.org/show_bug.cgi?id=235216
198
199         Reviewed by Dean Jackson.
200
201         * UserInterface/Views/ContextMenuUtilities.js:
202         (WI.appendContextMenuItemsForSourceCode):
203         Since URL Breakpoints only work with XHR/`fetch`, only offer to create a URL Breakpoint if
204         the `WI.SourceCode` has `initiatorCallFrames`, meaning it was triggered by JS. We could
205         offer this contextmenu item for _all_ resources, but there are many different resource types
206         that are unlikely (if ever) to be loaded via XHR/`fetch` (e.g. favicons, manifests, fonts,
207         initial JS/CSS files, etc.) that it would likely add clutter and possibly confuse developers
208         into thinking that URL Breakpoints can somehow pause things other than JS. Plus, this can
209         always be changed in a followup, so better to do something minimal first.
210
211         * UserInterface/Controllers/DOMDebuggerManager.js:
212         (WI.DOMDebuggerManager.prototype.urlBreakpointsMatchingURL): Added.
213         Helper method to find all `WI.URLBreakpoint` that match a given URL, sorted by how exact
214         they would match (e.g. a regex match is less exact than `===`).
215
216         * Localizations/en.lproj/localizedStrings.js:
217
218 2022-01-13  Elliott Williams  <emw@apple.com>
219
220         [XCBuild] Add "product dependencies" which influence workspace build order
221         https://bugs.webkit.org/show_bug.cgi?id=235094
222
223         Reviewed by Alexey Proskuryakov.
224
225         * Configurations/Base.xcconfig: Add EXCLUDED_SOURCE_FILE_NAMES
226         * WebInspectorUI.xcodeproj/project.pbxproj: Add Product Dependencies
227
228 2022-01-13  Patrick Angle  <pangle@apple.com>
229
230         Web Inspector: Implement `frameURL` option for `devtools.inspectedWindow.eval` command
231         https://bugs.webkit.org/show_bug.cgi?id=222568
232
233         Reviewed by Devin Rousso.
234
235         New test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKInspectorExtension.mm
236
237         Add support for evaluating script from an extension in a specific frame on the page by referring to it by the
238         frame's URL. Frame URLs are matched in three steps, first looking for an exact URL match, including query
239         parameters and fragment identifier. If no match is found and the provided `options.frameURL` does not have any
240         fragment identifier or query parameters, a check is then made against each known frame again, this time
241         excluding their fragment identifier. If that check still fails to find a frame for the URL, we perform one more
242         pass, this time excluding the fragment identifier and query parameters for each known frame.
243
244         * UserInterface/Controllers/WebInspectorExtensionController.js:
245         (WI.WebInspectorExtensionController.prototype.evaluateScriptForExtension):
246         (WI.WebInspectorExtensionController.prototype.reloadForExtension):
247         - Drive-by removal of trailing spaces.
248         (WI.WebInspectorExtensionController.prototype._frameForFrameURL):
249
250 2022-01-12  Elliott Williams  <emw@apple.com>
251
252         [Xcode] Configure each project for the legacy build system
253         https://bugs.webkit.org/show_bug.cgi?id=235091
254
255         Reviewed by Darin Adler.
256
257         * WebInspectorUI.xcodeproj/project.pbxproj:
258
259 2022-01-12  Antoine Quint  <graouts@webkit.org>
260
261         Update Web Inspector to not use legacy webkit-prefixed transition events
262         https://bugs.webkit.org/show_bug.cgi?id=235119
263
264         Reviewed by Joseph Pecoraro.
265
266         Came across this while working on bug 235113, we shouldn't be using webkit-prefixed events.
267
268         * UserInterface/Views/TabBar.js:
269         (WI.TabBar.prototype.insertTabBarItem.animateTabs):
270         (WI.TabBar.prototype.insertTabBarItem.removeStyles):
271         (WI.TabBar.prototype.insertTabBarItem):
272         (WI.TabBar.prototype.removeTabBarItem.animateTabs):
273         (WI.TabBar.prototype.removeTabBarItem.removeStyles):
274         (WI.TabBar.prototype.removeTabBarItem):
275         (WI.TabBar.prototype._finishExpandingTabsAfterClose.):
276         (WI.TabBar.prototype._finishExpandingTabsAfterClose):
277
278 2022-01-12  Antoine Quint  <graouts@webkit.org>
279
280         Web Inspector should expose newer CSS Animations, CSS Transitions and Web Animations events
281         https://bugs.webkit.org/show_bug.cgi?id=235117
282
283         Reviewed by Joseph Pecoraro.
284
285         Came across this while working on bug 235113, the more recent events added to
286         CSS Animations, CSS Transitions and Web Animations are not used in the Web Inspector.
287
288         * UserInterface/Models/ScriptTimelineRecord.js:
289         (WI.ScriptTimelineRecord.EventType.displayName):
290
291 2022-01-12  Razvan Caliman  <rcaliman@apple.com>
292
293         Web Inspector: Unhandled exception when moving cursor mid-token after receiving CSS property name completions
294         https://bugs.webkit.org/show_bug.cgi?id=234393
295         <rdar://problem/86578732>
296
297         Reviewed by Patrick Angle.
298
299         A faulty check for mid-token completions in `WI.CSSKeywordCompletions.forPartialPropertyName()`, which are still
300         unsupported, prevented an early return and completions were provided unexpectedly. This had knock-on effects in
301         `WI.SpreadsheetTextField` which is not set up to handle cases where the caret is placed within the completion query.
302         Calculating the adjusted caret position could return a negative index and throw an unhandled exception.
303
304         Web Inspector does not currently explicitly support mid-token completions. See https://webkit.org/b/227157
305
306         The implementation of fuzzy matching for CSS completions in https://webkit.org/b/234092
307         means that, unhindered, the completion provider for CSS property names _can_ return mid-token completions.
308         Typing a query like `margin`, then moving the caret to the beginning and correcting to `s|margin` will return
309         completions like `[s]croll-[margin]`. Accepting the completion results in a malformed `SpreadsheetTextField.value`
310         by concatenation within the prefix itself. As the user types mid-token, the prefix becomes ambiguous.
311
312         Fixing the condition in `WI.CSSKeywordCompletions.forPartialPropertyName()` now inhibits unintentional
313         mid-token completions when fuzzy matching is enabled.
314
315         * UserInterface/Models/CSSKeywordCompletions.js:
316         (WI.CSSKeywordCompletions.forPartialPropertyName):
317         * UserInterface/Views/SpreadsheetTextField.js:
318         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
319
320 2022-01-11  Nikita Vasilyev  <nvasilyev@apple.com>
321
322         REGRESSION (r283723): Web Inspector: CSS declarations unexpectedly removed when editing property value
323         https://bugs.webkit.org/show_bug.cgi?id=233195
324
325         Reviewed by Devin Rousso.
326
327         Re-attach CSS property if it was detached while editing.
328
329         CSSProperty is detached when focusing on property name and deleting it. Consequent edits of the detached
330         CSSProperty were not saved. This patch re-attaches detached property at the previous position.
331
332         * UserInterface/Models/CSSProperty.js:
333         (WI.CSSProperty.prototype.set name):
334         * UserInterface/Models/CSSStyleDeclaration.js:
335         (WI.CSSStyleDeclaration.prototype.newBlankProperty):
336         (WI.CSSStyleDeclaration.prototype.insertProperty):
337         Introduce this method since the logic is used in two different places now.
338
339 2022-01-10  Nikita Vasilyev  <nvasilyev@apple.com>
340
341         Web Inspector: Increase padding around icons in Alignment editor
342         https://bugs.webkit.org/show_bug.cgi?id=234036
343         <rdar://problem/86543279>
344
345         Reviewed by Devin Rousso.
346
347         Increase margin and padding around the icons, making the icons more visually appealing
348         and easier to distinguish and from each other.
349
350         * UserInterface/Images/AlignContentStretch.svg:
351         The gap between rectangles was only 0.5px. Increase it to 2px.
352
353         * UserInterface/Views/AlignmentEditor.css:
354         (.alignment-editor .glyph):
355         (.alignment-editor .glyph:not(:first-child)):
356         (.alignment-editor .glyph.selected):
357         (.alignment-editor .glyph.selected:active):
358         (.alignment-editor .glyph:not(:last-child)): Deleted.
359         (.alignment-editor .glyph.selected + .glyph): Deleted.
360
361 2022-01-10  Alex Christensen  <achristensen@webkit.org>
362
363         Start using C++20
364         https://bugs.webkit.org/show_bug.cgi?id=233963
365
366         Reviewed by Yusuke Suzuki.
367
368         * Configurations/Base.xcconfig:
369
370 2022-01-07  Alexey Shvayka  <ashvayka@apple.com>
371
372         Remove obsolete DOM Level 2 "DOMFocusIn" / "DOMFocusOut" events
373         https://bugs.webkit.org/show_bug.cgi?id=234978
374
375         Reviewed by Geoff Garen.
376
377         * UserInterface/Models/ScriptTimelineRecord.js:
378         (WI.ScriptTimelineRecord.EventType.displayName):
379
380 2022-01-07  Patrick Angle  <pangle@apple.com>
381
382         Uncaught Exception: Cannot step over because debugger is not paused
383         https://bugs.webkit.org/show_bug.cgi?id=234575
384
385         Reviewed by Devin Rousso.
386
387         Previously keyboard shortcuts for advancing the debugger did not check to make sure that the debugger was
388         actually paused before attempting to step. This led to an uncaught exception in engineering builds. We now
389         enable and disable these keyboard shortcuts based on the whether or not the debugger is currently paused.
390
391         * UserInterface/Base/Main.js:
392
393 2022-01-07  Alex Christensen  <achristensen@webkit.org>
394
395         Unreviewed, reverting r287698.
396
397         Broke an internal build
398
399         Reverted changeset:
400
401         "Start using C++20"
402         https://bugs.webkit.org/show_bug.cgi?id=233963
403         https://commits.webkit.org/r287698
404
405 2022-01-06  Tim Nguyen  <ntim@apple.com>
406
407         Unprefix -webkit-print-color-adjust CSS property
408         https://bugs.webkit.org/show_bug.cgi?id=201098
409
410         Reviewed by Darin Adler.
411
412         color-adjust is also a deprecated shorthand that just contains print-color-adjust.
413
414         * UserInterface/Models/CSSKeywordCompletions.js:
415
416 2022-01-06  Alex Christensen  <achristensen@webkit.org>
417
418         Start using C++20
419         https://bugs.webkit.org/show_bug.cgi?id=233963
420
421         Reviewed by Yusuke Suzuki.
422
423         * Configurations/Base.xcconfig:
424
425 2022-01-06  Razvan Caliman  <rcaliman@apple.com>
426
427         Web Inspector: `shape-outside` description doesn't make sense
428         https://bugs.webkit.org/show_bug.cgi?id=234675
429         <rdar://problem/87036546>
430
431         Reviewed by Devin Rousso.
432
433         Add the ability to overwrite CSS documentation obtained from the upstream data source
434         with information sourced from a local JSON file.
435
436         * Scripts/update-inspector-css-documentation:
437         * UserInterface/External/CSSDocumentation/CSSDocumentation-overrides.json: Added.
438         Local JSON file with fields to overwrite specific data.
439
440         * UserInterface/External/CSSDocumentation/CSSDocumentation.js:
441         Update description for `shape-outside` CSS property.
442
443 2022-01-05  Devin Rousso  <drousso@apple.com>
444
445         Web Inspector: Layers: add reference page button
446         https://bugs.webkit.org/show_bug.cgi?id=234901
447
448         Reviewed by Patrick Angle.
449
450         * UserInterface/Views/Layers3DContentView.js:
451         (WI.Layers3DContentView.prototype.initialLayout):
452         * UserInterface/Views/Layers3DContentView.css:
453         (.content-view.layers-3d .reference-page-link-container): Added.
454
455 2022-01-05  Devin Rousso  <drousso@apple.com>
456
457         Web Inspector: Audit: reference page button is not vertically aligned with Audit version text
458         https://bugs.webkit.org/show_bug.cgi?id=234900
459
460         Reviewed by Patrick Angle.
461
462         * UserInterface/Views/AuditNavigationSidebarPanel.css:
463         (.content-view.tab.audit .content-view .reference-page-link-container):
464
465 2022-01-05  Patrick Angle  <pangle@apple.com>
466
467         Web Inspector: revert-layer should be autocompleted
468         https://bugs.webkit.org/show_bug.cgi?id=234646
469
470         Reviewed by Devin Rousso.
471
472         * UserInterface/Controllers/CSSManager.js:
473         * UserInterface/Models/CSSKeywordCompletions.js:
474
475 2022-01-04  Devin Rousso  <drousso@apple.com>
476
477         Web Inspector: Sources: expanding a grouping of blackboxed call frames should be persistent
478         https://bugs.webkit.org/show_bug.cgi?id=234614
479         <rdar://problem/86989232>
480
481         Reviewed by Patrick Angle.
482
483         If the developer has explicitly decided to show blackboxed call frames, we should respect
484         that decision. Requiring them to re-expand after _every_ debugger action is very hostile.
485         So long as the blackboxed call frames remain the same we should persist the expansion. Only
486         if the location of those blackboxed frames changes should we re-collapse.
487
488         * UserInterface/Controllers/DebuggerManager.js:
489         (WI.DebuggerManager):
490         (WI.DebuggerManager.prototype.rememberBlackboxedCallFrameGroupToAutoExpand): Added.
491         (WI.DebuggerManager.prototype.shouldAutoExpandBlackboxedCallFrameGroup): Added.
492         (WI.DebuggerManager.prototype._didResumeInternal):
493         * UserInterface/Views/BlackboxedGroupTreeElement.js:
494         (WI.BlackboxedGroupTreeElement.prototype.expand):
495         Keep a list of blackboxed call frame groupings that have been expanded by the developer.
496         Use this list to decide whether "new" blackboxed call frame grouping should be auto-expanded
497         by default (i.e. if every `WI.CallFrame` is identical with something in the list). Clear the
498         list when resuming, as we're only trying to keep expanded blackboxed call frame groupings
499         within the same call stack (i.e. while stepping).
500
501         * UserInterface/Base/Utilities.js:
502         (Array.prototype.groupBy): Deleted.
503         * UserInterface/Views/ThreadTreeElement.js:
504         (WI.ThreadTreeElement.prototype.refresh):
505         Remove the custom `Array.prototype.groupBy` since it's no longer needed (and there's now a
506         builtin function with the same name). Instead, just keep an index of the first blackboxed
507         call frame and iterate until either the end of the call stack or a non-blackboxed call frame
508         is found, `slice`ing from the saved index to the current item to make a blackboxed call
509         frame group. If that blackboxed call frame group should be auto-expanded (see above), create
510         a `WI.CallFrameTreeElement` for each blackboxed call frame instead of one `WI.BlackboxedGroupTreeElement`.
511
512         * UserInterface/Models/CallFrame.js:
513         (WI.CallFrame.prototype.isEqual): Added.
514         Add a convenience function to compare two `WI.CallFrame`. Right now it just looks at the
515         `WI.SourceCodeLocation`, since for most purposes that's really how one would identify a
516         `WI.CallFrame` (i.e. it's probably more important to know "is this the same spot in code"
517         as opposed to "do we have the same `this` object").
518
519 2022-01-04  Devin Rousso  <drousso@apple.com>
520
521         Web Inspector: Add icon for collapsed blackboxed section
522         https://bugs.webkit.org/show_bug.cgi?id=219806
523         <rdar://problem/72240360>
524
525         Reviewed by Patrick Angle.
526
527         * UserInterface/Views/BlackboxedGroupTreeElement.css:
528         (.tree-outline .item.blackboxed-group .icon):
529         (@media (prefers-color-scheme: dark) .tree-outline .item.blackboxed-group .icon):
530         Use `Hide.svg#black` and `Hide.svg#white`.
531
532         * UserInterface/Images/TypeIcons.svg:
533         Remove `#Blackboxed-dark` and `#Blackboxed-light`.
534
535 2021-12-31  Tim Nguyen  <ntim@apple.com>
536
537         Web Inspector: fix assert text in Gradient.js
538
539         Unreviewed.
540
541         Wrong assert text was added in r287409, it should be radial instead of conic gradients.
542
543         * UserInterface/Models/Gradient.js:
544         (WI.RadialGradient.prototype.set angleValue):
545         (WI.RadialGradient.prototype.set angleUnits):
546
547 2021-12-24  Tim Nguyen  <ntim@apple.com>
548
549         Remove non-standard -webkit-background-composite CSS property
550         https://bugs.webkit.org/show_bug.cgi?id=234661
551
552         Reviewed by Simon Fraser.
553
554         * UserInterface/Models/CSSKeywordCompletions.js:
555
556 2021-12-24  Tim Nguyen  <ntim@apple.com>
557
558         Remove non-standard -webkit-margin-collapse CSS property and longhands
559         https://bugs.webkit.org/show_bug.cgi?id=190788
560
561         Reviewed by Simon Fraser.
562
563         * UserInterface/Models/CSSKeywordCompletions.js:
564
565 2021-12-23  Tim Nguyen  <ntim@apple.com>
566
567         Web Inspector: Support conic gradients in gradient editor and autocompletion
568         https://bugs.webkit.org/show_bug.cgi?id=234562
569
570         Reviewed by Devin Rousso.
571
572         * Localizations/en.lproj/localizedStrings.js:
573         * UserInterface/Controllers/CSSManager.js:
574         * UserInterface/Models/Gradient.js:
575         (WI.Gradient.angleFromString):
576         (WI.Gradient.fromString):
577         (WI.Gradient.prototype.get angleValue):
578         (WI.Gradient.prototype.set angleValue):
579         (WI.Gradient.prototype.get angleUnits):
580         (WI.Gradient.prototype.set angleUnits):
581         (WI.Gradient.prototype._angleValueForUnits):
582         (WI.Gradient):
583         (WI.LinearGradient.fromComponents):
584         (WI.LinearGradient.prototype.toString):
585         (WI.LinearGradient):
586         (WI.RadialGradient):
587         (WI.RadialGradient.fromComponents):
588         (WI.RadialGradient.prototype.get angleValue):
589         (WI.RadialGradient.prototype.set angleValue):
590         (WI.RadialGradient.prototype.get angleUnits):
591         (WI.RadialGradient.prototype.set angleUnits):
592         (WI.RadialGradient.prototype.copy):
593         (WI.RadialGradient.prototype.toString):
594         (WI.ConicGradient):
595         (WI.ConicGradient.fromComponents):
596         (WI.ConicGradient.prototype.copy):
597         (WI.ConicGradient.prototype.toString):
598         (WI.LinearGradient.prototype.set angleValue): Deleted.
599         (WI.LinearGradient.prototype.get angleValue): Deleted.
600         (WI.LinearGradient.prototype.set angleUnits): Deleted.
601         (WI.LinearGradient.prototype.get angleUnits): Deleted.
602         (WI.LinearGradient.prototype._angleValueForUnits): Deleted.
603         * UserInterface/Views/CodeMirrorTextMarkers.js:
604         * UserInterface/Views/GradientEditor.js:
605         (WI.GradientEditor):
606         (WI.GradientEditor.prototype.set gradient):
607         (WI.GradientEditor.prototype._gradientTypeChanged):
608         * UserInterface/Views/SpreadsheetStyleProperty.js:
609         (WI.SpreadsheetStyleProperty.prototype._addGradientTokens):
610
611 2021-12-23  Tim Nguyen  <ntim@apple.com>
612
613         Web Inspector: Dark mode: Make gradient editor angle input readable in dark mode
614         https://bugs.webkit.org/show_bug.cgi?id=234640
615
616         Reviewed by Devin Rousso.
617
618         Just use the native input styling, which is dark mode compatible by default.
619
620         * UserInterface/Views/GradientEditor.css:
621         (.gradient-editor > .gradient-angle > input[type="number"]):
622
623 2021-12-21  Patrick Angle  <pangle@apple.com>
624
625         Web Inspector: Assertion Failed removing subview in ContentViewContainer.prototype._disassociateFromContentView
626         https://bugs.webkit.org/show_bug.cgi?id=234572
627
628         Reviewed by Devin Rousso.
629
630         r283859 accidentally removed the checks that a content view is attached before attempting to remove it, leading
631         to an assertion.
632
633         * UserInterface/Views/ContentViewContainer.js:
634         (WI.ContentViewContainer.prototype._disassociateFromContentView):
635
636 2021-12-21  Patrick Angle  <pangle@apple.com>
637
638         Web Inspector: Assertion Failed adding event listener in CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded
639         https://bugs.webkit.org/show_bug.cgi?id=234570
640
641         Reviewed by Devin Rousso.
642
643         Adding an event listener to listen for style changes every time we update the list of CSS variables isn't quite
644         correct because it means we may attempt to add the event listener multiple times. Instead, this should be done
645         in response to the InspectedNodeChanged event directly to avoid adding the event listener multiple time to the
646         same DOM node.
647
648         * UserInterface/Models/CSSPropertyNameCompletions.js:
649         (WI.CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded):
650         (WI.CSSPropertyNameCompletions.prototype._handleInspectedNodeChanged):
651
652 2021-12-21  Michael Saboff  <msaboff@apple.com>
653
654         Fix symlinks for alternate root framework locations
655         https://bugs.webkit.org/show_bug.cgi?id=234567
656
657         Reviewed by Filip Pizlo.
658
659         Moved OUTPUT_ALTERNATE_ROOT_PATH in create symlink script from outputFileListPaths to outputPaths.
660
661         * WebInspectorUI.xcodeproj/project.pbxproj:
662
663 2021-12-16  Michael Saboff  <msaboff@apple.com>
664
665         https://bugs.webkit.org/show_bug.cgi?id=234173
666         Update Install Paths for build system changes
667
668         Reviewed by Filip Pizlo.
669
670         Added build variables and build step to create symlinks pointing to the alternate
671         build locations from the current framework install location.
672
673         * Configurations/WebInspectorUIFramework.xcconfig:
674         * Scripts/create-symlink-to-altroot.sh: Added.
675         * WebInspectorUI.xcodeproj/project.pbxproj:
676
677 2021-12-16  Devin Rousso  <drousso@apple.com>
678
679         Implement Array.prototype.groupBy and Array.prototype.groupByToMap
680         https://bugs.webkit.org/show_bug.cgi?id=234327
681
682         Reviewed by Yusuke Suzuki.
683
684         * UserInterface/Models/NativeFunctionParameters.js:
685
686 2021-12-14  Razvan Caliman  <rcaliman@apple.com>
687
688         Web Inspector: Computed Panel: Adjust color of CSS Variables grouping mode control
689         https://bugs.webkit.org/show_bug.cgi?id=234246
690         <rdar://problem/86414682>
691
692         Reviewed by Devin Rousso.
693
694         Change color of CSS variables grouping mode scope bar from the system accent color to transparent
695         so it doesn't draw disproportionate attention to itself.
696
697         * UserInterface/Views/ComputedStyleDetailsPanel.css:
698         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode:not(:hover)):
699         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:not(:hover)): Deleted.
700         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:hover): Deleted.
701
702 2021-12-13  Devin Rousso  <drousso@apple.com>
703
704         Web Inspector: remove coloring of Web Inspector area in dock icons
705         https://bugs.webkit.org/show_bug.cgi?id=234262
706
707         Reviewed by Patrick Angle.
708
709         It looks too strong/bold and draws way too much attention. It also doesn't match the styling
710         of other nearby icons.
711
712         * UserInterface/Images/DockBottom.svg:
713         * UserInterface/Images/DockLeft.svg:
714         * UserInterface/Images/DockRight.svg:
715
716 2021-12-13  Elliott Williams  <emw@apple.com>
717
718         Deployment target for macOS 11+ does not follow minor version bumps
719         https://bugs.webkit.org/show_bug.cgi?id=233906
720
721         Reviewed by Alexey Proskuryakov.
722
723         * Configurations/DebugRelease.xcconfig:
724
725 2021-12-10  Michael Saboff  <msaboff@apple.com>
726
727         https://bugs.webkit.org/show_bug.cgi?id=234173
728         Update Install Paths for build system changes
729
730         Reviewed by Yusuke Suzuki.
731
732         Updated install paths for changes in the build system that use a system path prefix.
733
734         * Configurations/WebInspectorUIFramework.xcconfig:
735
736 2021-12-10  Razvan Caliman  <rcaliman@apple.com>
737
738         Web Inspector: Add CSS variable names to property name completion list
739         https://bugs.webkit.org/show_bug.cgi?id=233372
740         <rdar://83205968>
741
742         Reviewed by Devin Rousso.
743
744         Add the list of applicable CSS variables to the list of CSS property name completions.
745
746         `WI.CSSPropertyNameCompletions` is a long-lived object that holds all supported property names.
747         It doesn't need to change over time in a Web Inspector session. But the list of applicable
748         CSS variables depends on the selected node.
749
750         To avoid thrashing the long list of values in `WI.CSSPropertyNameCompletions` we don't proactively collect
751         CSS variables. Instead, we introduce a flag to indicate that the list of CSS variables may
752         be stale whenever the inspected node changes. Only when completions are requested do we check
753         this flag and augment the list of CSS property names with the latest list of CSS variables.
754
755         * UserInterface/Models/CSSCompletions.js:
756         (WI.CSSCompletions.prototype.replaceValues):
757         Allow a sub-class to replace the list of values in one go.
758         If a `WI.CSSQueryController` was used, reset it and provide it the new list of values.
759
760         * UserInterface/Models/CSSPropertyNameCompletions.js:
761         (WI.CSSPropertyNameCompletions):
762         (WI.CSSPropertyNameCompletions.prototype.executeQuery):
763         (WI.CSSPropertyNameCompletions.prototype.startsWith):
764         (WI.CSSPropertyNameCompletions.prototype._updateValuesWithLatestCSSVariablesIfNeeded):
765         Holding a copy of the original list of CSS property names in order to create a new list
766         agumented with variables on demand.
767
768         (WI.CSSPropertyNameCompletions.prototype.addValues):
769         Warn when trying to add new property values which would overwrite the cached and sorted list of CSS property names.
770
771         (WI.CSSPropertyNameCompletions.prototype._handleInspectedNodeChanged):
772         Consider changing of the inspected node as an indicator that the list of variables is stale.
773         That may not necessarily be true for web pages with all CSS variables declared on :root or <html>,
774         but iterating over them to verify is needlessly expensive especially if completions were not even requested.
775
776         (WI.CSSPropertyNameCompletions.prototype._handleNodesStylesNeedsRefresh):
777         Consider any change to the styles of the inspected node as a potential change to the list of applicable variables.
778
779         (WI.CSSPropertyNameCompletions):
780
781 2021-12-10  BJ Burg  <bburg@apple.com>
782
783         Web Inspector: save and restore extension tab positions
784         https://bugs.webkit.org/show_bug.cgi?id=234115
785         <rdar://85560636>
786
787         Reviewed by Devin Rousso and Patrick Angle.
788
789         The existing tab state restoration system works by saving or loading tab positions
790         from persistent storage and saving or restoring each tab's state using one cookie per tab type.
791
792         With extension tabs, it is now possible to have more than one tab per tab type.
793         Additionally, extension tabs can be added at any time via InspectorFrontendAPI.
794         Given these challenges, we need a different system for saving and restoring extension tabs.
795
796         Extension tab restoration is now handled by WI.WebInspectorExtensionController.
797         We consider a tab to be an 'anchor' tab if it is saveable, visible, and not pinnable.
798         In other words, an anchor tab is one of the built-in singleton tabs like Console, Elements, etc.
799
800         When the tab bar item list is modified, for each extension tab, we save the observed
801         'anchor' tab's type and a distance from that anchor tab's insertion index.
802         Updates to extension tab positions are saved to persistent storage at most every 5 seconds.
803
804         When it is time to place an extension tab with createTabForExtension() or showExtensionTab(),
805         perform the reverse operation of computing an insertion index from a anchorTabType and distanceFromAnchorTab.
806
807         This patch was tested with one extension, multiple extensions, showing/hiding extension tabs,
808         remote inspecting a JSContext, and remote inspecting a WKWebView.
809
810         * UserInterface/Views/TabBar.js:
811         (WI.TabBar.prototype.get visibleTabBarItemsFromLeftToRight): Added.
812
813         * UserInterface/Controllers/WebInspectorExtensionController.js:
814         (WI.WebInspectorExtensionController):
815         (WI.WebInspectorExtensionController.get extensionTabPositionsObjectStoreKey): Added.
816
817         (WI.WebInspectorExtensionController.prototype.registerExtension):
818         (WI.WebInspectorExtensionController.prototype.unregisterExtension):
819         Add and remove WI.TabBar event listeners that notify us of changes to the tab bar.
820
821         (WI.WebInspectorExtensionController.prototype.createTabForExtension): Deleted.
822         (WI.WebInspectorExtensionController.prototype.async createTabForExtension): Renamed.
823         Load saved tab positions from persistent storage if needed. Compute the insertion index for the new tab.
824         This method is already expected to return a promise, so make it `async` to allow using `await`.
825
826         (WI.WebInspectorExtensionController.prototype.showExtensionTab):
827         Compute the insertion index for the new tab.
828
829         (WI.WebInspectorExtensionController.prototype.async _loadExtensionTabPositions):
830         Load saved tab positions from persistent storage, allowing for the case where nothing has been saved yet.
831
832         (WI.WebInspectorExtensionController.prototype.async _saveExtensionTabPositions):
833         Recompute and save tab positions for all extension tabs. Then write to persistent storage
834         at most every 5 seconds using a WI.Debouncer.
835
836         (WI.WebInspectorExtensionController.prototype._insertionIndexForExtensionTab): Added, wrapper method.
837         (WI.WebInspectorExtensionController.prototype._computeIndicesForExtensionTab):
838         Compute the anchorTabType, distanceFromAnchorTab, and insertionIndex for the extension tab.
839         If saving tab positions, pass `options.recomputePositions` to ignore saved positions
840         and recompute these fields based on what is currently visible in the tab bar.
841
842         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
843         (WI.WebInspectorExtensionTabContentView.prototype.get savedTabPositionKey): Added.
844
845 2021-12-10  Nikita Vasilyev  <nvasilyev@apple.com>
846
847         Web Inspector: Add a swatch for justify-content, justify-items, and justify-self
848         https://bugs.webkit.org/show_bug.cgi?id=233055
849         <rdar://problem/85613257>
850
851         Reviewed by Patrick Angle.
852
853         Add an inline swatch for `justify-content`, that shows icons for common values:
854         start, center, end, space-between, space-around, space-evenly, and stretch.
855
856         Also, add inline swatches for `justify-items` and `justify-self`, that shows icons for:
857         start, center, end, and stretch.
858
859         The newly added swatches reuse the existing `align-content` and `align-items` icons, and
860         rotate them -90 degrees. While `align-*` properties define alignment in the block-direction
861         the `justify-*` properties define alignment in the inline-direction.
862
863         * UserInterface/Models/AlignmentData.js:
864         (WI.AlignmentData._propertyNameToType):
865         * UserInterface/Views/AlignmentEditor.css:
866         (.alignment-editor .glyph.rotate-left > svg):
867         * UserInterface/Views/AlignmentEditor.js:
868         (WI.AlignmentEditor.shouldRotateGlyph):
869         (WI.AlignmentEditor._glyphsForType):
870         (WI.AlignmentEditor.prototype.set alignment):
871         * UserInterface/Views/InlineSwatch.css:
872         (.inline-swatch.alignment > span.rotate-left):
873         * UserInterface/Views/InlineSwatch.js:
874         (WI.InlineSwatch.prototype._updateSwatch):
875
876 2021-12-10  Razvan Caliman  <rcaliman@apple.com>
877
878         Web Inspector: Computed Panel: Group CSS variables by value type
879         https://bugs.webkit.org/show_bug.cgi?id=233563
880         <rdar://82978905>
881
882         Reviewed by Devin Rousso and Patrick Angle.
883
884         Add the ability to view CSS variables in the Computed styles details sidebar panel
885         groupped by value type in a few sections: "colors", "dimensions", "numbers" and a
886         catch-all group of "other".
887
888         * Localizations/en.lproj/localizedStrings.js:
889         * UserInterface/Models/DOMNodeStyles.js:
890         (WI.DOMNodeStyles):
891         (WI.DOMNodeStyles.prototype.variableStylesByType):
892         Iterate on-demand over all CSS variables found in the node's computed styles
893         and assign each to a group depending on its value type:
894         - color
895         - dimension (number followed by a CSS unit-like string)
896         - number
897         - other
898
899         Additional groups and refinements will come in follow-up patches.
900
901         (WI.DOMNodeStyles.prototype.refresh.fetchedComputedStyle):
902         The map of CSS variable groups gets invalidated when there's a significant
903         change in the node's computed style. This supports the use case where previously
904         empty groups become populated or, conversely, become empty.
905
906         * UserInterface/Views/ComputedStyleDetailsPanel.js:
907         (WI.ComputedStyleDetailsPanel):
908         (WI.ComputedStyleDetailsPanel.prototype.refresh):
909         (WI.ComputedStyleDetailsPanel.prototype.applyFilter):
910         (WI.ComputedStyleDetailsPanel.prototype.initialLayout):
911         No longer generate the elements for laying out CSS variables during `initialLayout()`
912         but handle them during `layout()`. This support mutating the DOM for laying out
913         either one top-level list of CSS variables (ungrouped) or multiple lists of CSS variable
914         groups depeding on the grouping mode selected at runtime.
915
916         * UserInterface/Views/ComputedStyleDetailsPanel.css:
917         (.sidebar > .panel.details.css-style > .content > .computed .details-section > .content):
918         Ensure both top-level and nested details sections overwrite styles. CSS variables groups are in nested details sections.
919
920         (.sidebar > .panel.details.css-style > .content > .computed .details-section.computed-style-variables .computed-property-item):
921         Adapt stylesheet to account for using `WI.ComputedStyleSection` instead of `WI.SpreadsheetCSSStyleDeclarationEditor`
922
923         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode):
924         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:not(:hover)):
925         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .scope-bar.computed-style-variables-grouping-mode.default-item-selected:hover):
926         Reuse the visual treatment from SourcesNavigationSidebarPanel.css to avoid highlighting the default grouping mode scope bar item.
927
928         (.sidebar > .panel.details.css-style > .content > .computed > .details-section > .content): Deleted.
929         (.sidebar > .panel.details.css-style > .content > .computed .property): Deleted.
930
931         (WI.ComputedStyleDetailsPanel.prototype.layout):
932         Skip destroying and rebuilding sections whose data sources change during
933         `WI.ComputedStyleDetailsPanel.refresh()` and which handle layout internally.
934         We need to remove and rebuild just the sections for CSS variables because
935         layout is requested in response to changing the CSS variables grouping mode.
936
937         (WI.ComputedStyleDetailsPanel.prototype._createVariablesStyleSection):
938         Replaces the use of `WI.SpreadsheetCSSStyleDeclarationEditor` for rendering CSS variables with
939         `WI.ComputedStyleSection` which is already used for rendering CSS properties.
940         It's a lighter-weight View that's fit for purpose.
941
942         (WI.ComputedStyleDetailsPanel.prototype._renderVariablesStyleSectionGroup):
943         Use a generic renderer for CSS variable sections that can be reused for any group type.
944
945         (WI.ComputedStyleDetailsPanel.prototype._handleDetailsSectionCollapsedStateChanged):
946         Generalize handling collapsed state change events for all sections, current and future.
947
948         (WI.ComputedStyleDetailsPanel.prototype._handleEditorFilterApplied):
949         Generalize handling filtering events for all sections, current and future.
950
951         (WI.ComputedStyleDetailsPanel.prototype._handleVariablesGroupingModeScopeBarSelectionChanged):
952         (WI.ComputedStyleDetailsPanel.prototype._handleVariablesGroupingSettingChanged):
953         (WI.ComputedStyleDetailsPanel.prototype._handlePropertiesSectionCollapsedStateChanged): Deleted.
954         (WI.ComputedStyleDetailsPanel.prototype._handleVariablesSectionCollapsedStateChanged): Deleted.
955         * UserInterface/Views/ComputedStyleSection.js:
956         (WI.ComputedStyleSection):
957         Change the default value of `_styleTraces` to null instead of an empty array so that
958         `WI.ComputedStyleSection.layout()` doesn't attempt to access it like a `Map`.
959
960 2021-12-10  Nikita Vasilyev  <nvasilyev@apple.com>
961
962         Web Inspector: Add a swatch for align-items and align-self
963         https://bugs.webkit.org/show_bug.cgi?id=233054
964         <rdar://problem/85613199>
965
966         Reviewed by Devin Rousso.
967
968         Introduce inline swatches for `align-items` and `align-self`, that shows icons for common values:
969         start, center, end, and stretch.
970
971         * UserInterface/Images/AlignContentCenter.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentCenter.svg.
972         * UserInterface/Images/AlignContentEnd.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentEnd.svg.
973         * UserInterface/Images/AlignContentSpaceAround.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceAround.svg.
974         * UserInterface/Images/AlignContentSpaceBetween.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceBetween.svg.
975         * UserInterface/Images/AlignContentSpaceEvenly.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentSpaceEvenly.svg.
976         * UserInterface/Images/AlignContentStart.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentStart.svg.
977         * UserInterface/Images/AlignContentStretch.svg: Renamed from Source/WebInspectorUI/UserInterface/Images/AlignmentStretch.svg.
978         Rename icons from Alignment to AlignContent since they are only used for `align-content` CSS property now.
979
980         * UserInterface/Images/AlignItemsCenter.svg: Added.
981         * UserInterface/Images/AlignItemsEnd.svg: Added.
982         * UserInterface/Images/AlignItemsStart.svg: Added.
983         * UserInterface/Images/AlignItemsStretch.svg: Added.
984         * UserInterface/Main.html:
985         * UserInterface/Models/AlignmentData.js: Added.
986
987         (WI.AlignmentData):
988         (WI.AlignmentData.isAlignmentAwarePropertyName):
989         (WI.AlignmentData._propertyNameToType):
990         (WI.AlignmentData.prototype.get type):
991         (WI.AlignmentData.prototype.get text):
992         (WI.AlignmentData.prototype.set text):
993         (WI.AlignmentData.prototype.toString):
994         Introduce a model object to be more consistent with the rest of the inline swatches.
995
996         * UserInterface/Views/AlignmentEditor.js:
997         (WI.AlignmentEditor):
998         Allow AlignmentEditor to work with more than one CSS property (i.e. align-content), by introducing propertyName argument.
999
1000         (WI.AlignmentEditor.glyphPath):
1001         (WI.AlignmentEditor._glyphsForType):
1002         (WI.AlignmentEditor.prototype.get alignment):
1003         (WI.AlignmentEditor.prototype.set alignment):
1004         Rename `value` to `alignment` to be more consistent with the rest of the editors.
1005
1006         (WI.AlignmentEditor.prototype._removePreviouslySelected):
1007         (WI.AlignmentEditor.prototype._updateSelected):
1008         (WI.AlignmentEditor.isAlignContentValue): Deleted.
1009         (WI.AlignmentEditor.prototype.get value): Deleted.
1010         (WI.AlignmentEditor.prototype.set value): Deleted.
1011         * UserInterface/Views/InlineSwatch.js:
1012         (WI.InlineSwatch.prototype._updateSwatch):
1013         (WI.InlineSwatch.prototype._valueEditorValueDidChange):
1014         * UserInterface/Views/SpreadsheetStyleProperty.js:
1015         (WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
1016         (WI.SpreadsheetStyleProperty.prototype._addAlignmentTokens):
1017
1018 2021-12-10  Razvan Caliman  <rcaliman@apple.com>
1019
1020         Web Inspector: Extract a specialized CSSNameCompletions from CSSCompletions
1021         https://bugs.webkit.org/show_bug.cgi?id=233369
1022         <rdar://83206520>
1023
1024         Reviewed by Devin Rousso.
1025
1026         `WI.CSSPropertyNameCompletions` is a long-lived object that holds the list of all CSS properties
1027         supported by the target. It is instantiated only once on Web Inspector startup.
1028
1029         By contrast, `WI.CSSCompletions` is an object instantiated as often as needed with
1030         lists of property values, CSS function values, etc. It holds the generic logic for
1031         matching values against a given query.
1032
1033         The specialized logic for CSS property names was mixed-in with the generic logic in `WI.CSSCompletions`.
1034         The main difference is in the format of the payload provided:
1035         - an array of objects with key/value pairs for `WI.CSSPropertyNameCompletions`.
1036         - an array of strings for general purpose `WI.CSSCompletions`.
1037
1038         This patch reduces the complexity in `WI.Completions`:
1039         - moves the one-time initialization method to `WI.cssManager.initializeCSSCompletions`.
1040         - simplifies `WI.Completions` constructor to expect just an array of strings.
1041         - introduces `WI.CSSPropertyNameCompletions` as a sub-class of `WI.CSSCompletions` where its constructor
1042           is specialized to handle the payload received from the backend.
1043         - moves the `WI.CSSPropertyNameCompletions` instance to `WI.cssManager.cssPropertyNameCompletions`.
1044         - removes unused accessors for navigating the list of matched completions.
1045
1046         * UserInterface/Base/Main.js:
1047         (WI.performOneTimeFrontendInitializationsUsingTarget):
1048         * UserInterface/Controllers/CSSManager.js:
1049         (WI.CSSManager):
1050         (WI.CSSManager.prototype.initializeCSSPropertyNameCompletions.):
1051         (WI.CSSManager.prototype.initializeCSSPropertyNameCompletions):
1052         Moved the initializiation method for objects used to get CSS completions
1053         from `WI.CSSCompletions` with data from the backed to a more appropriate place.
1054
1055         (WI.CSSManager.prototype.get propertyNameCompletions):
1056         * UserInterface/Controllers/CodeMirrorCompletionController.js:
1057         (WI.CodeMirrorCompletionController.prototype._generateCSSCompletions):
1058         * UserInterface/Main.html:
1059         * UserInterface/Models/CSSCompletions.js:
1060         (WI.CSSCompletions.prototype._firstIndexOfPrefix):
1061         (WI.CSSCompletions):
1062         (WI.CSSCompletions.initializeCSSCompletions.): Deleted.
1063         (WI.CSSCompletions.initializeCSSCompletions.collectPropertyNameForCodeMirror): Deleted.
1064         (WI.CSSCompletions.initializeCSSCompletions.propertiesCallback): Deleted.
1065         (WI.CSSCompletions.initializeCSSCompletions.fontFamilyNamesCallback): Deleted.
1066         (WI.CSSCompletions.initializeCSSCompletions): Deleted.
1067         Moved to `WI.CSSManager`.
1068
1069         (WI.CSSCompletions.prototype.next): Deleted.
1070         (WI.CSSCompletions.prototype.previous): Deleted.
1071         (WI.CSSCompletions.prototype._closest): Deleted.
1072         Removed unused methods for navigating the completions list.
1073         This behavior is encapsulated in `WI.CompletionSuggestionsView`.
1074
1075         (WI.CSSCompletions.prototype.isValidPropertyName): Deleted.
1076         Moved to `WI.CSSPropertyNameCompletions`.
1077
1078         * UserInterface/Models/CSSKeywordCompletions.js:
1079         (WI.CSSKeywordCompletions.forPartialPropertyName):
1080         * UserInterface/Models/CSSPropertyNameCompletions.js: Added.
1081         (WI.CSSPropertyNameCompletions.prototype.isValidPropertyName):
1082         (WI.CSSPropertyNameCompletions):
1083         * UserInterface/Test.html:
1084         * UserInterface/Test/Test.js:
1085         (WI.performOneTimeFrontendInitializationsUsingTarget):
1086         * UserInterface/Views/SpreadsheetStyleProperty.js:
1087         (WI.SpreadsheetStyleProperty.prototype.updateStatus):
1088         (WI.SpreadsheetStyleProperty.prototype._addCSSDocumentationButton):
1089
1090 2021-12-09  Brent Fulgham  <bfulgham@apple.com>
1091
1092         Unprefix CSS value text-align: -webkit-match-parent
1093         https://bugs.webkit.org/show_bug.cgi?id=229496
1094         <rdar://problem/82628618>
1095
1096         Reviewed by Darin Adler.
1097
1098         * UserInterface/Models/CSSKeywordCompletions.js: Add 'match-parent'
1099
1100 2021-12-08  BJ Burg  <bburg@apple.com>
1101
1102         [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be to notified when an extension tab navigates
1103         https://bugs.webkit.org/show_bug.cgi?id=233935
1104         <rdar://86123899>
1105
1106         Reviewed by Patrick Angle.
1107
1108         In order instrument all loads inside the extension iframe, we cannot rely on the <iframe src> attribute
1109         to query the currently loaded page, or to change the current page. Use a helper method to query and set
1110         the iframe location indirectly using `document.location`.
1111
1112         * UserInterface/Protocol/InspectorFrontendAPI.js:
1113
1114         * UserInterface/Controllers/WebInspectorExtensionController.js:
1115         (WI.WebInspectorExtensionController.prototype.createTabForExtension):
1116         (WI.WebInspectorExtensionController.prototype.showExtensionTab):
1117         Standardize on returning {"result": value} from these methods.
1118
1119         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
1120         (WI.WebInspectorExtensionTabContentView):
1121         (WI.WebInspectorExtensionTabContentView.prototype.whenPageAvailable): Added.
1122         (WI.WebInspectorExtensionTabContentView.prototype._extensionFrameDidLoad):
1123         Trigger a load of the actual requested page by evaluating `document.location.href = <url>`
1124         in the context of the extension tab iframe. Notify clients when this non-initial load completes.
1125
1126         (WI.WebInspectorExtensionTabContentView.prototype.async _maybeDispatchDidNavigateExtensionTab):
1127         Dispatch didNavigateExtensionTab with the new URL when the extension tab iframe completes a load.
1128         Don't notify the client if the extension tab has not yet loaded.
1129
1130 2021-12-09  Razvan Caliman  <rcaliman@apple.com>
1131
1132         Web Inspector: Enable fuzzy matching for CSS completions
1133         https://bugs.webkit.org/show_bug.cgi?id=234092
1134
1135         Reviewed by Patrick Angle.
1136
1137         Flip the flag to enable fuzzy matching when autocompleting CSS properties and values.
1138
1139         * UserInterface/Base/Setting.js:
1140
1141 2021-12-07  Razvan Caliman  <rcaliman@apple.com>
1142
1143         Web Inspector: Support fuzzy matching in CSS completions
1144         https://bugs.webkit.org/show_bug.cgi?id=230351
1145         <rdar://82976292>
1146
1147         Reviewed by Devin Rousso.
1148
1149         Use fuzzy matching for identifying CSS completions in the Styles details sidebar.
1150
1151         There are three main parts to this patch:
1152         1. Introduce `WI.CSSQueryController` with logic to do fuzzy matching on provided values.
1153         2. Change `WI.CompletionSuggestionsView` to support both plain strings and `WI.QueryResult`s.
1154         3. Change `WI.SpreadsheetTextField` so its `value` doesn't always return its `element.textContent`.
1155
1156         With fuzzy matching, completions are not guaranteed anymore to be prefixed with the query.
1157         Therefore, it's no longer viable to rely on `WI.SpreadsheetTextField.value` being a concatenation of `textContent` of nodes within. 
1158
1159         To adress this, there's now `WI.SpreadsheetTextField._pendingValue` which includes the prospective
1160         completion regardless of whether the query is a completion prefix or at match at any other position.
1161
1162         * Localizations/en.lproj/localizedStrings.js:
1163         * UserInterface/Base/Setting.js:
1164         Add a flag to enable the fuzzy matching feature.
1165
1166         * UserInterface/Controllers/CSSQueryController.js: Added.
1167         (WI.CSSQueryController):
1168         (WI.CSSQueryController.prototype.addValues):
1169         (WI.CSSQueryController.prototype.reset):
1170         (WI.CSSQueryController.prototype.executeQuery):
1171         (WI.CSSQueryController.prototype._findSpecialCharacterIndices):
1172         Add a speclialized class to hold the logic for fuzzy matching of CSS properties and values.
1173         It clones logic from `WI.ResouceQueryController` with adjustments specific to CSS; more to follow as the feature gets refined.
1174
1175         * UserInterface/Main.html:
1176         * UserInterface/Models/CSSCompletions.js:
1177         (WI.CSSCompletions):
1178         (WI.CSSCompletions.prototype.addValues):
1179         (WI.CSSCompletions.prototype.executeQuery):
1180         Support both the current prefix matching approach as well as fuzzy matching.
1181
1182         * UserInterface/Models/CSSKeywordCompletions.js:
1183         (WI.CSSKeywordCompletions.forPartialPropertyName):
1184         Opt into fuzzy matching when getting completions for property names and values. 
1185
1186         * UserInterface/Models/QueryResult.js:
1187         (WI.QueryResult.prototype.get matches):
1188         * UserInterface/Test.html:
1189
1190         * UserInterface/Views/CompletionSuggestionsView.css:
1191         (.completion-suggestions-container > .item > .highlighted):
1192         Highlight specific characters that matched in result identified by fuzzy matching.
1193
1194         * UserInterface/Views/CompletionSuggestionsView.js:
1195         (WI.CompletionSuggestionsView.prototype.selectNext):
1196         (WI.CompletionSuggestionsView.prototype.selectPrevious):
1197         (WI.CompletionSuggestionsView.prototype.update):
1198         (WI.CompletionSuggestionsView.prototype.getCompletionText):
1199         (WI.CompletionSuggestionsView.prototype._createHighlightedCompletionFragment):
1200         Change `WI.CompletionSuggestionsView` to hold a list of completions, 
1201         either strings or `WI.QueryResult`, and return the appropriate completion text
1202         instead of returning the `textContent` of the selected element.
1203
1204         `WI.CompletionSuggestionsView` is used elsewhere in the Console and Sources panel
1205         so avoid impacting those consumers until they opt in to fuzzy matching as well.
1206
1207         * UserInterface/Views/SettingsTabContentView.js:
1208
1209         * UserInterface/Views/SpreadsheetStyleProperty.js:
1210         (WI.SpreadsheetStyleProperty.prototype._handleNameChange):
1211         (WI.SpreadsheetStyleProperty.prototype._handleValueChange):
1212         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1213         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1214         On change, get the value of the `WI.SpreadsheetTextField` instead of 
1215         the corresponding element's `textContent`.
1216
1217         * UserInterface/Views/SpreadsheetTextField.js:
1218         Introduced `SpreadsheetTextField._completionPrefix` to hold the query a user is typing.
1219
1220         Introduced `SpreadsheetTextField._completionText` to hold the completion text of the selected but
1221         not yet applied completion. This replaces the previous behavior of concatenating the query and `suggestionHint`
1222         because with fuzzy matching the completion isn't guaranteed to be prefixed with the query.
1223
1224         Introduced `SpreadsheetTextField._pendingValue` to hold the result of applying the selected
1225         completion. This replaces the previous behavior of `WI.SpreadsheetTextField._combineEditorElementChildren`.
1226
1227         (WI.SpreadsheetTextField):
1228         (WI.SpreadsheetTextField.prototype.get value):
1229         Change `WI.SpreadsheetTextField` so its value is divorced from its element's `textContent`.
1230         While editing, `WI.SpreadsheetTextField.value` returns the pending value so that
1231         a valid CSS string gets written to the stylesheet.
1232
1233         (WI.SpreadsheetTextField.prototype.set suggestionHint):
1234         If the query is a prefix for the selected completion, keep the existing behavior of appending
1235         the suggestion hint substring. Otherwise, hide the suggestion hint element because the
1236         concatenation doesn't make sense.
1237
1238         (WI.SpreadsheetTextField.prototype.stopEditing):
1239         (WI.SpreadsheetTextField.prototype.discardCompletion):
1240         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1241         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1242         (WI.SpreadsheetTextField.prototype._discardChange):
1243         (WI.SpreadsheetTextField.prototype._handleBlur):
1244         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1245         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1246         (WI.SpreadsheetTextField.prototype._handleInput):
1247         (WI.SpreadsheetTextField.prototype._updateCompletions):
1248         (WI.SpreadsheetTextField.prototype._applyPendingValue):
1249         After applying a completion, the value is replaced with `WI.SpreadsheetTextField._pendingValue`.
1250         At this point, `WI.SpreadsheetTextField.value` and the `textContent` of the element converge.
1251
1252         (WI.SpreadsheetTextField.prototype._updatePendingValueWithCompletionText):
1253         When presented with a completion, the query gets substituted with the full completion text in 
1254         `WI.SpreadsheetTextField._pendingValue` regardless of whether the query is a prefix or not.
1255
1256         (WI.SpreadsheetTextField.prototype._applyCompletionHint): Deleted.
1257         (WI.SpreadsheetTextField.prototype._combineEditorElementChildren): Deleted.
1258
1259 2021-12-06  Patrick Angle  <pangle@apple.com>
1260
1261         Web Inspector: Support Cascade Layers in the Styles sidebar
1262         https://bugs.webkit.org/show_bug.cgi?id=233208
1263
1264         Reviewed by Devin Rousso.
1265
1266         * UserInterface/Models/CSSGrouping.js:
1267         (WI.CSSGrouping):
1268         (WI.CSSGrouping.prototype.get isLayer):
1269         (WI.CSSGrouping.prototype.get prefix):
1270         - Update `CSSGrouping` to support `@layer` rules, and make `text` optional for a grouping, since anonymous layers
1271         will not have a name.
1272
1273         * UserInterface/Models/CSSStyleDeclaration.js:
1274         (WI.CSSStyleDeclaration.prototype.generateFormattedText):
1275         - Ensure that spacing remains correct and "null" isn't shown for groupings without text.
1276
1277         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1278         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.initialLayout):
1279         - When merging layer groups, ensure that a "." is used as a separator, and that each group has a name (to
1280         prevent having a hanging period or the "null" text appearing).
1281
1282 2021-12-02  Devin Rousso  <drousso@apple.com>
1283
1284         [css-values-4] Support `*vi` (inline) and `*vb` (block) viewport units
1285         https://bugs.webkit.org/show_bug.cgi?id=232895
1286         <rdar://problem/85179134>
1287
1288         Reviewed by Simon Fraser.
1289
1290         * UserInterface/Models/CSSCompletions.js:
1291
1292 2021-12-01  Patrick Angle  <pangle@apple.com>
1293
1294         Web Inspector: Console execution context can become an unexpected selection on refresh/navigation
1295         https://bugs.webkit.org/show_bug.cgi?id=233349
1296
1297         Reviewed by Devin Rousso.
1298
1299         There are really three bugs here in `WI.QuickConsole.prototype._handleFrameExecutionContextsCleared`, each of
1300         which contribute to unexpected execution context selections.
1301
1302         1. If the frame of the active execution context commits a provisional load, our code attempts to re-select the
1303         new context for that frame, which results in clearing the `Auto` bit for selected context, which means the
1304         context no longer will follow the selected DOM node. This is resolved by no longer following a frame's execution
1305         context on navigation if the current selection is `Auto` (tracked by the `_useExecutionContextOfInspectedNode`
1306         variable).
1307
1308         2. Because of the very short timeframe for the above to take place before bailing (previously 10ms) there are
1309         many situations where other large payloads over the protocol, like a complex DOM tree, will cause the timeout to
1310         fire before we receive an event telling us there is a new execution context for the frame, which means we end up
1311         not following the frame anyways. This is improved by increasing the timeout to a still-brisk, but more
1312         reasonable 100ms.
1313
1314         3. The timeout in (2) can lead to us having a selected execution context that may no longer be valid because the
1315         fail-safe in `QuickConsole.prototype._handleFrameExecutionContextsCleared` doesn't really fail safely, since it
1316         doesn't provide a new execution context to be active and instead seems to rely on the hope that the context will
1317         still work for future invocations, which I believe is how many users are getting into the state of a blank
1318         execution context picker (with a working drop down menu with actual contexts that are selectable) and are unable
1319         to evaluate anything in the console until re-selecting an execution context.
1320
1321         Additional drive-by change to move the checks for whether or not we can use the execution context of a selected
1322         node into its own method.
1323
1324         * UserInterface/Views/QuickConsole.js:
1325         (WI.QuickConsole.prototype._populateActiveExecutionContextNavigationItemContextMenu):
1326         (WI.QuickConsole.prototype._handleEngineeringShowInternalExecutionContextsSettingChanged):
1327         (WI.QuickConsole.prototype._handleFrameExecutionContextsCleared):
1328         (WI.QuickConsole.prototype._handleTargetRemoved):
1329         (WI.QuickConsole.prototype._canUseExecutionContextOfInspectedNode):
1330
1331 2021-11-30  BJ Burg  <bburg@apple.com>
1332
1333         Web Inspector: add ExtensionTabActivation diagnostic event
1334         https://bugs.webkit.org/show_bug.cgi?id=233101
1335         <rdar://85264921>
1336
1337         Reviewed by Devin Rousso.
1338
1339         Add new diagnostic event that reports the first activation of
1340         an extension tab. Also report the number of active extension tabs.
1341
1342         * UserInterface/Controllers/ExtensionTabActivationDiagnosticEventRecorder.js: Added.
1343         (WI.ExtensionTabActivationDiagnosticEventRecorder):
1344         (WI.ExtensionTabActivationDiagnosticEventRecorder.prototype.setup):
1345         (WI.ExtensionTabActivationDiagnosticEventRecorder.prototype.teardown):
1346         (WI.ExtensionTabActivationDiagnosticEventRecorder.prototype._selectedTabContentViewDidChange):
1347         Report only the first activation. The extension tab iframe does not load until
1348         the first time that the tab is selected and shown.
1349
1350         * UserInterface/Base/Main.js:
1351         (WI.contentLoaded): Add diagnostic event recorder if extensions are supported.
1352
1353         * UserInterface/Controllers/WebInspectorExtensionController.js:
1354         (WI.WebInspectorExtensionController.prototype.registerExtension):
1355         Pass along the new extensionBundleIdentifier argument to the model object.
1356
1357         (WI.WebInspectorExtensionController.prototype.activeExtensionTabContentViews):
1358         Added. This is a helper method for collecting diagnostic event data.
1359
1360         * UserInterface/Debug/Bootstrap.js:
1361         (updateMockWebExtensionTab):
1362         (WI.runBootstrapOperations):
1363         Pass new extensionBundleIdentifier argument for the Mock Extension.
1364
1365         * UserInterface/Main.html: Add new file.
1366         * UserInterface/Models/WebInspectorExtension.js:
1367         (WI.WebInspectorExtension):
1368         (WI.WebInspectorExtension.prototype.get extensionBundleIdentifier):
1369         Store the extension bundle identifier on the model object. Add a getter.
1370
1371         * UserInterface/Protocol/InspectorFrontendAPI.js:
1372         (InspectorFrontendAPI.registerExtension):
1373         Pass new extensionBundleIdentifier argument.
1374
1375         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
1376         (WI.WebInspectorExtensionTabContentView.prototype.get extension): Added.
1377
1378 2021-11-29  Simon Fraser  <simon.fraser@apple.com>
1379
1380         Remove some unused event names
1381         https://bugs.webkit.org/show_bug.cgi?id=233485
1382
1383         Reviewed by Sam Weinig.
1384
1385         * UserInterface/Models/ScriptTimelineRecord.js:
1386         (WI.ScriptTimelineRecord.EventType.displayName):
1387
1388 2021-11-17  Nikita Vasilyev  <nvasilyev@apple.com>
1389
1390         Web Inspector: Add a swatch for align-content
1391         https://bugs.webkit.org/show_bug.cgi?id=230065
1392         <rdar://problem/82891361>
1393
1394         Reviewed by Devin Rousso.
1395
1396         Introduce an inline swatch for `align-content`, that shows icons for common align-content values:
1397         start, center, end, space-between, space-around, space-evenly, and stretch.
1398
1399         * UserInterface/Images/AlignmentCenter.svg: Added.
1400         * UserInterface/Images/AlignmentEnd.svg: Added.
1401         * UserInterface/Images/AlignmentSpaceAround.svg: Added.
1402         * UserInterface/Images/AlignmentSpaceBetween.svg: Added.
1403         * UserInterface/Images/AlignmentSpaceEvenly.svg: Added.
1404         * UserInterface/Images/AlignmentStart.svg: Added.
1405         * UserInterface/Images/AlignmentStretch.svg: Added.
1406         * UserInterface/Images/AlignmentUnknown.svg: Added.
1407
1408         * UserInterface/Main.html:
1409         * UserInterface/Views/AlignmentEditor.css: Added.
1410         (.alignment-editor .glyph):
1411         (.alignment-editor .glyph:not(:last-child)):
1412         (.alignment-editor .glyph:active):
1413         (.alignment-editor .glyph.selected):
1414         (.alignment-editor .glyph.selected + .glyph):
1415         (.alignment-editor .glyph.selected:active):
1416
1417         * UserInterface/Views/AlignmentEditor.js: Added.
1418         (WI.AlignmentEditor):
1419         (WI.AlignmentEditor.isAlignContentValue):
1420         (WI.AlignmentEditor.prototype.get element):
1421         (WI.AlignmentEditor.prototype.get value):
1422         (WI.AlignmentEditor.prototype.set value):
1423         (WI.AlignmentEditor.prototype._updateSelected):
1424
1425         * UserInterface/Views/InlineSwatch.css:
1426         (.inline-swatch:not(.read-only):matches(.bezier, .box-shadow, .spring, .variable, .alignment):hover):
1427         (.inline-swatch:not(.read-only):matches(.bezier, .box-shadow, .spring, .variable, .alignment):active):
1428         (.inline-swatch:is(.image, .alignment) > span):
1429         (@media (prefers-color-scheme: dark) .inline-swatch.box-shadow > svg,):
1430
1431         * UserInterface/Views/InlineSwatch.js:
1432         (WI.InlineSwatch):
1433         (WI.InlineSwatch.prototype.didDismissPopover):
1434         (WI.InlineSwatch.prototype._updateSwatch):
1435         (WI.InlineSwatch.prototype._valueEditorValueDidChange):
1436
1437         * UserInterface/Views/SpreadsheetStyleProperty.js:
1438         (WI.SpreadsheetStyleProperty.prototype._replaceSpecialTokens):
1439         (WI.SpreadsheetStyleProperty.prototype._addAlignmentTokens):
1440
1441 2021-11-17  Devin Rousso  <drousso@apple.com>
1442
1443         Web Inspector: assertion failures in `WI.GridOverlayConfigurationDiagnosticEventRecorder`
1444         https://bugs.webkit.org/show_bug.cgi?id=233298
1445
1446         Reviewed by Patrick Angle.
1447
1448         * UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js:
1449         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
1450
1451 2021-11-17  Devin Rousso  <drousso@apple.com>
1452
1453         Web Inspector: allow left docking when in LTR and right docking when in RTL
1454         https://bugs.webkit.org/show_bug.cgi?id=233294
1455
1456         Reviewed by Patrick Angle.
1457
1458         Some developers prefer docking to the left even when in LTR and/or docking to the right when
1459         in RTL. There's no technical reason to disallow this, so let's make it possible.
1460
1461         * UserInterface/Base/Main.js:
1462         (WI.contentLoaded):
1463         (WI.contentLoaded.addDockButton): Added.
1464         (WI.contentLoaded.addDockLeftButton): Added.
1465         (WI.contentLoaded.addDockRightButton): Added.
1466         (WI._updateDockNavigationItems):
1467         (WI._updateTabBarDividers):
1468         (WI.setLayoutDirection):
1469         Instead of having a single `_dockToSideTabBarButton` that looks at the layout direction to
1470         decide its image, tooltip, and action, split it into two distinct `_dockLeftTabBarButton`
1471         and `_dockRightTabBarButton` buttons that are both always visible (unless Web Inspector is
1472         already in the corresponding docking state).
1473
1474         * UserInterface/Images/DockBottom.svg:
1475         * UserInterface/Images/DockLeft.svg:
1476         * UserInterface/Images/DockRight.svg:
1477         Fill in the area representing Web Inspector and make it a bit smaller so it's not as heavy.
1478
1479         * Localizations/en.lproj/localizedStrings.js:
1480
1481 2021-11-16  Nikita Vasilyev  <nvasilyev@apple.com>
1482
1483         Web Inspector: Remove unused `dontCreateIfMissing` argument from CSSStyleDeclaration.prototype.propertyForName
1484         https://bugs.webkit.org/show_bug.cgi?id=233198
1485
1486         Reviewed by Devin Rousso.
1487
1488         `dontCreateIfMissing` was always set to `true`.
1489
1490         * UserInterface/Models/CSSStyleDeclaration.js:
1491         (WI.CSSStyleDeclaration.prototype.propertyForName):
1492         Drive-by: inline findMatch function, which was only used once.
1493
1494         * UserInterface/Models/DOMNodeStyles.js:
1495         (WI.DOMNodeStyles.prototype._parseStylePropertyPayload):
1496         * UserInterface/Models/Font.js:
1497         (WI.Font):
1498         * UserInterface/Views/BoxModelDetailsSectionRow.js:
1499         (WI.BoxModelDetailsSectionRow.prototype._getPropertyValue):
1500         * UserInterface/Views/SpreadsheetStyleProperty.js:
1501         (WI.SpreadsheetStyleProperty.prototype._addVariableTokens):
1502
1503 2021-11-15  Patrick Angle  <pangle@apple.com>
1504
1505         Web Inspector: Styles: Autocomplete should support mid-line completions
1506         https://bugs.webkit.org/show_bug.cgi?id=227411
1507
1508         Reviewed by Devin Rousso.
1509
1510         Autocompletion for CSS property values was lacking in the ability to perform mid-line completions, including
1511         within functions, and a lack of support for multi-line CSS property values. This resolves those pain points by
1512         making SpreadsheetTextField multi-line aware and allowing mid-line autocompletion.
1513
1514         * UserInterface/Views/SpreadsheetStyleProperty.js:
1515         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
1516         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
1517
1518         * UserInterface/Views/SpreadsheetTextField.js:
1519         (WI.SpreadsheetTextField):
1520         (WI.SpreadsheetTextField.prototype.valueWithoutSuggestion):
1521         Because suggestions can occur anywhere within the value, we need to iterate through each of the nodes and
1522         collect the text of any of them that are not the completion suggestion.
1523
1524         (WI.SpreadsheetTextField.prototype.set suggestionHint):
1525         When removing the suggestion hint element, we should recombine the text nodes we may have split upon insertion
1526         to prevent the text content from becoming endlessly fragmented into multiple text nodes unnecessarily.
1527
1528         (WI.SpreadsheetTextField.prototype.startEditing):
1529         Reset the last known caret position when editing starts so that we don't mistake keys that are already down as
1530         having moved the cursor to its initial position.
1531
1532         (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
1533         We should only attempt to reattach the suggestion hint element if we have a suggestion hint to show, otherwise
1534         we could end up with a phantom empty suggestion hint that isn't properly placed later.
1535
1536         (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion):
1537         Updated to use existing completion committing path to reduce duplicated logic.
1538
1539         (WI.SpreadsheetTextField.prototype._handleMouseDown):
1540         When the user clicks inside the text field while suggestions are visible treat that as intent to stop
1541         autocompletion similar to the escape key, since the new cursor location could be anywhere in the text field.
1542         This behavior also matches other code editors like Xcode, where clicking outside a completion popup will dismiss
1543         the completions list.
1544
1545         (WI.SpreadsheetTextField.prototype._handleKeyDown):
1546         Keep track of where the caret was as well as if the the key event was handled by the suggestion view at the time
1547         a key is pressed so that we can later compare the position to that of when the key is released to determine if
1548         completions should be discarded.
1549
1550         (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
1551         We can no longer assume that the current selection's offset will match the value's length, as the offset could
1552         be on any line, or the suggestion could be in middle of a line. Because a suggestionHint only contains text when
1553         we are in middle of autocompletion, it alone is an indicator that pressing the right arrow key should commit the
1554         completion. `document.execCommand` is deprecated, so instead we now use the existing completion committing path
1555         to reduce duplicated logic here.
1556
1557         Note that the left arrow key is still explicitly handled for dismissing autocompletion, as the new mechanism for
1558         dismissing autocompletion won't trigger unless the caret has moved, and the caret will not move if you press the
1559         left arrow key at the start of the text field.
1560
1561         (WI.SpreadsheetTextField.prototype._handleKeyUp):
1562         When a key is released, we should check to see if the caret has moved as a result of the keystroke that we have
1563         not already explicitly handled. If it has moved and was not handled, we dismiss the autocompletion suggestions.
1564
1565         (WI.SpreadsheetTextField.prototype._handleInput):
1566
1567         (WI.SpreadsheetTextField.prototype._updateCompletions):
1568         Provide the current caret position to the completion provided.
1569
1570         (WI.SpreadsheetTextField.prototype._showSuggestionsView):
1571         In order to correctly align the completion list with the current text content, it must be offset from the caret
1572         position excluding the current prefix.
1573
1574         (WI.SpreadsheetTextField.prototype._getCaretPosition):
1575         Added to get the index of the caret in the complete text value, accounting for multi-line values and mid-line
1576         suggestions.
1577
1578         (WI.SpreadsheetTextField.prototype._getCaretRect):
1579
1580         (WI.SpreadsheetTextField.prototype._rangeAtCaretPosition):
1581         Find the range for a caret at the given position. This compliments `_getCaretPosition`, and allows us to count
1582         back some number of characters and create a range of which we later get the client rectangle.
1583
1584         (WI.SpreadsheetTextField.prototype._applyCompletionHint):
1585         Add optional support for updating the caret position to be at the end of the newly inserted text.
1586
1587         (WI.SpreadsheetTextField.prototype._combineEditorElementChildren):
1588         Added to handle combining the fragmented text nodes (and possibly a suggestion hint element) back into a single
1589         text node while maintaining the current cursor position or optionally moving the cursor to a new location (e.g.
1590         the end of a completion).
1591
1592         (WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
1593         Now that completions are not guaranteed to be at the end of the value, we may need to split the text node to
1594         insert the suggestion hint node.
1595
1596 2021-11-15  Fujii Hironori  <Hironori.Fujii@sony.com>
1597
1598         Web Inspector: Layers Tab: the position of composited layer with box-shadow is wrong
1599         https://bugs.webkit.org/show_bug.cgi?id=233026
1600
1601         Reviewed by Devin Rousso.
1602
1603         If an element has box-shadow, Layers Tab showed the composited
1604         layer positioned wrongly. It assumed the composited layer position
1605         was same with its element position. This isn't true. If an element
1606         has box-shadow, its composited layer includes the surrounding
1607         box-shadow.
1608
1609         * UserInterface/Models/Layer.js:
1610         (WI.Layer):
1611         * UserInterface/Views/Layers3DContentView.js:
1612         (WI.Layers3DContentView.prototype._updateLayers):
1613         (WI.Layers3DContentView.prototype._createLayerMesh):
1614
1615 2021-11-12  Razvan Caliman  <rcaliman@apple.com>
1616
1617         Web Inspector: Extract reusable logic from ResourceQueryController, ResourceQueryResult and ResourceQueryMatch
1618         https://bugs.webkit.org/show_bug.cgi?id=231604
1619         <rdar://problem/84160281>
1620
1621         Reviewed by Devin Rousso.
1622
1623         Extract reusable logic from `ResourceQueryController` into a generic `QueryController`
1624         to enable subclassing for other specialized use cases.
1625
1626         * UserInterface/Controllers/QueryController.js: Added.
1627         (WI.QueryController.prototype.executeQuery):
1628         (WI.QueryController.prototype.findQueryMatches.pushMatch):
1629         (WI.QueryController.prototype.findQueryMatches.matchNextSpecialCharacter):
1630         (WI.QueryController.prototype.findQueryMatches.backtrack):
1631         (WI.QueryController.prototype.findQueryMatches):
1632         (WI.QueryController):
1633
1634         Keep only the reusable matching logic in `QueryController`.
1635         Subclasses like `ResourceQueryController` are responsible for agregating
1636         the data to be queried, customization for special characters and sorting results.
1637
1638         * UserInterface/Controllers/ResourceQueryController.js:
1639         (WI.ResourceQueryController.prototype.executeQuery):
1640         (WI.ResourceQueryController.prototype._findQueryMatches.pushMatch): Deleted.
1641         (WI.ResourceQueryController.prototype._findQueryMatches.matchNextSpecialCharacter): Deleted.
1642         (WI.ResourceQueryController.prototype._findQueryMatches.backtrack): Deleted.
1643         (WI.ResourceQueryController.prototype._findQueryMatches): Deleted.
1644
1645         * UserInterface/Main.html:
1646
1647         * UserInterface/Models/QueryMatch.js: Renamed from Source/WebInspectorUI/UserInterface/Models/ResourceQueryMatch.js.
1648
1649         `ResourceQueryMatch` doesn't contain any resource-specific logic. It can be generalized to `QueryMatch`.
1650
1651         * UserInterface/Models/QueryResult.js: Copied from Source/WebInspectorUI/UserInterface/Models/ResourceQueryResult.js.
1652         (WI.QueryResult):
1653         (WI.QueryResult.prototype.get value):
1654         (WI.QueryResult.prototype.get rank):
1655         (WI.QueryResult.prototype.get matchingTextRanges):
1656         (WI.QueryResult.prototype._calculateRank.getMultiplier):
1657         (WI.QueryResult.prototype._calculateRank):
1658         (WI.QueryResult.prototype._createMatchingTextRanges):
1659
1660         A generic `QueryResult` can be extracted from `ResourceQueryResult` containing
1661         the reusable logic for ranking results and identifing matching text ranges.
1662
1663         * UserInterface/Models/ResourceQueryResult.js:
1664         (WI.ResourceQueryResult):
1665         (WI.ResourceQueryResult.prototype.get resource):
1666         (WI.ResourceQueryResult.prototype.__test_createMatchesMask):
1667         (WI.ResourceQueryResult.prototype.get rank): Deleted.
1668         (WI.ResourceQueryResult.prototype.get matchingTextRanges): Deleted.
1669         (WI.ResourceQueryResult.prototype._calculateRank.getMultiplier): Deleted.
1670         (WI.ResourceQueryResult.prototype._calculateRank): Deleted.
1671         (WI.ResourceQueryResult.prototype._createMatchingTextRanges): Deleted.
1672
1673         `ResourceQueryResult` extends `QueryResult` with resource-specifc members:
1674         - the `cookie` property which holds the optional line and column info used when jumping to matched files
1675         - the `resource` property which maps to the generic `QueryResult.value`; this is used in tests and when sorting in `ResourceQueryController`
1676
1677         * UserInterface/Test.html:
1678
1679 2021-11-10  Tim Nguyen  <ntim@apple.com>
1680
1681         Remove non-standard -webkit-border-fit CSS property
1682         https://bugs.webkit.org/show_bug.cgi?id=229564
1683
1684         Reviewed by Simon Fraser.
1685
1686         * UserInterface/Models/CSSKeywordCompletions.js:
1687
1688 2021-11-10  Alexey Proskuryakov  <ap@apple.com>
1689
1690         WebInspectorUI needs to support InstallAPI
1691         https://bugs.webkit.org/show_bug.cgi?id=232955
1692
1693         Reviewed by BJ Burg.
1694
1695         * Configurations/WebInspectorUIFramework.xcconfig:
1696
1697 2021-11-09  Razvan Caliman  <rcaliman@apple.com>
1698
1699         Web Inspector: Add script to update CSSDocumentation.js
1700         https://bugs.webkit.org/show_bug.cgi?id=232433
1701         <rdar://problem/84753008>
1702
1703         Reviewed by Devin Rousso.
1704
1705         * Scripts/update-inspector-css-documentation: Added.
1706
1707         Add a script to update the contextual CSS documentation data source at
1708         `Source/WebInspectorUI/UserInterface/External/CSSDocumentation/CSSDocumentation.js`
1709         with the latest information from the upstream data source.
1710
1711         * UserInterface/Controllers/CSSManager.js:
1712         (WI.CSSManager.prototype.canonicalNameForPropertyName):
1713
1714         Add a comment to keep the list of accepted prefixes in sync with the one from the script.
1715
1716 2021-11-08  Razvan Caliman  <rcaliman@apple.com>
1717
1718         Update CSSDocumentation.js with latest upstream data to fix wrong documentation for block-size
1719         https://bugs.webkit.org/show_bug.cgi?id=231566
1720         <rdar://problem/84406443>
1721
1722         Reviewed by Devin Rousso.
1723
1724         Update CSSDocumentation.js with latest upstream data source which contains
1725         fixes for descriptions of logical properties for sizing:
1726         block-size, inline-size, min-/max-block-size, min-/max-inline-size
1727
1728         * UserInterface/External/CSSDocumentation/CSSDocumentation.js:
1729
1730 2021-11-03  Alex Christensen  <achristensen@webkit.org>
1731
1732         Remove QuickTimePluginReplacement and YouTubePluginReplacement
1733         https://bugs.webkit.org/show_bug.cgi?id=232400
1734
1735         Reviewed by Chris Dumez.
1736
1737         * UserInterface/Models/NativeFunctionParameters.js:
1738
1739 2021-11-03  Nikita Vasilyev  <nvasilyev@apple.com>
1740
1741         Web Inspector: Display swatch popovers below the swatch by default, not on the left side
1742         https://bugs.webkit.org/show_bug.cgi?id=232577
1743
1744         Reviewed by Devin Rousso.
1745
1746         The new defaults are: below, above, left.
1747
1748         Displaying the swatch popover on the left side covers the relevant property name.
1749         Displaying it below or above doesn't have this problem; below is preferred because
1750         it doesn't hide the CSS selector of the relevant rule.
1751
1752         * UserInterface/Views/InlineSwatch.js:
1753         (WI.InlineSwatch.prototype._presentPopover):
1754         Introduce a method to remove code duplication.
1755
1756 2021-10-29  David Kilzer  <ddkilzer@apple.com>
1757
1758         Web Inspector: Enable -Wformat=2 warnings
1759         <https://webkit.org/b/232359>
1760         <rdar://problem/84691442>
1761
1762         Reviewed by Darin Adler.
1763
1764         * Configurations/Base.xcconfig:
1765         (WARNING_CFLAGS):
1766         - Add -Wformat=2 switch, which includes -Wformat-nonliteral.
1767
1768 2021-10-28  Razvan Caliman  <rcaliman@apple.com>
1769
1770         Web Inspector: Audit: testForLinkLabels Accessibility audit should ignore anchors if aria-hidden
1771         https://bugs.webkit.org/show_bug.cgi?id=231038
1772         <rdar://problem/83783868>
1773
1774         Update `testForLinkLabels` accessibility audit test to exclude hidden links.
1775         See `AccessibilityObject->isHidden()`
1776
1777         Reviewed by BJ Burg.
1778
1779         * UserInterface/NonMinified/DefaultAudits.js:
1780         (WI.DefaultAudits.testForLinkLabels):
1781
1782 2021-10-27  BJ Burg  <bburg@apple.com>
1783
1784         Web Inspector: extension iframes leak when disabling an extension
1785         https://bugs.webkit.org/show_bug.cgi?id=232049
1786
1787         Reviewed by Timothy Hatcher.
1788
1789         Since shouldNotRemoveFromDOMWhenHidden() is true, the <iframe> will not
1790         be detached and unload its document in the normal tab-closing code path.
1791         Add a `dispose()` method for cleaning up the tab when its extension is
1792         unregistered.
1793
1794         * UserInterface/Controllers/WebInspectorExtensionController.js:
1795         (WI.WebInspectorExtensionController.prototype.unregisterExtension):
1796         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
1797         (WI.WebInspectorExtensionTabContentView.prototype.dispose):
1798
1799 2021-10-21  Devin Rousso  <drousso@apple.com>
1800
1801         [css-values-4] Support small (sv*), large (lv*) and dynamic (dv*) viewport units
1802         https://bugs.webkit.org/show_bug.cgi?id=219287
1803         <rdar://problem/71857370>
1804
1805         Reviewed by Simon Fraser.
1806
1807         * UserInterface/Models/CSSCompletions.js:
1808
1809 2021-10-18  David Kilzer  <ddkilzer@apple.com>
1810
1811         Web Inspector: Remove Source/WebInspectorUI/UserInterface/Controllers/WebInspectorExtensionController.js.orig
1812         <https://webkit.org/b/231896>
1813
1814         Reviewed by BJ Burg.
1815
1816         * UserInterface/Controllers/WebInspectorExtensionController.js.orig: Remove.
1817
1818 2021-10-15  BJ Burg  <bburg@apple.com>
1819
1820         [Cocoa] Web Inspector: handle Promise objects returned from evaluateScriptInExtensionTab
1821         https://bugs.webkit.org/show_bug.cgi?id=231709
1822         <rdar://problem/84224179>
1823
1824         Reviewed by Timothy Hatcher.
1825
1826         This patch improves the handling of promises and exceptions that come from
1827         InspectorFrontendHost.evaluateScriptInExtensionTab().
1828
1829         For promises, wait for the returned promise to settle before fulfilling our returned value.
1830         For errors, perform a better stringification of the Error instance. The is needed because
1831         the default toString implementation leaves out most of the relevant details of the error.
1832
1833         * UserInterface/Controllers/WebInspectorExtensionController.js:
1834         (WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab):
1835
1836         * UserInterface/Protocol/InspectorFrontendAPI.js:
1837         Fix incorrect header docs for InspectorFrontendAPI.evaluateScriptForExtension.
1838         Copy the improved header doc for InspectorFrontendAPI.evaluateScriptInExtensionTab
1839         since it now has the same calling convention.
1840
1841 2021-10-14  Myles C. Maxfield  <mmaxfield@apple.com>
1842
1843         All the SDKVariant.xcconfig files should match
1844         https://bugs.webkit.org/show_bug.cgi?id=231663
1845
1846         Reviewed by Youenn Fablet.
1847
1848         * Configurations/SDKVariant.xcconfig:
1849
1850 2021-10-13  Carlos Garcia Campos  <cgarcia@igalia.com>
1851
1852         HTTP method in web inspector network tab is not what WebKit actually sent after a redirect from POST to GET
1853         https://bugs.webkit.org/show_bug.cgi?id=222558
1854
1855         Reviewed by Michael Catanzaro.
1856
1857         Test: http/tests/inspector/network/resource-redirect-request-headers.html
1858
1859         For redirects, use the previous request information combined with the new response information to create a
1860         Redirect record.
1861
1862         * UserInterface/Models/Resource.js:
1863         (WI.Resource.prototype.updateForRedirectResponse):
1864
1865 2021-10-12  Alexey Proskuryakov  <ap@apple.com>
1866
1867         Invoke build scripts with python3 explicitly
1868         https://bugs.webkit.org/show_bug.cgi?id=231587
1869
1870         Reviewed by Jonathan Bedard.
1871
1872         Much of the work to support Python 3 was done years ago, but we need this to
1873         actually use Python 3 on macOS.
1874
1875         * Scripts/copy-user-interface-resources.pl:
1876
1877 2021-10-11  BJ Burg  <bburg@apple.com>
1878
1879         Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView
1880         https://bugs.webkit.org/show_bug.cgi?id=231181
1881         <rdar://74698241>
1882
1883         Unreviewed. Land parts of the previous patch which seem to have been mis-merged and not landed.
1884
1885         * UserInterface/Base/Main.js:
1886         (WI.isNewTabWithTypeAllowed):
1887         * UserInterface/Controllers/WebInspectorExtensionController.js:
1888         (WI.WebInspectorExtensionController.prototype.showExtensionTab):
1889         * UserInterface/Views/TabBar.js:
1890         (WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown):
1891         (WI.TabBar.prototype._handleTabContainerContextMenu):
1892         (WI.TabBar):
1893
1894 2021-10-11  Razvan Caliman  <rcaliman@apple.com>
1895
1896         Web Inspector: Move CSS longhand and shorthand mapping away from WI.CSSCompletions
1897         https://bugs.webkit.org/show_bug.cgi?id=231432
1898         <rdar://problem/84029471>
1899
1900         Reviewed by Devin Rousso.
1901
1902         `WI.CSSCompletions` has scope creep. Beyond handling filtering for CSS completions,
1903         it holds logic to deal with CSS property name longhand-to-shorthand mapping.
1904
1905         But it already relies heavily on metadata about properties set on `WI.CSSKeywordCompletions`
1906         populated as a result of the one-time initialization from `WI.CSSCompletions.initializeCSSCompletions(target)` >
1907         `WI.CSSKeywordCompletions.addCustomCompletions(properties)`.
1908
1909         This change moves the longhand-to-shorthand mapping from `WI.CSSCompletions` to
1910         `WI.CSSKeywordCompletions.ShorthandNamesForLongHandProperty` and updates relevant consumers.
1911
1912         The aim is to gradually remove all specialized logic for property names from `WI.CSSCompletions`.
1913
1914         * UserInterface/Models/CSSCompletions.js:
1915         (WI.CSSCompletions):
1916         (WI.CSSCompletions.prototype.isShorthandPropertyName): Deleted.
1917         (WI.CSSCompletions.prototype.shorthandsForLonghand): Deleted.
1918         * UserInterface/Models/CSSKeywordCompletions.js:
1919         * UserInterface/Models/CSSProperty.js:
1920         (WI.CSSProperty):
1921         * UserInterface/Models/DOMNodeStyles.js:
1922         (WI.DOMNodeStyles.prototype._associateRelatedProperties):
1923
1924 2021-10-08  BJ Burg  <bburg@apple.com>
1925
1926         Web Inspector: add TabBar context menu support for WI.WebInspectorExtensionTabContentView
1927         https://bugs.webkit.org/show_bug.cgi?id=231181
1928         <rdar://74698241>
1929
1930         Reviewed by Devin Rousso.
1931
1932         The existing TabBar/TabBrowser system relies on the fact that each tab class can
1933         be instantiated once. This is no longer true with extension tabs, as all of them
1934         are instances of the same WI.WebInspectorExtensionTabContentView class.
1935
1936         The new approach builds on bug 230758 by introducing a 'visible' property on ContentView.
1937         This is necessary to mark extension tabs as "attached by not showing" due to the
1938         override of shouldNotRemoveFromDOMWhenHidden().
1939
1940         * UserInterface/Base/Main.js:
1941         (WI._createTabContentViewForType):
1942         (WI.isNewTabWithTypeAllowed):
1943         List WebInspectorExtensionTabContentView as a known tab class. But do not allow
1944         this tab class to be instantiated directly. Extension tabs are intended to be
1945         created using WebInspectorExtensionController.createTabForExtension().
1946
1947         * UserInterface/Controllers/WebInspectorExtensionController.js:
1948         (WI.WebInspectorExtensionController.prototype.unregisterExtension):
1949         (WI.WebInspectorExtensionController.prototype.createTabForExtension):
1950         Drive-by, suppress animations when extension tabs are created and destroyed. Otherwise
1951         there is a lot of unnecessary and glitchy animation when multiple extension tabs are 
1952         created upon loading Web Inspector the first time.
1953
1954         (WI.WebInspectorExtensionController.prototype.showExtensionTab):
1955         (WI.WebInspectorExtensionController.prototype.hideExtensionTab): Added.
1956         These methods are counterparts. They toggle tabContentView.visible to make the tab
1957         visible and not visible. Note that 'hiding' does not actually close/destroy the
1958         extension tab. Extension tabs are hidden by setting .not-visible ('display:none') and
1959         removing the tab's TabBarItem from the TabBar.
1960
1961         (WI.WebInspectorExtensionController.prototype.addContextMenuItemsForClosedExtensionTabs):
1962         (WI.WebInspectorExtensionController.prototype.addContextMenuItemsForAllExtensionTabs):
1963         Added. TabBar delegates the creation of extension tab context menu items to this class.
1964         The first method only shows hidden extension tabs (for the Reopen Closed Tabs + item).
1965         The second method shows visible and not visible extension tabs and feeds the main context menu.
1966
1967         * UserInterface/Views/ContentView.css:
1968         (.content-view.not-visible):
1969         * UserInterface/Views/ContentViewContainer.css:
1970         (.content-view-container > .content-view):
1971         (.content-view-container > .content-view.not-visible): Deleted.
1972         This style class is now managed by ContentView.js. So, move the style declaration.
1973
1974         * UserInterface/Views/ContentView.js:
1975         (WI.ContentView):
1976         (WI.ContentView.prototype.get visible):
1977         (WI.ContentView.prototype.set visible):
1978         Add a flag so that clients can determine when the content view is not visible and not closed.
1979         This can be true if a subclass overrides shouldNotRemoveFromDOMWhenHidden() to return true.
1980
1981         * UserInterface/Views/ContentViewContainer.js:
1982         (WI.ContentViewContainer.prototype._disassociateFromContentView):
1983         Fix this code to not detach extension tabs that are hidden.
1984
1985         (WI.ContentViewContainer.prototype._showEntry):
1986         (WI.ContentViewContainer.prototype._hideEntry):
1987         Adopt new setter for ContentView.prototype.hidden.
1988
1989         * UserInterface/Views/TabBar.js:
1990         (WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown):
1991         Don't add generic context menu items for WebInspectorExtensionTabContentView. Call out
1992         to WebInspectorExtensionController to create the appropriate extension tab context menu items.
1993         (WI.TabBar.prototype._handleTabContainerContextMenu):
1994         (WI.TabBar):
1995
1996         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
1997         (WI.WebInspectorExtensionTabContentView.isTabAllowed): Drive-by, gate creation of this class
1998         on Web Extensions being enabled (InspectorFrontendHost.supportsWebExtensions).
1999
2000 2021-10-08  BJ Burg  <bburg@apple.com>
2001
2002         [Cocoa] Web Inspector: provide a way for _WKInspectorExtension clients to be notified when the inspected page navigates
2003         https://bugs.webkit.org/show_bug.cgi?id=231338
2004         <rdar://71200338>
2005
2006         Reviewed by Devin Rousso.
2007
2008         Pass along an onNavigated event to InspectorFrontendHost when the WI.Frame.MainResourceDidChange
2009         event fires at a main frame target.
2010
2011         * UserInterface/Controllers/WebInspectorExtensionController.js:
2012         (WI.WebInspectorExtensionController):
2013         (WI.WebInspectorExtensionController.prototype.registerExtension):
2014         (WI.WebInspectorExtensionController.prototype.unregisterExtension):
2015         Do not add this global listener unless at least one WI.WebInspectorExtension
2016         is currently registered.
2017
2018         (WI.WebInspectorExtensionController.prototype._handleMainResourceDidChange):
2019
2020 2021-10-07  BJ Burg  <bburg@apple.com>
2021
2022         Web Inspector: WebInspectorExtensionTabContentView should not reload its iframe when detached
2023         https://bugs.webkit.org/show_bug.cgi?id=230758
2024         <rdar://74714861>
2025
2026         Reviewed by Timothy Hatcher.
2027
2028         When an <iframe> element detaches from the DOM, the script context is destroyed, which we don't
2029         want to happen for _WKInspectorExtension tabs. Fix this by teaching ContentViewContainer to
2030         'hide' such content views by setting `display:none` rather than detaching from the DOM.
2031
2032         * UserInterface/Views/ContentViewContainer.js:
2033         (WI.ContentViewContainer.prototype._showEntry):
2034         (WI.ContentViewContainer.prototype._hideEntry):
2035         Set and unset 'display:none' instead of calling addSubview() / removeSubview().
2036
2037         * UserInterface/Views/ContentViewContainer.css:
2038         (.content-view-container > .content-view.hidden-for-detach): Added.
2039
2040         (WI.ContentViewContainer.prototype._disassociateFromContentView):
2041         Clean up any remaining content views that were not detached due to overriding shouldNotRemoveFromDOMWhenHidden.
2042
2043         * UserInterface/Views/ContentView.js:
2044         (WI.ContentView.prototype.get shouldNotRemoveFromDOMWhenHidden): Added.
2045
2046         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
2047         (WI.WebInspectorExtensionTabContentView):
2048         (WI.WebInspectorExtensionTabContentView.prototype.get shouldNotRemoveFromDOMWhenHidden):
2049         Override this to opt into the alternate behavior that does not detach from the DOM. It is still
2050         necessary to call attached() and detached() so that WebInpectorExtensionTabContentView can generate
2051         didShowExtensionTab/didHideExtensionTab event callbacks.
2052
2053         * UserInterface/Controllers/WebInspectorExtensionController.js:
2054         (WI.WebInspectorExtensionController.prototype.get registeredExtensionIDs):
2055         * UserInterface/Debug/Bootstrap.js:
2056         (updateMockWebExtensionTab):
2057         (WI.runBootstrapOperations):
2058         This is a drive-by fix to address a console assertion seen while developing the API test.
2059         Don't unregister the mock extension if it is not registered in the first place.
2060
2061 2021-10-07  Nikita Vasilyev  <nvasilyev@apple.com>
2062
2063         Web Inspector: Styles: format style declarations after editing
2064         https://bugs.webkit.org/show_bug.cgi?id=178835
2065         <rdar://problem/35185060>
2066
2067         Reviewed by Devin Rousso.
2068
2069         Indent CSS properties with spaces/tabs set in Web Inspector settings. Increse indentation level when CSS rules are
2070         inside of at-rules (e.g. @media, @keyframes, @supports).
2071
2072         Don't indent CSS properties in style attributes. Keep them on the single line, separated by a space character:
2073
2074             style="font-size: 12px; color: black;"
2075
2076         * UserInterface/Models/CSSProperty.js:
2077         (WI.CSSProperty.prototype.set text):
2078         Introduce `_isTextPendingSave` flag. It's needed when saving pasted text, and saving commented out or uncommented CSS properties.
2079
2080         (WI.CSSProperty.prototype.get formattedText):
2081
2082         (WI.CSSProperty.prototype.replaceWithText): Deleted.
2083         This is redundant - setting `text` works the same.
2084
2085         (WI.CSSProperty.prototype._updateStyleText):
2086         (WI.CSSProperty.prototype._updateOwnerStyleText):
2087         (WI.CSSProperty.prototype._prependSemicolonIfNeeded): Deleted.
2088         Greatly simplify the logic now that we save formatted text and don't modify styleText.
2089
2090         * UserInterface/Models/CSSStyleDeclaration.js:
2091         (WI.CSSStyleDeclaration.prototype.removeProperty):
2092         Remode unnecessary code that modifies `_styleSheetTextRange`. The backend sends new `_styleSheetTextRange` data
2093         upon a change.
2094
2095         (WI.CSSStyleDeclaration.prototype.generateFormattedText): Renamed from 'generateCSSRuleString'.
2096
2097         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2098         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._populateIconElementContextMenu):
2099         * UserInterface/Views/SpreadsheetStyleProperty.js:
2100         (WI.SpreadsheetStyleProperty.prototype.remove):
2101
2102 2021-10-05  Patrick Angle  <pangle@apple.com>
2103
2104         Web Inspector: Show color space for canvases in the Graphics tab on the overview cards
2105         https://bugs.webkit.org/show_bug.cgi?id=231205
2106
2107         Reviewed by Devin Rousso.
2108
2109         For canvas context's with a color space attribute, show the color space next to the context type in the header
2110         of each context card in the Graphics tab.
2111
2112         * UserInterface/Models/Canvas.js:
2113         (WI.Canvas.displayNameForColorSpace):
2114         * UserInterface/Views/CanvasContentView.js:
2115         (WI.CanvasContentView.prototype.initialLayout):
2116         * UserInterface/Views/CanvasOverviewContentView.css:
2117         (.content-view.canvas-overview > .content-view.canvas > header > .titles > :matches(.subtitle, .color-space),):
2118         (.content-view.canvas-overview > .content-view.canvas > header .color-space::before):
2119
2120 2021-09-29  BJ Burg  <bburg@apple.com>
2121
2122         [Cocoa] add _WKInspectorExtension SPI to evaluate script on an extension tab
2123         https://bugs.webkit.org/show_bug.cgi?id=230646
2124         <rdar://problem/83420328>
2125
2126         Reviewed by Devin Rousso.
2127
2128         Add a new InspectorFrontendAPI method to evaluate script on an iframe within
2129         Web Inspector. This in turn calls out to InspectorFrontendHost to do the actual evaluation.
2130         Otherwise, the CSP policy set by the tab content may block any such evaluation
2131         if the 'script-src' directive does not include 'unsafe-eval'.
2132
2133         * UserInterface/Protocol/InspectorFrontendAPI.js:
2134         (InspectorFrontendAPI.showExtensionTab):
2135         (InspectorFrontendAPI.evaluateScriptInExtensionTab):
2136         Call through to the WebInspectorExtensionController method.
2137
2138         * UserInterface/Controllers/WebInspectorExtensionController.js:
2139         (WI.WebInspectorExtensionController.prototype.evaluateScriptInExtensionTab): Added.
2140         Try to get the <iframe> for a extensionTabID, and use InspectorFrontendHost to
2141         evaluate script in the context of the <iframe>. Be sure to correctly wrap the result.
2142
2143         * UserInterface/Views/WebInspectorExtensionTabContentView.js:
2144         (WI.WebInspectorExtensionTabContentView):
2145         (WI.WebInspectorExtensionTabContentView.prototype.get iframeElement):
2146         (WI.WebInspectorExtensionTabContentView.shouldSaveTab):
2147         (WI.WebInspectorExtensionTabContentView.prototype.initialLayout): Deleted.
2148         While writing the API test, I saw that the first evaluation frequently failed
2149         because the <iframe> did not exist. Change this class so that the <iframe>
2150         is created in the constructor. Add a getter for the <iframe> element.
2151
2152         (WI.WebInspectorExtensionTabContentView.prototype._extensionFrameDidLoad):
2153         (WI.WebInspectorExtensionTabContentView.prototype._maybeDispatchDidShowExtensionTab):
2154         While writing this patch, it became apparent that didShowExtensionTab() was being
2155         called prior to the iframe actually completing its initial load. Then, the test
2156         would try to evaluate script on about:blank instead of the actual tab content.
2157         To fix this, require that the <iframe> be attached and have fired the `onload` event
2158         before we notify clients that it has been 'shown'.
2159
2160         * UserInterface/Main.html:
2161         Adjust the default CSP policy to not mention img-src. This allows ports such as
2162         Cocoa to set their own img-src CSP directive. These changes are necessary to allow
2163         images to load from custom URL schemes.
2164
2165         * UserInterface/Views/TabBrowser.js:
2166         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
2167         The new API test exposes a bug in this assertion, namely, that it does not account
2168         for the situation where a tab does not wish to be saved. In that case, the displayed
2169         WebInspectorExtensionTabContentView is *not* at index 0 of WI.TabBrowser.recentTabContentViews.
2170         This is correctly handled with a special case in WI.TabBrowser._tabBarItemSelected,
2171         so incorporate that logic into the assertion.
2172
2173 2021-09-28  BJ Burg  <bburg@apple.com>
2174
2175         Web Inspector: add settings option for 'Show Mock Web Extension Tab' in engineering builds
2176         https://bugs.webkit.org/show_bug.cgi?id=230923
2177
2178         Reviewed by Devin Rousso.
2179
2180         This is an engineering-only facility to quickly check the behavior of
2181         WebInspectorExtensionTabContentView (aka Web Extension Tabs). The behavior
2182         of these tabs differs from other tabs, so it is important to make this easy to verify.
2183
2184         * UserInterface/Base/Setting.js: Add new setting.
2185         * UserInterface/Debug/Bootstrap.js:
2186         (updateMockWebExtensionTab):
2187         (WI.runBootstrapOperations):
2188         Call the InspectorFrontendAPI commands that would be called by WebInspectorUIExtensionController
2189         to register an extension and create a tab for it.
2190
2191         * UserInterface/Debug/MockWebExtensionTab.html: Added.
2192         This is adapted from InspectorExtension-basic-tab.html as used in TestWebKitAPI.
2193
2194         * UserInterface/Protocol/InspectorFrontendAPI.js: Fix a typo in the headerdoc
2195         for createTabForExtension.
2196
2197         * UserInterface/Views/SettingsTabContentView.js:
2198         (WI.SettingsTabContentView.prototype._createEngineeringSettingsView):
2199
2200 2021-09-28  BJ Burg  <bburg@apple.com>
2201
2202         [Cocoa] Add SPI to select a tab created by _WKInspectorExtension
2203         https://bugs.webkit.org/show_bug.cgi?id=230580
2204         <rdar://problem/83372851>
2205
2206         Reviewed by Devin Rousso.
2207
2208         Add a method to look up a WebInspectorExtensionTabContentView
2209         by its extensionTabID and then show it with WI.tabBrowser.
2210
2211         * UserInterface/Controllers/WebInspectorExtensionController.js:
2212         (WI.WebInspectorExtensionController.prototype.reloadForExtension):
2213         Remove extra newlines.
2214         (WI.WebInspectorExtensionController.prototype.showExtensionTab): Added.
2215
2216         * UserInterface/Protocol/InspectorFrontendAPI.js:
2217         (InspectorFrontendAPI.showExtensionTab): Added.
2218
2219 2021-09-23  Myles C. Maxfield  <mmaxfield@apple.com>
2220
2221         Web Inspector support for font-palette
2222         https://bugs.webkit.org/show_bug.cgi?id=230453
2223
2224         Reviewed by Devin Rousso.
2225
2226         Provide keyword completions.
2227
2228         * UserInterface/Models/CSSKeywordCompletions.js:
2229
2230 2021-09-22  Devin Rousso  <drousso@apple.com>
2231
2232         Web Inspector: add a pinned [+] button to the tab bar to make it easier to re-open closed tabs
2233         https://bugs.webkit.org/show_bug.cgi?id=230600
2234
2235         Reviewed by BJ Burg.
2236
2237         * UserInterface/Views/TabBar.js:
2238         (WI.TabBar):
2239         (WI.TabBar.prototype.selectTabBarItem):
2240         (WI.TabBar.prototype.layout):
2241         (WI.TabBar.prototype._pinnedButtons): Added.
2242         (WI.TabBar.prototype._closedTabClasses): Added.
2243         (WI.TabBar.prototype._handleTabContainerMouseDown):
2244         (WI.TabBar.prototype._handleShowHiddenTabsTabBarItemMouseDown): Added.
2245         (WI.TabBar.prototype._handleAddClosedTabsTabBarItemMouseDown): Added.
2246         (WI.TabBar.prototype._handleTabContainerClick): Deleted.
2247         Add a `_openClosedTabsTabBarItem` that's a `WI.PinnedTabBarItem` without a `representedObject`,
2248         meaning that it's basically just a button and won't actually open a tab when clicked. This
2249         suits our purposes perfectly as we only want to show a contextmenu on click, not to mention
2250         that it will only be shown if there are closed tabs.
2251         Drive-by: Rename `_tabPickerTabBarItem` to `_showHiddenTabsTabBarItem` to clarify purpose.
2252         Drive-by: Remove `_handleTabContainerClick` as tabs can only be removed via the contextmenu.
2253
2254         * UserInterface/Images/Overflow.svg: Renamed from UserInterface/Images/TabPicker.svg.
2255         Drive-by: Rename to clarify purpose.
2256
2257         * Localizations/en.lproj/localizedStrings.js:
2258
2259 2021-09-16  Patrick Angle  <pangle@apple.com>
2260
2261         Web Inspector: Regression(r279613) Audit result scope toggles are missing
2262         https://bugs.webkit.org/show_bug.cgi?id=230322
2263
2264         Reviewed by Devin Rousso.
2265
2266         The sizing calculations modified in r279613 were erroneously applied to both the minimum space calculation as
2267         well as the navigation item hiding calculations, despite hiding navigation items never being done for non-sidebar
2268         navigation bars. The logic in `WI.NavigationBar.prototype._calculateMinimumWidth` remains unchanged, as we still
2269         need sidebars to provide a minimum width that can accommodate all items in a flex layout in order to avoid
2270         flowing navigation items on to another row. The navigation bar in a sidebar is unique in this respect, as other
2271         navigation bars will gracefully hide components if they truly don't have enough space, but a sidebar relies on
2272         getting a minimum size that can actually accommodate all items in a single row.
2273
2274         * UserInterface/Views/NavigationBar.js:
2275         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
2276         (WI.NavigationBar.prototype.layout):
2277
2278 2021-09-16  Patrick Angle  <pangle@apple.com>
2279
2280         Web Inspector: Don't maintain a back-forward stack for `ContentBrowser`/`ContentViewContainer` when not necessary
2281         https://bugs.webkit.org/show_bug.cgi?id=230286
2282
2283         Reviewed by Devin Rousso.
2284
2285         We currently maintain a back/forward stack for all ContentViewContainers, even if other history entries won't be
2286         used. Instead, subclasses of ContentBrowserTabContentView should be able to disable the history stack, which
2287         helps us ensure that outdated content views are not kept around for these subclasses and their views.
2288
2289         This does not line up one-to-one with views that hide the back/forward buttons, as the back/forward stack is
2290         used in some places to provide a memory of selection across different views, like in the Graphics tab.
2291
2292         * UserInterface/Views/AuditTabContentView.js:
2293         (WI.AuditTabContentView):
2294         * UserInterface/Views/ConsoleTabContentView.js:
2295         (WI.ConsoleTabContentView):
2296         * UserInterface/Views/ContentBrowser.js:
2297         * UserInterface/Views/ContentBrowserTabContentView.js:
2298         * UserInterface/Views/ContentViewContainer.js:
2299         (WI.ContentViewContainer.prototype.showContentView):
2300         (WI.ContentViewContainer.prototype.replaceContentView):
2301         * UserInterface/Views/ElementsTabContentView.js:
2302         (WI.ElementsTabContentView):
2303         * UserInterface/Views/GraphicsTabContentView.js:
2304         (WI.GraphicsTabContentView):
2305         * UserInterface/Views/LayersTabContentView.js:
2306         (WI.LayersTabContentView):
2307         * UserInterface/Views/NetworkDetailView.js:
2308         (WI.NetworkDetailView.prototype.initialLayout):
2309         * UserInterface/Views/NetworkTabContentView.js:
2310         (WI.NetworkTabContentView):
2311         * UserInterface/Views/TimelineRecordingContentView.js:
2312         (WI.TimelineRecordingContentView):
2313
2314 2021-09-16  Patrick Angle  <pangle@apple.com>
2315
2316         Web Inspector: `FrameDOMTreeContentView` may update after it has `closed` called, causing hangs on some webpages on reload
2317         https://bugs.webkit.org/show_bug.cgi?id=230186
2318
2319         Reviewed by Devin Rousso.
2320
2321         `FrameDOMTreeContentView` may be `closed` between a call to `_requestRootDOMNode` and the response being
2322         provided to `_rootDOMNodeAvailable`. This can result in an attempt to select a DOM node in an old and detached
2323         DOM tree. To combat this, add a flag to `ContentView` to mark a closed `ContentView` as such, and then return
2324         early from `_rootDOMNodeAvailable` if the `ContentView` is already closed.
2325
2326         * UserInterface/Views/ContentView.js:
2327         (WI.ContentView):
2328         (WI.ContentView.prototype.closed):
2329         (WI.ContentView.prototype.get isClosed):
2330         * UserInterface/Views/FrameDOMTreeContentView.js:
2331         (WI.FrameDOMTreeContentView.prototype._rootDOMNodeAvailable):
2332
2333 2021-09-15  Patrick Angle  <pangle@apple.com>
2334
2335         Web Inspector: `TreeOutline` should return early when failing to find an ancestor while populating the tree
2336         https://bugs.webkit.org/show_bug.cgi?id=230287
2337
2338         Reviewed by Devin Rousso.
2339
2340         When an ancestor can not be found, we should return to prevent additional work (which will fail) from being done.
2341
2342         * UserInterface/Views/TreeOutline.js:
2343         (WI.TreeOutline.prototype.findTreeElement):
2344
2345 2021-09-15  Patrick Angle  <pangle@apple.com>
2346
2347         Web Inspector: `DOMTreeUpdater` doesn't complete deferred updating/clear updated lists when a node isn't found in the tree
2348         https://bugs.webkit.org/show_bug.cgi?id=230289
2349
2350         Reviewed by Devin Rousso.
2351
2352         Instead of an early return when a tree element can't be found, we should continue on to the next updated node
2353         and finish out by clearing the collections of updated nodes, otherwise a node that will never be findable again
2354         will cause extra work to be done on every update.
2355
2356         * UserInterface/Views/DOMTreeUpdater.js:
2357         (WI.DOMTreeUpdater.prototype._updateModifiedNodes):
2358
2359 2021-09-13  Razvan Caliman  <rcaliman@apple.com>
2360
2361         Web Inspector: Update naming of WI.CSSCompletions callback used for collecting supported CSS properties from the target
2362         https://bugs.webkit.org/show_bug.cgi?id=230153
2363
2364         Reviewed by Devin Rousso.
2365
2366         Rename `WI.CSSCompletions.initializeCSSCompletions.propertyNamesCallback(names)` to `propertiesCallback(properties)` 
2367         to remove confusion about what the payload actually contains: not a list of property names, but a list of objects with 
2368         CSS property names, values, aliases, longhands, etc.
2369
2370         The constructor of `WI.CSSCompletions` expects and handles this payload.
2371
2372         * UserInterface/Models/CSSCompletions.js:
2373         (WI.CSSCompletions.initializeCSSCompletions):
2374         (WI.CSSCompletions.initializeCSSCompletions.propertyNamesCallback): Deleted.
2375
2376 2021-08-27  Russell Epstein  <repstein@apple.com>
2377
2378         Land Windows build fixes from safari-612.1.29.14-branch.
2379         https://bugs.webkit.org/show_bug.cgi?id=229627
2380
2381         Reviewed by Per Arne Vollan.
2382
2383         * WebInspectorUI.vcxproj/WebInspectorUI.make:
2384         * WebInspectorUI.vcxproj/WebInspectorUI.proj:
2385
2386 2021-08-26  Patrick Angle  <pangle@apple.com>
2387
2388         Web Inspector: Rename `ContextualDocumentation*` to `CSSDocumentation` to reduce path length and improve code readability
2389         https://bugs.webkit.org/show_bug.cgi?id=229525
2390
2391         Reviewed by Devin Rousso.
2392
2393         Reduce the length and complexity of naming around the documentation that was added for CSS properties by
2394         using `CSSDocumentation` to refer to the feature instead of `ContextualDocumentation`.
2395
2396         * Localizations/en.lproj/localizedStrings.js:
2397         * Scripts/copy-user-interface-resources.pl:
2398         * UserInterface/External/CSSDocumentation/CSSDocumentation.js: Renamed from Source/WebInspectorUI/UserInterface/External/ContextualDocumentationDatabase/ContextualDocumentationDatabase.js.
2399         * UserInterface/External/CSSDocumentation/LICENSE: Renamed from Source/WebInspectorUI/UserInterface/External/ContextualDocumentationDatabase/LICENSE.
2400         * UserInterface/Main.html:
2401         * UserInterface/Views/CSSDocumentationPopover.css: Renamed from Source/WebInspectorUI/UserInterface/Views/ContextualDocumentationPopover.css.
2402         * UserInterface/Views/CSSDocumentationPopover.js: Renamed from Source/WebInspectorUI/UserInterface/Views/ContextualDocumentationPopover.js.
2403         (WI.CSSDocumentationPopover.prototype._getDocumentationDetails):
2404         * UserInterface/Views/ComputedStyleSection.css:
2405         (.computed-style-section .property-trace-item .property :is(.name, .colon, .semicolon, .css-documentation-button)):
2406         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property > .content > .css-documentation-button):
2407         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property > .content > .css-documentation-button):
2408         (.computed-style-section .property-trace-item .property :is(.name, .colon, .semicolon, .contextual-documentation-button)): Deleted.
2409         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property > .content > .contextual-documentation-button): Deleted.
2410         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property > .content > .contextual-documentation-button): Deleted.
2411         * UserInterface/Views/Main.css:
2412         (.css-documentation-button):
2413         (.css-documentation-button:active):
2414         (@media (prefers-color-scheme: dark) .css-documentation-button):
2415         (.contextual-documentation-button): Deleted.
2416         (.contextual-documentation-button:active): Deleted.
2417         (@media (prefers-color-scheme: dark) .contextual-documentation-button): Deleted.
2418         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
2419         (.spreadsheet-style-declaration-editor > .property:not(:hover) > .content > .css-documentation-button,):
2420         (.spreadsheet-style-declaration-editor > .property:not(:hover) > .content > .contextual-documentation-button,): Deleted.
2421         * UserInterface/Views/SpreadsheetStyleProperty.js:
2422         (WI.SpreadsheetStyleProperty.prototype.update):
2423         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
2424         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
2425         (WI.SpreadsheetStyleProperty.prototype.willDismissPopover):
2426         (WI.SpreadsheetStyleProperty.prototype._addCSSDocumentationButton):
2427         (WI.SpreadsheetStyleProperty.prototype._handleCSSDocumentationButtonClicked):
2428         (WI.SpreadsheetStyleProperty.prototype._presentCSSDocumentation):
2429         (WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton): Deleted.
2430         (WI.SpreadsheetStyleProperty.prototype._handleContextualDocumentationButtonClicked): Deleted.
2431         (WI.SpreadsheetStyleProperty.prototype._presentContextualDocumentation): Deleted.
2432
2433 2021-08-23  Razvan Caliman  <rcaliman@apple.com>
2434
2435         Web Inspector: CSS Changes: changes are not updated live
2436         https://bugs.webkit.org/show_bug.cgi?id=229153
2437         <rdar://problem/81989328>
2438
2439         Reviewed by Devin Rousso.
2440
2441         Dispatch an event whenever the list of modified styles changes.
2442         Re-layout the Changes details sidebar panel in response to this event
2443         to reflect the latest state of the modified styles.
2444
2445         * UserInterface/Controllers/CSSManager.js:
2446         (WI.CSSManager.prototype.addModifiedStyle):
2447         (WI.CSSManager.prototype.removeModifiedStyle):
2448         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
2449         (WI.ChangesDetailsSidebarPanel.prototype.attached):
2450         (WI.ChangesDetailsSidebarPanel.prototype.detached):
2451
2452 2021-08-19  Alex Christensen  <achristensen@webkit.org>
2453
2454         Remove more non-inclusive language from Source
2455         https://bugs.webkit.org/show_bug.cgi?id=229230
2456
2457         Reviewed by Myles C. Maxfield.
2458
2459         * UserInterface/External/three.js/three.js:
2460         (return.parseTrackName):
2461         (parseTrackName):
2462         * UserInterface/Views/ConsoleMessageView.js:
2463         (WI.ConsoleMessageView.prototype._formatWithSubstitutionString.styleFormatter):
2464         (WI.ConsoleMessageView.prototype._formatWithSubstitutionString.isAllowedProperty):
2465         (WI.ConsoleMessageView.prototype._formatWithSubstitutionString.isWhitelistedProperty): Deleted.
2466         * UserInterface/Views/DOMTreeElement.js:
2467         (WI.DOMTreeElement.prototype.populateDOMNodeContextMenu):
2468
2469 2021-08-19  Tim Nguyen  <ntim@apple.com>
2470
2471         Implement ::backdrop pseudo element
2472         https://bugs.webkit.org/show_bug.cgi?id=227801
2473
2474         Reviewed by Antti Koivisto.
2475
2476         This adds UA styles, RenderTreeBuilder support and WebInspector support for ::backdrop.
2477         Some imported blink tests now start passing, some still need proper top layer support.
2478
2479         * UserInterface/Controllers/CSSManager.js:
2480         (WI.CSSManager.displayNameForPseudoId):
2481
2482 2021-08-17  Devin Rousso  <drousso@apple.com>
2483
2484         Web Inspector: match the undocked tab bar style when docked bottom/side
2485         https://bugs.webkit.org/show_bug.cgi?id=212398
2486
2487         Reviewed by Timothy Hatcher.
2488
2489         This will avoid confusion when switching from docked to undocked (and vice versa) as the tab
2490         bar UI will no longer be significantly different.
2491
2492         * UserInterface/Views/TabBar.js:
2493         (WI.TabBar):
2494         (WI.TabBar.prototype.layout):
2495         (WI.TabBar.prototype.layout.measureWidth):
2496         (WI.TabBar.prototype._recordTabBarItemSizesAndPositions):
2497         (WI.TabBar.prototype._applyTabBarItemSizesAndPositions):
2498         (WI.TabBar.prototype._clearTabBarItemSizesAndPositions):
2499         (WI.TabBar.prototype._handleMouseDown):
2500         (WI.TabBar.prototype._handleMouseMoved):
2501         (WI.TabBar.get horizontalPadding): Deleted.
2502         (WI.TabBar.prototype._recordTabBarItemSizesAndPositions.add): Deleted.
2503         * UserInterface/Views/TabBar.css:
2504         (.tab-bar):
2505         (body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
2506         (body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
2507         (body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar): Added.
2508         (.tab-bar > .tabs > .item):
2509         (body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
2510         (body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
2511         (.tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)):
2512         (.tab-bar > .tabs > .item:nth-child(n + 2 of :not(.hidden)), .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(1 of :not(.hidden)), .tab-bar > .tabs.dragging-tab > .item.selected):
2513         (.tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))):
2514         (body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2515         (body:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2516         (body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2517         (body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
2518         (body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
2519         (.tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item):
2520         (.tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover):
2521         (body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
2522         (body.window-inactive .tab-bar > .tabs > .item):
2523         (body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected):
2524         (.tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
2525         (body.window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body.window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body.window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected):
2526         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
2527         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
2528         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar): Added.
2529         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item): Added.
2530         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2531         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2532         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
2533         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Added.
2534         (@media (prefers-color-scheme: dark) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon):
2535         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar, body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar): Added.
2536         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
2537         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item): Added.
2538         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2539         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Added.
2540         (body.big-sur .tab-bar): Deleted.
2541         (body:not(.docked) .tab-bar): Deleted.
2542         (body.big-sur:not(.docked) .tab-bar): Deleted.
2543         (body:not(.big-sur):not(.docked) .tab-bar): Deleted.
2544         (body.big-sur:not(.docked).window-inactive .tab-bar, body:not(.big-sur):not(.docked).window-inactive .tab-bar): Deleted.
2545         (body.docked.window-inactive .tab-bar): Deleted.
2546         (body.docked.bottom .tab-bar > .border.top): Deleted.
2547         (body.big-sur.docked .tab-bar > .border.bottom): Deleted.
2548         (body.docked .tab-bar .tabs): Deleted.
2549         (body.docked .tab-bar > .tabs > .flexible-space): Deleted.
2550         (body.docked.bottom .tab-bar > .tabs > .flexible-space): Deleted.
2551         (body:not(.docked) .tab-bar > .tabs > .item): Deleted.
2552         (body.big-sur:not(.docked) .tab-bar > .tabs > .item): Deleted.
2553         (body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item): Deleted.
2554         (body:not(.docked) .tab-bar > .tabs:not(.calculate-width) > .item:not(.pinned)): Deleted.
2555         (body.docked .tab-bar > .tabs > .item): Deleted.
2556         (body:not(.docked) .tab-bar > .tabs > .item:nth-child(n + 3 of :not(.hidden)), body:not(.docked) .tab-bar > .tabs:not(.hide-border-start) > .item:nth-child(2 of :not(.hidden)), .tab-bar > .tabs.dragging-tab > .item.selected): Deleted.
2557         (body:not(.docked) .tab-bar > .tabs:not(.hide-border-end) > .item:nth-last-child(1 of :not(.hidden))): Deleted.
2558         (body.docked .tab-bar > .tabs > .item.pinned): Deleted.
2559         (body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2560         (body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2561         (body.docked .tab-bar > .tabs > .item:not(.disabled):matches(.selected, :hover)): Deleted.
2562         (body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2563         (body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
2564         (body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
2565         (body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
2566         (body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover, body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover + .item): Deleted.
2567         (body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:last-child:not(.selected, .disabled):hover): Deleted.
2568         (body:not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
2569         (body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item, body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
2570         (body:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2571         (body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2572         (body:not(.docked) .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked) .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked) .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
2573         (body:not(.docked).window-inactive .tab-bar > .tabs.dragging-tab > .item:not(.disabled).selected, body:not(.docked).window-inactive .tab-bar > .tabs.static-layout:not(.animating.inserting-tab):not(.dragging-tab) > .item:nth-last-child(1 of :not(.pinned)), body:not(.docked).window-inactive .tab-bar > .tabs.animating.closing-tab > .item:not(.disabled).selected): Deleted.
2574         (@media (prefers-color-scheme: dark) body.big-sur .tab-bar, body:not(.big-sur) .tab-bar): Deleted.
2575         (@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar): Deleted.
2576         (@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar): Deleted.
2577         (@media (prefers-color-scheme: dark) body.docked .tab-bar): Deleted.
2578         (@media (prefers-color-scheme: dark) body.docked.bottom .tab-bar > .border.top): Deleted.
2579         (@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item): Deleted.
2580         (@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2581         (@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2582         (@media (prefers-color-scheme: dark) body.big-sur:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
2583         (@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
2584         (@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover): Deleted.
2585         (@media (prefers-color-scheme: dark) body.docked .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2586         (@media (prefers-color-scheme: dark) body.docked.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2587         (@media (prefers-color-scheme: dark) body:not(.docked) .tab-bar > .tabs:not(.animating) > .item:not(.selected, .disabled):hover > .icon): Deleted.
2588         (@media (prefers-color-scheme: dark) body:not(.docked).window-inactive .tab-bar): Deleted.
2589         (@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar, body:not(.big-sur):not(.docked).window-inactive .tab-bar): Deleted.
2590         (@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
2591         (@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item): Deleted.
2592         (@media (prefers-color-scheme: dark) body.big-sur:not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2593         (@media (prefers-color-scheme: dark) body:not(.big-sur):not(.docked).window-inactive .tab-bar > .tabs > .item:not(.disabled).selected): Deleted.
2594         * UserInterface/Views/TabBarItem.js:
2595         (WI.TabBarItem.get horizontalMargin): Deleted.
2596          - remove the flexible space filler elements (and associated CSS) before and after the tabs
2597          - remove any `.docked` CSS
2598          - remove the (now unnecessary) `:not(.docked)` from all CSS related to the `WI.TabBar`
2599          - replace `.big-sur` with `.mac-platform.big-sur` for clarity
2600          - add `.mac-platform.monterey` alongside any `.mac-platform.big-sur`
2601
2602         * UserInterface/Base/Main.js:
2603         (WI.undockedTitleAreaHeight):
2604         * UserInterface/Views/Main.css:
2605         (body:is(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
2606         (body:not(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
2607         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
2608         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur) #undocked-title-area): Added.
2609         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur).window-inactive #undocked-title-area): Added.
2610         (@media (prefers-color-scheme: dark) body:not(.mac-platform.monterey, .mac-platform.big-sur).window-inactive #undocked-title-area): Added.
2611         (body.big-sur #undocked-title-area): Deleted.
2612         (body:not(.big-sur) #undocked-title-area): Deleted.
2613         (@media (prefers-color-scheme: dark) body.big-sur #undocked-title-area): Deleted.
2614         (@media (prefers-color-scheme: dark) body:not(.big-sur) #undocked-title-area): Deleted.
2615         (@media (prefers-color-scheme: dark) body.big-sur.window-inactive #undocked-title-area): Deleted.
2616         (@media (prefers-color-scheme: dark) body:not(.big-sur).window-inactive #undocked-title-area): Deleted.
2617         * UserInterface/Views/Variables.css:
2618         (body:is(.mac-platform.monterey, .mac-platform.big-sur)): Added.
2619         (body:not(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Added.
2620         (body:is(.mac-platform.monterey, .mac-platform.big-sur):not(.docked)): Added.
2621         (@media (prefers-color-scheme: dark) body:is(.mac-platform.monterey, .mac-platform.big-sur)): Added.
2622         (body.big-sur): Deleted.
2623         (body.mac-platform:not(.big-sur):not(.docked)): Deleted.
2624         (body.mac-platform.big-sur:not(.docked)): Deleted.
2625         (@media (prefers-color-scheme: dark) body.big-sur): Deleted.
2626         Add support for macOS Monterey.
2627
2628 2021-08-17  Razvan Caliman  <rcaliman@apple.com>
2629
2630         Web Inspector: Do not show contextual documentation popup in the Changes panel
2631         https://bugs.webkit.org/show_bug.cgi?id=229001
2632         <rdar://problem/81792379>
2633
2634         Reviewed by Devin Rousso.
2635
2636         Add config option to WI.SpreadsheetStyleProperty to prevent showing a contextual documentation button.
2637
2638         * UserInterface/Views/ChangesDetailsSidebarPanel.js:
2639         (WI.ChangesDetailsSidebarPanel.prototype._createRuleElement.onEach):
2640         * UserInterface/Views/SpreadsheetStyleProperty.js:
2641         (WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton):
2642
2643 2021-08-12  Patrick Angle  <pangle@apple.com>
2644
2645         Web Inspector: Adding execution contexts after page load doesn't show a hidden execution selector
2646         https://bugs.webkit.org/show_bug.cgi?id=229053
2647
2648         Reviewed by Devin Rousso.
2649
2650         Add a handler for execution contexts being added to update the display of the execution context list, as when
2651         there is only a single context at page load the dropdown will be hidden and thus needs to be shown when an
2652         execution context is added after page load.
2653
2654         * UserInterface/Views/QuickConsole.js:
2655         (WI.QuickConsole):
2656         (WI.QuickConsole.prototype._handleFrameExecutionContextAdded):
2657
2658 2021-08-12  Nikita Vasilyev  <nvasilyev@apple.com>
2659
2660         REGRESSION (r271348): Web Inspector: Table headers have vertical scrollbar
2661         https://bugs.webkit.org/show_bug.cgi?id=228671
2662         <rdar://problem/81638278>
2663
2664         Reviewed by Devin Rousso.
2665
2666         * UserInterface/Views/Table.css:
2667         (.table > .header):
2668         Set overflow hidden for the y axis, not just x axis.
2669
2670 2021-08-03  Sonia Singla  <soniasingla.1812@gmail.com>
2671
2672         Web Inspector: Add standard logical properties to CSS keyword completion
2673         https://bugs.webkit.org/show_bug.cgi?id=228548
2674
2675         Reviewed by Devin Rousso.
2676
2677         * UserInterface/Models/CSSKeywordCompletions.js:
2678
2679 2021-08-02  Patrick Angle  <pangle@apple.com>
2680
2681         Web Inspector: [AppleWin] Speculative internal build fix for copying `InspectorBackendCommands.js`
2682         https://bugs.webkit.org/show_bug.cgi?id=228716
2683
2684         Reviewed by Maciej Stachowiak.
2685
2686         Speculative fix for AppleWin port internal build by using the correct directory for JSC headers. Also update the
2687         logging message to reflect that the file will by copied later in the build.
2688
2689         * WebInspectorUI.vcxproj/WebInspectorUI.make:
2690         * WebInspectorUI.vcxproj/build-webinspectorui.pl:
2691
2692 2021-08-02  Nikita Vasilyev  <nvasilyev@apple.com>
2693
2694         Web Inspector: Network: sorting of transfer size for failed requests is causing the ordering to change every layout
2695         https://bugs.webkit.org/show_bug.cgi?id=228712
2696
2697         Reviewed by Devin Rousso.
2698
2699         * UserInterface/Views/NetworkTableContentView.js:
2700         (WI.NetworkTableContentView.prototype._generateSortComparator):
2701         Don't change the item order when both values are NaN.
2702
2703 2021-07-26  Qiaosong Zhou  <qiaosong_zhou@apple.com>
2704
2705         FormDataEvent added. 
2706         https://bugs.webkit.org/show_bug.cgi?id=227718
2707
2708         Reviewed by Chris Dumez.
2709
2710         * UserInterface/Models/ScriptTimelineRecord.js:
2711         (WI.ScriptTimelineRecord.EventType.displayName):
2712
2713 2021-07-19  Nikita Vasilyev  <nvasilyev@apple.com>
2714
2715         Web Inspector: REGRESSION(?): alpha slider doesn't match alpha input for `transparent` in color picker
2716         https://bugs.webkit.org/show_bug.cgi?id=227941
2717         <rdar://problem/80557438>
2718
2719         Reviewed by Devin Rousso.
2720
2721         * UserInterface/Views/Slider.js:
2722         (WI.Slider.prototype.set value):
2723         When the initial value was set to 0, `set value` was exiting early when the passed value was 0.
2724
2725 2021-07-19  Patrick Angle  <pangle@apple.com>
2726
2727         Web Inspector: Elements: selecting a sibling node in the breadcrumb navigation doesn't do anything
2728         https://bugs.webkit.org/show_bug.cgi?id=227893
2729
2730         Reviewed by Devin Rousso.
2731
2732         The `WI.HierarchicalPathComponent.Event.Clicked` event is only fired when there are no sibling path components
2733         to select, therefor we must also listen for the `WI.HierarchicalPathComponent.Event.SiblingWasSelected` event to
2734         be able to then reveal and highlight the correct DOM node in the tree.
2735
2736         * UserInterface/Views/DOMTreeContentView.js:
2737         (WI.DOMTreeContentView.prototype.get selectionPathComponents):
2738         (WI.DOMTreeContentView.prototype._handlePathComponentSelected):
2739         Drive-by to match our style of `_handle*` event handler naming.
2740
2741 2021-07-19  Patrick Angle  <pangle@apple.com>
2742
2743         Web Inspector: Add another Protocol Version (iOS 15.0)
2744         https://bugs.webkit.org/show_bug.cgi?id=228079
2745
2746         Reviewed by Devin Rousso.
2747
2748         * UserInterface/Protocol/Legacy/15.0/InspectorBackendCommands.js: Added.
2749         * Versions/Inspector-iOS-15.0.json: Added.
2750
2751 2021-07-15  Razvan Caliman  <rcaliman@apple.com>
2752
2753         Web Inspector: Regression (r278607) Jump to CSS variable declaration from Computed panel not working
2754         https://bugs.webkit.org/show_bug.cgi?id=227811
2755         <rdar://problem/80339360>
2756
2757         Reviewed by Devin Rousso.
2758
2759         When attempting to highlight a hidden unused CSS variable, use the same method to identify a corresponding WI.CSSProperty
2760         as used with other CSS property types. The method checks the canonical property name instead of strict object equality.
2761
2762         When a CSS variable is shown in the Computed panel, its corresponding WI.CSSProperty instance has slightly different
2763         properties than the WI.CSSProperty used in the Styles panel. The instances are generated by different calls to
2764         WI.DOMNodeStyles._parseStylePropertyPayload(), one for the payload of matching styles and another for computed styles.
2765
2766         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2767         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty.propertiesMatch):
2768         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty.hasMatchingLonghandProperty):
2769         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
2770
2771 2021-07-14  Devin Rousso  <drousso@apple.com>
2772
2773         Implement Array.prototype.findLast and Array.prototype.findLastIndex
2774         https://bugs.webkit.org/show_bug.cgi?id=227939
2775
2776         Reviewed by Yusuke Suzuki.
2777
2778         * UserInterface/Models/NativeFunctionParameters.js:
2779
2780 2021-07-12  Patrick Angle  <pangle@apple.com>
2781
2782         Web Inspector: REGRESSION(r279510): Elements: Computed: an (i) button is shown for computed property traces
2783         https://bugs.webkit.org/show_bug.cgi?id=227892
2784
2785         Reviewed by Devin Rousso.
2786
2787         Property traces need to opt out of displaying the (i) button as they do for things like the colon and semicolon.
2788
2789         * UserInterface/Views/ComputedStyleSection.css:
2790         (.computed-style-section .property-trace-item .property .name,):
2791
2792 2021-07-12  Commit Queue  <commit-queue@webkit.org>
2793
2794         Unreviewed, reverting r279493.
2795         https://bugs.webkit.org/show_bug.cgi?id=227878
2796
2797         Web Inspector: Can't reveal local overrides in the sidebar if
2798         lots of scripts are visible
2799
2800         Reverted changeset:
2801
2802         "Web Inspector: [Regression: r279271] Sources: Breakpoints
2803         section in navigation sidebar disappears when Web Inspector
2804         becomes taller than 650px"
2805         https://bugs.webkit.org/show_bug.cgi?id=227597
2806         https://commits.webkit.org/r279493
2807
2808 2021-07-09  Patrick Angle  <pangle@apple.com>
2809
2810         Web Inspector: Perform sidebar panel and navigation bar layout asynchronously during resize
2811         https://bugs.webkit.org/show_bug.cgi?id=227716
2812
2813         Reviewed by Devin Rousso.
2814
2815         Perform layout updates to the navigation bar and selected panel asynchronously so that they can be batched
2816         together, instead of blocking on layout for each resize (of which there will be many during a dragging resize).
2817
2818         * UserInterface/Views/SingleSidebar.js:
2819         (WI.SingleSidebar.prototype._recalculateWidth):
2820
2821 2021-07-06  Patrick Angle  <pangle@apple.com>
2822
2823         Web Inspector: Elements Tab Details Sidebar navigation items sometime wrap to a second line
2824         https://bugs.webkit.org/show_bug.cgi?id=227707
2825
2826         Reviewed by Devin Rousso.
2827
2828         When resizing a sidebar, it was possible that the cumulative widths of each navigation item could add up to just
2829         less than the actual amount of space necessary to lay out each item in a single row, leading to wrapping items
2830         to the next line. This resolves that issue by taking the ceiling of each item's width when calculating the
2831         total amount of space needed to display all the items. Additionally, every time a panel is added or removed from
2832         the sidebar, we need to recalculate the width of the sidebar to make sure the new navigation item, or the
2833         removal thereof, is accommodated.
2834
2835         * UserInterface/Views/NavigationBar.js:
2836         (WI.NavigationBar.prototype.layout.calculateVisibleItemWidth):
2837         (WI.NavigationBar.prototype._calculateMinimumWidth):
2838         * UserInterface/Views/SingleSidebar.js:
2839         (WI.SingleSidebar.prototype.didInsertSidebarPanel):
2840         (WI.SingleSidebar.prototype.didRemoveSidebarPanel):
2841
2842 2021-07-02  Harshil Ratnu  <hratnu@apple.com>
2843
2844         Web Inspector: add contextual documentation for CSS properties
2845         https://bugs.webkit.org/show_bug.cgi?id=226883
2846
2847         Reviewed by Devin Rousso.
2848
2849         Overview: Add contextual documentation for all supported CSS properties in Styles and Computed panel within Web 
2850         Inspector.
2851         Details: Add an info button which appears next to the property field on Hover. Clicking on the info button shows
2852         a popover with the documentation for the property. Tabbing out or clicking anywhere other than the value field 
2853         dismisses the popover.
2854         Architecture: Add a ContextualDocumentationButton in SpreadsheetStyleProperty and append that to the end of the 
2855         property content. This Button, when clicked, creates an instance of the ContextualDocumentation.js which will 
2856         search the ContextualDocumentationDB to find the related property and it's relevant details. Embed these details
2857         in an instance of Popover.js and present next to the associated propertyName.
2858
2859         * Localizations/en.lproj/localizedStrings.js:
2860         * Scripts/copy-user-interface-resources.pl:
2861         Add details for the ContextualDocumentationDatabase from External Folder to build properly.
2862
2863         * UserInterface/Base/Setting.js:
2864         Add setting to show syntax in documentation popover and define default state as false.
2865
2866         * UserInterface/External/ContextualDocumentationDatabase/ContextualDocumentationDatabase.js: Added.
2867         * UserInterface/External/ContextualDocumentationDatabase/LICENSE: Added.
2868         * UserInterface/Images/InfoIcon.svg: Added.
2869         * UserInterface/Main.html:
2870         Add and link new files.
2871
2872         * UserInterface/Views/ComputedStyleDetailsPanel.css:
2873         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property .go-to-arrow):
2874         (.sidebar > .panel.details.css-style > .content > .computed > .details-section.computed-style-variables .property:not(:hover) .go-to-arrow):
2875         Remove absolute positioning from go-to-arrow button to align it with rest of the text in line and style it 
2876         similar to contextual-documentation-button. 
2877         (.sidebar > .panel.details.css-style > .content > .computed .property .go-to-arrow): Deleted.
2878         (.sidebar > .panel.details.css-style > .content > .computed .property:not(:hover) .go-to-arrow): Deleted.
2879         Change hover area to include white space on the side of computed variables.
2880
2881         * UserInterface/Views/ComputedStyleSection.css:
2882         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property .go-to-arrow):
2883         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property .go-to-arrow):
2884         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item > .property > .content > .contextual-documentation-button):
2885         (.sidebar > .panel.details.css-style > .content > .computed .computed-property-item:not(:hover) > .property > .content > .contextual-documentation-button):
2886         Add unifrom styling for go-to-arrow button and contextual-documentation-button for computed properties.
2887
2888         * UserInterface/Views/ContextualDocumentationPopover.css: Added.
2889         (.popover .documentation-popover-content):
2890         (.popover .documentation-popover-content > p):
2891         (.popover .documentation-popover-content > .name-header):
2892         (.popover .documentation-popover-content > .syntax):
2893         (.popover .documentation-popover-content > .syntax > .syntax-title):
2894         (.popover .documentation-popover-content > .reference-link):
2895         * UserInterface/Views/ContextualDocumentationPopover.js: Added.
2896         (WI.ContextualDocumentationPopover):
2897         (WI.ContextualDocumentationPopover.prototype.show):
2898         (WI.ContextualDocumentationPopover.prototype._presentOverTargetElement):
2899         (WI.ContextualDocumentationPopover.prototype._getDocumentationDetails):
2900         (WI.ContextualDocumentationPopover.prototype._createDocumentationElement):
2901         Add new class that extends Popover.js and  handles fetching the values from VS Code documentation, puts relevant
2902         information in the popover and presents the popover when the documentation-button is clicked.
2903
2904         * UserInterface/Views/Main.css:
2905         (.contextual-documentation-button):
2906         (.contextual-documentation-button:active):
2907         (@media (prefers-color-scheme: dark) .contextual-documentation-button):
2908         Add general styling for contextualDocumentationButton.
2909
2910         * UserInterface/Views/SettingsTabContentView.js:
2911         (WI.SettingsTabContentView.prototype._createElementsSettingsView):
2912         Add a new setting in Elements Tab to show syntax.
2913
2914         * UserInterface/Views/SpreadsheetStyleProperty.js:
2915         (WI.SpreadsheetStyleProperty.prototype.willDismissPopover):
2916         Add a method - willDismissPopover to handle changes when the documentation popover is about to dismiss.
2917         (WI.SpreadsheetStyleProperty.prototype.update):
2918         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
2919         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
2920         (WI.SpreadsheetStyleProperty.prototype._addContextualDocumentationButton):
2921         Add a method which gets called for all property fields and also gets called when property name is changed and
2922         updated by clicking out of the property name field or tabbing into the next value field and is responsible for
2923         adding the info button add the end of the property.
2924         (WI.SpreadsheetStyleProperty.prototype._handleContextualDocumentationButtonClicked):
2925         (WI.SpreadsheetStyleProperty.prototype._presentContextualDocumentation):
2926         Add a method which creates an instance of the ContextualDocumentationPopover.js class and shows it.
2927
2928 2021-07-02  Razvan Caliman  <rcaliman@apple.com>
2929
2930         Web Inspector: Styles: should autocomplete `var()` and `attr()` values
2931         https://bugs.webkit.org/show_bug.cgi?id=227098
2932         <rdar://problem/79418247>
2933
2934         Reviewed by Devin Rousso.
2935
2936         Add support for completion suggestions in the Styles details sidebar panel
2937         for CSS Variables for use with var() and DOM node attributes for use with attr().
2938
2939         * UserInterface/Models/CSSCompletions.js:
2940         (WI.CSSCompletions.prototype.addValues):
2941         * UserInterface/Models/CSSKeywordCompletions.js:
2942         * UserInterface/Models/DOMNodeStyles.js:
2943         (WI.DOMNodeStyles):
2944         (WI.DOMNodeStyles.prototype.get allCSSVariables):
2945         (WI.DOMNodeStyles.prototype._updateStyleCascade):
2946         (WI.DOMNodeStyles.prototype._collectCSSVariables):
2947         * UserInterface/Views/SpreadsheetStyleProperty.js:
2948         (WI.SpreadsheetStyleProperty.prototype.getFunctionValueCompletions):
2949         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
2950
2951 2021-07-01  Patrick Angle  <pangle@apple.com>
2952
2953         Web Inspector: [Regression: r279271] Sources: Breakpoints section in navigation sidebar disappears when Web Inspector becomes taller than 650px
2954         https://bugs.webkit.org/show_bug.cgi?id=227597
2955
2956         Reviewed by Devin Rousso.
2957
2958         As of r279271, flex base size is no longer clamped by max-height. As a result the non-clamped element
2959         (`resources-container`) was sized to the full height of the container, leaving no space for the other sections
2960         to be shown. Removing the `height: 100%;` declaration resolves this by allowing the flex container to lay out
2961         its children as needed. Because the resources container has no maximum height constraint, it still occupies the
2962         remaining height of the container. Each container will also continue to shrink/grow at their prescribed ratio
2963         just as they did before r279271.
2964
2965         * UserInterface/Views/SourcesNavigationSidebarPanel.css:
2966         (@media (min-height: 650px) .sidebar > .panel.navigation.sources > .content > :matches(.call-stack-container, .breakpoints-container, .resources-container, .local-overrides-container)):
2967
2968 2021-06-30  Patrick Angle  <pangle@apple.com>
2969
2970         Web Inspector: Styles: Autocomplete should support function completions
2971         https://bugs.webkit.org/show_bug.cgi?id=227097
2972
2973         Reviewed by Devin Rousso.
2974
2975         Covered by new test:
2976         - inspector/unit-tests/css-keyword-completions.html
2977
2978         Add support for completing autocompleting values as part of a CSS function in the Styles sidebar panel.
2979         
2980         * UserInterface/Models/CSSKeywordCompletions.js:
2981         (WI.CSSKeywordCompletions.forPartialPropertyName):
2982         (WI.CSSKeywordCompletions.forPartialPropertyValue):
2983         Tokenize the provided partial value text to correct provide completion for functions, like `env(`.
2984
2985         * UserInterface/Views/SpreadsheetStyleProperty.js:
2986         (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider):
2987         (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider):
2988         Moved logic to `WI.CSSKeywordCompletions`.
2989
2990 2021-06-25  Patrick Angle  <pangle@apple.com>
2991
2992         Web Inspector: Sources: Scope Chain sidebar panel is stripping repeating whitespace from strings
2993         https://bugs.webkit.org/show_bug.cgi?id=227234
2994
2995         Reviewed by Devin Rousso.
2996
2997         String and Regular Expression values in Object Trees were having `white-space: nowrap;` applied to them, which
2998         was redundant because `white-space: pre;` was already defined for `.formatted-string` and `.formatted-regexp`,
2999         which makes sure that the text does not wrap unless it contains a newline, and these previews have newlines
3000         replaced with a Unicode symbol to visually represent a newline without breaking to a new line.
3001
3002         * UserInterface/Views/ObjectTreeView.css:
3003         (.object-tree-property :matches(.formatted-string, .formatted-regexp)): Deleted.
3004
3005 2021-06-14  Patrick Angle  <pangle@apple.com>
3006
3007         [REGRESSION: r276616] Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._setupCodeMirror.getValue')
3008         https://bugs.webkit.org/show_bug.cgi?id=226995
3009
3010         Reviewed by Devin Rousso.
3011
3012         Audit test groups share a single setup editor for all their test cases, leaving individual test cases without
3013         their own setup editor. In this case, we should not attempt to save the setup script for every test, and instead
3014         allow the instance of `AuditTestGroupContentView` that does have a setup editor to save the script.
3015
3016         * UserInterface/Views/AuditTestContentView.js:
3017         (WI.AuditTestContentView.prototype.saveEditedData):
3018
3019 2021-06-11  Patrick Angle  <pangle@apple.com>
3020
3021         Web Inspector: Add instrumentation to node destruction for InspectorDOMAgent
3022         https://bugs.webkit.org/show_bug.cgi?id=226624
3023
3024         Reviewed by Devin Rousso.
3025
3026         Listen for the new `DOM.willDestroyDOMNode` event in order to cleanup and remaining references to that Node.
3027         This work serves as a prelude to <https://webkit.org/b/189687> (Web Inspector: preserve DOM.NodeId if a node is
3028         removed and re-added) to eventually only forget about nodes upon destruction, instead of removal from the DOM
3029         tree.
3030
3031         * UserInterface/Controllers/DOMManager.js:
3032         (WI.DOMManager.prototype.willDestroyDOMNode):
3033         * UserInterface/Protocol/DOMObserver.js:
3034         (WI.DOMObserver.prototype.willDestroyDOMNode):
3035         * UserInterface/Views/DOMTreeUpdater.js:
3036         (WI.DOMTreeUpdater.prototype._nodeRemoved):
3037
3038 2021-06-08  Razvan Caliman  <rcaliman@apple.com>
3039
3040         Web Inspector: Styles panel slow to render when inspecting node with many inherited CSS variables
3041         https://bugs.webkit.org/show_bug.cgi?id=225972
3042         <rdar://problem/78211185>
3043
3044         Reviewed by Devin Rousso.
3045
3046         Do not show unused inherited CSS variables in the Styles details sidebar.
3047
3048         When aggregating styles for the selected node in `WI.DOMNodeStyles`, collect a list of names of CSS variables used in CSS property values.
3049         In the Styles details sidebar, skip rendering declarations of inherited CSS variables that are not found in this list.
3050
3051         Always show inherited variables that are used, either directly inherited or via reference (variables using other variables in their value).
3052         Always show inherited variables used as values of inheritable properties like color, font-size, etc.
3053
3054         When a CSS rule contains hidden inherited variables, offer a button to request disclosing them for that rule.
3055         Option-click to show unused inherited variables in all matching rules.
3056
3057         Clicking the "Go to variable" button automatically renders all the unused variables in the CSS rule where the target variable is declared.
3058
3059         * Localizations/en.lproj/localizedStrings.js:
3060         * UserInterface/Models/CSSProperty.js:
3061         (WI.CSSProperty.findVariableNames):
3062         * UserInterface/Models/DOMNodeStyles.js:
3063         (WI.DOMNodeStyles):
3064         (WI.DOMNodeStyles.prototype.get usedCSSVariables):
3065         (WI.DOMNodeStyles.prototype._updateStyleCascade):
3066         (WI.DOMNodeStyles.prototype._collectUsedCSSVariables):
3067         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3068         (.spreadsheet-style-declaration-editor .property):
3069         (.spreadsheet-style-declaration-editor > .hidden-variables-button):
3070         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3071         (WI.SpreadsheetCSSStyleDeclarationEditor):
3072         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3073         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get propertiesToRender):
3074         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.highlightProperty):
3075         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3076         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.set propertyVisibilityMode):
3077         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorSetAllPropertyVisibilityMode):
3078         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3079         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionSetAllPropertyVisibilityMode):
3080
3081 2021-06-04  Devin Rousso  <drousso@apple.com>
3082
3083         Web Inspector: cannot see experimental settings when inspecting `ServiceWorker`
3084         https://bugs.webkit.org/show_bug.cgi?id=226666
3085
3086         Reviewed by Joseph Pecoraro.
3087
3088         * UserInterface/Views/SettingsTabContentView.js:
3089         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
3090         There are experimental settings that have nothing to do with preview features or CSS. Don't
3091         limit the Experimental pane to only if those things exist.
3092
3093 2021-06-04  Devin Rousso  <drousso@apple.com>
3094
3095         Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'InspectorBackend.Enum.Page.ResourceType')
3096         https://bugs.webkit.org/show_bug.cgi?id=226664
3097
3098         Reviewed by Joseph Pecoraro.
3099
3100         * UserInterface/Protocol/InspectorBackend.js:
3101         (InspectorBackendClass.prototype.get Enum):
3102         Use the list of all registered domains, not just the active domains, as only commands/events
3103         are able to be filtered by target type.
3104
3105 2021-05-15  Said Abou-Hallawa  <said@apple.com>
3106
3107         Implement CanvasRenderingContext2D.createConicGradient
3108         https://bugs.webkit.org/show_bug.cgi?id=225539
3109
3110         Reviewed by Sam Weinig.
3111
3112         * UserInterface/Models/NativeFunctionParameters.js:
3113         * UserInterface/Models/Recording.js:
3114         (WI.Recording.prototype.async swizzle):
3115         * UserInterface/Views/RecordingActionTreeElement.js:
3116         (WI.RecordingActionTreeElement._classNameForAction):
3117
3118 2021-05-10  Devin Rousso  <drousso@apple.com>
3119
3120         Web Inspector: Network: rename "XHR" to "XHR/Fetch"
3121         https://bugs.webkit.org/show_bug.cgi?id=224900
3122
3123         Reviewed by Timothy Hatcher.
3124
3125         * UserInterface/Views/NetworkTableContentView.js:
3126         (WI.NetworkTableContentView):
3127         (WI.NetworkTableContentView.addScopeBarItem): Added.
3128         (WI.NetworkTableContentView.displayNameForResource):
3129         (WI.NetworkTableContentView.shortDisplayNameForResourceType): Deleted.
3130
3131         * Localizations/en.lproj/localizedStrings.js:
3132
3133 2021-05-10  Nikita Vasilyev  <nvasilyev@apple.com>
3134
3135         Web Inspector: Layout panel "Grid Overlays" main checkbox has dead space (no interaction) between checkbox and label text
3136         https://bugs.webkit.org/show_bug.cgi?id=225433
3137         <rdar://problem/77590883>
3138
3139         Reviewed by Devin Rousso.
3140
3141         Make the empty space between the checkbox and the label text clickable in:
3142         - Everywhere in Settings tab
3143         - Layout panel, Page Overlay Options
3144         - Grid Overlay header
3145
3146         * UserInterface/Main.html:
3147         * UserInterface/Views/CSSGridSection.css:
3148         (.css-grid-section .node-display-name):
3149         (.css-grid-section .toggle-all):
3150         (.css-grid-section :is(.setting-editor, .node-overlay-list-item-container, .heading) input[type="checkbox"]):
3151         (.css-grid-section .setting-editor > input[type="checkbox"]):
3152         (.css-grid-section .node-display-name,): Deleted.
3153         Make all checkbox labels in the Grid section align vertically.
3154
3155         * UserInterface/Views/CSSGridSection.js:
3156         (WI.CSSGridSection.prototype.initialLayout):
3157         * UserInterface/Views/SettingEditor.css: Copied from Source/WebInspectorUI/UserInterface/Views/CSSGridSection.css.
3158         (.setting-editor input):
3159         (.setting-editor > input[type="checkbox"]):
3160         (.setting-editor > label):
3161
3162         * UserInterface/Views/SettingEditor.js:
3163         (WI.SettingEditor):
3164         * UserInterface/Views/SettingsTabContentView.css:
3165         (.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor):
3166         (.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor:first-child > *):
3167         (.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="checkbox"]):
3168         (.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor select):
3169         (.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="number"]):
3170         (.content-view.tab.settings > .settings-view > .container > .editor-group > .setting-editor input[type="text"]):
3171         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor): Deleted.
3172         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor:first-child > *): Deleted.
3173         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input): Deleted.
3174         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="checkbox"]): Deleted.
3175         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor select): Deleted.
3176         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="number"]): Deleted.
3177         (.content-view.tab.settings > .settings-view > .container > .editor-group > .editor input[type="text"]): Deleted.
3178         Rename ".editor" to ".setting-editor" so it matches SettingEditor.css.
3179
3180 2021-05-10  Devin Rousso  <drousso@apple.com>
3181
3182         Web Inspector: add support for panning/zooming on images
3183         https://bugs.webkit.org/show_bug.cgi?id=224655
3184
3185         Reviewed by Timothy Hatcher.
3186
3187         * UserInterface/Controllers/GestureController.js: Added.
3188         (WI.GestureController):
3189         (WI.GestureController.prototype.get scale):
3190         (WI.GestureController.prototype.set scale):
3191         (WI.GestureController.prototype.get translate):
3192         (WI.GestureController.prototype.set translate):
3193         (WI.GestureController.prototype.reset):
3194         (WI.GestureController.prototype._startScaleInteraction):
3195         (WI.GestureController.prototype._updateScaleInteraction):
3196         (WI.GestureController.prototype._endScaleInteraction):
3197         (WI.GestureController.prototype._handleWheel):
3198         (WI.GestureController.prototype._handleGestureStart):
3199         (WI.GestureController.prototype._handleGestureChange):
3200         (WI.GestureController.prototype._handleGestureEnd):
3201         (WI.GestureController.prototype._handleMouseDown):
3202         (WI.GestureController.prototype._handleMouseMove):
3203         (WI.GestureController.prototype._handleMouseUp):
3204         Add a general controller class that takes a `target` (and optionally a `container`) and adds
3205         event listeners to handle various gestures:
3206          - scale (both via trackpad and mouse wheel)
3207          - transform (mouse click and drag)
3208
3209         * UserInterface/Views/ImageResourceContentView.js:
3210         (WI.ImageResourceContentView):
3211         (WI.ImageResourceContentView.prototype.get navigationItems):
3212         (WI.ImageResourceContentView.prototype.contentAvailable):
3213         (WI.ImageResourceContentView.prototype.gestureControllerDidScale): Added.
3214         (WI.ImageResourceContentView.prototype.gestureControllerDidTranslate): Added.
3215         (WI.ImageResourceContentView.prototype._updateResetGestureButtonNavigationItemLabel): Added.
3216         (WI.ImageResourceContentView.prototype._handleResetGestureButtonNavitationItemClicked): Added.
3217         (WI.ImageResourceContentView.prototype._handleZoomOutGestureButtonNavitationItemClicked): Added.
3218         (WI.ImageResourceContentView.prototype._handleZoomInGestureButtonNavitationItemClicked): Added.
3219         * UserInterface/Views/ImageResourceContentView.css:
3220         (.content-view.resource.image > .img-container):
3221         (.navigation-bar > .item.image-gesture-reset): Added.
3222         Add a `WI.GestureController` and manipulate the `scale` and `transform` of the `<img>`.
3223         Add navigation items that show the current scale (clicking it will reset the gesture), zoom
3224         in, and zoom out.
3225
3226         * UserInterface/Views/LocalResourceOverrideLabelView.css:
3227         (.local-resource-override-label-view):
3228         Add a `z-index` so that zoomed images don't appear on top.
3229
3230         * UserInterface/Views/ResourceCollectionContentView.js:
3231         (WI.ResourceCollectionContentView.prototype.get contentViewConstructorOptions):
3232         Don't create the `WI.GestureController` in collection views.
3233
3234         * UserInterface/Main.html:
3235         * UserInterface/Images/ZoomIn.svg: Added.
3236         * UserInterface/Images/ZoomOut.svg: Added.
3237         * Localizations/en.lproj/localizedStrings.js:
3238
3239 2021-05-07  Patrick Angle  <pangle@apple.com>
3240
3241         Web Inspector: Breakpoint action add/remove buttons are not vertically aligned with action dropdown
3242         https://bugs.webkit.org/show_bug.cgi?id=225543
3243
3244         Reviewed by Devin Rousso.
3245
3246         Change the breakpoint action add/remove button's `margin-top` to `margin-block-start`, and adjust the value to
3247         properly vertically center the buttons with the action type menu.
3248
3249         * UserInterface/Views/BreakpointActionView.css:
3250         (:matches(.breakpoint-action-append-button, .breakpoint-action-remove-button)):
3251
3252 2021-05-07  Patrick Angle  <pangle@apple.com>
3253
3254         Web Inspector: Default source for new test cases is minified
3255         https://bugs.webkit.org/show_bug.cgi?id=225546
3256
3257         Reviewed by Devin Rousso.
3258
3259         Move the placeholder test code to `WI.DefaultAudits` as part of the non-minified sources so that new audit test
3260         cases do not have their default placeholder script minified. This also allows us to remove
3261         `WI.AuditTestCase.stringifyFunction` as it is no longer needed.
3262
3263         * UserInterface/Models/AuditTestCase.js:
3264         (WI.AuditTestCase.stringifyFunction): Deleted.
3265         * UserInterface/NonMinified/DefaultAudits.js:
3266         (WI.DefaultAudits.newAuditPlaceholder):
3267         * UserInterface/Views/CreateAuditPopover.js:
3268         (WI.CreateAuditPopover.prototype.dismiss):
3269         (WI.CreateAuditPopover.prototype.dismiss.const.placeholderTestFunction): Deleted.
3270
3271 2021-05-04  Devin Rousso  <drousso@apple.com>
3272
3273         Web Inspector: add assertion for `WI.View` re-entrancy
3274         https://bugs.webkit.org/show_bug.cgi?id=224678
3275
3276         Reviewed by Joseph Pecoraro.
3277
3278         Add `console.assert` (which are removed from production builds) around each critical
3279         `WI.View` subclass member function to prevent reentrancy.
3280          - `initialLayout`
3281          - `sizeDidChange`
3282          - `layout`
3283          - `didLayoutSubtree`
3284         This is important because `WI.View.prototype._layoutSubtree` sets any related state after
3285         calling any of the above (e.g. `_didInitialLayout` after `initialLayout`), meaning that any
3286         checks for the related state (which sometimes control whether the function is called, such
3287         as in the case of `initialLayout`) would think that the function hadn't been called yet. See
3288         r276170 for an example of how this can happen and the potential problems it can cause.
3289
3290         * UserInterface/Views/View.js:
3291         (WI.View.prototype._layoutSubtree):
3292
3293         * UserInterface/Base/Utilities.js:
3294         (WI.setReentrantCheck): Added.
3295         (WI.clearReentrantCheck): Added.
3296
3297 2021-05-04  Razvan Caliman  <rcaliman@apple.com>
3298
3299         Web Inspector: Sources: Inconsistent selection in source tree when grouped by path
3300         https://bugs.webkit.org/show_bug.cgi?id=225317
3301
3302         Reviewed by Devin Rousso.
3303
3304         Ensure origin tree elements for different domains in the Sources Tab behave as folder tree elements
3305         in that they can be individually selected without triggering rendering of any resource.
3306
3307         In essence, restore behavior prior to https://trac.webkit.org/changeset/248912/webkit
3308
3309         The only exception is for document resources. Clicking on the origin tree element associated with a document resource,
3310         triggers rendering of the corresponding document.
3311
3312         * UserInterface/Views/OriginTreeElement.js:
3313         (WI.OriginTreeElement):
3314         * UserInterface/Views/SourcesNavigationSidebarPanel.js:
3315         (WI.SourcesNavigationSidebarPanel.prototype._addResource):
3316
3317 2021-04-28  Razvan Caliman  <rcaliman@apple.com>
3318
3319         Web Inspector: CSS Grid - measure usage of grid overlay options
3320         https://bugs.webkit.org/show_bug.cgi?id=225060
3321         <rdar://75843294>
3322
3323         Reviewed by BJ Burg.
3324
3325         Add telemetry instrumentation to track grid overlay configurations and time spent using them.
3326
3327         * UserInterface/Base/Main.js:
3328         (WI.contentLoaded):
3329         * UserInterface/Controllers/GridOverlayConfigurationDiagnosticEventRecorder.js: Added.
3330         (WI.GridOverlayConfigurationDiagnosticEventRecorder):
3331         (WI.GridOverlayConfigurationDiagnosticEventRecorder.get eventSamplingInterval):
3332         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.setup):
3333         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.teardown):
3334         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayShown):
3335         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleGridOverlayHidden):
3336         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype.handleEvent):
3337         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._startEventSamplingTimer):
3338         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._stopEventSamplingTimer):
3339         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._sampleCurrentOverlayConfiguration):
3340         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._didObserveUserInteraction):
3341         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowFocus):
3342         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowBlur):
3343         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowKeyDown):
3344         (WI.GridOverlayConfigurationDiagnosticEventRecorder.prototype._handleWindowMouseDown):
3345         * UserInterface/Controllers/OverlayManager.js:
3346         (WI.OverlayManager.prototype.hasVisibleGridOverlays):
3347         * UserInterface/Main.html:
3348
3349 2021-04-27  Patrick Angle  <pangle@apple.com>
3350
3351         Web Inspector: Rename "Open in New Tab" context menu item to "Open in New Window"
3352         https://bugs.webkit.org/show_bug.cgi?id=225125
3353
3354         Reviewed by BJ Burg.
3355
3356         Update the context menu item label, as the "Open in..." context menu item opens the target item in a new window,
3357         not a new tab.
3358
3359         * Localizations/en.lproj/localizedStrings.js:
3360         * UserInterface/Views/ContextMenuUtilities.js:
3361         (WI.appendContextMenuItemsForURL):
3362
3363 2021-04-27  Patrick Angle  <pangle@apple.com>
3364
3365         Web Inspector: Default Audits script are minified in release builds
3366         https://bugs.webkit.org/show_bug.cgi?id=225009
3367
3368         Reviewed by BJ Burg.
3369
3370         Covered by new test:
3371         - inspector/audit/non-minified-default-audits.html
3372
3373         The default audits have been moved out of `AuditManager.js` and into a special `DefaultAudits.js` in the new
3374         `NonMinified` directory, which contains JavaScript sources that should be included in `Main.js` and
3375         `TestCombined.js`, but should not have whitespace stripped from their contents because the whitespace is
3376         important to the script. For example, the source for the default audits are visible to the user, and therefore
3377         we want to present well-formatted source in those contexts.
3378
3379         * Scripts/combine-resources.pl:
3380         - Added `NonMinified` directory to list of default `inputDirectoryPattern` exceptions for combining resources.
3381         - Added `--skip-concatenate-tag` so that we don't add tags for script we will eventually append to another script.
3382         * Scripts/copy-user-interface-resources.pl:
3383         - Handle `NonMinified` directory for sources that will be appended to Main.js, but should not be minified.
3384         - Handle `NonMinified` directory for sources that will be appended to TestCombined.js.
3385         (combineOrStripResourcesForWebKitAdditions):
3386         - Drive-by fix for typo in combineOrStripResourcesForWebKitAdditions that caused errors to be emitted during builds.
3387         * UserInterface/Controllers/AuditManager.js:
3388         (WI.AuditManager.prototype._addDefaultTests):
3389         (WI.AuditManager):
3390         (WI.AuditManager.prototype._addDefaultTests.const.levelPass): Deleted.
3391         (WI.AuditManager.prototype._addDefaultTests.const.levelWarn): Deleted.
3392         (WI.AuditManager.prototype._addDefaultTests.const.levelFail): Deleted.
3393         (WI.AuditManager.prototype._addDefaultTests.const.levelError): Deleted.
3394         (WI.AuditManager.prototype._addDefaultTests.const.levelUnsupported): Deleted.
3395         (WI.AuditManager.prototype._addDefaultTests.const.dataDOMNodes): Deleted.
3396         (WI.AuditManager.prototype._addDefaultTests.const.dataDOMAttributes): Deleted.
3397         (WI.AuditManager.prototype._addDefaultTests.const.dataErrors): Deleted.
3398         (WI.AuditManager.prototype._addDefaultTests.const.dataCustom): Deleted.
3399         (WI.AuditManager.prototype._addDefaultTests.const.getElementsByComputedRole): Deleted.
3400         (WI.AuditManager.prototype._addDefaultTests.const.getActiveDescendant): Deleted.
3401         (WI.AuditManager.prototype._addDefaultTests.const.getChildNodes): Deleted.
3402         (WI.AuditManager.prototype._addDefaultTests.const.getComputedProperties): Deleted.
3403         (WI.AuditManager.prototype._addDefaultTests.const.getControlledNodes): Deleted.
3404         (WI.AuditManager.prototype._addDefaultTests.const.getFlowedNodes): Deleted.
3405         (WI.AuditManager.prototype._addDefaultTests.const.getMouseEventNode): Deleted.
3406         (WI.AuditManager.prototype._addDefaultTests.const.getOwnedNodes): Deleted.
3407         (WI.AuditManager.prototype._addDefaultTests.const.getParentNode): Deleted.
3408         (WI.AuditManager.prototype._addDefaultTests.const.getSelectedChildNodes): Deleted.
3409         (WI.AuditManager.prototype._addDefaultTests.const.hasEventListeners): Deleted.
3410         (WI.AuditManager.prototype._addDefaultTests.const.hasEventListenersClick): Deleted.
3411         (WI.AuditManager.prototype._addDefaultTests.const.getResources): Deleted.
3412         (WI.AuditManager.prototype._addDefaultTests.const.getResourceContent): Deleted.
3413         (WI.AuditManager.prototype._addDefaultTests.const.unsupported): Deleted.
3414         (WI.AuditManager.prototype._addDefaultTests.hasChildWithRole): Deleted.
3415         (WI.AuditManager.prototype._addDefaultTests.const.testMenuRoleForRequiredChildren): Deleted.
3416         (WI.AuditManager.prototype._addDefaultTests.const.testGridRoleForRequiredChildren): Deleted.
3417         (WI.AuditManager.prototype._addDefaultTests.const.testForAriaLabelledBySpelling): Deleted.
3418         (WI.AuditManager.prototype._addDefaultTests.const.testForMultipleBanners): Deleted.
3419         (WI.AuditManager.prototype._addDefaultTests.const.testForLinkLabels): Deleted.
3420         (WI.AuditManager.prototype._addDefaultTests.const.testRowGroupRoleForRequiredChildren): Deleted.
3421         (WI.AuditManager.prototype._addDefaultTests.const.testTableRoleForRequiredChildren): Deleted.
3422         (WI.AuditManager.prototype._addDefaultTests.const.testForMultipleLiveRegions): Deleted.
3423         (WI.AuditManager.prototype._addDefaultTests.const.testListBoxRoleForRequiredChildren): Deleted.
3424         (WI.AuditManager.prototype._addDefaultTests.const.testImageLabels): Deleted.
3425         (WI.AuditManager.prototype._addDefaultTests.const.testForAriaHiddenFalse): Deleted.
3426         (WI.AuditManager.prototype._addDefaultTests.const.testTreeRoleForRequiredChildren): Deleted.
3427         (WI.AuditManager.prototype._addDefaultTests.const.testRadioGroupRoleForRequiredChildren): Deleted.
3428         (WI.AuditManager.prototype._addDefaultTests.const.testFeedRoleForRequiredChildren): Deleted.
3429         (WI.AuditManager.prototype._addDefaultTests.const.testTabListRoleForRequiredChildren): Deleted.
3430         (WI.AuditManager.prototype._addDefaultTests.const.testButtonLabels): Deleted.
3431         (WI.AuditManager.prototype._addDefaultTests.const.testRowRoleForRequiredChildren): Deleted.
3432         (WI.AuditManager.prototype._addDefaultTests.const.testListRoleForRequiredChildren): Deleted.
3433         (WI.AuditManager.prototype._addDefaultTests.const.testComboBoxRoleForRequiredChildren): Deleted.
3434         (WI.AuditManager.prototype._addDefaultTests.const.testForMultipleMainContentSections): Deleted.
3435         (WI.AuditManager.prototype._addDefaultTests.const.testDialogsForLabels): Deleted.
3436         (WI.AuditManager.prototype._addDefaultTests.const.testForInvalidAriaHiddenValue): Deleted.
3437         (WI.AuditManager.prototype._addDefaultTests.removeWhitespace): Deleted.
3438         * UserInterface/Main.html:
3439         * UserInterface/NonMinified/DefaultAudits.js: Added.
3440         (WI.DefaultAudits.levelPass):
3441         (WI.DefaultAudits.levelWarn):
3442         (WI.DefaultAudits.levelFail):
3443         (WI.DefaultAudits.levelError):
3444         (WI.DefaultAudits.levelUnsupported):
3445         (WI.DefaultAudits.dataDOMNodes):
3446         (WI.DefaultAudits.dataDOMAttributes):
3447         (WI.DefaultAudits.dataErrors):
3448         (WI.DefaultAudits.dataCustom):
3449         (WI.DefaultAudits.getElementsByComputedRole):
3450         (WI.DefaultAudits.getActiveDescendant):
3451         (WI.DefaultAudits.getChildNodes):
3452         (WI.DefaultAudits.getComputedProperties):
3453         (WI.DefaultAudits.getControlledNodes):
3454         (WI.DefaultAudits.getFlowedNodes):
3455         (WI.DefaultAudits.getMouseEventNode):
3456         (WI.DefaultAudits.getOwnedNodes):
3457         (WI.DefaultAudits.getParentNode):
3458         (WI.DefaultAudits.getSelectedChildNodes):
3459         (WI.DefaultAudits.hasEventListeners):
3460         (WI.DefaultAudits.hasEventListenersClick):
3461         (WI.DefaultAudits.getResources):
3462         (WI.DefaultAudits.getResourceContent):
3463         (WI.DefaultAudits.unsupported):
3464         (hasChildWithRole):
3465         (WI.DefaultAudits.testMenuRoleForRequiredChildren):
3466         (WI.DefaultAudits.testGridRoleForRequiredChildren):
3467         (WI.DefaultAudits.testForAriaLabelledBySpelling):
3468         (WI.DefaultAudits.testForMultipleBanners):
3469         (WI.DefaultAudits.testForLinkLabels):
3470         (WI.DefaultAudits.testRowGroupRoleForRequiredChildren):
3471         (WI.DefaultAudits.testTableRoleForRequiredChildren):
3472         (WI.DefaultAudits.testForMultipleLiveRegions):
3473         (WI.DefaultAudits.testListBoxRoleForRequiredChildren):
3474         (WI.DefaultAudits.testImageLabels):
3475         (WI.DefaultAudits.testForAriaHiddenFalse):
3476         (WI.DefaultAudits.testTreeRoleForRequiredChildren):
3477         (WI.DefaultAudits.testRadioGroupRoleForRequiredChildren):
3478         (WI.DefaultAudits.testFeedRoleForRequiredChildren):
3479         (WI.DefaultAudits.testTabListRoleForRequiredChildren):
3480         (WI.DefaultAudits.testButtonLabels):
3481         (WI.DefaultAudits.testRowRoleForRequiredChildren):
3482         (WI.DefaultAudits.testListRoleForRequiredChildren):
3483         (WI.DefaultAudits.testComboBoxRoleForRequiredChildren):
3484         (WI.DefaultAudits.testForMultipleMainContentSections):
3485         (WI.DefaultAudits.testDialogsForLabels):
3486         (WI.DefaultAudits.testForInvalidAriaHiddenValue):
3487         * UserInterface/Test.html:
3488
3489 2021-04-27  Don Olmstead  <don.olmstead@sony.com>
3490
3491         [CMake] Don't use FORWARDING_HEADERS_DIR for GTK WebKit headers
3492         https://bugs.webkit.org/show_bug.cgi?id=225006
3493
3494         Reviewed by Michael Catanzaro.
3495
3496         Use WebKit2Gtk_FRAMEWORK_HEADERS_DIR and WebKit2Gtk_DERIVED_SOURCES_DIR for WebKit2 GTK
3497         headers instead of FORWARDING_HEADERS_DIR and DERIVED_SOURCES_DIR.
3498
3499         * PlatformGTK.cmake:
3500
3501 2021-04-26  Nikita Vasilyev  <nvasilyev@apple.com>
3502
3503         Web Inspector: Audit Tab: Edits are not committed when leaving edit mode unless you first click into another text field
3504         https://bugs.webkit.org/show_bug.cgi?id=224318
3505         <rdar://problem/76382755>
3506
3507         Reviewed by Devin Rousso.
3508
3509         Save test and setup code when pressing "Done" button. Don't rely on the blur event because it doesn't fire on
3510         the focused element when it's removed from the DOM.
3511
3512         * UserInterface/Models/AuditTestBase.js:
3513         (WI.AuditTestBase.prototype.set setup):
3514         * UserInterface/Models/AuditTestCase.js:
3515         (WI.AuditTestCase.prototype.set test):
3516         Allow setting `test` and `setup` after editing is finished.
3517
3518         * UserInterface/Views/AuditTestCaseContentView.js:
3519         (WI.AuditTestCaseContentView.prototype.layout):
3520         (WI.AuditTestCaseContentView.prototype.saveEditedData):
3521         * UserInterface/Views/AuditTestContentView.js:
3522         (WI.AuditTestContentView.prototype.detached):
3523         Saving test on `detached` saves it when selecting a different test in the navigation sidebar.
3524
3525         (WI.AuditTestContentView.prototype.saveEditedData):
3526         (WI.AuditTestContentView.prototype._createSetupEditor):
3527         (WI.AuditTestContentView.prototype._handleEditingChanged):
3528         (WI.AuditTestContentView):
3529
3530 2021-04-26  Devin Rousso  <drousso@apple.com>
3531
3532         Web Inspector: Audit: Uncaught Exception: Failed to execute 'delete' on 'IDBObjectStore': The parameter is not a valid key range.
3533         https://bugs.webkit.org/show_bug.cgi?id=224993
3534
3535         Reviewed by BJ Burg.
3536
3537         * UserInterface/Controllers/AuditManager.js:
3538         (WI.AuditManager.prototype.async processJSON):
3539         (WI.AuditManager.prototype.async addTest):
3540         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3541         (WI.AuditNavigationSidebarPanel.prototype.willDismissPopover):
3542         * UserInterface/Views/AuditTreeElement.js:
3543         (WI.AuditTreeElement.prototype.populateContextMenu):
3544         Make sure to save any newly created audits not already in `WI.objectStores.audits` immediately
3545         so that if the developer tries to delete it before exiting Edit mode (which is normally when
3546         everything is saved) an exception isn't thrown about it not being in `WI.objectStores.audits`.
3547
3548 2021-04-26  Razvan Caliman  <rcaliman@apple.com>
3549
3550         Web Inspector: REGRESSION(r270134) Elements Tab: Details Sidebar toggle is unexpectedly disabled  after switching from Timelines tab
3551         https://bugs.webkit.org/show_bug.cgi?id=224772
3552         <rdar://73470211>
3553
3554         Reviewed by Devin Rousso.
3555
3556         Ensure the logic for identifying and showing the represented object for the selected `DOMNode`
3557         is not run unless the Elements Tab is visible. This guards agains the partial setting of state
3558         when the Elements Tab is not the default tab while opening Web Inspector.
3559
3560         * UserInterface/Views/ElementsTabContentView.js:
3561         (WI.ElementsTabContentView):
3562         (WI.ElementsTabContentView.prototype.showRepresentedObject):
3563         (WI.ElementsTabContentView.prototype.attached):
3564         (WI.ElementsTabContentView.prototype.detached):
3565         (WI.ElementsTabContentView.prototype._showDOMTreeContentViewIfNeeded):
3566         (WI.ElementsTabContentView.prototype._mainFrameDidChange):
3567         (WI.ElementsTabContentView.prototype._mainResourceDidChange):
3568
3569 2021-04-25  Devin Rousso  <drousso@apple.com>
3570
3571         Web Inspector: Audit: REGRESSION(?): creating a new test in Edit mode causes the Results folder to appear
3572         https://bugs.webkit.org/show_bug.cgi?id=224994
3573
3574         Reviewed by Darin Adler.
3575
3576         * UserInterface/Views/AuditNavigationSidebarPanel.js:
3577         (WI.AuditNavigationSidebarPanel.prototype._addTest):
3578
3579 2021-04-22  BJ Burg  <bburg@apple.com>
3580
3581         [Cocoa] re-enable test case WKInspectorDelegate.InspectorConfiguration
3582         https://bugs.webkit.org/show_bug.cgi?id=224577
3583         <rdar://70505272>
3584
3585         Reviewed by Devin Rousso.
3586
3587         Adjust the CSP directive list in the <meta> tag to allow for customization
3588         by WebKit ports. 
3589
3590         * UserInterface/Main.html:
3591         - Remove `default-src 'self'` so as not to block custom scheme loads.
3592         - Remove `connect-src * ws:` so as not to block custom scheme loads.
3593         - Add `object-src 'none'` as we have no reason to allow <object>, <embed>, or <applet>.
3594
3595 2021-04-20  Razvan Caliman  <rcaliman@apple.com>
3596
3597         Web Inspector: Tree Outlines: `ondetach` can be called without `onattach` ever being called
3598         https://bugs.webkit.org/show_bug.cgi?id=224652
3599         <rdar://problem/76746385>
3600
3601         Reviewed by Devin Rousso.
3602
3603         Ensure `TreeElement.ondetach()` cannot be called if the conditions
3604         for previously calling `TreeElement.onattach()` have not been met.
3605
3606         * UserInterface/Views/TreeElement.js:
3607         (WI.TreeElement.prototype._detach):
3608
3609 2021-04-19  Patrick Angle  <pangle@apple.com>
3610
3611         REGRESSION (r268691 && r270134): Web Inspector: Clicking on go-to arrow in Computed panel no longer works
3612         https://bugs.webkit.org/show_bug.cgi?id=224774
3613
3614         Reviewed by Devin Rousso.
3615
3616         The Styles panel will not always be part of the same sidebar as the Computed panel as of r268691, so we should
3617         look for the Styles panel in WI.detailsSidebar, which will report all of the panels it manages across multiple
3618         sidebars. Additionally, as of r270134, there is no longer a private `_visible` property for
3619         `WI.StyleDetailsPanel`, so it can not be used by `WI.SpreadsheetRulesStyleDetailsPanel`. Instead, visibility
3620         should be determined by checking if the panel is attached and not pending layout.
3621
3622         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
3623         (WI.ComputedStyleDetailsSidebarPanel.prototype.computedStyleDetailsPanelShowProperty):
3624         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3625         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.scrollToSectionAndHighlightProperty):
3626
3627 2021-04-19  Devin Rousso  <drousso@apple.com>
3628
3629         Web Inspector: Graphics: add support for `steps()`/`spring()` CSS timing functions
3630         https://bugs.webkit.org/show_bug.cgi?id=224654
3631
3632         Reviewed by BJ Burg.
3633
3634         * UserInterface/Models/Geometry.js:
3635         (WI.StepsFunction): Added.
3636         (WI.StepsFunction.fromString): Added.
3637         (WI.StepsFunction.prototype.get type): Added.
3638         (WI.StepsFunction.prototype.get count): Added.
3639         (WI.StepsFunction.prototype.copy): Added.
3640         (WI.StepsFunction.prototype.toString): Added.
3641         Create a model object for `steps()` CSS timing function.
3642
3643         * UserInterface/Models/Animation.js:
3644         (WI.Animation.prototype._updateEffect):
3645         Also support `effect.timingFunction`/`keyframe.easing` being a `steps()`/`spring()` CSS timing function.
3646
3647         * UserInterface/Views/AnimationContentView.js:
3648         (WI.AnimationContentView.prototype._refreshPreview):
3649         Create a UI for `steps()`/`spring()` CSS timing functions.
3650
3651 2021-04-19  Devin Rousso  <drousso@apple.com>
3652
3653         Web Inspector: REGRESSION(?): Network: Request (Object Tree) is sometimes empty
3654         https://bugs.webkit.org/show_bug.cgi?id=224768
3655         <rdar://problem/76783636>
3656
3657         Reviewed by BJ Burg.
3658
3659         * UserInterface/Views/LocalJSONContentView.js:
3660         (WI.LocalJSONContentView.prototype.renderRemoteObject):
3661         If the `WI.RemoteObject` is simple enough to be rendered inline, `WI.ObjectTreeView` won't
3662         show a `WI.TreeOutline` by default. We have to tell it to use a `WI.TreeOutline` by passing
3663         `forceExpanding = true` into the constructor.
3664
3665         * UserInterface/Views/ObjectTreeView.js:
3666         (WI.ObjectTreeView.prototype.showOnlyJSON):
3667         Add some `console.assert` to help prevent this from happening again.
3668
3669 2021-04-19  Kimmo Kinnunen  <kkinnunen@apple.com>
3670
3671         Enable -Wthread-safety, add attributes to custom lock classes, and provide macros to declare guards
3672         https://bugs.webkit.org/show_bug.cgi?id=221614
3673         <rdar://problem/74396781>
3674
3675         Reviewed by David Kilzer.
3676
3677         Add -Wthread-safety to compile flags.
3678
3679         * Configurations/Base.xcconfig:
3680
3681 2021-04-16  Devin Rousso  <drousso@apple.com>
3682
3683         Web Inspector: REGRESSION(?): Graphics: dropping a recording leaves behind a drop zone view
3684         https://bugs.webkit.org/show_bug.cgi?id=224648
3685
3686         Reviewed by BJ Burg.
3687
3688         * UserInterface/Views/GraphicsTabContentView.js:
3689         (WI.GraphicsTabContentView.prototype.initialLayout):
3690         It appears that it's possible for re-entrancy issues in the `WI.View` system since the
3691         `_didInitialLayout` flag isn't set until _after_ `initialLayout` returns, meaning that if
3692         the logic inside `initialLayout` triggers a synchronous `layout` then that second `layout`
3693         won't know that it's already in the middle of an `initialLayout`. In this case, showing the
3694         `WI.GraphicsOverviewContentView` causes the navigation sidebar to be shown, which forces a
3695         synchronous `layout` from handling `WI.Sidebar.Event.WidthDidChange`. For now, there's no
3696         "rush" to show the `WI.GraphicsOverviewContentView` so we delay it by one event loop turn.
3697
3698         * UserInterface/Views/CanvasContentView.js:
3699         (WI.CanvasContentView.prototype.initialLayout):
3700         (WI.CanvasContentView.prototype.dropZoneShouldAppearForDragEvent): Deleted.
3701         (WI.CanvasContentView.prototype.dropZoneHandleDrop): Deleted.
3702         There's no reason to have another `WI.DropZoneView` here since there's already one that
3703         covers the entire tab.
3704
3705 2021-04-16  Devin Rousso  <drousso@apple.com>
3706
3707         Web Inspector: Uncaught Exception: null is not an object (evaluating 'this._listeners.get')
3708         https://bugs.webkit.org/show_bug.cgi?id=224651
3709
3710         Reviewed by BJ Burg.
3711
3712         * UserInterface/Base/Object.js:
3713         (WI.Object.removeEventListener):
3714         Add early-return checks just in case `_listeners` or `listenersForEventType` is falsy. While
3715         ideally it would be the case that these would never be falsy, the logic of Web Inspector is
3716         complex and far reaching, so better safe than sorry.
3717
3718         * UserInterface/Views/TreeElement.js:
3719         (WI.TreeElement.prototype._detach):
3720         * UserInterface/Views/AuditTreeElement.js:
3721         (WI.AuditTreeElement.prototype.ondetach):
3722         * UserInterface/Views/BootstrapScriptTreeElement.js:
3723         (WI.BootstrapScriptTreeElement.prototype.ondetach):
3724         * UserInterface/Views/BreakpointTreeElement.js:
3725         (WI.BreakpointTreeElement.prototype.ondetach):
3726         * UserInterface/Views/DOMTreeElement.js:
3727         (WI.DOMTreeElement.prototype.ondetach):
3728         * UserInterface/Views/FrameTreeElement.js:
3729         (WI.FrameTreeElement.prototype.ondetach):
3730         * UserInterface/Views/JavaScriptBreakpointTreeElement.js:
3731         (WI.JavaScriptBreakpointTreeElement.prototype.ondetach):
3732         * UserInterface/Views/LocalResourceOverrideTreeElement.js:
3733         (WI.LocalResourceOverrideTreeElement.prototype.ondetach):
3734         * UserInterface/Views/ShaderProgramTreeElement.js:
3735         (WI.ShaderProgramTreeElement.prototype.ondetach):
3736         * UserInterface/Views/WebSocketResourceTreeElement.js:
3737         (WI.WebSocketResourceTreeElement.prototype.ondetach):
3738         Add FIXME comments warning of this issue so that future changes can take it into account.
3739         <https://webkit.org/b/224652> (Web Inspector: Tree Outlines: `ondetach` can be called without `onattach` ever being called)
3740
3741 2021-04-16  Devin Rousso  <drousso@apple.com>
3742
3743         Web Inspector: Sources: don't show the create local override contextmenu if the navigation item is disabled
3744         https://bugs.webkit.org/show_bug.cgi?id=224647
3745
3746         Reviewed by BJ Burg.
3747
3748         * UserInterface/Views/ResourceContentView.js:
3749         (WI.ResourceContentView.prototype._populateCreateLocalResourceOverrideContextMenu):
3750
3751 2021-04-13  BJ Burg  <bburg@apple.com>
3752
3753         Web Inspector: add setting to allow inspecting Web Inspector
3754         https://bugs.webkit.org/show_bug.cgi?id=224082
3755         <rdar://75695002>
3756
3757         Reviewed by Devin Rousso.
3758
3759         Instead of telling curious users to set the WebKitDeveloperExtras default,
3760         expose an experimental setting that does the same thing.
3761
3762         * UserInterface/Base/Main.js:
3763         (WI.loaded):
3764         * UserInterface/Base/Setting.js:
3765         * UserInterface/Views/SettingsTabContentView.js:
3766
3767 2021-04-06  BJ Burg  <bburg@apple.com>
3768
3769         Web Inspector: remove duplicate Box Model section from Layout panel in Elements Tab
3770         https://bugs.webkit.org/show_bug.cgi?id=224206
3771         <rdar://problem/76235731>
3772
3773         Reviewed by Devin Rousso.
3774
3775         For now, remove it from Layout panel. It may go back there
3776         when it is able to show used values. It currently only shows computed.
3777
3778         * UserInterface/Views/LayoutDetailsSidebarPanel.js:
3779         (WI.LayoutDetailsSidebarPanel.prototype.initialLayout):
3780         (WI.LayoutDetailsSidebarPanel.prototype.layout):
3781         (WI.LayoutDetailsSidebarPanel.prototype.get minimumWidth): Deleted.
3782
3783 2021-04-06  Razvan Caliman  <rcaliman@apple.com>
3784
3785         Web Inspector: Layout sidebar grid overlay color swatch tooltip shouldn't include "switch format" hint
3786         https://bugs.webkit.org/show_bug.cgi?id=223418
3787         <rdar://problem/75825793>
3788
3789         Reviewed by BJ Burg.
3790
3791         * UserInterface/Views/CSSGridSection.js:
3792         (WI.CSSGridSection.prototype.layout):
3793         * UserInterface/Views/InlineSwatch.js:
3794         (WI.InlineSwatch):
3795         (WI.InlineSwatch.prototype.set shiftClickColorEnabled):
3796         (WI.InlineSwatch.prototype._updateSwatch):
3797         (WI.InlineSwatch.prototype._allowChangingColorFormats):
3798
3799 2021-03-31  Patrick Angle  <pangle@apple.com>
3800
3801         Web Inspector: Regression (r270134) Timeline recordings 2 and beyond do not show a timescale.
3802         https://bugs.webkit.org/show_bug.cgi?id=222930
3803
3804         Reviewed by Devin Rousso.
3805
3806         When a new `TimelineOverview` is created, it calls `TimelineOverview.prototype._viewModeDidChange` inside the
3807         constructor, which in turn called `updateLayout`. This was problematic in that a `TimelineRuler` would have
3808         `sizeDidChange` invoked before it was attached to the DOM, which meant that there was no width to cache. Because
3809         `sizeDidChange` is only invoked during the first layout and on resize events, the cached width is not updated
3810         when the ruler is attached to the view hierarchy, having already performed an early initial layout.
3811
3812         This patch now checks if the `TimelineOverview` has performed its initial layout before updating the layout
3813         inside `_viewModeDidChange`, which means that the initial layout on the child `TimelineRuler` will be done while
3814         attached, thus producing a valid width value to cache.
3815
3816         * UserInterface/Views/TimelineOverview.js:
3817         (WI.TimelineRuler.prototype._viewModeDidChange):
3818
3819 2021-03-31  Nikita Vasilyev  <nvasilyev@apple.com>
3820
3821         Web Inspector: Autocomplete experimental CSS Color values (hwb, lch, lab, color-mix, color-contrast)
3822         https://bugs.webkit.org/show_bug.cgi?id=224010
3823         <rdar://problem/76065217>
3824
3825         Reviewed by BJ Burg.
3826
3827         * UserInterface/Models/CSSKeywordCompletions.js:
3828
3829 2021-03-28  Sam Weinig  <weinig@apple.com>
3830
3831         Remove ENABLE_INDEXED_DATABASE & ENABLE_INDEXED_DATABASE_IN_WORKERS, it seems like it is on for all ports
3832         https://bugs.webkit.org/show_bug.cgi?id=223810
3833
3834         Reviewed by Simon Fraser.
3835
3836         * Versions/Inspector-iOS-14.0.json:
3837         * Versions/Inspector-iOS-14.5.json:
3838         Update for removed ENABLE_INDEXED_DATABASE conditional.
3839
3840 2021-03-26  Jessie Berlin  <jberlin@webkit.org>
3841
3842         Update the BEFORE/SINCE, SYSTEM_VERSION_PREFIX, and MACOSX_DEPLOYMENT_TARGET flags
3843         https://bugs.webkit.org/show_bug.cgi?id=223779
3844
3845         Reviewed by Tim Horton.
3846
3847         * Configurations/DebugRelease.xcconfig:
3848         * Configurations/Version.xcconfig:
3849
3850 2021-03-25  Jessie Berlin  <jberlin@webkit.org>
3851
3852         Remove 10.13 DEPLOYMENT_TARGETs and SYSTEM_VERSION_PREFIXs
3853         https://bugs.webkit.org/show_bug.cgi?id=223765
3854
3855         Reviewed by Tim Horton.
3856
3857         * Configurations/Base.xcconfig:
3858         * Configurations/DebugRelease.xcconfig:
3859         * Configurations/Version.xcconfig:
3860
3861 2021-03-25  Razvan Caliman  <rcaliman@apple.com>
3862
3863         REGRESSION (r270134) Web Inspector: Audit: Results are stacked on top of each other.
3864         https://bugs.webkit.org/show_bug.cgi?id=223381
3865         <rdar://problem/75528374>
3866
3867         Reviewed by Devin Rousso.
3868
3869         Ensure pre-existing `ContentView`s are removed when navigating back/forward
3870         even when the incoming `ContentView` is already attached.
3871
3872         For example, `AuditTestContentView` instances for individual tests are already attached
3873         when shown as part of a test group `AuditTestGroupContentView`.
3874         Navigating from the group to the individual test view must remove the group view.
3875
3876         * UserInterface/Views/ContentViewContainer.js:
3877         (WI.ContentViewContainer.prototype.showBackForwardEntryForIndex):
3878
3879 2021-03-24  Razvan Caliman  <rcaliman@apple.com>
3880
3881         Web Inspector: REGRESSION (r269359): Timelines: TypeError: this.deselect is not a function
3882         https://bugs.webkit.org/show_bug.cgi?id=223698
3883         <rdar://problem/75790983>
3884
3885         Reviewed by BJ Burg.
3886
3887         Ensure individual timeline views can be closed to return to the Timelines overview.
3888
3889         * UserInterface/Views/TimelineTreeElement.js:
3890         (WI.TimelineTreeElement.prototype._showCloseButton):
3891
3892 2021-03-19  BJ Burg  <bburg@apple.com>
3893
3894         Uncaught Exception: RangeError: Array size is not a small enough positive integer.
3895         https://bugs.webkit.org/show_bug.cgi?id=223532
3896         <rdar://problem/75635080>
3897
3898         Reviewed by Devin Rousso.
3899
3900         This patch fixes the broken CPU instrument when viewing a JSON timeline recordng.
3901
3902         This exception is thrown when viewing a timeline recording that has been
3903         imported from JSON file. Aside from the exception, the code is functionally
3904         broken in this situation since passing a negative number to Array() doesn't work.
3905
3906         I tested this change manually and selection ranges now behave as expected, and
3907         have not regressed in other instruments / UI.
3908
3909         * UserInterface/Views/CPUTimelineView.js:
3910         Based on my investigation, the visibleEndTime is incorrectly computed when
3911         showing a JSON timeline recording because the currentTime property is always '0'.
3912         If this is the case, then let's assume that the entire range should be displayed.
3913
3914 == Rolled over to ChangeLog-2021-03-18 ==