chrome-devtools-frontend 1.0.934332 → 1.0.935974
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/all_devtools_files.gni +0 -23
- package/config/gni/devtools_grd_files.gni +7 -15
- package/front_end/Tests.js +15 -2
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/i18n/locales/en-US.json +18 -6
- package/front_end/core/i18n/locales/en-XL.json +18 -6
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/ConsoleModel.ts +0 -20
- package/front_end/core/sdk/DOMModel.ts +3 -3
- package/front_end/core/sdk/sdk-meta.ts +3 -0
- package/front_end/entrypoints/devtools_app/devtools_app.json +0 -5
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +1 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -0
- package/front_end/entrypoints/main/MainImpl.ts +1 -11
- package/front_end/entrypoints/main/main-meta.ts +2 -1
- package/front_end/entrypoints/shell/shell.json +0 -10
- package/front_end/entrypoints/worker_app/worker_app.json +0 -3
- package/front_end/models/emulation/EmulatedDevices.ts +306 -84
- package/front_end/models/issues_manager/IssuesManager.ts +2 -2
- package/front_end/models/issues_manager/{DeprecationIssue.ts → NavigatorUserAgentIssue.ts} +4 -4
- package/front_end/models/issues_manager/issues_manager.ts +2 -2
- package/front_end/panels/application/BackForwardCacheView.ts +54 -6
- package/front_end/panels/application/module.json +0 -3
- package/front_end/panels/changes/changes-meta.ts +0 -3
- package/front_end/panels/console/ConsoleFilter.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -19
- package/front_end/panels/console/module.json +0 -2
- package/front_end/panels/console_counters/console_counters-meta.ts +0 -3
- package/front_end/panels/coverage/module.json +0 -1
- package/front_end/panels/css_overview/module.json +1 -2
- package/front_end/panels/developer_resources/developer_resources-meta.ts +0 -2
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +15 -0
- package/front_end/panels/elements/elements-meta.ts +5 -0
- package/front_end/panels/elements/module.json +0 -1
- package/front_end/panels/emulation/DeviceModeWrapper.ts +4 -0
- package/front_end/panels/event_listeners/module.json +1 -2
- package/front_end/panels/help/help-meta.ts +0 -3
- package/front_end/panels/input/input-meta.ts +0 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -5
- package/front_end/panels/media/module.json +0 -1
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +1 -0
- package/front_end/panels/network/module.json +0 -4
- package/front_end/panels/network/network-meta.ts +2 -0
- package/front_end/panels/profiler/module.json +1 -3
- package/front_end/panels/profiler/profiler-meta.ts +1 -0
- package/front_end/panels/profiler/profilesPanel.css +1 -1
- package/front_end/panels/sensors/sensors-meta.ts +1 -0
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +1 -1
- package/front_end/panels/settings/settings-meta.ts +0 -2
- package/front_end/panels/sources/CallStackSidebarPane.ts +21 -0
- package/front_end/panels/sources/NavigatorView.ts +8 -8
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +15 -0
- package/front_end/panels/sources/module.json +0 -5
- package/front_end/panels/sources/sources-meta.ts +12 -0
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +10 -3
- package/front_end/panels/timeline/module.json +0 -1
- package/front_end/panels/timeline/timeline-meta.ts +1 -0
- package/front_end/panels/web_audio/web_audio-meta.ts +0 -3
- package/front_end/panels/webauthn/webauthn-meta.ts +0 -2
- package/front_end/ui/components/buttons/button.css +1 -0
- package/front_end/ui/components/text_editor/config.ts +1 -1
- package/front_end/ui/components/text_editor/theme.ts +13 -0
- package/front_end/ui/legacy/GlassPane.ts +4 -0
- package/front_end/ui/legacy/InspectorView.ts +0 -4
- package/front_end/ui/legacy/TabbedPane.ts +4 -0
- package/front_end/ui/legacy/ViewManager.ts +10 -2
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +2 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +6 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/inline_editor/CSSLength.ts +10 -3
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssLength.css +30 -9
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +2 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +4 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +1 -0
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +3 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +0 -3
- package/front_end/ui/legacy/components/source_frame/module.json +1 -2
- package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +1 -0
- package/front_end/ui/legacy/themeColors.css +4 -0
- package/package.json +1 -1
- package/front_end/panels/changes/module.json +0 -7
- package/front_end/panels/console_counters/module.json +0 -5
- package/front_end/panels/developer_resources/module.json +0 -6
- package/front_end/panels/help/module.json +0 -5
- package/front_end/panels/input/module.json +0 -5
- package/front_end/panels/search/module.json +0 -5
- package/front_end/panels/settings/module.json +0 -5
- package/front_end/panels/snippets/module.json +0 -6
- package/front_end/panels/web_audio/module.json +0 -5
- package/front_end/panels/webauthn/module.json +0 -6
- package/front_end/ui/legacy/components/color_picker/module.json +0 -8
- package/front_end/ui/legacy/components/cookie_table/module.json +0 -9
- package/front_end/ui/legacy/components/data_grid/module.json +0 -8
- package/front_end/ui/legacy/components/object_ui/module.json +0 -11
- package/front_end/ui/legacy/components/quick_open/module.json +0 -8
|
@@ -502,12 +502,14 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
502
502
|
constructor() {
|
|
503
503
|
super();
|
|
504
504
|
|
|
505
|
-
this.#standardSetting = Common.Settings.Settings.instance().createSetting(
|
|
505
|
+
this.#standardSetting = Common.Settings.Settings.instance().createSetting(
|
|
506
|
+
'standardEmulatedDeviceList', [], Common.Settings.SettingStorageType.Synced);
|
|
506
507
|
this.#standardInternal = new Set();
|
|
507
508
|
this.listFromJSONV1(this.#standardSetting.get(), this.#standardInternal);
|
|
508
509
|
this.updateStandardDevices();
|
|
509
510
|
|
|
510
|
-
this.#customSetting = Common.Settings.Settings.instance().createSetting(
|
|
511
|
+
this.#customSetting = Common.Settings.Settings.instance().createSetting(
|
|
512
|
+
'customEmulatedDeviceList', [], Common.Settings.SettingStorageType.Synced);
|
|
511
513
|
this.#customInternal = new Set();
|
|
512
514
|
if (!this.listFromJSONV1(this.#customSetting.get(), this.#customInternal)) {
|
|
513
515
|
this.saveCustomDevices();
|
|
@@ -643,6 +645,288 @@ export interface JSONMode {
|
|
|
643
645
|
}
|
|
644
646
|
|
|
645
647
|
const emulatedDevices = [
|
|
648
|
+
{
|
|
649
|
+
'order': 10,
|
|
650
|
+
'show-by-default': true,
|
|
651
|
+
'title': 'iPhone SE',
|
|
652
|
+
'screen': {
|
|
653
|
+
'horizontal': {
|
|
654
|
+
'width': 667,
|
|
655
|
+
'height': 375,
|
|
656
|
+
},
|
|
657
|
+
'device-pixel-ratio': 2,
|
|
658
|
+
'vertical': {
|
|
659
|
+
'width': 375,
|
|
660
|
+
'height': 667,
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
'capabilities': ['touch', 'mobile'],
|
|
664
|
+
'user-agent':
|
|
665
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
|
666
|
+
'type': 'phone',
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
'order': 12,
|
|
670
|
+
'show-by-default': true,
|
|
671
|
+
'title': 'iPhone XR',
|
|
672
|
+
'screen': {
|
|
673
|
+
'horizontal': {
|
|
674
|
+
'width': 896,
|
|
675
|
+
'height': 414,
|
|
676
|
+
},
|
|
677
|
+
'device-pixel-ratio': 2,
|
|
678
|
+
'vertical': {
|
|
679
|
+
'width': 414,
|
|
680
|
+
'height': 896,
|
|
681
|
+
},
|
|
682
|
+
},
|
|
683
|
+
'capabilities': ['touch', 'mobile'],
|
|
684
|
+
'user-agent':
|
|
685
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
|
686
|
+
'type': 'phone',
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
'order': 14,
|
|
690
|
+
'show-by-default': true,
|
|
691
|
+
'title': 'iPhone 12 Pro',
|
|
692
|
+
'screen': {
|
|
693
|
+
'horizontal': {
|
|
694
|
+
'width': 844,
|
|
695
|
+
'height': 390,
|
|
696
|
+
},
|
|
697
|
+
'device-pixel-ratio': 3,
|
|
698
|
+
'vertical': {
|
|
699
|
+
'width': 390,
|
|
700
|
+
'height': 844,
|
|
701
|
+
},
|
|
702
|
+
},
|
|
703
|
+
'capabilities': ['touch', 'mobile'],
|
|
704
|
+
'user-agent':
|
|
705
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
|
|
706
|
+
'type': 'phone',
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
'order': 16,
|
|
710
|
+
'show-by-default': false,
|
|
711
|
+
'title': 'Pixel 3 XL',
|
|
712
|
+
'screen': {
|
|
713
|
+
'horizontal': {
|
|
714
|
+
'width': 786,
|
|
715
|
+
'height': 393,
|
|
716
|
+
},
|
|
717
|
+
'device-pixel-ratio': 2.75,
|
|
718
|
+
'vertical': {
|
|
719
|
+
'width': 393,
|
|
720
|
+
'height': 786,
|
|
721
|
+
},
|
|
722
|
+
},
|
|
723
|
+
'capabilities': ['touch', 'mobile'],
|
|
724
|
+
'user-agent':
|
|
725
|
+
'Mozilla/5.0 (Linux; Android 11; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36',
|
|
726
|
+
'type': 'phone',
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
'order': 18,
|
|
730
|
+
'show-by-default': true,
|
|
731
|
+
'title': 'Pixel 5',
|
|
732
|
+
'screen': {
|
|
733
|
+
'horizontal': {
|
|
734
|
+
'width': 851,
|
|
735
|
+
'height': 393,
|
|
736
|
+
},
|
|
737
|
+
'device-pixel-ratio': 2.75,
|
|
738
|
+
'vertical': {
|
|
739
|
+
'width': 393,
|
|
740
|
+
'height': 851,
|
|
741
|
+
},
|
|
742
|
+
},
|
|
743
|
+
'capabilities': ['touch', 'mobile'],
|
|
744
|
+
'user-agent':
|
|
745
|
+
'Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36',
|
|
746
|
+
'type': 'phone',
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
'order': 20,
|
|
750
|
+
'show-by-default': true,
|
|
751
|
+
'title': 'Samsung Galaxy S8+',
|
|
752
|
+
'screen': {
|
|
753
|
+
'horizontal': {
|
|
754
|
+
'width': 740,
|
|
755
|
+
'height': 360,
|
|
756
|
+
},
|
|
757
|
+
'device-pixel-ratio': 4,
|
|
758
|
+
'vertical': {
|
|
759
|
+
'width': 360,
|
|
760
|
+
'height': 740,
|
|
761
|
+
},
|
|
762
|
+
},
|
|
763
|
+
'capabilities': ['touch', 'mobile'],
|
|
764
|
+
'user-agent':
|
|
765
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36',
|
|
766
|
+
'type': 'phone',
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
'order': 24,
|
|
770
|
+
'show-by-default': true,
|
|
771
|
+
'title': 'Samsung Galaxy S20 Ultra',
|
|
772
|
+
'screen': {
|
|
773
|
+
'horizontal': {
|
|
774
|
+
'width': 915,
|
|
775
|
+
'height': 412,
|
|
776
|
+
},
|
|
777
|
+
'device-pixel-ratio': 3.5,
|
|
778
|
+
'vertical': {
|
|
779
|
+
'width': 412,
|
|
780
|
+
'height': 915,
|
|
781
|
+
},
|
|
782
|
+
},
|
|
783
|
+
'capabilities': ['touch', 'mobile'],
|
|
784
|
+
'user-agent':
|
|
785
|
+
'Mozilla/5.0 (Linux; Android 10; SM-G981B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Mobile Safari/537.36',
|
|
786
|
+
'type': 'phone',
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
'order': 26,
|
|
790
|
+
'show-by-default': true,
|
|
791
|
+
'title': 'iPad Air',
|
|
792
|
+
'screen': {
|
|
793
|
+
'horizontal': {
|
|
794
|
+
'width': 1180,
|
|
795
|
+
'height': 820,
|
|
796
|
+
},
|
|
797
|
+
'device-pixel-ratio': 2,
|
|
798
|
+
'vertical': {
|
|
799
|
+
'width': 820,
|
|
800
|
+
'height': 1180,
|
|
801
|
+
},
|
|
802
|
+
},
|
|
803
|
+
'capabilities': ['touch', 'mobile'],
|
|
804
|
+
'user-agent':
|
|
805
|
+
'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1',
|
|
806
|
+
'type': 'tablet',
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
'order': 28,
|
|
810
|
+
'show-by-default': true,
|
|
811
|
+
'title': 'iPad Mini',
|
|
812
|
+
'screen': {
|
|
813
|
+
'horizontal': {
|
|
814
|
+
'width': 1024,
|
|
815
|
+
'height': 768,
|
|
816
|
+
},
|
|
817
|
+
'device-pixel-ratio': 2,
|
|
818
|
+
'vertical': {
|
|
819
|
+
'width': 768,
|
|
820
|
+
'height': 1024,
|
|
821
|
+
},
|
|
822
|
+
},
|
|
823
|
+
'capabilities': ['touch', 'mobile'],
|
|
824
|
+
'user-agent':
|
|
825
|
+
'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1',
|
|
826
|
+
'type': 'tablet',
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
'order': 30,
|
|
830
|
+
'show-by-default': true,
|
|
831
|
+
'title': 'Surface Pro 7',
|
|
832
|
+
'screen': {
|
|
833
|
+
'horizontal': {
|
|
834
|
+
'width': 1368,
|
|
835
|
+
'height': 912,
|
|
836
|
+
},
|
|
837
|
+
'device-pixel-ratio': 2,
|
|
838
|
+
'vertical': {
|
|
839
|
+
'width': 912,
|
|
840
|
+
'height': 1368,
|
|
841
|
+
},
|
|
842
|
+
},
|
|
843
|
+
'capabilities': ['touch', 'mobile'],
|
|
844
|
+
'user-agent':
|
|
845
|
+
'Mozilla/5.0 (iPad; CPU OS 13_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1',
|
|
846
|
+
'type': 'tablet',
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
'order': 32,
|
|
850
|
+
'show-by-default': true,
|
|
851
|
+
'dual-screen': true,
|
|
852
|
+
'title': 'Surface Duo',
|
|
853
|
+
'screen': {
|
|
854
|
+
'horizontal': {'width': 720, 'height': 540},
|
|
855
|
+
'device-pixel-ratio': 2.5,
|
|
856
|
+
'vertical': {'width': 540, 'height': 720},
|
|
857
|
+
'vertical-spanned': {
|
|
858
|
+
'width': 1114,
|
|
859
|
+
'height': 720,
|
|
860
|
+
'hinge': {'width': 34, 'height': 720, 'x': 540, 'y': 0, 'contentColor': {'r': 38, 'g': 38, 'b': 38, 'a': 1}},
|
|
861
|
+
},
|
|
862
|
+
'horizontal-spanned': {
|
|
863
|
+
'width': 720,
|
|
864
|
+
'height': 1114,
|
|
865
|
+
'hinge': {'width': 720, 'height': 34, 'x': 0, 'y': 540, 'contentColor': {'r': 38, 'g': 38, 'b': 38, 'a': 1}},
|
|
866
|
+
},
|
|
867
|
+
},
|
|
868
|
+
'capabilities': ['touch', 'mobile'],
|
|
869
|
+
'user-agent':
|
|
870
|
+
'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
|
|
871
|
+
'type': 'phone',
|
|
872
|
+
'modes': [
|
|
873
|
+
{'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
874
|
+
{'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
875
|
+
{'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
876
|
+
{
|
|
877
|
+
'title': 'spanned',
|
|
878
|
+
'orientation': 'horizontal-spanned',
|
|
879
|
+
'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
|
|
880
|
+
},
|
|
881
|
+
],
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
'order': 34,
|
|
885
|
+
'show-by-default': true,
|
|
886
|
+
'dual-screen': true,
|
|
887
|
+
'title': 'Galaxy Fold',
|
|
888
|
+
'screen': {
|
|
889
|
+
'horizontal': {'width': 653, 'height': 280},
|
|
890
|
+
'device-pixel-ratio': 3,
|
|
891
|
+
'vertical': {'width': 280, 'height': 653},
|
|
892
|
+
'vertical-spanned': {'width': 717, 'height': 512},
|
|
893
|
+
'horizontal-spanned': {'width': 512, 'height': 717},
|
|
894
|
+
},
|
|
895
|
+
'capabilities': ['touch', 'mobile'],
|
|
896
|
+
'user-agent':
|
|
897
|
+
'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
|
|
898
|
+
'type': 'phone',
|
|
899
|
+
'modes': [
|
|
900
|
+
{'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
901
|
+
{'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
902
|
+
{'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
903
|
+
{
|
|
904
|
+
'title': 'spanned',
|
|
905
|
+
'orientation': 'horizontal-spanned',
|
|
906
|
+
'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
|
|
907
|
+
},
|
|
908
|
+
],
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
'order': 36,
|
|
912
|
+
'show-by-default': true,
|
|
913
|
+
'title': 'Samsung Galaxy A51/71',
|
|
914
|
+
'screen': {
|
|
915
|
+
'horizontal': {
|
|
916
|
+
'width': 914,
|
|
917
|
+
'height': 412,
|
|
918
|
+
},
|
|
919
|
+
'device-pixel-ratio': 2.625,
|
|
920
|
+
'vertical': {
|
|
921
|
+
'width': 412,
|
|
922
|
+
'height': 914,
|
|
923
|
+
},
|
|
924
|
+
},
|
|
925
|
+
'capabilities': ['touch', 'mobile'],
|
|
926
|
+
'user-agent':
|
|
927
|
+
'Mozilla/5.0 (Linux; Android 8.0.0; SM-G955U Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36',
|
|
928
|
+
'type': 'phone',
|
|
929
|
+
},
|
|
646
930
|
{
|
|
647
931
|
'order': 52,
|
|
648
932
|
'show-by-default': true,
|
|
@@ -668,7 +952,6 @@ const emulatedDevices = [
|
|
|
668
952
|
'type': 'tablet',
|
|
669
953
|
'modes': [{'title': 'default', 'orientation': 'horizontal'}],
|
|
670
954
|
},
|
|
671
|
-
|
|
672
955
|
{
|
|
673
956
|
'order': 50,
|
|
674
957
|
'show-by-default': true,
|
|
@@ -694,6 +977,7 @@ const emulatedDevices = [
|
|
|
694
977
|
'type': 'tablet',
|
|
695
978
|
'modes': [{'title': 'default', 'orientation': 'horizontal'}],
|
|
696
979
|
},
|
|
980
|
+
|
|
697
981
|
{
|
|
698
982
|
'show-by-default': false,
|
|
699
983
|
'title': 'iPhone 4',
|
|
@@ -708,8 +992,8 @@ const emulatedDevices = [
|
|
|
708
992
|
'type': 'phone',
|
|
709
993
|
},
|
|
710
994
|
{
|
|
711
|
-
'order':
|
|
712
|
-
'show-by-default':
|
|
995
|
+
'order': 130,
|
|
996
|
+
'show-by-default': false,
|
|
713
997
|
'title': 'iPhone 5/SE',
|
|
714
998
|
'screen': {
|
|
715
999
|
'horizontal': {
|
|
@@ -736,8 +1020,8 @@ const emulatedDevices = [
|
|
|
736
1020
|
'type': 'phone',
|
|
737
1021
|
},
|
|
738
1022
|
{
|
|
739
|
-
'order':
|
|
740
|
-
'show-by-default':
|
|
1023
|
+
'order': 131,
|
|
1024
|
+
'show-by-default': false,
|
|
741
1025
|
'title': 'iPhone 6/7/8',
|
|
742
1026
|
'screen': {
|
|
743
1027
|
'horizontal': {
|
|
@@ -764,8 +1048,8 @@ const emulatedDevices = [
|
|
|
764
1048
|
'type': 'phone',
|
|
765
1049
|
},
|
|
766
1050
|
{
|
|
767
|
-
'order':
|
|
768
|
-
'show-by-default':
|
|
1051
|
+
'order': 132,
|
|
1052
|
+
'show-by-default': false,
|
|
769
1053
|
'title': 'iPhone 6/7/8 Plus',
|
|
770
1054
|
'screen': {
|
|
771
1055
|
'horizontal': {
|
|
@@ -792,8 +1076,8 @@ const emulatedDevices = [
|
|
|
792
1076
|
'type': 'phone',
|
|
793
1077
|
},
|
|
794
1078
|
{
|
|
795
|
-
'order':
|
|
796
|
-
'show-by-default':
|
|
1079
|
+
'order': 133,
|
|
1080
|
+
'show-by-default': false,
|
|
797
1081
|
'title': 'iPhone X',
|
|
798
1082
|
'screen': {
|
|
799
1083
|
'horizontal': {'width': 812, 'height': 375},
|
|
@@ -1010,8 +1294,8 @@ const emulatedDevices = [
|
|
|
1010
1294
|
'type': 'phone',
|
|
1011
1295
|
},
|
|
1012
1296
|
{
|
|
1013
|
-
'order':
|
|
1014
|
-
'show-by-default':
|
|
1297
|
+
'order': 120,
|
|
1298
|
+
'show-by-default': false,
|
|
1015
1299
|
'title': 'Pixel 2',
|
|
1016
1300
|
'screen': {
|
|
1017
1301
|
'horizontal': {'width': 731, 'height': 411},
|
|
@@ -1026,8 +1310,8 @@ const emulatedDevices = [
|
|
|
1026
1310
|
'type': 'phone',
|
|
1027
1311
|
},
|
|
1028
1312
|
{
|
|
1029
|
-
'order':
|
|
1030
|
-
'show-by-default':
|
|
1313
|
+
'order': 121,
|
|
1314
|
+
'show-by-default': false,
|
|
1031
1315
|
'title': 'Pixel 2 XL',
|
|
1032
1316
|
'screen': {
|
|
1033
1317
|
'horizontal': {'width': 823, 'height': 411},
|
|
@@ -1154,8 +1438,8 @@ const emulatedDevices = [
|
|
|
1154
1438
|
'type': 'phone',
|
|
1155
1439
|
},
|
|
1156
1440
|
{
|
|
1157
|
-
'order':
|
|
1158
|
-
'show-by-default':
|
|
1441
|
+
'order': 110,
|
|
1442
|
+
'show-by-default': false,
|
|
1159
1443
|
'title': 'Galaxy S5',
|
|
1160
1444
|
'screen': {
|
|
1161
1445
|
'horizontal': {'width': 640, 'height': 360},
|
|
@@ -1255,8 +1539,8 @@ const emulatedDevices = [
|
|
|
1255
1539
|
'type': 'tablet',
|
|
1256
1540
|
},
|
|
1257
1541
|
{
|
|
1258
|
-
'order':
|
|
1259
|
-
'show-by-default':
|
|
1542
|
+
'order': 140,
|
|
1543
|
+
'show-by-default': false,
|
|
1260
1544
|
'title': 'iPad',
|
|
1261
1545
|
'screen': {
|
|
1262
1546
|
'horizontal': {
|
|
@@ -1283,8 +1567,8 @@ const emulatedDevices = [
|
|
|
1283
1567
|
'type': 'tablet',
|
|
1284
1568
|
},
|
|
1285
1569
|
{
|
|
1286
|
-
'order':
|
|
1287
|
-
'show-by-default':
|
|
1570
|
+
'order': 141,
|
|
1571
|
+
'show-by-default': false,
|
|
1288
1572
|
'title': 'iPad Pro',
|
|
1289
1573
|
'screen': {
|
|
1290
1574
|
'horizontal': {'width': 1366, 'height': 1024},
|
|
@@ -1409,7 +1693,7 @@ const emulatedDevices = [
|
|
|
1409
1693
|
'modes': [{'title': 'default', 'orientation': 'horizontal'}],
|
|
1410
1694
|
},
|
|
1411
1695
|
{
|
|
1412
|
-
'show-by-default':
|
|
1696
|
+
'show-by-default': false,
|
|
1413
1697
|
'title': 'Moto G4',
|
|
1414
1698
|
'screen': {
|
|
1415
1699
|
'horizontal': {
|
|
@@ -1437,66 +1721,4 @@ const emulatedDevices = [
|
|
|
1437
1721
|
{'platform': 'Android', 'platformVersion': '6.0.1', 'architecture': '', 'model': 'Moto G (4)', 'mobile': true},
|
|
1438
1722
|
'type': 'phone',
|
|
1439
1723
|
},
|
|
1440
|
-
{
|
|
1441
|
-
'order': 45,
|
|
1442
|
-
'show-by-default': true,
|
|
1443
|
-
'dual-screen': true,
|
|
1444
|
-
'title': 'Surface Duo',
|
|
1445
|
-
'screen': {
|
|
1446
|
-
'horizontal': {'width': 720, 'height': 540},
|
|
1447
|
-
'device-pixel-ratio': 2.5,
|
|
1448
|
-
'vertical': {'width': 540, 'height': 720},
|
|
1449
|
-
'vertical-spanned': {
|
|
1450
|
-
'width': 1114,
|
|
1451
|
-
'height': 720,
|
|
1452
|
-
'hinge': {'width': 34, 'height': 720, 'x': 540, 'y': 0, 'contentColor': {'r': 38, 'g': 38, 'b': 38, 'a': 1}},
|
|
1453
|
-
},
|
|
1454
|
-
'horizontal-spanned': {
|
|
1455
|
-
'width': 720,
|
|
1456
|
-
'height': 1114,
|
|
1457
|
-
'hinge': {'width': 720, 'height': 34, 'x': 0, 'y': 540, 'contentColor': {'r': 38, 'g': 38, 'b': 38, 'a': 1}},
|
|
1458
|
-
},
|
|
1459
|
-
},
|
|
1460
|
-
'capabilities': ['touch', 'mobile'],
|
|
1461
|
-
'user-agent':
|
|
1462
|
-
'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
|
|
1463
|
-
'type': 'phone',
|
|
1464
|
-
'modes': [
|
|
1465
|
-
{'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
1466
|
-
{'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
1467
|
-
{'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
1468
|
-
{
|
|
1469
|
-
'title': 'spanned',
|
|
1470
|
-
'orientation': 'horizontal-spanned',
|
|
1471
|
-
'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
|
|
1472
|
-
},
|
|
1473
|
-
],
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
'order': 46,
|
|
1477
|
-
'show-by-default': true,
|
|
1478
|
-
'dual-screen': true,
|
|
1479
|
-
'title': 'Galaxy Fold',
|
|
1480
|
-
'screen': {
|
|
1481
|
-
'horizontal': {'width': 653, 'height': 280},
|
|
1482
|
-
'device-pixel-ratio': 3,
|
|
1483
|
-
'vertical': {'width': 280, 'height': 653},
|
|
1484
|
-
'vertical-spanned': {'width': 717, 'height': 512},
|
|
1485
|
-
'horizontal-spanned': {'width': 512, 'height': 717},
|
|
1486
|
-
},
|
|
1487
|
-
'capabilities': ['touch', 'mobile'],
|
|
1488
|
-
'user-agent':
|
|
1489
|
-
'Mozilla/5.0 (Linux; Android 8.0; Pixel 2 Build/OPD3.170816.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/%s Mobile Safari/537.36',
|
|
1490
|
-
'type': 'phone',
|
|
1491
|
-
'modes': [
|
|
1492
|
-
{'title': 'default', 'orientation': 'vertical', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
1493
|
-
{'title': 'default', 'orientation': 'horizontal', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
1494
|
-
{'title': 'spanned', 'orientation': 'vertical-spanned', 'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0}},
|
|
1495
|
-
{
|
|
1496
|
-
'title': 'spanned',
|
|
1497
|
-
'orientation': 'horizontal-spanned',
|
|
1498
|
-
'insets': {'left': 0, 'top': 0, 'right': 0, 'bottom': 0},
|
|
1499
|
-
},
|
|
1500
|
-
],
|
|
1501
|
-
},
|
|
1502
1724
|
];
|
|
@@ -11,13 +11,13 @@ import {AttributionReportingIssue} from './AttributionReportingIssue.js';
|
|
|
11
11
|
import {ContentSecurityPolicyIssue} from './ContentSecurityPolicyIssue.js';
|
|
12
12
|
import {CorsIssue} from './CorsIssue.js';
|
|
13
13
|
import {CrossOriginEmbedderPolicyIssue, isCrossOriginEmbedderPolicyIssue} from './CrossOriginEmbedderPolicyIssue.js';
|
|
14
|
-
import {DeprecationIssue} from './DeprecationIssue.js';
|
|
15
14
|
import {GenericIssue} from './GenericIssue.js';
|
|
16
15
|
import {HeavyAdIssue} from './HeavyAdIssue.js';
|
|
17
16
|
import type {Issue, IssueKind} from './Issue.js';
|
|
18
17
|
import {Events} from './IssuesManagerEvents.js';
|
|
19
18
|
import {LowTextContrastIssue} from './LowTextContrastIssue.js';
|
|
20
19
|
import {MixedContentIssue} from './MixedContentIssue.js';
|
|
20
|
+
import {NavigatorUserAgentIssue} from './NavigatorUserAgentIssue.js';
|
|
21
21
|
import {QuirksModeIssue} from './QuirksModeIssue.js';
|
|
22
22
|
import {SameSiteCookieIssue} from './SameSiteCookieIssue.js';
|
|
23
23
|
import {SharedArrayBufferIssue} from './SharedArrayBufferIssue.js';
|
|
@@ -85,7 +85,7 @@ const issueCodeHandlers = new Map<
|
|
|
85
85
|
],
|
|
86
86
|
[
|
|
87
87
|
Protocol.Audits.InspectorIssueCode.NavigatorUserAgentIssue,
|
|
88
|
-
|
|
88
|
+
NavigatorUserAgentIssue.fromInspectorIssue,
|
|
89
89
|
],
|
|
90
90
|
[
|
|
91
91
|
Protocol.Audits.InspectorIssueCode.AttributionReportingIssue,
|
|
@@ -17,7 +17,7 @@ const UIStrings = {
|
|
|
17
17
|
*/
|
|
18
18
|
userAgentReduction: 'User-Agent String Reduction',
|
|
19
19
|
};
|
|
20
|
-
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/
|
|
20
|
+
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/NavigatorUserAgentIssue.ts', UIStrings);
|
|
21
21
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
22
22
|
|
|
23
23
|
// TODO(crbug.com/1167717): Make this a const enum again
|
|
@@ -26,7 +26,7 @@ export enum IssueCode {
|
|
|
26
26
|
NavigatorUserAgentIssue = 'DeprecationIssue::NavigatorUserAgentIssue',
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export class
|
|
29
|
+
export class NavigatorUserAgentIssue extends Issue<IssueCode> {
|
|
30
30
|
private issueDetails: Protocol.Audits.NavigatorUserAgentIssueDetails;
|
|
31
31
|
|
|
32
32
|
constructor(issueDetails: Protocol.Audits.NavigatorUserAgentIssueDetails, issuesModel: SDK.IssuesModel.IssuesModel) {
|
|
@@ -73,12 +73,12 @@ export class DeprecationIssue extends Issue<IssueCode> {
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
static fromInspectorIssue(issuesModel: SDK.IssuesModel.IssuesModel, inspectorIssue: Protocol.Audits.InspectorIssue):
|
|
76
|
-
|
|
76
|
+
NavigatorUserAgentIssue[] {
|
|
77
77
|
const details = inspectorIssue.details.navigatorUserAgentIssueDetails;
|
|
78
78
|
if (!details) {
|
|
79
79
|
console.warn('NavigatorUserAgent issue without details received.');
|
|
80
80
|
return [];
|
|
81
81
|
}
|
|
82
|
-
return [new
|
|
82
|
+
return [new NavigatorUserAgentIssue(details, issuesModel)];
|
|
83
83
|
}
|
|
84
84
|
}
|
|
@@ -7,7 +7,6 @@ import * as ContentSecurityPolicyIssue from './ContentSecurityPolicyIssue.js';
|
|
|
7
7
|
import * as ContrastCheckTrigger from './ContrastCheckTrigger.js';
|
|
8
8
|
import * as CorsIssue from './CorsIssue.js';
|
|
9
9
|
import * as CrossOriginEmbedderPolicyIssue from './CrossOriginEmbedderPolicyIssue.js';
|
|
10
|
-
import * as DeprecationIssue from './DeprecationIssue.js';
|
|
11
10
|
import * as GenericIssue from './GenericIssue.js';
|
|
12
11
|
import * as HeavyAdIssue from './HeavyAdIssue.js';
|
|
13
12
|
import * as Issue from './Issue.js';
|
|
@@ -16,6 +15,7 @@ import * as IssuesManager from './IssuesManager.js';
|
|
|
16
15
|
import * as LowTextContrastIssue from './LowTextContrastIssue.js';
|
|
17
16
|
import * as MarkdownIssueDescription from './MarkdownIssueDescription.js';
|
|
18
17
|
import * as MixedContentIssue from './MixedContentIssue.js';
|
|
18
|
+
import * as NavigatorUserAgentIssue from './NavigatorUserAgentIssue.js';
|
|
19
19
|
import * as QuirksModeIssue from './QuirksModeIssue.js';
|
|
20
20
|
import * as RelatedIssue from './RelatedIssue.js';
|
|
21
21
|
import * as SameSiteCookieIssue from './SameSiteCookieIssue.js';
|
|
@@ -30,7 +30,6 @@ export {
|
|
|
30
30
|
ContrastCheckTrigger,
|
|
31
31
|
CorsIssue,
|
|
32
32
|
CrossOriginEmbedderPolicyIssue,
|
|
33
|
-
DeprecationIssue,
|
|
34
33
|
GenericIssue,
|
|
35
34
|
HeavyAdIssue,
|
|
36
35
|
Issue,
|
|
@@ -39,6 +38,7 @@ export {
|
|
|
39
38
|
LowTextContrastIssue,
|
|
40
39
|
MarkdownIssueDescription,
|
|
41
40
|
MixedContentIssue,
|
|
41
|
+
NavigatorUserAgentIssue,
|
|
42
42
|
QuirksModeIssue,
|
|
43
43
|
RelatedIssue,
|
|
44
44
|
SameSiteCookieIssue,
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type * as Platform from '../../core/platform/platform.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
|
+
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
9
|
import * as LitHtml from '../../ui/lit-html/lit-html.js';
|
|
9
10
|
import * as ReportView from '../../ui/components/report_view/report_view.js';
|
|
@@ -19,10 +20,6 @@ const UIStrings = {
|
|
|
19
20
|
* @description Title text in Back-forward Cache view of the Application panel
|
|
20
21
|
*/
|
|
21
22
|
mainFrame: 'Main Frame',
|
|
22
|
-
/**
|
|
23
|
-
* @description Section header text in Back-forward Cache view of the Application panel
|
|
24
|
-
*/
|
|
25
|
-
lastMainFrameNavigation: 'Last Main Frame Navigation',
|
|
26
23
|
/**
|
|
27
24
|
* @description Title text in Back-forward Cache view of the Application panel
|
|
28
25
|
*/
|
|
@@ -83,6 +80,10 @@ const UIStrings = {
|
|
|
83
80
|
* of chrome they will not prevent back-forward cache usage anymore.
|
|
84
81
|
*/
|
|
85
82
|
supportPending: 'Pending Support',
|
|
83
|
+
/**
|
|
84
|
+
* @description Button name for showing whether BFCache is available in the pages.
|
|
85
|
+
*/
|
|
86
|
+
runTest: 'Run Test',
|
|
86
87
|
/**
|
|
87
88
|
* @description Explanation for 'pending support' items which prevent the page from being eligible
|
|
88
89
|
* for back-forward cache.
|
|
@@ -131,6 +132,48 @@ export class BackForwardCacheView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
131
132
|
return this.getMainResourceTreeModel()?.mainFrame || null;
|
|
132
133
|
}
|
|
133
134
|
|
|
135
|
+
private async goBackOneHistoryEntry(): Promise<void> {
|
|
136
|
+
SDK.TargetManager.TargetManager.instance().removeModelListener(
|
|
137
|
+
SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.FrameNavigated,
|
|
138
|
+
this.goBackOneHistoryEntry, this);
|
|
139
|
+
const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
|
|
140
|
+
if (!mainTarget) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const resourceTreeModel = mainTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);
|
|
144
|
+
if (!resourceTreeModel) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const historyResults = await resourceTreeModel.navigationHistory();
|
|
148
|
+
if (!historyResults) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
resourceTreeModel.navigateToHistoryEntry(historyResults.entries[historyResults.currentIndex - 1]);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
private async navigateAwayAndBack(): Promise<void> {
|
|
155
|
+
// Checking BFCache Compatibility
|
|
156
|
+
|
|
157
|
+
const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
|
|
158
|
+
if (!mainTarget) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
const resourceTreeModel = mainTarget.model(SDK.ResourceTreeModel.ResourceTreeModel);
|
|
162
|
+
|
|
163
|
+
if (resourceTreeModel) {
|
|
164
|
+
// This event is removed by inside of goBackOneHistoryEntry().
|
|
165
|
+
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
166
|
+
SDK.ResourceTreeModel.ResourceTreeModel, SDK.ResourceTreeModel.Events.FrameNavigated,
|
|
167
|
+
this.goBackOneHistoryEntry, this);
|
|
168
|
+
|
|
169
|
+
// We can know whether the current page can use BFCache
|
|
170
|
+
// as the browser navigates to another unrelated page and goes back to the current page.
|
|
171
|
+
// We chose "chrome://version" because it must be cross-site.
|
|
172
|
+
// Ideally, We want to have our own testing page like "chrome: //bfcache-test".
|
|
173
|
+
resourceTreeModel.navigate('chrome://version/');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
134
177
|
private renderMainFrameInformation(mainFrame: SDK.ResourceTreeModel.ResourceTreeFrame|null): LitHtml.TemplateResult {
|
|
135
178
|
if (!mainFrame) {
|
|
136
179
|
return LitHtml.html`<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.mainFrame)}</${
|
|
@@ -140,8 +183,13 @@ export class BackForwardCacheView extends UI.ThrottledWidget.ThrottledWidget {
|
|
|
140
183
|
</${ReportView.ReportView.ReportValue.litTagName}>`;
|
|
141
184
|
}
|
|
142
185
|
return LitHtml.html`
|
|
143
|
-
<${ReportView.ReportView.ReportSectionHeader.litTagName}
|
|
144
|
-
|
|
186
|
+
<${ReportView.ReportView.ReportSectionHeader.litTagName}>
|
|
187
|
+
<${Buttons.Button.Button.litTagName}
|
|
188
|
+
.variant=${Buttons.Button.Variant.PRIMARY}
|
|
189
|
+
@click=${this.navigateAwayAndBack}>
|
|
190
|
+
${i18nString(UIStrings.runTest)}
|
|
191
|
+
</${Buttons.Button.Button.litTagName}>
|
|
192
|
+
</${ReportView.ReportView.ReportSectionHeader.litTagName}>
|
|
145
193
|
<${ReportView.ReportView.ReportKey.litTagName}>${i18nString(UIStrings.url)}</${
|
|
146
194
|
ReportView.ReportView.ReportKey.litTagName}>
|
|
147
195
|
<${ReportView.ReportView.ReportValue.litTagName}>${mainFrame.url}</${
|