chrome-devtools-frontend 1.0.1682249 → 1.0.1684555
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/AUTHORS +1 -0
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +0 -7
- package/front_end/core/sdk/StorageBucketsModel.ts +0 -6
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +2 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +6 -4
- package/front_end/entrypoints/main/main-meta.ts +9 -51
- package/front_end/foundation/Universe.ts +7 -0
- package/front_end/generated/InspectorBackendCommands.ts +12 -22
- package/front_end/generated/protocol-mapping.d.ts +9 -59
- package/front_end/generated/protocol-proxy-api.d.ts +7 -47
- package/front_end/generated/protocol.ts +105 -330
- package/front_end/models/ai_assistance/AiAgent2.ts +12 -4
- package/front_end/models/ai_assistance/AiConversation.ts +25 -7
- package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -19
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +6 -6
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +12 -6
- package/front_end/models/ai_assistance/tools/GetStorageValues.ts +1 -1
- package/front_end/models/ai_assistance/tools/ListStorageKeys.ts +1 -1
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +5 -8
- package/front_end/models/ai_assistance/tools/Tool.ts +19 -6
- package/front_end/models/issues_manager/DOMIssuesManager.ts +144 -0
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +13 -1
- package/front_end/models/issues_manager/GenericIssue.ts +14 -2
- package/front_end/models/issues_manager/IssuesManager.ts +0 -1
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +8 -0
- package/front_end/models/trace/Processor.ts +1 -0
- package/front_end/panels/ai_assistance/ExternalHandler.ts +89 -0
- package/front_end/panels/ai_assistance/ai_assistance.ts +1 -0
- package/front_end/panels/application/BackgroundServiceModel.ts +4 -3
- package/front_end/panels/application/IndexedDBModel.ts +0 -7
- package/front_end/panels/console/ConsoleView.ts +17 -16
- package/front_end/panels/console/ConsoleViewMessage.ts +4 -1
- package/front_end/panels/console/console-meta.ts +4 -19
- package/front_end/panels/elements/ElementIssueUtils.ts +10 -2
- package/front_end/panels/elements/ElementsPanel.ts +8 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +82 -161
- package/front_end/panels/elements/ElementsTreeOutline.ts +26 -105
- package/front_end/panels/elements/StandaloneStylesContainer.ts +5 -11
- package/front_end/panels/elements/StylePropertyTreeElement.ts +2 -0
- package/front_end/panels/elements/StylesContainer.ts +1 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +174 -151
- package/front_end/panels/network/RequestPayloadView.ts +5 -2
- package/front_end/panels/security/SecurityPanelSidebar.ts +0 -32
- package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -2
- package/front_end/panels/sources/SourcesPanel.ts +6 -3
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +2 -6
- package/front_end/panels/timeline/components/CWVMetrics.ts +9 -10
- package/front_end/panels/timeline/components/DetailsView.ts +12 -16
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +13 -13
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +19 -19
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +7 -9
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +3 -3
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +13 -13
- package/front_end/panels/timeline/components/LiveMetricsView.ts +64 -64
- package/front_end/panels/timeline/components/MetricCard.ts +25 -25
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +22 -22
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +9 -9
- package/front_end/panels/timeline/components/OriginMap.ts +7 -7
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +2 -2
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +19 -20
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -1
- package/front_end/panels/timeline/components/TimelineSummary.ts +2 -2
- package/front_end/panels/timeline/components/Utils.ts +2 -6
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +6 -9
- package/front_end/panels/timeline/components/insights/Checklist.ts +2 -2
- package/front_end/panels/timeline/components/insights/Table.ts +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +94 -0
- package/front_end/ui/comments/CommentOverlayManager.ts +16 -32
- package/front_end/ui/components/text_editor/config.ts +2 -1
- package/front_end/ui/legacy/DockController.ts +4 -1
- package/front_end/ui/legacy/InspectorView.ts +3 -1
- package/front_end/ui/legacy/KeyboardShortcut.ts +4 -7
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +6 -3
- package/front_end/ui/legacy/UIUtils.ts +10 -6
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +23 -24
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +6 -6
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +14 -15
- package/front_end/ui/legacy/components/perf_ui/GCActionDelegate.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/NetworkPriorities.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +5 -5
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +4 -6
- package/front_end/ui/legacy/components/source_frame/FontView.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +13 -13
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +2 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +15 -18
- package/front_end/ui/legacy/components/source_frame/XMLView.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/source_frame-meta.ts +10 -10
- package/front_end/ui/legacy/theme_support/ThemeSupport.ts +5 -2
- package/front_end/ui/settings/ConsoleSettings.ts +32 -0
- package/front_end/ui/settings/InspectorMainSettings.ts +7 -0
- package/front_end/ui/settings/MainSettings.ts +80 -0
- package/front_end/ui/settings/settings.ts +4 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +8 -0
- package/package.json +1 -1
|
@@ -23,39 +23,39 @@ const MAX_URL_LENGTH = 60;
|
|
|
23
23
|
|
|
24
24
|
const UIStrings = {
|
|
25
25
|
/**
|
|
26
|
-
* @description
|
|
26
|
+
* @description Label for network request priority in the network request tooltip of the Performance panel.
|
|
27
27
|
*/
|
|
28
28
|
priority: 'Priority',
|
|
29
29
|
/**
|
|
30
|
-
* @description
|
|
30
|
+
* @description Label for total duration in the network request tooltip of the Performance panel.
|
|
31
31
|
*/
|
|
32
32
|
duration: 'Duration',
|
|
33
33
|
/**
|
|
34
|
-
* @description
|
|
34
|
+
* @description Label for the queuing and connecting phase duration in the network request tooltip of the Performance panel.
|
|
35
35
|
*/
|
|
36
36
|
queuingAndConnecting: 'Queuing and connecting',
|
|
37
37
|
/**
|
|
38
|
-
* @description
|
|
38
|
+
* @description Label for the request sent and waiting phase duration in the network request tooltip of the Performance panel.
|
|
39
39
|
*/
|
|
40
40
|
requestSentAndWaiting: 'Request sent and waiting',
|
|
41
41
|
/**
|
|
42
|
-
* @description
|
|
42
|
+
* @description Label for the content downloading phase duration in the network request tooltip of the Performance panel.
|
|
43
43
|
*/
|
|
44
44
|
contentDownloading: 'Content downloading',
|
|
45
45
|
/**
|
|
46
|
-
* @description
|
|
46
|
+
* @description Label for the main thread waiting phase duration in the network request tooltip of the Performance panel.
|
|
47
47
|
*/
|
|
48
48
|
waitingOnMainThread: 'Waiting on main thread',
|
|
49
49
|
/**
|
|
50
|
-
* @description
|
|
50
|
+
* @description Label indicating that the network request is render-blocking in the network request tooltip of the Performance panel.
|
|
51
51
|
*/
|
|
52
52
|
renderBlocking: 'Render-blocking',
|
|
53
53
|
/**
|
|
54
|
-
* @description
|
|
54
|
+
* @description Header label for redirect details in the network request tooltip of the Performance panel.
|
|
55
55
|
*/
|
|
56
56
|
redirects: 'Redirects',
|
|
57
57
|
/**
|
|
58
|
-
* @description
|
|
58
|
+
* @description Tooltip text indicating that the network request was throttled in the Performance panel.
|
|
59
59
|
* @example {Fast 4G} PH1
|
|
60
60
|
*/
|
|
61
61
|
wasThrottled: 'Request was throttled ({PH1})',
|
|
@@ -17,27 +17,27 @@ const {html} = Lit;
|
|
|
17
17
|
|
|
18
18
|
const UIStrings = {
|
|
19
19
|
/**
|
|
20
|
-
* @description
|
|
20
|
+
* @description Column header for development origin in the origin mapping table of the Performance panel.
|
|
21
21
|
*/
|
|
22
22
|
developmentOrigin: 'Development origin',
|
|
23
23
|
/**
|
|
24
|
-
* @description
|
|
24
|
+
* @description Column header for production origin in the origin mapping table of the Performance panel.
|
|
25
25
|
*/
|
|
26
26
|
productionOrigin: 'Production origin',
|
|
27
27
|
/**
|
|
28
|
-
* @description Warning message explaining that an
|
|
28
|
+
* @description Warning message explaining that an entered origin is not a valid origin or URL in the Performance panel.
|
|
29
29
|
* @example {http//malformed.com} PH1
|
|
30
30
|
*/
|
|
31
|
-
invalidOrigin: '"{PH1}"
|
|
31
|
+
invalidOrigin: '"{PH1}" isn’t a valid origin or URL.',
|
|
32
32
|
/**
|
|
33
|
-
* @description Warning message explaining that
|
|
33
|
+
* @description Warning message explaining that a development origin is already mapped to a production origin in the Performance panel.
|
|
34
34
|
* @example {https://example.com} PH1
|
|
35
35
|
*/
|
|
36
36
|
alreadyMapped: '"{PH1}" is already mapped to a production origin.',
|
|
37
37
|
/**
|
|
38
|
-
* @description Warning message explaining that a page
|
|
38
|
+
* @description Warning message explaining that a page does not have enough real user data in the Performance panel.
|
|
39
39
|
*/
|
|
40
|
-
pageHasNoData: 'The Chrome UX Report
|
|
40
|
+
pageHasNoData: 'The Chrome UX Report doesn’t have enough real user data for this page.',
|
|
41
41
|
} as const;
|
|
42
42
|
|
|
43
43
|
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/OriginMap.ts', UIStrings);
|
|
@@ -13,11 +13,11 @@ const {html, render} = Lit;
|
|
|
13
13
|
|
|
14
14
|
const UIStrings = {
|
|
15
15
|
/**
|
|
16
|
-
* @description
|
|
16
|
+
* @description Prefix shown next to related insight chips in the Performance panel.
|
|
17
17
|
*/
|
|
18
18
|
insightKeyword: 'Insight',
|
|
19
19
|
/**
|
|
20
|
-
* @description Prefix shown next to related insight chips
|
|
20
|
+
* @description Prefix shown next to related insight chips containing the insight name in the Performance panel.
|
|
21
21
|
* @example {Improve image delivery} PH1
|
|
22
22
|
*/
|
|
23
23
|
insightWithName: 'Insight: {PH1}',
|
|
@@ -27,62 +27,61 @@ const deleteAnnotationImageUrl =
|
|
|
27
27
|
|
|
28
28
|
const UIStrings = {
|
|
29
29
|
/**
|
|
30
|
-
* @description Title for
|
|
30
|
+
* @description Title for the annotations onboarding section in the Performance panel sidebar.
|
|
31
31
|
*/
|
|
32
32
|
annotationGetStarted: 'Annotate a trace for yourself and others',
|
|
33
33
|
/**
|
|
34
|
-
* @description
|
|
34
|
+
* @description Header title for the item label tutorial in the Performance panel sidebar.
|
|
35
35
|
*/
|
|
36
36
|
entryLabelTutorialTitle: 'Label an item',
|
|
37
37
|
/**
|
|
38
|
-
* @description
|
|
38
|
+
* @description Instructions for how to add an item label in the Performance panel.
|
|
39
39
|
*/
|
|
40
|
-
entryLabelTutorialDescription: 'Double-click or press Enter on an item and type to
|
|
40
|
+
entryLabelTutorialDescription: 'Double-click or press Enter on an item and type to add an item label.',
|
|
41
41
|
/**
|
|
42
|
-
* @description
|
|
42
|
+
* @description Header title for the item connection tutorial in the Performance panel sidebar.
|
|
43
43
|
*/
|
|
44
44
|
entryLinkTutorialTitle: 'Connect two items',
|
|
45
45
|
/**
|
|
46
|
-
* @description
|
|
46
|
+
* @description Instructions for how to connect two items in the flame chart of the Performance panel.
|
|
47
47
|
*/
|
|
48
48
|
entryLinkTutorialDescription:
|
|
49
49
|
'Double-click on an item, click on the adjacent rightward arrow, then select the destination item.',
|
|
50
50
|
/**
|
|
51
|
-
* @description
|
|
51
|
+
* @description Header title for the time range tutorial in the Performance panel sidebar.
|
|
52
52
|
*/
|
|
53
53
|
timeRangeTutorialTitle: 'Define a time range',
|
|
54
54
|
/**
|
|
55
|
-
* @description
|
|
55
|
+
* @description Instructions for how to add a time range annotation in the flame chart of the Performance panel.
|
|
56
56
|
*/
|
|
57
|
-
timeRangeTutorialDescription: 'Shift-drag in the
|
|
57
|
+
timeRangeTutorialDescription: 'Shift-drag in the flame chart, then type to add a time range annotation.',
|
|
58
58
|
/**
|
|
59
|
-
* @description
|
|
59
|
+
* @description Header title for the annotation deletion tutorial in the Performance panel sidebar.
|
|
60
60
|
*/
|
|
61
61
|
deleteAnnotationTutorialTitle: 'Delete an annotation',
|
|
62
62
|
/**
|
|
63
|
-
* @description
|
|
63
|
+
* @description Instructions for how to delete an annotation in the Performance panel sidebar.
|
|
64
64
|
*/
|
|
65
|
-
deleteAnnotationTutorialDescription:
|
|
66
|
-
'Hover over the list in the sidebar with Annotations tab selected to access the delete function.',
|
|
65
|
+
deleteAnnotationTutorialDescription: 'Hover over the list in the sidebar Annotations tab to delete an annotation.',
|
|
67
66
|
/**
|
|
68
|
-
* @description
|
|
69
|
-
* @example {
|
|
70
|
-
|
|
67
|
+
* @description Accessible label for the delete annotation button in the Performance panel sidebar.
|
|
68
|
+
* @example {A paint event annotated with the text hello world} PH1
|
|
69
|
+
*/
|
|
71
70
|
deleteButton: 'Delete annotation: {PH1}',
|
|
72
71
|
/**
|
|
73
|
-
* @description label
|
|
72
|
+
* @description Accessible label describing an item annotation in the Performance panel sidebar.
|
|
74
73
|
* @example {Paint} PH1
|
|
75
|
-
* @example {
|
|
74
|
+
* @example {Hello world} PH2
|
|
76
75
|
*/
|
|
77
76
|
entryLabelDescriptionLabel: 'A "{PH1}" event annotated with the text "{PH2}"',
|
|
78
77
|
/**
|
|
79
|
-
* @description label
|
|
78
|
+
* @description Accessible label describing a time range annotation in the Performance panel sidebar.
|
|
80
79
|
* @example {2.5 milliseconds} PH1
|
|
81
80
|
* @example {13.5 milliseconds} PH2
|
|
82
81
|
*/
|
|
83
82
|
timeRangeDescriptionLabel: 'A time range starting at {PH1} and ending at {PH2}',
|
|
84
83
|
/**
|
|
85
|
-
* @description label
|
|
84
|
+
* @description Accessible label describing a link between two events in the Performance panel sidebar.
|
|
86
85
|
* @example {Paint} PH1
|
|
87
86
|
* @example {Recalculate styles} PH2
|
|
88
87
|
*/
|
|
@@ -44,7 +44,7 @@ const INSIGHT_NAME_TO_COMPONENT = {
|
|
|
44
44
|
|
|
45
45
|
const UIStrings = {
|
|
46
46
|
/**
|
|
47
|
-
* @description Summary text for an expandable dropdown that contains all insights in a passing state.
|
|
47
|
+
* @description Summary text for an expandable dropdown that contains all insights in a passing state in the Performance panel sidebar.
|
|
48
48
|
* @example {4} PH1
|
|
49
49
|
*/
|
|
50
50
|
passedInsights: 'Passed insights ({PH1})',
|
|
@@ -15,11 +15,11 @@ const {render, html} = Lit;
|
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/**
|
|
18
|
-
* @description
|
|
18
|
+
* @description Label for total duration in the summary view of the Performance panel.
|
|
19
19
|
*/
|
|
20
20
|
total: 'Total',
|
|
21
21
|
/**
|
|
22
|
-
* @description
|
|
22
|
+
* @description Time range in the summary view of the Performance panel.
|
|
23
23
|
* @example {1ms} PH1
|
|
24
24
|
* @example {10ms} PH2
|
|
25
25
|
*/
|
|
@@ -14,16 +14,12 @@ import type {CompareRating} from './MetricCompareStrings.js';
|
|
|
14
14
|
|
|
15
15
|
const UIStrings = {
|
|
16
16
|
/**
|
|
17
|
-
* @description
|
|
18
|
-
* The shortest form or abbreviation of milliseconds should be used, as there is
|
|
19
|
-
* limited room in this UI.
|
|
17
|
+
* @description Short formatted milliseconds string in the Performance panel.
|
|
20
18
|
* @example {2.14} PH1
|
|
21
19
|
*/
|
|
22
20
|
fms: '{PH1}[ms]()',
|
|
23
21
|
/**
|
|
24
|
-
* @description
|
|
25
|
-
* The shortest form or abbreviation of seconds should be used, as there is
|
|
26
|
-
* limited room in this UI.
|
|
22
|
+
* @description Short formatted seconds string in the Performance panel.
|
|
27
23
|
* @example {2.14} PH1
|
|
28
24
|
*/
|
|
29
25
|
fs: '{PH1}[s]()',
|
|
@@ -27,37 +27,34 @@ const {html} = Lit;
|
|
|
27
27
|
|
|
28
28
|
const UIStrings = {
|
|
29
29
|
/**
|
|
30
|
-
* @description
|
|
30
|
+
* @description Estimated time or size savings for an insight in the Performance panel sidebar.
|
|
31
31
|
* @example {401 ms} PH1
|
|
32
|
-
* @example {112 kB} PH1
|
|
33
32
|
*/
|
|
34
33
|
estimatedSavings: 'Est savings: {PH1}',
|
|
35
34
|
/**
|
|
36
|
-
* @description
|
|
35
|
+
* @description Estimated time and size savings for an insight in the Performance panel sidebar.
|
|
37
36
|
* @example {401 ms} PH1
|
|
38
37
|
* @example {112 kB} PH2
|
|
39
38
|
*/
|
|
40
39
|
estimatedSavingsTimingAndBytes: 'Est savings: {PH1} & {PH2}',
|
|
41
40
|
/**
|
|
42
|
-
* @description
|
|
41
|
+
* @description Accessible label for the estimated time savings of an insight in the Performance panel sidebar.
|
|
43
42
|
* @example {401 ms} PH1
|
|
44
|
-
* @example {112 kB} PH1
|
|
45
43
|
*/
|
|
46
44
|
estimatedSavingsAriaTiming: 'Estimated savings for this insight: {PH1}',
|
|
47
45
|
/**
|
|
48
|
-
* @description
|
|
49
|
-
* @example {401 ms} PH1
|
|
46
|
+
* @description Accessible label for the estimated size savings of an insight in the Performance panel sidebar.
|
|
50
47
|
* @example {112 kB} PH1
|
|
51
48
|
*/
|
|
52
49
|
estimatedSavingsAriaBytes: 'Estimated savings for this insight: {PH1} transfer size',
|
|
53
50
|
/**
|
|
54
|
-
* @description
|
|
51
|
+
* @description Accessible label for both estimated time and size savings of an insight in the Performance panel sidebar.
|
|
55
52
|
* @example {401 ms} PH1
|
|
56
53
|
* @example {112 kB} PH2
|
|
57
54
|
*/
|
|
58
55
|
estimatedSavingsTimingAndBytesAria: 'Estimated savings for this insight: {PH1} and {PH2} transfer size',
|
|
59
56
|
/**
|
|
60
|
-
* @description
|
|
57
|
+
* @description Accessible label for the button to expand an insight to view details in the Performance panel sidebar.
|
|
61
58
|
* @example {LCP breakdown} PH1
|
|
62
59
|
*/
|
|
63
60
|
viewDetails: 'View details for {PH1} insight.',
|
|
@@ -19,12 +19,12 @@ const {html} = Lit;
|
|
|
19
19
|
|
|
20
20
|
const UIStrings = {
|
|
21
21
|
/**
|
|
22
|
-
* @description
|
|
22
|
+
* @description Accessible label indicating that an insight checklist check passed in the Performance panel sidebar.
|
|
23
23
|
* @example {Server response time} PH1
|
|
24
24
|
*/
|
|
25
25
|
successAriaLabel: 'Insight check passed: {PH1}',
|
|
26
26
|
/**
|
|
27
|
-
* @description
|
|
27
|
+
* @description Accessible label indicating that an insight checklist check failed in the Performance panel sidebar.
|
|
28
28
|
* @example {Server response time} PH1
|
|
29
29
|
*/
|
|
30
30
|
failedAriaLabel: 'Insight check failed: {PH1}',
|
|
@@ -13,7 +13,7 @@ import tableStyles from './table.css.js';
|
|
|
13
13
|
|
|
14
14
|
const UIStrings = {
|
|
15
15
|
/**
|
|
16
|
-
* @description Table row
|
|
16
|
+
* @description Table row label representing the remaining items not shown in the table in the Performance panel sidebar.
|
|
17
17
|
* @example {5} PH1
|
|
18
18
|
*/
|
|
19
19
|
others: '{PH1} others',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 069db94880beecb3702000d1763083e769fb6b03
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -507,6 +507,100 @@ export function rematchCommentAnchor(comment: CommentThread, root: Document|Elem
|
|
|
507
507
|
return candidateList[0] || null;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
+
export interface VisibleRect {
|
|
511
|
+
left: number;
|
|
512
|
+
top: number;
|
|
513
|
+
right: number;
|
|
514
|
+
bottom: number;
|
|
515
|
+
width: number;
|
|
516
|
+
height: number;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
function isClippingOverflow(overflow: string): boolean {
|
|
520
|
+
return overflow === 'hidden' || overflow === 'auto' || overflow === 'scroll' || overflow === 'clip';
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Computes the visible viewport-relative bounding box of an element after clipping against
|
|
525
|
+
* all ancestor scroll/overflow containers and viewport boundaries across shadow DOM roots.
|
|
526
|
+
*
|
|
527
|
+
* @param element The source DOM element.
|
|
528
|
+
* @param targetRect Optional explicit bounding box (e.g. for sub-lines or custom targets).
|
|
529
|
+
* @returns The clipped viewport-relative rectangle or null if the element is completely clipped out of view or invisible.
|
|
530
|
+
*/
|
|
531
|
+
export function computeVisibleRect(element: Element, targetRect?: DOMRect): VisibleRect|null {
|
|
532
|
+
if (!element.isConnected) {
|
|
533
|
+
return null;
|
|
534
|
+
}
|
|
535
|
+
if (!element.checkVisibility({checkOpacity: true, checkVisibilityCSS: true, contentVisibilityAuto: true})) {
|
|
536
|
+
return null;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
const rect = targetRect ?? element.getBoundingClientRect();
|
|
540
|
+
if (rect.width <= 0 || rect.height <= 0) {
|
|
541
|
+
return null;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
let visibleLeft = rect.left;
|
|
545
|
+
let visibleRight = rect.right;
|
|
546
|
+
let visibleTop = rect.top;
|
|
547
|
+
let visibleBottom = rect.bottom;
|
|
548
|
+
|
|
549
|
+
const doc = element.ownerDocument || document;
|
|
550
|
+
const win = doc.defaultView || window;
|
|
551
|
+
const viewportWidth = win.innerWidth || doc.documentElement.clientWidth;
|
|
552
|
+
const viewportHeight = win.innerHeight || doc.documentElement.clientHeight;
|
|
553
|
+
|
|
554
|
+
visibleLeft = Math.max(visibleLeft, 0);
|
|
555
|
+
visibleTop = Math.max(visibleTop, 0);
|
|
556
|
+
visibleRight = Math.min(visibleRight, viewportWidth);
|
|
557
|
+
visibleBottom = Math.min(visibleBottom, viewportHeight);
|
|
558
|
+
|
|
559
|
+
if (visibleLeft >= visibleRight || visibleTop >= visibleBottom) {
|
|
560
|
+
return null;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
let current = element.parentElementOrShadowHost();
|
|
564
|
+
while (current && current !== doc.documentElement && current !== doc.body) {
|
|
565
|
+
const style = win.getComputedStyle(current);
|
|
566
|
+
const clipsX = isClippingOverflow(style.overflowX);
|
|
567
|
+
const clipsY = isClippingOverflow(style.overflowY);
|
|
568
|
+
|
|
569
|
+
if (clipsX || clipsY) {
|
|
570
|
+
const parentRect = current.getBoundingClientRect();
|
|
571
|
+
if (clipsX) {
|
|
572
|
+
visibleLeft = Math.max(visibleLeft, parentRect.left);
|
|
573
|
+
visibleRight = Math.min(visibleRight, parentRect.right);
|
|
574
|
+
}
|
|
575
|
+
if (clipsY) {
|
|
576
|
+
visibleTop = Math.max(visibleTop, parentRect.top);
|
|
577
|
+
visibleBottom = Math.min(visibleBottom, parentRect.bottom);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
if (visibleLeft >= visibleRight || visibleTop >= visibleBottom) {
|
|
581
|
+
return null;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
current = current.parentElementOrShadowHost();
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
const width = visibleRight - visibleLeft;
|
|
589
|
+
const height = visibleBottom - visibleTop;
|
|
590
|
+
if (width <= 0 || height <= 0) {
|
|
591
|
+
return null;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
return {
|
|
595
|
+
left: visibleLeft,
|
|
596
|
+
top: visibleTop,
|
|
597
|
+
right: visibleRight,
|
|
598
|
+
bottom: visibleBottom,
|
|
599
|
+
width,
|
|
600
|
+
height,
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
|
|
510
604
|
/**
|
|
511
605
|
* Checks whether an element is connected to the DOM, visible according to `checkVisibility()`,
|
|
512
606
|
* and has non-zero bounding box dimensions.
|
|
@@ -7,8 +7,8 @@ import * as CommentManager from '../../models/comment_manager/comment_manager.js
|
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
9
|
type CommentThread,
|
|
10
|
+
computeVisibleRect,
|
|
10
11
|
deepQuerySelectorAll,
|
|
11
|
-
isElementVisible,
|
|
12
12
|
rematchCommentAnchor,
|
|
13
13
|
resolveCommentAnchor,
|
|
14
14
|
resolveCommentAnchorElement,
|
|
@@ -304,30 +304,30 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
304
304
|
this.#observedThreads.add(el);
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
const visibleRect = computeVisibleRect(el);
|
|
308
|
+
if (!visibleRect) {
|
|
308
309
|
continue;
|
|
309
310
|
}
|
|
310
311
|
|
|
311
|
-
const rect = el.getBoundingClientRect();
|
|
312
312
|
const offsetIndex = elementPinCounts.get(el) || 0;
|
|
313
313
|
elementPinCounts.set(el, offsetIndex + 1);
|
|
314
314
|
// Offset by 26px vertically (24px pin icon height + 2px spacing) so multiple comment pins on the same element stack vertically without overlapping.
|
|
315
315
|
const offsetY = offsetIndex * 26;
|
|
316
316
|
|
|
317
|
-
// Offset by -12px (half of the 24px pin diameter) so the pin icon is centered on the top-right corner of the
|
|
317
|
+
// Offset by -12px (half of the 24px pin diameter) so the pin icon is centered on the top-right corner of the visible clipped area.
|
|
318
318
|
newPins.push({
|
|
319
319
|
id: thread.id,
|
|
320
|
-
top: scrollY +
|
|
321
|
-
left: scrollX +
|
|
320
|
+
top: scrollY + visibleRect.top - 12 + offsetY,
|
|
321
|
+
left: scrollX + visibleRect.right - 12,
|
|
322
322
|
visible: true,
|
|
323
323
|
});
|
|
324
324
|
|
|
325
325
|
newHighlights.push({
|
|
326
326
|
id: thread.id,
|
|
327
|
-
top: scrollY +
|
|
328
|
-
left: scrollX +
|
|
329
|
-
width:
|
|
330
|
-
height:
|
|
327
|
+
top: scrollY + visibleRect.top,
|
|
328
|
+
left: scrollX + visibleRect.left,
|
|
329
|
+
width: visibleRect.width,
|
|
330
|
+
height: visibleRect.height,
|
|
331
331
|
visible: true,
|
|
332
332
|
});
|
|
333
333
|
}
|
|
@@ -457,32 +457,16 @@ export class CommentOverlayManager extends Common.ObjectWrapper.ObjectWrapper<Ev
|
|
|
457
457
|
if (anchorEl) {
|
|
458
458
|
const cmLine = target.closest('.cm-line');
|
|
459
459
|
const highlightTarget = (cmLine && anchorEl.classList.contains('cm-editor')) ? cmLine : anchorEl;
|
|
460
|
-
const
|
|
461
|
-
let visibleLeft = rect.left;
|
|
462
|
-
let visibleRight = rect.right;
|
|
463
|
-
let visibleTop = rect.top;
|
|
464
|
-
let visibleBottom = rect.bottom;
|
|
465
|
-
|
|
466
|
-
if (anchorEl.classList.contains('cm-editor')) {
|
|
467
|
-
const scroller = anchorEl.querySelector('.cm-scroller') || anchorEl;
|
|
468
|
-
const scrollerRect = scroller.getBoundingClientRect();
|
|
469
|
-
visibleLeft = Math.max(visibleLeft, scrollerRect.left);
|
|
470
|
-
visibleRight = Math.min(visibleRight, scrollerRect.right);
|
|
471
|
-
visibleTop = Math.max(visibleTop, scrollerRect.top);
|
|
472
|
-
visibleBottom = Math.min(visibleBottom, scrollerRect.bottom);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
const visibleWidth = Math.max(0, visibleRight - visibleLeft);
|
|
476
|
-
const visibleHeight = Math.max(0, visibleBottom - visibleTop);
|
|
460
|
+
const visibleRect = computeVisibleRect(highlightTarget);
|
|
477
461
|
|
|
478
|
-
if (
|
|
462
|
+
if (visibleRect) {
|
|
479
463
|
const scrollX = window.scrollX;
|
|
480
464
|
const scrollY = window.scrollY;
|
|
481
465
|
this.#setHoverHighlight({
|
|
482
|
-
top: scrollY +
|
|
483
|
-
left: scrollX +
|
|
484
|
-
width:
|
|
485
|
-
height:
|
|
466
|
+
top: scrollY + visibleRect.top,
|
|
467
|
+
left: scrollX + visibleRect.left,
|
|
468
|
+
width: visibleRect.width,
|
|
469
|
+
height: visibleRect.height,
|
|
486
470
|
visible: true,
|
|
487
471
|
});
|
|
488
472
|
} else {
|
|
@@ -10,6 +10,7 @@ import * as TextUtils from '../../../core/text_utils/text_utils.js';
|
|
|
10
10
|
import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
11
11
|
import {Icon} from '../../kit/kit.js';
|
|
12
12
|
import * as UI from '../../legacy/legacy.js';
|
|
13
|
+
import * as SettingsUI from '../../settings/settings.js';
|
|
13
14
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
14
15
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
|
15
16
|
|
|
@@ -327,7 +328,7 @@ const baseKeymap = CM.keymap.of([
|
|
|
327
328
|
]);
|
|
328
329
|
|
|
329
330
|
function themeIsDark(): boolean {
|
|
330
|
-
const setting = Common.Settings.Settings.instance().
|
|
331
|
+
const setting = Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.uiThemeSettingDescriptor).get();
|
|
331
332
|
return setting === 'systemPreferred' ? window.matchMedia('(prefers-color-scheme: dark)').matches : setting === 'dark';
|
|
332
333
|
}
|
|
333
334
|
|
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
9
|
+
import * as SettingsUI from '../settings/settings.js';
|
|
9
10
|
|
|
10
11
|
import type {ActionDelegate} from './ActionRegistration.js';
|
|
11
12
|
import {LiveAnnouncer} from './ARIAUtils.js';
|
|
@@ -50,7 +51,9 @@ export class DockController extends Common.ObjectWrapper.ObjectWrapper<EventType
|
|
|
50
51
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.closeWindow.bind(
|
|
51
52
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance));
|
|
52
53
|
|
|
53
|
-
this.currentDockStateSetting =
|
|
54
|
+
this.currentDockStateSetting =
|
|
55
|
+
Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.currentDockStateSettingDescriptor) as
|
|
56
|
+
Common.Settings.Setting<DockState>;
|
|
54
57
|
this.lastDockStateSetting = Common.Settings.Settings.instance().createSetting('last-dock-state', DockState.BOTTOM);
|
|
55
58
|
|
|
56
59
|
if (!canDock) {
|
|
@@ -10,6 +10,7 @@ import * as Root from '../../core/root/root.js';
|
|
|
10
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
11
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
12
12
|
import {createIcon, type Icon} from '../kit/kit.js';
|
|
13
|
+
import * as SettingsUI from '../settings/settings.js';
|
|
13
14
|
import * as VisualLogging from '../visual_logging/visual_logging.js';
|
|
14
15
|
|
|
15
16
|
import type {ActionDelegate as ActionDelegateInterface} from './ActionRegistration.js';
|
|
@@ -680,7 +681,8 @@ export class InspectorView extends VBox implements ViewLocationResolver {
|
|
|
680
681
|
}
|
|
681
682
|
|
|
682
683
|
// Ctrl/Cmd + 1-9 should show corresponding panel.
|
|
683
|
-
const panelShortcutEnabled =
|
|
684
|
+
const panelShortcutEnabled =
|
|
685
|
+
Common.Settings.Settings.instance().resolve(SettingsUI.MainSettings.shortcutPanelSwitchSettingDescriptor).get();
|
|
684
686
|
if (panelShortcutEnabled) {
|
|
685
687
|
let panelIndex = -1;
|
|
686
688
|
if (event.keyCode > 0x30 && event.keyCode < 0x3A) {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
import * as Host from '../../core/host/host.js';
|
|
35
|
+
import type * as Settings from '../settings/settings.js';
|
|
35
36
|
|
|
36
37
|
import {DefaultShortcutSetting} from './ShortcutRegistry.js';
|
|
37
38
|
|
|
@@ -77,17 +78,13 @@ export class KeyboardShortcut {
|
|
|
77
78
|
return !this.keybindSets || this.keybindSets.has(keybindSet);
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
equals(shortcut: KeyboardShortcut): boolean {
|
|
81
|
+
equals(shortcut: KeyboardShortcut|Settings.MainSettings.UserShortcut): boolean {
|
|
81
82
|
return this.descriptorsMatch(shortcut.descriptors) && this.type === shortcut.type &&
|
|
82
83
|
this.action === shortcut.action;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
static createShortcutFromSettingObject(settingObject: {
|
|
86
|
-
action
|
|
87
|
-
descriptors: Descriptor[],
|
|
88
|
-
type: Type,
|
|
89
|
-
}): KeyboardShortcut {
|
|
90
|
-
return new KeyboardShortcut(settingObject.descriptors, settingObject.action, settingObject.type);
|
|
86
|
+
static createShortcutFromSettingObject(settingObject: Settings.MainSettings.UserShortcut): KeyboardShortcut {
|
|
87
|
+
return new KeyboardShortcut(settingObject.descriptors, settingObject.action, settingObject.type as Type);
|
|
91
88
|
}
|
|
92
89
|
|
|
93
90
|
/**
|
|
@@ -42,6 +42,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
42
42
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
43
43
|
import * as Buttons from '../components/buttons/buttons.js';
|
|
44
44
|
import {createIcon} from '../kit/kit.js';
|
|
45
|
+
import * as Settings from '../settings/settings.js';
|
|
45
46
|
|
|
46
47
|
import * as ARIAUtils from './ARIAUtils.js';
|
|
47
48
|
import {InspectorView} from './InspectorView.js';
|
|
@@ -662,7 +663,7 @@ export class SearchableView extends VBox {
|
|
|
662
663
|
}
|
|
663
664
|
|
|
664
665
|
private onInput(): void {
|
|
665
|
-
if (!Common.Settings.Settings.instance().
|
|
666
|
+
if (!Common.Settings.Settings.instance().resolve(Settings.MainSettings.searchAsYouTypeSettingDescriptor).get()) {
|
|
666
667
|
this.clearSearch();
|
|
667
668
|
return;
|
|
668
669
|
}
|
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
9
|
+
import * as Settings from '../settings/settings.js';
|
|
9
10
|
|
|
10
11
|
import {type Action, getRegisteredActionExtensions, KeybindSet} from './ActionRegistration.js';
|
|
11
12
|
import type {ActionRegistry} from './ActionRegistry.js';
|
|
@@ -26,7 +27,7 @@ export class ShortcutRegistry {
|
|
|
26
27
|
private readonly devToolsDefaultShortcutActions: Set<string>;
|
|
27
28
|
private readonly disabledDefaultShortcutsForAction: Platform.MapUtilities.Multimap<string, KeyboardShortcut>;
|
|
28
29
|
private readonly keybindSetSetting: Common.Settings.Setting<string>;
|
|
29
|
-
private readonly userShortcutsSetting: Common.Settings.Setting<
|
|
30
|
+
private readonly userShortcutsSetting: Common.Settings.Setting<Settings.MainSettings.UserShortcut[]>;
|
|
30
31
|
|
|
31
32
|
constructor(actionRegistry: ActionRegistry) {
|
|
32
33
|
this.actionRegistry = actionRegistry;
|
|
@@ -37,12 +38,14 @@ export class ShortcutRegistry {
|
|
|
37
38
|
this.consumePrefix = null;
|
|
38
39
|
this.devToolsDefaultShortcutActions = new Set();
|
|
39
40
|
this.disabledDefaultShortcutsForAction = new Platform.MapUtilities.Multimap();
|
|
40
|
-
this.keybindSetSetting =
|
|
41
|
+
this.keybindSetSetting =
|
|
42
|
+
Common.Settings.Settings.instance().resolve(Settings.MainSettings.activeKeybindSetSettingDescriptor);
|
|
41
43
|
this.keybindSetSetting.addChangeListener(event => {
|
|
42
44
|
Host.userMetrics.keybindSetSettingChanged(event.data);
|
|
43
45
|
this.registerBindings();
|
|
44
46
|
});
|
|
45
|
-
this.userShortcutsSetting =
|
|
47
|
+
this.userShortcutsSetting =
|
|
48
|
+
Common.Settings.Settings.instance().resolve(Settings.MainSettings.userShortcutsSettingDescriptor);
|
|
46
49
|
this.userShortcutsSetting.addChangeListener(this.registerBindings, this);
|
|
47
50
|
|
|
48
51
|
this.registerBindings();
|