chrome-devtools-frontend 1.0.920568 → 1.0.922044
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 +1 -1
- package/config/gni/devtools_grd_files.gni +5 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/core/common/ColorUtils.ts +2 -1
- package/front_end/core/common/Object.ts +36 -1
- package/front_end/core/common/WasmDisassembly.ts +6 -14
- package/front_end/core/common/common.ts +2 -1
- package/front_end/core/i18n/locales/af.json +53 -32
- package/front_end/core/i18n/locales/am.json +56 -35
- package/front_end/core/i18n/locales/ar.json +53 -32
- package/front_end/core/i18n/locales/as.json +63 -42
- package/front_end/core/i18n/locales/az.json +53 -32
- package/front_end/core/i18n/locales/be.json +52 -31
- package/front_end/core/i18n/locales/bg.json +51 -30
- package/front_end/core/i18n/locales/bn.json +63 -42
- package/front_end/core/i18n/locales/bs.json +57 -36
- package/front_end/core/i18n/locales/ca.json +55 -34
- package/front_end/core/i18n/locales/cs.json +51 -30
- package/front_end/core/i18n/locales/cy.json +63 -42
- package/front_end/core/i18n/locales/da.json +55 -34
- package/front_end/core/i18n/locales/de.json +52 -31
- package/front_end/core/i18n/locales/el.json +58 -37
- package/front_end/core/i18n/locales/en-GB.json +51 -30
- package/front_end/core/i18n/locales/en-US.json +67 -34
- package/front_end/core/i18n/locales/en-XL.json +67 -34
- package/front_end/core/i18n/locales/es-419.json +53 -32
- package/front_end/core/i18n/locales/es.json +52 -31
- package/front_end/core/i18n/locales/et.json +54 -33
- package/front_end/core/i18n/locales/eu.json +71 -50
- package/front_end/core/i18n/locales/fa.json +54 -33
- package/front_end/core/i18n/locales/fi.json +55 -34
- package/front_end/core/i18n/locales/fil.json +59 -38
- package/front_end/core/i18n/locales/fr-CA.json +52 -31
- package/front_end/core/i18n/locales/fr.json +54 -33
- package/front_end/core/i18n/locales/gl.json +57 -36
- package/front_end/core/i18n/locales/gu.json +65 -44
- package/front_end/core/i18n/locales/he.json +56 -35
- package/front_end/core/i18n/locales/hi.json +61 -40
- package/front_end/core/i18n/locales/hr.json +55 -34
- package/front_end/core/i18n/locales/hu.json +53 -32
- package/front_end/core/i18n/locales/hy.json +54 -33
- package/front_end/core/i18n/locales/id.json +59 -38
- package/front_end/core/i18n/locales/is.json +51 -30
- package/front_end/core/i18n/locales/it.json +51 -30
- package/front_end/core/i18n/locales/ja.json +52 -31
- package/front_end/core/i18n/locales/ka.json +51 -30
- package/front_end/core/i18n/locales/kk.json +56 -35
- package/front_end/core/i18n/locales/km.json +59 -38
- package/front_end/core/i18n/locales/kn.json +63 -42
- package/front_end/core/i18n/locales/ko.json +59 -38
- package/front_end/core/i18n/locales/ky.json +54 -33
- package/front_end/core/i18n/locales/lo.json +59 -38
- package/front_end/core/i18n/locales/lt.json +52 -31
- package/front_end/core/i18n/locales/lv.json +60 -39
- package/front_end/core/i18n/locales/mk.json +51 -30
- package/front_end/core/i18n/locales/ml.json +65 -44
- package/front_end/core/i18n/locales/mn.json +59 -38
- package/front_end/core/i18n/locales/mr.json +61 -40
- package/front_end/core/i18n/locales/ms.json +59 -38
- package/front_end/core/i18n/locales/my.json +59 -38
- package/front_end/core/i18n/locales/ne.json +63 -42
- package/front_end/core/i18n/locales/nl.json +55 -34
- package/front_end/core/i18n/locales/no.json +54 -33
- package/front_end/core/i18n/locales/or.json +63 -42
- package/front_end/core/i18n/locales/pa.json +61 -40
- package/front_end/core/i18n/locales/pl.json +51 -30
- package/front_end/core/i18n/locales/pt-PT.json +52 -31
- package/front_end/core/i18n/locales/pt.json +59 -38
- package/front_end/core/i18n/locales/ro.json +52 -31
- package/front_end/core/i18n/locales/ru.json +52 -31
- package/front_end/core/i18n/locales/si.json +59 -38
- package/front_end/core/i18n/locales/sk.json +52 -31
- package/front_end/core/i18n/locales/sl.json +52 -31
- package/front_end/core/i18n/locales/sq.json +51 -30
- package/front_end/core/i18n/locales/sr-Latn.json +52 -31
- package/front_end/core/i18n/locales/sr.json +52 -31
- package/front_end/core/i18n/locales/sv.json +52 -31
- package/front_end/core/i18n/locales/sw.json +60 -39
- package/front_end/core/i18n/locales/ta.json +67 -46
- package/front_end/core/i18n/locales/te.json +62 -41
- package/front_end/core/i18n/locales/th.json +52 -31
- package/front_end/core/i18n/locales/tr.json +55 -34
- package/front_end/core/i18n/locales/uk.json +55 -34
- package/front_end/core/i18n/locales/ur.json +60 -39
- package/front_end/core/i18n/locales/uz.json +52 -31
- package/front_end/core/i18n/locales/vi.json +54 -33
- package/front_end/core/i18n/locales/zh-HK.json +52 -31
- package/front_end/core/i18n/locales/zh-TW.json +57 -36
- package/front_end/core/i18n/locales/zh.json +56 -35
- package/front_end/core/i18n/locales/zu.json +59 -38
- package/front_end/core/sdk/RemoteObject.ts +43 -20
- package/front_end/core/sdk/TracingModel.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.js +4 -4
- package/front_end/legacy/legacy-defs.d.ts +24 -0
- package/front_end/models/extensions/ExtensionAPI.ts +9 -4
- package/front_end/models/extensions/ExtensionServer.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +4 -1
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +12 -3
- package/front_end/models/issues_manager/descriptions/SameSiteSamePartyCrossPartyContextSet.md +10 -0
- package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +4 -0
- package/front_end/models/timeline_model/TimelineModel.ts +5 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -2
- package/front_end/panels/application/DatabaseQueryView.ts +7 -1
- package/front_end/panels/changes/ChangesSidebar.ts +6 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +8 -1
- package/front_end/panels/elements/ElementsPanel.ts +25 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +13 -1
- package/front_end/panels/elements/layoutPane.css +1 -0
- package/front_end/panels/emulation/AdvancedApp.ts +2 -12
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +14 -1
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
- package/front_end/panels/issues/IssueAggregator.ts +2 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +7 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +7 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +7 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +6 -7
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +8 -4
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -0
- package/front_end/panels/network/NetworkItemView.ts +24 -4
- package/front_end/panels/network/NetworkLogView.ts +14 -5
- package/front_end/panels/network/NetworkPanel.ts +7 -6
- package/front_end/panels/network/RequestHeadersView.ts +0 -345
- package/front_end/panels/network/RequestPayloadView.ts +529 -0
- package/front_end/panels/network/RequestTimingView.ts +3 -1
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
- package/front_end/panels/network/module.json +0 -3
- package/front_end/panels/network/network-legacy.ts +5 -0
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/network/requestPayloadTree.css +130 -0
- package/front_end/panels/network/requestPayloadView.css +16 -0
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -3
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -1
- package/front_end/panels/profiler/ProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +5 -5
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +5 -6
- package/front_end/panels/sources/SourcesPanel.ts +4 -5
- package/front_end/panels/sources/SourcesView.ts +16 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +7 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -7
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
- package/front_end/panels/timeline/TimelineLayersView.ts +7 -7
- package/front_end/panels/timeline/TimelinePanel.ts +5 -4
- package/front_end/ui/legacy/ARIAUtils.ts +12 -0
- package/front_end/ui/legacy/Fragment.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -0
- package/front_end/ui/legacy/SplitWidget.ts +6 -1
- package/front_end/ui/legacy/TabbedPane.ts +4 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +16 -66
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +8 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +9 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +11 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +6 -3
- package/front_end/ui/legacy/utils/focus-changed.ts +1 -1
- package/inspector_overlay/common.ts +3 -3
- package/inspector_overlay/tool_viewport_size.ts +1 -1
- package/package.json +1 -1
|
@@ -40,6 +40,8 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
40
40
|
import type {NetworkTimeCalculator} from './NetworkTimeCalculator.js';
|
|
41
41
|
import {Events} from './NetworkTimeCalculator.js';
|
|
42
42
|
|
|
43
|
+
import networkingTimingTableStyles from './networkTimingTable.css.js';
|
|
44
|
+
|
|
43
45
|
const UIStrings = {
|
|
44
46
|
/**
|
|
45
47
|
*@description Text used to label the time taken to receive an HTTP/2 Push message.
|
|
@@ -360,7 +362,6 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
360
362
|
static createTimingTable(request: SDK.NetworkRequest.NetworkRequest, calculator: NetworkTimeCalculator): Element {
|
|
361
363
|
const tableElement = document.createElement('table');
|
|
362
364
|
tableElement.classList.add('network-timing-table');
|
|
363
|
-
UI.Utils.appendStyle(tableElement, 'panels/network/networkTimingTable.css');
|
|
364
365
|
const colgroup = tableElement.createChild('colgroup');
|
|
365
366
|
colgroup.createChild('col', 'labels');
|
|
366
367
|
colgroup.createChild('col', 'bars');
|
|
@@ -647,6 +648,7 @@ export class RequestTimingView extends UI.Widget.VBox {
|
|
|
647
648
|
this.request.addEventListener(SDK.NetworkRequest.Events.TimingChanged, this.refresh, this);
|
|
648
649
|
this.request.addEventListener(SDK.NetworkRequest.Events.FinishedLoading, this.refresh, this);
|
|
649
650
|
this.calculator.addEventListener(Events.BoundariesChanged, this.refresh, this);
|
|
651
|
+
this.registerCSSFiles([networkingTimingTableStyles]);
|
|
650
652
|
this.refresh();
|
|
651
653
|
}
|
|
652
654
|
|
|
@@ -109,6 +109,11 @@ Network.RequestHTMLView = NetworkModule.RequestHTMLView.RequestHTMLView;
|
|
|
109
109
|
*/
|
|
110
110
|
Network.RequestHeadersView = NetworkModule.RequestHeadersView.RequestHeadersView;
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* @constructor
|
|
114
|
+
*/
|
|
115
|
+
Network.RequestPayloadView = NetworkModule.RequestPayloadView.RequestPayloadView;
|
|
116
|
+
|
|
112
117
|
/**
|
|
113
118
|
* @constructor
|
|
114
119
|
*/
|
|
@@ -46,6 +46,7 @@ import * as RequestCookiesView from './RequestCookiesView.js';
|
|
|
46
46
|
import * as RequestHeadersView from './RequestHeadersView.js';
|
|
47
47
|
import * as RequestHTMLView from './RequestHTMLView.js';
|
|
48
48
|
import * as RequestInitiatorView from './RequestInitiatorView.js';
|
|
49
|
+
import * as RequestPayloadView from './RequestPayloadView.js';
|
|
49
50
|
import * as RequestPreviewView from './RequestPreviewView.js';
|
|
50
51
|
import * as RequestResponseView from './RequestResponseView.js';
|
|
51
52
|
import * as RequestTimingView from './RequestTimingView.js';
|
|
@@ -72,6 +73,7 @@ export {
|
|
|
72
73
|
RequestHeadersView,
|
|
73
74
|
RequestHTMLView,
|
|
74
75
|
RequestInitiatorView,
|
|
76
|
+
RequestPayloadView,
|
|
75
77
|
RequestPreviewView,
|
|
76
78
|
RequestResponseView,
|
|
77
79
|
RequestTimingView,
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2016 The Chromium Authors. All rights reserved.
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.tree-outline {
|
|
8
|
+
padding-left: 0;
|
|
9
|
+
|
|
10
|
+
--override-error-background-color: #d93025;
|
|
11
|
+
--override-error-text-color: #fff;
|
|
12
|
+
--override-call-to-action-border-color: #f29900;
|
|
13
|
+
--override-header-highlight-background-color: #ffff78;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.-theme-with-dark-background .tree-outline,
|
|
17
|
+
:host-context(.-theme-with-dark-background) .tree-outline {
|
|
18
|
+
--override-error-text-color: #000;
|
|
19
|
+
--override-call-to-action-border-color: rgb(255 166 13);
|
|
20
|
+
--override-header-highlight-background-color: rgb(135 135 0);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.tree-outline > ol {
|
|
24
|
+
padding-bottom: 5px;
|
|
25
|
+
border-bottom: solid 1px var(--color-details-hairline);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.tree-outline > .parent {
|
|
29
|
+
user-select: none;
|
|
30
|
+
font-weight: bold;
|
|
31
|
+
color: var(--color-text-primary);
|
|
32
|
+
margin-top: -1px;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
height: 26px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tree-outline li {
|
|
39
|
+
display: block;
|
|
40
|
+
padding-left: 5px;
|
|
41
|
+
line-height: 20px;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tree-outline li:not(.parent) {
|
|
45
|
+
margin-left: 10px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tree-outline li:not(.parent)::before {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tree-outline li.expanded .payload-count {
|
|
53
|
+
display: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.tree-outline li .payload-toggle {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.tree-outline li.expanded .payload-toggle {
|
|
61
|
+
display: inline;
|
|
62
|
+
margin-left: 30px;
|
|
63
|
+
font-weight: normal;
|
|
64
|
+
color: var(--color-text-primary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.tree-outline li .header-toggle:hover {
|
|
68
|
+
color: var(--color-text-secondary);
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.tree-outline .payload-name {
|
|
73
|
+
color: var(--color-text-secondary);
|
|
74
|
+
display: inline-block;
|
|
75
|
+
margin-right: 0.25em;
|
|
76
|
+
font-weight: bold;
|
|
77
|
+
vertical-align: top;
|
|
78
|
+
white-space: pre-wrap;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.tree-outline .payload-separator {
|
|
82
|
+
user-select: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.tree-outline .payload-value {
|
|
86
|
+
display: inline;
|
|
87
|
+
margin-right: 1em;
|
|
88
|
+
white-space: pre-wrap;
|
|
89
|
+
word-break: break-all;
|
|
90
|
+
margin-top: 1px;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tree-outline .empty-request-payload {
|
|
94
|
+
color: var(--color-text-disabled);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.request-payload-show-more-button {
|
|
98
|
+
border: none;
|
|
99
|
+
border-radius: 3px;
|
|
100
|
+
display: inline-block;
|
|
101
|
+
font-size: 12px;
|
|
102
|
+
font-family: sans-serif;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
margin: 0 4px;
|
|
105
|
+
padding: 2px 4px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (forced-colors: active) {
|
|
109
|
+
:host-context(.request-payload-tree) ol.tree-outline:not(.hide-selection-when-blurred) li.selected:focus {
|
|
110
|
+
background: Highlight;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:host-context(.request-payload-tree) ol.tree-outline:not(.hide-selection-when-blurred) li::before {
|
|
114
|
+
background-color: ButtonText;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host-context(.request-payload-tree) ol.tree-outline:not(.hide-selection-when-blurred) li.selected.parent::before {
|
|
118
|
+
background-color: HighlightText;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
:host-context(.request-payload-tree) ol.tree-outline:not(.hide-selection-when-blurred) li.selected *,
|
|
122
|
+
:host-context(.request-payload-tree) ol.tree-outline:not(.hide-selection-when-blurred) li.selected.parent,
|
|
123
|
+
:host-context(.request-payload-tree) ol.tree-outline:not(.hide-selection-when-blurred) li.selected.parent span {
|
|
124
|
+
color: HighlightText;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.payload-decode-error {
|
|
129
|
+
color: var(--color-accent-red);
|
|
130
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.request-payload-view {
|
|
8
|
+
user-select: text;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.request-payload-tree {
|
|
13
|
+
flex-grow: 1;
|
|
14
|
+
overflow-y: auto;
|
|
15
|
+
margin: 0;
|
|
16
|
+
}
|
|
@@ -190,9 +190,9 @@ export class CPUProfileFlameChart extends UI.Widget.VBox implements UI.Searchabl
|
|
|
190
190
|
this.overviewPane.selectRange(timeLeft, timeRight);
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
onEntrySelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
193
|
+
onEntrySelected(event: Common.EventTarget.EventTargetEvent<void|number>): void {
|
|
194
194
|
if (event.data) {
|
|
195
|
-
const eventIndex =
|
|
195
|
+
const eventIndex = event.data;
|
|
196
196
|
this.mainPane.setSelectedEntry(eventIndex);
|
|
197
197
|
if (eventIndex === -1) {
|
|
198
198
|
this.entrySelected = false;
|
|
@@ -205,7 +205,7 @@ export class CPUProfileFlameChart extends UI.Widget.VBox implements UI.Searchabl
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
onEntryInvoked(event: Common.EventTarget.EventTargetEvent): void {
|
|
208
|
+
onEntryInvoked(event: Common.EventTarget.EventTargetEvent<number>): void {
|
|
209
209
|
this.onEntrySelected(event);
|
|
210
210
|
this.dispatchEventToListeners(PerfUI.FlameChart.Events.EntryInvoked, event.data);
|
|
211
211
|
}
|
|
@@ -66,7 +66,8 @@ const UIStrings = {
|
|
|
66
66
|
};
|
|
67
67
|
const str_ = i18n.i18n.registerUIStrings('panels/profiler/ProfileLauncherView.ts', UIStrings);
|
|
68
68
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
69
|
-
export class ProfileLauncherView extends UI.Widget.VBox
|
|
69
|
+
export class ProfileLauncherView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
70
|
+
UI.Widget.VBox) {
|
|
70
71
|
readonly panel: ProfilesPanel;
|
|
71
72
|
private contentElementInternal: HTMLElement;
|
|
72
73
|
readonly selectedProfileTypeSetting: Common.Settings.Setting<string>;
|
|
@@ -232,3 +233,7 @@ export class ProfileLauncherView extends UI.Widget.VBox {
|
|
|
232
233
|
export enum Events {
|
|
233
234
|
ProfileTypeSelected = 'ProfileTypeSelected',
|
|
234
235
|
}
|
|
236
|
+
|
|
237
|
+
export type EventTypes = {
|
|
238
|
+
[Events.ProfileTypeSelected]: ProfileType,
|
|
239
|
+
};
|
|
@@ -413,7 +413,7 @@ export class ProfileView extends UI.View.SimpleView implements UI.SearchableView
|
|
|
413
413
|
});
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
async onEntryInvoked(event: Common.EventTarget.EventTargetEvent): Promise<void> {
|
|
416
|
+
async onEntryInvoked(event: Common.EventTarget.EventTargetEvent<number>): Promise<void> {
|
|
417
417
|
if (!this.dataProvider) {
|
|
418
418
|
return;
|
|
419
419
|
}
|
|
@@ -282,8 +282,8 @@ export class ProfilesPanel extends UI.Panel.PanelWithSidebar implements DataDisp
|
|
|
282
282
|
this.launcherView.profileFinished();
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
onProfileTypeSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
286
|
-
this.selectedProfileType =
|
|
285
|
+
onProfileTypeSelected(event: Common.EventTarget.EventTargetEvent<ProfileType>): void {
|
|
286
|
+
this.selectedProfileType = event.data;
|
|
287
287
|
this.updateProfileTypeSpecificUI();
|
|
288
288
|
}
|
|
289
289
|
|
|
@@ -10,7 +10,7 @@ import type * as Workspace from '../../models/workspace/workspace.js';
|
|
|
10
10
|
import type * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
12
|
|
|
13
|
-
import type {EditorAction, SourcesView} from './SourcesView.js';
|
|
13
|
+
import type {EditorAction, EditorClosedEvent, SourcesView} from './SourcesView.js';
|
|
14
14
|
import {Events, registerEditorAction} from './SourcesView.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
@@ -45,13 +45,13 @@ export class InplaceFormatterEditorAction implements EditorAction {
|
|
|
45
45
|
return inplaceFormatterEditorActionInstance;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
private editorSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
49
|
-
const uiSourceCode =
|
|
48
|
+
private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
49
|
+
const uiSourceCode = event.data;
|
|
50
50
|
this.updateButton(uiSourceCode);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
private editorClosed(event: Common.EventTarget.EventTargetEvent): void {
|
|
54
|
-
const wasSelected =
|
|
53
|
+
private editorClosed(event: Common.EventTarget.EventTargetEvent<EditorClosedEvent>): void {
|
|
54
|
+
const {wasSelected} = event.data;
|
|
55
55
|
if (wasSelected) {
|
|
56
56
|
this.updateButton(null);
|
|
57
57
|
}
|
|
@@ -10,7 +10,7 @@ import * as Workspace from '../../models/workspace/workspace.js';
|
|
|
10
10
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
12
12
|
|
|
13
|
-
import type {EditorAction, SourcesView} from './SourcesView.js';
|
|
13
|
+
import type {EditorAction, EditorClosedEvent, SourcesView} from './SourcesView.js';
|
|
14
14
|
import {Events, registerEditorAction} from './SourcesView.js';
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
@@ -48,8 +48,8 @@ export class ScriptFormatterEditorAction implements EditorAction {
|
|
|
48
48
|
return scriptFormatterEditorActionInstance;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
private editorSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
52
|
-
const uiSourceCode =
|
|
51
|
+
private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
52
|
+
const uiSourceCode = event.data;
|
|
53
53
|
this.updateButton(uiSourceCode);
|
|
54
54
|
|
|
55
55
|
if (this.isFormattableScript(uiSourceCode) && this.pathsToFormatOnLoad.has(uiSourceCode.url()) &&
|
|
@@ -58,9 +58,8 @@ export class ScriptFormatterEditorAction implements EditorAction {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
private async editorClosed(event: Common.EventTarget.EventTargetEvent): Promise<void> {
|
|
62
|
-
const uiSourceCode =
|
|
63
|
-
const wasSelected = (event.data.wasSelected as boolean);
|
|
61
|
+
private async editorClosed(event: Common.EventTarget.EventTargetEvent<EditorClosedEvent>): Promise<void> {
|
|
62
|
+
const {uiSourceCode, wasSelected} = event.data;
|
|
64
63
|
|
|
65
64
|
if (wasSelected) {
|
|
66
65
|
this.updateButton(null);
|
|
@@ -643,8 +643,8 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
|
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
-
private editorSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
647
|
-
const uiSourceCode =
|
|
646
|
+
private editorSelected(event: Common.EventTarget.EventTargetEvent<Workspace.UISourceCode.UISourceCode>): void {
|
|
647
|
+
const uiSourceCode = event.data;
|
|
648
648
|
if (this.editorView.mainWidget() &&
|
|
649
649
|
Common.Settings.Settings.instance().moduleSetting('autoRevealInNavigator').get()) {
|
|
650
650
|
this.revealInNavigator(uiSourceCode, true);
|
|
@@ -1111,10 +1111,9 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
|
|
|
1111
1111
|
return;
|
|
1112
1112
|
}
|
|
1113
1113
|
const entry = items[0].webkitGetAsEntry();
|
|
1114
|
-
if (
|
|
1115
|
-
|
|
1114
|
+
if (entry && entry.isDirectory) {
|
|
1115
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.upgradeDraggedFileSystemPermissions(entry.filesystem);
|
|
1116
1116
|
}
|
|
1117
|
-
Host.InspectorFrontendHost.InspectorFrontendHostInstance.upgradeDraggedFileSystemPermissions(entry.filesystem);
|
|
1118
1117
|
}
|
|
1119
1118
|
}
|
|
1120
1119
|
|
|
@@ -40,8 +40,8 @@ const UIStrings = {
|
|
|
40
40
|
const str_ = i18n.i18n.registerUIStrings('panels/sources/SourcesView.ts', UIStrings);
|
|
41
41
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
42
42
|
|
|
43
|
-
export class SourcesView extends UI.Widget.VBox
|
|
44
|
-
|
|
43
|
+
export class SourcesView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
44
|
+
implements TabbedEditorContainerDelegate, UI.SearchableView.Searchable, UI.SearchableView.Replaceable {
|
|
45
45
|
private placeholderOptionArray: {
|
|
46
46
|
element: HTMLElement,
|
|
47
47
|
handler: Function,
|
|
@@ -446,7 +446,10 @@ export class SourcesView extends UI.Widget.VBox implements TabbedEditorContainer
|
|
|
446
446
|
this.updateToolbarChangedListener();
|
|
447
447
|
this.updateScriptViewToolbarItems();
|
|
448
448
|
|
|
449
|
-
|
|
449
|
+
const currentFile = this.editorContainer.currentFile();
|
|
450
|
+
if (currentFile) {
|
|
451
|
+
this.dispatchEventToListeners(Events.EditorSelected, currentFile);
|
|
452
|
+
}
|
|
450
453
|
}
|
|
451
454
|
|
|
452
455
|
private removeToolbarChangedListener(): void {
|
|
@@ -581,6 +584,16 @@ export // TODO(crbug.com/1167717): Make this a const enum again
|
|
|
581
584
|
EditorSelected = 'EditorSelected',
|
|
582
585
|
}
|
|
583
586
|
|
|
587
|
+
export interface EditorClosedEvent {
|
|
588
|
+
uiSourceCode: Workspace.UISourceCode.UISourceCode;
|
|
589
|
+
wasSelected: boolean;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
export type EventTypes = {
|
|
593
|
+
[Events.EditorClosed]: EditorClosedEvent,
|
|
594
|
+
[Events.EditorSelected]: Workspace.UISourceCode.UISourceCode,
|
|
595
|
+
};
|
|
596
|
+
|
|
584
597
|
/**
|
|
585
598
|
* @interface
|
|
586
599
|
*/
|
|
@@ -51,7 +51,9 @@ import {ScriptOriginPlugin} from './ScriptOriginPlugin.js';
|
|
|
51
51
|
import {SnippetsPlugin} from './SnippetsPlugin.js';
|
|
52
52
|
import {SourcesPanel} from './SourcesPanel.js';
|
|
53
53
|
|
|
54
|
-
export class UISourceCodeFrame extends
|
|
54
|
+
export class UISourceCodeFrame extends
|
|
55
|
+
Common.ObjectWrapper.eventMixin<EventTypes, typeof SourceFrame.SourceFrame.SourceFrameImpl>(
|
|
56
|
+
SourceFrame.SourceFrame.SourceFrameImpl) {
|
|
55
57
|
private uiSourceCodeInternal: Workspace.UISourceCode.UISourceCode;
|
|
56
58
|
private readonly diff: SourceFrame.SourceCodeDiff.SourceCodeDiff|undefined;
|
|
57
59
|
private muteSourceCodeEvents: boolean;
|
|
@@ -919,3 +921,7 @@ function messageLevelComparator(a: Workspace.UISourceCode.Message, b: Workspace.
|
|
|
919
921
|
export enum Events {
|
|
920
922
|
ToolbarItemsChanged = 'ToolbarItemsChanged',
|
|
921
923
|
}
|
|
924
|
+
|
|
925
|
+
export type EventTypes = {
|
|
926
|
+
[Events.ToolbarItemsChanged]: void,
|
|
927
|
+
};
|
|
@@ -7,17 +7,12 @@
|
|
|
7
7
|
.watch-expression-delete-button {
|
|
8
8
|
position: absolute;
|
|
9
9
|
top: 5px;
|
|
10
|
-
right:
|
|
10
|
+
right: 16px;
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
opacity: 0%;
|
|
13
|
-
min-width: 20px;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
.watch-expression-header:hover .watch-expression-delete-button {
|
|
17
|
-
opacity: 50%;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.watch-expression-header:hover .watch-expression-delete-button:hover {
|
|
21
16
|
opacity: 100%;
|
|
22
17
|
}
|
|
23
18
|
|
|
@@ -101,7 +96,7 @@ li.watch-expression-tree-item {
|
|
|
101
96
|
}
|
|
102
97
|
|
|
103
98
|
li.watch-expression-tree-item:hover {
|
|
104
|
-
background-color: var(--color-background-elevation-
|
|
99
|
+
background-color: var(--color-background-elevation-1);
|
|
105
100
|
}
|
|
106
101
|
|
|
107
102
|
.watch-expression-header:focus-visible {
|