chrome-devtools-frontend 1.0.965611 → 1.0.967596
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 +6 -5
- 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 +8 -0
- package/front_end/core/sdk/CSSQuery.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +6 -6
- package/front_end/core/sdk/CSSSupports.ts +30 -0
- package/front_end/core/sdk/NetworkManager.ts +58 -70
- package/front_end/core/sdk/sdk.ts +2 -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 +1 -0
- package/front_end/legacy_test_runner/heap_profiler_test_runner/heap_profiler_test_runner.js +1 -2
- package/front_end/models/extensions/ExtensionServer.ts +7 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +18 -21
- package/front_end/models/persistence/IsolatedFileSystem.ts +2 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -4
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +10 -2
- package/front_end/panels/application/components/interestGroupAccessGrid.css +1 -1
- package/front_end/panels/application/interestGroupStorageView.css +4 -0
- package/front_end/panels/elements/StylePropertyTreeElement.ts +14 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +33 -11
- 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/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-tsconfig.json +1 -1
- package/front_end/third_party/lighthouse/report-assets/{report-generator.js → report-generator.mjs} +0 -0
- 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/text_editor/config.ts +1 -0
- 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/themeColors.css +1 -1
- package/package.json +2 -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/build/tests/plugins_test.js +30 -0
- package/scripts/javascript_natives/index.js +9 -6
- package/scripts/javascript_natives/package.json +4 -4
@@ -1052,6 +1052,38 @@ export namespace Audits {
|
|
1052
1052
|
MetaTagModifiedHTML = 'MetaTagModifiedHTML',
|
1053
1053
|
}
|
1054
1054
|
|
1055
|
+
export interface FederatedAuthRequestIssueDetails {
|
1056
|
+
federatedAuthRequestIssueReason: FederatedAuthRequestIssueReason;
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
/**
|
1060
|
+
* Represents the failure reason when a federated authentication reason fails.
|
1061
|
+
* Should be updated alongside RequestIdTokenStatus in
|
1062
|
+
* third_party/blink/public/mojom/webid/federated_auth_request.mojom to include
|
1063
|
+
* all cases except for success.
|
1064
|
+
*/
|
1065
|
+
export const enum FederatedAuthRequestIssueReason {
|
1066
|
+
ApprovalDeclined = 'ApprovalDeclined',
|
1067
|
+
TooManyRequests = 'TooManyRequests',
|
1068
|
+
WellKnownHttpNotFound = 'WellKnownHttpNotFound',
|
1069
|
+
WellKnownNoResponse = 'WellKnownNoResponse',
|
1070
|
+
WellKnownInvalidResponse = 'WellKnownInvalidResponse',
|
1071
|
+
ClientIdMetadataHttpNotFound = 'ClientIdMetadataHttpNotFound',
|
1072
|
+
ClientIdMetadataNoResponse = 'ClientIdMetadataNoResponse',
|
1073
|
+
ClientIdMetadataInvalidResponse = 'ClientIdMetadataInvalidResponse',
|
1074
|
+
ErrorFetchingSignin = 'ErrorFetchingSignin',
|
1075
|
+
InvalidSigninResponse = 'InvalidSigninResponse',
|
1076
|
+
AccountsHttpNotFound = 'AccountsHttpNotFound',
|
1077
|
+
AccountsNoResponse = 'AccountsNoResponse',
|
1078
|
+
AccountsInvalidResponse = 'AccountsInvalidResponse',
|
1079
|
+
IdTokenHttpNotFound = 'IdTokenHttpNotFound',
|
1080
|
+
IdTokenNoResponse = 'IdTokenNoResponse',
|
1081
|
+
IdTokenInvalidResponse = 'IdTokenInvalidResponse',
|
1082
|
+
IdTokenInvalidRequest = 'IdTokenInvalidRequest',
|
1083
|
+
ErrorIdToken = 'ErrorIdToken',
|
1084
|
+
Canceled = 'Canceled',
|
1085
|
+
}
|
1086
|
+
|
1055
1087
|
/**
|
1056
1088
|
* This issue tracks client hints related issues. It's used to deprecate old
|
1057
1089
|
* features, encourage the use of new ones, and provide general guidance.
|
@@ -1082,6 +1114,7 @@ export namespace Audits {
|
|
1082
1114
|
GenericIssue = 'GenericIssue',
|
1083
1115
|
DeprecationIssue = 'DeprecationIssue',
|
1084
1116
|
ClientHintIssue = 'ClientHintIssue',
|
1117
|
+
FederatedAuthRequestIssue = 'FederatedAuthRequestIssue',
|
1085
1118
|
}
|
1086
1119
|
|
1087
1120
|
/**
|
@@ -1105,6 +1138,7 @@ export namespace Audits {
|
|
1105
1138
|
genericIssueDetails?: GenericIssueDetails;
|
1106
1139
|
deprecationIssueDetails?: DeprecationIssueDetails;
|
1107
1140
|
clientHintIssueDetails?: ClientHintIssueDetails;
|
1141
|
+
federatedAuthRequestIssueDetails?: FederatedAuthRequestIssueDetails;
|
1108
1142
|
}
|
1109
1143
|
|
1110
1144
|
/**
|
@@ -1885,6 +1919,11 @@ export namespace CSS {
|
|
1885
1919
|
* The array enumerates container queries starting with the innermost one, going outwards.
|
1886
1920
|
*/
|
1887
1921
|
containerQueries?: CSSContainerQuery[];
|
1922
|
+
/**
|
1923
|
+
* @supports CSS at-rule array.
|
1924
|
+
* The array enumerates @supports at-rules starting with the innermost one, going outwards.
|
1925
|
+
*/
|
1926
|
+
supports?: CSSSupports[];
|
1888
1927
|
}
|
1889
1928
|
|
1890
1929
|
/**
|
@@ -2127,6 +2166,25 @@ export namespace CSS {
|
|
2127
2166
|
name?: string;
|
2128
2167
|
}
|
2129
2168
|
|
2169
|
+
/**
|
2170
|
+
* CSS Supports at-rule descriptor.
|
2171
|
+
*/
|
2172
|
+
export interface CSSSupports {
|
2173
|
+
/**
|
2174
|
+
* Supports rule text.
|
2175
|
+
*/
|
2176
|
+
text: string;
|
2177
|
+
/**
|
2178
|
+
* The associated rule header range in the enclosing stylesheet (if
|
2179
|
+
* available).
|
2180
|
+
*/
|
2181
|
+
range?: SourceRange;
|
2182
|
+
/**
|
2183
|
+
* Identifier of the stylesheet containing this object (if exists).
|
2184
|
+
*/
|
2185
|
+
styleSheetId?: StyleSheetId;
|
2186
|
+
}
|
2187
|
+
|
2130
2188
|
/**
|
2131
2189
|
* Information about amount of glyphs that were rendered with given font.
|
2132
2190
|
*/
|
@@ -7958,6 +8016,7 @@ export namespace Network {
|
|
7958
8016
|
SameOriginAllowPopups = 'SameOriginAllowPopups',
|
7959
8017
|
UnsafeNone = 'UnsafeNone',
|
7960
8018
|
SameOriginPlusCoep = 'SameOriginPlusCoep',
|
8019
|
+
SameOriginAllowPopupsPlusCoep = 'SameOriginAllowPopupsPlusCoep',
|
7961
8020
|
}
|
7962
8021
|
|
7963
8022
|
export interface CrossOriginOpenerPolicyStatus {
|
@@ -9984,10 +10043,12 @@ export namespace Page {
|
|
9984
10043
|
ChUaPlatform = 'ch-ua-platform',
|
9985
10044
|
ChUaModel = 'ch-ua-model',
|
9986
10045
|
ChUaMobile = 'ch-ua-mobile',
|
10046
|
+
ChUaFull = 'ch-ua-full',
|
9987
10047
|
ChUaFullVersion = 'ch-ua-full-version',
|
9988
10048
|
ChUaFullVersionList = 'ch-ua-full-version-list',
|
9989
10049
|
ChUaPlatformVersion = 'ch-ua-platform-version',
|
9990
10050
|
ChUaReduced = 'ch-ua-reduced',
|
10051
|
+
ChUaWow64 = 'ch-ua-wow64',
|
9991
10052
|
ChViewportHeight = 'ch-viewport-height',
|
9992
10053
|
ChViewportWidth = 'ch-viewport-width',
|
9993
10054
|
ChWidth = 'ch-width',
|
@@ -23,7 +23,7 @@ Persistence.AutomappingStatus.prototype.toString = function() {
|
|
23
23
|
return lines.join('\n');
|
24
24
|
};
|
25
25
|
|
26
|
-
BindingsTestRunner.waitForBinding = function(fileName) {
|
26
|
+
BindingsTestRunner.waitForBinding = async function(fileName) {
|
27
27
|
const uiSourceCodes = self.Workspace.workspace.uiSourceCodes();
|
28
28
|
|
29
29
|
for (const uiSourceCode of uiSourceCodes) {
|
@@ -34,7 +34,7 @@ BindingsTestRunner.waitForBinding = function(fileName) {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
if (uiSourceCode.name() === fileName) {
|
37
|
-
return
|
37
|
+
return binding;
|
38
38
|
}
|
39
39
|
}
|
40
40
|
|
@@ -364,6 +364,7 @@ ConsoleTestRunner.dumpConsoleMessagesWithClasses = async function(sortMessages,
|
|
364
364
|
let messageText = ConsoleTestRunner.prepareConsoleMessageText(element);
|
365
365
|
if (trimMessages) {
|
366
366
|
messageText = messageText.replace(/[ ]+/g, ' ');
|
367
|
+
messageText = messageText.replace(/\s+\n\s+/g, ' ');
|
367
368
|
}
|
368
369
|
result.push(messageText + ' ' + element.getAttribute('class') + ' > ' + contentElement.getAttribute('class'));
|
369
370
|
}
|
@@ -624,14 +624,13 @@ HeapProfilerTestRunner.takeAndOpenSnapshot = async function(generator, callback)
|
|
624
624
|
const snapshot = generator();
|
625
625
|
const profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotProfileType;
|
626
626
|
|
627
|
-
function pushGeneratedSnapshot(reportProgress) {
|
627
|
+
async function pushGeneratedSnapshot(reportProgress) {
|
628
628
|
if (reportProgress) {
|
629
629
|
profileType.reportHeapSnapshotProgress({data: {done: 50, total: 100, finished: false}});
|
630
630
|
profileType.reportHeapSnapshotProgress({data: {done: 100, total: 100, finished: true}});
|
631
631
|
}
|
632
632
|
snapshot.snapshot.typeId = 'HEAP';
|
633
633
|
profileType.addHeapSnapshotChunk({data: JSON.stringify(snapshot)});
|
634
|
-
return Promise.resolve();
|
635
634
|
}
|
636
635
|
|
637
636
|
HeapProfilerTestRunner.takeAndOpenSnapshotCallback = callback;
|
@@ -57,7 +57,7 @@ const extensionOrigins: WeakMap<MessagePort, string> = new WeakMap();
|
|
57
57
|
|
58
58
|
declare global {
|
59
59
|
interface Window {
|
60
|
-
DevToolsAPI?: {getInspectedTabId?(): string|undefined};
|
60
|
+
DevToolsAPI?: {getInspectedTabId?(): string|undefined, getOriginsForbiddenForExtensions?(): string[]};
|
61
61
|
}
|
62
62
|
}
|
63
63
|
|
@@ -1102,6 +1102,12 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
1102
1102
|
parsedURL.pathname.startsWith('/webstore')) {
|
1103
1103
|
return false;
|
1104
1104
|
}
|
1105
|
+
|
1106
|
+
if ((window.DevToolsAPI && window.DevToolsAPI.getOriginsForbiddenForExtensions &&
|
1107
|
+
window.DevToolsAPI.getOriginsForbiddenForExtensions() ||
|
1108
|
+
[]).includes(parsedURL.origin)) {
|
1109
|
+
return false;
|
1110
|
+
}
|
1105
1111
|
return true;
|
1106
1112
|
}
|
1107
1113
|
|
@@ -4144,10 +4144,6 @@ export const NativeFunctions = [
|
|
4144
4144
|
name: 'isInputPending',
|
4145
4145
|
signatures: [['?options']]
|
4146
4146
|
},
|
4147
|
-
{
|
4148
|
-
name: 'WindowControlsOverlayGeometryChangeEvent',
|
4149
|
-
signatures: [['type','eventInitDict']]
|
4150
|
-
},
|
4151
4147
|
{
|
4152
4148
|
name: 'stop',
|
4153
4149
|
signatures: [['?when']],
|
@@ -5297,6 +5293,10 @@ export const NativeFunctions = [
|
|
5297
5293
|
name: 'adAuctionComponents',
|
5298
5294
|
signatures: [['numComponents']]
|
5299
5295
|
},
|
5296
|
+
{
|
5297
|
+
name: 'deprecatedURNToURL',
|
5298
|
+
signatures: [['uuid_url']]
|
5299
|
+
},
|
5300
5300
|
{
|
5301
5301
|
name: 'createAdRequest',
|
5302
5302
|
signatures: [['config']]
|
@@ -5876,24 +5876,9 @@ export const NativeFunctions = [
|
|
5876
5876
|
signatures: [['path','?options','?successCallback','?errorCallback']],
|
5877
5877
|
receiver: 'DirectoryEntry'
|
5878
5878
|
},
|
5879
|
-
{
|
5880
|
-
name: 'rename',
|
5881
|
-
signatures: [['new_entry_name']],
|
5882
|
-
receiver: 'FileSystemFileHandle'
|
5883
|
-
},
|
5884
|
-
{
|
5885
|
-
name: 'rename',
|
5886
|
-
signatures: [['new_entry_name']],
|
5887
|
-
receiver: 'FileSystemHandle'
|
5888
|
-
},
|
5889
|
-
{
|
5890
|
-
name: 'rename',
|
5891
|
-
signatures: [['old_name','new_name']],
|
5892
|
-
receiver: 'NativeIOFileManager'
|
5893
|
-
},
|
5894
5879
|
{
|
5895
5880
|
name: 'move',
|
5896
|
-
signatures: [['destination_directory','?new_entry_name']]
|
5881
|
+
signatures: [['new_entry_name'],['destination_directory','?new_entry_name']]
|
5897
5882
|
},
|
5898
5883
|
{
|
5899
5884
|
name: 'queryPermission',
|
@@ -6396,6 +6381,10 @@ export const NativeFunctions = [
|
|
6396
6381
|
signatures: [['sync']],
|
6397
6382
|
receiver: 'WebGL2RenderingContextBase'
|
6398
6383
|
},
|
6384
|
+
{
|
6385
|
+
name: 'rename',
|
6386
|
+
signatures: [['old_name','new_name']]
|
6387
|
+
},
|
6399
6388
|
{
|
6400
6389
|
name: 'renameSync',
|
6401
6390
|
signatures: [['old_name','new_name']]
|
@@ -6679,6 +6668,10 @@ export const NativeFunctions = [
|
|
6679
6668
|
name: 'PictureInPictureEvent',
|
6680
6669
|
signatures: [['type','eventInitDict']]
|
6681
6670
|
},
|
6671
|
+
{
|
6672
|
+
name: 'requestPictureInPictureWindow',
|
6673
|
+
signatures: [['options']]
|
6674
|
+
},
|
6682
6675
|
{
|
6683
6676
|
name: 'refresh',
|
6684
6677
|
signatures: [['?reload']]
|
@@ -8401,7 +8394,7 @@ export const NativeFunctions = [
|
|
8401
8394
|
},
|
8402
8395
|
{
|
8403
8396
|
name: 'dispatch',
|
8404
|
-
signatures: [['
|
8397
|
+
signatures: [['workgroupCountX','?workgroupCountY','?workgroupCountZ']]
|
8405
8398
|
},
|
8406
8399
|
{
|
8407
8400
|
name: 'dispatchIndirect',
|
@@ -8683,6 +8676,10 @@ export const NativeFunctions = [
|
|
8683
8676
|
name: 'USBOutTransferResult',
|
8684
8677
|
signatures: [['status','?bytesWritten']]
|
8685
8678
|
},
|
8679
|
+
{
|
8680
|
+
name: 'WindowControlsOverlayGeometryChangeEvent',
|
8681
|
+
signatures: [['type','eventInitDict']]
|
8682
|
+
},
|
8686
8683
|
{
|
8687
8684
|
name: 'getPose',
|
8688
8685
|
signatures: [['relative_to']]
|
@@ -98,12 +98,12 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
98
98
|
this.fileLocks = new Map();
|
99
99
|
}
|
100
100
|
|
101
|
-
static create(
|
101
|
+
static async create(
|
102
102
|
manager: IsolatedFileSystemManager, path: string, embedderPath: string, type: string, name: string,
|
103
103
|
rootURL: string): Promise<IsolatedFileSystem|null> {
|
104
104
|
const domFileSystem = Host.InspectorFrontendHost.InspectorFrontendHostInstance.isolatedFileSystem(name, rootURL);
|
105
105
|
if (!domFileSystem) {
|
106
|
-
return
|
106
|
+
return null as IsolatedFileSystem | null;
|
107
107
|
}
|
108
108
|
|
109
109
|
const fileSystem = new IsolatedFileSystem(manager, path, embedderPath, domFileSystem, type);
|
@@ -383,8 +383,7 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
383
383
|
|
384
384
|
return SDK.NetworkManager.MultitargetNetworkManager.instance().setInterceptionHandlerForPatterns(
|
385
385
|
Array.from(patterns).map(
|
386
|
-
pattern =>
|
387
|
-
({urlPattern: pattern, interceptionStage: Protocol.Network.InterceptionStage.HeadersReceived})),
|
386
|
+
pattern => ({urlPattern: pattern, requestStage: Protocol.Fetch.RequestStage.Response})),
|
388
387
|
this.interceptionHandlerBound);
|
389
388
|
}
|
390
389
|
}
|
@@ -467,8 +466,12 @@ export class NetworkPersistenceManager extends Common.ObjectWrapper.ObjectWrappe
|
|
467
466
|
|
468
467
|
let mimeType = '';
|
469
468
|
if (interceptedRequest.responseHeaders) {
|
470
|
-
const
|
471
|
-
|
469
|
+
for (const header of interceptedRequest.responseHeaders) {
|
470
|
+
if (header.name.toLowerCase() === 'content-type') {
|
471
|
+
mimeType = header.value;
|
472
|
+
break;
|
473
|
+
}
|
474
|
+
}
|
472
475
|
}
|
473
476
|
|
474
477
|
if (!mimeType) {
|
@@ -32,6 +32,10 @@ const UIStrings = {
|
|
32
32
|
*@description Text in InterestGroupStorage Items View of the Application panel
|
33
33
|
*/
|
34
34
|
groupName: 'Name',
|
35
|
+
/**
|
36
|
+
*@description Text shown instead of a table when the table would be empty.
|
37
|
+
*/
|
38
|
+
noEvents: 'No interest group events recorded.',
|
35
39
|
};
|
36
40
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/InterestGroupAccessGrid.ts', UIStrings);
|
37
41
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -62,13 +66,17 @@ export class InterestGroupAccessGrid extends HTMLElement {
|
|
62
66
|
{iconName: 'ic_info_black_18dp', color: 'var(--color-link)', width: '14px'} as
|
63
67
|
IconButton.Icon.IconWithName}>
|
64
68
|
</${IconButton.Icon.Icon.litTagName}>
|
65
|
-
${this.#
|
69
|
+
${this.#renderGridOrNoDataMessage()}
|
66
70
|
</div>
|
67
71
|
`, this.#shadow, {host: this});
|
68
72
|
// clang-format on
|
69
73
|
}
|
70
74
|
|
71
|
-
#
|
75
|
+
#renderGridOrNoDataMessage(): LitHtml.TemplateResult {
|
76
|
+
if (this.#datastores.length === 0) {
|
77
|
+
return LitHtml.html`<div class="no-events-message">${i18nString(UIStrings.noEvents)}</div>`;
|
78
|
+
}
|
79
|
+
|
72
80
|
const gridData: DataGrid.DataGridController.DataGridControllerData = {
|
73
81
|
columns: [
|
74
82
|
{
|
@@ -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;
|
@@ -1843,6 +1840,12 @@ export class StylePropertiesSection {
|
|
1843
1840
|
this.updateRuleOrigin();
|
1844
1841
|
}
|
1845
1842
|
|
1843
|
+
protected createAtRuleLists(rule: SDK.CSSRule.CSSStyleRule): void {
|
1844
|
+
this.createMediaList(rule.media);
|
1845
|
+
this.createContainerQueryList(rule.containerQueries);
|
1846
|
+
this.createSupportsList(rule.supports);
|
1847
|
+
}
|
1848
|
+
|
1846
1849
|
protected createMediaList(mediaRules: SDK.CSSMedia.CSSMedia[]): void {
|
1847
1850
|
for (let i = mediaRules.length - 1; i >= 0; --i) {
|
1848
1851
|
const media = mediaRules[i];
|
@@ -1910,6 +1913,28 @@ export class StylePropertiesSection {
|
|
1910
1913
|
}
|
1911
1914
|
}
|
1912
1915
|
|
1916
|
+
protected createSupportsList(supportsList: SDK.CSSSupports.CSSSupports[]): void {
|
1917
|
+
for (let i = supportsList.length - 1; i >= 0; --i) {
|
1918
|
+
const supports = supportsList[i];
|
1919
|
+
if (!supports.text) {
|
1920
|
+
continue;
|
1921
|
+
}
|
1922
|
+
|
1923
|
+
let onQueryTextClick;
|
1924
|
+
if (supports.styleSheetId) {
|
1925
|
+
onQueryTextClick = this.handleQueryRuleClick.bind(this, supports);
|
1926
|
+
}
|
1927
|
+
|
1928
|
+
const supportsElement = new ElementsComponents.CSSQuery.CSSQuery();
|
1929
|
+
supportsElement.data = {
|
1930
|
+
queryPrefix: '@supports',
|
1931
|
+
queryText: supports.text,
|
1932
|
+
onQueryTextClick,
|
1933
|
+
};
|
1934
|
+
this.queryListElement.append(supportsElement);
|
1935
|
+
}
|
1936
|
+
}
|
1937
|
+
|
1913
1938
|
private async addContainerForContainerQuery(containerQuery: SDK.CSSContainerQuery.CSSContainerQuery): Promise<void> {
|
1914
1939
|
const container = await containerQuery.getContainerForNode(this.matchedStyles.node().id);
|
1915
1940
|
if (!container) {
|
@@ -1940,8 +1965,7 @@ export class StylePropertiesSection {
|
|
1940
1965
|
private updateQueryList(): void {
|
1941
1966
|
this.queryListElement.removeChildren();
|
1942
1967
|
if (this.styleInternal.parentRule && this.styleInternal.parentRule instanceof SDK.CSSRule.CSSStyleRule) {
|
1943
|
-
this.
|
1944
|
-
this.createContainerQueryList(this.styleInternal.parentRule.containerQueries);
|
1968
|
+
this.createAtRuleLists(this.styleInternal.parentRule);
|
1945
1969
|
}
|
1946
1970
|
}
|
1947
1971
|
|
@@ -2213,8 +2237,7 @@ export class StylePropertiesSection {
|
|
2213
2237
|
event.consume(true);
|
2214
2238
|
}
|
2215
2239
|
|
2216
|
-
private handleQueryRuleClick(query: SDK.
|
2217
|
-
void {
|
2240
|
+
private handleQueryRuleClick(query: SDK.CSSQuery.CSSQuery, event: Event): void {
|
2218
2241
|
const element = event.currentTarget as Element;
|
2219
2242
|
if (UI.UIUtils.isBeingEdited(element)) {
|
2220
2243
|
return;
|
@@ -2276,8 +2299,8 @@ export class StylePropertiesSection {
|
|
2276
2299
|
}
|
2277
2300
|
|
2278
2301
|
private editingMediaCommitted(
|
2279
|
-
query: SDK.
|
2280
|
-
|
2302
|
+
query: SDK.CSSQuery.CSSQuery, element: Element, newContent: string, _oldContent: string,
|
2303
|
+
_context: Context|undefined, _moveDirection: string): void {
|
2281
2304
|
this.parentPane.setEditingStyle(false);
|
2282
2305
|
this.editingMediaFinished(element);
|
2283
2306
|
|
@@ -2563,8 +2586,7 @@ export class BlankStylePropertiesSection extends StylePropertiesSection {
|
|
2563
2586
|
cssModel, this.parentPane.linkifier, styleSheetId, this.actualRuleLocation()));
|
2564
2587
|
if (insertAfterStyle && insertAfterStyle.parentRule &&
|
2565
2588
|
insertAfterStyle.parentRule instanceof SDK.CSSRule.CSSStyleRule) {
|
2566
|
-
this.
|
2567
|
-
this.createContainerQueryList(insertAfterStyle.parentRule.containerQueries);
|
2589
|
+
this.createAtRuleLists(insertAfterStyle.parentRule);
|
2568
2590
|
}
|
2569
2591
|
this.element.classList.add('blank-section');
|
2570
2592
|
}
|
@@ -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
|
}
|
@@ -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
|
}
|