chrome-devtools-frontend 1.0.946920 → 1.0.948445
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/.eslintrc.js +1 -0
- package/config/gni/all_devtools_files.gni +1 -13
- package/config/gni/devtools_grd_files.gni +6 -9
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/.eslintrc.js +6 -1
- package/front_end/Images/src/circled_backslash_icon.svg +3 -0
- package/front_end/core/host/InspectorFrontendHost.ts +0 -3
- package/front_end/core/host/UserMetrics.ts +1 -1
- package/front_end/core/i18n/locales/en-US.json +17 -14
- package/front_end/core/i18n/locales/en-XL.json +17 -14
- package/front_end/core/platform/platform.ts +0 -2
- package/front_end/core/platform/string-utilities.ts +14 -1
- package/front_end/core/platform/utilities.ts +0 -29
- package/front_end/core/root/Runtime.ts +4 -211
- package/front_end/core/sdk/AccessibilityModel.ts +0 -2
- package/front_end/core/sdk/CSSProperty.ts +0 -2
- package/front_end/core/sdk/CSSRule.ts +0 -2
- package/front_end/core/sdk/Cookie.ts +0 -25
- package/front_end/core/sdk/EmulationModel.ts +0 -2
- package/front_end/core/sdk/HeapProfilerModel.ts +0 -2
- package/front_end/core/sdk/NetworkManager.ts +0 -3
- package/front_end/core/sdk/Resource.ts +0 -3
- package/front_end/core/sdk/ResourceTreeModel.ts +0 -3
- package/front_end/core/sdk/ServiceWorkerManager.ts +0 -2
- package/front_end/core/sdk/sdk-legacy.ts +0 -3
- package/front_end/entrypoints/devtools_app/{devtools_app-meta-files.ts → devtools_app.ts} +9 -2
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +2 -1
- package/front_end/entrypoints/inspector/{inspector.js → inspector.ts} +0 -3
- package/front_end/entrypoints/js_app/{JsMain.ts → js_app.ts} +5 -1
- package/front_end/entrypoints/main/MainImpl.ts +0 -1
- package/front_end/entrypoints/ndb_app/{ndb_app.js → ndb_app.ts} +0 -2
- package/front_end/entrypoints/node_app/node_app.ts +1 -3
- package/front_end/entrypoints/shell/{shell.js → shell.ts} +0 -2
- package/front_end/entrypoints/worker_app/{worker_app.js → worker_app.ts} +3 -2
- package/front_end/generated/InspectorBackendCommands.js +5 -1
- package/front_end/generated/protocol.d.ts +12 -0
- package/front_end/legacy/legacy-defs.d.ts +0 -4
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +35 -59
- package/front_end/models/bindings/CompilerScriptMapping.ts +0 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +4 -11
- package/front_end/models/bindings/SASSSourceMapping.ts +0 -1
- package/front_end/models/emulation/DeviceModeModel.ts +0 -2
- package/front_end/models/issues_manager/CorsIssue.ts +17 -9
- package/front_end/models/issues_manager/descriptions/{corsInsecurePrivateNetworkPreflight.md → corsPreflightAllowPrivateNetworkError.md} +1 -1
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +3 -1
- package/front_end/panels/animation/AnimationTimeline.ts +0 -2
- package/front_end/panels/animation/AnimationUI.ts +0 -2
- package/front_end/panels/application/BackForwardCacheStrings.ts +2 -5
- package/front_end/panels/application/BackForwardCacheView.ts +150 -58
- package/front_end/panels/application/ResourcesPanel.ts +0 -42
- package/front_end/panels/application/application-legacy.ts +0 -3
- package/front_end/panels/application/application-meta.ts +0 -13
- package/front_end/panels/application/backForwardCacheView.css +44 -6
- package/front_end/panels/application/components/FrameDetailsView.ts +3 -3
- package/front_end/panels/application/components/OriginTrialTreeView.ts +3 -3
- package/front_end/panels/application/components/StackTrace.ts +1 -1
- package/front_end/panels/coverage/CoverageView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewModel.ts +0 -2
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +0 -7
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +0 -2
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +1 -0
- package/front_end/panels/css_overview/cssOverviewCompletedView.css +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -1
- package/front_end/panels/elements/ElementsPanel.ts +9 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +1 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/issues/CorsIssueDetailsView.ts +18 -2
- package/front_end/panels/lighthouse/lighthouse-meta.ts +0 -3
- package/front_end/panels/network/NetworkWaterfallColumn.ts +2 -0
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -1
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -1
- package/front_end/panels/search/SearchView.ts +24 -4
- package/front_end/panels/settings/components/SyncSection.ts +2 -2
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +46 -46
- package/front_end/panels/sources/CSSPlugin.ts +3 -0
- package/front_end/panels/sources/CoveragePlugin.ts +2 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +28 -4
- package/front_end/panels/sources/JavaScriptCompilerPlugin.ts +3 -0
- package/front_end/panels/sources/ProfilePlugin.ts +3 -0
- package/front_end/panels/sources/UISourceCodeFrame.ts +11 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +2 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
- package/front_end/third_party/codemirror.next/package.json +1 -0
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +168 -164
- package/front_end/third_party/lighthouse/locales/ar-XB.json +0 -3
- package/front_end/third_party/lighthouse/locales/ar.json +0 -3
- package/front_end/third_party/lighthouse/locales/bg.json +17 -20
- package/front_end/third_party/lighthouse/locales/ca.json +0 -3
- package/front_end/third_party/lighthouse/locales/cs.json +0 -3
- package/front_end/third_party/lighthouse/locales/da.json +16 -19
- package/front_end/third_party/lighthouse/locales/de.json +0 -3
- package/front_end/third_party/lighthouse/locales/el.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-GB.json +19 -22
- package/front_end/third_party/lighthouse/locales/en-US.json +33 -3
- package/front_end/third_party/lighthouse/locales/en-XA.json +0 -3
- package/front_end/third_party/lighthouse/locales/en-XL.json +33 -3
- package/front_end/third_party/lighthouse/locales/es-419.json +17 -20
- package/front_end/third_party/lighthouse/locales/es.json +0 -3
- package/front_end/third_party/lighthouse/locales/fi.json +16 -19
- package/front_end/third_party/lighthouse/locales/fil.json +33 -36
- package/front_end/third_party/lighthouse/locales/fr.json +16 -19
- package/front_end/third_party/lighthouse/locales/he.json +16 -19
- package/front_end/third_party/lighthouse/locales/hi.json +0 -3
- package/front_end/third_party/lighthouse/locales/hr.json +16 -19
- package/front_end/third_party/lighthouse/locales/hu.json +16 -19
- package/front_end/third_party/lighthouse/locales/id.json +16 -19
- package/front_end/third_party/lighthouse/locales/it.json +37 -40
- package/front_end/third_party/lighthouse/locales/ja.json +16 -19
- package/front_end/third_party/lighthouse/locales/ko.json +16 -19
- package/front_end/third_party/lighthouse/locales/lt.json +17 -20
- package/front_end/third_party/lighthouse/locales/lv.json +0 -3
- package/front_end/third_party/lighthouse/locales/nl.json +16 -19
- package/front_end/third_party/lighthouse/locales/no.json +17 -20
- package/front_end/third_party/lighthouse/locales/pl.json +16 -19
- package/front_end/third_party/lighthouse/locales/pt-PT.json +37 -40
- package/front_end/third_party/lighthouse/locales/pt.json +16 -19
- package/front_end/third_party/lighthouse/locales/ro.json +0 -3
- package/front_end/third_party/lighthouse/locales/ru.json +16 -19
- package/front_end/third_party/lighthouse/locales/sk.json +0 -3
- package/front_end/third_party/lighthouse/locales/sl.json +0 -3
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +16 -19
- package/front_end/third_party/lighthouse/locales/sr.json +16 -19
- package/front_end/third_party/lighthouse/locales/sv.json +17 -20
- package/front_end/third_party/lighthouse/locales/ta.json +0 -3
- package/front_end/third_party/lighthouse/locales/te.json +0 -3
- package/front_end/third_party/lighthouse/locales/th.json +0 -3
- package/front_end/third_party/lighthouse/locales/tr.json +0 -3
- package/front_end/third_party/lighthouse/locales/uk.json +17 -20
- package/front_end/third_party/lighthouse/locales/vi.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-HK.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh-TW.json +0 -3
- package/front_end/third_party/lighthouse/locales/zh.json +0 -3
- package/front_end/third_party/lighthouse/report/bundle.d.ts +63 -61
- package/front_end/third_party/lighthouse/report/bundle.js +36 -7
- package/front_end/third_party/lighthouse/report-assets/report-generator.js +205 -192
- package/front_end/ui/components/diff_view/DiffView.ts +4 -4
- package/front_end/ui/components/helpers/component-server-setup.ts +1 -12
- package/front_end/ui/components/helpers/helpers.ts +0 -2
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +3 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +4 -4
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +98 -0
- package/front_end/ui/components/panel_feedback/panel_feedback.ts +1 -0
- package/front_end/ui/components/panel_feedback/previewToggle.css +24 -0
- package/front_end/ui/components/report_view/ReportView.ts +22 -0
- package/front_end/ui/components/report_view/reportSection.css +20 -0
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +2 -2
- package/front_end/ui/components/text_editor/config.ts +9 -7
- package/front_end/ui/components/text_editor/javascript.ts +8 -4
- package/front_end/ui/components/text_prompt/TextPrompt.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/SearchableView.ts +2 -1
- package/front_end/ui/legacy/Treeoutline.ts +1 -1
- package/front_end/ui/legacy/Widget.ts +1 -1
- package/front_end/ui/legacy/XWidget.ts +0 -5
- package/front_end/ui/legacy/components/inline_editor/CSSVarSwatch.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +40 -32
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/front_end/ui/legacy/utils/append-style.ts +2 -13
- package/front_end/ui/legacy/utils/create-shadow-root-with-core-styles.ts +7 -5
- package/package.json +2 -4
- package/scripts/build/build_inspector_overlay.py +15 -1
- package/scripts/build/rjsmin.py +84 -115
- package/scripts/eslint_rules/lib/l10n_filename_matches.js +4 -4
- package/scripts/eslint_rules/lib/lit_html_no_attribute_quotes.js +101 -0
- package/scripts/eslint_rules/lib/no_only_eslint_tests.js +53 -0
- package/scripts/eslint_rules/tests/.eslintrc.js +14 -0
- package/scripts/eslint_rules/tests/l10n_filename_matches_test.js +4 -0
- package/scripts/eslint_rules/tests/lit_html_no_attribute_quotes_test.js +45 -0
- package/scripts/eslint_rules/tests/no_only_eslint_tests_test.js +94 -0
- package/front_end/entrypoints/devtools_app/devtools_app.js +0 -11
- package/front_end/entrypoints/devtools_app/devtools_app.json +0 -5
- package/front_end/entrypoints/inspector/inspector.json +0 -4
- package/front_end/entrypoints/js_app/js_app.js +0 -12
- package/front_end/entrypoints/js_app/js_app.json +0 -3
- package/front_end/entrypoints/ndb_app/ndb_app.json +0 -4
- package/front_end/entrypoints/startup/RuntimeInstantiator.ts +0 -95
- package/front_end/entrypoints/startup/startup.ts +0 -9
- package/front_end/entrypoints/worker_app/worker_app.json +0 -3
- package/front_end/panels/lighthouse/module.json +0 -6
- package/front_end/third_party/lighthouse/report-assets/report.d.ts +0 -1
- package/front_end/third_party/lighthouse/report-assets/report.js +0 -233
- package/front_end/third_party/lighthouse/report-assets/standalone-template.html +0 -38
- package/front_end/ui/components/helpers/get-stylesheet.ts +0 -45
- package/scripts/build/build_release_applications.py +0 -216
- package/scripts/build/modular_build.py +0 -184
- package/scripts/check_gn.js +0 -119
- package/scripts/json_validator/module.schema.json +0 -19
- package/scripts/json_validator/validate_module_json.js +0 -44
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
|
-
interface StringConstructor {
|
|
5
|
-
sprintf(format: string, ...var_arg: any): string;
|
|
6
|
-
}
|
|
7
4
|
|
|
8
5
|
interface Window {
|
|
9
6
|
UI: {themeSupport: unknown}
|
|
@@ -124,7 +121,6 @@ interface Node {
|
|
|
124
121
|
|
|
125
122
|
declare function isEnterOrSpaceKey(event: Event): boolean;
|
|
126
123
|
declare function isEscKey(event: Event): boolean;
|
|
127
|
-
declare function createPlainTextSearchRegex(query: string, flags?: string): RegExp;
|
|
128
124
|
declare function onInvokeElement(element: Element, callback: (event: Event) => void): void;
|
|
129
125
|
|
|
130
126
|
interface ServicePort {
|
|
@@ -23,6 +23,10 @@ self.Platform = self.Platform || {};
|
|
|
23
23
|
self.Platform.StringUtilities = Platform.StringUtilities;
|
|
24
24
|
self.Platform.MapUtilities = Platform.MapUtilities;
|
|
25
25
|
self.Platform.ArrayUtilities = Platform.ArrayUtilities;
|
|
26
|
+
self.createPlainTextSearchRegex = Platform.StringUtilities.createPlainTextSearchRegex;
|
|
27
|
+
String.sprintf = Platform.StringUtilities.sprintf;
|
|
28
|
+
String.regexSpecialCharacters = Platform.StringUtilities.regexSpecialCharacters;
|
|
29
|
+
String.caseInsensetiveComparator = Platform.StringUtilities.caseInsensetiveComparator;
|
|
26
30
|
|
|
27
31
|
/**
|
|
28
32
|
* @return {boolean}
|
|
@@ -229,23 +233,36 @@ export function addSnifferPromise(receiver, methodName) {
|
|
|
229
233
|
});
|
|
230
234
|
}
|
|
231
235
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
236
|
+
const mappingForLayoutTests = new Map([
|
|
237
|
+
['panels/animation', 'animation'],
|
|
238
|
+
['panels/browser_debugger', 'browser_debugger'],
|
|
239
|
+
['panels/changes', 'changes'],
|
|
240
|
+
['panels/console', 'console'],
|
|
241
|
+
['panels/elements', 'elements'],
|
|
242
|
+
['panels/emulation', 'emulation'],
|
|
243
|
+
['panels/mobile_throttling', 'mobile_throttling'],
|
|
244
|
+
['panels/network', 'network'],
|
|
245
|
+
['panels/profiler', 'profiler'],
|
|
246
|
+
['panels/application', 'resources'],
|
|
247
|
+
['panels/search', 'search'],
|
|
248
|
+
['panels/sources', 'sources'],
|
|
249
|
+
['panels/snippets', 'snippets'],
|
|
250
|
+
['panels/settings', 'settings'],
|
|
251
|
+
['panels/timeline', 'timeline'],
|
|
252
|
+
['panels/web_audio', 'web_audio'],
|
|
253
|
+
['models/persistence', 'persistence'],
|
|
254
|
+
['models/workspace_diff', 'workspace_diff'],
|
|
255
|
+
['entrypoints/main', 'main'],
|
|
256
|
+
['third_party/diff', 'diff'],
|
|
257
|
+
['ui/legacy/components/inline_editor', 'inline_editor'],
|
|
258
|
+
['ui/legacy/components/data_grid', 'data_grid'],
|
|
259
|
+
['ui/legacy/components/perf_ui', 'perf_ui'],
|
|
260
|
+
['ui/legacy/components/source_frame', 'source_frame'],
|
|
261
|
+
['ui/legacy/components/color_picker', 'color_picker'],
|
|
262
|
+
['ui/legacy/components/cookie_table', 'cookie_table'],
|
|
263
|
+
['ui/legacy/components/quick_open', 'quick_open'],
|
|
264
|
+
['ui/legacy/components/utils', 'components'],
|
|
265
|
+
]);
|
|
249
266
|
|
|
250
267
|
/**
|
|
251
268
|
* @param {string} module
|
|
@@ -253,7 +270,7 @@ export async function loadModule(module) {
|
|
|
253
270
|
*/
|
|
254
271
|
export async function loadLegacyModule(module) {
|
|
255
272
|
let containingFolder = module;
|
|
256
|
-
for (const [remappedFolder, originalFolder] of
|
|
273
|
+
for (const [remappedFolder, originalFolder] of mappingForLayoutTests.entries()) {
|
|
257
274
|
if (originalFolder === module) {
|
|
258
275
|
containingFolder = remappedFolder;
|
|
259
276
|
}
|
|
@@ -667,9 +684,6 @@ export function addIframe(path, options = {}) {
|
|
|
667
684
|
`);
|
|
668
685
|
}
|
|
669
686
|
|
|
670
|
-
/** @type {number} */
|
|
671
|
-
let _pendingInits = 0;
|
|
672
|
-
|
|
673
687
|
/**
|
|
674
688
|
* The old test framework executed certain snippets in the inspected page
|
|
675
689
|
* context as part of loading a test helper file.
|
|
@@ -685,12 +699,7 @@ let _pendingInits = 0;
|
|
|
685
699
|
* @param {string} code
|
|
686
700
|
*/
|
|
687
701
|
export async function deprecatedInitAsync(code) {
|
|
688
|
-
_pendingInits++;
|
|
689
702
|
await TestRunner.RuntimeAgent.invoke_evaluate({expression: code, objectGroup: 'console'});
|
|
690
|
-
_pendingInits--;
|
|
691
|
-
if (!_pendingInits && _resolveOnFinishInits !== undefined) {
|
|
692
|
-
_resolveOnFinishInits();
|
|
693
|
-
}
|
|
694
703
|
}
|
|
695
704
|
|
|
696
705
|
/**
|
|
@@ -1290,36 +1299,6 @@ export class MockSetting {
|
|
|
1290
1299
|
}
|
|
1291
1300
|
}
|
|
1292
1301
|
|
|
1293
|
-
/**
|
|
1294
|
-
* @return {!Array<!Root.Runtime.Module>}
|
|
1295
|
-
*/
|
|
1296
|
-
export function loadedModules() {
|
|
1297
|
-
return self.runtime.modules.filter(module => module.loadedForTest)
|
|
1298
|
-
.filter(module => module.name() !== 'help')
|
|
1299
|
-
.filter(module => module.name().indexOf('test_runner') === -1);
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
|
-
/**
|
|
1303
|
-
* @param {!Array<!Root.Runtime.Module>} relativeTo
|
|
1304
|
-
* @return {!Array<!Root.Runtime.Module>}
|
|
1305
|
-
*/
|
|
1306
|
-
export function dumpLoadedModules(relativeTo) {
|
|
1307
|
-
const previous = new Set(relativeTo || []);
|
|
1308
|
-
function moduleSorter(left, right) {
|
|
1309
|
-
return Platform.StringUtilities.naturalOrderComparator(left.descriptor.name, right.descriptor.name);
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
addResult('Loaded modules:');
|
|
1313
|
-
const sortedLoadedModules = loadedModules().sort(moduleSorter);
|
|
1314
|
-
for (const module of sortedLoadedModules) {
|
|
1315
|
-
if (previous.has(module)) {
|
|
1316
|
-
continue;
|
|
1317
|
-
}
|
|
1318
|
-
addResult(' ' + module.descriptor.name);
|
|
1319
|
-
}
|
|
1320
|
-
return sortedLoadedModules;
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
1302
|
/**
|
|
1324
1303
|
* @param {string} urlSuffix
|
|
1325
1304
|
* @param {!Workspace.Workspace.projectTypes=} projectType
|
|
@@ -1511,13 +1490,10 @@ TestRunner.override = override;
|
|
|
1511
1490
|
TestRunner.clearSpecificInfoFromStackFrames = clearSpecificInfoFromStackFrames;
|
|
1512
1491
|
TestRunner.hideInspectorView = hideInspectorView;
|
|
1513
1492
|
TestRunner.mainFrame = mainFrame;
|
|
1514
|
-
TestRunner.loadedModules = loadedModules;
|
|
1515
|
-
TestRunner.dumpLoadedModules = dumpLoadedModules;
|
|
1516
1493
|
TestRunner.waitForUISourceCode = waitForUISourceCode;
|
|
1517
1494
|
TestRunner.waitForUISourceCodeRemoved = waitForUISourceCodeRemoved;
|
|
1518
1495
|
TestRunner.url = url;
|
|
1519
1496
|
TestRunner.dumpSyntaxHighlight = dumpSyntaxHighlight;
|
|
1520
|
-
TestRunner.loadModule = loadModule;
|
|
1521
1497
|
TestRunner.loadLegacyModule = loadLegacyModule;
|
|
1522
1498
|
TestRunner.loadTestModule = loadTestModule;
|
|
1523
1499
|
TestRunner.evaluateInPageRemoteObject = evaluateInPageRemoteObject;
|
|
@@ -329,7 +329,6 @@ class Binding {
|
|
|
329
329
|
readonly #project: ContentProviderBasedProject;
|
|
330
330
|
readonly #url: string;
|
|
331
331
|
referringSourceMaps: SDK.SourceMap.SourceMap[];
|
|
332
|
-
readonly #activeSourceMap?: SDK.SourceMap.SourceMap|null;
|
|
333
332
|
uiSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
334
333
|
|
|
335
334
|
constructor(project: ContentProviderBasedProject, url: string) {
|
|
@@ -614,15 +614,12 @@ class SourceScopeRemoteObject extends SDK.RemoteObject.RemoteObjectImpl {
|
|
|
614
614
|
variables: Chrome.DevTools.Variable[];
|
|
615
615
|
#callFrame: SDK.DebuggerModel.CallFrame;
|
|
616
616
|
#plugin: DebuggerLanguagePlugin;
|
|
617
|
-
readonly #location: Chrome.DevTools.RawLocation;
|
|
618
617
|
|
|
619
|
-
constructor(
|
|
620
|
-
callFrame: SDK.DebuggerModel.CallFrame, plugin: DebuggerLanguagePlugin, location: Chrome.DevTools.RawLocation) {
|
|
618
|
+
constructor(callFrame: SDK.DebuggerModel.CallFrame, plugin: DebuggerLanguagePlugin) {
|
|
621
619
|
super(callFrame.debuggerModel.runtimeModel(), undefined, 'object', undefined, null);
|
|
622
620
|
this.variables = [];
|
|
623
621
|
this.#callFrame = callFrame;
|
|
624
622
|
this.#plugin = plugin;
|
|
625
|
-
this.#location = location;
|
|
626
623
|
}
|
|
627
624
|
|
|
628
625
|
async doGetProperties(ownProperties: boolean, accessorPropertiesOnly: boolean, _generatePreview: boolean):
|
|
@@ -691,18 +688,16 @@ export class SourceScope implements SDK.DebuggerModel.ScopeChainEntry {
|
|
|
691
688
|
readonly #typeNameInternal: string;
|
|
692
689
|
readonly #iconInternal: string|undefined;
|
|
693
690
|
readonly #objectInternal: SourceScopeRemoteObject;
|
|
694
|
-
readonly #nameInternal: string;
|
|
695
691
|
readonly #startLocationInternal: SDK.DebuggerModel.Location|null;
|
|
696
692
|
readonly #endLocationInternal: SDK.DebuggerModel.Location|null;
|
|
697
693
|
constructor(
|
|
698
694
|
callFrame: SDK.DebuggerModel.CallFrame, type: string, typeName: string, icon: string|undefined,
|
|
699
|
-
plugin: DebuggerLanguagePlugin
|
|
695
|
+
plugin: DebuggerLanguagePlugin) {
|
|
700
696
|
this.#callFrameInternal = callFrame;
|
|
701
697
|
this.#typeInternal = type;
|
|
702
698
|
this.#typeNameInternal = typeName;
|
|
703
699
|
this.#iconInternal = icon;
|
|
704
|
-
this.#objectInternal = new SourceScopeRemoteObject(callFrame, plugin
|
|
705
|
-
this.#nameInternal = type;
|
|
700
|
+
this.#objectInternal = new SourceScopeRemoteObject(callFrame, plugin);
|
|
706
701
|
this.#startLocationInternal = null;
|
|
707
702
|
this.#endLocationInternal = null;
|
|
708
703
|
}
|
|
@@ -1154,7 +1149,7 @@ export class DebuggerLanguagePluginManager implements
|
|
|
1154
1149
|
let scope = scopes.get(variable.scope);
|
|
1155
1150
|
if (!scope) {
|
|
1156
1151
|
const {type, typeName, icon} = await plugin.getScopeInfo(variable.scope);
|
|
1157
|
-
scope = new SourceScope(callFrame, type, typeName, icon, plugin
|
|
1152
|
+
scope = new SourceScope(callFrame, type, typeName, icon, plugin);
|
|
1158
1153
|
scopes.set(variable.scope, scope);
|
|
1159
1154
|
}
|
|
1160
1155
|
scope.object().variables.push(variable);
|
|
@@ -1292,11 +1287,9 @@ export class DebuggerLanguagePluginManager implements
|
|
|
1292
1287
|
}
|
|
1293
1288
|
|
|
1294
1289
|
class ModelData {
|
|
1295
|
-
readonly #debuggerModel: SDK.DebuggerModel.DebuggerModel;
|
|
1296
1290
|
project: ContentProviderBasedProject;
|
|
1297
1291
|
readonly uiSourceCodeToScripts: Map<Workspace.UISourceCode.UISourceCode, SDK.Script.Script[]>;
|
|
1298
1292
|
constructor(debuggerModel: SDK.DebuggerModel.DebuggerModel, workspace: Workspace.Workspace.WorkspaceImpl) {
|
|
1299
|
-
this.#debuggerModel = debuggerModel;
|
|
1300
1293
|
this.project = new ContentProviderBasedProject(
|
|
1301
1294
|
workspace, 'language_plugins::' + debuggerModel.target().id(), Workspace.Workspace.projectTypes.Network, '',
|
|
1302
1295
|
false /* isServiceProject */);
|
|
@@ -165,7 +165,6 @@ class Binding {
|
|
|
165
165
|
readonly #project: ContentProviderBasedProject;
|
|
166
166
|
readonly #url: string;
|
|
167
167
|
referringSourceMaps: SDK.SourceMap.TextSourceMap[];
|
|
168
|
-
readonly #activeSourceMap?: SDK.SourceMap.TextSourceMap|null;
|
|
169
168
|
uiSourceCode: Workspace.UISourceCode.UISourceCode|null;
|
|
170
169
|
|
|
171
170
|
constructor(project: ContentProviderBasedProject, url: string) {
|
|
@@ -99,7 +99,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
99
99
|
#touchMobile: boolean;
|
|
100
100
|
#emulationModel: SDK.EmulationModel.EmulationModel|null;
|
|
101
101
|
#onModelAvailable: (() => void)|null;
|
|
102
|
-
#emulatedPageSize?: UI.Geometry.Size;
|
|
103
102
|
#outlineRectInternal?: Rect;
|
|
104
103
|
|
|
105
104
|
private constructor() {
|
|
@@ -622,7 +621,6 @@ export class DeviceModeModel extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
622
621
|
|
|
623
622
|
let pageWidth: 0|number = screenSize.width - insets.left - insets.right;
|
|
624
623
|
let pageHeight: 0|number = screenSize.height - insets.top - insets.bottom;
|
|
625
|
-
this.#emulatedPageSize = new UI.Geometry.Size(pageWidth, pageHeight);
|
|
626
624
|
|
|
627
625
|
const positionX = insets.left;
|
|
628
626
|
const positionY = insets.top;
|
|
@@ -13,7 +13,7 @@ const UIStrings = {
|
|
|
13
13
|
/**
|
|
14
14
|
*@description Label for the link for CORS private network issues
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
corsPrivateNetworkAccess: 'Private Network Access',
|
|
17
17
|
/**
|
|
18
18
|
*@description Label for the link for CORS network issues
|
|
19
19
|
*/
|
|
@@ -26,7 +26,6 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
26
26
|
// eslint-disable-next-line rulesdir/const_enum
|
|
27
27
|
export enum IssueCode {
|
|
28
28
|
InsecurePrivateNetwork = 'CorsIssue::InsecurePrivateNetwork',
|
|
29
|
-
InsecurePrivateNetworkPreflight = 'CorsIssue::InsecurePrivateNetworkPreflight',
|
|
30
29
|
InvalidHeaderValues = 'CorsIssue::InvalidHeaders',
|
|
31
30
|
WildcardOriginNotAllowed = 'CorsIssue::WildcardOriginWithCredentials',
|
|
32
31
|
PreflightResponseInvalid = 'CorsIssue::PreflightResponseInvalid',
|
|
@@ -37,12 +36,15 @@ export enum IssueCode {
|
|
|
37
36
|
RedirectContainsCredentials = 'CorsIssue::RedirectContainsCredentials',
|
|
38
37
|
DisallowedByMode = 'CorsIssue::DisallowedByMode',
|
|
39
38
|
CorsDisabledScheme = 'CorsIssue::CorsDisabledScheme',
|
|
39
|
+
// TODO(https://crbug.com/1263483): Remove this once it's removed from CDP.
|
|
40
40
|
PreflightMissingAllowExternal = 'CorsIssue::PreflightMissingAllowExternal',
|
|
41
|
+
// TODO(https://crbug.com/1263483): Remove this once it's removed from CDP.
|
|
41
42
|
PreflightInvalidAllowExternal = 'CorsIssue::PreflightInvalidAllowExternal',
|
|
42
43
|
InvalidResponse = 'CorsIssue::InvalidResponse',
|
|
43
44
|
NoCorsRedirectModeNotFollow = 'CorsIssue::NoCorsRedirectModeNotFollow',
|
|
44
45
|
InvalidPrivateNetworkAccess = 'CorsIssue::InvalidPrivateNetworkAccess',
|
|
45
46
|
UnexpectedPrivateNetworkAccess = 'CorsIssue::UnexpectedPrivateNetworkAccess',
|
|
47
|
+
PreflightAllowPrivateNetworkError = 'CorsIssue::PreflightAllowPrivateNetworkError',
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
|
|
@@ -85,14 +87,16 @@ function getIssueCode(details: Protocol.Audits.CorsIssueDetails): IssueCode {
|
|
|
85
87
|
case Protocol.Network.CorsError.InvalidResponse:
|
|
86
88
|
return IssueCode.InvalidResponse;
|
|
87
89
|
case Protocol.Network.CorsError.InsecurePrivateNetwork:
|
|
88
|
-
return
|
|
89
|
-
IssueCode.InsecurePrivateNetwork;
|
|
90
|
+
return IssueCode.InsecurePrivateNetwork;
|
|
90
91
|
case Protocol.Network.CorsError.NoCorsRedirectModeNotFollow:
|
|
91
92
|
return IssueCode.NoCorsRedirectModeNotFollow;
|
|
92
93
|
case Protocol.Network.CorsError.InvalidPrivateNetworkAccess:
|
|
93
94
|
return IssueCode.InvalidPrivateNetworkAccess;
|
|
94
95
|
case Protocol.Network.CorsError.UnexpectedPrivateNetworkAccess:
|
|
95
96
|
return IssueCode.UnexpectedPrivateNetworkAccess;
|
|
97
|
+
case Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork:
|
|
98
|
+
case Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork:
|
|
99
|
+
return IssueCode.PreflightAllowPrivateNetworkError;
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
102
|
|
|
@@ -121,15 +125,15 @@ export class CorsIssue extends Issue<IssueCode> {
|
|
|
121
125
|
file: 'corsInsecurePrivateNetwork.md',
|
|
122
126
|
links: [{
|
|
123
127
|
link: 'https://developer.chrome.com/blog/private-network-access-update',
|
|
124
|
-
linkTitle: i18nString(UIStrings.
|
|
128
|
+
linkTitle: i18nString(UIStrings.corsPrivateNetworkAccess),
|
|
125
129
|
}],
|
|
126
130
|
};
|
|
127
|
-
case IssueCode.
|
|
131
|
+
case IssueCode.PreflightAllowPrivateNetworkError:
|
|
128
132
|
return {
|
|
129
|
-
file: '
|
|
133
|
+
file: 'corsPreflightAllowPrivateNetworkError.md',
|
|
130
134
|
links: [{
|
|
131
135
|
link: 'https://developer.chrome.com/blog/private-network-access-update',
|
|
132
|
-
linkTitle: i18nString(UIStrings.
|
|
136
|
+
linkTitle: i18nString(UIStrings.corsPrivateNetworkAccess),
|
|
133
137
|
}],
|
|
134
138
|
};
|
|
135
139
|
case IssueCode.InvalidHeaderValues:
|
|
@@ -235,7 +239,11 @@ export class CorsIssue extends Issue<IssueCode> {
|
|
|
235
239
|
|
|
236
240
|
getKind(): IssueKind {
|
|
237
241
|
if (this.issueDetails.isWarning &&
|
|
238
|
-
this.issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork
|
|
242
|
+
(this.issueDetails.corsErrorStatus.corsError === Protocol.Network.CorsError.InsecurePrivateNetwork ||
|
|
243
|
+
this.issueDetails.corsErrorStatus.corsError ===
|
|
244
|
+
Protocol.Network.CorsError.PreflightMissingAllowPrivateNetwork ||
|
|
245
|
+
this.issueDetails.corsErrorStatus.corsError ===
|
|
246
|
+
Protocol.Network.CorsError.PreflightInvalidAllowPrivateNetwork)) {
|
|
239
247
|
return IssueKind.BreakingChange;
|
|
240
248
|
}
|
|
241
249
|
return IssueKind.PageError;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
A site requested a resource from a network that it could only access because of its users' privileged network position.
|
|
4
4
|
These requests expose devices and servers to the internet, increasing the risk of a cross-site request forgery (CSRF) attack, and/or information leakage.
|
|
5
5
|
|
|
6
|
-
To mitigate these risks,
|
|
6
|
+
To mitigate these risks, Chrome will require non-public subresources to opt-into being accessed with a preflight request and will start blocking them in Chrome 101 (April 2022).
|
|
7
7
|
|
|
8
8
|
To fix this issue, ensure that response to the [preflight request](issueCorsPreflightRequest) for the private network resource has the `Access-Control-Allow-Private-Network` header set to `true`.
|
|
9
9
|
|
|
@@ -107,7 +107,9 @@ export class AccessibilitySidebarView extends UI.ThrottledWidget.ThrottledWidget
|
|
|
107
107
|
if (!accessibilityModel) {
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
if (!Root.Runtime.experiments.isEnabled('fullAccessibilityTree')) {
|
|
111
|
+
accessibilityModel.clear();
|
|
112
|
+
}
|
|
111
113
|
await accessibilityModel.requestPartialAXTree(node);
|
|
112
114
|
this.accessibilityNodeCallback(accessibilityModel.axNodeForDOMNode(node));
|
|
113
115
|
}
|
|
@@ -107,7 +107,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements SDK.TargetManag
|
|
|
107
107
|
#uiAnimations: AnimationUI[];
|
|
108
108
|
#groupBuffer: AnimationGroup[];
|
|
109
109
|
readonly #previewMap: Map<AnimationGroup, AnimationGroupPreviewUI>;
|
|
110
|
-
readonly #symbol: symbol;
|
|
111
110
|
readonly #animationsMap: Map<string, AnimationImpl>;
|
|
112
111
|
#timelineScrubberLine?: HTMLElement;
|
|
113
112
|
#pauseButton?: UI.Toolbar.ToolbarToggle;
|
|
@@ -143,7 +142,6 @@ export class AnimationTimeline extends UI.Widget.VBox implements SDK.TargetManag
|
|
|
143
142
|
this.#uiAnimations = [];
|
|
144
143
|
this.#groupBuffer = [];
|
|
145
144
|
this.#previewMap = new Map();
|
|
146
|
-
this.#symbol = Symbol('animationTimeline');
|
|
147
145
|
this.#animationsMap = new Map();
|
|
148
146
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
149
147
|
SDK.DOMModel.DOMModel, SDK.DOMModel.Events.NodeRemoved, this.nodeRemoved, this);
|
|
@@ -42,7 +42,6 @@ type CachedElement = {
|
|
|
42
42
|
export class AnimationUI {
|
|
43
43
|
#animationInternal: AnimationImpl;
|
|
44
44
|
#timeline: AnimationTimeline;
|
|
45
|
-
readonly #parentElement: Element;
|
|
46
45
|
#keyframes?: KeyframeStyle[];
|
|
47
46
|
#nameElement: HTMLElement;
|
|
48
47
|
readonly #svg: Element;
|
|
@@ -62,7 +61,6 @@ export class AnimationUI {
|
|
|
62
61
|
constructor(animation: AnimationImpl, timeline: AnimationTimeline, parentElement: Element) {
|
|
63
62
|
this.#animationInternal = animation;
|
|
64
63
|
this.#timeline = timeline;
|
|
65
|
-
this.#parentElement = parentElement;
|
|
66
64
|
|
|
67
65
|
const keyframesRule = this.#animationInternal.source().keyframesRule();
|
|
68
66
|
if (keyframesRule) {
|
|
@@ -154,10 +154,6 @@ const UIStrings = {
|
|
|
154
154
|
* @description Description text for not restored reason BackForwardCacheDisabledForDelegate.
|
|
155
155
|
*/
|
|
156
156
|
backForwardCacheDisabledForDelegate: 'Back/forward cache is not supported by delegate.',
|
|
157
|
-
/**
|
|
158
|
-
* @description Description text for not restored reason OptInUnloadHeaderNotPresent.
|
|
159
|
-
*/
|
|
160
|
-
optInUnloadHeaderNotPresent: 'The page has unload handler without the back/forward cache opt-in header.',
|
|
161
157
|
/**
|
|
162
158
|
* @description Description text for not restored reason UnloadHandlerExistsInMainFrame.
|
|
163
159
|
*/
|
|
@@ -466,7 +462,7 @@ export const NotRestoredReasonDescription = {
|
|
|
466
462
|
'UserAgentOverrideDiffers': {name: i18nLazyString(UIStrings.userAgentOverrideDiffers)},
|
|
467
463
|
'ForegroundCacheLimit': {name: i18nLazyString(UIStrings.foregroundCacheLimit)},
|
|
468
464
|
'BackForwardCacheDisabledForDelegate': {name: i18nLazyString(UIStrings.backForwardCacheDisabledForDelegate)},
|
|
469
|
-
'OptInUnloadHeaderNotPresent': {name: i18nLazyString(UIStrings.
|
|
465
|
+
'OptInUnloadHeaderNotPresent': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
|
|
470
466
|
'UnloadHandlerExistsInMainFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInMainFrame)},
|
|
471
467
|
'UnloadHandlerExistsInSubFrame': {name: i18nLazyString(UIStrings.unloadHandlerExistsInSubFrame)},
|
|
472
468
|
'ServiceWorkerUnregistration': {name: i18nLazyString(UIStrings.serviceWorkerUnregistration)},
|
|
@@ -541,6 +537,7 @@ export const NotRestoredReasonDescription = {
|
|
|
541
537
|
'ContentMediaSession': {name: i18nLazyString(UIStrings.contentMediaSession)},
|
|
542
538
|
'ContentMediaSessionService': {name: i18nLazyString(UIStrings.contentMediaSessionService)},
|
|
543
539
|
'ContentMediaPlay': {name: i18nLazyString(UIStrings.contentMediaPlay)},
|
|
540
|
+
'ContentScreenReader': {name: i18n.i18n.lockedLazyString('ContentScreenReader')},
|
|
544
541
|
'EmbedderPopupBlockerTabHelper': {name: i18n.i18n.lockedLazyString('EmbedderPopupBlockerTabHelper')},
|
|
545
542
|
'EmbedderSafeBrowsingTriggeredPopupBlocker':
|
|
546
543
|
{name: i18n.i18n.lockedLazyString('EmbedderSafeBrowsingTriggeredPopupBlocker')},
|