chrome-devtools-frontend 1.0.965113 → 1.0.965611

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 (150) hide show
  1. package/front_end/core/common/ResolverBase.ts +2 -2
  2. package/front_end/core/i18n/locales/af.json +55 -22
  3. package/front_end/core/i18n/locales/am.json +55 -22
  4. package/front_end/core/i18n/locales/ar.json +55 -22
  5. package/front_end/core/i18n/locales/as.json +55 -22
  6. package/front_end/core/i18n/locales/az.json +55 -22
  7. package/front_end/core/i18n/locales/be.json +55 -22
  8. package/front_end/core/i18n/locales/bg.json +55 -22
  9. package/front_end/core/i18n/locales/bn.json +33 -0
  10. package/front_end/core/i18n/locales/bs.json +53 -20
  11. package/front_end/core/i18n/locales/ca.json +55 -22
  12. package/front_end/core/i18n/locales/cs.json +54 -21
  13. package/front_end/core/i18n/locales/cy.json +55 -22
  14. package/front_end/core/i18n/locales/da.json +54 -21
  15. package/front_end/core/i18n/locales/de.json +55 -22
  16. package/front_end/core/i18n/locales/el.json +55 -22
  17. package/front_end/core/i18n/locales/en-GB.json +33 -0
  18. package/front_end/core/i18n/locales/es-419.json +55 -22
  19. package/front_end/core/i18n/locales/es.json +55 -22
  20. package/front_end/core/i18n/locales/et.json +55 -22
  21. package/front_end/core/i18n/locales/eu.json +33 -0
  22. package/front_end/core/i18n/locales/fa.json +56 -23
  23. package/front_end/core/i18n/locales/fi.json +55 -22
  24. package/front_end/core/i18n/locales/fil.json +55 -22
  25. package/front_end/core/i18n/locales/fr-CA.json +55 -22
  26. package/front_end/core/i18n/locales/fr.json +55 -22
  27. package/front_end/core/i18n/locales/gl.json +55 -22
  28. package/front_end/core/i18n/locales/gu.json +33 -0
  29. package/front_end/core/i18n/locales/he.json +55 -22
  30. package/front_end/core/i18n/locales/hi.json +33 -0
  31. package/front_end/core/i18n/locales/hr.json +33 -0
  32. package/front_end/core/i18n/locales/hu.json +55 -22
  33. package/front_end/core/i18n/locales/hy.json +55 -22
  34. package/front_end/core/i18n/locales/id.json +55 -22
  35. package/front_end/core/i18n/locales/is.json +55 -22
  36. package/front_end/core/i18n/locales/it.json +55 -22
  37. package/front_end/core/i18n/locales/ja.json +63 -30
  38. package/front_end/core/i18n/locales/ka.json +55 -22
  39. package/front_end/core/i18n/locales/kk.json +55 -22
  40. package/front_end/core/i18n/locales/km.json +55 -22
  41. package/front_end/core/i18n/locales/kn.json +55 -22
  42. package/front_end/core/i18n/locales/ko.json +55 -22
  43. package/front_end/core/i18n/locales/ky.json +55 -22
  44. package/front_end/core/i18n/locales/lo.json +55 -22
  45. package/front_end/core/i18n/locales/lt.json +55 -22
  46. package/front_end/core/i18n/locales/lv.json +55 -22
  47. package/front_end/core/i18n/locales/mk.json +55 -22
  48. package/front_end/core/i18n/locales/ml.json +33 -0
  49. package/front_end/core/i18n/locales/mn.json +33 -0
  50. package/front_end/core/i18n/locales/mr.json +54 -21
  51. package/front_end/core/i18n/locales/ms.json +55 -22
  52. package/front_end/core/i18n/locales/my.json +55 -22
  53. package/front_end/core/i18n/locales/ne.json +54 -21
  54. package/front_end/core/i18n/locales/nl.json +55 -22
  55. package/front_end/core/i18n/locales/no.json +55 -22
  56. package/front_end/core/i18n/locales/or.json +55 -22
  57. package/front_end/core/i18n/locales/pa.json +55 -22
  58. package/front_end/core/i18n/locales/pl.json +33 -0
  59. package/front_end/core/i18n/locales/pt-PT.json +55 -22
  60. package/front_end/core/i18n/locales/pt.json +55 -22
  61. package/front_end/core/i18n/locales/ro.json +33 -0
  62. package/front_end/core/i18n/locales/ru.json +55 -22
  63. package/front_end/core/i18n/locales/si.json +55 -22
  64. package/front_end/core/i18n/locales/sk.json +55 -22
  65. package/front_end/core/i18n/locales/sl.json +55 -22
  66. package/front_end/core/i18n/locales/sq.json +55 -22
  67. package/front_end/core/i18n/locales/sr-Latn.json +55 -22
  68. package/front_end/core/i18n/locales/sr.json +55 -22
  69. package/front_end/core/i18n/locales/sv.json +55 -22
  70. package/front_end/core/i18n/locales/sw.json +55 -22
  71. package/front_end/core/i18n/locales/ta.json +55 -22
  72. package/front_end/core/i18n/locales/te.json +42 -9
  73. package/front_end/core/i18n/locales/th.json +33 -0
  74. package/front_end/core/i18n/locales/tr.json +55 -22
  75. package/front_end/core/i18n/locales/uk.json +55 -22
  76. package/front_end/core/i18n/locales/ur.json +55 -22
  77. package/front_end/core/i18n/locales/uz.json +55 -22
  78. package/front_end/core/i18n/locales/vi.json +54 -21
  79. package/front_end/core/i18n/locales/zh-HK.json +55 -22
  80. package/front_end/core/i18n/locales/zh-TW.json +54 -21
  81. package/front_end/core/i18n/locales/zh.json +55 -22
  82. package/front_end/core/i18n/locales/zu.json +55 -22
  83. package/front_end/core/sdk/CSSProperty.ts +8 -8
  84. package/front_end/core/sdk/RemoteObject.ts +1 -1
  85. package/front_end/core/sdk/Resource.ts +5 -2
  86. package/front_end/core/sdk/RuntimeModel.ts +10 -0
  87. package/front_end/legacy_test_runner/console_test_runner/console_test_runner.js +9 -3
  88. package/front_end/legacy_test_runner/sources_test_runner/DebuggerTestRunner.js +5 -5
  89. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  90. package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +1 -1
  91. package/front_end/models/workspace/WorkspaceImpl.ts +62 -37
  92. package/front_end/panels/console/ConsoleViewMessage.ts +33 -6
  93. package/front_end/panels/console/ErrorStackParser.ts +34 -0
  94. package/front_end/panels/emulation/DeviceModeView.ts +6 -2
  95. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +1 -2
  96. package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +954 -885
  97. package/front_end/third_party/lighthouse/locales/ar-XB.json +40 -4
  98. package/front_end/third_party/lighthouse/locales/ar.json +59 -23
  99. package/front_end/third_party/lighthouse/locales/bg.json +40 -4
  100. package/front_end/third_party/lighthouse/locales/ca.json +45 -9
  101. package/front_end/third_party/lighthouse/locales/cs.json +39 -3
  102. package/front_end/third_party/lighthouse/locales/da.json +43 -7
  103. package/front_end/third_party/lighthouse/locales/de.json +42 -6
  104. package/front_end/third_party/lighthouse/locales/el.json +59 -23
  105. package/front_end/third_party/lighthouse/locales/en-GB.json +43 -7
  106. package/front_end/third_party/lighthouse/locales/en-US.json +48 -6
  107. package/front_end/third_party/lighthouse/locales/en-XA.json +40 -4
  108. package/front_end/third_party/lighthouse/locales/en-XL.json +48 -6
  109. package/front_end/third_party/lighthouse/locales/es-419.json +39 -3
  110. package/front_end/third_party/lighthouse/locales/es.json +46 -10
  111. package/front_end/third_party/lighthouse/locales/fi.json +57 -21
  112. package/front_end/third_party/lighthouse/locales/fil.json +40 -4
  113. package/front_end/third_party/lighthouse/locales/fr.json +45 -9
  114. package/front_end/third_party/lighthouse/locales/he.json +41 -5
  115. package/front_end/third_party/lighthouse/locales/hi.json +59 -23
  116. package/front_end/third_party/lighthouse/locales/hr.json +57 -21
  117. package/front_end/third_party/lighthouse/locales/hu.json +39 -3
  118. package/front_end/third_party/lighthouse/locales/id.json +40 -4
  119. package/front_end/third_party/lighthouse/locales/it.json +40 -4
  120. package/front_end/third_party/lighthouse/locales/ja.json +39 -3
  121. package/front_end/third_party/lighthouse/locales/ko.json +40 -4
  122. package/front_end/third_party/lighthouse/locales/lt.json +40 -4
  123. package/front_end/third_party/lighthouse/locales/lv.json +56 -20
  124. package/front_end/third_party/lighthouse/locales/nl.json +40 -4
  125. package/front_end/third_party/lighthouse/locales/no.json +56 -20
  126. package/front_end/third_party/lighthouse/locales/pl.json +56 -20
  127. package/front_end/third_party/lighthouse/locales/pt-PT.json +57 -21
  128. package/front_end/third_party/lighthouse/locales/pt.json +41 -5
  129. package/front_end/third_party/lighthouse/locales/ro.json +39 -3
  130. package/front_end/third_party/lighthouse/locales/ru.json +40 -4
  131. package/front_end/third_party/lighthouse/locales/sk.json +39 -3
  132. package/front_end/third_party/lighthouse/locales/sl.json +39 -3
  133. package/front_end/third_party/lighthouse/locales/sr-Latn.json +40 -4
  134. package/front_end/third_party/lighthouse/locales/sr.json +40 -4
  135. package/front_end/third_party/lighthouse/locales/sv.json +39 -3
  136. package/front_end/third_party/lighthouse/locales/ta.json +47 -11
  137. package/front_end/third_party/lighthouse/locales/te.json +61 -25
  138. package/front_end/third_party/lighthouse/locales/th.json +39 -3
  139. package/front_end/third_party/lighthouse/locales/tr.json +40 -4
  140. package/front_end/third_party/lighthouse/locales/uk.json +40 -4
  141. package/front_end/third_party/lighthouse/locales/vi.json +63 -27
  142. package/front_end/third_party/lighthouse/locales/zh-HK.json +40 -4
  143. package/front_end/third_party/lighthouse/locales/zh-TW.json +45 -9
  144. package/front_end/third_party/lighthouse/locales/zh.json +41 -5
  145. package/front_end/third_party/lighthouse/report/bundle.d.ts +1 -0
  146. package/front_end/third_party/lighthouse/report/bundle.js +23 -11
  147. package/front_end/third_party/lighthouse/report-assets/report-generator.js +1 -1
  148. package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +3 -3
  149. package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +2 -2
  150. package/package.json +1 -1
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as Common from '../../core/common/common.js';
6
6
  import type * as SDK from '../../core/sdk/sdk.js';
7
+ import type * as Protocol from '../../generated/protocol.js';
7
8
 
8
9
  export interface ParsedErrorFrame {
9
10
  line: string;
@@ -11,6 +12,7 @@ export interface ParsedErrorFrame {
11
12
  url: string,
12
13
  lineNumber?: number,
13
14
  columnNumber?: number, enclosedInBraces: boolean, positionLeft: number, positionRight: number,
15
+ scriptId?: Protocol.Runtime.ScriptId,
14
16
  };
15
17
  }
16
18
 
@@ -115,3 +117,35 @@ function parseOrScriptMatch(debuggerModel: SDK.DebuggerModel.DebuggerModel, url:
115
117
  }
116
118
  return null;
117
119
  }
120
+
121
+ /**
122
+ * Error#stack output only contains script URLs. In some cases we are able to
123
+ * retrieve additional exception details from V8 that we can use to augment
124
+ * the parsed Error#stack with script IDs.
125
+ * This function sets the `scriptId` field in `ParsedErrorFrame` when it finds
126
+ * the corresponding info in `Protocol.Runtime.StackTrace`.
127
+ */
128
+ export function augmentErrorStackWithScriptIds(
129
+ parsedFrames: ParsedErrorFrame[], protocolStackTrace: Protocol.Runtime.StackTrace): void {
130
+ // Note that the number of frames between the two stack traces can differ. The
131
+ // parsed Error#stack can contain Builtin frames which are not present in the protocol
132
+ // stack. This means its easier to always search the whole protocol stack for a matching
133
+ // frame rather then trying to detect the Builtin frames and skipping them.
134
+ for (const parsedFrame of parsedFrames) {
135
+ const protocolFrame = protocolStackTrace.callFrames.find(frame => framesMatch(parsedFrame, frame));
136
+ if (protocolFrame && parsedFrame.link) {
137
+ parsedFrame.link.scriptId = protocolFrame.scriptId;
138
+ }
139
+ }
140
+ }
141
+
142
+ /** Returns true iff both stack frames have the same url and line/column numbers. The function name is ignored */
143
+ function framesMatch(parsedFrame: ParsedErrorFrame, protocolFrame: Protocol.Runtime.CallFrame): boolean {
144
+ if (!parsedFrame.link) {
145
+ return false;
146
+ }
147
+
148
+ const {url, lineNumber, columnNumber} = parsedFrame.link;
149
+ return url === protocolFrame.url && lineNumber === protocolFrame.lineNumber &&
150
+ columnNumber === protocolFrame.columnNumber;
151
+ }
@@ -467,7 +467,9 @@ export class DeviceModeView extends UI.Widget.VBox {
467
467
 
468
468
  const canvas = document.createElement('canvas');
469
469
  canvas.width = Math.floor(outlineRect.width);
470
- canvas.height = Math.floor(outlineRect.height);
470
+ // Cap the height to not hit the GPU limit.
471
+ // https://crbug.com/1260828
472
+ canvas.height = Math.min((1 << 14), Math.floor(outlineRect.height));
471
473
  const ctx = canvas.getContext('2d');
472
474
  if (!ctx) {
473
475
  throw new Error('Could not get 2d context from canvas.');
@@ -507,7 +509,9 @@ export class DeviceModeView extends UI.Widget.VBox {
507
509
  pageImage.onload = (): void => {
508
510
  const canvas = document.createElement('canvas');
509
511
  canvas.width = pageImage.naturalWidth;
510
- canvas.height = pageImage.naturalHeight;
512
+ // Cap the height to not hit the GPU limit.
513
+ // https://crbug.com/1260828
514
+ canvas.height = Math.min((1 << 14), Math.floor(pageImage.naturalHeight));
511
515
  const ctx = canvas.getContext('2d');
512
516
  if (!ctx) {
513
517
  throw new Error('Could not get 2d context for base64 screenshot.');
@@ -171,7 +171,7 @@ export class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWid
171
171
  this.createWatchExpression(null).startEditing();
172
172
  }
173
173
 
174
- doUpdate(): Promise<void> {
174
+ async doUpdate(): Promise<void> {
175
175
  this.linkifier.reset();
176
176
  this.contentElement.removeChildren();
177
177
  this.treeOutline.removeChildren();
@@ -191,7 +191,6 @@ export class WatchExpressionsSidebarPane extends UI.ThrottledWidget.ThrottledWid
191
191
 
192
192
  this.createWatchExpression(expression);
193
193
  }
194
- return Promise.resolve();
195
194
  }
196
195
 
197
196
  private createWatchExpression(expression: string|null): WatchExpression {