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