/
ChangeLog
4257 lines (3334 loc) · 206 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2017-01-27 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: gradient editor should provide horizontal slider for 'angle' value where applicable
https://bugs.webkit.org/show_bug.cgi?id=166937
Reviewed by Joseph Pecoraro.
* UserInterface/Views/GradientEditor.css:
(.gradient-editor):
(.gradient-editor > .gradient-angle):
(.gradient-editor > .gradient-angle > input[type="range"]):
(.gradient-editor > .gradient-angle > input[type="number"]):
(.gradient-editor > .gradient-angle > input::-webkit-inner-spin-button):
(.gradient-editor > .gradient-angle > input): Deleted.
* UserInterface/Views/GradientEditor.js:
(WebInspector.GradientEditor):
(WebInspector.GradientEditor.prototype.set gradient):
(WebInspector.GradientEditor.prototype.gradientSliderStopWasSelected):
(WebInspector.GradientEditor.prototype._gradientTypeChanged):
(WebInspector.GradientEditor.prototype._angleChanged):
(WebInspector.GradientEditor.prototype.dragToAdjustControllerWasAdjustedByAmount): Deleted.
(WebInspector.GradientEditor.prototype._angleInputValueDidChange): Deleted.
Remove the DragToAdjustController and replace with an <input type="range">.
2017-01-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Provide a way to trigger a Garbage Collection
https://bugs.webkit.org/show_bug.cgi?id=167345
<rdar://problem/30102853>
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
New "Garbage collect" tooltip.
* Versions/Inspector-iOS-10.3.json:
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
Update 10.3 so it generates its list of supported domains for workers.
Note that the Heap domain is not be available in this backend but it is now.
* UserInterface/Protocol/Connection.js:
(InspectorBackend.WorkerConnection):
* UserInterface/Protocol/HeapObserver.js:
(WebInspector.HeapObserver.prototype.garbageCollected):
* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass):
(InspectorBackendClass.prototype.get workerSupportedDomains):
(InspectorBackendClass.prototype.workerSupportedDomain):
* UserInterface/Images/NavigationItemClear.svg: Added.
* UserInterface/Images/NavigationItemGarbageCollect.svg: Added.
New image for Garbage Collection. Better image for clearing.
* UserInterface/Images/gtk/NavigationItemClear.svg: Added.
Copy the Trash icon for Clear for gtk.
* UserInterface/Protocol/Target.js:
(WebInspector.Target.prototype.get HeapAgent):
* UserInterface/Protocol/WorkerTarget.js:
(WebInspector.WorkerTarget):
Include Heap agent for Workers.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.get navigationItems):
(WebInspector.LogContentView.prototype._garbageCollect):
Add garbage collect button which triggers gc on all capable targets.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Update the Clear icon to an improved icon.
* UserInterface/Controllers/HeapManager.js:
(WebInspector.HeapManager.prototype.garbageCollected):
Timelines only shows Main Target events, do not show GC events for Workers.
2017-01-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: long press on New Tab Tab Item should show context menu with recently closed tabs that are still closed
https://bugs.webkit.org/show_bug.cgi?id=166901
Reviewed by Joseph Pecoraro.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/TabBar.js:
(WebInspector.TabBar.Event):
(WebInspector.TabBar.prototype._handleNewTabContextMenu):
Add listener dispatch for contextmenu event on New Tab tab item.
(WebInspector.TabBar.prototype.get newTabTabBarItem): Deleted.
Unused.
* UserInterface/Views/TabBrowser.js:
(WebInspector.TabBrowser):
(WebInspector.TabBrowser.prototype._tabBarItemAdded):
(WebInspector.TabBrowser.prototype._tabBarItemRemoved):
(WebInspector.TabBrowser.prototype._handleNewTabContextMenu): Added.
Create an array that keeps track of tabs as they are closed, and populate the contextmenu
of the New Tab tab item with entries for each of these tabs.
2017-01-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: tree elements with depth > 1 should have context menu "expand all"/"collapse all" commands
https://bugs.webkit.org/show_bug.cgi?id=135590
Reviewed by Timothy Hatcher.
Rework the context menu event handlers for all TreeOutline and TreeElement instances such
that the TreeOutline handles the event listener and creates the context menu object and the
TreeElement populates the list with items. This is necessary due to the way in which
children are laid out, as there is padding on either side of the element that would not
trigger a context menu event.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.ondetach):
(WebInspector.BreakpointTreeElement.prototype.populateContextMenu):
(WebInspector.BreakpointTreeElement.prototype.oncontextmenu): Deleted.
* UserInterface/Views/ContextMenuUtilities.js:
(WebInspector.appendContextMenuItemsForSourceCode):
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._populateNodeContextMenu):
* UserInterface/Views/DOMTreeOutline.js:
(WebInspector.DOMTreeOutline):
(WebInspector.DOMTreeOutline.prototype.populateContextMenu):
(WebInspector.DOMTreeOutline.prototype._onmousedown):
(WebInspector.DOMTreeOutline.prototype._onmousemove):
(WebInspector.DOMTreeOutline.prototype._ondragstart):
(WebInspector.DOMTreeOutline.prototype._ondragover):
(WebInspector.DOMTreeOutline.prototype._ondrop):
(WebInspector.DOMTreeOutline.prototype._treeElementFromEvent): Deleted.
(WebInspector.DOMTreeOutline.prototype._contextMenuEventFired): Deleted.
* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._breakpointTreeOutlineContextMenuTreeElement):
* UserInterface/Views/FrameTreeElement.js:
(WebInspector.FrameTreeElement.prototype.onattach):
* UserInterface/Views/GeneralTreeElement.js:
(WebInspector.GeneralTreeElement.prototype.onattach):
(WebInspector.GeneralTreeElement.prototype.ondetach): Deleted.
* UserInterface/Views/ObjectTreeBaseTreeElement.js:
(WebInspector.ObjectTreeBaseTreeElement.prototype.populateContextMenu):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logSymbolProperty):
(WebInspector.ObjectTreeBaseTreeElement.prototype._logValue):
(WebInspector.ObjectTreeBaseTreeElement.prototype.oncontextmenu): Deleted.
(WebInspector.ObjectTreeBaseTreeElement.prototype._contextMenuHandler): Deleted.
* UserInterface/Views/ResourceTreeElement.js:
(WebInspector.ResourceTreeElement.prototype.populateContextMenu):
(WebInspector.ResourceTreeElement.prototype.onattach): Deleted.
(WebInspector.ResourceTreeElement.prototype._handleContextMenuEvent): Deleted.
* UserInterface/Views/ThreadTreeElement.js:
(WebInspector.ThreadTreeElement.prototype.populateContextMenu):
(WebInspector.ThreadTreeElement.prototype.oncontextmenu): Deleted.
* UserInterface/Views/TreeElement.js:
(WebInspector.TreeElement.prototype.populateContextMenu):
(WebInspector.TreeElement):
* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.treeElementFromEvent):
(WebInspector.TreeOutline.prototype.populateContextMenu):
(WebInspector.TreeOutline._generateStyleRulesIfNeeded):
* UserInterface/Views/VisualStyleSelectorTreeItem.js:
(WebInspector.VisualStyleSelectorTreeItem.prototype.onattach):
(WebInspector.VisualStyleSelectorTreeItem.prototype.populateContextMenu):
(WebInspector.VisualStyleSelectorTreeItem.prototype._highlightNodesWithSelector):
(WebInspector.VisualStyleSelectorTreeItem.prototype._hideDOMNodeHighlight):
(WebInspector.VisualStyleSelectorTreeItem.prototype._handleContextMenuEvent): Deleted.
* UserInterface/Views/WorkerTreeElement.js:
(WebInspector.WorkerTreeElement.prototype.populateContextMenu):
(WebInspector.WorkerTreeElement.prototype.onattach):
(WebInspector.WorkerTreeElement.prototype._handleContextMenuEvent): Deleted.
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._contextMenuInDataTable):
Add "Expand All"/"Collapse All" context menu items.
2017-01-23 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: color picker should feature an editable CSS value
https://bugs.webkit.org/show_bug.cgi?id=124356
Reviewed by Timothy Hatcher.
* UserInterface/Views/ColorPicker.css:
(.color-picker):
(.color-picker.hide-inputs):
(.color-picker > .color-inputs):
(.color-picker > .color-inputs > div):
(.color-picker > .color-inputs > div[hidden]):
(.color-picker > .color-inputs input):
* UserInterface/Views/ColorPicker.js:
(WebInspector.ColorPicker.createColorInput):
(WebInspector.ColorPicker):
(WebInspector.ColorPicker.prototype.set color):
(WebInspector.ColorPicker.prototype.set enableColorComponentInputs):
(WebInspector.ColorPicker.prototype._updateColor):
(WebInspector.ColorPicker.prototype._handleFormatChange):
(WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput):
(WebInspector.ColorPicker.prototype._showColorComponentInputs):
(WebInspector.ColorPicker.prototype._handleColorInputInput):
Add an input element (with a label for the component name and its units) for each component
as part of the current color format (e.g. R, G, B, A). If any of these inputs are changed
then the color is also changed and the "ColorChanged" event is fired.
* UserInterface/Controllers/CodeMirrorColorEditingController.js:
(WebInspector.CodeMirrorColorEditingController.prototype.popoverWillPresent):
* UserInterface/Views/InlineSwatch.js:
(WebInspector.InlineSwatch.prototype._swatchElementClicked):
Add FormatChanged event that fires whenever a new color is set with a different format or
the color value is set for the first time (there is no old format to compare to). This is
needed because if the format becomes RGB, RGBA, HSL, or HSLA from something not in that list
then the size of the containing popover needs to change since the newly added color inputs
will be displayed.
* UserInterface/Views/GradientEditor.js:
(WebInspector.GradientEditor):
Prevent the color inputs from displaying at all, since there aren't individual swatches for
each color in a gradient.
2017-01-20 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Search Tab should display search results immediately when closing and reopening Inspector
https://bugs.webkit.org/show_bug.cgi?id=167073
Reviewed by Timothy Hatcher.
* UserInterface/Views/SearchSidebarPanel.js:
(WebInspector.SearchSidebarPanel.prototype.focusSearchField):
Add parameter that will trigger a search with the current input value when true.
* UserInterface/Views/SearchTabContentView.js:
(WebInspector.SearchTabContentView):
(WebInspector.SearchTabContentView.prototype.focusSearchField):
(WebInspector.SearchTabContentView.prototype.initialLayout):
2017-01-19 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Network Tab's "Clear Network Items" button should have keyboard shortcuts
https://bugs.webkit.org/show_bug.cgi?id=166943
Reviewed by Timothy Hatcher.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._clear):
Move clear keyboard shortcut to main object and call _handleClearShortcut on the visible
content view if able.
* UserInterface/Controllers/JavaScriptLogViewController.js:
(WebInspector.JavaScriptLogViewController):
(WebInspector.JavaScriptLogViewController.prototype.requestClearMessages):
(WebInspector.JavaScriptLogViewController.prototype._handleClearShortcut): Deleted.
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView):
(WebInspector.LogContentView.prototype.handleClearShortcut):
Move logic for requesting to clear messages from the LogManager to a better named function.
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
(WebInspector.NetworkGridContentView.prototype.handleClearShortcut):
2017-01-19 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Dashboard's log/error/warning help tag says "click to show the Console" even when clicking does nothing
https://bugs.webkit.org/show_bug.cgi?id=167102
Reviewed by Brian Burg.
* UserInterface/Base/Main.js:
(WebInspector.showConsoleTab):
Don't revert to the All scopes if the requested scope is already selected.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView):
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
(WebInspector.DefaultDashboardView.prototype._setItemEnabled):
Only apply a title to the element when it is enabled.
2017-01-18 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: split console should be allowed for Network and Timeline tabs when Inspector is not docked
https://bugs.webkit.org/show_bug.cgi?id=167075
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.dockedConfigurationSupportsSplitContentBrowser):
Helper function to determine if the current docked state supports having the content view
and split console at the same time. Currently set to be true if not docked bottom.
* UserInterface/Views/ClusterContentView.js:
(WebInspector.ClusterContentView.prototype.get supportsSplitContentBrowser):
* UserInterface/Views/ContentView.js:
(WebInspector.ContentView.prototype.get supportsSplitContentBrowser):
* UserInterface/Views/NetworkTabContentView.js:
(WebInspector.NetworkTabContentView.prototype.get supportsSplitContentBrowser):
* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype.get supportsSplitContentBrowser): Deleted.
Update supportsSplitContentBrowser functions to only be true/false based on the return value
of WebInspector.dockedConfigurationSupportsSplitContentBrowser.
2017-01-18 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: console.table only works for the first 5 properties
https://bugs.webkit.org/show_bug.cgi?id=167175
Reviewed by Timothy Hatcher.
* UserInterface/Views/ConsoleMessageView.js:
(WebInspector.ConsoleMessageView.prototype._formatParameterAsTable):
Allow a max of 15 columns instead of 10.
2017-01-16 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: add "Persist Logs on Navigation" to settings screen
https://bugs.webkit.org/show_bug.cgi?id=166992
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Setting.js:
* UserInterface/Controllers/LogManager.js:
(WebInspector.LogManager):
(WebInspector.LogManager.prototype._delayedMessagesCleared):
* UserInterface/Views/LogContentView.js:
(WebInspector.LogContentView.prototype._sessionStarted):
(WebInspector.LogContentView.prototype._handleContextMenuEvent):
(WebInspector.LogContentView.prototype._toggleClearLogOnNavigateSetting):
Move setting and UI toggle for "Keep Log on Navigation" to the global settings dictionary
and content view.
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.initialLayout):
(WebInspector.SettingsTabContentView):
Add checkbox for new setting and spacer between text settings and log settings.
2017-01-16 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: add UI Zoom level to Settings screen
https://bugs.webkit.org/show_bug.cgi?id=166991
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.loaded):
(WebInspector._dockedResizerMouseDown):
(WebInspector._increaseZoom):
(WebInspector._decreaseZoom):
(WebInspector._resetZoom):
(WebInspector.getZoomFactor): Renamed from _zoomFactor.
(WebInspector.setZoomFactor): Renamed from _setZoomFactor.
* UserInterface/Base/Setting.js:
(WebInspector.settings):
Moved zoomFactor setting to global dictionary.
* UserInterface/Views/SettingsTabContentView.css:
(.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.initialLayout):
Add UI input for changing zoomFactor.
2017-01-14 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Cmd-, should open Settings tab
https://bugs.webkit.org/show_bug.cgi?id=167028
Reviewed by Timothy Hatcher.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
(WebInspector._showSettingsTab): Added.
2017-01-13 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: Settings tab is restored when reopening inspector
https://bugs.webkit.org/show_bug.cgi?id=167025
Reviewed by Matt Baker.
* UserInterface/Base/Main.js:
(WebInspector._tabBrowserSelectedTabContentViewDidChange):
Only save the selectedTabIndex if the current tab should be saved and reloaded upon opening
the WebInspector window.
2017-01-13 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Resources disappear from the network tab when iframe gets removed from DOM
https://bugs.webkit.org/show_bug.cgi?id=166776
<rdar://problem/29909640>
Reviewed by Matt Baker.
* UserInterface/Views/NetworkSidebarPanel.js:
(WebInspector.NetworkSidebarPanel):
Don't remove resource tree elements from Network tab when iframe gets detached from the DOM.
2017-01-13 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: the 'lock' icon for non-editable rules in the Style Rules sidebar lacks a tooltip
https://bugs.webkit.org/show_bug.cgi?id=166909
<rdar://problem/29959406>
Reviewed by Matt Baker.
Convert the lock icon from a pseudo-element to an 'img' element and add a title attribute.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/CSSStyleDeclarationSection.css:
(.style-declaration-section.locked > .header > .locked-icon):
(.style-declaration-section.locked > .header::before): Deleted.
* UserInterface/Views/CSSStyleDeclarationSection.js:
(WebInspector.CSSStyleDeclarationSection):
2017-01-12 Nikita Vasilyev <nvasilyev@apple.com>
REGRESSION (r209711): Web Inspector: in Elements Tab, selecting a deeply nested DOM element causes navigation bar buttons to be pushed off the leading edge
https://bugs.webkit.org/show_bug.cgi?id=166898
<rdar://problem/29951737>
Reviewed by Timothy Hatcher.
* UserInterface/Views/HierarchicalPathComponent.js:
(WebInspector.HierarchicalPathComponent.prototype.set selectorArrows):
The following operations do NOT produce the same result:
classList.toogle(aString, undefined)
classList.toogle(aString, false)
The former is an equivalent of classList.toogle(aString), e.g. it set a class if it wasn't set before.
2017-01-12 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: cubic-bezier editor behaves poorly for invalid inputs in component fields
https://bugs.webkit.org/show_bug.cgi?id=166928
Reviewed by Brian Burg.
* UserInterface/Views/BezierEditor.css:
(.bezier-editor):
(.bezier-editor > .number-input-container > input):
* UserInterface/Views/BezierEditor.js:
(WebInspector.BezierEditor.createBezierInput):
(WebInspector.BezierEditor):
Add type, step, min, and max to the bezier component inputs to better control user input.
2017-01-11 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Add another Protocol Version
https://bugs.webkit.org/show_bug.cgi?id=166953
<rdar://problem/29980631>
Reviewed by Timothy Hatcher.
* UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js: Added.
* Versions/Inspector-iOS-10.3.json: Added.
2017-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: spring function editor has unusual layout, should have left-aligned labels and slider tracks
https://bugs.webkit.org/show_bug.cgi?id=166933
Reviewed by Brian Burg.
* UserInterface/Views/Main.css:
(input[type=range]::-webkit-slider-thumb):
(input[type=range]::-webkit-slider-runnable-track):
(input[type=range]::-webkit-slider-runnable-track::before): Deleted.
Fix slider styles.
* UserInterface/Views/SpringEditor.css:
(.spring-editor):
(.spring-editor > .spring-preview):
(.spring-editor > .spring-timing):
(.spring-editor > .number-input-container > .number-input-row > .number-input-row-title):
(.spring-editor > .number-input-container > .number-input-row > input):
(.spring-editor > .number-input-container > .number-input-row > input::-webkit-inner-spin-button):
(.spring-editor > .number-input-container > .number-input-row > input[type="range"]):
Decrease spacing and left-align text.
* UserInterface/Views/SpringEditor.js:
(WebInspector.SpringEditor.prototype._handleNumberInputKeydown):
(WebInspector.SpringEditor.prototype._changeSpringForInput):
Only update editor values when the new value of any input has changed. This allows users to
enter decimal values ("." was being stripped by `parseFloat`).
2017-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: color, gradient, cubic-bezier, spring editors should be dismissable using ESC
https://bugs.webkit.org/show_bug.cgi?id=166934
Reviewed by Brian Burg.
* UserInterface/Views/Popover.js:
(WebInspector.Popover):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype.handleEvent):
(WebInspector.Popover.prototype._addListenersIfNeeded):
Adds a keydown listener while visible for the Escape key that dismisses the popover.
* UserInterface/Views/QuickConsole.js:
(WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled):
Expose the ability to disable the global keyboard shortcut. This allows the Popover to have
its own Escape keyboard shortcut to take precedence.
2017-01-11 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: fix UIString for Print Styles button
https://bugs.webkit.org/show_bug.cgi?id=166892
Reviewed by Brian Burg.
* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DOMTreeContentView.js:
(WebInspector.DOMTreeContentView):
Changed UIString to better match documentation.
2017-01-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r210260.
https://bugs.webkit.org/show_bug.cgi?id=166860
new colorpicker UI doesn't seem to work in trunk,
investigating offline (Requested by brrian on #webkit).
Reverted changeset:
"Web Inspector: color picker should feature an editable CSS
value"
https://bugs.webkit.org/show_bug.cgi?id=124356
http://trac.webkit.org/changeset/210260
2017-01-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r210110.
https://bugs.webkit.org/show_bug.cgi?id=166783
Introduced a regression commenting out individual properties
(Requested by JoePeck on #webkit).
Reverted changeset:
"Web Inspector: Styles sidebar: Uncommenting CSS rules of
pseudo-elements doesn't work"
https://bugs.webkit.org/show_bug.cgi?id=165831
http://trac.webkit.org/changeset/210110
2017-01-05 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unused delegate from VisualStyleSelectorSection
https://bugs.webkit.org/show_bug.cgi?id=166744
Reviewed by Alex Christensen.
* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
* UserInterface/Views/VisualStyleSelectorSection.js:
(WebInspector.VisualStyleSelectorSection):
2017-01-04 Brian Burg <bburg@apple.com>
Web Inspector: Test.html should support globals reportInternalError, reportUnhandledRejection, reportUncaughtException
https://bugs.webkit.org/show_bug.cgi?id=161358
<rdar://problem/28066446>
Reviewed by Joseph Pecoraro.
We have a hodgepodge of redundant code that reports uncaught exceptions in the inspector page.
There is better handling of uncaught exceptions in the inspected page, such as including stack traces.
This patch consolidates a lot of this code and makes it possible to report
unhandled promise rejections, top-level uncaught exceptions, and exceptions
caught in a try-catch block. The formatting and sanitization code for all of
these things is shared and consistent. Finally, some tests have been added to
catch regressions in unhandled rejection/uncaught exception reporting.
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness): Explicitly set initial flag state here so it's easy to find all flags.
(FrontendTestHarness.prototype.redirectConsoleToTestOutput):
Extract this code to sanitize stack frames and put it in TestHarness. It is used
by other methods that need to print stack frames.
(FrontendTestHarness.prototype.reportUnhandledRejection):
(FrontendTestHarness.prototype.reportUncaughtException):
Added. Sanitize stack trace data so it is deterministic. Log the message to the
original window.console but don't exit early. Sometimes the test page is not
fully loaded if we throw an exception quite early in the test() method, and there's
no harm in not early returning. If we do early return in this case, then a test that
uses reportUncaughtException on purpose may not complete because the call to completeTest()
would be skipped by returning early.
(FrontendTestHarness.prototype.reportUncaughtExceptionFromEvent):
Renamed from reportUncaughtException since the signature of that method suggests
it should have a single exception argument rather than lots of data arguments.
* UserInterface/Test/Test.js: Add globals.
* UserInterface/Test/TestHarness.js:
(TestHarness): Document class flags.
(TestHarness.sanitizeURL):
(TestHarness.sanitizeStackFrame):
(TestHarness.prototype.sanitizeStack):
Extract this code from other parts of the test harness. Make sanitizeStack
an instance method so that there is only one place that needs to check the
'suppressStackTraces' flag.
* UserInterface/Test/TestSuite.js:
(TestSuite.prototype.logThrownObject):
(TestSuite):
(AsyncTestSuite.prototype.runTestCases):
(AsyncTestSuite):
(SyncTestSuite.prototype.runTestCases):
(SyncTestSuite):
(TestSuite.messageFromThrownObject): Deleted.
Inline some helpers with only one use-site and consolidate redundant code
for adding an exception and message to the test results.
2017-01-04 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: application cache details not shown in Storage Tab
https://bugs.webkit.org/show_bug.cgi?id=166699
<rdar://problem/29871716>
Reviewed by Brian Burg.
Fix a ternary operator precedence. The following expression throws an exception:
true || false ? i.dont.exist : false
* UserInterface/Views/ApplicationCacheFrameTreeElement.js:
(WebInspector.ApplicationCacheFrameTreeElement.prototype.updateTitles):
2017-01-03 Brian Burg <bburg@apple.com>
Web Inspector: WrappedPromise constructor should behave like the Promise constructor
https://bugs.webkit.org/show_bug.cgi?id=166523
Reviewed by Joseph Pecoraro.
* UserInterface/Models/WrappedPromise.js:
(WebInspector.WrappedPromise):
- Return the result of 'work' from the inner promise
so WrappedPromise.promise can be chained.
- Provide shim resolve, reject callbacks as parameters.
(WebInspector.WrappedPromise.prototype.get settled): Added.
Tells whether we already resolved or rejected the promise.
(WebInspector.WrappedPromise.prototype.resolve):
(WebInspector.WrappedPromise.prototype.reject):
Throw an error if already settled and update the flag.
2017-01-03 Devin Rousso <dcrousso+webkit@gmail.com>
Web Inspector: color picker should feature an editable CSS value
https://bugs.webkit.org/show_bug.cgi?id=124356
Reviewed by Brian Burg.
* UserInterface/Views/ColorPicker.css:
(.color-picker):
(.color-picker > .color-inputs):
(.color-picker > .color-inputs > div):
(.color-picker > .color-inputs > div[hidden]):
(.color-picker > .color-inputs input):
* UserInterface/Views/ColorPicker.js:
(WebInspector.ColorPicker.createColorInput):
(WebInspector.ColorPicker):
(WebInspector.ColorPicker.prototype.set color):
(WebInspector.ColorPicker.prototype.sliderValueDidChange):
(WebInspector.ColorPicker.prototype._updateColor):
(WebInspector.ColorPicker.prototype._showColorComponentInputs.updateColorInput):
(WebInspector.ColorPicker.prototype._showColorComponentInputs):
(WebInspector.ColorPicker.prototype._handleColorInputInput):
Add an input element (with a label for the component name and its units) for each component
as part of the current color format (e.g. R, G, B, A). If any of these inputs are changed
then the color is also changed and the "ColorChanged" event is fired.
2017-01-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: "Invalid Characters" setting does the opposite of the checkbox
https://bugs.webkit.org/show_bug.cgi?id=166664
Reviewed by Brian Burg.
* UserInterface/Views/CodeMirrorOverrides.css:
(.CodeMirror .cm-invalidchar):
(.show-invalid-characters .CodeMirror .cm-invalidchar):
Hide invalid characters by default, and show them with the show class.
2017-01-03 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Fix Content Flow Container Regions Computed Style section
https://bugs.webkit.org/show_bug.cgi?id=166294
Reviewed by Brian Burg.
* UserInterface/Controllers/DOMTreeManager.js:
(WebInspector.DOMTreeManager.prototype._coerceRemoteArrayOfDOMNodes):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.domNodeResolved):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.remoteObjectPropertiesAvailable):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo):
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getComputedProperty): Deleted.
(WebInspector.DOMTreeManager.prototype.getNodeContentFlowInfo.backendFunction.getContentFlowName): Deleted.
Update this to use Array.from() to convert the NodeList to an Array, and then
use the already available RemoteObject's size property instead of getting the
"length" property from the Array.
2017-01-03 Brian Burg <bburg@apple.com>
Web Inspector: opening Test.html in a normal browser window doesn't log errors to console
https://bugs.webkit.org/show_bug.cgi?id=166570
Reviewed by Joseph Pecoraro.
Early syntax errors in the test harness should be logged to the page console since they are easier to
debug in a normal browser using Web Inspector. But, the checks to revert to normal console don't work.
* UserInterface/Test/FrontendTestHarness.js:
(FrontendTestHarness.prototype.reportUncaughtException):
Add a helper to encapsulate the meaning of checking this._shouldResendResults.
This flag is always true until the test page injects its initializers into the
inspector page, which will never happen when we view Test.html outside of the test harness.
2016-12-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r210069.
https://bugs.webkit.org/show_bug.cgi?id=166439
This patch makes all properties in Computed Styles strike-
through when switching from the Rules panel. (Requested by NVI
on #webkit).
Reverted changeset:
"Web Inspector: Uncommenting CSS properties doesn't work for
inline styles"
https://bugs.webkit.org/show_bug.cgi?id=166297
http://trac.webkit.org/changeset/210069
2016-12-22 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Styles sidebar: Uncommenting CSS rules of pseudo-elements doesn't work
https://bugs.webkit.org/show_bug.cgi?id=165831
<rdar://problem/29652688>
Reviewed by Matt Baker.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
(WebInspector.CSSStyleDeclarationTextEditor.prototype.uncommentAllProperties):
Call _resetContent() when toggling all properties to ensure properties have text markers.
(WebInspector.CSSStyleDeclarationTextEditor.prototype._propertyCommentCheckboxChanged):
(WebInspector.CSSStyleDeclarationTextEditor.prototype._uncommentProperty): Added.
This method is the opposite of _commentProperty. Introduce it to minimize code duplication.
2016-12-21 Nikita Vasilyev <nvasilyev@apple.com>
Web Inspector: Uncommenting CSS properties doesn't work for inline styles
https://bugs.webkit.org/show_bug.cgi?id=166297
Reviewed by Brian Burg.
* UserInterface/Views/CSSStyleDeclarationTextEditor.js:
Update checkboxes for inline styles, too.
2016-12-20 Matt Baker <mattbaker@apple.com>
Web Inspector: Window resize causes TimelineOverview graph elements to be repositioned
https://bugs.webkit.org/show_bug.cgi?id=160207
<rdar://problem/27553228>
Reviewed by Brian Burg.
TimelineRuler does not always update its divider positions when the start
time changes while the end time remains the same. The check that determines
whether the first or last divider positions have changed before doing a
layout uses the ruler end time instead of calculating the last divider's
position, and would falsely determine no change was needed.
* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype.set startTime):
(WebInspector.TimelineRuler.prototype.set secondsPerPixel):
Clear cached divider data on zoom or scroll, forcing dividers to be recalculated.
(WebInspector.TimelineRuler.prototype.layout):
Calculate accurate divider count and last divider time.
2016-12-20 Wenson Hsieh <wenson_hsieh@apple.com>
Update keyword completions in the inspector for the new scroll snapping CSS properties
https://bugs.webkit.org/show_bug.cgi?id=166235
Reviewed by Joseph Pecoraro.
The CSS keyword completions for the scroll snapping properties need to be updated for the latest version of the spec.
* UserInterface/Models/CSSKeywordCompletions.js:
2016-12-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Console could be made useful for very simple await expressions
https://bugs.webkit.org/show_bug.cgi?id=165681
<rdar://problem/29755339>
Reviewed by Brian Burg.
Normally await expressions are only allowed inside of async functions.
They make dealing with async operations easy, but can't be used directly
in Web Inspector's console without making your own async function wrapper.
This change allows simple await expressions to be run in the console.
The supported syntaxes are (simple expression with optional assignment):
await <expr>
x = await <expr>
let x = await <expr>
Web Inspector's console will automatically wrap this in an async
function and report the resulting value or exception. For instance
in the last example above:
let x;
(async function() {
try {
x = await <expr>;
console.info("%o", x);
} catch (e) {
console.error(e);
}
})();
undefined
This way users can get the convenience of await in the Console.
This also gives users a nice way of extracting a value out of
a Promise without writing their own handlers.
* UserInterface/Controllers/RuntimeManager.js:
(WebInspector.RuntimeManager.prototype.evaluateInInspectedWindow):
(WebInspector.RuntimeManager.prototype._tryApplyAwaitConvenience):
Wrap simple await expressions into a function that will log the result.
2016-12-20 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Update CodeMirror to support async/await keyword and other ES2017 features
https://bugs.webkit.org/show_bug.cgi?id=165677
Rubber-stamped by Brian Burg.
Update CodeMirror from version 5.5.1 to 5.21.1. Highlights include:
- Syntax highlighting for ES2017 features (async/await)
- Syntax highlighting improvements for some ES6 features (new.target)
- Syntax highlighting for CSS4 #rrggbbaa and #rgba colors
As well as a number of smaller bug fixes.
Had to add a few semicolons to codemirror.js so that our minifier
didn't choke in a few places due to ASI behavior.
* Scripts/update-codemirror-resources.rb:
* UserInterface/External/CodeMirror/LICENSE:
* UserInterface/External/CodeMirror/clojure.js:
* UserInterface/External/CodeMirror/closebrackets.js:
* UserInterface/External/CodeMirror/codemirror.css:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/comment.js:
* UserInterface/External/CodeMirror/css.js:
* UserInterface/External/CodeMirror/htmlmixed.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/External/CodeMirror/livescript.js:
* UserInterface/External/CodeMirror/matchbrackets.js:
* UserInterface/External/CodeMirror/overlay.js:
* UserInterface/External/CodeMirror/placeholder.js:
* UserInterface/External/CodeMirror/runmode.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/sublime.js:
* UserInterface/External/CodeMirror/xml.js:
2016-12-19 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Address some assertions and uncaught exceptions seen using Inspector
https://bugs.webkit.org/show_bug.cgi?id=166048
Reviewed by Matt Baker.
* UserInterface/Controllers/CodeMirrorEditingController.js:
(WebInspector.CodeMirrorEditingController.prototype.presentHoverMenu):
(WebInspector.CodeMirrorEditingController.prototype.dismissHoverMenu):
classList throws an exception when given an empty string. Avoid those cases.
* UserInterface/Controllers/CodeMirrorTokenTrackingController.js:
(WebInspector.CodeMirrorTokenTrackingController.prototype._startTracking):
(WebInspector.CodeMirrorTokenTrackingController.prototype._stopTracking):
Seen this assert frequently for a while, existing code handles it gracefully.
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
We correctly handle these tokens but they were not in the list of expected tokens.
2016-12-16 Joseph Pecoraro <pecoraro@apple.com>
JSContext Inspector: Avoid some possible exceptions inspecting a JSContext
https://bugs.webkit.org/show_bug.cgi?id=165986
<rdar://problem/29551379>
Reviewed by Matt Baker.
* UserInterface/Base/Main.js:
There will not be a main frame if we are debugging a JSContext.
In those cases do not change the title.
* UserInterface/Views/ResourceSidebarPanel.js:
(WebInspector.ResourceSidebarPanel.prototype._scriptWasAdded):
There may not be a parent folder in JavaScript inspection. In that case
ScriptTreeElements are added to the Top Level, not folders.
2016-12-16 Matt Baker <mattbaker@apple.com>
Web Inspector: REGRESSION (r209882): Opening find banner in editor causes UI to hang
https://bugs.webkit.org/show_bug.cgi?id=165967
Reviewed by Timothy Hatcher.
* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser.prototype._findBannerDidShow):
Showing the find banner should cause search results to be refreshed only
if it contains query text.
2016-12-16 Matt Baker <mattbaker@apple.com>
Web Inspector: Modernize find banner UI
https://bugs.webkit.org/show_bug.cgi?id=165939
Reviewed by Timothy Hatcher.
The find banner should have a modern appearance, matching Xcode.
* UserInterface/Views/FindBanner.css:
(.find-banner > input[type="search"]):
(.find-banner > button):
Use standard border colors.
(.find-banner > button:disabled > .glyph):
Disabled previous / next glyphs should be lighter.
(.find-banner > button:active:not(:disabled)):
Update depressed button style: flat colors, no text color change.
(.find-banner > button.segmented):
(.find-banner > button.segmented.left):
(.find-banner > button:not(:active).segmented.right:before):
(.find-banner > button.segmented.left:active + button.segmented.right,):
(.find-banner > button.segmented.left:active + button.segmented.right:before):
(.find-banner > button.segmented.right):
(.find-banner.console-find-banner > input[type="search"]):
(.find-banner.console-find-banner > :matches(input[type="search"], button)):
(.find-banner > button:disabled): Deleted.
(.find-banner > button.segmented:active): Deleted.
Overlapping button borders are no longer an issue.
* UserInterface/Views/FindBanner.js:
(WebInspector.FindBanner):
Insert previous / next buttons after the input field in the DOM.
(WebInspector.FindBanner.prototype.get delegate):
(WebInspector.FindBanner.prototype.set delegate):
(WebInspector.FindBanner.prototype.get inputField):
(WebInspector.FindBanner.prototype.get searchQuery):
(WebInspector.FindBanner.prototype.set searchQuery):
(WebInspector.FindBanner.prototype.get numberOfResults):
Inline simple getters and setters.
* UserInterface/Views/Variables.css:
(:root):
Add button colors.
2016-12-15 Matt Baker <mattbaker@apple.com>
Web Inspector: console search bar jumps, behaves poorly at narrow widths
https://bugs.webkit.org/show_bug.cgi?id=164047
<rdar://problem/29055582>
Reviewed by Timothy Hatcher.
At narrow widths the find banner behaves poorly in the split console
toolbar. It should work like the main content browser, appearing below
the toolbar when Command-F is pressed and either the split console or
quick console prompt has the focus.
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):