03e178312a353f0c526fc249c7e3b97f30828f16
[WebKit-https.git] / Source / WebInspectorUI / ChangeLog
1 2018-08-15  Aditya Keerthi  <akeerthi@apple.com>
2
3         [Datalist] Add button to TextFieldInputs with a datalist
4         https://bugs.webkit.org/show_bug.cgi?id=187741
5
6         Reviewed by Tim Horton.
7
8         Add keyword completion for 'list-button'.
9
10         * UserInterface/External/CodeMirror/css.js:
11         * UserInterface/Models/CSSKeywordCompletions.js:
12
13 2018-08-15  Devin Rousso  <drousso@apple.com>
14
15         Web Inspector: REGRESSION(r?): the probe sidebar doesn't show up when adding probes
16         https://bugs.webkit.org/show_bug.cgi?id=188594
17
18         Reviewed by Brian Burg.
19
20         * UserInterface/Views/ProbeDetailsSidebarPanel.js:
21         (WI.ProbeDetailsSidebarPanel.prototype.set inspectedProbeSets):
22         (WI.ProbeDetailsSidebarPanel.prototype.initialLayout):
23         Add checks to ensure that DOM elements for each probe section exist before trying to
24         add/remove them from the sidebar. This can happen if probes are inspected before the sidebar
25         is shown for the first time.
26
27         * UserInterface/Views/ProbeSetDataGrid.js:
28         (WI.ProbeSetDataGrid):
29         (WI.ProbeSetDataGrid.columnIdentifierForProbe): Added.
30         (WI.ProbeSetDataGrid.prototype._setupProbe):
31         (WI.ProbeSetDataGrid.prototype._teardownProbe):
32         (WI.ProbeSetDataGrid.prototype._probeExpressionChanged):
33         * UserInterface/Views/ProbeSetDataGridNode.js:
34         (WI.ProbeSetDataGridNode.prototype.set frame):
35         Provide better column identifiers for each probe's `WI.DataGrid`. It's possible for the
36         numeric probe ID value to be stringified when passing it into the constructor of
37         `WI.DataGrid`, which will not match the original numeric value on later retrieval.
38
39 2018-08-14  Matt Baker  <mattbaker@apple.com>
40
41         Web Inspector: Table should not center rows when scrolling them into view
42         https://bugs.webkit.org/show_bug.cgi?id=188593
43         <rdar://problem/43311660>
44
45         Reviewed by Devin Rousso.
46
47         * UserInterface/Views/Table.js:
48         (WI.Table.prototype._handleKeyDown):
49
50 2018-08-13  Matt Baker  <mattbaker@apple.com>
51
52         Web Inspector: Table should handle row selection instead of the table delegate
53         https://bugs.webkit.org/show_bug.cgi?id=188534
54         <rdar://problem/43253335>
55
56         Reviewed by Joseph Pecoraro.
57
58         Row selection should be implemented by Table, rather than its delegate.
59
60         * UserInterface/Views/NetworkTableContentView.js:
61         (WI.NetworkTableContentView.prototype.tableShouldSelectRow):
62         (WI.NetworkTableContentView.prototype.tableCellMouseDown): Deleted.
63         Prevent selection unless the clicked cell belongs to the name column.
64
65         * UserInterface/Views/ResourceCookiesContentView.js:
66         (WI.ResourceCookiesContentView.prototype.tableShouldSelectRow):
67         Always prevent selection.
68
69         * UserInterface/Views/Table.js:
70         (WI.Table):
71         (WI.Table.prototype._handleMouseDown):
72
73 2018-08-12  Aditya Keerthi  <akeerthi@apple.com>
74
75         [macOS] Color wells should appear pressed when presenting a color picker
76         https://bugs.webkit.org/show_bug.cgi?id=188477
77
78         Reviewed by Tim Horton.
79
80         Add keyword completion for 'color-well'.
81
82         * UserInterface/External/CodeMirror/css.js:
83         * UserInterface/Models/CSSKeywordCompletions.js:
84
85 2018-08-09  Nikita Vasilyev  <nvasilyev@apple.com>
86
87         Web Inspector: Dark Mode: SourceCodeTextEditor error/warning text widget is too light
88         https://bugs.webkit.org/show_bug.cgi?id=188126
89         <rdar://problem/42674963>
90
91         Reviewed by Matt Baker.
92
93         * UserInterface/Views/DarkMode.css:
94         (@media (prefers-dark-interface)):
95         (.source-code.text-editor > .CodeMirror .issue-widget.warning,): Added.
96         (.source-code.text-editor > .CodeMirror .issue-widget.error,): Added.
97
98 2018-08-07  Joseph Pecoraro  <pecoraro@apple.com>
99
100         Web Inspector: Add another Protocol Version (iOS 12)
101         https://bugs.webkit.org/show_bug.cgi?id=188359
102         <rdar://problem/42981364>
103
104         Reviewed by Brian Burg.
105
106         * UserInterface/Protocol/Legacy/12.0/InspectorBackendCommands.js: Added.
107         * Versions/Inspector-iOS-12.0.json: Added.
108
109 2018-08-06  Joseph Pecoraro  <pecoraro@apple.com>
110
111         Web Inspector: Global search sometimes returns duplicate results for a resource
112         https://bugs.webkit.org/show_bug.cgi?id=188270
113         <rdar://problem/42867498>
114
115         Reviewed by Brian Burg.
116
117         * UserInterface/Views/SearchSidebarPanel.js:
118         (WI.SearchSidebarPanel.prototype.performSearch.resourcesCallback):
119         Avoid duplicate search results in the frontend. We should also fix the backend
120         but a frontend fix will also be desired for backends that have the issue.
121
122 2018-08-03  Alex Christensen  <achristensen@webkit.org>
123
124         Fix spelling of "overridden"
125         https://bugs.webkit.org/show_bug.cgi?id=188315
126
127         Reviewed by Darin Adler.
128
129         * UserInterface/Views/ContentBrowserTabContentView.js:
130         (WI.ContentBrowserTabContentView.prototype.treeElementForRepresentedObject):
131         * UserInterface/Views/GeneralTreeElement.js:
132         (WI.GeneralTreeElement.prototype.ondetach):
133         * UserInterface/Views/NavigationBar.js:
134         (WI.NavigationBar.prototype.get sizesToFit):
135         * UserInterface/Views/NavigationSidebarPanel.js:
136         (WI.NavigationSidebarPanel.prototype.shouldFilterPopulate):
137         * UserInterface/Views/TextEditor.js:
138         (WI.TextEditor.prototype.canBeFormatted):
139         * UserInterface/Views/TreeElement.js:
140         (WI.TreeElement.prototype.onpopulate):
141
142 2018-08-01  Nikita Vasilyev  <nvasilyev@apple.com>
143
144         Web Inspector: Dark Mode: SourceCodeTextEditor thread indicator widget is too light
145         https://bugs.webkit.org/show_bug.cgi?id=188119
146         <rdar://problem/42670811>
147
148         Reviewed by Matt Baker.
149
150         Make the background of the thread indicator widget darker.
151
152         Reduce the number of HTML elements and simplify CSS by removing the HTML element that drew an arrow and using clip-path on inline widgets instead.
153
154         * UserInterface/Views/DarkMode.css:
155         (@media (prefers-dark-interface)):
156         (.text-editor > .CodeMirror .execution-line):
157         (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext),):
158         * UserInterface/Views/SourceCodeTextEditor.css:
159         (.source-code.text-editor .CodeMirror-linewidget):
160         (.source-code.text-editor > .CodeMirror .line-indicator-widget.inline):
161         (@media (prefers-dark-interface)):
162         (.source-code.text-editor > .CodeMirror .thread-widget.inline):
163         * UserInterface/Views/SourceCodeTextEditor.js:
164         (WI.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
165         (WI.SourceCodeTextEditor.prototype._updateIssueWidgetForIssues):
166         * UserInterface/Views/TextEditor.css:
167         (@media (prefers-dark-interface)):
168         (.text-editor > .CodeMirror .execution-line.primary .CodeMirror-linenumber::after):
169         * UserInterface/Views/Variables.css:
170         (:root):
171
172 2018-08-01  Nikita Vasilyev  <nvasilyev@apple.com>
173
174         Web Inspector: Dark Mode: disabled breakpoints banner is too light
175         https://bugs.webkit.org/show_bug.cgi?id=188120
176         <rdar://problem/42671348>
177
178         Reviewed by Matt Baker.
179
180         * UserInterface/Views/DebuggerSidebarPanel.css:
181         (@media (prefers-dark-interface)):
182         (.sidebar > .panel.navigation.debugger .warning-banner):
183
184 2018-07-31  Joseph Pecoraro  <pecoraro@apple.com>
185
186         Web Inspector: Include a full URL tooltip when hovering the name in the Network Tab
187         https://bugs.webkit.org/show_bug.cgi?id=188199
188
189         Reviewed by Matt Baker.
190
191         * UserInterface/Views/NetworkTableContentView.js:
192         (WI.NetworkTableContentView.prototype._populateNameCell):
193         Give a tooltip to the entire cell since the entire cell has interactivity.
194
195 2018-07-30  Nikita Vasilyev  <nvasilyev@apple.com>
196
197         Web Inspector: Dark Mode: Search sidebar panel text field has a white background
198         https://bugs.webkit.org/show_bug.cgi?id=188128
199         <rdar://problem/42678270>
200
201         Reviewed by Matt Baker.
202
203         Make the search bar in Search tab match the style of the filter bar.
204
205         * UserInterface/Views/DarkMode.css:
206         (@media (prefers-dark-interface)):
207         (:matches(.search-bar, .filter-bar) > input[type="search"],):
208         (:matches(.search-bar, .filter-bar) > input[type="search"]::placeholder):
209         (:matches(.search-bar, .filter-bar) > input[type="search"]:focus):
210         (.filter-bar > input[type="search"]): Deleted.
211         (.filter-bar > input[type="search"]::placeholder): Deleted.
212         (.filter-bar > input[type="search"]:focus): Deleted.
213
214 2018-07-26  Ryan Haddad  <ryanhaddad@apple.com>
215
216         Unreviewed, rolling out r234281.
217
218         Broke internal builds.
219
220         Reverted changeset:
221
222         "[Datalist] Add button to TextFieldInputs with a datalist"
223         https://bugs.webkit.org/show_bug.cgi?id=187741
224         https://trac.webkit.org/changeset/234281
225
226 2018-07-26  Aditya Keerthi  <akeerthi@apple.com>
227
228         [Datalist] Add button to TextFieldInputs with a datalist
229         https://bugs.webkit.org/show_bug.cgi?id=187741
230
231         Reviewed by Tim Horton.
232
233         Add keyword completion for 'list-button'.
234
235         * UserInterface/External/CodeMirror/css.js:
236         * UserInterface/Models/CSSKeywordCompletions.js:
237
238 2018-07-25  Nikita Vasilyev  <nvasilyev@apple.com>
239
240         Web Inspector: Dark Mode: Breakpoint editor in JS debugger has inconsistent background
241         https://bugs.webkit.org/show_bug.cgi?id=188026
242
243         Reviewed by Matt Baker.
244
245         * UserInterface/Views/DarkMode.css:
246         (@media (prefers-dark-interface)):
247         (.edit-breakpoint-popover-condition):
248         (.breakpoint-action-eval-editor):
249
250 2018-07-22  Nikita Vasilyev  <nvasilyev@apple.com>
251
252         Web Inspector: Dark Mode: remove odd-looking top border
253         https://bugs.webkit.org/show_bug.cgi?id=187885
254
255         Reviewed by Matt Baker.
256
257         This border doesn't exist in the light mode, and it shouldn't be in the dark mode either.
258
259         * UserInterface/Views/DarkMode.css:
260         (@media (prefers-dark-interface)):
261         (body .toolbar):
262
263 2018-07-20  Nikita Vasilyev  <nvasilyev@apple.com>
264
265         Web Inspector: Dark Mode: Layers tab background should be dark
266         https://bugs.webkit.org/show_bug.cgi?id=187660
267         <rdar://problem/42179616>
268
269         Reviewed by Brian Burg.
270
271         * UserInterface/Views/Layers3DContentView.js:
272         (WI.Layers3DContentView.prototype.initialLayout):
273         * UserInterface/Views/Variables.css:
274         (:root):
275
276 2018-07-19  Ross Kirsling  <ross.kirsling@sony.com>
277
278         Web Inspector: Layers visualization shouldn't select on mousedown
279         https://bugs.webkit.org/show_bug.cgi?id=187488
280
281         Reviewed by Matt Baker.
282
283         * UserInterface/Views/Layers3DContentView.js:
284         (WI.Layers3DContentView):
285         (WI.Layers3DContentView.prototype.initialLayout):
286         (WI.Layers3DContentView.prototype._canvasMouseDown):
287         (WI.Layers3DContentView.prototype._canvasMouseUp):
288         Don't update selection on mousedown, update on mouseup!
289         Specifically, only update when mousedown & mouseup targets are the same and mousemove hasn't been triggered.
290
291 2018-07-19  Nikita Vasilyev  <nvasilyev@apple.com>
292
293         Web Inspector: Dark Mode: poor contrast for Search Tab's "the page's content has changed" message
294         https://bugs.webkit.org/show_bug.cgi?id=187792
295
296         Reviewed by Brian Burg.
297
298         * UserInterface/Views/DarkMode.css:
299         (@media (prefers-dark-interface)):
300         (:root):
301         Make the background color slightly more yellow and less red. This slightly dicreases the contrast
302         but makes the text look less like an error.
303
304         * UserInterface/Views/SearchSidebarPanel.css:
305         (@media (prefers-dark-interface)):
306         (.sidebar > .panel.navigation.search.changed > .banner):
307
308 2018-07-18  Matt Baker  <mattbaker@apple.com>
309
310         Web Inspector: REGRESSION(r232591): CodeMirrorEditor should not use a RegExp lineSeparator option
311         https://bugs.webkit.org/show_bug.cgi?id=187772
312         <rdar://problem/42331640>
313
314         Reviewed by Joseph Pecoraro.
315
316         * UserInterface/Views/CodeMirrorEditor.js:
317         (WI.CodeMirrorEditor.create):
318         (WI.CodeMirrorEditor):
319         CodeMirror should be left to auto-detect line separators. By default
320         it detects \n, \r\n, and \r. By specifying a regular expression we
321         merely cause problems when CodeMirror uses the supplied lineSeparator
322         when joining its array of lines together.
323
324         * UserInterface/Views/TextEditor.js:
325         (WI.TextEditor.set string.update):
326         (WI.TextEditor.prototype.set string):
327         This assertion was only true when we forced "\n" line endings everywhere.
328         It no longer holds for source text with "\r\n" (Windows-style) line endings.
329
330 2018-07-16  Matt Baker  <mattbaker@apple.com>
331
332         Web Inspector: Fix execution highlighting after r233820
333         https://bugs.webkit.org/show_bug.cgi?id=187703
334         <rdar://problem/42246167>
335
336         Reviewed by Joseph Pecoraro.
337
338         * UserInterface/Views/SourceCodeTextEditor.js:
339         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
340         * UserInterface/Views/TextEditor.js:
341         (WI.TextEditor.prototype.currentPositionToOriginalPosition):
342         (WI.TextEditor.prototype._updateExecutionRangeHighlight):
343
344 2018-07-16  Aaron Chu  <aaron_chu@apple.com>
345
346         AX: Audit Tab should have an Audit Manager
347         https://bugs.webkit.org/show_bug.cgi?id=184071
348         <rdar://problem/38946364>
349
350         Reviewed by Brian Burg.
351
352         This implements the AuditManager for the audit feature. This patch revolves
353         around building out an AuditManager that facilitates an audit. The AuditManager
354         is responsible for managing and storing AuditReports and AuditTestSuites. It is
355         also tasked to decide how to run a test -- whether as a test case or as a test
356         suite. This patch also includes 4 models with which the AuditManager works to
357         perform an audit and to generate a report. These models include AuditTestCase,
358         which as a collection is stored inside an AuditTestSuite; and AuditResult,
359         which, as a collection is stored inside an AuditReport.
360
361         * UserInterface/Controllers/AuditManager.js: Added.
362         (WI.AuditManager):
363         (WI.AuditManager.prototype.get testSuites):
364         (WI.AuditManager.prototype.get reports):
365         (WI.AuditManager.prototype.async.runAuditTestByRepresentedObject):
366         (WI.AuditManager.prototype.reportForId):
367         (WI.AuditManager.prototype.removeAllReports):
368         (WI.AuditManager.prototype.async._runTestCase):
369         * UserInterface/Main.html:
370         * UserInterface/Models/AuditReport.js: Added.
371         (WI.AuditReport):
372         (WI.AuditReport.prototype.get representedTestCases):
373         (WI.AuditReport.prototype.get representedTestSuite):
374         (WI.AuditReport.prototype.get resultsData):
375         (WI.AuditReport.prototype.get isWritable):
376         (WI.AuditReport.prototype.get failedCount):
377         (WI.AuditReport.prototype.addResult):
378         (WI.AuditReport.prototype.close):
379         * UserInterface/Models/AuditResult.js: Added.
380         (WI.AuditResult):
381         (WI.AuditResult.prototype.get testResult):
382         (WI.AuditResult.prototype.get name):
383         (WI.AuditResult.prototype.get logLevel):
384         (WI.AuditResult.prototype.get failed):
385         * UserInterface/Models/AuditTestCase.js: Added.
386         (WI.AuditTestCase.prototype.get id):
387         (WI.AuditTestCase.prototype.get name):
388         (WI.AuditTestCase.prototype.get suite):
389         (WI.AuditTestCase.prototype.get test):
390         (WI.AuditTestCase.prototype.get setup):
391         (WI.AuditTestCase.prototype.get tearDown):
392         (WI.AuditTestCase.prototype.get errorDetails):
393         (WI.AuditTestCase):
394         * UserInterface/Models/AuditTestSuite.js: Added.
395         (WI.AuditTestSuite):
396         (WI.AuditTestSuite.testCaseDescriptors):
397         (WI.AuditTestSuite.prototype.get id):
398         (WI.AuditTestSuite.prototype.get name):
399         (WI.AuditTestSuite.prototype.get testCases):
400         (WI.AuditTestSuite.prototype._buildTestCasesFromDescriptors):
401         * UserInterface/Test.html:
402
403 2018-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
404
405         Web Inspector: Dark Mode: Console filter field buttons should be darker
406         https://bugs.webkit.org/show_bug.cgi?id=187626
407         <rdar://problem/42142744>
408
409         Reviewed by Brian Burg.
410
411         * UserInterface/Views/FindBanner.css:
412         (@media (prefers-dark-interface)):
413         (.find-banner > button.segmented):
414         (.find-banner > button.segmented > .glyph):
415
416 2018-07-16  Nikita Vasilyev  <nvasilyev@apple.com>
417
418         Web Inspector: Dark Mode: selected item background color is too light
419         https://bugs.webkit.org/show_bug.cgi?id=187691
420         <rdar://problem/42225308>
421
422         Reviewed by Brian Burg.
423
424         * UserInterface/Views/DarkMode.css:
425         (@media (prefers-dark-interface)):
426         (:root):
427         (.tree-outline.dom li.elements-drag-over .selection-area):
428         (.tree-outline.dom:focus li.selected .selection-area):
429
430 2018-07-14  Kocsen Chung  <kocsen_chung@apple.com>
431
432         Ensure WebKit stack is ad-hoc signed
433         https://bugs.webkit.org/show_bug.cgi?id=187667
434
435         Reviewed by Alexey Proskuryakov.
436
437         * Configurations/Base.xcconfig:
438
439 2018-07-13  Matt Baker  <mattbaker@apple.com>
440
441         Web Inspector: REGRESSION (r195723): Improve support for resources with '\r' and '\r\n' line endings
442         https://bugs.webkit.org/show_bug.cgi?id=186453
443         <rdar://problem/39689180>
444
445         Reviewed by Joseph Pecoraro.
446
447         Now that the frontend no longer uses offsets from the original source
448         file to calculate positions within CodeMirror, it is possible to support
449         resources with '\r' and '\r\n' line endings in the editor.
450
451         * UserInterface/Views/CodeMirrorEditor.js:
452         (WI.CodeMirrorEditor.create):
453         (WI.CodeMirrorEditor):
454
455 2018-07-13  Matt Baker  <mattbaker@apple.com>
456
457         Web Inspector: Basic blocks highlighting should use line/column locations instead of offsets
458         https://bugs.webkit.org/show_bug.cgi?id=187613
459         <rdar://problem/42131808>
460
461         Reviewed by Joseph Pecoraro.
462
463         * UserInterface/Controllers/BasicBlockAnnotator.js:
464         Basic blocks sent from the backend include offsets into the original
465         file, rather than line/column locations. In order to translate to positions
466         within CodeMirror, we need to calculate the original line and column
467         for each block.
468
469         (WI.BasicBlockAnnotator.prototype.insertAnnotations):
470         (WI.BasicBlockAnnotator.prototype._calculateBasicBlockPositions.offsetToPosition):
471         (WI.BasicBlockAnnotator.prototype._calculateBasicBlockPositions):
472         (WI.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
473         (WI.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
474         (WI.BasicBlockAnnotator.prototype._highlightTextForBasicBlock):
475
476         * UserInterface/Models/SourceCodePosition.js:
477         (WI.SourceCodePosition.prototype.offsetColumn):
478
479         * UserInterface/Views/TextEditor.js:
480         (WI.TextEditor.prototype.getTextInRange):
481         (WI.TextEditor.prototype.addStyleToTextRange):
482         Better encapsulation for CodeMirror positions.
483
484         * UserInterface/Workers/Formatter/FormatterUtilities.js:
485         (get if):
486         Update String.prototype.lineEndings to support additional line separators.
487
488 2018-07-13  Matt Baker  <mattbaker@apple.com>
489
490         Web Inspector: Execution highlighting in the frontend should be line/column-based
491         https://bugs.webkit.org/show_bug.cgi?id=187532
492         <rdar://problem/42035580>
493
494         Reviewed by Joseph Pecoraro.
495
496         Source code offsets from Esprima should not be used to calculate ranges
497         in CodeMirror for expression highlighting.
498
499         This also fixes a long standing bug when adjusting for the starting
500         position of an inline script. Previously the start offset from the script
501         TextRange was used for this purpose, but the value is often incorrect (see
502         https://bugs.webkit.org/show_bug.cgi?id=187532#c5). By using the starting
503         line/column instead, we avoid the problem.
504
505         * UserInterface/Models/ScriptSyntaxTree.js:
506         (WI.ScriptSyntaxTree.prototype.containersOfPosition):
507         (WI.ScriptSyntaxTree.prototype.containersOfOffset): Deleted.
508
509         * UserInterface/Models/SourceCodePosition.js:
510         (WI.SourceCodePosition.prototype.offsetColumn):
511
512         * UserInterface/Views/SourceCodeTextEditor.js:
513         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange.toInlineScriptPosition):
514         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange.fromInlineScriptPosition):
515         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
516         (WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange.convertRangeOffsetsToSourceCodeOffsets): Deleted.
517
518         * UserInterface/Views/TextEditor.js:
519         (WI.TextEditor.prototype._updateExecutionRangeHighlight):
520
521 2018-07-13  Matt Baker  <mattbaker@apple.com>
522
523         Web Inspector: SourceCodePosition.js missing from Test.html
524         https://bugs.webkit.org/show_bug.cgi?id=187644
525
526         Reviewed by Brian Burg.
527
528         * UserInterface/Test.html:
529
530 2018-07-12  Matt Baker  <mattbaker@apple.com>
531
532         Web Inspector: Type token positioning should use line/column locations from Esprima instead of offsets
533         https://bugs.webkit.org/show_bug.cgi?id=187612
534         <rdar://problem/42131910>
535
536         Reviewed by Joseph Pecoraro.
537
538         * UserInterface/Controllers/TypeTokenAnnotator.js:
539         (WI.TypeTokenAnnotator.prototype.insertAnnotations):
540         (WI.TypeTokenAnnotator.prototype._insertTypeToken):
541         (WI.TypeTokenAnnotator.prototype._insertToken):
542         Use line/column locations, instead of offsets, from the AST when calculating
543         token positions for CodeMirror. Once in CodeMirror's string space, we
544         can safely convert to/from offsets.
545
546         * UserInterface/Models/ScriptSyntaxTree.js:
547         Retrieve line/column locations for AST nodes, in addition to offsets.
548         Offsets into the original file are still needed for getting type information
549         from the profiler in the backend.
550
551         (WI.ScriptSyntaxTree):
552         (WI.ScriptSyntaxTree.prototype.filterByRange):
553         Filter by positions, which can be safely used from CodeMirror, instead of offsets.
554
555         (WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
556         (WI.ScriptSyntaxTree.prototype.filterByRange.filterForNodesInRange): Deleted.
557
558         * UserInterface/Models/SourceCodePosition.js:
559         Add convenience methods for comparing line/column positions, and for
560         converting to the format expected by CodeMirror. SourceCodePosition could
561         be made to interoperate with CodeMirror by exposing properties `line`
562         and `ch`, but making the conversion explicit improves code readability.
563
564         (WI.SourceCodePosition.prototype.equals):
565         (WI.SourceCodePosition.prototype.isBefore):
566         (WI.SourceCodePosition.prototype.isAfter):
567         (WI.SourceCodePosition.prototype.isWithin):
568         (WI.SourceCodePosition.prototype.toCodeMirror):
569         (WI.SourceCodePosition):
570
571         * UserInterface/Views/TextEditor.js:
572         (WI.TextEditor.prototype.visibleRangePositions):
573         (WI.TextEditor.prototype.originalPositionToCurrentPosition):
574         (WI.TextEditor.prototype.currentOffsetToCurrentPosition):
575         (WI.TextEditor.prototype.currentPositionToCurrentOffset):
576         (WI.TextEditor.prototype.setInlineWidget):
577
578 2018-07-10  Fujii Hironori  <Hironori.Fujii@sony.com>
579
580         REGRESSION(r229932) Use of uninitialized value in subroutine entry at copy-user-interface-resources.pl
581         https://bugs.webkit.org/show_bug.cgi?id=187511
582
583         Reviewed by Brian Burg.
584
585         copy-user-interface-resources.pl output warning messages unless
586         BUILT_PRODUCTS_DIR and BUILT_PRODUCTS_DIR env vars are defined.
587
588         * Scripts/copy-user-interface-resources.pl:
589         (webInspectorUIAdditionsDir): Added. Return UNDEF if
590         BUILT_PRODUCTS_DIR and SDKROOT env vars aren't defined.
591         (combineOrStripResourcesForWebKitAdditions): Check
592         $webInspectorUIAdditionsDir is defined.
593
594 2018-07-10  Ross Kirsling  <rkirsling@gmail.com>
595
596         Web Inspector: Layers inspector should allow control-dragging to pan the 3D render
597         https://bugs.webkit.org/show_bug.cgi?id=185109
598
599         Reviewed by Matt Baker.
600
601         Addressed in the three.js repo itself (https://github.com/mrdoob/three.js/pull/13972),
602         so this patch simply updates three.js and its OrbitControls module.
603
604         * UserInterface/External/three.js/LICENSE:
605         * UserInterface/External/three.js/three.js:
606         Update to r94.
607
608         * UserInterface/External/three.js/OrbitControls.js:
609         Update to latest.
610
611         * UserInterface/Views/Layers3DContentView.js:
612         (WI.Layers3DContentView.prototype.initialLayout):
613         (WI.Layers3DContentView.prototype._restrictPan):
614         Adapt to recent changes in three.js.
615
616 2018-07-10  Matt Baker  <mattbaker@apple.com>
617
618         Web Inspector: Remove unused NavigationSidebarPanel.treeElementAddedOrChanged
619         https://bugs.webkit.org/show_bug.cgi?id=187508
620
621         Reviewed by Joseph Pecoraro.
622
623         * UserInterface/Views/NavigationSidebarPanel.js:
624         (WI.NavigationSidebarPanel.prototype._treeElementAddedOrChanged):
625         (WI.NavigationSidebarPanel.prototype.treeElementAddedOrChanged): Deleted.
626
627 2018-07-10  Matt Baker  <mattbaker@apple.com>
628
629         Web Inspector: REGRESSION (r217505): Debugger content view doesn't update when left sidebar is collapsed
630         https://bugs.webkit.org/show_bug.cgi?id=187482
631         <rdar://problem/41989190>
632
633         Reviewed by Brian Burg.
634
635         Subclasses of NavigationSidebarPanel must process tree selection changes
636         even when collapsed. Sidebar panels perform critical controller tasks
637         for their tabs, such as updating the view when pausing in the debugger,
638         and when the hierarchical path component selection changes.
639
640         * UserInterface/Views/DebuggerSidebarPanel.js:
641         (WI.DebuggerSidebarPanel.prototype._treeSelectionDidChange):
642         * UserInterface/Views/ResourceSidebarPanel.js:
643         (WI.ResourceSidebarPanel.prototype._treeSelectionDidChange):
644         * UserInterface/Views/SearchSidebarPanel.js:
645         (WI.SearchSidebarPanel.prototype._treeSelectionDidChange):
646         * UserInterface/Views/SourcesSidebarPanel.js:
647         (WI.SourcesSidebarPanel.prototype._treeSelectionDidChange):
648         * UserInterface/Views/StorageSidebarPanel.js:
649         (WI.StorageSidebarPanel._treeSelectionDidChange):
650
651 2018-07-09  Brian Burg  <bburg@apple.com>
652
653         REGRESSION: Web Inspector no longer pauses in internal injected scripts like WDFindNodes.js
654         https://bugs.webkit.org/show_bug.cgi?id=187350
655         <rdar://problem/41728249>
656
657         Reviewed by Matt Baker.
658
659         * UserInterface/Base/Setting.js: Add a new setting to allow pausing in internal scripts.
660         * UserInterface/Controllers/DebuggerManager.js: Listen to the setting change and toggle
661         the backend setting accordingly. The default is to not break into internal scripts.
662
663         * UserInterface/Views/SettingsTabContentView.js:
664         (WI.SettingsTabContentView.prototype._createDebugSettingsView):
665         Expose the new setting in the Debug settings panel.
666
667 2018-07-06  Nikita Vasilyev  <nvasilyev@apple.com>
668
669         Web Inspector: Dark Mode: resource search field has white text on white background
670         https://bugs.webkit.org/show_bug.cgi?id=187423
671
672         Reviewed by Timothy Hatcher.
673
674         Match the colors of sidebar filter fields.
675
676         * UserInterface/Views/DarkMode.css:
677         (@media (prefers-dark-interface)):
678         (.find-banner > input[type="search"]):
679
680 2018-07-04  Tim Horton  <timothy_horton@apple.com>
681
682         Introduce PLATFORM(IOSMAC)
683         https://bugs.webkit.org/show_bug.cgi?id=187315
684
685         Reviewed by Dan Bernstein.
686
687         * Configurations/Base.xcconfig:
688
689 2018-06-28  Matt Baker  <mattbaker@apple.com>
690
691         Web Inspector: REGRESSION (r213000): copy from Search results content view broken
692         https://bugs.webkit.org/show_bug.cgi?id=187020
693         <rdar://problem/40928766>
694
695         Reviewed by Timothy Hatcher.
696
697         Since WI._copy listens for a copy event from the document, it is called
698         after CodeMirror handles the event and sets clipboard data. If WI._copy
699         finds a custom copy handler to call, that handler can determine whether
700         to overwrite the current clipboard data, or leave it alone.
701
702         SearchTabContentView's handleCopyEvent method should return early if the
703         content tree outline doesn't have the focus. This prevents the selection
704         in the TextEditor from being overwritten, without any special knowledge of
705         the content browser's current view.
706
707         * UserInterface/Views/SearchTabContentView.js:
708         (WI.SearchTabContentView.prototype.handleCopyEvent):
709
710 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
711
712         Web Inspector: Dark Mode: Box Model section should have dark background
713         https://bugs.webkit.org/show_bug.cgi?id=186976
714
715         Reviewed by Brian Burg.
716
717         Replace all instances of black text on white background with the default text and background colors.
718
719         * UserInterface/Views/BoxModelDetailsSectionRow.css:
720         (@media (prefers-dark-interface)):
721         (.details-section .row.box-model):
722         (.details-section .row.box-model .label):
723         (.details-section .row.box-model :matches(.position, .margin, .border, .padding, .content)):
724         (.details-section .row.box-model:not(.hovered) :matches(.margin, .border, .padding, .content),):
725         (.details-section .row.box-model .margin):
726         (.details-section .row.box-model .border):
727
728 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
729
730         Web Inspector: Dark Mode: color outline is too dark
731         https://bugs.webkit.org/show_bug.cgi?id=186975
732
733         Reviewed by Brian Burg.
734
735         Make the outline lighter than the background.
736
737         * UserInterface/Views/DarkMode.css:
738         (@media (prefers-dark-interface)):
739         (.hover-menu > svg > :matches(path, rect)):
740
741 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
742
743         Web Inspector: Dark Mode: Media query names are unreadable
744         https://bugs.webkit.org/show_bug.cgi?id=186974
745
746         Reviewed by Brian Burg.
747
748         Change media query names from dark blue to light blue.
749
750         * UserInterface/Views/DarkMode.css:
751         (@media (prefers-dark-interface)):
752         (.CodeMirror .CodeMirror-lines .CodeMirror-matchingbracket):
753         (.cm-s-default .cm-attribute):
754
755 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
756
757         Web Inspector: Dark Mode: Network headers colors are too dim
758         https://bugs.webkit.org/show_bug.cgi?id=186985
759
760         Reviewed by Brian Burg.
761
762         Increasing the luminance of network header colors by increasing lightness and brightness.
763
764         * UserInterface/Views/DarkMode.css:
765         (@media (prefers-dark-interface)):
766         (:root):
767
768 2018-06-25  Nikita Vasilyev  <nvasilyev@apple.com>
769
770         Web Inspector: Dark Mode: Font guideline colors are too bright
771         https://bugs.webkit.org/show_bug.cgi?id=186986
772
773         Reviewed by Brian Burg.
774
775         Make the guidelines less distractive from the font glyphs.
776
777         * UserInterface/Views/DarkMode.css:
778         (@media (prefers-dark-interface)):
779         (.content-view.resource.font .preview > .line):
780         (.content-view.resource.font .metric.top):
781         (.content-view.resource.font .metric.baseline):
782         (.content-view.resource.font .metric.middle):
783         (.content-view.resource.font .metric.xheight):
784         (.content-view.resource.font .metric.bottom):
785
786 2018-06-20  Daniel Bates  <dabates@apple.com>
787
788         Web Inspector: All non-Same-Site cookies are marked as Same-Site Strict in Storage tab
789         https://bugs.webkit.org/show_bug.cgi?id=186867
790         <rdar://problem/41175424>
791
792         Reviewed by Matt Baker.
793
794         Fixes an issue where cookies that do not have a Same-Site policy would be marked up as Same-
795         Site Strict in Web Inspector's cookie storage content view (under the storage tab).
796
797         * UserInterface/Views/CookieStorageContentView.js:
798         (WI.CookieStorageContentView.prototype._rebuildTable): Only compute the display name if
799         we cookie.sameSite is non-null and is not WI.Cookie.SameSiteType.None. Moreover, remove
800         an extraneous call to WI.Cookie.parseSameSiteAttributeValue() as cookie.SameSite represents
801         the already parsed value (one of the WI.Cookie.SameSiteType-scoped values).
802
803 2018-06-18  Brian Burg  <bburg@apple.com>
804
805         Web Inspector: TypeError: Array.prototype.sort passed bad value in NetworkTableContentView _updateSortAndFilteredEntries
806         https://bugs.webkit.org/show_bug.cgi?id=186787
807         <rdar://problem/41175680>
808
809         Reviewed by Timothy Hatcher.
810
811         * UserInterface/Views/NetworkTableContentView.js:
812         (WI.NetworkTableContentView.prototype._updateSortAndFilteredEntries):
813
814 2018-06-13  Nikita Vasilyev  <nvasilyev@apple.com>
815
816         Web Inspector: open source Dark Mode
817         https://bugs.webkit.org/show_bug.cgi?id=186606
818
819         Reviewed by Timothy Hatcher.
820
821         The dark mode is currently only available on macOS Mojave via prefers-dark-interface CSS media query.
822
823         * UserInterface/Main.html:
824         * UserInterface/Views/DarkMode.css: Added.
825         (@media (prefers-dark-interface)):
826         (:root):
827         (body.window-inactive):
828         (body.window-inactive *):
829         (#main):
830         (.tree-outline.dom li.selected .selection-area):
831         (.tab-bar > .item > .icon):
832         (.go-to-arrow):
833         (.resource-link,):
834         (.expand-list-button):
835         (:matches(img, canvas).show-grid):
836         (.formatted-object,):
837         (.formatted-null,):
838         (.editing):
839         (.editing, .editing *):
840         (.text-editor > .CodeMirror .execution-line):
841         (.text-editor > .CodeMirror .execution-range-highlight:not(.CodeMirror-selectedtext),):
842         (.details-section > .header):
843         (.details-section > .header > label):
844         (.details-section .details-section,):
845         (.details-section .details-section:not(.collapsed) > .header):
846         (.details-section > .content > .group > .row.simple > .label):
847         (.details-section > .content > .group:nth-child(even)):
848         (.details-section > .content > .group > .row:matches(.empty, .text)):
849         (.data-grid th):
850         (.data-grid td .subtitle):
851         (.data-grid:matches(:focus, .force-focus) tr.selected td .subtitle):
852         (body:not(.window-inactive, .window-docked-inactive) .data-grid:matches(:focus, .force-focus) tr.editable.selected .cell-content > input):
853         (.data-grid tr.editable .cell-content > input):
854         (.data-grid td.spanning):
855         (.object-tree,):
856         (.object-preview .name):
857         (.object-preview > .size):
858         (.tab-bar):
859         (.tab-bar > .item):
860         (.tab-bar > .item > .title):
861         (.tab-bar > .item:not(.disabled).selected):
862         (.tab-bar:not(.animating) > .item:not(.selected):hover):
863         (.tab-bar > .item > .close):
864         (body.window-inactive .tab-bar):
865         (body.window-inactive .tab-bar > .item):
866         (body.window-inactive .tab-bar > .item.selected):
867         (body.window-inactive .tab-bar > .item > .title):
868         (body .toolbar):
869         (body.window-inactive .toolbar):
870         (body.latest-mac .toolbar .item.button,):
871         (body.latest-mac .toolbar .search-bar > input[type="search"]):
872         (body.latest-mac .toolbar .search-bar > input[type="search"]:focus):
873         (body.latest-mac .toolbar .search-bar > input[type="search"]::placeholder):
874         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::placeholder):
875         (body.latest-mac.window-inactive .toolbar .search-bar > input[type="search"]::-webkit-search-results-button):
876         (body.latest-mac .toolbar .dashboard-container):
877         (body.latest-mac .toolbar .item.button:active):
878         (body.latest-mac.window-inactive .toolbar .item.button,):
879         (.navigation-bar .item.divider):
880         (.toolbar .item.button):
881         (.toolbar .item.button:not(.disabled):active):
882         (.toolbar .item.button:not(.disabled):matches(:focus, .activate.activated)):
883         (.toolbar .item.button:not(.disabled):active:matches(:focus, .activate.activated)):
884         (.toolbar .dashboard.default > .item > div):
885         (.toolbar .dashboard.default > .item.enabled > div):
886         (.toolbar .dashboard.default > .item.enabled:hover):
887         (.toolbar .dashboard.default > .item.enabled:hover > div):
888         (.toolbar .dashboard.default > .resourcesCount > img,):
889         (body.latest-mac .toolbar .dashboard .item.button):
890         (.dashboard-container .advance-arrow):
891         (.toolbar .dashboard.debugger):
892         (.dashboard.debugger .navigation-bar .item.button > .glyph):
893         (.dashboard.debugger > .location .function-name):
894         (.dashboard.debugger > .location .go-to-link):
895         (.dashboard.debugger > .divider):
896         (.popover .edit-breakpoint-popover-content > label.toggle):
897         (.popover .edit-breakpoint-popover-content > table > tr > th):
898         (.breakpoint-action-block-body):
899         (.breakpoint-action-block-body > .description):
900         (.breakpoint-action-append-button,):
901         (.popover .xhr-breakpoint-content > .editor-wrapper > .editor):
902         (.navigation-bar .item.button):
903         (.spreadsheet-style-declaration-editor .property:not(.disabled) .value):
904         (.spreadsheet-css-declaration):
905         (.spreadsheet-css-declaration .selector:focus,):
906         (.spreadsheet-css-declaration.locked .origin::after):
907         (.spreadsheet-css-declaration .origin .go-to-link,):
908         (.spreadsheet-style-declaration-editor :matches(.name, .value).editing):
909         (.spreadsheet-style-declaration-editor .property.has-warning):
910         (.spreadsheet-style-declaration-editor .property.has-warning .warning):
911         (.spreadsheet-css-declaration .media-label):
912         (.quick-console):
913         (.syntax-highlighted,):
914         (.cm-s-default,):
915         (.CodeMirror .jump-to-symbol-highlight,):
916         (.console-prompt):
917         (.completion-suggestions):
918         (.completion-suggestions-container > .item):
919         (.CodeMirror-cursor):
920         (.CodeMirror .CodeMirror-gutters):
921         (.cm-s-default .cm-link):
922         (.cm-s-default .cm-m-xml.cm-attribute,):
923         (.cm-s-default .cm-meta):
924         (.cm-s-default .cm-variable-3):
925         (.cm-s-default .cm-builtin):
926         (.tree-outline .item .subtitle):
927         (.object-tree-property .getter,):
928         (.item.object-tree-property.prototype-property):
929         (.object-tree-property.prototype-property:hover,):
930         (.object-tree-property .value.error):
931         (.tree-outline.dom):
932         (.tree-outline.dom li.selected + ol.children.expanded):
933         (.tree-outline.dom .shadow):
934         (.tree-outline.dom li.parent.shadow + ol.children.expanded,):
935         (.showing-find-banner .tree-outline.dom .search-highlight):
936         (.sidebar > .panel.dom-node-details .details-section.dom-node-event-listeners > .header > .filter:hover):
937         (.sidebar > .panel.details.css-style > .content > .pseudo-classes > .group > label):
938         (.spreadsheet-css-declaration.locked):
939         (.spreadsheet-css-declaration .selector.style-attribute):
940         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
941         (.inline-swatch):
942         (.spreadsheet-style-panel .section-header):
943         (.spreadsheet-style-panel .section-header .node-link:hover):
944         (.computed-style-properties.details-section):
945         (.details-section.style-box-model:not(.collapsed) > :matches(.header, .content)):
946         (.table,):
947         (.table > .header > .sortable:active):
948         (.table > .header > :matches(.sort-ascending, .sort-descending)):
949         (.table > .header > :matches(.sort-ascending, .sort-descending)::after):
950         (.scope-bar > li):
951         (.timeline-overview > .navigation-bar.timelines):
952         (.timeline-overview:not(.frames) > .graphs-container > .timeline-overview-graph:nth-child(even)):
953         (.timeline-overview.edit-instruments > .tree-outline.timelines .item:not(:first-child),):
954         (.time-icon .icon):
955         (.data-grid th:matches(.sort-ascending, .sort-descending)):
956         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple):
957         (.content-view.timeline-recording > .content-browser > .navigation-bar > .item.scope-bar.default-item-selected > .multiple .arrows):
958         (.content-view.settings .navigation-bar):
959         (.content-view.settings .navigation-bar .item.radio.button.text-only.selected):
960         (.new-tab.tab.content-view):
961         (.filter-bar > input[type="search"]):
962         (.filter-bar > input[type="search"]::placeholder):
963         (.filter-bar > input[type="search"]:focus):
964         (.content-view.resource.image):
965         (.console-messages):
966         (.console-item):
967         (.console-messages:focus .console-item.selected):
968         (.console-messages:focus .console-item.selected + .console-item):
969         (.console-session:first-of-type .console-session-header):
970         (.console-session:not(:first-of-type) .console-session-header):
971         (.console-messages a):
972         (.console-messages a:hover):
973         (.console-messages:focus .console-item.selected::after):
974         (.console-error-level):
975         (.console-error-level:not(.filtered-out, .filtered-out-by-search), .console-error-level:not(.filtered-out, .filtered-out-by-search) + .console-item):
976         (.console-warning-level):
977         (.console-warning-level:not(.filtered-out, .filtered-out-by-search), .console-warning-level:not(.filtered-out, .filtered-out-by-search) + .console-item):
978         (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted):
979         (.search-in-progress .console-item:not(.filtered-out-by-search) .highlighted.selected):
980         (.source-code.text-editor > .CodeMirror .error):
981         (.source-code.text-editor > .CodeMirror .warning):
982         (.source-code.text-editor > .CodeMirror .issue-widget):
983         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning):
984         (.source-code.text-editor > .CodeMirror .issue-widget.inline.warning > .arrow):
985         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error):
986         (.source-code.text-editor > .CodeMirror .issue-widget.inline.error > .arrow):
987         (.console-message .syntax-highlighted):
988         (.console-warning-level .console-message-text):
989         (.console-error-level .console-message-text):
990         (.console-user-command > .console-message-text):
991         (.console-message .repeat-count):
992         (.call-frame .subtitle,):
993         (.call-frame:hover .subtitle .source-link,):
994         (.call-frame .separator):
995         (.quick-console.showing-log):
996         (.find-banner.console-find-banner > input[type=search]:not(:placeholder-shown)):
997         (.network-resource-detail):
998         (.network-resource-detail .item.close > .glyph):
999         (.network .network-resource-detail .navigation-bar .item.radio.button.text-only.selected):
1000         (.resource-headers .value):
1001         (.network-table .cell.domain > .lock):
1002         (.resource-sizes > .content .label):
1003         (.popover.waterfall-popover):
1004         (.resource-timing-breakdown > table > tr.header:not(.total-row) > td):
1005         (.resource-timing-breakdown > table > tr > td.label,):
1006         (.resource-timing-breakdown > table hr):
1007         (.sidebar > .panel.details.css-style > .content ~ .options-container > .new-rule):
1008         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
1009         (.web-socket.content-view .data-grid table.data tr.revealed):
1010         (.web-socket.content-view .data-grid.variable-height-rows table.data tr.outgoing):
1011         (.web-socket.content-view .data-grid.variable-height-rows table.data tr.non-text-frame):
1012         (.item.action:not(.initial-state)::before):
1013         (.tree-outline .item.action.visual:not(.selected, .invalid)):
1014         (.item.action:not(.initial-state) > .icon):
1015         (.tree-outline:not(.hide-disclosure-buttons) .item.action:not(.initial-state, .parent) > .icon):
1016         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon,):
1017         (.content-view.canvas > .preview > img,):
1018         (.content-view.canvas-overview):
1019         (.content-view.canvas-overview .content-view.canvas):
1020         (.content-view.canvas-overview .content-view.canvas.is-recording):
1021         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
1022         (.content-view.canvas-overview .content-view.canvas > header > .titles > .title):
1023         (.content-view.canvas-overview .content-view.canvas > header > .titles > .subtitle,):
1024         (.content-view.canvas-overview .content-view.canvas > footer > .recordings::before):
1025         (.content-view.canvas-overview .content-view.canvas.is-recording > header > .titles > .subtitle):
1026         (.content-view.canvas:not(.tab)):
1027         (.content-view:not(.tab).recording):
1028         (.content-view:not(.tab).recording > header > .slider-container):
1029         (.content-view:not(.tab).recording > header > .slider-container > input[type=range]):
1030         (.sidebar > .panel.details.recording-state > .content > .data-grid tr.modified):
1031         (.progress-view > .titles > .title):
1032         (.progress-view > .titles > .subtitle):
1033         (.indeterminate-progress-spinner):
1034         (.content-view.shader-program > .text-editor.shader):
1035         (.content-view.shader-program > .text-editor.shader > .type-title):
1036         (.item.shader-program .status > img):
1037         (.open-resource-dialog):
1038         (.open-resource-dialog > .field > input):
1039         (.open-resource-dialog > .field > input::placeholder):
1040         (.open-resource-dialog > .tree-outline .item.selected):
1041         (.open-resource-dialog > .field::before):
1042
1043 2018-06-09  Dan Bernstein  <mitz@apple.com>
1044
1045         [Xcode] Clean up and modernize some build setting definitions
1046         https://bugs.webkit.org/show_bug.cgi?id=186463
1047
1048         Reviewed by Sam Weinig.
1049
1050         * Configurations/Base.xcconfig: Removed definition for macOS 10.11.
1051         * Configurations/DebugRelease.xcconfig: Ditto.
1052         * Configurations/Version.xcconfig: Ditto.
1053
1054 2018-06-05  Matt Baker  <mattbaker@apple.com>
1055
1056         Web Inspector: Tab picker is briefly visible when TabBar initially shown
1057         https://bugs.webkit.org/show_bug.cgi?id=186317
1058
1059         Reviewed by Joseph Pecoraro.
1060
1061         * UserInterface/Views/TabBar.js:
1062         (WI.TabBar): Picker should be initially hidden.
1063
1064 2018-06-05  Nikita Vasilyev  <nvasilyev@apple.com>
1065
1066         Web Inspector: Text in "Add New Class" in auto-capitalizes
1067         https://bugs.webkit.org/show_bug.cgi?id=186311
1068
1069         Reviewed by Matt Baker.
1070
1071         Disable spellcheck to prevent auto-capitalization.
1072
1073         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
1074         (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
1075
1076 2018-06-04  Matt Baker  <mattbaker@apple.com>
1077
1078         Web Inspector: Cannot copy a link address in Elements tab
1079         https://bugs.webkit.org/show_bug.cgi?id=186281
1080         <rdar://problem/39193355>
1081
1082         Reviewed by Brian Burg.
1083
1084         * UserInterface/Views/ContextMenuUtilities.js:
1085         (WI.appendContextMenuItemsForURL):
1086
1087 2018-05-30  Daniel Bates  <dabates@apple.com>
1088
1089         Web Inspector: Annotate Same-Site cookies
1090         https://bugs.webkit.org/show_bug.cgi?id=184897
1091         <rdar://problem/35178209>
1092
1093         Reviewed by Brian Burg.
1094
1095         Add a new column for the value of the Same-Site cookie attribute to the resource cookie content
1096         view (shown for a resource under the Network tab) and cookie storage content view (shown under
1097         the Storage tab).
1098
1099         The SameSite column in the resource cookie content view reflects the parsing of the Same-Site
1100         attribute from the HTTP response by Web Inspector. This parsing is materially consistent with
1101         the parsing of the SameSite atttribute in CFNetwork. The Same-Site column in the cookie storage
1102         content view reflects the Same-Site cookie policy associated with the cookies provided by the
1103         network stack, if supported. This column will be blank on systems whose network stack does not
1104         support Same-Site cookies (e.g libsoup).
1105
1106         * Localizations/en.lproj/localizedStrings.js:
1107         * UserInterface/Controllers/HARBuilder.js:
1108         (WI.HARBuilder.cookies):
1109         * UserInterface/Models/Cookie.js:
1110         (WI.Cookie):
1111         (WI.Cookie.displayNameForSameSiteType):
1112         (WI.Cookie.parseSameSiteAttributeValue):
1113         (WI.Cookie.parseSetCookieResponseHeader):
1114         * UserInterface/Views/CookieStorageContentView.js:
1115         (WI.CookieStorageContentView.prototype._rebuildTable):
1116         (WI.CookieStorageContentView.prototype._sortDataGrid):
1117         * UserInterface/Views/ResourceCookiesContentView.js:
1118         (WI.ResourceCookiesContentView.prototype.tablePopulateCell):
1119         (WI.ResourceCookiesContentView.prototype._generateSortComparator):
1120         (WI.ResourceCookiesContentView.prototype._refreshResponseCookiesSection):
1121
1122 2018-05-25  Matt Baker  <mattbaker@apple.com>
1123
1124         Web Inspector: Popover dismissed while attempting to move cursor inside
1125         https://bugs.webkit.org/show_bug.cgi?id=185741
1126         <rdar://problem/40340938>
1127
1128         Reviewed by Joseph Pecoraro.
1129
1130         Hovering a token within the bounds of the current popover should not
1131         show a new popover. This prevents the popover from being dismissed when
1132         the cursor passes over a token under the transparent portion of the
1133         popover frame.
1134
1135         * UserInterface/Views/SourceCodeTextEditor.js:
1136         (WI.SourceCodeTextEditor.prototype._showPopover):
1137
1138 2018-05-22  Ryan Haddad  <ryanhaddad@apple.com>
1139
1140         Unreviewed, rolling out r232052.
1141
1142         Breaks internal builds.
1143
1144         Reverted changeset:
1145
1146         "Use more C++17"
1147         https://bugs.webkit.org/show_bug.cgi?id=185176
1148         https://trac.webkit.org/changeset/232052
1149
1150 2018-05-21  Yusuke Suzuki  <utatane.tea@gmail.com>
1151
1152         Use more C++17
1153         https://bugs.webkit.org/show_bug.cgi?id=185176
1154
1155         Reviewed by JF Bastien.
1156
1157         * Configurations/Base.xcconfig:
1158
1159 2018-05-18  Devin Rousso  <webkit@devinrousso.com>
1160
1161         Web Inspector: Canvas: put `hasVisualEffect` behind an experimental setting
1162         https://bugs.webkit.org/show_bug.cgi?id=185758
1163
1164         Reviewed by Matt Baker.
1165
1166         * Localizations/en.lproj/localizedStrings.js:
1167
1168         * UserInterface/Base/Setting.js:
1169
1170         * UserInterface/Models/RecordingAction.js:
1171         (WI.RecordingAction.prototype.process):
1172
1173         * UserInterface/Views/RecordingActionTreeElement.js:
1174         (WI.RecordingActionTreeElement.prototype.onattach):
1175
1176         * UserInterface/Views/SettingsTabContentView.js:
1177         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1178
1179 2018-05-16  Devin Rousso  <webkit@devinrousso.com>
1180
1181         Web Inspector: create a navigation item for toggling the overlay rulers/guides
1182         https://bugs.webkit.org/show_bug.cgi?id=185644
1183
1184         Reviewed by Matt Baker.
1185
1186         * Localizations/en.lproj/localizedStrings.js:
1187         * UserInterface/Base/Setting.js:
1188         * UserInterface/Views/DOMTreeContentView.js:
1189         (WI.DOMTreeContentView):
1190         (WI.DOMTreeContentView.prototype.get navigationItems):
1191         (WI.DOMTreeContentView.prototype.closed):
1192         (WI.DOMTreeContentView.prototype._showRulersChanged): Added.
1193         (WI.DOMTreeContentView.prototype._toggleShowRulers): Added.
1194
1195 2018-05-14  Nikita Vasilyev  <nvasilyev@apple.com>
1196
1197         Web Inspector: Canvas: Remove unused --value-visual-highlight CSS variable
1198         https://bugs.webkit.org/show_bug.cgi?id=185636
1199
1200         Reviewed by Matt Baker.
1201
1202         * UserInterface/Views/Variables.css:
1203         (:root):
1204
1205 2018-05-14  Devin Rousso  <webkit@devinrousso.com>
1206
1207         Web Inspector: Canvas tab: don't automatically select a recording when viewing a canvas
1208         https://bugs.webkit.org/show_bug.cgi?id=182950
1209
1210         Reviewed by Matt Baker.
1211
1212         * UserInterface/Views/CanvasSidebarPanel.js:
1213         (WI.CanvasSidebarPanel):
1214         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
1215         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
1216         (WI.CanvasSidebarPanel.prototype._canvasChanged):
1217         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1218         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
1219         Add a "dummy" ScopeBarItem to the recording ScopeBar that is selected whenever a TreeElement
1220         that doesn't correspond to a Recording is selected. This way, the Recording ScopeBar will
1221         become deselected, and the list of actions will disappear. Clicking on the Recording ScopeBar
1222         will show the previously selected Recording.
1223
1224 2018-05-08  Matt Baker  <mattbaker@apple.com>
1225
1226         Web Inspector: Console drawer resizing is broken when console prompt has >1 line of code
1227         https://bugs.webkit.org/show_bug.cgi?id=185369
1228         <rdar://problem/40013202>
1229
1230         Reviewed by Devin Rousso.
1231
1232         Mouse offset calculation should account for the height of the quick console.
1233         The only reason resizing worked with the single-line quick console is that
1234         the offset calculation included the resizer height, which is very close
1235         to that of the single-line quick console (27px and 30px respectively).
1236
1237         * UserInterface/Views/ConsoleDrawer.js:
1238
1239 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
1240
1241         Web Inspector: simplify the WI.Collection interface
1242         https://bugs.webkit.org/show_bug.cgi?id=185187
1243
1244         Reviewed by Brian Burg.
1245
1246         * UserInterface/Models/Collection.js:
1247         (WI.Collection.prototype.get size): Added.
1248         (WI.Collection.prototype.has): Added.
1249         (WI.Collection.prototype.toJSON):
1250         (WI.Collection.prototype.[Symbol.iterator]): Added.
1251         (WI.Collection.prototype.get items): Deleted.
1252         (WI.Collection.prototype.toArray): Deleted.
1253
1254         * UserInterface/Controllers/CanvasManager.js:
1255         (WI.CanvasManager.prototype._removeCanvas):
1256         * UserInterface/Controllers/DOMDebuggerManager.js:
1257         (WebInspector.DOMDebuggerManager.prototype.get domBreakpoints):
1258         * UserInterface/Models/Frame.js:
1259         (WI.Frame.prototype.removeAllChildFrames):
1260         (WI.Frame.prototype.resourceForURL):
1261         (WI.Frame.prototype.removeAllResources):
1262         * UserInterface/Models/Script.js:
1263         (WI.Script):
1264         * UserInterface/Views/CanvasContentView.js:
1265         (WI.CanvasContentView.prototype.initialLayout):
1266         * UserInterface/Views/CanvasOverviewContentView.js:
1267         (WI.CanvasOverviewContentView.prototype._updateNavigationItems):
1268         * UserInterface/Views/CanvasSidebarPanel.js:
1269         (WI.CanvasSidebarPanel.prototype._recordingRemoved):
1270         (WI.CanvasSidebarPanel.prototype._canvasChanged):
1271         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
1272         * UserInterface/Views/CanvasTabContentView.js:
1273         (WI.CanvasTabContentView.prototype.attached):
1274         (WI.CanvasTabContentView.prototype._addCanvas):
1275         (WI.CanvasTabContentView.prototype._removeCanvas):
1276         * UserInterface/Views/CanvasTreeElement.js:
1277         (WI.CanvasTreeElement.prototype.onpopulate):
1278         * UserInterface/Views/CollectionContentView.js:
1279         (WI.CollectionContentView.prototype.initialLayout):
1280         (WI.CollectionContentView.prototype.attached):
1281         * UserInterface/Views/CookieStorageContentView.js:
1282         (WI.CookieStorageContentView.prototype._filterCookies):
1283         * UserInterface/Views/DebuggerSidebarPanel.js:
1284         (WI.DebuggerSidebarPanel.prototype._addResourcesRecursivelyForFrame):
1285         * UserInterface/Views/FolderizedTreeElement.js:
1286         (WI.FolderizedTreeElement.prototype.updateParentStatus):
1287         (WI.FolderizedTreeElement.prototype._shouldGroupIntoFolders):
1288         * UserInterface/Views/FrameTreeElement.js:
1289         (WI.FrameTreeElement.prototype.onpopulate):
1290         * UserInterface/Views/NavigationSidebarPanel.js:
1291         (WI.NavigationSidebarPanel.prototype.get contentTreeOutlines):
1292         * UserInterface/Views/NetworkTableContentView.js:
1293         (WI.NetworkTableContentView.prototype._populateWithInitialResourcesIfNeeded):
1294         * UserInterface/Views/OpenResourceDialog.js:
1295         (WI.OpenResourceDialog.prototype._addResourcesForFrame):
1296         (WI.OpenResourceDialog.prototype._addResourcesForTarget):
1297         * UserInterface/Views/TreeOutlineGroup.js:
1298         (WI.TreeOutlineGroup.prototype.get selectedTreeElement):
1299         (WI.TreeOutlineGroup.prototype._removeConflictingTreeSelections):
1300         * UserInterface/Views/WorkerTreeElement.js:
1301         (WI.WorkerTreeElement.prototype.onpopulate):
1302
1303 2018-05-04  Nikita Vasilyev  <nvasilyev@apple.com>
1304
1305         Web Inspector: Styles: Newly added unsupported properties sometimes don't have warnings
1306         https://bugs.webkit.org/show_bug.cgi?id=183097
1307         <rdar://problem/37843816>
1308
1309         Reviewed by Matt Baker.
1310
1311         Update status of properties warnings every time focus moves.
1312
1313         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1314         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1315         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
1316         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
1317         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updatePropertiesStatus):
1318         * UserInterface/Views/SpreadsheetStyleProperty.js:
1319         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidBlur):
1320
1321 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
1322
1323         Web Inspector: Styles Redesign: ensure that tabbing through the last section wraps back to the first
1324         https://bugs.webkit.org/show_bug.cgi?id=181973
1325
1326         Reviewed by Matt Baker.
1327
1328         Unified delegate functions to start editing previous/next rules into a single function for
1329         simplicity.
1330
1331         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1332         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
1333
1334         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
1335         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.startEditingRuleSelector):
1336         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetSelectorFieldDidChange):
1337         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.spreadsheetCSSStyleDeclarationEditorStartEditingAdjacentRule):
1338         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.cssStyleDeclarationEditorStartEditingAdjacentRule): Deleted.
1339
1340         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1341         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusFirstSection):
1342         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.focusLastSection):
1343         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.spreadsheetCSSStyleDeclarationSectionStartEditingAdjacentRule):
1344         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingNextRule): Deleted.
1345         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.cssStyleDeclarationSectionStartEditingPreviousRule): Deleted.
1346
1347         * UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:
1348         (WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusLastPseudoClassCheckbox):
1349         (WI.GeneralStyleDetailsSidebarPanel.prototype.styleDetailsPanelFocusFilterBar):
1350         (WI.GeneralStyleDetailsSidebarPanel.prototype.initialLayout):
1351         (WI.GeneralStyleDetailsSidebarPanel.prototype._handleForcedPseudoClassCheckboxKeydown):
1352         (WI.GeneralStyleDetailsSidebarPanel.prototype._forcedPseudoClassCheckboxChanged):
1353         (WI.GeneralStyleDetailsSidebarPanel.prototype._handleFilterBarInputFieldKeyDown):
1354
1355         Drive-by fix: provide tabbing support for the Computed styles panel.
1356
1357         * UserInterface/Views/CSSStyleDeclarationTextEditor.js:
1358         (WI.CSSStyleDeclarationTextEditor.prototype._handleShiftTabKey.switchRule):
1359         (WI.CSSStyleDeclarationTextEditor.prototype._handleTabKey.switchRule):
1360
1361         * UserInterface/Views/ComputedStyleDetailsPanel.js:
1362         (WI.ComputedStyleDetailsPanel.prototype.focusFirstSection):
1363         (WI.ComputedStyleDetailsPanel.prototype.focusLastSection):
1364         (WI.ComputedStyleDetailsPanel.prototype.cssStyleDeclarationTextEditorStartEditingAdjacentRule):
1365
1366 2018-05-04  Devin Rousso  <webkit@devinrousso.com>
1367
1368         Web Inspector: Canvas tab: Determine isFunction by looking at the prototype
1369         https://bugs.webkit.org/show_bug.cgi?id=184990
1370
1371         Reviewed by Brian Burg.
1372
1373         * UserInterface/Models/RecordingAction.js:
1374         (WI.RecordingAction.isFunctionForType):
1375         (WI.RecordingAction._prototypeForType):
1376         (WI.RecordingAction.prototype.async.swizzle):
1377
1378 2018-05-01  Devin Rousso  <webkit@devinrousso.com>
1379
1380         Web Inspector: Canvas tab: determine hasVisibleEffect for all actions immediately after recording is added
1381         https://bugs.webkit.org/show_bug.cgi?id=182995
1382
1383         Reviewed by Matt Baker.
1384
1385         Previously, we'd swizzle the entirety of the `WI.Recording` in one, which would usually
1386         freeze the UI, especially for larger recordings. This patch uses `WI.YieldableTask` to split
1387         the work and allow the rest of the UI to still be usable while `WI.Recording` are processing.
1388         Additionally, since we no longer have to worry about hangs, we can do more work upfront,
1389         such as calculating `hasVisibleEffect` and the current state of 2D canvases.
1390
1391         These changes require that all uses of `WI.Recording` call `process()` before attempting to
1392         use any `frames`/`actions`/`initialState`, as they will have their original payload values
1393         and will have not been swizzled or applied.
1394
1395         * Localizations/en.lproj/localizedStrings.js:
1396
1397         * UserInterface/Models/Recording.js:
1398         (WI.Recording):
1399         (WI.Recording.prototype.process):
1400         (WI.Recording.prototype.createContext): Added.
1401         (WI.Recording.prototype.async yieldableTaskWillProcessItem): Added.
1402         (WI.Recording.prototype.async yieldableTaskDidFinish): Added.
1403
1404         * UserInterface/Models/RecordingAction.js:
1405         (WI.RecordingAction):
1406         (WI.RecordingAction.prototype.process): Added.
1407         (WI.RecordingAction.prototype.async swizzle): Added.
1408         (WI.RecordingAction.prototype.apply):
1409         (WI.RecordingAction.prototype.toJSON):
1410         (WI.RecordingAction.prototype.set state): Deleted.
1411         (WI.RecordingAction.prototype.swizzle): Deleted.
1412         (WI.RecordingAction.prototype.apply.getContent): Deleted.
1413         (WI.RecordingAction.prototype.async _swizzle): Deleted.
1414         * UserInterface/Models/RecordingInitialStateAction.js:
1415         (WI.RecordingInitialStateAction):
1416
1417         * UserInterface/Views/CanvasSidebarPanel.js:
1418         (WI.CanvasSidebarPanel):
1419         (WI.CanvasSidebarPanel.prototype.set action):
1420         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
1421         (WI.CanvasSidebarPanel.prototype._recordingChanged):
1422
1423         * UserInterface/Views/CanvasSidebarPanel.css:
1424         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .indeterminate-progress-spinner):
1425
1426         * UserInterface/Views/RecordingActionTreeElement.js:
1427         (WI.RecordingActionTreeElement):
1428         (WI.RecordingActionTreeElement.prototype.onattach):
1429         (WI.RecordingActionTreeElement.prototype._handleHasVisibleEffectChanged): Deleted.
1430
1431         * UserInterface/Views/RecordingContentView.js:
1432         (WI.RecordingContentView):
1433         (WI.RecordingContentView.prototype.get navigationItems):
1434         (WI.RecordingContentView.prototype.updateActionIndex):
1435         (WI.RecordingContentView.prototype.initialLayout):
1436         (WI.RecordingContentView.prototype._generateContentCanvas2D): Added.
1437         (WI.RecordingContentView.prototype._generateContentCanvasWebGL): Added.
1438         (WI.RecordingContentView.prototype._updateCanvasPath):
1439         (WI.RecordingContentView.prototype._updateProcessProgress): Added.
1440         (WI.RecordingContentView.prototype._handleRecordingProcessedActionSwizzle): Added.
1441         (WI.RecordingContentView.prototype._handleRecordingProcessedActionApply): Added.
1442         (WI.RecordingContentView.supportsCanvasPathDebugging): Deleted.
1443         (WI.RecordingContentView.prototype.async _generateContentCanvas2D): Deleted.
1444         (WI.RecordingContentView.prototype.async _generateContentCanvasWebGL): Deleted.
1445
1446         * UserInterface/Views/RecordingContentView.css:
1447         (.content-view:not(.tab).recording > .preview-container):
1448
1449         * UserInterface/Base/ImageUtilities.js:
1450         (WI.ImageUtilities.supportsCanvasPathDebugging):
1451
1452 2018-04-26  Jer Noble  <jer.noble@apple.com>
1453
1454         Unreviewed build fix; fix WebInspectorUI copy resources step after r231063.
1455
1456         * Configurations/Base.xcconfig:
1457
1458 2018-04-26  Jer Noble  <jer.noble@apple.com>
1459
1460         WK_COCOA_TOUCH all the things.
1461         https://bugs.webkit.org/show_bug.cgi?id=185006
1462
1463         Reviewed by Tim Horton.
1464
1465         * Configurations/WebInspectorUIFramework.xcconfig:
1466
1467 2018-04-21  Nikita Vasilyev  <nvasilyev@apple.com>
1468
1469         REGRESSION(r214076): Web Inspector: Timelines load and DOMContentLoaded markers aren't visible
1470         https://bugs.webkit.org/show_bug.cgi?id=184858
1471
1472         Reviewed by Brian Burg.
1473
1474         r214076 changed the color of all markers to light gray.
1475
1476         * UserInterface/Views/TimelineRuler.css:
1477         (.timeline-ruler > .markers > .marker):
1478         (body[dir=ltr] .timeline-ruler > .markers > .marker):
1479         (body[dir=rtl] .timeline-ruler > .markers > .marker):
1480         (.timeline-ruler > .markers > .marker.current-time):
1481         (.timeline-ruler > .markers > .marker.load-event):
1482         (.timeline-ruler > .markers > .marker.dom-content-event):
1483         (.timeline-ruler > .markers > .marker.timestamp):
1484         (body[dir=ltr] .timeline-ruler > .markers > .marker.current-time): Deleted.
1485         (body[dir=rtl] .timeline-ruler > .markers > .marker.current-time): Deleted.
1486
1487 2018-04-19  Chris Dumez  <cdumez@apple.com>
1488
1489         Rename JSDOMWindowProxy to JSWindowProxy
1490         https://bugs.webkit.org/show_bug.cgi?id=184797
1491
1492         Reviewed by Sam Weinig.
1493
1494         Rename JSDOMWindowProxy to JSWindowProxy for consistency with WindowProxy.
1495
1496         * UserInterface/Workers/HeapSnapshot/HeapSnapshot.js:
1497         (HeapSnapshot.prototype._isNodeGlobalObject):
1498
1499 2018-04-19  David Kilzer  <ddkilzer@apple.com>
1500
1501         Enable Objective-C weak references
1502         <https://webkit.org/b/184789>
1503         <rdar://problem/39571716>
1504
1505         Reviewed by Dan Bernstein.
1506
1507         * Configurations/Base.xcconfig:
1508         (CLANG_ENABLE_OBJC_WEAK): Enable.
1509
1510 2018-04-16  Nikita Vasilyev  <nvasilyev@apple.com>
1511
1512         Web Inspector: Can't select and copy text from Network tab popover
1513         https://bugs.webkit.org/show_bug.cgi?id=184606
1514
1515         Reviewed by Matt Baker.
1516
1517         * UserInterface/Views/ResourceTimingBreakdownView.css:
1518         (.waterfall-popover .resource-timing-breakdown):
1519
1520 2018-04-12  Nikita Vasilyev  <nvasilyev@apple.com>
1521
1522         Web Inspector: Refactoring: move popover styles from JS to CSS
1523         https://bugs.webkit.org/show_bug.cgi?id=184558
1524
1525         Reviewed by Brian Burg.
1526
1527         Introduce several CSS variables to customize popover appearance in CSS
1528         and not JavaScript.
1529
1530         * UserInterface/Views/NetworkTableContentView.js:
1531         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
1532         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
1533         * UserInterface/Views/Popover.css:
1534         (.popover):
1535         * UserInterface/Views/Popover.js:
1536         (WI.Popover):
1537         (WI.Popover.prototype._drawBackground):
1538         Replace `var` with `let`.
1539
1540         (WI.Popover.prototype.get backgroundStyle): Deleted.
1541         (WI.Popover.prototype.set backgroundStyle): Deleted.
1542         * UserInterface/Views/ResourceTimingBreakdownView.css:
1543         (.popover.waterfall-popover):
1544         (.waterfall-popover-content .resource-timing-breakdown):
1545         (.waterfall-popover .resource-timing-breakdown): Deleted.
1546
1547         * UserInterface/Views/NetworkTableContentView.js:
1548         (WI.NetworkTableContentView.prototype._waterfallPopoverContentForResource):
1549         (WI.NetworkTableContentView.prototype._handleMousedownWaterfall):
1550         * UserInterface/Views/Popover.css:
1551         (.popover):
1552         * UserInterface/Views/Popover.js:
1553         (WI.Popover):
1554         (WI.Popover.prototype._drawBackground):
1555         * UserInterface/Views/ResourceTimingBreakdownView.css:
1556         (.popover.waterfall-popover):
1557         (.waterfall-popover-content .resource-timing-breakdown):
1558
1559 2018-04-07  Nikita Vasilyev  <nvasilyev@apple.com>
1560
1561         Web Inspector: Errors glyph doesn't fully change to blue when active
1562         https://bugs.webkit.org/show_bug.cgi?id=184389
1563
1564         Reviewed by Joseph Pecoraro.
1565
1566         The dot of the exclamation mark was always black.
1567
1568         * UserInterface/Images/Errors.svg:
1569
1570 2018-04-03  Aaron Chu  <aaron_chu@apple.com>
1571
1572         AX: Add Experimental setting for Accessibility Audit
1573         https://bugs.webkit.org/show_bug.cgi?id=183646
1574         <rdar://problem/38478583>
1575
1576         Reviewed by Brian Burg.
1577
1578         Added experimental feature flag for Accessibility Audit work.
1579
1580         * Localizations/en.lproj/localizedStrings.js:
1581         * UserInterface/Base/Setting.js:
1582         * UserInterface/Views/SettingsTabContentView.js:
1583         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
1584
1585 2018-04-01  Matt Baker  <mattbaker@apple.com>
1586
1587         Web Inspector: Remove dead TabBrowser/TabContentView code
1588         https://bugs.webkit.org/show_bug.cgi?id=184104
1589
1590         Reviewed by Devin Rousso.
1591
1592         * UserInterface/Base/Main.js:
1593         (WI._tryToRestorePendingTabs):
1594         * UserInterface/Views/NewTabContentView.js:
1595         (WI.NewTabContentView.prototype.shown):
1596         (WI.NewTabContentView.prototype.hidden):
1597         * UserInterface/Views/TabBrowser.js:
1598         (WI.TabBrowser.prototype.addTabForContentView):
1599         (WI.TabBrowser.prototype.showTabForContentView):
1600         (WI.TabBrowser._tabBarItemRemoved):
1601         * UserInterface/Views/TabContentView.js:
1602         (WI.TabContentView.prototype.get parentTabBrowser): Deleted.
1603         (WI.TabContentView.prototype.set parentTabBrowser): Deleted.
1604
1605 2018-03-30  Devin Rousso  <webkit@devinrousso.com>
1606
1607         Web Inspector: tint all pixels drawn by shader program when hovering ShaderProgramTreeElement
1608         https://bugs.webkit.org/show_bug.cgi?id=175223
1609
1610         Reviewed by Matt Baker.
1611
1612         * UserInterface/Models/ShaderProgram.js:
1613         (WI.ShaderProgram):
1614         (WI.ShaderProgram.prototype.showHighlight):
1615         (WI.ShaderProgram.prototype.hideHighlight):
1616
1617         * UserInterface/Views/ShaderProgramTreeElement.js:
1618         (WI.ShaderProgramTreeElement.prototype.onattach):
1619         (WI.ShaderProgramTreeElement.prototype._handleMouseOver):
1620         (WI.ShaderProgramTreeElement.prototype._handleMouseOut):
1621         Whenever a ShaderProgramTreeElement is hovered, highlight the corresponding shader program
1622         by tinting the pixels it draws via a blend.
1623
1624 2018-03-27  Timothy Hatcher  <timothy@apple.com>
1625
1626         Web Inspector: Modernize some utility functions
1627         https://bugs.webkit.org/show_bug.cgi?id=184047
1628
1629         Reviewed by Matt Baker.
1630
1631         * UserInterface/Base/Utilities.js:
1632         (Node.prototype.enclosingNodeOrSelfWithClass): Use parentElement instead of parentNode, so we don't need to check for document.
1633         (Node.prototype.enclosingNodeOrSelfWithNodeNameInArray): Ditto. Also just toUpperCase input, since nodeName is already upper case.
1634         (String.prototype.escapeCharacters): Use Set and string iteration instead of indexOf and charAt.
1635
1636 2018-03-27  Nikita Vasilyev  <nvasilyev@apple.com>
1637
1638         Web Inspector: Command-Shift-left/right arrow keys should not switch tabs when focused on color picker text fields
1639         https://bugs.webkit.org/show_bug.cgi?id=184028
1640
1641         Reviewed by Timothy Hatcher.
1642
1643         * UserInterface/Views/EditingSupport.js:
1644         (WI.isEventTargetAnEditableField):
1645         Detect <input type="number"> as an editable text field.
1646
1647 2018-03-23  Nikita Vasilyev  <nvasilyev@apple.com>
1648
1649         Web Inspector: Styles: don't show checkboxes for invalid properties
1650         https://bugs.webkit.org/show_bug.cgi?id=183951
1651         <rdar://problem/38807602>
1652
1653         Reviewed by Matt Baker.
1654
1655         Since toggling of invalid properties isn't supported by the backend, don't show checkboxes for invalid properties.
1656
1657         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
1658         (.spreadsheet-css-declaration:matches(:hover, :focus) .property:not(:matches(.invalid-name, .invalid-value)) .property-toggle,):
1659         (.spreadsheet-css-declaration:matches(:hover, :focus) .property-toggle,): Deleted.
1660         Don't show checkboxes for invalid properties but still show them for duplicate properties.
1661
1662 2018-03-23  Brian Burg  <bburg@apple.com>
1663
1664         Web Inspector: add WebKitAdditions hooks for WebInspectorUI
1665         https://bugs.webkit.org/show_bug.cgi?id=183940
1666         <rdar://problem/38796310>
1667
1668         Reviewed by Timothy Hatcher.
1669
1670         * Scripts/combine-resources.pl:
1671         (debugLog): Added. Leave in the logging I used to debug this.
1672
1673         (concatenateIncludedFilesMatchingPattern):
1674         (stripIncludedFilesMatchingPattern):
1675         (concatenateFiles): Deleted.
1676         This function tried to do too many things. Split it into
1677         two functions, one for stripping includes and one for concatenating
1678         files referenced by includes.
1679
1680         Lastly, add a negative lookahead clause for 'WebKitAdditions' so includes
1681         containing that string are not combined when no input directory is passed
1682         to the script.
1683
1684         * Scripts/copy-user-interface-resources.pl:
1685         WebKitAdditions is computed either from BUILT_PRODUCTS_DIR or SDKROOT,
1686         depending on the build style. Just try them in order and use the first
1687         one that exists. WebInspectorUI files are in their own directory, so
1688         we can assume there are files to process if that directory exists.
1689
1690         Copy Main.html to derived sources before doing any processing on it.
1691         This makes all combining phases have the same --input-html argument.
1692
1693         (debugLog): Added. Leave in the logging I used to debug this.
1694
1695         (combineOrStripResourcesForWebKitAdditions):
1696         (stripResourcesForWebKitAdditions):
1697         (combineResourcesForWebKitAdditions):
1698         Determine if WebKitAdditions exists and whether there are any
1699         resources for WebInspectorUI present that need to be processed.
1700
1701         * UserInterface/Main.html:
1702         Add stub .js and .css WebKitAdditions files. We can add more later
1703         if it makes sense but this is good enough to validate the build machinery.
1704
1705 2018-03-23  Nikita Vasilyev  <nvasilyev@apple.com>
1706
1707         Web Inspector: Styles Redesign: flashing when switching between nodes
1708         https://bugs.webkit.org/show_bug.cgi?id=179291
1709         <rdar://problem/35352660>
1710
1711         Reviewed by Matt Baker.
1712
1713         Flashing was happening because the layout was a two-step process:
1714         1. Append empty sections.
1715         2. Layout everything inside of the section on requestAnimationFrame.
1716
1717         SpreadsheetRulesStyleDetailsPanel was converted to use layout method,
1718         so both steps happen on requestAnimationFrame.
1719
1720         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
1721         (WI.SpreadsheetRulesStyleDetailsPanel):
1722         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.refresh):
1723         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.layout):
1724         The removed lines from the refresh method moved to the layout method without any changes.
1725
1726 2018-03-22  Nikita Vasilyev  <nvasilyev@apple.com>
1727
1728         Uncaught Exception: TypeError: this._textEditor.toggleUnexecutedCodeHighlights().then is not a function
1729         https://bugs.webkit.org/show_bug.cgi?id=181912
1730         <rdar://problem/36700022>
1731
1732         Reviewed by Matt Baker.
1733
1734         The uncaught exception was caused by returning `false` instead of a promise object.
1735         This patch only fixes the exception. Further enhancements should be done in <https://webkit.org/b/183887>.
1736
1737         * UserInterface/Views/SourceCodeTextEditor.js:
1738         (WI.SourceCodeTextEditor.prototype.toggleTypeAnnotations):
1739         (WI.SourceCodeTextEditor.prototype.toggleUnexecutedCodeHighlights):
1740
1741 2018-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
1742
1743         Web Inspector: Styles: Loses focus when editing a property while page is being loaded
1744         https://bugs.webkit.org/show_bug.cgi?id=182619
1745         <rdar://problem/37363185>
1746
1747         Reviewed by Matt Baker.
1748
1749         Adding or removing a stylesheet causes SpreadsheetRulesStyleDetailsPanel to refresh, triggering a layout
1750         of all SpreadsheetCSSStyleDeclarationSection child views. This resets the focus, selection, and
1751         auto-completion state.
1752
1753         This patch prevents SpreadsheetCSSStyleDeclarationSection from performing a layout when a property is being edited.
1754
1755         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
1756         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
1757         Allow re-layout after creating a blank CSS property and pasting CSS code.
1758         - _pendingAddBlankPropertyIndexOffset is a number after pasting CSS rules.
1759         - _propertyPendingStartEditing is a property model after creating a new property.
1760
1761 2018-03-20  Devin Rousso  <webkit@devinrousso.com>
1762
1763         Web Inspector: Session dividers are not added when Console tab is not visible
1764         https://bugs.webkit.org/show_bug.cgi?id=168622
1765
1766         Reviewed by Matt Baker.
1767
1768         Restructure `_pendingMessages` to be a `Map [ConsoleSession, ConsoleMessageView]`. Instead
1769         of rendering to the `_currentConsoleGroup`, we now render to the saved `ConsoleSession`.
1770         Also ensure that `_pendingMessages` is cleared when navigating and "Preserve Log" is off.
1771
1772         * UserInterface/Controllers/JavaScriptLogViewController.js:
1773         (WI.JavaScriptLogViewController):
1774         (WI.JavaScriptLogViewController.prototype.startNewSession):
1775         (WI.JavaScriptLogViewController.prototype.consolePromptHistoryDidChange):
1776         (WI.JavaScriptLogViewController.prototype._appendConsoleMessageView):
1777         (WI.JavaScriptLogViewController.prototype.renderPendingMessages):
1778         (WI.JavaScriptLogViewController.prototype.get prompt): Deleted.
1779         (WI.JavaScriptLogViewController.prototype.get currentConsoleGroup): Deleted.
1780
1781 2018-03-20  Nikita Vasilyev  <nvasilyev@apple.com>
1782
1783         Web Inspector: Can't add a new class by editing class attribute in DOM outline
1784         https://bugs.webkit.org/show_bug.cgi?id=180890
1785
1786         Reviewed by Ryosuke Niwa.
1787
1788         Typing "my-foo my-bar" creates a single "my-foo\xA0my-bar" class name because
1789         contentEditable-based attribute editor sometimes inserts non-breaking space characters (\xA0).
1790
1791         Replace all non-breaking space characters with the regular space characters when
1792         commiting attribute change.
1793
1794         * UserInterface/Views/DOMTreeElement.js:
1795
1796 2018-03-16  Nikita Vasilyev  <nvasilyev@apple.com>
1797
1798         Web Inspector: Elements: "Force Print Media Styles" should not persist across Web Inspector sessions
1799         https://bugs.webkit.org/show_bug.cgi?id=183708
1800         <rdar://problem/36452183>
1801
1802         Reviewed by Matt Baker.
1803
1804         * UserInterface/Base/Main.js:
1805         (WI.loaded):
1806         * UserInterface/Views/DOMTreeContentView.js:
1807         (WI.DOMTreeContentView):
1808         (WI.DOMTreeContentView.prototype._showPrintStylesChanged):
1809         (WI.DOMTreeContentView.prototype._togglePrintStyles):
1810         (WI.DOMTreeContentView.prototype._showPrintStylesSettingChanged): Deleted.
1811         (WI.DOMTreeContentView.prototype._togglePrintStylesSetting): Deleted.
1812
1813 2018-03-14  Devin Rousso  <webkit@devinrousso.com>
1814
1815         Web Inspector: Canvas: a recording initiated by the user should be shown immediately on completion
1816         https://bugs.webkit.org/show_bug.cgi?id=183647
1817         <rdar://problem/38479187>
1818
1819         Reviewed by Matt Baker.
1820
1821         When recordings are initiated via `console.record`, we don't want to automatically show the
1822         recording after it's payload is sent to the frontend. We determine whether a recording came
1823         from the console by comparing the recording's associated canvas with the current value of
1824         `_recordingCanvas`. Previously, when stopping a recording, we would always null the value,
1825         which meant that all non-single-frame recordings (single-frame recordings are stopped by
1826         the agent after the first paint or tick after an action is performed) would be categorized
1827         as coming from the console, since `_recordingCanvas` would be null by the time the frontend
1828         recieved the payload.
1829
1830         This patch changes it so that the nulling of `_recordingCanvas` in `stopRecording` is only
1831         done if the agent command errors. It was already the case that `_recordingCanvas` was nulled
1832         in `stopRecording`, so this patch just prevents it from being nulled too early.
1833
1834         * UserInterface/Controllers/CanvasManager.js:
1835         (WI.CanvasManager.prototype.stopRecording):
1836
1837 2018-03-12  Jon Davis  <jond@apple.com>
1838
1839         Web Inspector: Remove redundant tooltips
1840         https://bugs.webkit.org/show_bug.cgi?id=183099
1841
1842         Reviewed by Matt Baker.
1843
1844         * Localizations/en.lproj/localizedStrings.js:
1845         * UserInterface/Base/Main.js:
1846         (WI.contentLoaded):
1847         Instantiate ConsoleDrawer so the keyboard shortcuts for FindBanner are available.
1848
1849         * UserInterface/Views/BreakpointTreeElement.js:
1850         (WI.BreakpointTreeElement):
1851         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1852
1853         * UserInterface/Views/ButtonNavigationItem.js:
1854         (WI.ButtonNavigationItem):
1855         Only show tooltips when the button style is an image.
1856
1857         * UserInterface/Views/ConsoleDrawer.js:
1858         (WI.ConsoleDrawer):
1859         (WI.ConsoleDrawer.prototype.toggleButtonShortcutTooltip):
1860         Added helper to set the toggle button keyboard shortcut tooltip.
1861
1862         * UserInterface/Views/DOMBreakpointTreeElement.js:
1863         (WI.DOMBreakpointTreeElement):
1864         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1865
1866         * UserInterface/Views/DOMNodeTreeElement.js:
1867         (WI.DOMNodeTreeElement):
1868         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1869
1870         * UserInterface/Views/FindBanner.js:
1871         (WI.FindBanner):
1872         * UserInterface/Views/HierarchicalPathComponent.js:
1873         (WI.HierarchicalPathComponent):
1874         (WI.HierarchicalPathComponent.prototype.get tooltip):
1875         (WI.HierarchicalPathComponent.prototype.set tooltip):
1876         (WI.HierarchicalPathComponent.prototype.get hideTooltip):
1877         (WI.HierarchicalPathComponent.prototype.set hideTooltip):
1878         (WI.HierarchicalPathComponent.prototype._updateElementTitleAndText):
1879         Add tooltip management features to manage tooltips separately of the displayName,
1880         and provide a behavior to hide tooltips while retaining the tooltip data.
1881
1882         * UserInterface/Views/HierarchicalPathNavigationItem.js:
1883         (WI.HierarchicalPathNavigationItem.prototype.updateLayout):
1884         Hide tooltips when fully visible, show tooltips for collapsed items.
1885
1886         * UserInterface/Views/PinnedTabBarItem.js:
1887         (WI.PinnedTabBarItem.prototype.titleDidChange):
1888         Set tooltips for pinned tab bar items.
1889
1890         * UserInterface/Views/QuickConsole.js:
1891         (WI.QuickConsole):
1892         Set the ConsoleDrawer toggle button tooltip after the keyboard shortcut is registered.
1893
1894         * UserInterface/Views/StorageTreeElement.js:
1895         (WI.StorageTreeElement):
1896         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1897
1898         * UserInterface/Views/TabBarItem.js:
1899         (WI.TabBarItem.prototype.get title):
1900         (WI.TabBarItem.prototype.set title):
1901         (WI.TabBarItem.prototype.titleDidChange):
1902         (WI.TabBarItem):
1903         Add title property management with an overridable titleDidChange handler for
1904         setting tooltips when needed.
1905
1906         * UserInterface/Views/TimelineTreeElement.js:
1907         (WI.TimelineTreeElement):
1908         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1909
1910         * UserInterface/Views/ToggleButtonNavigationItem.js:
1911         (WI.ToggleButtonNavigationItem.prototype.set defaultToolTip):
1912         Added a setter for manging the default tooltip of a toggle button.
1913
1914         * UserInterface/Views/XHRBreakpointTreeElement.js:
1915         (WI.XHRBreakpointTreeElement):
1916         Suppress tooltips by setting the tooltipHandledSeprately flag with no custom handler.
1917
1918 2018-03-09  Nikita Vasilyev  <nvasilyev@apple.com>
1919
1920         Web Inspector: Sources: Open all resources in Sources tab instead of Resources/Debugger
1921         https://bugs.webkit.org/show_bug.cgi?id=183317
1922         <rdar://problem/38108455>
1923
1924         Reviewed by Matt Baker.
1925
1926         * Localizations/en.lproj/localizedStrings.js:
1927         * UserInterface/Base/Main.js:
1928         * UserInterface/Views/ContextMenuUtilities.js:
1929         (WI.appendContextMenuItemsForURL):
1930         Introduce preferredTabType option instead of listing ignoreResourcesTab, ignoreDebuggerTab, ignoreSearchTab, and ignoreNetworkTab.
1931         The only correct outcome of selecting "Reveal in Sources Tab" context menu is to open Sources tab, not any other tab.
1932
1933         * UserInterface/Views/SourceCodeTextEditor.js:
1934         (WI.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):
1935         * UserInterface/Views/TabBrowser.js:
1936         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
1937
1938 2018-03-08  Nikita Vasilyev  <nvasilyev@apple.com>
1939
1940         Web Inspector: Sources: add SourcesTabContentView and SourceSidebarPanel classes
1941         https://bugs.webkit.org/show_bug.cgi?id=183316
1942         <rdar://problem/38107639>
1943
1944         Reviewed by Matt Baker.
1945
1946         Add Sources tab and sidebar panel, which are copies of the corresponding Resources classes.
1947         The Sources tab is shown when it's enabled in the experimental settings. This patch doesn't
1948         remove existing Resources and Debugger tabs.
1949
1950         * UserInterface/Base/Main.js:
1951         (WI.contentLoaded):
1952         * UserInterface/Main.html:
1953         * UserInterface/Views/SourcesSidebarPanel.css: Added.
1954         (.sidebar > .panel.navigation.sources > .content):
1955         (.sidebar > .panel.navigation.sources > .navigation-bar):
1956         * UserInterface/Views/SourcesSidebarPanel.js: Added.
1957         (WI.SourcesSidebarPanel):
1958         (WI.SourcesSidebarPanel.shouldPlaceResourcesAtTopLevel):
1959         (WI.SourcesSidebarPanel.prototype.get minimumWidth):
1960         (WI.SourcesSidebarPanel.prototype.closed):
1961         (WI.SourcesSidebarPanel.prototype.showDefaultContentView):
1962         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject.isAncestor):
1963         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject.getParent):
1964         (WI.SourcesSidebarPanel.prototype.treeElementForRepresentedObject):
1965         (WI.SourcesSidebarPanel.prototype.initialLayout):
1966         (WI.SourcesSidebarPanel.prototype.hasCustomFilters):
1967         (WI.SourcesSidebarPanel.prototype.matchTreeElementAgainstCustomFilters.match):
1968         (WI.SourcesSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
1969         (WI.SourcesSidebarPanel.prototype._mainResourceDidChange):
1970         (WI.SourcesSidebarPanel.prototype._mainFrameDidChange):
1971         (WI.SourcesSidebarPanel.prototype._mainFrameMainResourceDidChange.delayedWork):
1972         (WI.SourcesSidebarPanel.prototype._mainFrameMainResourceDidChange):
1973         (WI.SourcesSidebarPanel.prototype._scriptWasAdded):
1974         (WI.SourcesSidebarPanel.prototype._addScript):
1975         (WI.SourcesSidebarPanel.prototype._scriptWasRemoved):
1976         (WI.SourcesSidebarPanel.prototype._scriptsCleared):
1977         (WI.SourcesSidebarPanel.prototype._styleSheetAdded):
1978         (WI.SourcesSidebarPanel.prototype._addTargetWithMainResource):
1979         (WI.SourcesSidebarPanel.prototype._targetRemoved):
1980         (WI.SourcesSidebarPanel.prototype._treeSelectionDidChange):
1981         (WI.SourcesSidebarPanel.prototype._compareTreeElements):
1982         (WI.SourcesSidebarPanel.prototype._extraDomainsActivated):
1983         (WI.SourcesSidebarPanel.prototype._scopeBarSelectionDidChange):
1984         * UserInterface/Views/SourcesTabContentView.js: Added.
1985         (WI.SourcesTabContentView):
1986         (WI.SourcesTabContentView.tabInfo):
1987         (WI.SourcesTabContentView.isTabAllowed):
1988         (WI.SourcesTabContentView.prototype.get type):
1989         (WI.SourcesTabContentView.prototype.get supportsSplitContentBrowser):
1990         (WI.SourcesTabContentView.prototype.canShowRepresentedObject):
1991
1992 2018-03-07  Devin Rousso  <webkit@devinrousso.com>
1993
1994         Web Inspector: Canvas tab: ensure that the Recording TreeOutline has a specified height for virtualization
1995         https://bugs.webkit.org/show_bug.cgi?id=183015
1996
1997         Reviewed by Matt Baker.
1998
1999         * UserInterface/Views/CanvasSidebarPanel.js:
2000         (WI.CanvasSidebarPanel):
2001
2002         * UserInterface/Views/CanvasSidebarPanel.css:
2003         (.sidebar > .panel.navigation.canvas > .content):
2004         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
2005         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .recording-content):
2006         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
2007         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar): Deleted.
2008         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas): Deleted.
2009
2010         * UserInterface/Views/TreeElement.js:
2011         (WI.TreeElement.prototype._detach):
2012
2013 2018-02-26  Devin Rousso  <webkit@devinrousso.com>
2014
2015         Web Inspector: Canvas Tab: Scroll into view / Inspect element if Canvas has DOM node
2016         https://bugs.webkit.org/show_bug.cgi?id=181769
2017
2018         Reviewed by Matt Baker.
2019
2020         * Localizations/en.lproj/localizedStrings.js:
2021
2022         * UserInterface/Images/Markup.svg: Added.
2023
2024         * UserInterface/Views/CanvasContentView.js:
2025         (WI.CanvasContentView):
2026         (WI.CanvasContentView.prototype.initialLayout):
2027         (WI.CanvasContentView.prototype._canvasElementButtonClicked):
2028
2029 2018-02-19  Matt Baker  <mattbaker@apple.com>
2030
2031         Web Inspector: Canvas tab: hide navigation sidebar when viewing the overview
2032         https://bugs.webkit.org/show_bug.cgi?id=182597
2033         <rdar://problem/37341564>
2034
2035         Reviewed by Devin Rousso.
2036
2037         Support showing/hiding the navigation sidebar panel based on the current
2038         represented object. Individual TabContentViews can opt-in to this behavior,
2039         by overriding TabContentView.prototype.managesNavigationSidebarPanel.
2040
2041         * UserInterface/Views/CanvasSidebarPanel.js:
2042         (WI.CanvasSidebarPanel.prototype.canShowRepresentedObject):
2043         * UserInterface/Views/CanvasTabContentView.js:
2044         (WI.CanvasTabContentView.prototype.get managesNavigationSidebarPanel):
2045         Hide the Canvas navigation sidebar when viewing the overview.
2046
2047         * UserInterface/Views/ContentBrowserTabContentView.js:
2048         (WI.ContentBrowserTabContentView):
2049         (WI.ContentBrowserTabContentView.prototype.showNavigationSidebarPanel):
2050         (WI.ContentBrowserTabContentView.prototype._navigationSidebarCollapsedStateDidChange):
2051         (WI.ContentBrowserTabContentView.prototype._contentBrowserCurrentRepresentedObjectsDidChange):
2052
2053         * UserInterface/Views/NavigationSidebarPanel.js:
2054         (WI.NavigationSidebarPanel.prototype.canShowRepresentedObject):
2055         Provide default implementation that just defers to the TabContentView.
2056         This exists so that a NavigationSidebarPanel that implements canShowRepresentedObject
2057         will have a meaningful default to fall back on.
2058
2059         * UserInterface/Views/TabBrowser.js:
2060         (WI.TabBrowser.prototype._sidebarCollapsedStateDidChange):
2061         (WI.TabBrowser.prototype._showNavigationSidebarPanelForTabContentView):
2062
2063         * UserInterface/Views/TabContentView.js:
2064         (WI.TabContentView.prototype.get managesNavigationSidebarPanel):
2065
2066 2018-02-16  Matt Baker  <mattbaker@apple.com>
2067
2068         Web Inspector: TabBar redesign: remove top-level search field and pin the Search tab
2069         https://bugs.webkit.org/show_bug.cgi?id=182353
2070         <rdar://problem/37088644>
2071
2072         Reviewed by Devin Rousso.
2073
2074         * Localizations/en.lproj/localizedStrings.js:
2075
2076         * UserInterface/Base/Main.js:
2077         (WI.contentLoaded):
2078         Create Search UI based on experimental setting. When the new TabBar is
2079         enabled, the Search tab is a pinned tab. Since it is also saveable, it
2080         needs to be added to the TabBrowser (the browser adds the item to the bar).
2081
2082         When restoring saved tabs, make an additional check to prevent a tab
2083         from being added twice. This can occur now that the Search tab is pinned.
2084
2085         * UserInterface/Images/Search.svg:
2086         Update art to better match Safari/macOS. Slightly increase the radius of
2087         the lens, and shorten the length of the handle.
2088
2089         * UserInterface/Views/GoToLineDialog.css:
2090         (.go-to-line-dialog > div::before):
2091         Update styles for new Search icon.
2092
2093         * UserInterface/Views/LegacyTabBar.js:
2094         (WI.LegacyTabBar.prototype.get saveableTabCount):
2095         Backported new TabBar method which is called by TabBrowser.
2096
2097         * UserInterface/Views/OpenResourceDialog.css:
2098         (.open-resource-dialog > .field::before):
2099         Update styles for new Search icon.
2100
2101         * UserInterface/Views/PinnedTabBarItem.js:
2102         (WI.PinnedTabBarItem.prototype.fromTabInfo):
2103         Match GeneralTabBarItem.fromTabInfo.
2104
2105         * UserInterface/Views/SearchTabContentView.js:
2106         (WI.SearchTabContentView):
2107         (WI.SearchTabContentView.tabInfo):
2108         New image (magnifying glass without border) when new TabBar is enabled.
2109
2110         * UserInterface/Views/SettingsTabContentView.js:
2111         (WI.SettingsTabContentView):
2112
2113         * UserInterface/Views/TabBar.js:
2114         (WI.TabBar):
2115         Move creation of the Settings item out of TabBar. The TabBar should
2116         only be concerned with managing tabs.
2117
2118         (WI.TabBar.prototype.get saveableTabCount):
2119         (WI.TabBar.prototype._handleContextMenu):
2120         (WI.TabBar.prototype.get normalNonEphemeralTabCount): Deleted.
2121         Now that the Search tab is pinned, there aren't any normal tabs that
2122         are also ephemeral. For the LegacyTabBar, both the Search and New Tab
2123         tabs are still in this category.
2124
2125         * UserInterface/Views/TabBrowser.js:
2126         (WI.TabBrowser.prototype.addTabForContentView):
2127         (WI.TabBrowser.prototype.closeTabForContentView):
2128         (WI.TabBrowser.prototype._tabBarItemSelected):
2129         (WI.TabBrowser._tabBarItemRemoved):
2130         Recent tab list should be validated against the list of saveable tabs,
2131         since the Search tab is no longer a normal tab (a GeneralTabBarItem),
2132         but is still persisted across Inspector sessions.
2133
2134 2018-02-16  Matt Baker  <mattbaker@apple.com>
2135
2136         Web Inspector: TabBar redesign: TabBarItem close button is incorrectly positioned
2137         https://bugs.webkit.org/show_bug.cgi?id=182844
2138         <rdar://problem/37586749>
2139
2140         Reviewed by Timothy Hatcher.
2141
2142         * UserInterface/Views/GeneralTabBarItem.js:
2143         (WI.GeneralTabBarItem.prototype.set title):
2144         Insert the title before the last flexible space item.
2145
2146         * UserInterface/Views/TabBar.css:
2147         (.tab-bar > .item):
2148         (.tab-bar > .item > .close):
2149         (.tab-bar > .item > .flex-space):
2150         (.tab-bar > .item.ephemeral > .flex-space:last-child):
2151         (.tab-bar.collapsed > .item):
2152         (.tab-bar.collapsed > .item > .flex-space):
2153         (.tab-bar.collapsed > .item > .close):
2154         (.tab-bar.collapsed > .item:hover > .close):
2155         (.tab-bar.collapsed > .item.ephemeral:hover > .icon):
2156         (.tab-bar > .item:hover > .close): Deleted.
2157         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon): Deleted.
2158
2159         * UserInterface/Views/TabBarItem.js:
2160         (WI.TabBarItem):
2161         Restore flexible space items before and after the icon.
2162
2163 2018-02-14  Nikita Vasilyev  <nvasilyev@apple.com>
2164
2165         Web Inspector: Styles: completion popover doesn't hide when switching panels
2166         https://bugs.webkit.org/show_bug.cgi?id=182464
2167         <rdar://problem/37202763>
2168
2169         Reviewed by Timothy Hatcher.
2170
2171         Save the position of the anchor, an element the popover is shown for, and hide the completion popover
2172         when the position changes.
2173
2174         * UserInterface/Views/CompletionSuggestionsView.js:
2175         (WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves):
2176         When the popover is visible, check every 200ms if the anchor moved.
2177
2178         (WI.CompletionSuggestionsView.prototype.hide):
2179         * UserInterface/Views/SpreadsheetTextField.js:
2180         (WI.SpreadsheetTextField.prototype._updateCompletions):
2181         (WI.SpreadsheetTextField.prototype._getCaretRect):
2182         getBoundingClientRect returns {x: 0, y: 0} when it can't determine node's position.
2183         This happens when a node isn't attached to DOM, attached to DOM but not visible, and
2184         a number of odd cases.
2185
2186 2018-02-14  Matt Baker  <mattbaker@apple.com>
2187
2188         Web Inspector: TabBar redesign: only show allowed tabs in the available tabs context menu
2189         https://bugs.webkit.org/show_bug.cgi?id=182721
2190         <rdar://problem/37479019>
2191
2192         Reviewed by Timothy Hatcher.
2193
2194         In addition to only including allowed tabs in the TabBar context menu,
2195         perform a sanity check when setting the selected tab item, since the
2196         serialized selection index could refer to a tab that is no longer allowed.
2197
2198         * UserInterface/Views/LegacyTabBar.js:
2199         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
2200         (WI.LegacyTabBar.prototype._handleContextMenu):
2201
2202         * UserInterface/Views/TabBar.js:
2203         (WI.TabBar.prototype.set selectedTabBarItem):
2204         (WI.TabBar.prototype._handleContextMenu):
2205
2206 2018-02-09  Matt Baker  <mattbaker@apple.com>
2207
2208         Web Inspector: Canvas tab: tree selection abruptly changes when selecting a recording frame
2209         https://bugs.webkit.org/show_bug.cgi?id=182667
2210         <rdar://problem/37412639>
2211
2212         Reviewed by Devin Rousso.
2213
2214         * UserInterface/Views/CanvasSidebarPanel.css:
2215         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .navigation-bar):
2216         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
2217         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.recording > .icon):
2218         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .icon):
2219         (.sidebar > .panel.navigation.canvas > .content > .recording-content > .tree-outline .item.folder-icon > .status):
2220         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar): Deleted.
2221         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon): Deleted.
2222         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon): Deleted.
2223         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status): Deleted.
2224         Style changes for the additional DOM element required to virtualize the recording tree outline.
2225
2226         * UserInterface/Views/CanvasSidebarPanel.js:
2227         (WI.CanvasSidebarPanel):
2228         In order to be virtualized, the tree must be the only child of its parent.
2229
2230         (WI.CanvasSidebarPanel.prototype.set action):
2231         Ensure that a frame tree element isn't deselected when the last action
2232         in the frame becomes selected in the RecordingContentView.
2233
2234         (WI.CanvasSidebarPanel.prototype.shown):
2235         Refresh the sidebar, as represented objects may have changed while hidden.
2236
2237         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
2238         Unset the recording when no valid represented objects are found, to
2239         prevent a stale recording tree from being shown when viewing the overview.
2240
2241         (WI.CanvasSidebarPanel.prototype._canvasChanged):
2242         (WI.CanvasSidebarPanel.prototype._recordingChanged):
2243         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
2244         Moved toggling of the "has-recordings" style to _canvasChanged, since
2245         the navigation bar should be hidden when no canvas exists.
2246
2247         * UserInterface/Views/CollectionContentView.js:
2248         (WI.CollectionContentView.prototype.addContentViewForItem):
2249         (WI.CollectionContentView.prototype.removeContentViewForItem):
2250         Drive by fixes for child view visible state.
2251
2252         * UserInterface/Views/TreeOutline.css:
2253         (.tree-outline:not(.large):matches(:focus, .force-focus) .item.selected .status .indeterminate-progress-spinner):
2254         Make spinner easier to see against the selection background color.
2255
2256 2018-02-09  Matt Baker  <mattbaker@apple.com>
2257
2258         Web Inspector: Object.shallowEqual always fails when comparing array property values
2259         https://bugs.webkit.org/show_bug.cgi?id=182634
2260         <rdar://problem/37374639>
2261
2262         Reviewed by Devin Rousso.
2263
2264         Object.shallowEqual should use Array.shallowEqual when comparing property
2265         values, since strictly comparing objects/arrays is only true if both
2266         operands reference the same Object.
2267
2268         * UserInterface/Base/Utilities.js:
2269         (value):
2270
2271 2018-02-08  Matt Baker  <mattbaker@apple.com>
2272
2273         Web Inspector: add listing of Canvases/Programs/Recordings to the NavigationSidebar
2274         https://bugs.webkit.org/show_bug.cgi?id=178744
2275         <rdar://problem/35374379>
2276
2277         Reviewed by Devin Rousso.
2278
2279         * Localizations/en.lproj/localizedStrings.js:
2280
2281         * UserInterface/Images/Canvas2D.svg:
2282         * UserInterface/Images/Canvas3D.svg:
2283         * UserInterface/Images/Recording.svg:
2284         Update canvas icons to be monochrome. Simplified the recording icon.
2285
2286         * UserInterface/Main.html:
2287
2288         * UserInterface/Models/RecordingAction.js:
2289         (WI.RecordingAction.prototype.get state):
2290         (WI.RecordingAction.prototype.set state):
2291         Allow (2D) snapshot state to be associated with the action. Used by
2292         RecordingActionDetailsSidebarPanel to retrieve the snapshot state.
2293
2294         * UserInterface/Views/CanvasContentView.css:
2295         (.content-view.canvas:not(.tab)):
2296         (.content-view.canvas:not(.tab) > .progress): Deleted.
2297         (.content-view.canvas:not(.tab) > .progress > .frame-count): Deleted.
2298
2299         * UserInterface/Views/CanvasContentView.js:
2300         (WI.CanvasContentView):
2301         (WI.CanvasContentView.prototype.get navigationItems):
2302         (WI.CanvasContentView.prototype.layout):
2303         (WI.CanvasContentView.prototype.shown):
2304         (WI.CanvasContentView.prototype._recordingStarted):
2305         (WI.CanvasContentView.prototype._recordingProgress):
2306         (WI.CanvasContentView.prototype._recordingStopped):
2307         (WI.CanvasContentView.prototype._updateRecordNavigationItem):
2308         (WI.CanvasContentView.prototype._updateProgressView):
2309         Replace progress UI with a reusable ProgressView class.
2310         When in the overview, clicking the CanvasContentView shows a dedicated
2311         CanvasContentView for inspecting shaders and recordings. This behavior
2312         is controlled by CollectionContentView, so we need to prevent it when
2313         clicking inside the header and footer elements, which contain clickable UI.
2314
2315         * UserInterface/Views/CanvasDetailsSidebarPanel.js:
2316         (WI.CanvasDetailsSidebarPanel.prototype.inspect):
2317
2318         * UserInterface/Views/CanvasOverviewContentView.css:
2319         (.content-view.canvas-overview .content-view.canvas):
2320         (.content-view.canvas-overview .content-view.canvas.is-recording):
2321         (.content-view.canvas-overview .content-view.canvas > :matches(header, footer)):
2322         (.content-view.canvas-overview .content-view.canvas > header):
2323         (.content-view.canvas-overview .content-view.canvas.is-recording > header):
2324         (.content-view.canvas-overview .content-view.canvas > header > .navigation-bar):
2325         (.content-view.canvas-overview .content-view.canvas:matches(:hover, .is-recording) > header > .navigation-bar):
2326         (.content-view.canvas-overview .content-view.canvas.is-recording > .progress-view,):
2327         (.content-view.canvas-overview .content-view.canvas.is-recording > .preview):
2328         (.content-view.canvas-overview .content-view.canvas > :matches(header, .progress, .preview, footer)): Deleted.
2329         (.content-view.canvas-overview .content-view.canvas.selected > :matches(.progress, .preview, footer),): Deleted.
2330         (.content-view.canvas-overview .content-view.canvas:not(:hover, .is-recording, .selected) > header > .navigation-bar): Deleted.
2331         (.content-view.canvas-overview .content-view.canvas > :matches(.progress, .preview)): Deleted.
2332         (.content-view.canvas-overview .content-view.canvas > .preview): Deleted.
2333         (.content-view.canvas-overview .content-view.canvas > .progress ~ .preview): Deleted.
2334         Clean up styles, and remove selection styles as canvases are no longer selectable in the overview.
2335
2336         * UserInterface/Views/CanvasOverviewContentView.js:
2337         (WI.CanvasOverviewContentView):
2338         (WI.CanvasOverviewContentView.prototype.get navigationItems):
2339         (WI.CanvasOverviewContentView.prototype.attached):
2340         (WI.CanvasOverviewContentView.prototype.detached):
2341         (WI.CanvasOverviewContentView.prototype.get selectionPathComponents): Deleted.
2342         (WI.CanvasOverviewContentView.prototype._changeSelectedItemVertically): Deleted.
2343         (WI.CanvasOverviewContentView.prototype._changeSelectedItemHorizontally): Deleted.
2344         (WI.CanvasOverviewContentView.prototype._selectionPathComponentsChanged): Deleted.
2345         (WI.CanvasOverviewContentView.prototype._handleUp): Deleted.
2346         (WI.CanvasOverviewContentView.prototype._handleRight): Deleted.
2347         (WI.CanvasOverviewContentView.prototype._handleDown): Deleted.
2348         (WI.CanvasOverviewContentView.prototype._handleLeft): Deleted.
2349         (WI.CanvasOverviewContentView.prototype._handleSpace): Deleted.
2350         (WI.CanvasOverviewContentView.prototype._supplementalRepresentedObjectsDidChange): Deleted.
2351         Disable canvas selection. Remove logic for supplemental represented objects,
2352         path components, and selection keyboard shortcuts.
2353
2354         * UserInterface/Views/CanvasSidebarPanel.css: Added.
2355         (.sidebar > .panel.navigation.canvas > .content):
2356         (.sidebar > .panel.navigation.canvas > .navigation-bar > .item.record-start-stop.disabled):
2357         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.canvas-2d .icon):
2358         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.canvas.webgl .icon):
2359         (.sidebar > .panel.navigation.canvas > .content > .navigation-bar):
2360         (.sidebar > .panel.navigation.canvas.has-recordings > .content > .tree-outline.canvas):
2361         (.sidebar > .panel.navigation.canvas:not(.has-recordings) > .filter-bar,):
2362         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.recording > .icon):
2363         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.shader-program > .icon):
2364         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .icon):
2365         (.sidebar > .panel.navigation.canvas > .content > .tree-outline .item.folder-icon > .status):
2366
2367         * UserInterface/Views/CanvasSidebarPanel.js: Added.
2368         (WI.CanvasSidebarPanel):
2369         (WI.CanvasSidebarPanel.prototype.get canvas):
2370         (WI.CanvasSidebarPanel.prototype.set canvas):
2371         (WI.CanvasSidebarPanel.prototype.set recording):
2372         (WI.CanvasSidebarPanel.prototype.set action):
2373         (WI.CanvasSidebarPanel.prototype.shown):
2374         (WI.CanvasSidebarPanel.prototype.hidden):
2375         (WI.CanvasSidebarPanel.prototype.hasCustomFilters):
2376         (WI.CanvasSidebarPanel.prototype.matchTreeElementAgainstCustomFilters):
2377         (WI.CanvasSidebarPanel.prototype.initialLayout):
2378         (WI.CanvasSidebarPanel.prototype._recordingAdded):
2379         (WI.CanvasSidebarPanel.prototype._recordingRemoved):
2380         (WI.CanvasSidebarPanel.prototype._scopeBarSelectionChanged):
2381         (WI.CanvasSidebarPanel.prototype._toggleRecording):
2382         (WI.CanvasSidebarPanel.prototype._currentRepresentedObjectsDidChange):
2383         (WI.CanvasSidebarPanel.prototype._treeOutlineSelectionDidChange):
2384         (WI.CanvasSidebarPanel.prototype._canvasChanged):
2385         (WI.CanvasSidebarPanel.prototype._recordingChanged):
2386         (WI.CanvasSidebarPanel.prototype._updateRecordNavigationItem):
2387         (WI.CanvasSidebarPanel.prototype._updateRecordingScopeBar):
2388         Add new navigation sidebar, split into two sections. The upper section
2389         contains a tree with a single element for the current canvas, and child
2390         elements for any shader programs. The maximum height of this section is 50%
2391         of the sidebar's height. The lower section contains a tree for the selected
2392         recording, and a scope bar for choosing between recordings.
2393
2394         * UserInterface/Views/CanvasTabContentView.css:
2395         (.content-view.tab.canvas .navigation-bar > .item .canvas-overview .icon):
2396         (.content-view.tab.canvas .navigation-bar > .item .canvas.canvas-2d .icon):
2397         (.content-view.tab.canvas .navigation-bar > .item .canvas.webgl .icon):
2398         (.content-view.tab.canvas .navigation-bar > .item .shader-program > .icon):
2399         (.content-view.tab.canvas .navigation-bar > .item > .hierarchical-path-component > .icon): Deleted.
2400         (.content-view.tab.canvas .navigation-bar > .item .canvas .icon): Deleted.
2401
2402         * UserInterface/Views/CanvasTabContentView.js:
2403         (WI.CanvasTabContentView):
2404         (WI.CanvasTabContentView.prototype.canShowRepresentedObject):
2405         (WI.CanvasTabContentView.prototype.attached):
2406         (WI.CanvasTabContentView.prototype._addCanvas):
2407         (WI.CanvasTabContentView.prototype._removeCanvas):
2408         (WI.CanvasTabContentView.prototype._canvasTreeOutlineSelectionDidChange):
2409         (WI.CanvasTabContentView.prototype._recordingAdded):
2410         (WI.CanvasTabContentView.prototype._handleSpace):
2411         (WI.CanvasTabContentView.prototype.showRepresentedObject): Deleted.
2412         (WI.CanvasTabContentView.prototype._navigationSidebarTreeOutlineSelectionChanged): Deleted.
2413         (WI.CanvasTabContentView.prototype._recordingActionIndexChanged): Deleted.
2414         (WI.CanvasTabContentView.prototype._updateActionIndex): Deleted.
2415         The canvas tab now maintains a tree outline of all canvases, with an
2416         "Overview" element as the root. The Overview element is always the first
2417         item of content browser's hierarchical path.
2418
2419         * UserInterface/Views/CanvasTreeElement.js:
2420         (WI.CanvasTreeElement.createRecordingTreeElement):
2421         (WI.CanvasTreeElement):
2422         (WI.CanvasTreeElement.prototype.onattach):
2423         (WI.CanvasTreeElement.prototype.onpopulate):
2424         (WI.CanvasTreeElement.prototype._updateStatus):
2425         (WI.CanvasTreeElement.prototype.ondetach): Deleted.
2426         Make it possible to not show recordings under the Canvas element.
2427         Create `isRecording` status element (spinner).
2428
2429         * UserInterface/Views/CollectionContentView.js:
2430         (WI.CollectionContentView.prototype.shown):
2431         (WI.CollectionContentView.prototype.hidden):
2432         Child ContentViews need to be updated when the collection's visibility changes.
2433
2434         * UserInterface/Views/ContentView.js:
2435         (WI.ContentView.isViewable):
2436
2437         * UserInterface/Views/ProgressView.css: Added.
2438         (.progress-view):
2439         (.progress-view > .titles):
2440         (.progress-view > .titles > .title):
2441         (.progress-view > .titles > .subtitle):
2442         (.progress-view > .titles > .subtitle::before):
2443         (.progress-view > .indeterminate-progress-spinner):
2444
2445         * UserInterface/Views/ProgressView.js: Added.
2446         (WI.ProgressView):
2447         (WI.ProgressView.prototype.get title):
2448         (WI.ProgressView.prototype.set title):
2449         (WI.ProgressView.prototype.get subtitle):
2450         (WI.ProgressView.prototype.set subtitle):
2451         (WI.ProgressView.prototype.get visible):
2452         (WI.ProgressView.prototype.set visible):
2453         (WI.ProgressView.prototype.initialLayout):
2454         (WI.ProgressView.prototype._updateTitles):
2455         New view class (not a ContentView) for showing a generic progress message,
2456         with a title, subtitle, and progress spinner.
2457
2458         * UserInterface/Views/RecordingContentView.css:
2459         (.content-view:not(.tab).recording > .preview-container):
2460         Remove unnecessary styles.
2461
2462         * UserInterface/Views/RecordingContentView.js:
2463         (WI.RecordingContentView):
2464         (WI.RecordingContentView.prototype.get navigationItems):
2465         (WI.RecordingContentView.prototype.get supplementalRepresentedObjects):
2466         (WI.RecordingContentView.prototype.updateActionIndex):
2467         (WI.RecordingContentView.prototype.get saveData):
2468         (WI.RecordingContentView.prototype._exportRecording):
2469         Relocate the recording export logic and UI.
2470         (WI.RecordingContentView.prototype.async._generateContentCanvas2D):
2471         (WI.RecordingContentView.prototype.async._generateContentCanvasWebGL):
2472         (WI.RecordingContentView.prototype._sliderChanged):
2473         Refactor logic for notifying the rest of the UI of changes to the action slider.
2474         The selected action is now exposed as a supplemental represented object, and a
2475         corresponding SupplementalRepresentedObjectsDidChange event.
2476
2477         * UserInterface/Views/RecordingStateDetailsSidebarPanel.js:
2478         (WI.RecordingStateDetailsSidebarPanel.prototype.inspect):
2479         (WI.RecordingStateDetailsSidebarPanel.prototype.set action):
2480         (WI.RecordingStateDetailsSidebarPanel.prototype._generateDetailsCanvas2D):
2481         (WI.RecordingStateDetailsSidebarPanel):
2482         (WI.RecordingStateDetailsSidebarPanel.prototype.updateAction): Deleted.
2483
2484         * UserInterface/Views/RecordingTraceDetailsSidebarPanel.js:
2485         (WI.RecordingTraceDetailsSidebarPanel.prototype.inspect):
2486         (WI.RecordingTraceDetailsSidebarPanel.prototype.set action):
2487         (WI.RecordingTraceDetailsSidebarPanel):
2488         (WI.RecordingTraceDetailsSidebarPanel.prototype.updateAction): Deleted.
2489         Now that the selected action is exposed to the UI as a supplemental
2490         represented object, details sidebars can be more decoupled from the
2491         canvas tab, and be notified of changes to the selection via `inspect()`.
2492
2493         * UserInterface/Views/ResourceIcons.css:
2494         (.canvas > .icon): Deleted.
2495         (.shader-program .icon): Deleted.
2496
2497 2018-02-08  Nikita Vasilyev  <nvasilyev@apple.com>
2498
2499         Web Inspector: Styles: Typing value and quickly moving focus away may display outdated value in UI
2500         https://bugs.webkit.org/show_bug.cgi?id=182588
2501         <rdar://problem/37332161>
2502
2503         Reviewed by Matt Baker.
2504
2505         CSSProperty models were updated with a 250ms delay. Quickly adding a blank property after modifying
2506         an existing property could result in outdated values being shown.
2507
2508         This patch removes the 250ms delay.
2509
2510         * UserInterface/Views/SpreadsheetStyleProperty.js:
2511         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidChange):
2512
2513 2018-02-07  Matt Baker  <mattbaker@apple.com>
2514
2515         Web Inspector: replace isAncestor with Node.contains() in LegacyTabBar
2516         https://bugs.webkit.org/show_bug.cgi?id=182586
2517
2518         Reviewed by Timothy Hatcher.
2519
2520         * UserInterface/Views/LegacyTabBar.js:
2521
2522 2018-02-07  Nikita Vasilyev  <nvasilyev@apple.com>
2523
2524         Web Inspector: Styles: completion popover doesn't hide when switching panels
2525         https://bugs.webkit.org/show_bug.cgi?id=182464
2526         <rdar://problem/37202763>
2527
2528         Reviewed by Timothy Hatcher.
2529
2530         Hide completion popover by triggering blur event on the focused text field.
2531         Removing text fields from the DOM tree would hide the completion popovers as well,
2532         but switching sidebar panels doesn't remove them from the DOM.
2533
2534         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2535         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
2536         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
2537         (WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
2538         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
2539         (WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
2540         * UserInterface/Views/SpreadsheetStyleProperty.js:
2541         (WI.SpreadsheetStyleProperty.prototype.hidden):
2542
2543 2018-02-06  Devin Rousso  <webkit@devinrousso.com>
2544
2545         Web Inspector: Replace isAncestor and isDescendant with native DOM contains method
2546         https://bugs.webkit.org/show_bug.cgi?id=182069
2547
2548         Reviewed by Brian Burg.
2549
2550         * UserInterface/Base/Main.js:
2551         (WI.restoreFocusFromElement):
2552         (WI._mouseDown):
2553         (WI._focusedContentBrowser):
2554         (WI._focusedContentView):
2555         * UserInterface/Base/Utilities.js:
2556         (Node.prototype.traverseNextNode):
2557         (Node.prototype.isAncestor): Deleted.
2558         (Node.prototype.isDescendant): Deleted.
2559         (Node.prototype.isSelfOrAncestor): Deleted.
2560         (Node.prototype.isSelfOrDescendant): Deleted.
2561         * UserInterface/Views/BoxModelDetailsSectionRow.js:
2562         (WI.BoxModelDetailsSectionRow.prototype._handleKeyDown):
2563         * UserInterface/Views/CSSStyleDeclarationSection.js:
2564         (WI.CSSStyleDeclarationSection.prototype._handleSelectorPaste):
2565         * UserInterface/Views/DOMTreeOutline.js:
2566         (WI.DOMTreeOutline.prototype._onmouseout):
2567         * UserInterface/Views/DetailsSection.js:
2568         (WI.DetailsSection.prototype._headerElementClicked):
2569         * UserInterface/Views/EditingSupport.js:
2570         (WI.incrementElementValue):
2571         * UserInterface/Views/LogContentView.js:
2572         (WI.LogContentView.prototype._handleContextMenuEvent):
2573         * UserInterface/Views/ShaderProgramTreeElement.js:
2574         (WI.ShaderProgramTreeElement.prototype.selectOnMouseDown):
2575         * UserInterface/Views/SoftContextMenu.js:
2576         (WI.SoftContextMenu.prototype._menuItemMouseOut):
2577         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2578         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
2579         * UserInterface/Views/TabBar.js:
2580         (WI.TabBar.prototype.insertTabBarItem):
2581
2582 2018-02-06  Devin Rousso  <webkit@devinrousso.com>
2583
2584         Web Inspector: Elements tab should have "Jump to Layer" functionality
2585         https://bugs.webkit.org/show_bug.cgi?id=181800
2586
2587         Reviewed by Joseph Pecoraro.
2588
2589         * Localizations/en.lproj/localizedStrings.js:
2590
2591         * UserInterface/Base/Main.js:
2592         (WI.isShowingElementsTab):
2593         (WI.showLayersTab):
2594         (WI.isShowingLayersTab):
2595
2596         * UserInterface/Views/ContextMenuUtilities.js:
2597         (WI.appendContextMenuItemsForDOMNode):
2598
2599         * UserInterface/Views/LayersTabContentView.js:
2600         (WI.LayersTabContentView.prototype.selectLayerForNode):
2601
2602         * UserInterface/Views/Layers3DContentView.js:
2603         (WI.Layers3DContentView):
2604         (WI.Layers3DContentView.prototype.selectLayerForNode):
2605         (WI.Layers3DContentView.prototype.layout):
2606
2607         * UserInterface/Views/LayerDetailsSidebarPanel.js:
2608         (WI.LayerDetailsSidebarPanel):
2609         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
2610         (WI.LayerDetailsSidebarPanel.prototype._updateDataGrid):
2611
2612 2018-02-06  Nikita Vasilyev  <nvasilyev@apple.com>
2613
2614         Web Inspector: Rename String.prototype.trimEnd to avoid conflicts with native trimEnd
2615         https://bugs.webkit.org/show_bug.cgi?id=182545
2616
2617         Reviewed by Brian Burg.
2618
2619         Rename:
2620         - trimEnd to truncateEnd
2621         - trimMiddle to truncateMiddle
2622
2623         * UserInterface/Base/Utilities.js:
2624         (String.prototype.trimMiddle): Deleted.
2625         (String.prototype.trimEnd): Deleted.
2626         (String.prototype.truncateMiddle): Added.
2627         (String.prototype.truncateEnd): Added.
2628         Use strict mode. Scrict mode allows `this` to be a primitive (a string, in our case).
2629         In non-strict mode, `this` is always an object. Without the strict mode,
2630         "a".truncateEnd(42) !== "a", because truncateEnd returns a string object.
2631
2632         * UserInterface/Views/DOMTreeElement.js:
2633         (WI.DOMTreeElement.prototype._buildAttributeDOM):
2634         * UserInterface/Views/DOMTreeElementPathComponent.js:
2635         (WI.DOMTreeElementPathComponent):
2636         * UserInterface/Views/SearchResultTreeElement.js:
2637         Remove an obvious comment.
2638
2639         (WI.SearchResultTreeElement.truncateAndHighlightTitle):
2640         * UserInterface/Views/SpreadsheetStyleProperty.js:
2641         (WI.SpreadsheetStyleProperty.prototype._renderValue):
2642
2643 2018-02-05  Nikita Vasilyev  <nvasilyev@apple.com>
2644
2645         Web Inspector: Add an experimental setting to enable Sources tab
2646         https://bugs.webkit.org/show_bug.cgi?id=182461
2647
2648         Reviewed by Brian Burg.
2649
2650         This patch only adds a setting. It doesn't add the Sources tab.
2651
2652         * Localizations/en.lproj/localizedStrings.js:
2653         * UserInterface/Base/Setting.js:
2654         * UserInterface/Views/SettingsTabContentView.js:
2655
2656 2018-02-02  Devin Rousso  <webkit@devinrousso.com>
2657
2658         Web Inspector: Styles Redesign: Pasting multiple properties should create properties instead of a bad property
2659         https://bugs.webkit.org/show_bug.cgi?id=179622
2660         <rdar://problem/35511170>
2661
2662         Reviewed by Matt Baker.
2663
2664         * UserInterface/Views/SpreadsheetStyleProperty.js:
2665         (WI.SpreadsheetStyleProperty.prototype._remove):
2666         (WI.SpreadsheetStyleProperty.prototype._update):
2667         (WI.SpreadsheetStyleProperty.prototype.spreadsheetTextFieldDidCommit):
2668         (WI.SpreadsheetStyleProperty.prototype._handleNamePaste):
2669         When the user pastes into the name field, parse the text for a list of name-value pairs and
2670         replace the property being edited with the text of those pairs.
2671
2672         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
2673         (WI.SpreadsheetCSSStyleDeclarationEditor):
2674         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
2675         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.addBlankProperty):
2676         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyFocusMoved):
2677         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyAddBlankPropertySoon):
2678         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
2679         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
2680         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved): Deleted.
2681         Calling `addBlankProperty` will trigger a layout on the next frame, but that might be before
2682         the CSSAgent has had a chance to finish refreshing, so we need a way to defer the creation
2683         of a new property until after we have finished the next layout (which is after the refresh).
2684         Drive-by: fix naming of some delegate functions.
2685
2686         * UserInterface/Models/CSSProperty.js:
2687         (WI.CSSProperty.prototype.replaceWithText):
2688         Provide a way for replacing the property with new text.
2689
2690 2018-02-02  Matt Baker  <mattbaker@apple.com>
2691
2692         Web Inspector: TabBar redesign: remove New Tab button and add experimental feature flag
2693         https://bugs.webkit.org/show_bug.cgi?id=182342
2694         <rdar://problem/37078662>
2695
2696         Reviewed by Devin Rousso.
2697
2698         This patch adds a new experimental setting group, "User Interface", with
2699         a single setting, "Enable New TabBar". When enabled, the New Tab button is
2700         no longer available in the top-level TabBar. The 'open tabs' context menu
2701         no longer allows the last non-ephemeral open tab to be closed (unchecked).
2702
2703         * Localizations/en.lproj/localizedStrings.js:
2704
2705         * UserInterface/Base/Main.js:
2706         (WI.contentLoaded):
2707         (WI._tryToRestorePendingTabs):
2708         Retain legacy behavior behind experimental feature setting.
2709         (WI.isNewTabWithTypeAllowed):
2710
2711         * UserInterface/Base/Setting.js:
2712         * UserInterface/Main.html:
2713
2714         * UserInterface/Views/CanvasTabContentView.js:
2715         (WI.CanvasTabContentView):
2716         * UserInterface/Views/ConsoleTabContentView.js:
2717         (WI.ConsoleTabContentView):
2718         * UserInterface/Views/DebuggerTabContentView.js:
2719         (WI.DebuggerTabContentView):
2720         * UserInterface/Views/ElementsTabContentView.js:
2721         (WI.ElementsTabContentView):
2722
2723         * UserInterface/Views/GeneralTabBarItem.js:
2724         (WI.GeneralTabBarItem):
2725         (WI.GeneralTabBarItem.prototype.fromTabInfo):
2726         (WI.GeneralTabBarItem.prototype.get isEphemeral):
2727         (WI.GeneralTabBarItem.fromTabContentViewConstructor): Deleted.
2728
2729         * UserInterface/Views/LayersTabContentView.js:
2730         (WI.LayersTabContentView):
2731
2732         * UserInterface/Views/LegacyTabBar.js: Copied from Source/WebInspectorUI/UserInterface/Views/TabBar.js.
2733         (WI.LegacyTabBar):
2734         (WI.LegacyTabBar.prototype.get newTabTabBarItem):
2735         (WI.LegacyTabBar.prototype.updateNewTabTabBarItemState):
2736         (WI.LegacyTabBar.prototype.addTabBarItem):
2737         (WI.LegacyTabBar.prototype.insertTabBarItem.animateTabs):
2738         (WI.LegacyTabBar.prototype.insertTabBarItem.removeStyles):
2739         (WI.LegacyTabBar.prototype.insertTabBarItem):
2740         (WI.LegacyTabBar.prototype.removeTabBarItem.animateTabs):
2741         (WI.LegacyTabBar.prototype.removeTabBarItem.removeStyles):
2742         (WI.LegacyTabBar.prototype.removeTabBarItem):
2743         (WI.LegacyTabBar.prototype.selectPreviousTab):
2744         (WI.LegacyTabBar.prototype.selectNextTab):
2745         (WI.LegacyTabBar.prototype.get selectedTabBarItem):
2746         (WI.LegacyTabBar.prototype.set selectedTabBarItem):
2747         (WI.LegacyTabBar.prototype.get tabBarItems):
2748         (WI.LegacyTabBar.prototype.get normalTabCount):
2749         (WI.LegacyTabBar.prototype.layout.forceItemHidden):
2750         (WI.LegacyTabBar.prototype.layout):
2751         (WI.LegacyTabBar.prototype._tabBarItemsFromLeftToRight):
2752         (WI.LegacyTabBar.prototype._findTabBarItem):
2753         (WI.LegacyTabBar.prototype._hasMoreThanOneNormalTab):
2754         (WI.LegacyTabBar.prototype._openDefaultTab):
2755         (WI.LegacyTabBar.prototype._recordTabBarItemSizesAndPositions):
2756         (WI.LegacyTabBar.prototype._applyTabBarItemSizesAndPositions):
2757         (WI.LegacyTabBar.prototype._clearTabBarItemSizesAndPositions):
2758         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose.):
2759         (WI.LegacyTabBar.prototype._finishExpandingTabsAfterClose):
2760         (WI.LegacyTabBar.prototype._handleMouseDown):
2761         (WI.LegacyTabBar.prototype._handleClick):
2762         (WI.LegacyTabBar.prototype._handleMouseMoved):
2763         (WI.LegacyTabBar.prototype._handleMouseUp):
2764         (WI.LegacyTabBar.prototype._handleMouseLeave):
2765         (WI.LegacyTabBar.prototype._handleContextMenu):
2766         (WI.LegacyTabBar.prototype._handleNewTabClick):
2767         (WI.LegacyTabBar.prototype._handleTabPickerTabContextMenu):
2768         (WI.LegacyTabBar.prototype._handleNewTabMouseEnter):
2769
2770         * UserInterface/Views/NetworkTabContentView.js:
2771         (WI.NetworkTabContentView):
2772         * UserInterface/Views/NewTabContentView.js:
2773         (WI.NewTabContentView):
2774         (WI.NewTabContentView.tabInfo):
2775         (WI.NewTabContentView.isEphemeral): Deleted.
2776         * UserInterface/Views/ResourcesTabContentView.js:
2777         (WI.ResourcesTabContentView):
2778         * UserInterface/Views/SearchTabContentView.js:
2779         (WI.SearchTabContentView):
2780         (WI.SearchTabContentView.tabInfo):
2781         (WI.SearchTabContentView.isEphemeral): Deleted.
2782
2783         * UserInterface/Views/SettingsTabContentView.js:
2784         (WI.SettingsTabContentView.tabInfo):
2785         (WI.SettingsTabContentView.prototype._createExperimentalSettingsView):
2786         (WI.SettingsTabContentView.isEphemeral): Deleted.
2787
2788         * UserInterface/Views/StorageTabContentView.js:
2789         (WI.StorageTabContentView):
2790
2791         * UserInterface/Views/TabBar.css:
2792         * UserInterface/Views/TabBar.js:
2793         (WI.TabBar):
2794         (WI.TabBar.prototype.insertTabBarItem):
2795         (WI.TabBar.prototype.removeTabBarItem):
2796         (WI.TabBar.prototype.set selectedTabBarItem):
2797         (WI.TabBar.prototype.get normalNonEphemeralTabCount):
2798         (WI.TabBar.prototype._handleMouseDown):
2799         (WI.TabBar.prototype._handleClick):
2800         (WI.TabBar.prototype._handleMouseMoved):
2801         (WI.TabBar.prototype._handleMouseLeave):
2802         (WI.TabBar.prototype._handleContextMenu):
2803         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
2804         (WI.TabBar.prototype.get newTabTabBarItem): Deleted.
2805         (WI.TabBar.prototype.updateNewTabTabBarItemState): Deleted.
2806         (WI.TabBar.prototype._openDefaultTab): Deleted.
2807         (WI.TabBar.prototype._handleNewTabClick): Deleted.
2808         (WI.TabBar.prototype._handleNewTabMouseEnter): Deleted.
2809         Remove support for the New Tab button and default tab. Without a default
2810         tab, there is nothing to display when no tabs are open, so prevent the
2811         last non-pinned tab from being removed.
2812
2813         * UserInterface/Views/TabBrowser.js:
2814         (WI.TabBrowser._tabBarItemRemoved):
2815         * UserInterface/Views/TabContentView.js:
2816         (WI.TabContentView.isEphemeral): Deleted.
2817         * UserInterface/Views/TimelineTabContentView.js:
2818         (WI.TimelineTabContentView):
2819
2820 2018-01-30  Devin Rousso  <webkit@devinrousso.com>
2821
2822         Web Inspector: Replace Object.shallowMerge with ES2018 spread operator
2823         https://bugs.webkit.org/show_bug.cgi?id=182219
2824
2825         Reviewed by Brian Burg.
2826
2827         * UserInterface/Base/Utilities.js:
2828         (Object.shallowMerge): Deleted.
2829         * UserInterface/Base/DOMUtilities.js:
2830         (WI.linkifyNodeReference):
2831         * UserInterface/Base/Main.js:
2832         (WI.handlePossibleLinkClick):
2833         (WI.openURL):
2834         (WI.showSourceCodeLocation):
2835         (WI.showOriginalUnformattedSourceCodeLocation):
2836         (WI.showOriginalOrFormattedSourceCodeLocation):
2837         (WI.showOriginalOrFormattedSourceCodeTextRange):
2838         (WI.linkifyLocation):
2839         * UserInterface/Views/DOMTreeElement.js:
2840         (WI.DOMTreeElement.prototype._insertAdjacentHTML):
2841         * UserInterface/Views/WebSocketContentView.js:
2842         (WI.WebSocketContentView.prototype._addRow):
2843
2844 2018-01-26  Matt Baker  <mattbaker@apple.com>
2845
2846         Web Inspector: Timelines content browser NavigationBar is squashed at narrow heights
2847         https://bugs.webkit.org/show_bug.cgi?id=182196
2848         <rdar://problem/36929899>
2849
2850         Reviewed by Joseph Pecoraro.
2851
2852         * UserInterface/Views/NavigationBar.css:
2853         (.navigation-bar):
2854
2855 2018-01-26  Matt Baker  <mattbaker@apple.com>
2856
2857         Web Inspector: TabBar redesign: improvements to tab layout and resize behavior
2858         https://bugs.webkit.org/show_bug.cgi?id=181468
2859         <rdar://problem/36395439>
2860
2861         Reviewed by Devin Rousso.
2862
2863         * Localizations/en.lproj/localizedStrings.js:
2864
2865         * UserInterface/Images/TabPicker.svg: Added.
2866         New ">>" icon for the tab picker button.
2867
2868         * UserInterface/Views/CanvasTabContentView.js:
2869         (WI.CanvasTabContentView):
2870         * UserInterface/Views/ConsoleTabContentView.js:
2871         (WI.ConsoleTabContentView):
2872         * UserInterface/Views/DebuggerTabContentView.js:
2873         (WI.DebuggerTabContentView):
2874         * UserInterface/Views/ElementsTabContentView.js:
2875         (WI.ElementsTabContentView):
2876
2877         * UserInterface/Views/GeneralTabBarItem.js:
2878         (WI.GeneralTabBarItem):
2879         (WI.GeneralTabBarItem.fromTabContentViewConstructor):
2880         (WI.GeneralTabBarItem.prototype.get title):
2881         Add missing override for getter/setter pair.
2882         (WI.GeneralTabBarItem.prototype.set title):
2883         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent):
2884         Show the close button on ephemeral tabs only (Search, New Tab).
2885         Replace unused `representedObject` parameter with `isEphemeral`, which
2886         determines whether to show a close button for the tab.
2887
2888         * UserInterface/Views/LayersTabContentView.js:
2889         (WI.LayersTabContentView):
2890
2891         * UserInterface/Views/NavigationBar.js:
2892         Remove unused symbol.
2893
2894         * UserInterface/Views/NetworkTabContentView.js:
2895         (WI.NetworkTabContentView):
2896         * UserInterface/Views/NewTabContentView.js:
2897         (WI.NewTabContentView):
2898
2899         * UserInterface/Views/PinnedTabBarItem.js:
2900         (WI.PinnedTabBarItem):
2901         Remove unused parameter.
2902
2903         * UserInterface/Views/ResourcesTabContentView.js:
2904         (WI.ResourcesTabContentView):
2905         * UserInterface/Views/SearchTabContentView.js:
2906         (WI.SearchTabContentView):
2907         * UserInterface/Views/StorageTabContentView.js:
2908         (WI.StorageTabContentView):
2909
2910         * UserInterface/Views/TabBar.css:
2911         (.tab-bar > .item):
2912         (.tab-bar.calculate-width > .item):
2913         (.tab-bar > .item.pinned.tab-picker):
2914         (.tab-bar > .item > .close):
2915         (.tab-bar > .item > .title):
2916         (.tab-bar:not(.collapsed) > .item > .title):
2917         (.tab-bar.collapsed > .item:not(.pinned) > .icon):
2918         (.tab-bar > .item:hover > .close):
2919         (.tab-bar.collapsed > .item:hover > .close):
2920         (.tab-bar:not(.collapsed) > .item.ephemeral:hover > .icon):
2921         (.tab-bar.collapsed > .item.ephemeral:hover > .title):
2922         (body[dir=ltr] .tab-bar > .item > .close): Deleted.
2923         (body[dir=rtl] .tab-bar > .item > .close): Deleted.
2924         (.tab-bar > .item > .flex-space): Deleted.
2925         (.tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
2926         (body[dir=ltr] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
2927         (body[dir=rtl] .tab-bar > .item:not(.pinned) > .flex-space:last-child): Deleted.
2928         (body[dir=ltr] .tab-bar > .item > .title): Deleted.
2929         (body[dir=rtl] .tab-bar > .item > .title): Deleted.
2930         (.tab-bar.collapsed > .item): Deleted.
2931         (.tab-bar.collapsed > .item > .flex-space): Deleted.
2932         (.tab-bar.collapsed > .item > .close): Deleted.
2933         (body[dir=ltr] .tab-bar.collapsed > .item > .close): Deleted.
2934         (body[dir=rtl] .tab-bar.collapsed > .item > .close): Deleted.
2935         (.tab-bar.hide-titles > .item > .title): Deleted.
2936         (.tab-bar.collapsed:not(.hide-titles) > .item:not(.pinned):hover > .icon,): Deleted.
2937         (.tab-bar.collapsed:not(.hide-titles) > .item:hover > .close,): Deleted.
2938         Clean up tab styles and prevent tabs from shrinking during flex layout.
2939         Added new `calculate-width` class, to disable flex layout when measuring
2940         the minimum width of the TabBar required to fit all tab items.
2941
2942         * UserInterface/Views/TabBar.js:
2943         (WI.TabBar):
2944         (WI.TabBar.prototype.set selectedTabBarItem):
2945         (WI.TabBar.prototype.layout.forceItemHidden):
2946         (WI.TabBar.prototype.layout):
2947         Perform two layout passes, similar to NavigationBar. The first pass disables
2948         flex layout and measures tab items at full size. If the bar isn't wide enough
2949         to show all the tabs, hide their icons and measure again. If there still isn't
2950         room, hide tabs starting from the end of the bar and display the tab picker.
2951
2952         (WI.TabBar.prototype._handleMouseDown):
2953         (WI.TabBar.prototype._handleTabPickerTabContextMenu):
2954
2955         * UserInterface/Views/TabBarItem.js:
2956         (WI.TabBarItem):
2957
2958         * UserInterface/Views/TimelineTabContentView.js:
2959         (WI.TimelineTabContentView):
2960
2961 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2962
2963         Web Inspector: Network Table: Sort indicator is not displayed when sorted column is hidden and re-shown
2964         https://bugs.webkit.org/show_bug.cgi?id=182164
2965         <rdar://problem/36892619>
2966
2967         Reviewed by Brian Burg.
2968
2969         * UserInterface/Views/Table.js:
2970         (WI.Table.prototype.showColumn):
2971         Re-add the sort classes if the column being shown is the active sort column.
2972
2973 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2974
2975         Web Inspector: Network - Cookies view should behave better at narrow widths, all data is hidden
2976         https://bugs.webkit.org/show_bug.cgi?id=182163
2977         <rdar://problem/36893241>
2978
2979         Reviewed by Brian Burg.
2980
2981         * UserInterface/Views/ResourceCookiesContentView.css:
2982         (.resource-cookies .table):
2983         Give these tables a reasonable minimum size so that if the inspector
2984         is narrow, the content view can still be scrolled to see all of
2985         the table data.
2986
2987         * UserInterface/Views/Table.css:
2988         (.table > .header):
2989         Match the data-container and mark overflow as hidden, otherwise
2990         super narrow widths show header content beyond the edge.
2991
2992 2018-01-25  Joseph Pecoraro  <pecoraro@apple.com>
2993
2994         Web Inspector: "Displayed Columns" should not be displayed in context menu if all columns are required columns
2995         https://bugs.webkit.org/show_bug.cgi?id=182162
2996         <rdar://problem/36893758>
2997
2998         Reviewed by Matt Baker.
2999
3000         * UserInterface/Views/Table.js:
3001         (WI.Table.prototype._handleHeaderContextMenu):
3002         Only add the header column when we know there are hideable columns.
3003
3004 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
3005
3006         Web Inspector: Simplify update-LegacyInspectorBackendCommands.rb
3007         https://bugs.webkit.org/show_bug.cgi?id=182067
3008
3009         Reviewed by Brian Burg.
3010
3011         * Scripts/update-LegacyInspectorBackendCommands.rb:
3012         Remove stale dependency_json, it has always been empty for a while now.
3013         Switch to framework WebInspectorUI to generate only the backend commands
3014         and not spend time generating a bunch of cpp files.
3015
3016 2018-01-24  Nikita Vasilyev  <nvasilyev@apple.com>
3017
3018         REGRESSION (r226994): Web Inspector: Styles: Suggestions popover floats in top-left corner of Web Inspector after tabbing
3019         https://bugs.webkit.org/show_bug.cgi?id=182027
3020
3021         Reviewed by Matt Baker.
3022
3023         r226994 added a layout of all properties on property removal. Layout caused
3024         a property element to be removed from DOM right before dislaying the suggestion
3025         popover, resulting in the popover being displayed at the top left corner.
3026
3027         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3028         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout):
3029         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
3030         Only update property view indices when a property is removed.
3031
3032         * UserInterface/Views/SpreadsheetStyleProperty.js:
3033         (WI.SpreadsheetStyleProperty):
3034         (WI.SpreadsheetStyleProperty.prototype.set index):
3035
3036         * UserInterface/Views/SpreadsheetTextField.js:
3037         (WI.SpreadsheetTextField.prototype._updateCompletions):
3038         Checking this._element.parentNode to see if the element is attached to the DOM tree is unreliable,
3039         since the element may have a non-null parent node that is detached from the DOM tree. To fix that,
3040         we could traverse element's ancestors, but I used a concise isConnected property instead.
3041
3042 2018-01-24  Joseph Pecoraro  <pecoraro@apple.com>
3043
3044         ReferenceError:​ Can't find variable:​ DOMAgent (at ScriptSyntaxTree.js:​178:​22)​
3045         https://bugs.webkit.org/show_bug.cgi?id=182059
3046
3047         Reviewed by Matt Baker.
3048
3049         * UserInterface/Models/ScriptSyntaxTree.js:
3050         (WI.ScriptSyntaxTree.functionReturnDivot):
3051         DOMAgent won't be available in a ServiceWorker or JSContext inspector. So add
3052         a check for DOMAgent, and assume if DOMAgent doesn't exist that we should fall
3053         back to the latest path (non-iOS 9) target.
3054
3055 2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
3056
3057         Web Inspector: Network's columns shake when scrolling at non-default zoom level
3058         https://bugs.webkit.org/show_bug.cgi?id=181998
3059         <rdar://problem/36449808>
3060
3061         Reviewed by Matt Baker.
3062
3063         * UserInterface/Views/Table.js:
3064         When zoomed the bounding client rect values were fractional, which was
3065         unexpected by this area of code. Floor the values to get a value we expect
3066         to be able to evenly distribute.
3067
3068 2018-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
3069
3070         Web Inspector: Styles Redesign: data corruption when updating values quickly
3071         https://bugs.webkit.org/show_bug.cgi?id=179461
3072         <rdar://problem/35431882>
3073
3074         Reviewed by Joseph Pecoraro.
3075
3076         Data corruption used to happen because CSSStyleDeclaration.prototype.text didn't
3077         update synchronously. Making two or more quick changes resulted in corrupted data.
3078
3079         Imagine we modify a CSS value 3 times:
3080
3081         Front-end:  (1)-(2)---(3)
3082         Back-end:          (1)-----(2)-(3)
3083
3084         The first response from the backend could happen after the 2nd edit. In this patch,
3085         CSSStyleDeclaration is locked when its view is being edited.
3086
3087         To correctly display invalid and overridden properties, the backend is allowed to update
3088         CSSStyleDeclaration and CSSProperty when they're locked if the text from the backend
3089         matches the model's text. This should happen when the backend is caught up with the
3090         front-end changes.
3091
3092         * UserInterface/Models/CSSProperty.js:
3093         (WI.CSSProperty.prototype.update):
3094         * UserInterface/Models/CSSStyleDeclaration.js:
3095         (WI.CSSStyleDeclaration):
3096         (WI.CSSStyleDeclaration.prototype.get locked):
3097         (WI.CSSStyleDeclaration.prototype.set locked):
3098         (WI.CSSStyleDeclaration.prototype.set text):
3099
3100         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3101         (WI.SpreadsheetCSSStyleDeclarationEditor):
3102         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.initialLayout):
3103         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached):
3104         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.get editing):
3105         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set focused):
3106         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.set inlineSwatchActive):
3107         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchActivated):
3108         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.stylePropertyInlineSwatchDeactivated):
3109         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._propertiesChanged):
3110         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._updateStyleLock):
3111         Lock CSSStyleDeclaration when a CSS property name or value is focused or
3112         an inline widget is active.
3113
3114         * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
3115         (WI.SpreadsheetCSSStyleDeclarationSection):
3116         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleMouseDown):
3117         (WI.SpreadsheetCSSStyleDeclarationSection.prototype._handleClick):
3118         * UserInterface/Views/SpreadsheetStyleProperty.js:
3119         (WI.SpreadsheetStyleProperty):
3120         (WI.SpreadsheetStyleProperty.prototype._createInlineSwatch):
3121         When selector is focused, clicking on the white-space should not add a new blank property.
3122
3123 2018-01-19  Ross Kirsling  <ross.kirsling@sony.com>
3124
3125         Web Inspector: Layers tab should do away with popovers (if possible)
3126         https://bugs.webkit.org/show_bug.cgi?id=181805
3127
3128         Reviewed by Matt Baker.
3129
3130         * Localizations/en.lproj/localizedStrings.js:
3131         Remove superfluous colon from a string.
3132
3133         * UserInterface/Main.html:
3134         * UserInterface/Views/LayerDetailsSidebarPanel.css:
3135         * UserInterface/Views/Layers3DContentView.css: Added.
3136         Remove popover styling from sidebar, add new file with similar styling for canvas overlay.
3137
3138         * UserInterface/Views/LayerDetailsSidebarPanel.js:
3139         (WI.LayerDetailsSidebarPanel):
3140         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
3141         (WI.LayerDetailsSidebarPanel.prototype._dataGridSelectedNodeChanged):
3142         (WI.LayerDetailsSidebarPanel.prototype._updateLayers):
3143         (WI.LayerDetailsSidebarPanel.prototype._updateBottomBar):
3144         (WI.LayerDetailsSidebarPanel.prototype.willDismissPopover): Deleted.
3145         (WI.LayerDetailsSidebarPanel.prototype._showPopoverForSelectedNode): Deleted.
3146         (WI.LayerDetailsSidebarPanel.prototype._presentPopover): Deleted.
3147         (WI.LayerDetailsSidebarPanel.prototype._contentForPopover): Deleted.
3148         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons.addReason): Deleted.
3149         (WI.LayerDetailsSidebarPanel.prototype._populateListOfCompositingReasons): Deleted.
3150         * UserInterface/Views/Layers3DContentView.js:
3151         (WI.Layers3DContentView):
3152         (WI.Layers3DContentView.prototype.shown):
3153         (WI.Layers3DContentView.prototype.selectLayerById):
3154         (WI.Layers3DContentView.prototype._canvasMouseDown):
3155         (WI.Layers3DContentView.prototype._buildLayerInfoElement):
3156         (WI.Layers3DContentView.prototype._updateLayerInfoElement):
3157         (WI.Layers3DContentView.prototype._updateReasonsList):
3158         Remove popover from sidebar table, overlay div with same data arrangement on top of the canvas.
3159         Also reverse the fix from r226671 since the visualization is no longer unusable without the sidebar!
3160
3161 2018-01-19  Matt Baker  <mattbaker@apple.com>
3162
3163         Web Inspector: Canvas Tab: Multiple "waiting for frames" messages displayed
3164         https://bugs.webkit.org/show_bug.cgi?id=181865
3165         <rdar://problem/36664737>
3166
3167         Reviewed by Devin Rousso.
3168
3169         * UserInterface/Views/CanvasContentView.js:
3170         (WI.CanvasContentView.prototype._recordingStarted):
3171         (WI.CanvasContentView.prototype._recordingStopped):
3172
3173 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
3174
3175         Web Inspector: Styles Redesign: tabbing on commented out property throws exception
3176         https://bugs.webkit.org/show_bug.cgi?id=180676
3177         <rdar://problem/35981058>
3178
3179         Reviewed by Joseph Pecoraro.
3180
3181         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3182         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingFirstProperty):
3183         Tabbing from the selector field should focus on the first editable property.
3184         When no editable properties are present, a new blank property should be added after the commented out ones.
3185
3186         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.startEditingLastProperty):
3187         Shift-tabbing from the selector field should focus on the last editable property of the previous CSS rule.
3188         When no editable properties are present, a new blank property should be added after the commented out ones.
3189
3190         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetCSSStyleDeclarationEditorFocusMoved):
3191         When navigating between properties skip the commented out ones.
3192
3193         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyAfter):
3194         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._editablePropertyBefore):
3195         * UserInterface/Views/SpreadsheetStyleProperty.js:
3196         (WI.SpreadsheetStyleProperty.prototype.get enabled):
3197         (WI.SpreadsheetStyleProperty.prototype._update):
3198
3199 2018-01-19  Nikita Vasilyev  <nvasilyev@apple.com>
3200
3201         Web Inspector: Make styles sidebar always LTR
3202         https://bugs.webkit.org/show_bug.cgi?id=175357
3203         <rdar://problem/33787988>
3204
3205         Reviewed by Joseph Pecoraro.
3206
3207         * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
3208         (WI.SpreadsheetRulesStyleDetailsPanel):
3209
3210 2018-01-19  Keith Miller  <keith_miller@apple.com>
3211
3212         HaveInternalSDK includes should be "#include?"
3213         https://bugs.webkit.org/show_bug.cgi?id=179670
3214
3215         Reviewed by Dan Bernstein.
3216
3217         * Configurations/Base.xcconfig:
3218
3219 2018-01-18  Dan Bernstein  <mitz@apple.com>
3220
3221         [Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
3222         https://bugs.webkit.org/show_bug.cgi?id=181803
3223
3224         Reviewed by Tim Horton.
3225
3226         * Configurations/Base.xcconfig: Updated.
3227         * Configurations/DebugRelease.xcconfig: Ditto.
3228         * Configurations/Version.xcconfig: Ditto.
3229
3230 2018-01-18  Devin Rousso  <webkit@devinrousso.com>
3231
3232         Web Inspector: Canvas Tab: record button on canvas card doesn't always show on hover, or is misplaced
3233         https://bugs.webkit.org/show_bug.cgi?id=179183
3234
3235         Reviewed by Joseph Pecoraro.
3236
3237         * UserInterface/Views/CanvasOverviewContentView.css:
3238         (.content-view.canvas-overview .content-view.canvas:not(.is-recording) > header > .navigation-bar > .item.record-start-stop): Deleted.
3239
3240 2018-01-17  Devin Rousso  <webkit@devinrousso.com>
3241
3242         Web Inspector: clicking on a path component that has no siblings should select it
3243         https://bugs.webkit.org/show_bug.cgi?id=181772
3244
3245         Reviewed by Joseph Pecoraro.
3246
3247         * UserInterface/Views/HierarchicalPathComponent.js:
3248         (WI.HierarchicalPathComponent.prototype._updateSelectElement):
3249         (WI.HierarchicalPathComponent.prototype._selectElementMouseDown):
3250
3251 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
3252
3253         Web Inspector: Add back localized strings for Styles sidebar panels
3254         https://bugs.webkit.org/show_bug.cgi?id=181748
3255         <rdar://problem/36583184>
3256
3257         Reviewed by Brian Burg.
3258
3259         * Localizations/en.lproj/localizedStrings.js:
3260         * UserInterface/Views/ComputedStyleDetailsSidebarPanel.js:
3261         (WI.ComputedStyleDetailsSidebarPanel):
3262         * UserInterface/Views/RulesStyleDetailsSidebarPanel.js:
3263         (WI.RulesStyleDetailsSidebarPanel):
3264         * UserInterface/Views/VisualStyleDetailsSidebarPanel.js:
3265         (WI.VisualStyleDetailsSidebarPanel):
3266         Add back localized strings for panel titles lost in r225547.
3267
3268 2018-01-17  Joseph Pecoraro  <pecoraro@apple.com>
3269
3270         Web Inspector: Super long URL string causes bad wrapping in Resources detail sidebar
3271         https://bugs.webkit.org/show_bug.cgi?id=181617
3272
3273         Reviewed by Brian Burg.
3274
3275         * UserInterface/Views/DetailsSection.css:
3276         (.details-section > .content > .group > .row.simple > .value):
3277         Set the break to all characters.
3278
3279 2018-01-16  Matt Baker  <mattbaker@apple.com>
3280
3281         Web Inspector: Canvas tab: typing a "space" in the QuickConsole shouldn't trigger a recording
3282         https://bugs.webkit.org/show_bug.cgi?id=181706
3283         <rdar://problem/36558221>
3284
3285         Reviewed by Joseph Pecoraro.
3286
3287         * UserInterface/Views/CanvasOverviewContentView.js:
3288         (WI.CanvasOverviewContentView):
3289         (WI.CanvasOverviewContentView.prototype._handleSpace):
3290
3291 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
3292
3293         Web Inspector: Make Console's Execution Context picker stand out when it is non-default
3294         https://bugs.webkit.org/show_bug.cgi?id=181628
3295         <rdar://problem/36492044>
3296
3297         Reviewed by Matt Baker.
3298
3299         * UserInterface/Views/HierarchicalPathComponent.css:
3300         (.hierarchical-path-component > .selector-arrows):
3301         * UserInterface/Views/HierarchicalPathComponent.js:
3302         (WI.HierarchicalPathComponent.prototype.set selectorArrows):
3303         Switch to SVG element so we can style the arrows.
3304
3305         * UserInterface/Views/QuickConsole.css:
3306         (.quick-console > .navigation-bar > .hierarchical-path .execution-context):
3307         (.quick-console > .navigation-bar > .hierarchical-path .execution-context .separator):
3308         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context):
3309         (.quick-console > .navigation-bar > .hierarchical-path.non-default-execution-context .execution-context .selector-arrows):
3310         Styles for the execution context picker. We hide the unused separator
3311         and instead use margin so that the selected background and border don't
3312         have an extra 7px on the right/end side.
3313
3314         * UserInterface/Views/QuickConsole.js:
3315         (WI.QuickConsole.prototype._activeExecutionContextChanged):
3316         Toggle the non-default class name on the path.
3317
3318 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
3319
3320         Web Inspector: Styles: pressing down key should select first item from completion list when focusing on empty value
3321         https://bugs.webkit.org/show_bug.cgi?id=181633
3322         <rdar://problem/36501797>
3323
3324         Reviewed by Joseph Pecoraro.
3325
3326         * UserInterface/Views/SpreadsheetTextField.js:
3327         (WI.SpreadsheetTextField.prototype._updateCompletions):
3328
3329 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
3330
3331         Web Inspector: Styles Redesign: Long value causes bad wrapping
3332         https://bugs.webkit.org/show_bug.cgi?id=181618
3333         <rdar://problem/36485175>
3334
3335         Reviewed by Joseph Pecoraro.
3336
3337         Wrap long values only when editing.
3338
3339         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3340         (.spreadsheet-style-declaration-editor .value.editing):
3341
3342 2018-01-16  Nikita Vasilyev  <nvasilyev@apple.com>
3343
3344         Web Inspector: Styles Redesign: clicking on the white space after the property sometimes places a blank property at the wrong index
3345         https://bugs.webkit.org/show_bug.cgi?id=179585
3346         <rdar://problem/35490780>
3347
3348         Reviewed by Joseph Pecoraro.
3349
3350         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
3351         (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.spreadsheetStylePropertyRemoved):
3352         Layout call is needed to update data-property-index attributes on the property views.
3353
3354 2018-01-16  Joseph Pecoraro  <pecoraro@apple.com>
3355
3356         Web Inspector: Network Tab - Export HAR Context Menu not working
3357         https://bugs.webkit.org/show_bug.cgi?id=181694
3358         <rdar://problem/36479197>
3359
3360         Reviewed by Brian Burg.
3361
3362         * UserInterface/Views/NetworkTableContentView.js:
3363         (WI.NetworkTableContentView.prototype.tableCellContextMenuClicked):
3364         Ensure `this` works in the handler.
3365
3366 2018-01-15  Matt Baker  <mattbaker@apple.com>
3367
3368         Web Inspector: TabBar redesign: add context menu to TabBar for toggling available tabs
3369         https://bugs.webkit.org/show_bug.cgi?id=181448
3370         <rdar://problem/36383298>
3371
3372         Reviewed by Devin Rousso.
3373
3374         * UserInterface/Base/Main.js:
3375         (WI.loaded):
3376         (WI.contentLoaded):
3377         Reorder production tab classes and default (open) tabs.
3378         (WI.registerTabClass): Removed.
3379         Not used.
3380
3381         * UserInterface/Base/Object.js:
3382         Remove notification that is no longer used.
3383
3384         * UserInterface/Views/GeneralTabBarItem.js:
3385         (WI.GeneralTabBarItem):
3386         (WI.GeneralTabBarItem.prototype.set title):
3387         (WI.GeneralTabBarItem.prototype._handleContextMenuEvent): Deleted.
3388         Remove per-tab context menu (provided Close Tab and Close Other Tabs).
3389
3390         * UserInterface/Views/NewTabContentView.js:
3391         (WI.NewTabContentView):
3392
3393         * UserInterface/Views/TabBar.js:
3394         (WI.TabBar):
3395         (WI.TabBar.prototype._handleContextMenu):
3396
3397         * UserInterface/Views/TabBrowser.js:
3398         (WI.TabBrowser):
3399         (WI.TabBrowser._handleNewTabContextMenu): Deleted.
3400         No longer needed.
3401
3402 2018-01-13  Nikita Vasilyev  <nvasilyev@apple.com>
3403
3404         Web Inspector: Styles Redesign: properties should never be semitransparent or crossed out while editing
3405         https://bugs.webkit.org/show_bug.cgi?id=180793
3406         <rdar://problem/36038813>
3407
3408         Reviewed by Devin Rousso.
3409
3410         * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css:
3411         (.spreadsheet-style-declaration-editor .value.editing):
3412         (.spreadsheet-style-declaration-editor .property:matches(.invalid-name, .other-vendor, .overridden):not(.disabled) .content > *):
3413         (.spreadsheet-style-declaration-editor .property.invalid-name:not(.disabled) .content > *):
3414         (.spreadsheet-style-declaration-editor .property.invalid-value:not(.disabled) .content .value):
3415         (.spreadsheet-style-declaration-editor .property.not-inherited .content > *):
3416         * UserInterface/Views/SpreadsheetStyleProperty.js:
3417         (WI.SpreadsheetStyleProperty.prototype._update):
3418
3419 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
3420
3421         Web Inspector: Drop support for iOS 7 targets
3422         https://bugs.webkit.org/show_bug.cgi?id=181549
3423         <rdar://problem/36444813>
3424
3425         Reviewed by Brian Burg.
3426
3427         * Versions/Inspector-iOS-7.0.json: Removed.
3428         * UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js: Removed.
3429         Remove protocol snapshot and generated commands for iOS 7.
3430
3431         * UserInterface/Base/Main.js:
3432         * UserInterface/Controllers/BreakpointPopoverController.js:
3433         (WI.BreakpointPopoverController.prototype._createPopoverContent):
3434         * UserInterface/Controllers/DebuggerManager.js:
3435         (WI.DebuggerManager.prototype._setBreakpoint):
3436         * UserInterface/Controllers/SourceMapManager.js:
3437         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
3438         * UserInterface/Models/Instrument.js:
3439         (WI.Instrument.startLegacyTimelineAgent):
3440         * UserInterface/Models/ResourceTimingData.js:
3441         * UserInterface/Models/ScriptTimelineRecord.js:
3442         (WI.ScriptTimelineRecord.EventType.displayName):
3443         * UserInterface/Models/SourceMapResource.js:
3444         (WI.SourceMapResource.prototype.requestContentFromBackend):
3445         * UserInterface/Protocol/CSSObserver.js:
3446         (WI.CSSObserver.prototype.regionLayoutUpdated): Deleted.
3447         * UserInterface/Protocol/RemoteObject.js:
3448         (WI.RemoteObject.fromPayload):
3449         Remove code that was only necessary to support iOS 7.
3450
3451 2018-01-12  Joseph Pecoraro  <pecoraro@apple.com>
3452
3453         Web Inspector: Support JSX (React) syntax highlighting
3454         https://bugs.webkit.org/show_bug.cgi?id=181607
3455         <rdar://problem/36442564>
3456
3457         Reviewed by Brian Burg.
3458
3459         * UserInterface/Base/MIMETypeUtilities.js:
3460         (WI.mimeTypeForFileExtension):
3461         (WI.fileExtensionForMIMEType):
3462         * UserInterface/Models/Resource.js:
3463         Support the jsx extension and mime types.
3464
3465         * UserInterface/Main.html:
3466         * Scripts/update-codemirror-resources.rb:
3467         * UserInterface/External/CodeMirror/jsx.js: Added.
3468         Include new mode from CodeMirror@d8926768.
3469
3470 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
3471
3472         Web Inspector: Rename "Query String" section as "Query String Parameters" for clarity
3473         https://bugs.webkit.org/show_bug.cgi?id=181464
3474
3475         Reviewed by Darin Adler.
3476
3477         * Localizations/en.lproj/localizedStrings.js:
3478         * UserInterface/Views/ResourceHeadersContentView.js:
3479         (WI.ResourceHeadersContentView.prototype.initialLayout):
3480
3481 2018-01-11  Joseph Pecoraro  <pecoraro@apple.com>
3482
3483         Web Inspector: Remove unused variable in WI.DebuggerSidebarPanel
3484         https://bugs.webkit.org/show_bug.cgi?id=181517
3485
3486         Reviewed by Matt Baker.
3487
3488         * UserInterface/Views/DebuggerSidebarPanel.js:
3489
3490 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
3491
3492         REGRESSION(r218975): Web Inspector: Add back NavigationSidebarPanel initialization parameter used by SearchSidebarPanel (top overflow shadow)
3493         https://bugs.webkit.org/show_bug.cgi?id=181518
3494         <rdar://problem/36427197>
3495
3496         Reviewed by Matt Baker.
3497
3498         * UserInterface/Views/NavigationSidebarPanel.css:
3499         (.sidebar > .panel.navigation > .overflow-shadow.top):
3500         * UserInterface/Views/NavigationSidebarPanel.js:
3501         (WI.NavigationSidebarPanel):
3502         Add back the initialization parameter still used by SearchSidebarPanel
3503         and add back its implementation. There were still references to
3504         dynamically update _topOverflowShadowElement in NavigationSidebarPanel.
3505
3506 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
3507
3508         Web Inspector: Incorrect check with WI.debuggableType
3509         https://bugs.webkit.org/show_bug.cgi?id=181515
3510         <rdar://problem/36425509>
3511
3512         Reviewed by Brian Burg.
3513
3514         * UserInterface/Base/Main.js:
3515         (WI.contentLoaded):
3516         This moved to WI.sharedApp a while ago.
3517
3518 2018-01-10  Matt Baker  <mattbaker@apple.com>
3519
3520         Web Inspector: Canvas tab: throttle recording slider updates
3521         https://bugs.webkit.org/show_bug.cgi?id=180839
3522         <rdar://problem/36057849>
3523
3524         Reviewed by Joseph Pecoraro
3525
3526         * UserInterface/Base/Utilities.js:
3527         Add Object.throttle and Function.cancelThrottle. Repeated calls to a
3528         function on a throttled object are delayed, so that the function isn't
3529         invoked more frequently than the specified delay value.
3530
3531         For a description of throttling behavior see:
3532           - http://www.chrislondon.co/throttling-vs-debouncing
3533           - http://benalman.com/projects/jquery-throttle-debounce-plugin
3534
3535         * UserInterface/Views/RecordingContentView.js:
3536         (WI.RecordingContentView.prototype.updateActionIndex):
3537         Throttle frequency of canvas snapshot creation to 200ms.
3538         (WI.RecordingContentView.prototype.hidden):
3539         Prevent trailing edge call after hiding the view.
3540
3541 2018-01-10  Joseph Pecoraro  <pecoraro@apple.com>
3542
3543         Web Inspector: Should not try to autocomplete subsections of a string
3544         https://bugs.webkit.org/show_bug.cgi?id=181461
3545         <rdar://problem/36369421>
3546
3547         Reviewed by Brian Burg.
3548
3549         * UserInterface/Controllers/CodeMirrorCompletionController.js:
3550         (WI.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
3551         Disable autocompletion within strings.
3552
3553 2018-01-09  Joseph Pecoraro  <pecoraro@apple.com>
3554
3555         REGRESSION(r201855): Web Inspector: Should see "length" autocompletion suggestion on a string literal
3556         https://bugs.webkit.org/show_bug.cgi?id=181462
3557         <rdar://problem/36390699>
3558
3559         Reviewed by Matt Baker.
3560
3561         * UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:
3562         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.inspectedPage_evalResult_getCompletions):
3563         This is code that runs on the inspected target, which may have an old version of
3564         WebKit/JavaScriptCore, so don't use new syntax like this.
3565
3566         (WI.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded):
3567         We intended to return the result by as a JSON value instead of a RemoteObject.
3568
3569 2018-01-09  Ross Kirsling  <ross.kirsling@sony.com>
3570
3571         Web Inspector: Layers sidebar shows popover on selection even when collapsed
3572         https://bugs.webkit.org/show_bug.cgi?id=181465
3573
3574         Reviewed by Matt Baker.
3575
3576         * UserInterface/Views/LayerDetailsSidebarPanel.js:
3577         (WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
3578         Have sidebar show itself if necessary before displaying popover.
3579
3580 2018-01-08  Joseph Pecoraro  <pecoraro@apple.com>
3581
3582         Web Inspector: Find next / previous within a resource content view does not have bouncy highlight when editor scrolls
3583         https://bugs.webkit.org/show_bug.cgi?id=181279
3584         <rdar://problem/36291097>
3585
3586         Reviewed by Brian Burg.
3587
3588         * UserInterface/Views/TextEditor.js:
3589         (WI.TextEditor.prototype._revealSearchResult):
3590         Reposition the bouncy highlight on scroll based on the CodeMirror
3591         line/ch position of the search result.
3592
3593         (WI.TextEditor.prototype._removeBouncyHighlightElementIfNeeded):
3594         Track the bouncy highlight scroll handler in a member variable so that
3595         we always remember to remove it and don't leak scroll handlers.
3596
3597 2018-01-07  David Kilzer  <ddkilzer@apple.com>
3598
3599         Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
3600         <https://webkit.org/b/181256>
3601         <rdar://problem/36281730>
3602
3603         Reviewed by Darin Adler.
3604
3605         * Configurations/Base.xcconfig:
3606         (WARNING_CFLAGS): Add -Wcast-qual.
3607
3608 2018-01-05  Joseph Pecoraro  <pecoraro@apple.com>
3609
3610         Web Inspector: Add another Protocol Version
3611         https://bugs.webkit.org/show_bug.cgi?id=181354
3612         <rdar://problem/35432817>
3613
3614         Reviewed by Matt Baker.
3615
3616         * UserInterface/Protocol/Legacy/11.3/InspectorBackendCommands.js: Added.
3617         * Versions/Inspector-iOS-11.3.json: Added.
3618
3619 2018-01-04  Devin Rousso  <webkit@devinrousso.com>
3620
3621         Web Inspector: replace HTMLCanvasElement with CanvasRenderingContext for instrumentation logic
3622         https://bugs.webkit.org/show_bug.cgi?id=180770
3623
3624         Reviewed by Joseph Pecoraro.
3625
3626         * UserInterface/Models/Canvas.js:
3627         (WI.Canvas.fromPayload):
3628         (WI.Canvas.prototype.get contextType):
3629         (WI.Canvas.prototype.saveIdentityToCookie):
3630         (WI.Canvas.prototype.get frame): Deleted.
3631
3632 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
3633
3634         REGRESSION (r225709): Web Inspector: CSS Source maps not loading
3635         https://bugs.webkit.org/show_bug.cgi?id=181314
3636         <rdar://problem/36177620>
3637
3638         Reviewed by Brian Burg.
3639
3640         * UserInterface/Controllers/SourceMapManager.js:
3641         (WI.SourceMapManager.prototype._loadAndParseSourceMap):
3642         * UserInterface/Models/SourceMapResource.js:
3643         (WI.SourceMapResource.prototype.requestContentFromBackend):
3644         Correct this so that we only fall back to a reasonable frame id
3645         if we couldn't determine a frame id from earlier. Previously this
3646         was incorrectly clearing the frame id if we had gotten it earlier.
3647
3648         * UserInterface/Test.html:
3649         * UserInterface/Test/Test.js:
3650         (WI.loaded):
3651         Add SourceMap related files for tests.
3652
3653 2018-01-04  Brian Burg  <bburg@apple.com>
3654
3655         Web Inspector: Capture Element Screenshot looks fuzzy
3656         https://bugs.webkit.org/show_bug.cgi?id=175734
3657         <rdar://problem/33803377>
3658
3659         Reviewed by Joseph Pecoraro and Simon Fraser.
3660
3661         Spruce up these functions a bit. They now optionally return a promise
3662         if no callback is supplied. They now can take either a WI.DOMNode or a node id.
3663
3664         * UserInterface/Controllers/DOMTreeManager.js:
3665         (WI.DOMTreeManager.prototype.querySelector):
3666         (WI.DOMTreeManager.prototype.querySelectorAll):
3667
3668 2018-01-04  Brian Burg  <bburg@apple.com>
3669
3670         Web Inspector: add RemoteObject.fetchProperties and some basic tests for RemoteObject API
3671         https://bugs.webkit.org/show_bug.cgi?id=180945
3672
3673         Reviewed by Joseph Pecoraro.
3674
3675         Add a new method, fetchProperties, which async fetches an arbitrary list of properties
3676         from a RemoteObject. This is intended for writing tests and other quick evaluations,
3677         so it has some behaviors that are suitable in these situations:
3678         - If the evaluation throws an exception, the result will reject with that exception.
3679         - If there is a protocol error for some reason, the result will reject with an exception.
3680         - Non-string and non-number keys cause an exception, as this is probably not intended.
3681         - Does not accept a callback, returns a promise only. New code should use async.
3682
3683         For full fidelity introspection of property descriptors, clients should use the existing
3684         getOwnPropertyDescriptor[s] class of methods.
3685
3686         * UserInterface/Protocol/RemoteObject.js:
3687         (WI.RemoteObject.prototype.async.fetchProperties): Added.
3688         - Validate specified keys and remove duplicates.
3689         - Request properties one-by-one to avoid fetching all descriptors and dealing with previews.
3690         - Unwrap returned primitive values to avoid unnecessary munging in tests.
3691
3692         (WI.RemoteObject.prototype.getProperty):
3693         - Rework this to return a promise if no callback was supplied.
3694         - Introduce stricter property type checking to avoid unintended mistakes.
3695
3696         (WI.RemoteObject.prototype.callFunction):
3697         - Rework this to return a promise if no callback was supplied.
3698         - Turn thrown exceptions and protocol errors into rejected promises.
3699
3700 2018-01-04  Joseph Pecoraro  <pecoraro@apple.com>
3701
3702         Web Inspector: ⌘G / ⇧⌘G text search does not working after closing find banner
3703         https://bugs.webkit.org/show_bug.cgi?id=181280
3704         <rdar://problem/36291175>
3705
3706         Reviewed by Matt Baker.
3707
3708         * UserInterface/Views/ContentBrowser.js:
3709         (WI.ContentBrowser.prototype._findBannerDidHide):
3710         When the find banner is hidden trigger a new ContentView method,
3711         searchHidden instead of the destructive searchCleared. This allows
3712         most content views (text editors, DOM tree, Network Headers view)
3713         to keep their populated search results.
3714
3715         * UserInterface/Views/ContentView.js:
3716         (WI.ContentView.prototype.searchHidden):
3717         * UserInterface/Views/LogContentView.js:
3718         (WI.LogContentView.prototype.searchHidden):
3719         By default searchHidden does nothing. The Console's LogContentView
3720         treats the find banner differently and clears its search results.
3721
3722         * UserInterface/Views/TextEditor.js:
3723         (WI.TextEditor.prototype.searchCleared):
3724         Modernize some code while working in this area.
3725
3726         * UserInterface/Views/Main.css:
3727         (.bouncy-highlight):
3728         Ensure black text on yellow background in the bouncy highlight. In the
3729         DOM Tree it could have been white if the find banner was closed.
3730
3731 2018-01-03  Ting-Wei Lan  <lantw44@gmail.com>
3732
3733         Replace hard-coded paths in shebangs with #!/usr/bin/env
3734         https://bugs.webkit.org/show_bug.cgi?id=181040
3735
3736         Reviewed by Alex Christensen.
3737
3738         * Scripts/combine-resources.pl:
3739         * Scripts/copy-user-interface-resources-dryrun.rb:
3740         * Scripts/copy-user-interface-resources.pl:
3741         * Scripts/fix-worker-imports-for-optimized-builds.pl:
3742         * Scripts/remove-console-asserts-dryrun.rb:
3743         * Scripts/remove-console-asserts.pl:
3744         * Scripts/update-LegacyInspectorBackendCommands.rb:
3745         * Scripts/update-codemirror-resources.rb:
3746         * WebInspectorUI.vcxproj/build-webinspectorui.pl:
3747
3748 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3749
3750         Web Inspector: "Log Value" context menu is sometimes unavailable
3751         https://bugs.webkit.org/show_bug.cgi?id=181278
3752         <rdar://problem/36281649>
3753
3754         Reviewed by Devin Rousso.
3755
3756         * UserInterface/Views/ObjectPreviewView.css:
3757         (.object-preview > .title):
3758         * UserInterface/Views/ObjectTreeView.css:
3759         (.object-tree.expanded > .title):
3760         Make the expanded object title information 16px tall to match ObjectTree
3761         tree element row heights. This eliminates the floating console message
3762         location from overlapping the first ObjectTree's TreeElement and causing
3763         truncation and other behavior issues (like Context Menu identification).
3764
3765 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3766
3767         Web Inspector: RTL - DOM Tree Element selection doesn't work
3768         https://bugs.webkit.org/show_bug.cgi?id=181275
3769         <rdar://problem/36290450>
3770
3771         Reviewed by Devin Rousso.
3772
3773         * UserInterface/Views/TreeOutline.js:
3774         (WI.TreeOutline.prototype.treeElementFromEvent):
3775         Provide a better explanation for why we are making the `x` adjustment here,
3776         to detect the inner most tree element along the horizontal. Fix the algorithm
3777         for RTL, since the intent is to adjust to the trailing edge of the container
3778         which is on the opposite side in RTL.
3779
3780 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3781
3782         Web Inspector: Find banner sometimes does not work (when already populated and shown for first time on resource)
3783         https://bugs.webkit.org/show_bug.cgi?id=181255
3784         <rdar://problem/36248855>
3785
3786         Reviewed by Matt Baker.
3787
3788         * UserInterface/Views/TextEditor.js:
3789         (WI.TextEditor.prototype.set string):
3790         Defer any early searches until the initial content of a TextEditor has been set.
3791         Such searches can happen when the FindBanner already has content when a
3792         ContentView is first opened and needs to load its content from the backend.
3793         Further, even though the content may be loaded from the backend before the
3794         search results, microtask hops might cause the content to get to the TextEditor
3795         after the search results.
3796
3797 2018-01-03  Joseph Pecoraro  <pecoraro@apple.com>
3798
3799         REGRESSION: Web Inspector: Debugger tab doesn't restore selected resource on reload
3800         https://bugs.webkit.org/show_bug.cgi?id=181253
3801         <rdar://problem/36280564>
3802
3803         Reviewed by Matt Baker.
3804
3805         * UserInterface/Views/DebuggerSidebarPanel.js:
3806         (WI.DebuggerSidebarPanel.prototype.restoreStateFromCookie):
3807         Add braces to ensure the trailing else is actually trailing the outer
3808         chain as it was intended to be.
3809
3810 2018-01-02  Joseph Pecoraro  <pecoraro@apple.com>
3811
3812         Web Inspector: Clicking source location link in Console unexpectedly jumps to Network tab
3813         https://bugs.webkit.org/show_bug.cgi?id=181229
3814         <rdar://problem/36075219>
3815
3816         Reviewed by Matt Baker.
3817
3818         * UserInterface/Base/Main.js:
3819         Cleanup linkifyURLAsNode. Ignore Search tab in generic handlePossibleLinkClick
3820         when not already in the Search tab.
3821
3822         * UserInterface/Views/CallFrameView.js:
3823         (WI.CallFrameView):
3824         Ignore Search and Network tab in CallFrame links.
3825
3826         * UserInterface/Views/TabBrowser.js:
3827         (WI.TabBrowser.prototype.bestTabContentViewForRepresentedObject):
3828         Improve style.
3829
3830 == Rolled over to ChangeLog-2018-01-01 ==