chrome-devtools-frontend 1.0.1690116 → 1.0.1690531
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/.gitmodules +4 -0
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/NetworkRequest.ts +50 -4
- package/front_end/core/sdk/NetworkRequestAccess.ts +172 -0
- package/front_end/core/sdk/SecurityOrigin.ts +25 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/generated/SupportedCSSProperties.ts +1 -1
- package/front_end/models/ai_assistance/AiAgent2.ts +4 -1
- package/front_end/models/ai_assistance/AiConversation.ts +29 -18
- package/front_end/panels/ai_assistance/components/chatMessage.css +3 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +1 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +2 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +1 -1
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +1 -1
- package/front_end/panels/application/components/TrustTokensView.ts +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +2 -1
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +2 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/common/CPUThrottlingOption.ts +12 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionView.ts +2 -1
- package/front_end/panels/console/ConsolePinPane.ts +4 -2
- package/front_end/panels/console/ConsoleSidebar.ts +6 -2
- package/front_end/panels/console/PromptBuilder.ts +1 -1
- package/front_end/panels/coverage/CoverageListView.ts +1 -1
- package/front_end/panels/coverage/CoverageModel.ts +6 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -9
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +3 -3
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +4 -3
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/MetricsSidebarPane.ts +1 -1
- package/front_end/panels/elements/PropertyNameCategories.ts +1 -1
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -1
- package/front_end/panels/elements/StandaloneStylesContainer.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +3 -2
- package/front_end/panels/elements/components/StylePropertyEditor.ts +160 -148
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -1
- package/front_end/panels/issues/AffectedLazyLoadImagesView.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +2 -2
- package/front_end/panels/linear_memory_inspector/components/linearMemoryNavigator.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +5 -5
- package/front_end/panels/linear_memory_inspector/components/linearMemoryViewer.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +6 -6
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterSettings.css +2 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +11 -9
- package/front_end/panels/network/NetworkLogView.ts +4 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +1 -1
- package/front_end/panels/network/RequestResponseView.ts +1 -1
- package/front_end/panels/network/RequestTimingView.ts +1 -1
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +1 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/sources/BreakpointEditDialog.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +8 -6
- package/front_end/panels/sources/ProfilePlugin.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/timeline/IsolateSelector.ts +1 -1
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/NetworkTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineHistoryManager.ts +1 -1
- package/front_end/panels/timeline/TimelinePaintProfilerView.ts +7 -3
- package/front_end/panels/timeline/TimelinePanel.ts +3 -3
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +4 -4
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +25 -24
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +4 -3
- package/front_end/panels/timeline/components/Sidebar.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +4 -3
- package/front_end/panels/timeline/utils/Helpers.ts +1 -1
- package/front_end/panels/timeline/utils/ImageCache.ts +5 -3
- package/front_end/panels/web_audio/WebAudioView.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +5 -11
- package/front_end/third_party/acorn/acorn.ts +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/chromium/ahem/ahem.d.ts +1 -0
- package/front_end/third_party/csp_evaluator/package/csp.ts +4 -4
- package/front_end/third_party/csp_evaluator/package/parser.ts +3 -1
- package/front_end/third_party/csp_evaluator/package/utils.ts +1 -1
- package/front_end/third_party/diff/diff_match_patch.d.ts +10 -0
- package/front_end/third_party/json5/json5.ts +2 -2
- package/front_end/ui/components/buttons/floatingButton.css +25 -0
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +45 -25
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/DropTarget.ts +6 -1
- package/front_end/ui/legacy/EmptyWidget.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +2 -2
- package/front_end/ui/legacy/SplitWidget.ts +2 -1
- package/front_end/ui/legacy/StackedPane.ts +1 -1
- package/front_end/ui/legacy/TargetCrashedScreen.ts +1 -1
- package/front_end/ui/legacy/TextPrompt.ts +2 -1
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/Treeoutline.ts +13 -37
- package/front_end/ui/legacy/UIUtils.ts +6 -3
- package/front_end/ui/legacy/ViewManager.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +7 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +3 -2
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingModel.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +48 -44
- package/front_end/ui/legacy/components/inline_editor/CSSAngleUtils.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +141 -106
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +10 -10
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +7 -5
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +8 -5
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +1 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +5 -5
- package/front_end/ui/legacy/inspectorCommon.css +11 -0
- package/front_end/ui/visual_logging/Debugging.ts +2 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -1
- package/front_end/ui/visual_logging/LoggingDriver.ts +3 -3
- package/front_end/ui/visual_logging/LoggingEvents.ts +5 -5
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/visual_logging.ts +67 -56
- package/package.json +2 -1
- package/front_end/third_party/acorn/acorn-tsconfig.json +0 -12
- package/front_end/third_party/acorn/estree-tsconfig.json +0 -8
- package/front_end/third_party/chromium/client-variations/client-variations-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-legacy-types-tsconfig.json +0 -8
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +0 -15
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +0 -24
- package/front_end/third_party/intl-messageformat/intl-messageformat-tsconfig.json +0 -16
- package/front_end/third_party/json5/json5-tsconfig.json +0 -8
- package/front_end/third_party/legacy-javascript/legacy-javascript-tsconfig.json +0 -8
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +0 -11
- package/front_end/third_party/lighthouse/report/bundle-tsconfig.json +0 -8
- package/front_end/third_party/lit/lit-tsconfig.json +0 -15
- package/front_end/third_party/marked/marked-tsconfig.json +0 -8
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +0 -191
- package/front_end/third_party/third-party-web/third-party-web-tsconfig.json +0 -8
- package/front_end/third_party/wasmparser/wasmparser-tsconfig.json +0 -9
- package/front_end/third_party/web-vitals/web-vitals-tsconfig.json +0 -47
|
@@ -189,7 +189,7 @@ export class CoverageListView extends UI.Widget.VBox {
|
|
|
189
189
|
#expandedUrls = new Set<Platform.DevToolsPath.UrlString>();
|
|
190
190
|
#view: View;
|
|
191
191
|
|
|
192
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
192
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
193
193
|
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
194
194
|
this.#view = view;
|
|
195
195
|
this.#highlightRegExp = null;
|
|
@@ -690,7 +690,8 @@ export class URLCoverageInfo extends Common.ObjectWrapper.ObjectWrapper<URLCover
|
|
|
690
690
|
#usedSize: number;
|
|
691
691
|
#type!: CoverageType;
|
|
692
692
|
#isContentScript: boolean;
|
|
693
|
-
sourcesURLCoverageInfo
|
|
693
|
+
sourcesURLCoverageInfo: Map<Platform.DevToolsPath.UrlString, SourceURLCoverageInfo> =
|
|
694
|
+
new Map<Platform.DevToolsPath.UrlString, SourceURLCoverageInfo>();
|
|
694
695
|
sourceSegments: SourceSegment[]|undefined;
|
|
695
696
|
|
|
696
697
|
constructor(url: Platform.DevToolsPath.UrlString) {
|
|
@@ -938,9 +939,10 @@ export class CoverageInfo {
|
|
|
938
939
|
private coverageType: CoverageType;
|
|
939
940
|
private segments: CoverageSegment[];
|
|
940
941
|
private generatedUrlCoverageInfo: URLCoverageInfo;
|
|
941
|
-
sourceUsedSizeMap = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
942
|
-
sourceDeltaMap = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
943
|
-
sourceUsedRangeMap
|
|
942
|
+
sourceUsedSizeMap: Map<Platform.DevToolsPath.UrlString, number> = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
943
|
+
sourceDeltaMap: Map<Platform.DevToolsPath.UrlString, number> = new Map<Platform.DevToolsPath.UrlString, number>();
|
|
944
|
+
sourceUsedRangeMap: Map<Platform.DevToolsPath.UrlString, RangeOffset[]> =
|
|
945
|
+
new Map<Platform.DevToolsPath.UrlString, RangeOffset[]>();
|
|
944
946
|
|
|
945
947
|
constructor(
|
|
946
948
|
contentProvider: TextUtils.ContentProvider.ContentProvider, size: number, lineOffset: number,
|
|
@@ -219,7 +219,7 @@ export interface OverviewData {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
export type FontInfo = Map<string, Map<string, Map<string, number[]>>>;
|
|
222
|
-
interface FontMetric {
|
|
222
|
+
export interface FontMetric {
|
|
223
223
|
label: string;
|
|
224
224
|
values: Array<{title: string, nodes: number[]}>;
|
|
225
225
|
}
|
|
@@ -236,7 +236,7 @@ function getBorderString(color: Common.Color.Color): string {
|
|
|
236
236
|
return `1px solid hsl(${h}deg ${s}% ${l}%)`;
|
|
237
237
|
}
|
|
238
238
|
|
|
239
|
-
interface ViewInput {
|
|
239
|
+
export interface ViewInput {
|
|
240
240
|
elementCount: number;
|
|
241
241
|
backgroundColors: string[];
|
|
242
242
|
textColors: string[];
|
|
@@ -253,7 +253,7 @@ interface ViewInput {
|
|
|
253
253
|
onReset: () => void;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
interface ViewOutput {
|
|
256
|
+
export interface ViewOutput {
|
|
257
257
|
revealSection: Map<string, (setFocus: boolean) => void>;
|
|
258
258
|
closeAllTabs: () => void;
|
|
259
259
|
addTab: (id: string, tabTitle: string, view: UI.Widget.Widget, jslogContext: string) => void;
|
|
@@ -261,7 +261,7 @@ interface ViewOutput {
|
|
|
261
261
|
|
|
262
262
|
const formatter = new Intl.NumberFormat('en-US');
|
|
263
263
|
|
|
264
|
-
type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
264
|
+
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
265
265
|
|
|
266
266
|
export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
267
267
|
function revealSection(section: Element|undefined, setFocus: boolean): void {
|
|
@@ -541,7 +541,7 @@ function renderColor(section: string, color: string): LitTemplate {
|
|
|
541
541
|
// clang-format on
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
type PopulateNodesEvent = {
|
|
544
|
+
export type PopulateNodesEvent = {
|
|
545
545
|
type: 'contrast',
|
|
546
546
|
key: string,
|
|
547
547
|
section: string|undefined,
|
|
@@ -583,7 +583,7 @@ export class CSSOverviewCompletedView extends UI.Widget.VBox {
|
|
|
583
583
|
addTab: (_id, _tabTitle, _view, _jslogContext) => {},
|
|
584
584
|
};
|
|
585
585
|
|
|
586
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
586
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
587
587
|
super(element);
|
|
588
588
|
this.#view = view;
|
|
589
589
|
this.registerRequiredCSS(cssOverviewCompletedViewStyles);
|
|
@@ -879,10 +879,10 @@ export class CSSOverviewCompletedView extends UI.Widget.VBox {
|
|
|
879
879
|
this.requestUpdate();
|
|
880
880
|
}
|
|
881
881
|
|
|
882
|
-
static readonly pushedNodes = new Set<Protocol.DOM.BackendNodeId>();
|
|
882
|
+
static readonly pushedNodes: Set<Protocol.DOM.BackendNodeId> = new Set<Protocol.DOM.BackendNodeId>();
|
|
883
883
|
}
|
|
884
884
|
|
|
885
|
-
interface ElementDetailsViewInput {
|
|
885
|
+
export interface ElementDetailsViewInput {
|
|
886
886
|
items: Array<{
|
|
887
887
|
data: PopulateNodesEventNodeTypes,
|
|
888
888
|
link?: LitTemplate,
|
|
@@ -890,7 +890,7 @@ interface ElementDetailsViewInput {
|
|
|
890
890
|
}>;
|
|
891
891
|
visibility: Set<string>;
|
|
892
892
|
}
|
|
893
|
-
type ElementDetailsViewFunction = (input: ElementDetailsViewInput, output: object, target: HTMLElement) => void;
|
|
893
|
+
export type ElementDetailsViewFunction = (input: ElementDetailsViewInput, output: object, target: HTMLElement) => void;
|
|
894
894
|
|
|
895
895
|
export const ELEMENT_DETAILS_DEFAULT_VIEW: ElementDetailsViewFunction = (input, _output, target) => {
|
|
896
896
|
const {items, visibility} = input;
|
|
@@ -16,7 +16,7 @@ import type {UnusedDeclaration} from './CSSOverviewUnusedDeclarations.js';
|
|
|
16
16
|
|
|
17
17
|
const {widget} = UI.Widget;
|
|
18
18
|
|
|
19
|
-
interface ViewInput {
|
|
19
|
+
export interface ViewInput {
|
|
20
20
|
state: 'start'|'processing'|'completed';
|
|
21
21
|
onStartCapture: () => void;
|
|
22
22
|
onCancel: () => void;
|
|
@@ -25,7 +25,7 @@ interface ViewInput {
|
|
|
25
25
|
target?: SDK.Target.Target;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
28
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
29
29
|
|
|
30
30
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
31
31
|
render(
|
|
@@ -55,7 +55,7 @@ export class CSSOverviewPanel extends UI.Panel.Panel implements SDK.TargetManage
|
|
|
55
55
|
#state!: 'start'|'processing'|'completed';
|
|
56
56
|
#view: View;
|
|
57
57
|
|
|
58
|
-
constructor(view = DEFAULT_VIEW) {
|
|
58
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
59
59
|
super('css-overview');
|
|
60
60
|
this.#currentUrl = SDK.TargetManager.TargetManager.instance().inspectedURL();
|
|
61
61
|
SDK.TargetManager.TargetManager.instance().addEventListener(
|
|
@@ -18,11 +18,11 @@ const UIStrings = {
|
|
|
18
18
|
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewProcessingView.ts', UIStrings);
|
|
19
19
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
|
-
interface ViewInput {
|
|
21
|
+
export interface ViewInput {
|
|
22
22
|
onCancel: () => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
25
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
26
26
|
|
|
27
27
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
28
28
|
// clang-format off
|
|
@@ -27,14 +27,14 @@ const UIStrings = {
|
|
|
27
27
|
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewSidebarPanel.ts', UIStrings);
|
|
28
28
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
29
29
|
|
|
30
|
-
interface ViewInput {
|
|
30
|
+
export interface ViewInput {
|
|
31
31
|
items: Array<{name: string, id: string}>;
|
|
32
32
|
selectedId?: string;
|
|
33
33
|
onReset: () => void;
|
|
34
34
|
onItemClick: (id: string) => void;
|
|
35
35
|
onItemKeyDown: (id: string, key: string) => void;
|
|
36
36
|
}
|
|
37
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
37
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
38
38
|
|
|
39
39
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
40
40
|
const onClick = (event: Event): void => {
|
|
@@ -94,7 +94,7 @@ export class CSSOverviewSidebarPanel extends UI.Widget.VBox {
|
|
|
94
94
|
#onItemSelected = (_id: string, _shouldFocus: boolean): void => {};
|
|
95
95
|
#onReset = (): void => {};
|
|
96
96
|
|
|
97
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
97
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
98
98
|
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
99
99
|
this.#view = view;
|
|
100
100
|
}
|
|
@@ -46,11 +46,11 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
46
46
|
const FEEDBACK_LINK = 'https://g.co/devtools/css-overview-feedback' as Platform.DevToolsPath.UrlString;
|
|
47
47
|
const DOC_LINK = 'https://developer.chrome.com/docs/devtools/css-overview' as Platform.DevToolsPath.UrlString;
|
|
48
48
|
|
|
49
|
-
interface ViewInput {
|
|
49
|
+
export interface ViewInput {
|
|
50
50
|
onStartCapture: () => void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
53
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement) => void;
|
|
54
54
|
|
|
55
55
|
const DEFAULT_VIEW: View = (input, output, target) => {
|
|
56
56
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
@@ -93,7 +93,7 @@ export class CSSOverviewStartView extends UI.Widget.Widget {
|
|
|
93
93
|
#view: View;
|
|
94
94
|
onStartCapture = (): void => {};
|
|
95
95
|
|
|
96
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
96
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
97
97
|
super(element, {useShadowDom: true, delegatesFocus: true});
|
|
98
98
|
this.#view = view;
|
|
99
99
|
this.performUpdate();
|
|
@@ -183,7 +183,7 @@ export class DeveloperResourcesListView extends UI.Widget.VBox {
|
|
|
183
183
|
#onSelect: ((item: SDK.PageResourceLoader.PageResource|null) => void)|null = null;
|
|
184
184
|
readonly #view: View;
|
|
185
185
|
#filters: TextUtils.TextUtils.ParsedFilter[] = [];
|
|
186
|
-
constructor(element: HTMLElement, view = DEFAULT_VIEW) {
|
|
186
|
+
constructor(element: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
187
187
|
super(element, {useShadowDom: true});
|
|
188
188
|
this.#view = view;
|
|
189
189
|
}
|
|
@@ -344,7 +344,7 @@ export class ComputedStyleWidget extends UI.Widget.VBox {
|
|
|
344
344
|
#filterIsRegex = false;
|
|
345
345
|
#allowUserControl = true;
|
|
346
346
|
|
|
347
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
347
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
348
348
|
super(element, {useShadowDom: true});
|
|
349
349
|
this.#view = view;
|
|
350
350
|
|
|
@@ -1110,7 +1110,8 @@ export interface InitialEditState {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
|
|
1112
1112
|
export class ElementsTreeWidget extends UI.Widget.Widget {
|
|
1113
|
-
static override readonly INJECT
|
|
1113
|
+
static override readonly INJECT: readonly[typeof IssuesManager.DOMIssuesManager.DOMIssuesManager] =
|
|
1114
|
+
[IssuesManager.DOMIssuesManager.DOMIssuesManager] as const;
|
|
1114
1115
|
#domIssuesManager?: IssuesManager.DOMIssuesManager.DOMIssuesManager;
|
|
1115
1116
|
|
|
1116
1117
|
#node!: SDK.DOMModel.DOMNode;
|
|
@@ -3203,13 +3204,13 @@ export const InitialChildrenLimit = 500;
|
|
|
3203
3204
|
* A union of HTML4 and HTML5-Draft elements that explicitly
|
|
3204
3205
|
* or implicitly (for HTML5) forbid the closing tag.
|
|
3205
3206
|
**/
|
|
3206
|
-
export const ForbiddenClosingTagElements = new Set<string>([
|
|
3207
|
+
export const ForbiddenClosingTagElements: Set<string> = new Set<string>([
|
|
3207
3208
|
'area', 'base', 'basefont', 'br', 'canvas', 'col', 'command', 'embed', 'frame', 'hr',
|
|
3208
3209
|
'img', 'input', 'keygen', 'link', 'menuitem', 'meta', 'param', 'source', 'track', 'wbr',
|
|
3209
3210
|
]);
|
|
3210
3211
|
|
|
3211
3212
|
/** These tags we do not allow editing their tag name. **/
|
|
3212
|
-
export const EditTagBlocklist = new Set<string>(['html', 'head', 'body']);
|
|
3213
|
+
export const EditTagBlocklist: Set<string> = new Set<string>(['html', 'head', 'body']);
|
|
3213
3214
|
|
|
3214
3215
|
export function convertUnicodeCharsToHTMLEntities(text: string): {
|
|
3215
3216
|
text: string,
|
|
@@ -1513,7 +1513,7 @@ export class DOMTreeWidget extends UI.Widget.Widget {
|
|
|
1513
1513
|
this.setExpandedChildrenLimit(node, Math.max(visibleChildren.length, currentLimit + InitialChildrenLimit));
|
|
1514
1514
|
}
|
|
1515
1515
|
|
|
1516
|
-
async expandRecursively(node: SDK.DOMModel.DOMNode, maxDepth = Number.MAX_VALUE): Promise<void> {
|
|
1516
|
+
async expandRecursively(node: SDK.DOMModel.DOMNode, maxDepth: number = Number.MAX_VALUE): Promise<void> {
|
|
1517
1517
|
if (this.#view === DECLARATIVE_VIEW) {
|
|
1518
1518
|
await node.getSubtree(100, true);
|
|
1519
1519
|
const expand = async(n: SDK.DOMModel.DOMNode, depth: number): Promise<void> => {
|
|
@@ -3816,7 +3816,7 @@ export namespace ElementsTreeOutline {
|
|
|
3816
3816
|
}
|
|
3817
3817
|
|
|
3818
3818
|
// clang-format off
|
|
3819
|
-
export const MappedCharToEntity = new Map<string, string>([
|
|
3819
|
+
export const MappedCharToEntity: Map<string, string> = new Map<string, string>([
|
|
3820
3820
|
['\xA0', 'nbsp'],
|
|
3821
3821
|
['\xAD', 'shy'],
|
|
3822
3822
|
['\u2002', 'ensp'],
|
|
@@ -193,7 +193,7 @@ export class MetricsSidebarPane extends ElementsSidebarPane<ShadowRoot> {
|
|
|
193
193
|
private isEditingMetrics?: boolean;
|
|
194
194
|
private view: View;
|
|
195
195
|
|
|
196
|
-
constructor(computedStyleModel: ComputedStyle.ComputedStyleModel.ComputedStyleModel, view = DEFAULT_VIEW) {
|
|
196
|
+
constructor(computedStyleModel: ComputedStyle.ComputedStyleModel.ComputedStyleModel, view: View = DEFAULT_VIEW) {
|
|
197
197
|
super(computedStyleModel, {useShadowDom: 'pure'});
|
|
198
198
|
this.registerRequiredCSS(metricsSidebarPaneStyles);
|
|
199
199
|
|
|
@@ -89,7 +89,8 @@ export class ShortcutTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
89
89
|
#hovered?: boolean;
|
|
90
90
|
#view: typeof DEFAULT_VIEW;
|
|
91
91
|
|
|
92
|
-
constructor(nodeShortcut: SDK.DOMModel.DOMNodeShortcut,
|
|
92
|
+
constructor(nodeShortcut: SDK.DOMModel.DOMNodeShortcut,
|
|
93
|
+
view: (input: ViewInput, _output: undefined, target: HTMLElement) => void = DEFAULT_VIEW) {
|
|
93
94
|
super('');
|
|
94
95
|
this.nodeShortcut = nodeShortcut;
|
|
95
96
|
this.#view = view;
|
|
@@ -55,7 +55,7 @@ const StandaloneStylesContainerBase: Common.ObjectWrapper.EventMixin<EventTypes,
|
|
|
55
55
|
export class StandaloneStylesContainer extends StandaloneStylesContainerBase implements StylesContainer {
|
|
56
56
|
activeCSSAngle: InlineEditor.CSSAngle.CSSAngle|null = null;
|
|
57
57
|
isEditingStyle = false;
|
|
58
|
-
readonly sectionByElement = new WeakMap<Node, StylePropertiesSection>();
|
|
58
|
+
readonly sectionByElement: WeakMap<Node, StylePropertiesSection> = new WeakMap<Node, StylePropertiesSection>();
|
|
59
59
|
// TODO: Reference the MAX_LINK_LENGTH from StylesSidebarPane at a later stage, when we have a reference to it.
|
|
60
60
|
readonly linkifier: Components.Linkifier.Linkifier =
|
|
61
61
|
new Components.Linkifier.Linkifier(23, /* useLinkDecorator */ true);
|
|
@@ -191,7 +191,7 @@ export class StylePropertiesSection {
|
|
|
191
191
|
readonly #specificityTooltips: HTMLSpanElement;
|
|
192
192
|
static #nextSpecificityTooltipId = 0;
|
|
193
193
|
static #nextSectionTooltipIdPrefix = 0;
|
|
194
|
-
readonly sectionTooltipIdPrefix = StylePropertiesSection.#nextSectionTooltipIdPrefix++;
|
|
194
|
+
readonly sectionTooltipIdPrefix: number = StylePropertiesSection.#nextSectionTooltipIdPrefix++;
|
|
195
195
|
|
|
196
196
|
private ghostStyleTreeElements: GhostStylePropertyTreeElement[] = [];
|
|
197
197
|
#activeAiSuggestion?: ActiveAiSuggestion;
|
|
@@ -199,9 +199,10 @@ export class StylesSidebarPane extends StylesSidebarPaneBase implements StylesCo
|
|
|
199
199
|
private visibleSections: number|null = null;
|
|
200
200
|
private noMatchesElement: HTMLElement;
|
|
201
201
|
private sectionsContainer: UI.Widget.Widget;
|
|
202
|
-
sectionByElement = new WeakMap<Node, StylePropertiesSection>();
|
|
202
|
+
sectionByElement: WeakMap<Node, StylePropertiesSection> = new WeakMap<Node, StylePropertiesSection>();
|
|
203
203
|
readonly #swatchPopoverHelper = new InlineEditor.SwatchPopoverHelper.SwatchPopoverHelper();
|
|
204
|
-
readonly linkifier
|
|
204
|
+
readonly linkifier: Components.Linkifier.Linkifier =
|
|
205
|
+
new Components.Linkifier.Linkifier(MAX_LINK_LENGTH, /* useLinkDecorator */ true);
|
|
205
206
|
|
|
206
207
|
private readonly decorator: StylePropertyHighlighter;
|
|
207
208
|
|
|
@@ -290,151 +290,163 @@ declare global {
|
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
export const FlexboxEditableProperties
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
293
|
+
export const FlexboxEditableProperties: Array<{
|
|
294
|
+
propertyName: string,
|
|
295
|
+
propertyValues: string[],
|
|
296
|
+
}> =
|
|
297
|
+
[
|
|
298
|
+
{
|
|
299
|
+
propertyName: 'flex-direction',
|
|
300
|
+
propertyValues: [
|
|
301
|
+
'row',
|
|
302
|
+
'column',
|
|
303
|
+
'row-reverse',
|
|
304
|
+
'column-reverse',
|
|
305
|
+
],
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
propertyName: 'flex-wrap',
|
|
309
|
+
propertyValues: [
|
|
310
|
+
'nowrap',
|
|
311
|
+
'wrap',
|
|
312
|
+
],
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
propertyName: 'align-content',
|
|
316
|
+
propertyValues: [
|
|
317
|
+
'center',
|
|
318
|
+
'flex-start',
|
|
319
|
+
'flex-end',
|
|
320
|
+
'space-around',
|
|
321
|
+
'space-between',
|
|
322
|
+
'stretch',
|
|
323
|
+
],
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
propertyName: 'justify-content',
|
|
327
|
+
propertyValues: [
|
|
328
|
+
'center',
|
|
329
|
+
'flex-start',
|
|
330
|
+
'flex-end',
|
|
331
|
+
'space-between',
|
|
332
|
+
'space-around',
|
|
333
|
+
'space-evenly',
|
|
334
|
+
],
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
propertyName: 'align-items',
|
|
338
|
+
propertyValues: [
|
|
339
|
+
'center',
|
|
340
|
+
'flex-start',
|
|
341
|
+
'flex-end',
|
|
342
|
+
'stretch',
|
|
343
|
+
'baseline',
|
|
344
|
+
],
|
|
345
|
+
},
|
|
346
|
+
];
|
|
347
|
+
|
|
348
|
+
export const GridEditableProperties: Array<{
|
|
349
|
+
propertyName: string,
|
|
350
|
+
propertyValues: string[],
|
|
351
|
+
}> =
|
|
352
|
+
[
|
|
353
|
+
{
|
|
354
|
+
propertyName: 'grid-auto-flow',
|
|
355
|
+
propertyValues: [
|
|
356
|
+
'row',
|
|
357
|
+
'column',
|
|
358
|
+
],
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
propertyName: 'align-content',
|
|
362
|
+
propertyValues: [
|
|
363
|
+
'center',
|
|
364
|
+
'start',
|
|
365
|
+
'end',
|
|
366
|
+
'space-between',
|
|
367
|
+
'space-around',
|
|
368
|
+
'space-evenly',
|
|
369
|
+
'stretch',
|
|
370
|
+
],
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
propertyName: 'justify-content',
|
|
374
|
+
propertyValues: [
|
|
375
|
+
'center',
|
|
376
|
+
'start',
|
|
377
|
+
'end',
|
|
378
|
+
'space-between',
|
|
379
|
+
'space-around',
|
|
380
|
+
'space-evenly',
|
|
381
|
+
'stretch',
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
propertyName: 'align-items',
|
|
386
|
+
propertyValues: [
|
|
387
|
+
'center',
|
|
388
|
+
'start',
|
|
389
|
+
'end',
|
|
390
|
+
'stretch',
|
|
391
|
+
'baseline',
|
|
392
|
+
],
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
propertyName: 'justify-items',
|
|
396
|
+
propertyValues: [
|
|
397
|
+
'center',
|
|
398
|
+
'start',
|
|
399
|
+
'end',
|
|
400
|
+
'stretch',
|
|
401
|
+
],
|
|
402
|
+
},
|
|
403
|
+
];
|
|
404
|
+
|
|
405
|
+
export const GridLanesEditableProperties: Array<{
|
|
406
|
+
propertyName: string,
|
|
407
|
+
propertyValues: string[],
|
|
408
|
+
}> =
|
|
409
|
+
[
|
|
410
|
+
{
|
|
411
|
+
propertyName: 'align-content',
|
|
412
|
+
propertyValues: [
|
|
413
|
+
'center',
|
|
414
|
+
'start',
|
|
415
|
+
'end',
|
|
416
|
+
'space-between',
|
|
417
|
+
'space-around',
|
|
418
|
+
'space-evenly',
|
|
419
|
+
'stretch',
|
|
420
|
+
],
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
propertyName: 'justify-content',
|
|
424
|
+
propertyValues: [
|
|
425
|
+
'center',
|
|
426
|
+
'start',
|
|
427
|
+
'end',
|
|
428
|
+
'space-between',
|
|
429
|
+
'space-around',
|
|
430
|
+
'space-evenly',
|
|
431
|
+
'stretch',
|
|
432
|
+
],
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
propertyName: 'align-items',
|
|
436
|
+
propertyValues: [
|
|
437
|
+
'center',
|
|
438
|
+
'start',
|
|
439
|
+
'end',
|
|
440
|
+
'stretch',
|
|
441
|
+
],
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
propertyName: 'justify-items',
|
|
445
|
+
propertyValues: [
|
|
446
|
+
'center',
|
|
447
|
+
'start',
|
|
448
|
+
'end',
|
|
449
|
+
'stretch',
|
|
450
|
+
],
|
|
451
|
+
},
|
|
452
|
+
];
|
|
@@ -165,7 +165,8 @@ export class MediaQueryInspector extends UI.Widget.Widget<ShadowRoot> implements
|
|
|
165
165
|
private cssModel?: SDK.CSSModel.CSSModel;
|
|
166
166
|
private cachedQueryModels?: MediaQueryUIModel[];
|
|
167
167
|
|
|
168
|
-
constructor(element?: HTMLElement,
|
|
168
|
+
constructor(element?: HTMLElement,
|
|
169
|
+
view: (input: ViewInput, _output: object, target: DocumentFragment) => void = DEFAULT_VIEW) {
|
|
169
170
|
super(element, {useShadowDom: 'pure'});
|
|
170
171
|
this.view = view;
|
|
171
172
|
this.#scale = 1;
|