chrome-devtools-frontend 1.0.927127 → 1.0.928589
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AUTHORS +1 -0
- package/config/gni/all_devtools_files.gni +0 -1
- package/config/gni/devtools_grd_files.gni +30 -4
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/ic_preview_feature.svg +3 -0
- package/front_end/Tests.js +2 -3
- package/front_end/core/common/Settings.ts +26 -45
- package/front_end/core/host/UserMetrics.ts +2 -2
- package/front_end/core/i18n/locales/en-US.json +60 -15
- package/front_end/core/i18n/locales/en-XL.json +60 -15
- package/front_end/core/platform/keyboard-utilities.ts +1 -0
- package/front_end/core/root/Runtime.ts +62 -61
- package/front_end/core/sdk/AccessibilityModel.ts +73 -73
- package/front_end/core/sdk/CPUProfileDataModel.ts +14 -14
- package/front_end/core/sdk/CPUProfilerModel.ts +33 -33
- package/front_end/core/sdk/CPUThrottlingManager.ts +8 -8
- package/front_end/core/sdk/CSSFontFace.ts +10 -10
- package/front_end/core/sdk/CSSMatchedStyles.ts +114 -114
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSMetadata.ts +53 -49
- package/front_end/core/sdk/CSSModel.ts +139 -135
- package/front_end/core/sdk/CSSProperty.ts +18 -18
- package/front_end/core/sdk/CSSRule.ts +15 -15
- package/front_end/core/sdk/CSSStyleDeclaration.ts +49 -47
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +12 -12
- package/front_end/core/sdk/ChildTargetManager.ts +41 -40
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +10 -10
- package/front_end/core/sdk/Connections.ts +81 -81
- package/front_end/core/sdk/ConsoleModel.ts +68 -68
- package/front_end/core/sdk/Cookie.ts +48 -48
- package/front_end/core/sdk/CookieModel.ts +13 -13
- package/front_end/core/sdk/CookieParser.ts +45 -45
- package/front_end/core/sdk/DOMDebuggerModel.ts +131 -131
- package/front_end/core/sdk/DOMModel.ts +264 -252
- package/front_end/core/sdk/DebuggerModel.ts +209 -205
- package/front_end/core/sdk/EmulationModel.ts +76 -76
- package/front_end/core/sdk/FilmStripModel.ts +29 -29
- package/front_end/core/sdk/FrameManager.ts +43 -42
- package/front_end/core/sdk/HeapProfilerModel.ts +36 -36
- package/front_end/core/sdk/IsolateManager.ts +82 -82
- package/front_end/core/sdk/IssuesModel.ts +6 -6
- package/front_end/core/sdk/LayerTreeBase.ts +37 -37
- package/front_end/core/sdk/LogModel.ts +5 -5
- package/front_end/core/sdk/NetworkManager.ts +229 -225
- package/front_end/core/sdk/NetworkRequest.ts +368 -360
- package/front_end/core/sdk/OverlayColorGenerator.ts +9 -9
- package/front_end/core/sdk/OverlayModel.ts +155 -153
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +100 -101
- package/front_end/core/sdk/PageResourceLoader.ts +30 -30
- package/front_end/core/sdk/PaintProfiler.ts +16 -16
- package/front_end/core/sdk/PerformanceMetricsModel.ts +12 -12
- package/front_end/core/sdk/ProfileTreeModel.ts +3 -3
- package/front_end/core/sdk/RemoteObject.ts +108 -104
- package/front_end/core/sdk/Resource.ts +85 -84
- package/front_end/core/sdk/ResourceTreeModel.ts +150 -145
- package/front_end/core/sdk/RuntimeModel.ts +38 -34
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/ScreenCaptureModel.ts +19 -19
- package/front_end/core/sdk/Script.ts +29 -29
- package/front_end/core/sdk/SecurityOriginManager.ts +19 -19
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +43 -43
- package/front_end/core/sdk/ServiceWorkerManager.ts +72 -68
- package/front_end/core/sdk/SourceMap.ts +40 -36
- package/front_end/core/sdk/SourceMapManager.ts +57 -57
- package/front_end/core/sdk/Target.ts +64 -63
- package/front_end/core/sdk/TargetManager.ts +60 -56
- package/front_end/core/sdk/TracingManager.ts +39 -39
- package/front_end/core/sdk/TracingModel.ts +125 -125
- package/front_end/core/sdk/WebAuthnModel.ts +9 -9
- package/front_end/entrypoints/lighthouse_worker/{LighthouseService.js → LighthouseService.ts} +20 -45
- package/front_end/entrypoints/lighthouse_worker/{lighthouse_worker.js → lighthouse_worker.ts} +0 -0
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/legacy_test_runner/elements_test_runner/ElementsTestRunner.js +4 -4
- package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +1 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -6
- package/front_end/models/issues_manager/GenericIssue.ts +86 -0
- package/front_end/models/issues_manager/Issue.ts +24 -0
- package/front_end/models/issues_manager/IssuesManager.ts +18 -6
- package/front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5422 -1
- package/front_end/panels/console/ConsoleSidebar.ts +0 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +53 -61
- package/front_end/panels/elements/ElementsTreeOutline.ts +0 -1
- package/front_end/panels/elements/components/LayoutPane.ts +5 -1
- package/front_end/panels/issues/GenericIssueDetailsView.ts +68 -0
- package/front_end/panels/issues/IssueAggregator.ts +16 -0
- package/front_end/panels/issues/IssueKindView.ts +95 -0
- package/front_end/panels/issues/IssueView.ts +6 -0
- package/front_end/panels/issues/IssuesPane.ts +81 -18
- package/front_end/panels/issues/issuesTree.css +8 -3
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -1
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -0
- package/front_end/panels/settings/settingsScreen.css +24 -0
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +8 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/sources-meta.ts +22 -7
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +4 -4
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +137 -0
- package/front_end/ui/components/code_highlighter/codeHighlighter.css +51 -0
- package/front_end/ui/components/code_highlighter/code_highlighter.ts +11 -0
- package/front_end/ui/components/docs/text_editor/basic.html +28 -0
- package/front_end/ui/components/docs/text_editor/basic.ts +14 -0
- package/front_end/ui/components/docs/text_prompt/basic.html +35 -0
- package/front_end/ui/components/docs/text_prompt/basic.ts +19 -0
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +17 -0
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +161 -0
- package/front_end/ui/components/text_editor/config.ts +264 -0
- package/front_end/{panels/console/components/components.ts → ui/components/text_editor/text_editor.ts} +2 -5
- package/front_end/ui/components/text_editor/theme.ts +113 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +144 -0
- package/front_end/ui/components/text_prompt/textPrompt.css +33 -0
- package/front_end/ui/components/text_prompt/text_prompt.ts +9 -0
- package/front_end/ui/legacy/ARIAUtils.ts +14 -11
- package/front_end/ui/legacy/TabbedPane.ts +32 -3
- package/front_end/ui/legacy/UIUtils.ts +3 -1
- package/front_end/ui/legacy/View.ts +6 -0
- package/front_end/ui/legacy/ViewManager.ts +5 -1
- package/front_end/ui/legacy/ViewRegistration.ts +5 -0
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/closeButton.css +6 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +38 -38
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +10 -4
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +23 -6
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +14 -16
- package/front_end/ui/legacy/filter.css +1 -0
- package/front_end/ui/legacy/tabbedPane.css +24 -0
- package/front_end/ui/legacy/toolbar.css +5 -0
- package/inspector_overlay/main.ts +2 -1
- package/inspector_overlay/tool_screenshot.ts +8 -1
- package/package.json +1 -1
- package/scripts/build/rollup.config.js +9 -0
- package/scripts/migration/class-fields/migrate.js +56 -0
- package/scripts/migration/class-fields/package.json +5 -0
- package/front_end/panels/console/components/SidebarDeprecation.ts +0 -58
- package/front_end/panels/console/components/sidebarDeprecation.css +0 -17
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright 2021 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
|
+
const {Project, ts, SyntaxKind, StructureKind} = require('ts-morph');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const project = new Project({
|
|
8
|
+
tsConfigFilePath: '../devtools-frontend/tsconfig.json',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
function isWithinContructor(classNode, reference) {
|
|
12
|
+
const constructors = classNode.getConstructors();
|
|
13
|
+
if (!constructors.length) {
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (constructors.length !== 1) {
|
|
18
|
+
throw new Error('More than one constructor');
|
|
19
|
+
}
|
|
20
|
+
return reference.getAncestors().includes(constructors[0]);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const files = project.getSourceFiles();
|
|
24
|
+
for (const file of files) {
|
|
25
|
+
const filePath = file.getFilePath();
|
|
26
|
+
if (!filePath.startsWith(
|
|
27
|
+
path.normalize(path.join(process.cwd(), '..', 'devtools-frontend', 'front_end', process.argv[2])))) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
console.log(filePath);
|
|
31
|
+
if (filePath.includes('third_party') || filePath.includes('generated') || filePath.endsWith('.d.ts')) {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
const classNodes = file.getClasses();
|
|
35
|
+
for (const classNode of classNodes) {
|
|
36
|
+
for (const property of classNode.getInstanceProperties()) {
|
|
37
|
+
const name = property.getStructure().name;
|
|
38
|
+
console.log(name);
|
|
39
|
+
if (name.startsWith('#') || !property.hasModifier(SyntaxKind.PrivateKeyword)) {
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (isWithinContructor(classNode, property)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
property.toggleModifier('private', false);
|
|
48
|
+
// https://github.com/dsherret/ts-morph/issues/1198
|
|
49
|
+
property.rename(`SOME_STUPID_PREFIX_${name}`, {
|
|
50
|
+
renameInComments: true,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
file.saveSync();
|
|
55
|
+
}
|
|
56
|
+
// project.save();
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 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
|
-
import * as i18n from '../../../core/i18n/i18n.js';
|
|
5
|
-
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
6
|
-
import * as Linkifier from '../../../ui/components/linkifier/linkifier.js';
|
|
7
|
-
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
|
8
|
-
|
|
9
|
-
import sidebarDeprecationStyles from './sidebarDeprecation.css.js';
|
|
10
|
-
|
|
11
|
-
const UIStrings = {
|
|
12
|
-
/**
|
|
13
|
-
* @description The main text for the deprecation warning in the Console Sidebar.
|
|
14
|
-
*/
|
|
15
|
-
deprecationNotice:
|
|
16
|
-
'This sidebar will be removed in a future version of Chrome. If you have feedback, please let us know via the',
|
|
17
|
-
/**
|
|
18
|
-
* @description the clickable text to take the user to the CRBug to give feedback.
|
|
19
|
-
*/
|
|
20
|
-
issueTrackerLinkText: 'issue tracker',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
const str_ = i18n.i18n.registerUIStrings('panels/console/components/SidebarDeprecation.ts', UIStrings);
|
|
24
|
-
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
|
-
export class SidebarDeprecation extends HTMLElement {
|
|
26
|
-
static readonly litTagName = LitHtml.literal`devtools-console-sidebar-deprecation`;
|
|
27
|
-
private readonly shadow = this.attachShadow({mode: 'open'});
|
|
28
|
-
private readonly renderBound = this.render.bind(this);
|
|
29
|
-
|
|
30
|
-
connectedCallback(): void {
|
|
31
|
-
this.shadow.adoptedStyleSheets = [sidebarDeprecationStyles];
|
|
32
|
-
ComponentHelpers.ScheduledRender.scheduleRender(this, this.renderBound);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private async render(): Promise<void> {
|
|
36
|
-
if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {
|
|
37
|
-
throw new Error('ConsoleSidebar render was not scheduled');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// clang-format off
|
|
41
|
-
const link = LitHtml.html`<${Linkifier.Linkifier.Linkifier.litTagName} .data=${{
|
|
42
|
-
url: 'https://crbug.com/1232937',
|
|
43
|
-
} as Linkifier.Linkifier.LinkifierData}>${i18nString(UIStrings.issueTrackerLinkText)}</${Linkifier.Linkifier.Linkifier.litTagName}>`;
|
|
44
|
-
|
|
45
|
-
LitHtml.render(LitHtml.html`<p>
|
|
46
|
-
${i18nString(UIStrings.deprecationNotice)} ${link}.
|
|
47
|
-
</p>`, this.shadow, {host: this});
|
|
48
|
-
// clang-format on
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
ComponentHelpers.CustomElements.defineComponent('devtools-console-sidebar-deprecation', SidebarDeprecation);
|
|
53
|
-
|
|
54
|
-
declare global {
|
|
55
|
-
interface HTMLElementTagNameMap {
|
|
56
|
-
'devtools-console-sidebar-deprecation': SidebarDeprecation;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2021 The Chromium Authors. All rights reserved.
|
|
3
|
-
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
-
* found in the LICENSE file.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
:host {
|
|
8
|
-
display: block;
|
|
9
|
-
background-color: var(--color-background-elevation-1);
|
|
10
|
-
padding: 4px 8px;
|
|
11
|
-
border-bottom: 1px solid var(--color-details-hairline);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.issue-tracker-link {
|
|
15
|
-
color: var(--color-primary);
|
|
16
|
-
text-decoration: underline;
|
|
17
|
-
}
|