chrome-devtools-frontend 1.0.966086 → 1.0.966659

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.
@@ -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',
@@ -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
 
@@ -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
-
@@ -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
@@ -53,5 +53,5 @@
53
53
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
54
54
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
55
55
  },
56
- "version": "1.0.966086"
56
+ "version": "1.0.966659"
57
57
  }
@@ -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
  }
@@ -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
+ }
@@ -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
  }