chrome-devtools-frontend 1.0.929965 → 1.0.930993
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 +2 -1
- package/front_end/core/host/InspectorFrontendHost.ts +8 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +12 -0
- package/front_end/core/i18n/locales/en-US.json +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +71 -71
- package/front_end/core/sdk/NetworkManager.ts +6 -2
- package/front_end/devtools_compatibility.js +8 -0
- package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +2 -2
- package/front_end/legacy_test_runner/test_runner/TestRunner.js +2 -3
- package/front_end/models/bindings/BreakpointManager.ts +158 -154
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +64 -56
- package/front_end/models/bindings/CompilerScriptMapping.ts +70 -70
- package/front_end/models/bindings/ContentProviderBasedProject.ts +20 -20
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +132 -132
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +73 -72
- package/front_end/models/bindings/DefaultScriptMapping.ts +22 -22
- package/front_end/models/bindings/FileUtils.ts +81 -81
- package/front_end/models/bindings/IgnoreListManager.ts +17 -17
- package/front_end/models/bindings/LiveLocation.ts +21 -21
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +28 -28
- package/front_end/models/bindings/ResourceMapping.ts +50 -50
- package/front_end/models/bindings/ResourceScriptMapping.ts +71 -71
- package/front_end/models/bindings/SASSSourceMapping.ts +32 -32
- package/front_end/models/bindings/StylesSourceMapping.ts +57 -57
- package/front_end/models/bindings/TempFile.ts +34 -34
- package/front_end/models/emulation/DeviceModeModel.ts +208 -203
- package/front_end/models/emulation/EmulatedDevices.ts +34 -34
- package/front_end/panels/console/ConsoleView.ts +2 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -3
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +133 -133
- package/front_end/panels/css_overview/CSSOverviewModel.ts +16 -16
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +77 -77
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +5 -5
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +4 -4
- package/front_end/panels/elements/ElementsTreeElement.ts +6 -10
- package/front_end/panels/elements/ElementsTreeOutline.ts +3 -1
- package/front_end/panels/elements/components/LayoutPane.ts +6 -0
- package/front_end/panels/elements/elementsPanel.css +0 -1
- package/front_end/panels/elements/elementsTreeOutline.css +0 -4
- package/front_end/panels/lighthouse/LighthouseController.ts +18 -9
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +7 -2
- package/front_end/panels/network/BlockedURLsPane.ts +8 -5
- package/front_end/panels/network/blockedURLsPane.css +0 -1
- package/front_end/panels/search/SearchView.ts +0 -2
- package/front_end/panels/sources/BreakpointEditDialog.ts +98 -81
- package/front_end/panels/sources/DebuggerPlugin.ts +15 -14
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +18 -2
- package/front_end/ui/components/text_editor/config.ts +6 -0
- package/front_end/ui/components/text_editor/cursor_tooltip.ts +70 -0
- package/front_end/ui/components/text_editor/javascript.ts +590 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/text_editor/theme.ts +11 -0
- package/front_end/ui/components/tree_outline/TreeOutline.ts +3 -1
- package/front_end/ui/legacy/ARIAUtils.ts +24 -8
- package/front_end/ui/legacy/components/text_editor/cmdevtools.css +1 -0
- package/front_end/ui/legacy/components/text_editor/text_editor-legacy.ts +0 -3
- package/front_end/ui/legacy/components/text_editor/text_editor.ts +0 -2
- package/package.json +1 -1
- package/scripts/migration/class-fields/migrate.js +15 -2
- package/scripts/migration/class-fields/migrate.sh +10 -0
- package/front_end/ui/legacy/components/text_editor/SyntaxHighlighter.ts +0 -62
|
@@ -49,8 +49,8 @@ export class EmulatedDevice {
|
|
|
49
49
|
isDualScreen: boolean;
|
|
50
50
|
verticalSpanned: Orientation;
|
|
51
51
|
horizontalSpanned: Orientation;
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
#showInternal: string;
|
|
53
|
+
#showByDefault: boolean;
|
|
54
54
|
|
|
55
55
|
constructor() {
|
|
56
56
|
this.title = '';
|
|
@@ -67,8 +67,8 @@ export class EmulatedDevice {
|
|
|
67
67
|
this.verticalSpanned = {width: 0, height: 0, outlineInsets: null, outlineImage: null, hinge: null};
|
|
68
68
|
this.horizontalSpanned = {width: 0, height: 0, outlineInsets: null, outlineImage: null, hinge: null};
|
|
69
69
|
|
|
70
|
-
this
|
|
71
|
-
this
|
|
70
|
+
this.#showInternal = _Show.Default;
|
|
71
|
+
this.#showByDefault = true;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
static fromJSONV1(json: any): EmulatedDevice|null {
|
|
@@ -251,8 +251,8 @@ export class EmulatedDevice {
|
|
|
251
251
|
mode.image = (parseValue(modes[i], 'image', 'string', null) as string);
|
|
252
252
|
result.modes.push(mode);
|
|
253
253
|
}
|
|
254
|
-
result
|
|
255
|
-
result
|
|
254
|
+
result.#showByDefault = (parseValue(json, 'show-by-default', 'boolean', undefined) as boolean);
|
|
255
|
+
result.#showInternal = (parseValue(json, 'show', 'string', _Show.Default) as string);
|
|
256
256
|
|
|
257
257
|
return result;
|
|
258
258
|
} catch (e) {
|
|
@@ -350,9 +350,9 @@ export class EmulatedDevice {
|
|
|
350
350
|
json['modes'].push(mode);
|
|
351
351
|
}
|
|
352
352
|
|
|
353
|
-
json['show-by-default'] = this
|
|
353
|
+
json['show-by-default'] = this.#showByDefault;
|
|
354
354
|
json['dual-screen'] = this.isDualScreen;
|
|
355
|
-
json['show'] = this
|
|
355
|
+
json['show'] = this.#showInternal;
|
|
356
356
|
|
|
357
357
|
if (this.userAgentMetadata) {
|
|
358
358
|
json['user-agent-metadata'] = this.userAgentMetadata;
|
|
@@ -441,18 +441,18 @@ export class EmulatedDevice {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
show(): boolean {
|
|
444
|
-
if (this
|
|
445
|
-
return this
|
|
444
|
+
if (this.#showInternal === _Show.Default) {
|
|
445
|
+
return this.#showByDefault;
|
|
446
446
|
}
|
|
447
|
-
return this
|
|
447
|
+
return this.#showInternal === _Show.Always;
|
|
448
448
|
}
|
|
449
449
|
|
|
450
450
|
setShow(show: boolean): void {
|
|
451
|
-
this
|
|
451
|
+
this.#showInternal = show ? _Show.Always : _Show.Never;
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
copyShowFrom(other: EmulatedDevice): void {
|
|
455
|
-
this
|
|
455
|
+
this.#showInternal = other.#showInternal;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
458
|
touch(): boolean {
|
|
@@ -495,21 +495,21 @@ export const _Show = {
|
|
|
495
495
|
let _instance: EmulatedDevicesList;
|
|
496
496
|
|
|
497
497
|
export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
498
|
+
readonly #standardSetting: Common.Settings.Setting<any[]>;
|
|
499
|
+
#standardInternal: Set<EmulatedDevice>;
|
|
500
|
+
readonly #customSetting: Common.Settings.Setting<any[]>;
|
|
501
|
+
readonly #customInternal: Set<EmulatedDevice>;
|
|
502
502
|
constructor() {
|
|
503
503
|
super();
|
|
504
504
|
|
|
505
|
-
this
|
|
506
|
-
this
|
|
507
|
-
this.listFromJSONV1(this
|
|
505
|
+
this.#standardSetting = Common.Settings.Settings.instance().createSetting('standardEmulatedDeviceList', []);
|
|
506
|
+
this.#standardInternal = new Set();
|
|
507
|
+
this.listFromJSONV1(this.#standardSetting.get(), this.#standardInternal);
|
|
508
508
|
this.updateStandardDevices();
|
|
509
509
|
|
|
510
|
-
this
|
|
511
|
-
this
|
|
512
|
-
if (!this.listFromJSONV1(this
|
|
510
|
+
this.#customSetting = Common.Settings.Settings.instance().createSetting('customEmulatedDeviceList', []);
|
|
511
|
+
this.#customInternal = new Set();
|
|
512
|
+
if (!this.listFromJSONV1(this.#customSetting.get(), this.#customInternal)) {
|
|
513
513
|
this.saveCustomDevices();
|
|
514
514
|
}
|
|
515
515
|
}
|
|
@@ -529,8 +529,8 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
529
529
|
devices.add(device);
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
|
-
this.copyShowValues(this
|
|
533
|
-
this
|
|
532
|
+
this.copyShowValues(this.#standardInternal, devices);
|
|
533
|
+
this.#standardInternal = devices;
|
|
534
534
|
this.saveStandardDevices();
|
|
535
535
|
}
|
|
536
536
|
|
|
@@ -555,40 +555,40 @@ export class EmulatedDevicesList extends Common.ObjectWrapper.ObjectWrapper<Even
|
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
standard(): EmulatedDevice[] {
|
|
558
|
-
return [...this
|
|
558
|
+
return [...this.#standardInternal];
|
|
559
559
|
}
|
|
560
560
|
|
|
561
561
|
custom(): EmulatedDevice[] {
|
|
562
|
-
return [...this
|
|
562
|
+
return [...this.#customInternal];
|
|
563
563
|
}
|
|
564
564
|
|
|
565
565
|
revealCustomSetting(): void {
|
|
566
|
-
Common.Revealer.reveal(this
|
|
566
|
+
Common.Revealer.reveal(this.#customSetting);
|
|
567
567
|
}
|
|
568
568
|
|
|
569
569
|
addCustomDevice(device: EmulatedDevice): void {
|
|
570
|
-
this
|
|
570
|
+
this.#customInternal.add(device);
|
|
571
571
|
this.saveCustomDevices();
|
|
572
572
|
}
|
|
573
573
|
|
|
574
574
|
removeCustomDevice(device: EmulatedDevice): void {
|
|
575
|
-
this
|
|
575
|
+
this.#customInternal.delete(device);
|
|
576
576
|
this.saveCustomDevices();
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
saveCustomDevices(): void {
|
|
580
580
|
const json: any[] = [];
|
|
581
|
-
this
|
|
581
|
+
this.#customInternal.forEach(device => json.push(device.toJSON()));
|
|
582
582
|
|
|
583
|
-
this
|
|
583
|
+
this.#customSetting.set(json);
|
|
584
584
|
this.dispatchEventToListeners(Events.CustomDevicesUpdated);
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
saveStandardDevices(): void {
|
|
588
588
|
const json: any[] = [];
|
|
589
|
-
this
|
|
589
|
+
this.#standardInternal.forEach(device => json.push(device.toJSON()));
|
|
590
590
|
|
|
591
|
-
this
|
|
591
|
+
this.#standardSetting.set(json);
|
|
592
592
|
this.dispatchEventToListeners(Events.StandardDevicesUpdated);
|
|
593
593
|
}
|
|
594
594
|
|
|
@@ -41,6 +41,7 @@ import * as Bindings from '../../models/bindings/bindings.js';
|
|
|
41
41
|
import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
42
42
|
import * as Logs from '../../models/logs/logs.js';
|
|
43
43
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
44
|
+
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
44
45
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
45
46
|
// eslint-disable-next-line rulesdir/es_modules_import
|
|
46
47
|
import objectValueStyles from '../../ui/legacy/components/object_ui/objectValue.css.js';
|
|
@@ -676,7 +677,7 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
|
676
677
|
super.wasShown();
|
|
677
678
|
this.updateIssuesToolbarItem();
|
|
678
679
|
this.viewport.refresh();
|
|
679
|
-
this.registerCSSFiles([consoleViewStyles, objectValueStyles]);
|
|
680
|
+
this.registerCSSFiles([consoleViewStyles, objectValueStyles, CodeHighlighter.Style.default]);
|
|
680
681
|
}
|
|
681
682
|
|
|
682
683
|
focus(): void {
|
|
@@ -42,11 +42,11 @@ import type * as IssuesManager from '../../models/issues_manager/issues_manager.
|
|
|
42
42
|
import * as Logs from '../../models/logs/logs.js';
|
|
43
43
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
44
44
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
45
|
+
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
45
46
|
import * as IssueCounter from '../../ui/components/issue_counter/issue_counter.js';
|
|
46
47
|
import * as RequestLinkIcon from '../../ui/components/request_link_icon/request_link_icon.js';
|
|
47
48
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
48
49
|
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
49
|
-
import * as TextEditor from '../../ui/legacy/components/text_editor/text_editor.js';
|
|
50
50
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
51
51
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
52
52
|
import * as ThemeSupport from '../../ui/legacy/theme_support/theme_support.js';
|
|
@@ -1925,8 +1925,8 @@ export class ConsoleCommand extends ConsoleViewMessage {
|
|
|
1925
1925
|
newContentElement.appendChild(this.formattedCommand);
|
|
1926
1926
|
|
|
1927
1927
|
if (this.formattedCommand.textContent.length < MaxLengthToIgnoreHighlighter) {
|
|
1928
|
-
|
|
1929
|
-
|
|
1928
|
+
CodeHighlighter.CodeHighlighter.highlightNode(this.formattedCommand, 'text/javascript')
|
|
1929
|
+
.then(this.updateSearch.bind(this));
|
|
1930
1930
|
} else {
|
|
1931
1931
|
this.updateSearch();
|
|
1932
1932
|
}
|