chrome-devtools-frontend 1.0.966086 → 1.0.967610

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.
Files changed (30) hide show
  1. package/config/gni/devtools_grd_files.gni +1 -0
  2. package/front_end/core/i18n/locales/en-US.json +3 -0
  3. package/front_end/core/i18n/locales/en-XL.json +3 -0
  4. package/front_end/core/sdk/CSSQuery.ts +1 -1
  5. package/front_end/core/sdk/CSSRule.ts +6 -6
  6. package/front_end/core/sdk/CSSSupports.ts +30 -0
  7. package/front_end/core/sdk/sdk.ts +2 -0
  8. package/front_end/devtools_compatibility.js +19 -0
  9. package/front_end/generated/InspectorBackendCommands.js +27 -2
  10. package/front_end/generated/protocol.ts +61 -0
  11. package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +1 -0
  12. package/front_end/models/extensions/ExtensionServer.ts +7 -1
  13. package/front_end/models/javascript_metadata/NativeFunctions.js +18 -21
  14. package/front_end/panels/application/components/InterestGroupAccessGrid.ts +10 -2
  15. package/front_end/panels/application/components/interestGroupAccessGrid.css +1 -1
  16. package/front_end/panels/application/interestGroupStorageView.css +4 -0
  17. package/front_end/panels/elements/StylePropertyTreeElement.ts +14 -2
  18. package/front_end/panels/elements/StylesSidebarPane.ts +33 -11
  19. package/front_end/third_party/lighthouse/README.chromium +0 -3
  20. package/front_end/third_party/puppeteer/puppeteer.ts +1 -2
  21. package/front_end/ui/components/text_editor/config.ts +1 -0
  22. package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +1 -1
  23. package/package.json +2 -1
  24. package/scripts/build/devtools_plugin.js +2 -1
  25. package/scripts/build/esbuild.js +9 -8
  26. package/scripts/build/ninja/minify-json-files.js +19 -0
  27. package/scripts/build/ninja/minify_json.gni +28 -0
  28. package/scripts/build/tests/plugins_test.js +30 -0
  29. package/scripts/javascript_natives/index.js +9 -6
  30. package/scripts/javascript_natives/package.json +4 -4
@@ -576,6 +576,7 @@ grd_files_debug_sources = [
576
576
  "front_end/core/sdk/CSSRule.js",
577
577
  "front_end/core/sdk/CSSStyleDeclaration.js",
578
578
  "front_end/core/sdk/CSSStyleSheetHeader.js",
579
+ "front_end/core/sdk/CSSSupports.js",
579
580
  "front_end/core/sdk/CategorizedBreakpoint.js",
580
581
  "front_end/core/sdk/ChildTargetManager.js",
581
582
  "front_end/core/sdk/CompilerSourceMappingContentProvider.js",
@@ -2966,6 +2966,9 @@
2966
2966
  "panels/application/components/InterestGroupAccessGrid.ts | groupOwner": {
2967
2967
  "message": "Owner"
2968
2968
  },
2969
+ "panels/application/components/InterestGroupAccessGrid.ts | noEvents": {
2970
+ "message": "No interest group events recorded."
2971
+ },
2969
2972
  "panels/application/components/OriginTrialTreeView.ts | expiryTime": {
2970
2973
  "message": "Expiry Time"
2971
2974
  },
@@ -2966,6 +2966,9 @@
2966
2966
  "panels/application/components/InterestGroupAccessGrid.ts | groupOwner": {
2967
2967
  "message": "Ôẃn̂ér̂"
2968
2968
  },
2969
+ "panels/application/components/InterestGroupAccessGrid.ts | noEvents": {
2970
+ "message": "N̂ó îńt̂ér̂éŝt́ ĝŕôúp̂ év̂én̂t́ŝ ŕêćôŕd̂éd̂."
2971
+ },
2969
2972
  "panels/application/components/OriginTrialTreeView.ts | expiryTime": {
2970
2973
  "message": "Êx́p̂ír̂ý T̂ím̂é"
2971
2974
  },
@@ -9,7 +9,7 @@ import type {CSSModel, Edit} from './CSSModel.js';
9
9
  import {CSSLocation} from './CSSModel.js';
10
10
  import type {CSSStyleSheetHeader} from './CSSStyleSheetHeader.js';
11
11
 
12
- type CSSQueryPayload = Protocol.CSS.CSSMedia|Protocol.CSS.CSSContainerQuery;
12
+ type CSSQueryPayload = Protocol.CSS.CSSMedia|Protocol.CSS.CSSContainerQuery|Protocol.CSS.CSSSupports;
13
13
 
14
14
  export abstract class CSSQuery {
15
15
  text = '';
@@ -7,6 +7,7 @@ import * as TextUtils from '../../models/text_utils/text_utils.js';
7
7
 
8
8
  import {CSSContainerQuery} from './CSSContainerQuery.js';
9
9
  import {CSSMedia} from './CSSMedia.js';
10
+ import {CSSSupports} from './CSSSupports.js';
10
11
 
11
12
  import type {CSSModel, Edit} from './CSSModel.js';
12
13
  import {CSSStyleDeclaration, Type} from './CSSStyleDeclaration.js';
@@ -99,6 +100,7 @@ export class CSSStyleRule extends CSSRule {
99
100
  selectors!: CSSValue[];
100
101
  media: CSSMedia[];
101
102
  containerQueries: CSSContainerQuery[];
103
+ supports: CSSSupports[];
102
104
  wasUsed: boolean;
103
105
  constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSRule, wasUsed?: boolean) {
104
106
  // TODO(crbug.com/1011811): Replace with spread operator or better types once Closure is gone.
@@ -108,6 +110,7 @@ export class CSSStyleRule extends CSSRule {
108
110
  this.containerQueries = payload.containerQueries ?
109
111
  CSSContainerQuery.parseContainerQueriesPayload(cssModel, payload.containerQueries) :
110
112
  [];
113
+ this.supports = payload.supports ? CSSSupports.parseSupportsPayload(cssModel, payload.supports) : [];
111
114
  this.wasUsed = wasUsed || false;
112
115
  }
113
116
 
@@ -191,12 +194,9 @@ export class CSSStyleRule extends CSSRule {
191
194
  this.selectors[i].rebase(edit);
192
195
  }
193
196
  }
194
- for (const media of this.media) {
195
- media.rebase(edit);
196
- }
197
- for (const containerQuery of this.containerQueries) {
198
- containerQuery.rebase(edit);
199
- }
197
+ this.media.forEach(media => media.rebase(edit));
198
+ this.containerQueries.forEach(cq => cq.rebase(edit));
199
+ this.supports.forEach(supports => supports.rebase(edit));
200
200
 
201
201
  super.rebase(edit);
202
202
  }
@@ -0,0 +1,30 @@
1
+ // Copyright 2022 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
+ import * as TextUtils from '../../models/text_utils/text_utils.js';
6
+ import type * as Protocol from '../../generated/protocol.js';
7
+
8
+ import type {CSSModel} from './CSSModel.js';
9
+ import {CSSQuery} from './CSSQuery.js';
10
+
11
+ export class CSSSupports extends CSSQuery {
12
+ static parseSupportsPayload(cssModel: CSSModel, payload: Protocol.CSS.CSSSupports[]): CSSSupports[] {
13
+ return payload.map(supports => new CSSSupports(cssModel, supports));
14
+ }
15
+
16
+ constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSSupports) {
17
+ super(cssModel);
18
+ this.reinitialize(payload);
19
+ }
20
+
21
+ reinitialize(payload: Protocol.CSS.CSSSupports): void {
22
+ this.text = payload.text;
23
+ this.range = payload.range ? TextUtils.TextRange.TextRange.fromObject(payload.range) : null;
24
+ this.styleSheetId = payload.styleSheetId;
25
+ }
26
+
27
+ active(): boolean {
28
+ return true;
29
+ }
30
+ }
@@ -34,6 +34,7 @@ import * as CSSQuery from './CSSQuery.js';
34
34
  import * as CSSRule from './CSSRule.js';
35
35
  import * as CSSStyleDeclaration from './CSSStyleDeclaration.js';
36
36
  import * as CSSStyleSheetHeader from './CSSStyleSheetHeader.js';
37
+ import * as CSSSupports from './CSSSupports.js';
37
38
  import * as DebuggerModel from './DebuggerModel.js';
38
39
  import * as DOMDebuggerModel from './DOMDebuggerModel.js';
39
40
  import * as DOMModel from './DOMModel.js';
@@ -101,6 +102,7 @@ export {
101
102
  CSSRule,
102
103
  CSSStyleDeclaration,
103
104
  CSSStyleSheetHeader,
105
+ CSSSupports,
104
106
  DebuggerModel,
105
107
  DOMDebuggerModel,
106
108
  DOMModel,
@@ -28,6 +28,11 @@
28
28
  */
29
29
  this._addExtensionCallback = null;
30
30
 
31
+ /**
32
+ * @type {!Array<string>}
33
+ */
34
+ this._originsForbiddenForExtensions = [];
35
+
31
36
  /**
32
37
  * @type {!Promise<string>}
33
38
  */
@@ -95,6 +100,20 @@
95
100
  }
96
101
  }
97
102
 
103
+ /**
104
+ * @param {!Array<string>} forbiddenOrigins
105
+ */
106
+ setOriginsForbiddenForExtensions(forbiddenOrigins) {
107
+ this._originsForbiddenForExtensions = forbiddenOrigins;
108
+ }
109
+
110
+ /**
111
+ * @return {!Array<string>}
112
+ */
113
+ getOriginsForbiddenForExtensions() {
114
+ return this._originsForbiddenForExtensions;
115
+ }
116
+
98
117
  /**
99
118
  * @param {string} url
100
119
  */
@@ -282,6 +282,27 @@ export function registerCommands(inspectorBackend) {
282
282
  inspectorBackend.registerEnum(
283
283
  'Audits.ClientHintIssueReason',
284
284
  {MetaTagAllowListInvalidOrigin: 'MetaTagAllowListInvalidOrigin', MetaTagModifiedHTML: 'MetaTagModifiedHTML'});
285
+ inspectorBackend.registerEnum('Audits.FederatedAuthRequestIssueReason', {
286
+ ApprovalDeclined: 'ApprovalDeclined',
287
+ TooManyRequests: 'TooManyRequests',
288
+ WellKnownHttpNotFound: 'WellKnownHttpNotFound',
289
+ WellKnownNoResponse: 'WellKnownNoResponse',
290
+ WellKnownInvalidResponse: 'WellKnownInvalidResponse',
291
+ ClientIdMetadataHttpNotFound: 'ClientIdMetadataHttpNotFound',
292
+ ClientIdMetadataNoResponse: 'ClientIdMetadataNoResponse',
293
+ ClientIdMetadataInvalidResponse: 'ClientIdMetadataInvalidResponse',
294
+ ErrorFetchingSignin: 'ErrorFetchingSignin',
295
+ InvalidSigninResponse: 'InvalidSigninResponse',
296
+ AccountsHttpNotFound: 'AccountsHttpNotFound',
297
+ AccountsNoResponse: 'AccountsNoResponse',
298
+ AccountsInvalidResponse: 'AccountsInvalidResponse',
299
+ IdTokenHttpNotFound: 'IdTokenHttpNotFound',
300
+ IdTokenNoResponse: 'IdTokenNoResponse',
301
+ IdTokenInvalidResponse: 'IdTokenInvalidResponse',
302
+ IdTokenInvalidRequest: 'IdTokenInvalidRequest',
303
+ ErrorIdToken: 'ErrorIdToken',
304
+ Canceled: 'Canceled'
305
+ });
285
306
  inspectorBackend.registerEnum('Audits.InspectorIssueCode', {
286
307
  SameSiteCookieIssue: 'SameSiteCookieIssue',
287
308
  MixedContentIssue: 'MixedContentIssue',
@@ -297,7 +318,8 @@ export function registerCommands(inspectorBackend) {
297
318
  NavigatorUserAgentIssue: 'NavigatorUserAgentIssue',
298
319
  GenericIssue: 'GenericIssue',
299
320
  DeprecationIssue: 'DeprecationIssue',
300
- ClientHintIssue: 'ClientHintIssue'
321
+ ClientHintIssue: 'ClientHintIssue',
322
+ FederatedAuthRequestIssue: 'FederatedAuthRequestIssue'
301
323
  });
302
324
  inspectorBackend.registerEvent('Audits.issueAdded', ['issue']);
303
325
  inspectorBackend.registerEnum('Audits.GetEncodedResponseRequestEncoding', {Webp: 'webp', Jpeg: 'jpeg', Png: 'png'});
@@ -1647,7 +1669,8 @@ export function registerCommands(inspectorBackend) {
1647
1669
  SameOrigin: 'SameOrigin',
1648
1670
  SameOriginAllowPopups: 'SameOriginAllowPopups',
1649
1671
  UnsafeNone: 'UnsafeNone',
1650
- SameOriginPlusCoep: 'SameOriginPlusCoep'
1672
+ SameOriginPlusCoep: 'SameOriginPlusCoep',
1673
+ SameOriginAllowPopupsPlusCoep: 'SameOriginAllowPopupsPlusCoep'
1651
1674
  });
1652
1675
  inspectorBackend.registerEnum(
1653
1676
  'Network.CrossOriginEmbedderPolicyValue',
@@ -2001,10 +2024,12 @@ export function registerCommands(inspectorBackend) {
2001
2024
  ChUaPlatform: 'ch-ua-platform',
2002
2025
  ChUaModel: 'ch-ua-model',
2003
2026
  ChUaMobile: 'ch-ua-mobile',
2027
+ ChUaFull: 'ch-ua-full',
2004
2028
  ChUaFullVersion: 'ch-ua-full-version',
2005
2029
  ChUaFullVersionList: 'ch-ua-full-version-list',
2006
2030
  ChUaPlatformVersion: 'ch-ua-platform-version',
2007
2031
  ChUaReduced: 'ch-ua-reduced',
2032
+ ChUaWow64: 'ch-ua-wow64',
2008
2033
  ChViewportHeight: 'ch-viewport-height',
2009
2034
  ChViewportWidth: 'ch-viewport-width',
2010
2035
  ChWidth: 'ch-width',
@@ -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',
@@ -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
  }
@@ -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: [['x','?y','?z']]
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']]
@@ -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.#renderGrid()}
69
+ ${this.#renderGridOrNoDataMessage()}
66
70
  </div>
67
71
  `, this.#shadow, {host: this});
68
72
  // clang-format on
69
73
  }
70
74
 
71
- #renderGrid(): LitHtml.TemplateResult {
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
  {
@@ -21,6 +21,6 @@ devtools-data-grid-controller {
21
21
  height: 14px;
22
22
  }
23
23
 
24
- .no-tt-message {
24
+ .no-events-message {
25
25
  margin-top: 20px;
26
26
  }
@@ -4,6 +4,10 @@
4
4
  * found in the LICENSE file.
5
5
  */
6
6
 
7
+ devtools-interest-group-access-grid {
8
+ overflow: auto;
9
+ }
10
+
7
11
  .placeholder {
8
12
  display: flex;
9
13
  align-items: center;
@@ -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.parentPane().isPropertyChanged(this.property));
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.parentPane().isPropertyChanged(updatedProperty));
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.createMediaList(this.styleInternal.parentRule.media);
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.CSSMedia.CSSMedia|SDK.CSSContainerQuery.CSSContainerQuery, event: Event):
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.CSSMedia.CSSMedia|SDK.CSSContainerQuery.CSSContainerQuery, element: Element, newContent: string,
2280
- _oldContent: string, _context: Context|undefined, _moveDirection: string): void {
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.createMediaList(insertAfterStyle.parentRule.media);
2567
- this.createContainerQueryList(insertAfterStyle.parentRule.containerQueries);
2589
+ this.createAtRuleLists(insertAfterStyle.parentRule);
2568
2590
  }
2569
2591
  this.element.classList.add('blank-section');
2570
2592
  }
@@ -5,6 +5,3 @@ License: Apache License 2.0
5
5
  Security Critical: no
6
6
 
7
7
  This directory contains Chromium's version of the lighthouse report assets, including renderer.
8
-
9
- Local changes applied:
10
- - Change extension of `report-assets/report-generator.mjs` from `.js` to `.mjs`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { Browser } from './package/lib/esm/puppeteer/common/Browser.js';
6
6
  import { Connection } from './package/lib/esm/puppeteer/common/Connection.js';
7
- import { ConnectionTransport } from './package/lib/esm/puppeteer/common/ConnectionTransport.js';
7
+ import { type ConnectionTransport } from './package/lib/esm/puppeteer/common/ConnectionTransport.js';
8
8
  import { Frame } from './package/lib/esm/puppeteer/common/FrameManager.js';
9
9
  import { ElementHandle } from './package/lib/esm/puppeteer/common/JSHandle.js';
10
10
  import { Page } from './package/lib/esm/puppeteer/common/Page.js';
@@ -17,4 +17,3 @@ export {
17
17
  Frame,
18
18
  Page,
19
19
  };
20
-
@@ -188,6 +188,7 @@ function detectLineSeparator(text: string): CM.Extension {
188
188
 
189
189
  const baseKeymap = CM.keymap.of([
190
190
  {key: 'Tab', run: CM.acceptCompletion},
191
+ {key: 'End', run: CM.acceptCompletion},
191
192
  {key: 'Ctrl-m', run: CM.cursorMatchingBracket, shift: CM.selectMatchingBracket},
192
193
  {key: 'Mod-/', run: CM.toggleComment},
193
194
  {key: 'Mod-d', run: CM.selectNextOccurrence},
@@ -677,7 +677,7 @@ export class CookiesTable extends UI.Widget.VBox {
677
677
  cookie.addAttribute(
678
678
  SDK.Cookie.Attributes.SourcePort, Number.parseInt(data[SDK.Cookie.Attributes.SourcePort], 10) || undefined);
679
679
  }
680
- if (SDK.Cookie.Attributes.PartitionKey in data) {
680
+ if (data[SDK.Cookie.Attributes.PartitionKey]) {
681
681
  cookie.addAttribute(SDK.Cookie.Attributes.PartitionKey, data[SDK.Cookie.Attributes.PartitionKey]);
682
682
  }
683
683
  cookie.setSize(data[SDK.Cookie.Attributes.Name].length + data[SDK.Cookie.Attributes.Value].length);
package/package.json CHANGED
@@ -39,6 +39,7 @@
39
39
  "debug-unittest": "DEBUG_TEST=1 npm run unittest",
40
40
  "e2etest": "third_party/node/node.py --output scripts/test/run_test_suite.js --config=test/e2e/test-runner-config.json",
41
41
  "eslint-test": "third_party/node/node.py --output node_modules/mocha/bin/mocha \"./scripts/eslint_rules/tests/*_test.js\"",
42
+ "build-test": "third_party/node/node.py --output node_modules/mocha/bin/mocha \"./scripts/build/tests/*_test.js\"",
42
43
  "generate-dark-mode-styles": "third_party/node/node.py --output scripts/dark_mode/generate_dark_theme_sheet.js",
43
44
  "generate-protocol-resources": "scripts/deps/generate_protocol_resources.py && git cl format --js",
44
45
  "install-deps": "scripts/deps/manage_node_deps.py",
@@ -53,5 +54,5 @@
53
54
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
54
55
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
55
56
  },
56
- "version": "1.0.966086"
57
+ "version": "1.0.967610"
57
58
  }
@@ -43,11 +43,12 @@ function devtoolsPlugin(source, importer) {
43
43
  return null;
44
44
  }
45
45
 
46
- if (source === '../../lib/codemirror' || source === 'fs') {
46
+ if (source === '../../lib/codemirror' || !source.startsWith('.')) {
47
47
  // These are imported via require(...), but we don't use
48
48
  // @rollup/plugin-commonjs. So this check is not necessary for rollup. But
49
49
  // need to have this for esbuild as it doesn't ignore require(...).
50
50
  return {
51
+ id: source,
51
52
  external: true,
52
53
  };
53
54
  }
@@ -27,16 +27,17 @@ const plugin = {
27
27
  return null;
28
28
  }
29
29
 
30
- if (res.external && res.id) {
31
- return {
32
- external: res.external,
33
- path: './' + path.relative(outdir, res.id),
34
- };
35
- }
36
-
37
30
  if (res.external) {
31
+ // res.id can be both of absolutized local JavaScript path or node's
32
+ // builtin module (e.g. 'fs', 'path'), and only relativize the path in
33
+ // former case.
34
+ if (path.isAbsolute(res.id)) {
35
+ res.id = './' + path.relative(outdir, res.id);
36
+ }
37
+
38
38
  return {
39
- external: true,
39
+ external: res.external,
40
+ path: res.id,
40
41
  };
41
42
  }
42
43
 
@@ -0,0 +1,19 @@
1
+ // Copyright 2022 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 fs = require('fs');
6
+ const path = require('path');
7
+ const {writeIfChanged} = require('./write-if-changed.js');
8
+
9
+ const [, , src, dest, files] = process.argv;
10
+
11
+ for (const file of files.split(',')) {
12
+ const srcPath = path.join(src, file);
13
+ const destPath = path.join(dest, file);
14
+
15
+ // Minifying JSON is straight-forward as JSON.stringify omits whitespace.
16
+ const srcContents = fs.readFileSync(srcPath);
17
+ const destContents = JSON.stringify(JSON.parse(srcContents));
18
+ writeIfChanged(destPath, destContents);
19
+ }
@@ -0,0 +1,28 @@
1
+ # Copyright 2022 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
+ import("./node.gni")
6
+ import("./vars.gni")
7
+
8
+ template("minify_json") {
9
+ node_action(target_name) {
10
+ forward_variables_from(invoker, [ "sources" ])
11
+
12
+ script = "scripts/build/ninja/minify-json-files.js"
13
+
14
+ _src = rebase_path(".", root_build_dir)
15
+ _dest = rebase_path(target_gen_dir, root_build_dir)
16
+
17
+ args = [
18
+ _src,
19
+ _dest,
20
+ string_join(",", sources),
21
+ ]
22
+
23
+ outputs = []
24
+ foreach(_input, sources) {
25
+ outputs += [ "$target_gen_dir/$_input" ]
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,30 @@
1
+ // Copyright 2022 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 {assert} = require('chai');
6
+ const path = require('path');
7
+
8
+ const {devtoolsPlugin} = require('../devtools_plugin.js');
9
+
10
+ describe('devtools_plugin can compute paths with', () => {
11
+ it('same directory import', () => {
12
+ assert.deepEqual(
13
+ devtoolsPlugin('./AnotherFile.js', 'front_end/core/sdk/FirstFile.js'),
14
+ {id: path.join('front_end', 'core', 'sdk', 'AnotherFile.js'), external: false});
15
+ });
16
+
17
+ it('different directory import', () => {
18
+ assert.deepEqual(
19
+ devtoolsPlugin('../common/common.js', 'front_end/core/sdk/FirstFile.js'),
20
+ {id: path.join('front_end', 'core', 'common', 'common.js'), external: true});
21
+ });
22
+
23
+ it('node built-in modules', () => {
24
+ assert.deepEqual(devtoolsPlugin('fs', 'scripts/some-script.js'), {id: 'fs', external: true});
25
+ });
26
+
27
+ it('importing generated files', () => {
28
+ assert.strictEqual(devtoolsPlugin('../../generated/Protocol.js', 'front_end/core/sdk/FirstFile.js'), null);
29
+ });
30
+ });
@@ -10,11 +10,14 @@ import * as WebIDL2 from 'webidl2';
10
10
 
11
11
  import {parseTSFunction, postProcess, walkRoot} from './helpers.js';
12
12
 
13
- const program = ts.createProgram(
14
- [
15
- new URL('node_modules/typescript/lib/lib.esnext.d.ts', import.meta.url).pathname,
16
- ],
17
- {noLib: false, types: []});
13
+ if (process.argv.length !== 4) {
14
+ throw new Error('Please provide path to chromium/src and devtools-frontend');
15
+ }
16
+
17
+ const chromiumSource = process.argv[2];
18
+ const typescriptSource = process.argv[3] + 'node_modules/typescript/lib/lib.esnext.d.ts';
19
+
20
+ const program = ts.createProgram([typescriptSource], {noLib: false, types: []});
18
21
 
19
22
  for (const file of program.getSourceFiles()) {
20
23
  ts.forEachChild(file, node => {
@@ -36,7 +39,7 @@ for (const file of program.getSourceFiles()) {
36
39
  // `devtools/devtools-frontend`, where `devtools` is on the same level
37
40
  // as `chromium`. This matches `scripts/npm_test.js`.
38
41
  const files =
39
- glob.sync('../../../../chromium/src/third_party/blink/renderer/+(core|modules)/**/*.idl', {cwd: process.env.PWD});
42
+ glob.sync(`${chromiumSource}/third_party/blink/renderer/+(core|modules)/**/*.idl`, {cwd: process.env.PWD});
40
43
 
41
44
  for (const file of files) {
42
45
  if (file.includes('testing')) {
@@ -7,10 +7,10 @@
7
7
  },
8
8
  "type": "module",
9
9
  "dependencies": {
10
- "@types/webidl2": "^23.13.6",
11
- "glob": "^7.1.2",
12
- "mocha": "^9.1.4",
10
+ "@types/webidl2": "23.13.6",
11
+ "glob": "7.1.7",
12
+ "mocha": "9.1.3",
13
13
  "typescript": "latest",
14
- "webidl2": "^24.2.0"
14
+ "webidl2": "24.2.0"
15
15
  }
16
16
  }