chrome-devtools-frontend 1.0.965113 → 1.0.967135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +5 -5
- package/front_end/core/common/ResolverBase.ts +2 -2
- package/front_end/core/i18n/locales/af.json +55 -22
- package/front_end/core/i18n/locales/am.json +55 -22
- package/front_end/core/i18n/locales/ar.json +55 -22
- package/front_end/core/i18n/locales/as.json +55 -22
- package/front_end/core/i18n/locales/az.json +55 -22
- package/front_end/core/i18n/locales/be.json +55 -22
- package/front_end/core/i18n/locales/bg.json +55 -22
- package/front_end/core/i18n/locales/bn.json +33 -0
- package/front_end/core/i18n/locales/bs.json +53 -20
- package/front_end/core/i18n/locales/ca.json +55 -22
- package/front_end/core/i18n/locales/cs.json +54 -21
- package/front_end/core/i18n/locales/cy.json +55 -22
- package/front_end/core/i18n/locales/da.json +54 -21
- package/front_end/core/i18n/locales/de.json +55 -22
- package/front_end/core/i18n/locales/el.json +55 -22
- package/front_end/core/i18n/locales/en-GB.json +33 -0
- package/front_end/core/i18n/locales/es-419.json +55 -22
- package/front_end/core/i18n/locales/es.json +55 -22
- package/front_end/core/i18n/locales/et.json +55 -22
- package/front_end/core/i18n/locales/eu.json +33 -0
- package/front_end/core/i18n/locales/fa.json +56 -23
- package/front_end/core/i18n/locales/fi.json +55 -22
- package/front_end/core/i18n/locales/fil.json +55 -22
- package/front_end/core/i18n/locales/fr-CA.json +55 -22
- package/front_end/core/i18n/locales/fr.json +55 -22
- package/front_end/core/i18n/locales/gl.json +55 -22
- package/front_end/core/i18n/locales/gu.json +33 -0
- package/front_end/core/i18n/locales/he.json +55 -22
- package/front_end/core/i18n/locales/hi.json +33 -0
- package/front_end/core/i18n/locales/hr.json +33 -0
- package/front_end/core/i18n/locales/hu.json +55 -22
- package/front_end/core/i18n/locales/hy.json +55 -22
- package/front_end/core/i18n/locales/id.json +55 -22
- package/front_end/core/i18n/locales/is.json +55 -22
- package/front_end/core/i18n/locales/it.json +55 -22
- package/front_end/core/i18n/locales/ja.json +63 -30
- package/front_end/core/i18n/locales/ka.json +55 -22
- package/front_end/core/i18n/locales/kk.json +55 -22
- package/front_end/core/i18n/locales/km.json +55 -22
- package/front_end/core/i18n/locales/kn.json +55 -22
- package/front_end/core/i18n/locales/ko.json +55 -22
- package/front_end/core/i18n/locales/ky.json +55 -22
- package/front_end/core/i18n/locales/lo.json +55 -22
- package/front_end/core/i18n/locales/lt.json +55 -22
- package/front_end/core/i18n/locales/lv.json +55 -22
- package/front_end/core/i18n/locales/mk.json +55 -22
- package/front_end/core/i18n/locales/ml.json +33 -0
- package/front_end/core/i18n/locales/mn.json +33 -0
- package/front_end/core/i18n/locales/mr.json +54 -21
- package/front_end/core/i18n/locales/ms.json +55 -22
- package/front_end/core/i18n/locales/my.json +55 -22
- package/front_end/core/i18n/locales/ne.json +54 -21
- package/front_end/core/i18n/locales/nl.json +55 -22
- package/front_end/core/i18n/locales/no.json +55 -22
- package/front_end/core/i18n/locales/or.json +55 -22
- package/front_end/core/i18n/locales/pa.json +55 -22
- package/front_end/core/i18n/locales/pl.json +33 -0
- package/front_end/core/i18n/locales/pt-PT.json +55 -22
- package/front_end/core/i18n/locales/pt.json +55 -22
- package/front_end/core/i18n/locales/ro.json +33 -0
- package/front_end/core/i18n/locales/ru.json +55 -22
- package/front_end/core/i18n/locales/si.json +55 -22
- package/front_end/core/i18n/locales/sk.json +55 -22
- package/front_end/core/i18n/locales/sl.json +55 -22
- package/front_end/core/i18n/locales/sq.json +55 -22
- package/front_end/core/i18n/locales/sr-Latn.json +55 -22
- package/front_end/core/i18n/locales/sr.json +55 -22
- package/front_end/core/i18n/locales/sv.json +55 -22
- package/front_end/core/i18n/locales/sw.json +55 -22
- package/front_end/core/i18n/locales/ta.json +55 -22
- package/front_end/core/i18n/locales/te.json +42 -9
- package/front_end/core/i18n/locales/th.json +33 -0
- package/front_end/core/i18n/locales/tr.json +55 -22
- package/front_end/core/i18n/locales/uk.json +55 -22
- package/front_end/core/i18n/locales/ur.json +55 -22
- package/front_end/core/i18n/locales/uz.json +55 -22
- package/front_end/core/i18n/locales/vi.json +54 -21
- package/front_end/core/i18n/locales/zh-HK.json +55 -22
- package/front_end/core/i18n/locales/zh-TW.json +54 -21
- package/front_end/core/i18n/locales/zh.json +55 -22
- package/front_end/core/i18n/locales/zu.json +55 -22
- package/front_end/core/protocol_client/InspectorBackend.ts +8 -0
- package/front_end/core/sdk/CSSProperty.ts +8 -8
- package/front_end/core/sdk/NetworkManager.ts +58 -70
- package/front_end/core/sdk/RemoteObject.ts +1 -1
- package/front_end/core/sdk/Resource.ts +5 -2
- package/front_end/core/sdk/RuntimeModel.ts +10 -0
- package/front_end/devtools_compatibility.js +19 -0
- package/front_end/entrypoints/formatter_worker/formatter_worker.ts +4 -4
- package/front_end/generated/InspectorBackendCommands.js +27 -2
- package/front_end/generated/protocol.ts +61 -0
- package/front_end/legacy_test_runner/bindings_test_runner/PersistenceTestRunner.js +2 -2
- package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +10 -3
- package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -2
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +5 -5
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/extensions/ExtensionServer.ts +7 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +18 -21
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +1 -1
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -4
- package/front_end/models/workspace/WorkspaceImpl.ts +62 -37
- package/front_end/panels/console/ConsoleViewMessage.ts +33 -6
- package/front_end/panels/console/ErrorStackParser.ts +34 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +14 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +0 -3
- package/front_end/panels/emulation/DeviceModeView.ts +6 -2
- package/front_end/panels/event_listeners/EventListenersUtils.ts +3 -2
- package/front_end/panels/event_listeners/EventListenersView.ts +3 -3
- package/front_end/panels/lighthouse/lighthouse.ts +1 -1
- package/front_end/panels/sources/DebuggerPausedMessage.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +7 -10
- package/front_end/panels/sources/UISourceCodeFrame.ts +4 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +1 -2
- package/front_end/panels/sources/debuggerPausedMessage.css +5 -1
- package/front_end/third_party/codemirror/README.chromium +5 -0
- package/front_end/third_party/codemirror/codemirror-tsconfig.json +4 -4
- package/front_end/third_party/codemirror/package/addon/runmode/{runmode-standalone.js → runmode-standalone.mjs} +0 -0
- package/front_end/third_party/codemirror/package/addon/runmode/{runmode-standalone.d.ts → runmode-standalone.mjs.d.ts} +0 -0
- package/front_end/third_party/codemirror/package/mode/css/{css.js → css.mjs} +0 -0
- package/front_end/third_party/codemirror/package/mode/css/{css.d.ts → css.mjs.d.ts} +0 -0
- package/front_end/third_party/codemirror/package/mode/javascript/{javascript.js → javascript.mjs} +0 -0
- package/front_end/third_party/codemirror/package/mode/javascript/{javascript.d.ts → javascript.mjs.d.ts} +0 -0
- package/front_end/third_party/codemirror/package/mode/xml/{xml.js → xml.mjs} +0 -0
- package/front_end/third_party/codemirror/package/mode/xml/{xml.d.ts → xml.mjs.d.ts} +0 -0
- package/front_end/third_party/lighthouse/README.chromium +0 -1
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +954 -885
- package/front_end/third_party/lighthouse/lighthouse-tsconfig.json +1 -1
- package/front_end/third_party/lighthouse/locales/ar-XB.json +40 -4
- package/front_end/third_party/lighthouse/locales/ar.json +59 -23
- package/front_end/third_party/lighthouse/locales/bg.json +40 -4
- package/front_end/third_party/lighthouse/locales/ca.json +45 -9
- package/front_end/third_party/lighthouse/locales/cs.json +39 -3
- package/front_end/third_party/lighthouse/locales/da.json +43 -7
- package/front_end/third_party/lighthouse/locales/de.json +42 -6
- package/front_end/third_party/lighthouse/locales/el.json +59 -23
- package/front_end/third_party/lighthouse/locales/en-GB.json +43 -7
- package/front_end/third_party/lighthouse/locales/en-US.json +48 -6
- package/front_end/third_party/lighthouse/locales/en-XA.json +40 -4
- package/front_end/third_party/lighthouse/locales/en-XL.json +48 -6
- package/front_end/third_party/lighthouse/locales/es-419.json +39 -3
- package/front_end/third_party/lighthouse/locales/es.json +46 -10
- package/front_end/third_party/lighthouse/locales/fi.json +57 -21
- package/front_end/third_party/lighthouse/locales/fil.json +40 -4
- package/front_end/third_party/lighthouse/locales/fr.json +45 -9
- package/front_end/third_party/lighthouse/locales/he.json +41 -5
- package/front_end/third_party/lighthouse/locales/hi.json +59 -23
- package/front_end/third_party/lighthouse/locales/hr.json +57 -21
- package/front_end/third_party/lighthouse/locales/hu.json +39 -3
- package/front_end/third_party/lighthouse/locales/id.json +40 -4
- package/front_end/third_party/lighthouse/locales/it.json +40 -4
- package/front_end/third_party/lighthouse/locales/ja.json +39 -3
- package/front_end/third_party/lighthouse/locales/ko.json +40 -4
- package/front_end/third_party/lighthouse/locales/lt.json +40 -4
- package/front_end/third_party/lighthouse/locales/lv.json +56 -20
- package/front_end/third_party/lighthouse/locales/nl.json +40 -4
- package/front_end/third_party/lighthouse/locales/no.json +56 -20
- package/front_end/third_party/lighthouse/locales/pl.json +56 -20
- package/front_end/third_party/lighthouse/locales/pt-PT.json +57 -21
- package/front_end/third_party/lighthouse/locales/pt.json +41 -5
- package/front_end/third_party/lighthouse/locales/ro.json +39 -3
- package/front_end/third_party/lighthouse/locales/ru.json +40 -4
- package/front_end/third_party/lighthouse/locales/sk.json +39 -3
- package/front_end/third_party/lighthouse/locales/sl.json +39 -3
- package/front_end/third_party/lighthouse/locales/sr-Latn.json +40 -4
- package/front_end/third_party/lighthouse/locales/sr.json +40 -4
- package/front_end/third_party/lighthouse/locales/sv.json +39 -3
- package/front_end/third_party/lighthouse/locales/ta.json +47 -11
- package/front_end/third_party/lighthouse/locales/te.json +61 -25
- package/front_end/third_party/lighthouse/locales/th.json +39 -3
- package/front_end/third_party/lighthouse/locales/tr.json +40 -4
- package/front_end/third_party/lighthouse/locales/uk.json +40 -4
- package/front_end/third_party/lighthouse/locales/vi.json +63 -27
- package/front_end/third_party/lighthouse/locales/zh-HK.json +40 -4
- package/front_end/third_party/lighthouse/locales/zh-TW.json +45 -9
- package/front_end/third_party/lighthouse/locales/zh.json +41 -5
- package/front_end/third_party/lighthouse/report/bundle.d.ts +1 -0
- package/front_end/third_party/lighthouse/report/bundle.js +23 -11
- package/front_end/third_party/lighthouse/report-assets/{report-generator.js → report-generator.mjs} +1 -1
- package/front_end/third_party/lighthouse/report-assets/{report-generator.d.ts → report-generator.mjs.d.ts} +0 -0
- package/front_end/third_party/puppeteer/puppeteer.ts +1 -2
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +3 -3
- package/front_end/ui/legacy/Icon.ts +2 -2
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +4 -4
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +2 -2
- package/front_end/ui/legacy/themeColors.css +1 -1
- package/package.json +1 -1
- package/scripts/build/devtools_plugin.js +11 -0
- package/scripts/build/esbuild.js +63 -0
- package/scripts/build/ninja/bundle.gni +77 -32
- package/scripts/build/ninja/minify-json-files.js +19 -0
- package/scripts/build/ninja/minify_json.gni +28 -0
- package/scripts/javascript_natives/index.js +9 -6
- package/scripts/javascript_natives/package.json +4 -4
@@ -56,7 +56,7 @@ import type {Chrome} from '../../../extension-api/ExtensionAPI.js'; // eslint-di
|
|
56
56
|
import {format} from './ConsoleFormat.js';
|
57
57
|
import type {ConsoleViewportElement} from './ConsoleViewport.js';
|
58
58
|
import consoleViewStyles from './consoleView.css.js';
|
59
|
-
import {parseSourcePositionsFromErrorStack} from './ErrorStackParser.js';
|
59
|
+
import {augmentErrorStackWithScriptIds, parseSourcePositionsFromErrorStack} from './ErrorStackParser.js';
|
60
60
|
|
61
61
|
const UIStrings = {
|
62
62
|
/**
|
@@ -236,6 +236,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
236
236
|
private requestResolver: Logs.RequestResolver.RequestResolver;
|
237
237
|
private issueResolver: IssuesManager.IssueResolver.IssueResolver;
|
238
238
|
|
239
|
+
/** Formatting Error#stack is asynchronous. Allow tests to wait for the result */
|
240
|
+
#formatErrorStackPromiseForTest = Promise.resolve();
|
241
|
+
|
239
242
|
constructor(
|
240
243
|
consoleMessage: SDK.ConsoleModel.ConsoleMessage, linkifier: Components.Linkifier.Linkifier,
|
241
244
|
requestResolver: Logs.RequestResolver.RequestResolver, issueResolver: IssuesManager.IssueResolver.IssueResolver,
|
@@ -307,6 +310,10 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
307
310
|
return this.message;
|
308
311
|
}
|
309
312
|
|
313
|
+
formatErrorStackPromiseForTest(): Promise<void> {
|
314
|
+
return this.#formatErrorStackPromiseForTest;
|
315
|
+
}
|
316
|
+
|
310
317
|
protected buildMessage(): HTMLElement {
|
311
318
|
let messageElement;
|
312
319
|
let messageText: Common.UIString.LocalizedString|string = this.message.messageText;
|
@@ -816,11 +823,28 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
816
823
|
|
817
824
|
private formatParameterAsError(output: SDK.RemoteObject.RemoteObject): HTMLElement {
|
818
825
|
const result = document.createElement('span');
|
819
|
-
const
|
820
|
-
|
826
|
+
const errorStack = output.description || '';
|
827
|
+
|
828
|
+
// Combine the ExceptionDetails for this error object with the parsed Error#stack.
|
829
|
+
// The Exceptiondetails include script IDs for stack frames, which allows more accurate
|
830
|
+
// linking.
|
831
|
+
this.#formatErrorStackPromiseForTest = this.retrieveExceptionDetails(output).then(exceptionDetails => {
|
832
|
+
const errorSpan = this.tryFormatAsError(errorStack, exceptionDetails);
|
833
|
+
result.appendChild(errorSpan ?? this.linkifyStringAsFragment(errorStack));
|
834
|
+
});
|
835
|
+
|
821
836
|
return result;
|
822
837
|
}
|
823
838
|
|
839
|
+
private async retrieveExceptionDetails(errorObject: SDK.RemoteObject.RemoteObject):
|
840
|
+
Promise<Protocol.Runtime.ExceptionDetails|undefined> {
|
841
|
+
const runtimeModel = this.message.runtimeModel();
|
842
|
+
if (runtimeModel && errorObject.objectId) {
|
843
|
+
return runtimeModel.getExceptionDetails(errorObject.objectId);
|
844
|
+
}
|
845
|
+
return undefined;
|
846
|
+
}
|
847
|
+
|
824
848
|
private formatAsArrayEntry(output: SDK.RemoteObject.RemoteObject): HTMLElement {
|
825
849
|
return this.previewFormatter.renderPropertyPreview(
|
826
850
|
output.type, output.subtype, output.className, output.description);
|
@@ -1422,7 +1446,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1422
1446
|
return true;
|
1423
1447
|
}
|
1424
1448
|
|
1425
|
-
private tryFormatAsError(string: string): HTMLElement|null {
|
1449
|
+
private tryFormatAsError(string: string, exceptionDetails?: Protocol.Runtime.ExceptionDetails): HTMLElement|null {
|
1426
1450
|
const runtimeModel = this.message.runtimeModel();
|
1427
1451
|
if (!runtimeModel) {
|
1428
1452
|
return null;
|
@@ -1432,6 +1456,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1432
1456
|
if (!linkInfos?.length) {
|
1433
1457
|
return null;
|
1434
1458
|
}
|
1459
|
+
if (exceptionDetails?.stackTrace) {
|
1460
|
+
augmentErrorStackWithScriptIds(linkInfos, exceptionDetails.stackTrace);
|
1461
|
+
}
|
1435
1462
|
|
1436
1463
|
const debuggerModel = runtimeModel.debuggerModel();
|
1437
1464
|
const formattedResult = document.createElement('span');
|
@@ -1447,8 +1474,8 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
1447
1474
|
const suffix = `${line.substring(link.positionRight)}${newline}`;
|
1448
1475
|
|
1449
1476
|
formattedLine.appendChild(this.linkifyStringAsFragment(prefix));
|
1450
|
-
const scriptLocationLink =
|
1451
|
-
|
1477
|
+
const scriptLocationLink = this.linkifier.linkifyScriptLocation(
|
1478
|
+
debuggerModel.target(), link.scriptId || null, link.url, link.lineNumber, {
|
1452
1479
|
columnNumber: link.columnNumber,
|
1453
1480
|
className: undefined,
|
1454
1481
|
tabStop: undefined,
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import type * as SDK from '../../core/sdk/sdk.js';
|
7
|
+
import type * as Protocol from '../../generated/protocol.js';
|
7
8
|
|
8
9
|
export interface ParsedErrorFrame {
|
9
10
|
line: string;
|
@@ -11,6 +12,7 @@ export interface ParsedErrorFrame {
|
|
11
12
|
url: string,
|
12
13
|
lineNumber?: number,
|
13
14
|
columnNumber?: number, enclosedInBraces: boolean, positionLeft: number, positionRight: number,
|
15
|
+
scriptId?: Protocol.Runtime.ScriptId,
|
14
16
|
};
|
15
17
|
}
|
16
18
|
|
@@ -115,3 +117,35 @@ function parseOrScriptMatch(debuggerModel: SDK.DebuggerModel.DebuggerModel, url:
|
|
115
117
|
}
|
116
118
|
return null;
|
117
119
|
}
|
120
|
+
|
121
|
+
/**
|
122
|
+
* Error#stack output only contains script URLs. In some cases we are able to
|
123
|
+
* retrieve additional exception details from V8 that we can use to augment
|
124
|
+
* the parsed Error#stack with script IDs.
|
125
|
+
* This function sets the `scriptId` field in `ParsedErrorFrame` when it finds
|
126
|
+
* the corresponding info in `Protocol.Runtime.StackTrace`.
|
127
|
+
*/
|
128
|
+
export function augmentErrorStackWithScriptIds(
|
129
|
+
parsedFrames: ParsedErrorFrame[], protocolStackTrace: Protocol.Runtime.StackTrace): void {
|
130
|
+
// Note that the number of frames between the two stack traces can differ. The
|
131
|
+
// parsed Error#stack can contain Builtin frames which are not present in the protocol
|
132
|
+
// stack. This means its easier to always search the whole protocol stack for a matching
|
133
|
+
// frame rather then trying to detect the Builtin frames and skipping them.
|
134
|
+
for (const parsedFrame of parsedFrames) {
|
135
|
+
const protocolFrame = protocolStackTrace.callFrames.find(frame => framesMatch(parsedFrame, frame));
|
136
|
+
if (protocolFrame && parsedFrame.link) {
|
137
|
+
parsedFrame.link.scriptId = protocolFrame.scriptId;
|
138
|
+
}
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
/** Returns true iff both stack frames have the same url and line/column numbers. The function name is ignored */
|
143
|
+
function framesMatch(parsedFrame: ParsedErrorFrame, protocolFrame: Protocol.Runtime.CallFrame): boolean {
|
144
|
+
if (!parsedFrame.link) {
|
145
|
+
return false;
|
146
|
+
}
|
147
|
+
|
148
|
+
const {url, lineNumber, columnNumber} = parsedFrame.link;
|
149
|
+
return url === protocolFrame.url && lineNumber === protocolFrame.lineNumber &&
|
150
|
+
columnNumber === protocolFrame.columnNumber;
|
151
|
+
}
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
8
8
|
import * as Platform from '../../core/platform/platform.js';
|
9
|
+
import * as Root from '../../core/root/root.js';
|
9
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
10
11
|
import * as Bindings from '../../models/bindings/bindings.js';
|
11
12
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
@@ -116,6 +117,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
116
117
|
private prompt: CSSPropertyPrompt|null;
|
117
118
|
private lastComputedValue: string|null;
|
118
119
|
private contextForTest!: Context|undefined;
|
120
|
+
#propertyTextFromSource: string;
|
119
121
|
|
120
122
|
constructor(
|
121
123
|
stylesPane: StylesSidebarPane, matchedStyles: SDK.CSSMatchedStyles.CSSMatchedStyles,
|
@@ -145,6 +147,8 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
145
147
|
this.prompt = null;
|
146
148
|
|
147
149
|
this.lastComputedValue = null;
|
150
|
+
|
151
|
+
this.#propertyTextFromSource = property.propertyText || '';
|
148
152
|
}
|
149
153
|
|
150
154
|
matchedStyles(): SDK.CSSMatchedStyles.CSSMatchedStyles {
|
@@ -478,7 +482,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
478
482
|
this.listItemElement.classList.remove('disabled');
|
479
483
|
}
|
480
484
|
|
481
|
-
this.listItemElement.classList.toggle('changed', this.
|
485
|
+
this.listItemElement.classList.toggle('changed', this.isPropertyChanged(this.property));
|
482
486
|
}
|
483
487
|
|
484
488
|
node(): SDK.DOMModel.DOMNode|null {
|
@@ -523,6 +527,14 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
523
527
|
this.styleTextAppliedForTest();
|
524
528
|
}
|
525
529
|
|
530
|
+
private isPropertyChanged(property: SDK.CSSProperty.CSSProperty): boolean {
|
531
|
+
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES)) {
|
532
|
+
return false;
|
533
|
+
}
|
534
|
+
// Check local cache first, then check against diffs from the workspace.
|
535
|
+
return this.#propertyTextFromSource !== property.propertyText || this.parentPane().isPropertyChanged(property);
|
536
|
+
}
|
537
|
+
|
526
538
|
async onpopulate(): Promise<void> {
|
527
539
|
// Only populate once and if this property is a shorthand.
|
528
540
|
if (this.childCount() || !this.isShorthand) {
|
@@ -1481,7 +1493,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
1481
1493
|
return;
|
1482
1494
|
}
|
1483
1495
|
if (updatedProperty) {
|
1484
|
-
this.listItemElement.classList.toggle('changed', this.
|
1496
|
+
this.listItemElement.classList.toggle('changed', this.isPropertyChanged(updatedProperty));
|
1485
1497
|
}
|
1486
1498
|
|
1487
1499
|
this.matchedStylesInternal.resetActiveProperties();
|
@@ -1023,9 +1023,6 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
1023
1023
|
}
|
1024
1024
|
|
1025
1025
|
isPropertyChanged(property: SDK.CSSProperty.CSSProperty): boolean {
|
1026
|
-
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES)) {
|
1027
|
-
return false;
|
1028
|
-
}
|
1029
1026
|
const url = property.ownerStyle.parentRule?.resourceURL();
|
1030
1027
|
if (!url) {
|
1031
1028
|
return false;
|
@@ -467,7 +467,9 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
467
467
|
|
468
468
|
const canvas = document.createElement('canvas');
|
469
469
|
canvas.width = Math.floor(outlineRect.width);
|
470
|
-
|
470
|
+
// Cap the height to not hit the GPU limit.
|
471
|
+
// https://crbug.com/1260828
|
472
|
+
canvas.height = Math.min((1 << 14), Math.floor(outlineRect.height));
|
471
473
|
const ctx = canvas.getContext('2d');
|
472
474
|
if (!ctx) {
|
473
475
|
throw new Error('Could not get 2d context from canvas.');
|
@@ -507,7 +509,9 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
507
509
|
pageImage.onload = (): void => {
|
508
510
|
const canvas = document.createElement('canvas');
|
509
511
|
canvas.width = pageImage.naturalWidth;
|
510
|
-
|
512
|
+
// Cap the height to not hit the GPU limit.
|
513
|
+
// https://crbug.com/1260828
|
514
|
+
canvas.height = Math.min((1 << 14), Math.floor(pageImage.naturalHeight));
|
511
515
|
const ctx = canvas.getContext('2d');
|
512
516
|
if (!ctx) {
|
513
517
|
throw new Error('Could not get 2d context for base64 screenshot.');
|
@@ -5,10 +5,11 @@
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
6
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
7
7
|
|
8
|
-
export function frameworkEventListeners(object: SDK.RemoteObject.RemoteObject):
|
8
|
+
export async function frameworkEventListeners(object: SDK.RemoteObject.RemoteObject):
|
9
|
+
Promise<FrameworkEventListenersObject> {
|
9
10
|
const domDebuggerModel = object.runtimeModel().target().model(SDK.DOMDebuggerModel.DOMDebuggerModel);
|
10
11
|
if (!domDebuggerModel) {
|
11
|
-
return
|
12
|
+
return {eventListeners: [], internalHandlers: null} as FrameworkEventListenersObject;
|
12
13
|
}
|
13
14
|
|
14
15
|
const listenersResult = {internalHandlers: null, eventListeners: []} as FrameworkEventListenersObject;
|
@@ -116,13 +116,13 @@ export class EventListenersView extends UI.Widget.VBox {
|
|
116
116
|
frameworkEventListenersObject = result;
|
117
117
|
}
|
118
118
|
|
119
|
-
function markInternalEventListeners(): Promise<void> {
|
119
|
+
async function markInternalEventListeners(): Promise<void> {
|
120
120
|
if (!frameworkEventListenersObject) {
|
121
|
-
return
|
121
|
+
return;
|
122
122
|
}
|
123
123
|
|
124
124
|
if (!frameworkEventListenersObject.internalHandlers) {
|
125
|
-
return
|
125
|
+
return;
|
126
126
|
}
|
127
127
|
return frameworkEventListenersObject.internalHandlers.object()
|
128
128
|
.callFunctionJSON(isInternalEventListener as (this: Object) => boolean[], eventListeners.map(handlerArgument))
|
@@ -2,7 +2,7 @@
|
|
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
4
|
|
5
|
-
import '../../third_party/lighthouse/report-assets/report-generator.
|
5
|
+
import '../../third_party/lighthouse/report-assets/report-generator.mjs';
|
6
6
|
|
7
7
|
import * as LighthouseController from './LighthouseController.js';
|
8
8
|
import * as LighthousePanel from './LighthousePanel.js';
|
@@ -142,7 +142,7 @@ export class DebuggerPausedMessage {
|
|
142
142
|
}
|
143
143
|
|
144
144
|
const mainElement = messageWrapper.createChild('div', 'status-main');
|
145
|
-
mainElement.appendChild(UI.Icon.Icon.create('smallicon-info', 'status-icon'));
|
145
|
+
mainElement.appendChild(UI.Icon.Icon.create('smallicon-clear-info', 'status-icon'));
|
146
146
|
const breakpointType = BreakpointTypeNouns.get(data.type);
|
147
147
|
mainElement.appendChild(document.createTextNode(
|
148
148
|
i18nString(UIStrings.pausedOnS, {PH1: breakpointType ? breakpointType() : String(null)})));
|
@@ -256,7 +256,7 @@ export class DebuggerPausedMessage {
|
|
256
256
|
function buildWrapper(mainText: string, subText?: string, title?: string): Element {
|
257
257
|
const messageWrapper = document.createElement('span');
|
258
258
|
const mainElement = messageWrapper.createChild('div', 'status-main');
|
259
|
-
const icon = UI.Icon.Icon.create(errorLike ? 'smallicon-error' : 'smallicon-info', 'status-icon');
|
259
|
+
const icon = UI.Icon.Icon.create(errorLike ? 'smallicon-clear-error' : 'smallicon-clear-info', 'status-icon');
|
260
260
|
mainElement.appendChild(icon);
|
261
261
|
mainElement.appendChild(document.createTextNode(mainText));
|
262
262
|
if (subText) {
|
@@ -1153,12 +1153,11 @@ export class UILocationRevealer implements Common.Revealer.Revealer {
|
|
1153
1153
|
return uILocationRevealerInstance;
|
1154
1154
|
}
|
1155
1155
|
|
1156
|
-
reveal(uiLocation: Object, omitFocus?: boolean): Promise<void> {
|
1156
|
+
async reveal(uiLocation: Object, omitFocus?: boolean): Promise<void> {
|
1157
1157
|
if (!(uiLocation instanceof Workspace.UISourceCode.UILocation)) {
|
1158
|
-
|
1158
|
+
throw new Error('Internal error: not a ui location');
|
1159
1159
|
}
|
1160
1160
|
SourcesPanel.instance().showUILocation(uiLocation, omitFocus);
|
1161
|
-
return Promise.resolve();
|
1162
1161
|
}
|
1163
1162
|
}
|
1164
1163
|
|
@@ -1203,12 +1202,11 @@ export class UISourceCodeRevealer implements Common.Revealer.Revealer {
|
|
1203
1202
|
return uISourceCodeRevealerInstance;
|
1204
1203
|
}
|
1205
1204
|
|
1206
|
-
reveal(uiSourceCode: Object, omitFocus?: boolean): Promise<void> {
|
1205
|
+
async reveal(uiSourceCode: Object, omitFocus?: boolean): Promise<void> {
|
1207
1206
|
if (!(uiSourceCode instanceof Workspace.UISourceCode.UISourceCode)) {
|
1208
|
-
|
1207
|
+
throw new Error('Internal error: not a ui source code');
|
1209
1208
|
}
|
1210
1209
|
SourcesPanel.instance().showUISourceCode(uiSourceCode, undefined, undefined, omitFocus);
|
1211
|
-
return Promise.resolve();
|
1212
1210
|
}
|
1213
1211
|
}
|
1214
1212
|
|
@@ -1226,11 +1224,10 @@ export class DebuggerPausedDetailsRevealer implements Common.Revealer.Revealer {
|
|
1226
1224
|
return debuggerPausedDetailsRevealerInstance;
|
1227
1225
|
}
|
1228
1226
|
|
1229
|
-
reveal(_object: Object): Promise<void> {
|
1230
|
-
if (
|
1231
|
-
return
|
1227
|
+
async reveal(_object: Object): Promise<void> {
|
1228
|
+
if (Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {
|
1229
|
+
return SourcesPanel.instance().setAsCurrentPanel();
|
1232
1230
|
}
|
1233
|
-
return SourcesPanel.instance().setAsCurrentPanel();
|
1234
1231
|
}
|
1235
1232
|
}
|
1236
1233
|
|
@@ -105,9 +105,9 @@ export class UISourceCodeFrame extends
|
|
105
105
|
|
106
106
|
this.initializeUISourceCode();
|
107
107
|
|
108
|
-
function workingCopy(): Promise<TextUtils.ContentProvider.DeferredContent> {
|
108
|
+
async function workingCopy(): Promise<TextUtils.ContentProvider.DeferredContent> {
|
109
109
|
if (uiSourceCode.isDirty()) {
|
110
|
-
return
|
110
|
+
return {content: uiSourceCode.workingCopy(), isEncoded: false};
|
111
111
|
}
|
112
112
|
return uiSourceCode.requestContent();
|
113
113
|
}
|
@@ -494,9 +494,9 @@ export class UISourceCodeFrame extends
|
|
494
494
|
return {
|
495
495
|
box: anchor,
|
496
496
|
hide(): void{},
|
497
|
-
show: (popover: UI.GlassPane.GlassPane): Promise<true> => {
|
497
|
+
show: async(popover: UI.GlassPane.GlassPane): Promise<true> => {
|
498
498
|
popover.contentElement.append(element);
|
499
|
-
return
|
499
|
+
return true;
|
500
500
|
},
|
501
501
|
};
|
502
502
|
}
|
@@ -171,7 +171,7 @@ export class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWid
|
|
171
171
|
this.createWatchExpression(null).startEditing();
|
172
172
|
}
|
173
173
|
|
174
|
-
doUpdate(): Promise<void> {
|
174
|
+
async doUpdate(): Promise<void> {
|
175
175
|
this.linkifier.reset();
|
176
176
|
this.contentElement.removeChildren();
|
177
177
|
this.treeOutline.removeChildren();
|
@@ -191,7 +191,6 @@ export class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWid
|
|
191
191
|
|
192
192
|
this.createWatchExpression(expression);
|
193
193
|
}
|
194
|
-
return Promise.resolve();
|
195
194
|
}
|
196
195
|
|
197
196
|
private createWatchExpression(expression: string|null): WatchExpression {
|
@@ -56,12 +56,16 @@
|
|
56
56
|
}
|
57
57
|
|
58
58
|
.status-icon {
|
59
|
-
filter: hue-rotate(190deg);
|
60
59
|
position: absolute;
|
61
60
|
left: 0;
|
62
61
|
top: calc(50% - 5px);
|
63
62
|
}
|
64
63
|
|
64
|
+
[is="ui-icon"].icon-mask.status-icon,
|
65
|
+
:host-context(.-theme-with-dark-background) [is="ui-icon"].icon-mask.status-icon {
|
66
|
+
--override-icon-mask-background-color: var(--color-button-primary-background-hovering);
|
67
|
+
}
|
68
|
+
|
65
69
|
.paused-status.error-reason .status-icon {
|
66
70
|
filter: none;
|
67
71
|
}
|
@@ -20,3 +20,8 @@ wget -qO- https://registry.npmjs.org/codemirror/-/codemirror-5.61.0.tgz | tar xz
|
|
20
20
|
Local changes applied:
|
21
21
|
- Run `wget -qOpackage/mode/wast/wast.js https://raw.githubusercontent.com/codemirror/CodeMirror/0bf9231f90925acc7b273ef9aaf89730ddf6e07b/mode/wast/wast.js` to synchronize unreleased changes for WebAssembly disassembly syntax highlighting.
|
22
22
|
- Some files have a `.d.ts` file added, as they are used during TypeScript compilation
|
23
|
+
- Change extension of following files from `.js` to `.mjs`.
|
24
|
+
- package/addon/runmode/runmode-standalone.js
|
25
|
+
- package/mode/css/css.js
|
26
|
+
- package/mode/javascript/javascript.js
|
27
|
+
- package/mode/xml/xml.js
|
@@ -3,9 +3,9 @@
|
|
3
3
|
"composite": true
|
4
4
|
},
|
5
5
|
"files": [
|
6
|
-
"package/addon/runmode/runmode-standalone.
|
7
|
-
"package/mode/css/css.
|
8
|
-
"package/mode/javascript/javascript.
|
9
|
-
"package/mode/xml/xml.
|
6
|
+
"package/addon/runmode/runmode-standalone.mjs",
|
7
|
+
"package/mode/css/css.mjs",
|
8
|
+
"package/mode/javascript/javascript.mjs",
|
9
|
+
"package/mode/xml/xml.mjs"
|
10
10
|
]
|
11
11
|
}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
package/front_end/third_party/codemirror/package/mode/javascript/{javascript.js → javascript.mjs}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|