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
|
@@ -59,7 +59,7 @@ export const enum SidebarTabs {
|
|
|
59
59
|
INSIGHTS = 'insights',
|
|
60
60
|
ANNOTATIONS = 'annotations',
|
|
61
61
|
}
|
|
62
|
-
export const DEFAULT_SIDEBAR_TAB = SidebarTabs.INSIGHTS;
|
|
62
|
+
export const DEFAULT_SIDEBAR_TAB: SidebarTabs = SidebarTabs.INSIGHTS;
|
|
63
63
|
|
|
64
64
|
export const DEFAULT_SIDEBAR_WIDTH_PX = 240;
|
|
65
65
|
const MIN_SIDEBAR_WIDTH_PX = 170;
|
|
@@ -100,6 +100,7 @@ export interface SidebarAnnotationsTabViewInput {
|
|
|
100
100
|
onAnnotationHoverOut: () => void;
|
|
101
101
|
onAnnotationDelete: (annotation: Trace.Types.File.Annotation) => void;
|
|
102
102
|
}
|
|
103
|
+
export type View = (input: SidebarAnnotationsTabViewInput, output: object, target: HTMLElement) => void;
|
|
103
104
|
|
|
104
105
|
export class SidebarAnnotationsTab extends UI.Widget.Widget {
|
|
105
106
|
#annotations: Trace.Types.File.Annotation[] = [];
|
|
@@ -108,9 +109,9 @@ export class SidebarAnnotationsTab extends UI.Widget.Widget {
|
|
|
108
109
|
#annotationEntryToColorMap = new Map<Trace.Types.Events.Event|Trace.Types.Events.LegacyTimelineFrame, string>();
|
|
109
110
|
|
|
110
111
|
readonly #annotationsHiddenSetting: Common.Settings.Setting<boolean>;
|
|
111
|
-
#view:
|
|
112
|
+
#view: View;
|
|
112
113
|
|
|
113
|
-
constructor(view = DEFAULT_VIEW) {
|
|
114
|
+
constructor(view: View = DEFAULT_VIEW) {
|
|
114
115
|
super();
|
|
115
116
|
this.#view = view;
|
|
116
117
|
this.#annotationsHiddenSetting = Common.Settings.Settings.instance().moduleSetting('annotations-hidden');
|
|
@@ -406,7 +407,7 @@ function renderTutorial(): Lit.LitTemplate {
|
|
|
406
407
|
// clang-format on
|
|
407
408
|
}
|
|
408
409
|
|
|
409
|
-
export const DEFAULT_VIEW:
|
|
410
|
+
export const DEFAULT_VIEW: View =
|
|
410
411
|
(input, _output, target) => {
|
|
411
412
|
// clang-format off
|
|
412
413
|
render(html`
|
|
@@ -138,6 +138,6 @@ export class RevealableTimeRange {
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
export class RevealableBottomUpProfile {
|
|
141
|
-
constructor(public bounds: Trace.Types.Timing.TraceWindowMicro, public node?: Trace.Extras.TraceTree.Node) {
|
|
141
|
+
constructor(public bounds: Trace.Types.Timing.TraceWindowMicro, public node?: Trace.Extras.TraceTree.Node|undefined) {
|
|
142
142
|
}
|
|
143
143
|
}
|
|
@@ -6,7 +6,7 @@ import * as Trace from '../../../models/trace/trace.js';
|
|
|
6
6
|
|
|
7
7
|
const imageCache =
|
|
8
8
|
new WeakMap<Trace.Types.Events.LegacySyntheticScreenshot|Trace.Types.Events.Screenshot, HTMLImageElement|null>();
|
|
9
|
-
export const emitter = new EventTarget();
|
|
9
|
+
export const emitter: EventTarget = new EventTarget();
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Synchronously returns an image, or return `null` while queuing up an async load of that image.
|
|
@@ -55,5 +55,7 @@ export function preload(screenshots: Array<Trace.Types.Events.LegacySyntheticScr
|
|
|
55
55
|
return Promise.all(promises);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export const cacheForTesting
|
|
59
|
-
|
|
58
|
+
export const cacheForTesting:
|
|
59
|
+
WeakMap<Trace.Types.Events.LegacySyntheticScreenshot|Trace.Types.Events.Screenshot, HTMLImageElement|null> =
|
|
60
|
+
imageCache;
|
|
61
|
+
export const loadImageForTesting: typeof loadImage = loadImage;
|
|
@@ -76,14 +76,14 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
76
76
|
const WEBAUDIO_EXPLANATION_URL =
|
|
77
77
|
'https://developer.chrome.com/docs/devtools/webaudio' as Platform.DevToolsPath.UrlString;
|
|
78
78
|
|
|
79
|
-
interface ViewInput {
|
|
79
|
+
export interface ViewInput {
|
|
80
80
|
contexts: Protocol.WebAudio.BaseAudioContext[];
|
|
81
81
|
selectedContextIndex: number;
|
|
82
82
|
onContextSelectorSelectionChanged: (contextId: string) => void;
|
|
83
83
|
contextRealtimeData: Protocol.WebAudio.ContextRealtimeData|null;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
|
|
86
|
+
export type View = (input: ViewInput, output: object, target: HTMLElement|DocumentFragment) => void;
|
|
87
87
|
|
|
88
88
|
export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
89
89
|
const {
|
|
@@ -189,7 +189,7 @@ export class WebAudioView extends UI.Widget.VBox<ShadowRoot> implements
|
|
|
189
189
|
private selectedContextIndex = -1;
|
|
190
190
|
private readonly pollRealtimeDataThrottler: Common.Throttler.Throttler;
|
|
191
191
|
|
|
192
|
-
constructor(element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
192
|
+
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
193
193
|
super({useShadowDom: 'pure'});
|
|
194
194
|
this.view = view;
|
|
195
195
|
|
|
@@ -240,19 +240,13 @@ const PROTOCOL_AUTHENTICATOR_VALUES: Protocol.EnumerableEnum<typeof Protocol.Web
|
|
|
240
240
|
U2f: Protocol.WebAuthn.AuthenticatorProtocol.U2f,
|
|
241
241
|
};
|
|
242
242
|
|
|
243
|
-
interface Authenticator {
|
|
243
|
+
export interface Authenticator {
|
|
244
244
|
name: string;
|
|
245
245
|
options: Protocol.WebAuthn.VirtualAuthenticatorOptions;
|
|
246
246
|
credentials: Protocol.WebAuthn.Credential[];
|
|
247
247
|
}
|
|
248
248
|
|
|
249
|
-
interface
|
|
250
|
-
name: string;
|
|
251
|
-
options: Protocol.WebAuthn.VirtualAuthenticatorOptions;
|
|
252
|
-
credentials: Protocol.WebAuthn.Credential[];
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
interface ViewInput {
|
|
249
|
+
export interface ViewInput {
|
|
256
250
|
enabled: boolean;
|
|
257
251
|
onToggleEnabled: () => void;
|
|
258
252
|
authenticators: Map<Protocol.WebAuthn.AuthenticatorId, Authenticator>;
|
|
@@ -270,11 +264,11 @@ interface ViewInput {
|
|
|
270
264
|
onRemoveCredential: (id: Protocol.WebAuthn.AuthenticatorId, credentialId: string) => void;
|
|
271
265
|
}
|
|
272
266
|
|
|
273
|
-
interface ViewOutput {
|
|
267
|
+
export interface ViewOutput {
|
|
274
268
|
revealSection: Map<string, () => void>;
|
|
275
269
|
}
|
|
276
270
|
|
|
277
|
-
type ViewFunction = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
271
|
+
export type ViewFunction = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
278
272
|
|
|
279
273
|
function renderToolbar(enabled: boolean, onToggle: () => void): Lit.TemplateResult {
|
|
280
274
|
const enableCheckboxTitle = i18nString(UIStrings.enableVirtualAuthenticator);
|
|
@@ -629,7 +623,7 @@ export class WebauthnPaneImpl extends UI.Panel.Panel implements
|
|
|
629
623
|
revealSection: new Map(),
|
|
630
624
|
};
|
|
631
625
|
|
|
632
|
-
constructor(view = DEFAULT_VIEW) {
|
|
626
|
+
constructor(view: ViewFunction = DEFAULT_VIEW) {
|
|
633
627
|
super('webauthn');
|
|
634
628
|
|
|
635
629
|
this.#view = view;
|
|
@@ -9,6 +9,6 @@ export {ESTree};
|
|
|
9
9
|
|
|
10
10
|
export { type Comment, defaultOptions, getLineInfo, Node, SourceLocation, Token, tokTypes} from './package/dist/acorn.mjs';
|
|
11
11
|
|
|
12
|
-
export const Parser = acorn.Parser;
|
|
13
|
-
export const tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
|
|
14
|
-
export const parse = acorn.Parser.parse.bind(acorn.Parser);
|
|
12
|
+
export const Parser: typeof acorn.Parser = acorn.Parser;
|
|
13
|
+
export const tokenizer: typeof acorn.Parser.tokenizer = acorn.Parser.tokenizer.bind(acorn.Parser);
|
|
14
|
+
export const parse: typeof acorn.Parser.parse = acorn.Parser.parse.bind(acorn.Parser);
|
|
@@ -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: e8d7f556806fab69401893b125dee4b6e6ded695
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -343,12 +343,12 @@ export function isUrlScheme(urlScheme: string): boolean {
|
|
|
343
343
|
/**
|
|
344
344
|
* A regex pattern to check nonce prefix and Base64 formatting of a nonce value.
|
|
345
345
|
*/
|
|
346
|
-
export const STRICT_NONCE_PATTERN =
|
|
346
|
+
export const STRICT_NONCE_PATTERN: RegExp =
|
|
347
347
|
new RegExp('^\'nonce-[a-zA-Z0-9+/_-]+[=]{0,2}\'$');
|
|
348
348
|
|
|
349
349
|
|
|
350
350
|
/** A regex pattern for checking if nonce prefix. */
|
|
351
|
-
export const NONCE_PATTERN = new RegExp('^\'nonce-(.+)\'$');
|
|
351
|
+
export const NONCE_PATTERN: RegExp = new RegExp('^\'nonce-(.+)\'$');
|
|
352
352
|
|
|
353
353
|
|
|
354
354
|
/**
|
|
@@ -367,12 +367,12 @@ export function isNonce(nonce: string, strictCheck?: boolean): boolean {
|
|
|
367
367
|
/**
|
|
368
368
|
* A regex pattern to check hash prefix and Base64 formatting of a hash value.
|
|
369
369
|
*/
|
|
370
|
-
export const STRICT_HASH_PATTERN =
|
|
370
|
+
export const STRICT_HASH_PATTERN: RegExp =
|
|
371
371
|
new RegExp('^\'(sha256|sha384|sha512)-[a-zA-Z0-9+/]+[=]{0,2}\'$');
|
|
372
372
|
|
|
373
373
|
|
|
374
374
|
/** A regex pattern to check hash prefix. */
|
|
375
|
-
export const HASH_PATTERN = new RegExp('^\'(sha256|sha384|sha512)-(.+)\'$');
|
|
375
|
+
export const HASH_PATTERN: RegExp = new RegExp('^\'(sha256|sha384|sha512)-(.+)\'$');
|
|
376
376
|
|
|
377
377
|
|
|
378
378
|
/**
|
|
@@ -97,4 +97,6 @@ function normalizeDirectiveValue(directiveValue: string): string {
|
|
|
97
97
|
return directiveValue;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export const TEST_ONLY
|
|
100
|
+
export const TEST_ONLY: {
|
|
101
|
+
normalizeDirectiveValue: typeof normalizeDirectiveValue,
|
|
102
|
+
} = {normalizeDirectiveValue};
|
|
@@ -136,7 +136,7 @@ export function matchWildcardUrls(
|
|
|
136
136
|
export function applyCheckFunktionToDirectives(
|
|
137
137
|
parsedCsp: csp.Csp,
|
|
138
138
|
check: (directive: string, directiveValues: string[]) => void,
|
|
139
|
-
) {
|
|
139
|
+
): void {
|
|
140
140
|
const directiveNames = Object.keys(parsedCsp.directives);
|
|
141
141
|
|
|
142
142
|
for (const directive of directiveNames) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
/* eslint-disable @typescript-eslint/naming-convention */
|
|
6
|
+
declare class diff_match_patch {
|
|
7
|
+
diff_main(text1: string, text2: string): Array<{0: number, 1: string}>;
|
|
8
|
+
diff_cleanupSemantic(diff: Array<{0: number, 1: string}>): void;
|
|
9
|
+
}
|
|
10
|
+
/* eslint-enable @typescript-eslint/naming-convention */
|
|
@@ -116,3 +116,28 @@ button {
|
|
|
116
116
|
color: var(--ref-palette-neutral100) !important; /* stylelint-disable-line declaration-no-important */
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
|
|
120
|
+
@media (forced-colors: active) {
|
|
121
|
+
button {
|
|
122
|
+
forced-color-adjust: none;
|
|
123
|
+
box-shadow: 0 0 0 var(--sys-size-1) ButtonText;
|
|
124
|
+
|
|
125
|
+
:host-context(:not(.theme-with-dark-background)) &,
|
|
126
|
+
:host-context(.theme-with-dark-background) &:not(:disabled) {
|
|
127
|
+
background-color: ButtonFace;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
:host-context(:not(.theme-with-dark-background)) &:not(:disabled) > devtools-icon,
|
|
131
|
+
:host-context(.theme-with-dark-background) &:not(:disabled) > devtools-icon {
|
|
132
|
+
color: ButtonText;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:focus-visible {
|
|
136
|
+
outline-color: ButtonText;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&:disabled > devtools-icon {
|
|
140
|
+
color: GrayText;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
@@ -22,8 +22,7 @@ function assert<T>(
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
const {html,
|
|
26
|
-
const {customElement, property, state} = Decorators;
|
|
25
|
+
const {html, Directives} = Lit;
|
|
27
26
|
const {classMap} = Directives;
|
|
28
27
|
|
|
29
28
|
declare global {
|
|
@@ -41,7 +40,6 @@ const jsonPropertyOptions = {
|
|
|
41
40
|
attribute: false,
|
|
42
41
|
};
|
|
43
42
|
|
|
44
|
-
@customElement('devtools-editable-content')
|
|
45
43
|
class EditableContent extends HTMLElement {
|
|
46
44
|
static get observedAttributes(): string[] {
|
|
47
45
|
return ['disabled', 'placeholder'];
|
|
@@ -127,7 +125,7 @@ class SuggestionInitEvent extends Event {
|
|
|
127
125
|
}
|
|
128
126
|
}
|
|
129
127
|
|
|
130
|
-
type SuggestionFilter = (option: string, query: string) => boolean;
|
|
128
|
+
export type SuggestionFilter = (option: string, query: string) => boolean;
|
|
131
129
|
|
|
132
130
|
const defaultSuggestionFilter = (option: string, query: string): boolean =>
|
|
133
131
|
option.toLowerCase().startsWith(query.toLowerCase());
|
|
@@ -136,13 +134,19 @@ const defaultSuggestionFilter = (option: string, query: string): boolean =>
|
|
|
136
134
|
* @fires SuggestionInitEvent#suggestioninit
|
|
137
135
|
* @fires SuggestEvent#suggest
|
|
138
136
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
137
|
+
class SuggestionBox extends Lit.LitElement {
|
|
138
|
+
static override properties: typeof Lit.LitElement.properties = {
|
|
139
|
+
options: jsonPropertyOptions,
|
|
140
|
+
expression: {type: String},
|
|
141
|
+
suggestionFilter: {attribute: false},
|
|
142
|
+
cursor: {state: true},
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
declare options: readonly string[];
|
|
146
|
+
declare expression: string;
|
|
147
|
+
declare suggestionFilter?: SuggestionFilter;
|
|
144
148
|
|
|
145
|
-
|
|
149
|
+
private declare cursor: number;
|
|
146
150
|
|
|
147
151
|
#suggestions: string[] = [];
|
|
148
152
|
|
|
@@ -229,30 +233,42 @@ class SuggestionBox extends LitElement {
|
|
|
229
233
|
}
|
|
230
234
|
}
|
|
231
235
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
...LitElement.shadowRootOptions,
|
|
236
|
+
export class SuggestionInput extends Lit.LitElement {
|
|
237
|
+
static override shadowRootOptions: ShadowRootInit = {
|
|
238
|
+
...Lit.LitElement.shadowRootOptions,
|
|
236
239
|
delegatesFocus: true,
|
|
237
|
-
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
static override properties: typeof Lit.LitElement.properties = {
|
|
243
|
+
options: jsonPropertyOptions,
|
|
244
|
+
autocomplete: {type: Boolean},
|
|
245
|
+
suggestionFilter: {attribute: false},
|
|
246
|
+
expression: {state: true},
|
|
247
|
+
placeholder: {type: String},
|
|
248
|
+
value: {type: String},
|
|
249
|
+
disabled: {type: Boolean},
|
|
250
|
+
strikethrough: {type: Boolean},
|
|
251
|
+
mimeType: {type: String},
|
|
252
|
+
jslogContext: {type: String},
|
|
253
|
+
};
|
|
238
254
|
|
|
239
255
|
/**
|
|
240
256
|
* State passed to devtools-suggestion-box.
|
|
241
257
|
*/
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
258
|
+
declare options: readonly string[];
|
|
259
|
+
declare autocomplete?: boolean;
|
|
260
|
+
declare suggestionFilter?: SuggestionFilter;
|
|
261
|
+
declare expression: string;
|
|
246
262
|
|
|
247
263
|
/**
|
|
248
264
|
* State passed to devtools-editable-content.
|
|
249
265
|
*/
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
266
|
+
declare placeholder: string;
|
|
267
|
+
declare value: string;
|
|
268
|
+
declare disabled: boolean;
|
|
269
|
+
declare strikethrough: boolean;
|
|
270
|
+
declare mimeType: string;
|
|
271
|
+
declare jslogContext?: string;
|
|
256
272
|
|
|
257
273
|
constructor() {
|
|
258
274
|
super();
|
|
@@ -364,3 +380,7 @@ export class SuggestionInput extends LitElement {
|
|
|
364
380
|
// clang-format on
|
|
365
381
|
}
|
|
366
382
|
}
|
|
383
|
+
|
|
384
|
+
customElements.define('devtools-editable-content', EditableContent);
|
|
385
|
+
customElements.define('devtools-suggestion-box', SuggestionBox);
|
|
386
|
+
customElements.define('devtools-suggestion-input', SuggestionInput);
|
|
@@ -946,7 +946,7 @@ export class ContextMenu extends SubMenu {
|
|
|
946
946
|
|
|
947
947
|
private static pendingMenu: ContextMenu|null = null;
|
|
948
948
|
private static useSoftMenu = false;
|
|
949
|
-
static readonly groupWeights = [
|
|
949
|
+
static readonly groupWeights: string[] = [
|
|
950
950
|
'header',
|
|
951
951
|
'new',
|
|
952
952
|
'reveal',
|
|
@@ -978,7 +978,7 @@ export class ContextMenu extends SubMenu {
|
|
|
978
978
|
*
|
|
979
979
|
*/
|
|
980
980
|
export class MenuButton extends HTMLElement {
|
|
981
|
-
static readonly observedAttributes = ['icon-name', 'disabled'];
|
|
981
|
+
static readonly observedAttributes: string[] = ['icon-name', 'disabled'];
|
|
982
982
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
983
983
|
#triggerTimeoutId?: number;
|
|
984
984
|
#populateMenuCall?: (arg0: ContextMenu) => void;
|
|
@@ -97,7 +97,12 @@ export class DropTarget {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
export
|
|
100
|
+
export interface DropTargetType {
|
|
101
|
+
kind: string;
|
|
102
|
+
type: RegExp;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const Type: Record<'URI'|'Folder'|'File'|'WebFile'|'ImageFile', DropTargetType> = {
|
|
101
106
|
URI: {kind: 'string', type: /text\/uri-list/},
|
|
102
107
|
Folder: {kind: 'file', type: /$^/},
|
|
103
108
|
File: {kind: 'file', type: /.*/},
|
|
@@ -52,7 +52,7 @@ export class EmptyWidget extends VBox {
|
|
|
52
52
|
#link: Platform.DevToolsPath.UrlString|undefined|null;
|
|
53
53
|
#view: View;
|
|
54
54
|
|
|
55
|
-
constructor(headerOrElement: string|HTMLElement, text = '', element?: HTMLElement, view = DEFAULT_VIEW) {
|
|
55
|
+
constructor(headerOrElement: string|HTMLElement, text = '', element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
56
56
|
const header = typeof headerOrElement === 'string' ? headerOrElement : '';
|
|
57
57
|
if (!element && headerOrElement instanceof HTMLElement) {
|
|
58
58
|
element = headerOrElement;
|
|
@@ -514,10 +514,10 @@ export class ShortcutTreeNode {
|
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
export class ForwardedShortcut {
|
|
517
|
-
static instance = new ForwardedShortcut();
|
|
517
|
+
static instance: ForwardedShortcut = new ForwardedShortcut();
|
|
518
518
|
}
|
|
519
519
|
|
|
520
|
-
export const ForwardedActions = new Set<string>([
|
|
520
|
+
export const ForwardedActions: Set<string> = new Set<string>([
|
|
521
521
|
'main.toggle-dock',
|
|
522
522
|
'debugger.toggle-breakpoints-active',
|
|
523
523
|
'debugger.toggle-pause',
|
|
@@ -888,7 +888,8 @@ export class SplitWidget extends SplitWidgetBase {
|
|
|
888
888
|
}
|
|
889
889
|
|
|
890
890
|
export class SplitWidgetElement extends WidgetElement<SplitWidget> {
|
|
891
|
-
static readonly observedAttributes
|
|
891
|
+
static readonly observedAttributes: string[] =
|
|
892
|
+
['direction', 'sidebar-position', 'sidebar-initial-size', 'sidebar-visibility'];
|
|
892
893
|
|
|
893
894
|
constructor() {
|
|
894
895
|
super();
|
|
@@ -157,7 +157,7 @@ export class ExpandableContainerWidget extends VBox {
|
|
|
157
157
|
const expandableContainerForView = new WeakMap<View, ExpandableContainerWidget>();
|
|
158
158
|
|
|
159
159
|
export class StackedPane extends VBox {
|
|
160
|
-
readonly expandableContainers = new Map<string, ExpandableContainerWidget>();
|
|
160
|
+
readonly expandableContainers: Map<string, ExpandableContainerWidget> = new Map<string, ExpandableContainerWidget>();
|
|
161
161
|
constructor(
|
|
162
162
|
private readonly createToolbar: CreateToolbarFn,
|
|
163
163
|
private readonly setWidgetForView: SetWidgetForViewFn,
|
|
@@ -35,7 +35,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
35
35
|
|
|
36
36
|
export class TargetCrashedScreen extends VBox {
|
|
37
37
|
private readonly hideCallback: () => void;
|
|
38
|
-
constructor(hideCallback: () => void, view = DEFAULT_VIEW) {
|
|
38
|
+
constructor(hideCallback: () => void, view: View = DEFAULT_VIEW) {
|
|
39
39
|
super({useShadowDom: true});
|
|
40
40
|
view({}, {}, this.contentElement);
|
|
41
41
|
this.hideCallback = hideCallback;
|
|
@@ -68,7 +68,8 @@ import {cloneCustomElement, ElementFocusRestorer} from './UIUtils.js';
|
|
|
68
68
|
* @attribute value Sets the initial text value that's edited when editing starts. If not provided, the slot's inner text is used.
|
|
69
69
|
*/
|
|
70
70
|
export class TextPromptElement extends HTMLElement {
|
|
71
|
-
static readonly observedAttributes
|
|
71
|
+
static readonly observedAttributes: string[] =
|
|
72
|
+
['editing', 'completions', 'placeholder', 'cancel-on-blur', 'render-as-block'];
|
|
72
73
|
static formAssociated = true;
|
|
73
74
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
|
74
75
|
readonly #internals = this.attachInternals();
|
|
@@ -886,7 +886,7 @@ export class ToolbarFilter extends ToolbarInput {
|
|
|
886
886
|
}
|
|
887
887
|
|
|
888
888
|
export class ToolbarInputElement extends HTMLElement {
|
|
889
|
-
static observedAttributes = ['value', 'disabled', 'regex'];
|
|
889
|
+
static observedAttributes: string[] = ['value', 'disabled', 'regex'];
|
|
890
890
|
|
|
891
891
|
item?: ToolbarInput;
|
|
892
892
|
datalist: HTMLDataListElement|null = null;
|
|
@@ -467,7 +467,7 @@ export class TreeOutlineInShadow extends TreeOutline {
|
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
export const treeElementBylistItemNode = new WeakMap<Node, TreeElement>();
|
|
470
|
+
export const treeElementBylistItemNode: WeakMap<Node, TreeElement> = new WeakMap<Node, TreeElement>();
|
|
471
471
|
export class TreeElement {
|
|
472
472
|
treeOutline: TreeOutline|null;
|
|
473
473
|
parent: TreeElement|null;
|
|
@@ -1594,8 +1594,6 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1594
1594
|
static readonly CLONED_ATTRIBUTES = SDK.DOMModel.ARIA_ATTRIBUTES.union(new Set(['jslog', 'draggable']));
|
|
1595
1595
|
#clonedAttributes = new Set<string>();
|
|
1596
1596
|
#clonedClasses = new Set<string>();
|
|
1597
|
-
#userExpanded = false;
|
|
1598
|
-
#isProcessingAttribute = false;
|
|
1599
1597
|
#previousOpenAttributeValue?: string|null;
|
|
1600
1598
|
#refreshScheduled = false;
|
|
1601
1599
|
|
|
@@ -1609,39 +1607,16 @@ class TreeViewTreeElement extends TreeElement {
|
|
|
1609
1607
|
this.refresh();
|
|
1610
1608
|
}
|
|
1611
1609
|
|
|
1612
|
-
override onexpand(): void {
|
|
1613
|
-
if (!this.#isProcessingAttribute) {
|
|
1614
|
-
this.#userExpanded = true;
|
|
1615
|
-
}
|
|
1616
|
-
}
|
|
1617
|
-
|
|
1618
|
-
override oncollapse(): void {
|
|
1619
|
-
if (!this.#isProcessingAttribute) {
|
|
1620
|
-
this.#userExpanded = false;
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
1610
|
updateExpansionFromAttribute(): void {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
this
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
this.expand();
|
|
1635
|
-
} else {
|
|
1636
|
-
this.collapse();
|
|
1637
|
-
}
|
|
1638
|
-
} else if (openAttr === 'false') {
|
|
1639
|
-
this.collapse();
|
|
1640
|
-
} else {
|
|
1641
|
-
this.expand();
|
|
1642
|
-
}
|
|
1643
|
-
} finally {
|
|
1644
|
-
this.#isProcessingAttribute = false;
|
|
1611
|
+
const openAttr = this.configElement.getAttribute('open');
|
|
1612
|
+
if (openAttr === this.#previousOpenAttributeValue) {
|
|
1613
|
+
return;
|
|
1614
|
+
}
|
|
1615
|
+
this.#previousOpenAttributeValue = openAttr;
|
|
1616
|
+
if (openAttr !== null && openAttr !== 'false') {
|
|
1617
|
+
this.expand();
|
|
1618
|
+
} else {
|
|
1619
|
+
this.collapse();
|
|
1645
1620
|
}
|
|
1646
1621
|
}
|
|
1647
1622
|
|
|
@@ -1828,7 +1803,7 @@ function removeNode(node: TreeElement, preserveParentExpandable = false): void {
|
|
|
1828
1803
|
* @attribute hide-overflow
|
|
1829
1804
|
*/
|
|
1830
1805
|
export class TreeViewElement extends HTMLElementWithLightDOMTemplate {
|
|
1831
|
-
static readonly observedAttributes =
|
|
1806
|
+
static readonly observedAttributes: string[] =
|
|
1832
1807
|
['navigation-variant', 'hide-overflow', 'dense', 'show-selection-on-keyboard-focus'];
|
|
1833
1808
|
readonly #treeOutline = new TreeOutlineInShadow(undefined, this, true);
|
|
1834
1809
|
|
|
@@ -2104,7 +2079,8 @@ class IfExpandedDirective extends Lit.Directive.Directive {
|
|
|
2104
2079
|
return node.expanded;
|
|
2105
2080
|
}
|
|
2106
2081
|
}
|
|
2107
|
-
export const ifExpanded
|
|
2082
|
+
export const ifExpanded: (content: Lit.LitTemplate|Iterable<Lit.LitTemplate>) =>
|
|
2083
|
+
Lit.DirectiveResult<typeof IfExpandedDirective> = Lit.Directive.directive(IfExpandedDirective);
|
|
2108
2084
|
|
|
2109
2085
|
export class TreeElementWrapper extends HTMLElement {
|
|
2110
2086
|
#treeElement?: TreeElement;
|
|
@@ -71,7 +71,8 @@ declare global {
|
|
|
71
71
|
'dt-small-bubble': DevToolsSmallBubble;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const Directives: typeof Lit.Directives = Lit.Directives;
|
|
75
|
+
const render: typeof Lit.render = Lit.render;
|
|
75
76
|
|
|
76
77
|
const UIStrings = {
|
|
77
78
|
/**
|
|
@@ -753,7 +754,8 @@ class AnimateOnDirective extends Lit.Directive.Directive {
|
|
|
753
754
|
}
|
|
754
755
|
}
|
|
755
756
|
|
|
756
|
-
export const animateOn
|
|
757
|
+
export const animateOn: (_condition: boolean, _className: string) => Lit.DirectiveResult<typeof AnimateOnDirective> =
|
|
758
|
+
Lit.Directive.directive(AnimateOnDirective);
|
|
757
759
|
|
|
758
760
|
export function measurePreferredSize(element: Element, containerElement?: Element|null): Geometry.Size {
|
|
759
761
|
const oldParent = element.parentElement;
|
|
@@ -1195,7 +1197,8 @@ export function setTitle(element: HTMLElement, title: string): void {
|
|
|
1195
1197
|
}
|
|
1196
1198
|
|
|
1197
1199
|
export class CheckboxLabel extends HTMLElement {
|
|
1198
|
-
static readonly observedAttributes
|
|
1200
|
+
static readonly observedAttributes: string[] =
|
|
1201
|
+
['checked', 'disabled', 'indeterminate', 'name', 'title', 'aria-label', 'small'];
|
|
1199
1202
|
|
|
1200
1203
|
readonly #shadowRoot!: DocumentFragment;
|
|
1201
1204
|
#checkboxElement!: HTMLInputElement;
|
|
@@ -173,7 +173,7 @@ export interface EventTypes {
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
export class ViewManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
176
|
-
readonly views = new Map<string, View>();
|
|
176
|
+
readonly views: Map<string, View> = new Map<string, View>();
|
|
177
177
|
private readonly locationNameByViewId = new Map<string, string>();
|
|
178
178
|
private readonly locationOverrideSetting: Common.Settings.Setting<Record<string, string>>;
|
|
179
179
|
|
|
@@ -212,7 +212,7 @@ function runNextUpdate(): void {
|
|
|
212
212
|
}
|
|
213
213
|
|
|
214
214
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
215
|
-
export const widgetConfigs = new WeakMap<HTMLElement, WidgetConfig<any>>();
|
|
215
|
+
export const widgetConfigs: WeakMap<HTMLElement, WidgetConfig<any>> = new WeakMap<HTMLElement, WidgetConfig<any>>();
|
|
216
216
|
|
|
217
217
|
export function registerWidgetConfig<WidgetT extends AnyWidget>(element: HTMLElement,
|
|
218
218
|
config: WidgetConfig<WidgetT>): void {
|