chrome-devtools-frontend 1.0.1030457 → 1.0.1030946

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 (55) hide show
  1. package/front_end/Tests.js +0 -28
  2. package/front_end/core/host/UserMetrics.ts +2 -1
  3. package/front_end/core/i18n/locales/en-US.json +11 -8
  4. package/front_end/core/i18n/locales/en-XL.json +11 -8
  5. package/front_end/core/root/Runtime.ts +1 -0
  6. package/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -4
  7. package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -4
  8. package/front_end/core/sdk/NetworkRequest.ts +0 -4
  9. package/front_end/core/sdk/Resource.ts +0 -5
  10. package/front_end/core/sdk/Script.ts +71 -76
  11. package/front_end/entrypoints/main/MainImpl.ts +4 -0
  12. package/front_end/generated/InspectorBackendCommands.js +10 -8
  13. package/front_end/generated/protocol-mapping.d.ts +16 -2
  14. package/front_end/generated/protocol-proxy-api.d.ts +11 -1
  15. package/front_end/generated/protocol.ts +75 -1
  16. package/front_end/models/bindings/CompilerScriptMapping.ts +6 -3
  17. package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
  18. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
  19. package/front_end/models/bindings/IgnoreListManager.ts +10 -8
  20. package/front_end/models/bindings/ResourceMapping.ts +0 -4
  21. package/front_end/models/bindings/StylesSourceMapping.ts +0 -5
  22. package/front_end/models/extensions/ExtensionServer.ts +2 -3
  23. package/front_end/models/issues_manager/AttributionReportingIssue.ts +8 -0
  24. package/front_end/models/issues_manager/descriptions/arTooManyConcurrentRequests.md +5 -0
  25. package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
  26. package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -6
  27. package/front_end/models/persistence/PersistenceActions.ts +5 -4
  28. package/front_end/models/text_utils/CodeMirrorUtils.ts +17 -4
  29. package/front_end/models/text_utils/ContentProvider.ts +0 -1
  30. package/front_end/models/text_utils/StaticContentProvider.ts +0 -4
  31. package/front_end/models/workspace/UISourceCode.ts +10 -5
  32. package/front_end/panels/elements/CSSRuleValidator.ts +107 -123
  33. package/front_end/panels/elements/components/CSSHintDetailsView.ts +23 -20
  34. package/front_end/panels/elements/components/cssHintDetailsView.css +2 -0
  35. package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +12 -0
  36. package/front_end/panels/network/components/RequestHeadersView.css +1 -0
  37. package/front_end/panels/network/components/RequestHeadersView.ts +7 -0
  38. package/front_end/panels/sources/NavigatorView.ts +22 -0
  39. package/front_end/third_party/codemirror.next/bundle.ts +1 -1
  40. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  41. package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
  42. package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
  43. package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
  44. package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
  45. package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
  46. package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
  47. package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
  48. package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
  49. package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1247 -116
  50. package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
  51. package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +64 -0
  52. package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -11
  53. package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
  54. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +49 -0
  55. package/package.json +1 -1
@@ -14,53 +14,53 @@ import {
14
14
 
15
15
  const UIStrings = {
16
16
  /**
17
- *@description Hint prefix for deprecated properties.
17
+ *@description The type of the CSS rule validation message that is shown in the Style panel. "Deprecated property" means that the property in the declaration is deprecated and should not be used.
18
18
  */
19
- deprecatedPropertyHintPrefix: 'Deprecated Property',
19
+ deprecatedPropertyHintPrefix: 'Deprecated property',
20
20
  /**
21
- *@description Hint prefix for rule validation.
21
+ *@description The type of the CSS rule validation message that is shown in the Style panel. "Inactive property" means that a property declaration was valid syntactially but didn't have expected effect.
22
22
  */
23
- ruleValidationHintPrefix: 'Inactive rule',
23
+ inactivePropertyHintPrefix: 'Inactive property',
24
24
  /**
25
- *@description Hint for rules that was violated because of same elements rule.
26
- *@example {flex-wrap: nowrap} REASON_RULE_CODE
27
- *@example {align-content} AFFECTED_RULE_CODE
25
+ *@description The message that is shown in the Style panel when the user hovers over a property that has not effect due to some other property.
26
+ *@example {flex-wrap: nowrap} REASON_PROPERTY_DECLARATION_CODE
27
+ *@example {align-content} AFFECTED_PROPERTY_DECLARATION_CODE
28
28
  */
29
29
  ruleViolatedBySameElementRuleReason:
30
- 'This element has {REASON_RULE_CODE} rule, therefore {AFFECTED_RULE_CODE} has no effect.',
30
+ 'This element has the {REASON_PROPERTY_DECLARATION_CODE} property and, therefore, {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect.',
31
31
  /**
32
- *@description Possible fix for rules that was violated because of same elements rule.
33
- *@example {flex-wrap: nowrap} REASON_RULE_CODE
32
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to some other property.
33
+ *@example {flex-wrap: nowrap} REASON_PROPERTY_DECLARATION_CODE
34
34
  */
35
35
  ruleViolatedBySameElementRuleFix:
36
- 'For this property to work, please remove or change the value of {REASON_RULE_CODE}',
36
+ 'For this property to work, please remove or change the value of {REASON_PROPERTY_DECLARATION_CODE}.',
37
37
  /**
38
- *@description Possible fix for rules that was violated because of same elements rule.
39
- *@example {display: block} EXISTING_RULE
40
- *@example {display: flex} TARGET_RULE
38
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to the current property value.
39
+ *@example {display: block} EXISTING_PROPERTY_DECLARATION
40
+ *@example {display: flex} TARGET_PROPERTY_DECLARATION
41
41
  */
42
42
  ruleViolatedBySameElementRuleChangeSuggestion:
43
- 'For this property to work, please change the {EXISTING_RULE} rule to {TARGET_RULE}',
43
+ 'For this property to work, please change the {EXISTING_PROPERTY_DECLARATION} rule to {TARGET_PROPERTY_DECLARATION}.',
44
44
  /**
45
- *@description Hint for rules that was violated because of parent element rule.
46
- *@example {display: block} REASON_RULE_CODE
47
- *@example {flex} AFFECTED_RULE_CODE
45
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to properties of the parent element.
46
+ *@example {display: block} REASON_PROPERTY_DECLARATION_CODE
47
+ *@example {flex} AFFECTED_PROPERTY_DECLARATION_CODE
48
48
  */
49
49
  ruleViolatedByParentElementRuleReason:
50
- 'Parent element has {REASON_RULE_CODE} rule, therefore this elements {AFFECTED_RULE_CODE} has no effect',
50
+ 'Parent element has {REASON_PROPERTY_DECLARATION_CODE} rule, therefore this elements {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect.',
51
51
  /**
52
- *@description Posible fix for rules that was violated because of parent element rule.
52
+ *@description The message that is shown in the Style panel when the user hovers over a property declaration that has not effect due to the properties of the parent element.
53
53
  *@example {display: block} EXISTING_PARENT_ELEMENT_RULE
54
54
  *@example {display: flex} TARGET_PARENT_ELEMENT_RULE
55
55
  */
56
56
  ruleViolatedByParentElementRuleFix:
57
- 'Please change parent elements {EXISTING_PARENT_ELEMENT_RULE} to {TARGET_PARENT_ELEMENT_RULE} to fix this issue.',
57
+ 'Please change parent element\'s {EXISTING_PARENT_ELEMENT_RULE} to {TARGET_PARENT_ELEMENT_RULE} to fix this issue.',
58
58
  };
59
59
  const str_ = i18n.i18n.registerUIStrings('panels/elements/CSSRuleValidator.ts', UIStrings);
60
60
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
61
61
 
62
62
  export const enum AuthoringHintType {
63
- RULE_VALIDATION = 'ruleValidation',
63
+ INACTIVE_PROPERTY = 'ruleValidation',
64
64
  DEPRECATED_PROPERTY = 'deprecatedProperty',
65
65
  }
66
66
 
@@ -68,19 +68,20 @@ export class AuthoringHint {
68
68
  readonly #hintType: AuthoringHintType;
69
69
  readonly #hintMessage: string;
70
70
  readonly #possibleFixMessage: string|null;
71
- readonly #learnMore: string|null;
71
+ readonly #learnMoreLink: string|undefined;
72
72
 
73
- constructor(property: string, hintType: AuthoringHintType, hintMessage: string, possibleFixMessage: string|null, showLearnMore: boolean) {
73
+ constructor(
74
+ hintType: AuthoringHintType, hintMessage: string, possibleFixMessage: string|null, learnMoreLink?: string) {
74
75
  this.#hintType = hintType;
75
76
  this.#hintMessage = hintMessage;
76
77
  this.#possibleFixMessage = possibleFixMessage;
77
- this.#learnMore = showLearnMore ? property : null; // TODO: Add Goo.gle short link base url
78
+ this.#learnMoreLink = learnMoreLink;
78
79
  }
79
80
 
80
81
  getHintPrefix(): string {
81
82
  switch (this.#hintType) {
82
- case AuthoringHintType.RULE_VALIDATION:
83
- return i18nString(UIStrings.ruleValidationHintPrefix);
83
+ case AuthoringHintType.INACTIVE_PROPERTY:
84
+ return i18nString(UIStrings.inactivePropertyHintPrefix);
84
85
  case AuthoringHintType.DEPRECATED_PROPERTY:
85
86
  return i18nString(UIStrings.deprecatedPropertyHintPrefix);
86
87
  }
@@ -94,8 +95,8 @@ export class AuthoringHint {
94
95
  return this.#possibleFixMessage;
95
96
  }
96
97
 
97
- getLearnMoreLink(): string|null {
98
- return this.#learnMore;
98
+ getLearnMoreLink(): string|undefined {
99
+ return this.#learnMoreLink;
99
100
  }
100
101
  }
101
102
 
@@ -106,6 +107,9 @@ export abstract class CSSRuleValidator {
106
107
  this.#affectedProperties = affectedProperties;
107
108
  }
108
109
 
110
+ /**
111
+ * If `isRuleValid` returns false, it means there is a hint to be shown. The hint is retrieved by invoking `getAuthoringHint`.
112
+ */
109
113
  abstract isRuleValid(computedStyles: Map<String, String>|null, parentsComputedStyles?: Map<String, String>|null):
110
114
  boolean;
111
115
 
@@ -134,20 +138,18 @@ export class AlignContentValidator extends CSSRuleValidator {
134
138
  }
135
139
 
136
140
  getAuthoringHint(): AuthoringHint {
137
- const reasonRuleCode = buildStyledPropertyText('flex-wrap');
138
- const affectedRuleCode = buildStyledPropertyText('align-content');
141
+ const reasonPropertyDeclaration = buildStyledPropertyText('flex-wrap');
142
+ const affectedPropertyDeclarationCode = buildStyledPropertyText('align-content');
139
143
 
140
144
  return new AuthoringHint(
141
- 'align-content',
142
- AuthoringHintType.RULE_VALIDATION,
143
- i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
144
- 'REASON_RULE_CODE': reasonRuleCode,
145
- 'AFFECTED_RULE_CODE': affectedRuleCode,
146
- }),
147
- i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
148
- 'REASON_RULE_CODE': reasonRuleCode,
149
- }),
150
- true,
145
+ AuthoringHintType.INACTIVE_PROPERTY,
146
+ i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
147
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
148
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
149
+ }),
150
+ i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
151
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
152
+ }),
151
153
  );
152
154
  }
153
155
  }
@@ -167,22 +169,20 @@ export class FlexItemValidator extends CSSRuleValidator {
167
169
  getAuthoringHint(
168
170
  property: string, computedStyles: Map<String, String>|null,
169
171
  parentsComputedStyles: Map<String, String>|null): AuthoringHint {
170
- const reasonRuleCode = buildStyledRuleText('display', parentsComputedStyles?.get('display'));
171
- const affectedRuleCode = buildStyledPropertyText(property);
172
- const targetParentRuleCode = buildStyledRuleText('display', 'flex');
172
+ const reasonPropertyDeclaration = buildStyledRuleText('display', parentsComputedStyles?.get('display'));
173
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
174
+ const targeParentPropertyDeclaration = buildStyledRuleText('display', 'flex');
173
175
 
174
176
  return new AuthoringHint(
175
- property,
176
- AuthoringHintType.RULE_VALIDATION,
177
- i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
178
- 'REASON_RULE_CODE': reasonRuleCode,
179
- 'AFFECTED_RULE_CODE': affectedRuleCode,
180
- }),
181
- i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
182
- 'EXISTING_PARENT_ELEMENT_RULE': reasonRuleCode,
183
- 'TARGET_PARENT_ELEMENT_RULE': targetParentRuleCode,
184
- }),
185
- true,
177
+ AuthoringHintType.INACTIVE_PROPERTY,
178
+ i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
179
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
180
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
181
+ }),
182
+ i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
183
+ 'EXISTING_PARENT_ELEMENT_RULE': reasonPropertyDeclaration,
184
+ 'TARGET_PARENT_ELEMENT_RULE': targeParentPropertyDeclaration,
185
+ }),
186
186
  );
187
187
  }
188
188
  }
@@ -200,22 +200,20 @@ export class FlexContainerValidator extends CSSRuleValidator {
200
200
  }
201
201
 
202
202
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
203
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
203
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
204
204
  const targetRuleCode = buildStyledRuleText('display', 'flex');
205
- const affectedRuleCode = buildStyledPropertyText(property);
205
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
206
206
 
207
207
  return new AuthoringHint(
208
- property,
209
- AuthoringHintType.RULE_VALIDATION,
208
+ AuthoringHintType.INACTIVE_PROPERTY,
210
209
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
211
- 'REASON_RULE_CODE': reasonRuleCode,
212
- 'AFFECTED_RULE_CODE': affectedRuleCode,
210
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
211
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
213
212
  }),
214
213
  i18nString(UIStrings.ruleViolatedBySameElementRuleChangeSuggestion, {
215
- 'EXISTING_RULE': reasonRuleCode,
216
- 'TARGET_RULE': targetRuleCode,
214
+ 'EXISTING_PROPERTY_DECLARATION': reasonPropertyDeclaration,
215
+ 'TARGET_PROPERTY_DECLARATION': targetRuleCode,
217
216
  }),
218
- true,
219
217
  );
220
218
  }
221
219
  }
@@ -242,22 +240,20 @@ export class GridContainerValidator extends CSSRuleValidator {
242
240
  }
243
241
 
244
242
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
245
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
243
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
246
244
  const targetRuleCode = buildStyledRuleText('display', 'grid');
247
- const affectedRuleCode = buildStyledPropertyText(property);
245
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
248
246
 
249
247
  return new AuthoringHint(
250
- property,
251
- AuthoringHintType.RULE_VALIDATION,
248
+ AuthoringHintType.INACTIVE_PROPERTY,
252
249
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
253
- 'REASON_RULE_CODE': reasonRuleCode,
254
- 'AFFECTED_RULE_CODE': affectedRuleCode,
250
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
251
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
255
252
  }),
256
253
  i18nString(UIStrings.ruleViolatedBySameElementRuleChangeSuggestion, {
257
- 'EXISTING_RULE': reasonRuleCode,
258
- 'TARGET_RULE': targetRuleCode,
254
+ 'EXISTING_PROPERTY_DECLARATION': reasonPropertyDeclaration,
255
+ 'TARGET_PROPERTY_DECLARATION': targetRuleCode,
259
256
  }),
260
- true,
261
257
  );
262
258
  }
263
259
  }
@@ -283,22 +279,20 @@ export class GridItemValidator extends CSSRuleValidator {
283
279
  getAuthoringHint(
284
280
  property: string, computedStyles: Map<String, String>|null,
285
281
  parentComputedStyles: Map<String, String>|null): AuthoringHint {
286
- const reasonRuleCode = buildStyledRuleText('display', parentComputedStyles?.get('display'));
287
- const targetParentRuleCode = buildStyledRuleText('display', 'grid');
288
- const affectedRuleCode = buildStyledPropertyText(property);
282
+ const reasonPropertyDeclaration = buildStyledRuleText('display', parentComputedStyles?.get('display'));
283
+ const targeParentPropertyDeclaration = buildStyledRuleText('display', 'grid');
284
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
289
285
 
290
286
  return new AuthoringHint(
291
- property,
292
- AuthoringHintType.RULE_VALIDATION,
287
+ AuthoringHintType.INACTIVE_PROPERTY,
293
288
  i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
294
- 'REASON_RULE_CODE': reasonRuleCode,
295
- 'AFFECTED_RULE_CODE': affectedRuleCode,
289
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
290
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
296
291
  }),
297
292
  i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
298
- 'EXISTING_PARENT_ELEMENT_RULE': reasonRuleCode,
299
- 'TARGET_PARENT_ELEMENT_RULE': targetParentRuleCode,
293
+ 'EXISTING_PARENT_ELEMENT_RULE': reasonPropertyDeclaration,
294
+ 'TARGET_PARENT_ELEMENT_RULE': targeParentPropertyDeclaration,
300
295
  }),
301
- true,
302
296
  );
303
297
  }
304
298
  }
@@ -321,20 +315,18 @@ export class FlexGridValidator extends CSSRuleValidator {
321
315
  }
322
316
 
323
317
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
324
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
325
- const affectedRuleCode = buildStyledPropertyText(property);
318
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
319
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
326
320
 
327
321
  return new AuthoringHint(
328
- property,
329
- AuthoringHintType.RULE_VALIDATION,
322
+ AuthoringHintType.INACTIVE_PROPERTY,
330
323
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
331
- 'REASON_RULE_CODE': reasonRuleCode,
332
- 'AFFECTED_RULE_CODE': affectedRuleCode,
324
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
325
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
333
326
  }),
334
327
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
335
- 'REASON_RULE_CODE': reasonRuleCode,
328
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
336
329
  }),
337
- true,
338
330
  );
339
331
  }
340
332
  }
@@ -360,20 +352,18 @@ export class MulticolFlexGridValidator extends CSSRuleValidator {
360
352
  }
361
353
 
362
354
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
363
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
364
- const affectedRuleCode = buildStyledPropertyText(property);
355
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
356
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
365
357
 
366
358
  return new AuthoringHint(
367
- property,
368
- AuthoringHintType.RULE_VALIDATION,
359
+ AuthoringHintType.INACTIVE_PROPERTY,
369
360
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
370
- 'REASON_RULE_CODE': reasonRuleCode,
371
- 'AFFECTED_RULE_CODE': affectedRuleCode,
361
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
362
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
372
363
  }),
373
364
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
374
- 'REASON_RULE_CODE': reasonRuleCode,
365
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
375
366
  }),
376
- true,
377
367
  );
378
368
  }
379
369
  }
@@ -400,20 +390,18 @@ export class PaddingValidator extends CSSRuleValidator {
400
390
  }
401
391
 
402
392
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
403
- const reasonRuleCode = buildStyledRuleText('display', computedStyles?.get('display'));
404
- const affectedRuleCode = buildStyledPropertyText(property);
393
+ const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
394
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
405
395
 
406
396
  return new AuthoringHint(
407
- property,
408
- AuthoringHintType.RULE_VALIDATION,
397
+ AuthoringHintType.INACTIVE_PROPERTY,
409
398
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
410
- 'REASON_RULE_CODE': reasonRuleCode,
411
- 'AFFECTED_RULE_CODE': affectedRuleCode,
399
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
400
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
412
401
  }),
413
402
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
414
- 'REASON_RULE_CODE': reasonRuleCode,
403
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
415
404
  }),
416
- true,
417
405
  );
418
406
  }
419
407
  }
@@ -437,20 +425,18 @@ export class PositionValidator extends CSSRuleValidator {
437
425
  }
438
426
 
439
427
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
440
- const reasonRuleCode = buildStyledRuleText('position', computedStyles?.get('position'));
441
- const affectedRuleCode = buildStyledPropertyText(property);
428
+ const reasonPropertyDeclaration = buildStyledRuleText('position', computedStyles?.get('position'));
429
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
442
430
 
443
431
  return new AuthoringHint(
444
- property,
445
- AuthoringHintType.RULE_VALIDATION,
432
+ AuthoringHintType.INACTIVE_PROPERTY,
446
433
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
447
- 'REASON_RULE_CODE': reasonRuleCode,
448
- 'AFFECTED_RULE_CODE': affectedRuleCode,
434
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
435
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
449
436
  }),
450
437
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
451
- 'REASON_RULE_CODE': reasonRuleCode,
438
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
452
439
  }),
453
- true,
454
440
  );
455
441
  }
456
442
  }
@@ -472,20 +458,18 @@ export class ZIndexValidator extends CSSRuleValidator {
472
458
  }
473
459
 
474
460
  getAuthoringHint(property: string, computedStyles: Map<String, String>|null): AuthoringHint {
475
- const reasonRuleCode = buildStyledRuleText('position', computedStyles?.get('position'));
476
- const affectedRuleCode = buildStyledPropertyText(property);
461
+ const reasonPropertyDeclaration = buildStyledRuleText('position', computedStyles?.get('position'));
462
+ const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
477
463
 
478
464
  return new AuthoringHint(
479
- property,
480
- AuthoringHintType.RULE_VALIDATION,
465
+ AuthoringHintType.INACTIVE_PROPERTY,
481
466
  i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
482
- 'REASON_RULE_CODE': reasonRuleCode,
483
- 'AFFECTED_RULE_CODE': affectedRuleCode,
467
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
468
+ 'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
484
469
  }),
485
470
  i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
486
- 'REASON_RULE_CODE': reasonRuleCode,
471
+ 'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
487
472
  }),
488
- true,
489
473
  );
490
474
  }
491
475
  }
@@ -23,7 +23,7 @@ interface Hint {
23
23
  getHintPrefix(): string;
24
24
  getHintMessage(): string;
25
25
  getPossibleFixMessage(): string|null;
26
- getLearnMoreLink(): string|null;
26
+ getLearnMoreLink(): string|undefined;
27
27
  }
28
28
 
29
29
  export class CSSHintDetailsView extends HTMLElement {
@@ -39,25 +39,28 @@ export class CSSHintDetailsView extends HTMLElement {
39
39
  }
40
40
 
41
41
  #render(): void {
42
- render(html`
43
- <div class="hint-popup-wrapper">
44
- <div class="hint-popup-reason">
45
- <strong>${this.#authoringHint.getHintPrefix()}:</strong> ${Directives.unsafeHTML(this.#authoringHint.getHintMessage())}
46
- </div>
47
- ${this.#authoringHint.getPossibleFixMessage() ? html`
48
- <div class="hint-popup-possible-fix">
49
- ${Directives.unsafeHTML(this.#authoringHint.getPossibleFixMessage())}
50
- ${this.#authoringHint.getLearnMoreLink() ? html`
51
- <x-link id='learn-more' href='${this.#authoringHint.getLearnMoreLink()}' class='clickable underlined unbreakable-text'}>
52
- ${i18nString(UIStrings.learnMore)}
53
- </x-link>
54
- `: ''}
55
- </div>
56
- ` : ''}
57
- </div>
58
- `, this.#shadow, {
59
- host: this,
60
- });
42
+ const link = this.#authoringHint.getLearnMoreLink();
43
+ // clang-format off
44
+ render(html`
45
+ <div class="hint-popup-wrapper">
46
+ <div class="hint-popup-reason">
47
+ <strong>${this.#authoringHint.getHintPrefix()}:</strong> ${Directives.unsafeHTML(this.#authoringHint.getHintMessage())}
48
+ </div>
49
+ ${this.#authoringHint.getPossibleFixMessage() ? html`
50
+ <div class="hint-popup-possible-fix">
51
+ ${Directives.unsafeHTML(this.#authoringHint.getPossibleFixMessage())}
52
+ ${link ? html`
53
+ <x-link id="learn-more" href=${link} class="clickable underlined unbreakable-text"}>
54
+ ${i18nString(UIStrings.learnMore)}
55
+ </x-link>
56
+ `: ''}
57
+ </div>
58
+ ` : ''}
59
+ </div>
60
+ `, this.#shadow, {
61
+ host: this,
62
+ });
63
+ // clang-format on
61
64
  }
62
65
  }
63
66
 
@@ -13,6 +13,8 @@
13
13
  code {
14
14
  background-color: var(--color-background-elevation-1);
15
15
  padding: 0 2px;
16
+ font-size: var(--source-code-font-size);
17
+ font-family: var(--source-code-font-family);
16
18
  }
17
19
 
18
20
  .property {
@@ -22,6 +22,10 @@ const UIStrings = {
22
22
  * @description Noun, label for the column showing the invalid header value in the issue details table.
23
23
  */
24
24
  invalidHeaderValue: 'Invalid Header Value',
25
+ /**
26
+ * @description Noun, label for the column showing the maximum concurrent registrations header value in the issue details table.
27
+ */
28
+ maximumConcurrentRegistrations: 'Maximum Concurrent Registrations',
25
29
  /**
26
30
  * @description Noun, label for the column showing the associated network request in the issue details table.
27
31
  */
@@ -71,6 +75,10 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
71
75
  this.appendColumnTitle(header, i18nString(UIStrings.element));
72
76
  this.appendColumnTitle(header, i18nString(UIStrings.request));
73
77
  break;
78
+ case IssuesManager.AttributionReportingIssue.IssueCode.TooManyConcurrentRequests:
79
+ this.appendColumnTitle(header, i18nString(UIStrings.element));
80
+ this.appendColumnTitle(header, i18nString(UIStrings.maximumConcurrentRegistrations));
81
+ break;
74
82
  }
75
83
 
76
84
  this.affectedResources.appendChild(header);
@@ -107,6 +115,10 @@ export class AttributionReportingIssueDetailsView extends AffectedResourcesView
107
115
  await this.#appendElementOrEmptyCell(element, issue);
108
116
  this.#appendRequestOrEmptyCell(element, details.request);
109
117
  break;
118
+ case IssuesManager.AttributionReportingIssue.IssueCode.TooManyConcurrentRequests:
119
+ await this.#appendElementOrEmptyCell(element, issue);
120
+ this.appendIssueDetailCell(element, details.invalidParameter || '');
121
+ break;
110
122
  }
111
123
 
112
124
  this.affectedResources.appendChild(element);
@@ -64,6 +64,7 @@ div.raw-headers-row {
64
64
  font-weight: 500;
65
65
  width: 160px;
66
66
  flex-shrink: 0;
67
+ text-transform: capitalize;
67
68
  }
68
69
 
69
70
  .header-value {
@@ -311,6 +311,10 @@ export class RequestHeadersComponent extends HTMLElement {
311
311
  this.#render();
312
312
  };
313
313
 
314
+ if (!mergedHeaders.length) {
315
+ return LitHtml.nothing;
316
+ }
317
+
314
318
  // Disabled until https://crbug.com/1079231 is fixed.
315
319
  // clang-format off
316
320
  return html`
@@ -395,6 +399,9 @@ export class RequestHeadersComponent extends HTMLElement {
395
399
  return Platform.StringUtilities.compare(a.name.toLowerCase(), b.name.toLowerCase());
396
400
  });
397
401
  const requestHeadersText = this.#request.requestHeadersText();
402
+ if (!headers.length && requestHeadersText !== undefined) {
403
+ return LitHtml.nothing;
404
+ }
398
405
 
399
406
  const toggleShowRaw = (): void => {
400
407
  this.#showRequestHeadersText = !this.#showRequestHeadersText;
@@ -211,6 +211,16 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
211
211
  this.navigatorGroupByAuthoredExperiment = Root.Runtime.ExperimentName.AUTHORED_DEPLOYED_GROUPING;
212
212
  }
213
213
 
214
+ Common.Settings.Settings.instance()
215
+ .moduleSetting('skipStackFramesPattern')
216
+ .addChangeListener(this.ignoreListChanged.bind(this));
217
+ Common.Settings.Settings.instance()
218
+ .moduleSetting('skipContentScripts')
219
+ .addChangeListener(this.ignoreListChanged.bind(this));
220
+ Common.Settings.Settings.instance()
221
+ .moduleSetting('automaticallyIgnoreListKnownThirdPartyScripts')
222
+ .addChangeListener(this.ignoreListChanged.bind(this));
223
+
214
224
  this.initGrouping();
215
225
 
216
226
  Persistence.Persistence.PersistenceImpl.instance().addEventListener(
@@ -443,6 +453,12 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
443
453
  }
444
454
 
445
455
  private addUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): void {
456
+ if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE) &&
457
+ Bindings.IgnoreListManager.IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(
458
+ uiSourceCode)) {
459
+ return;
460
+ }
461
+
446
462
  if (!this.acceptsUISourceCode(uiSourceCode)) {
447
463
  return;
448
464
  }
@@ -1033,6 +1049,12 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
1033
1049
  this.workspaceInternal.uiSourceCodes().forEach(this.addUISourceCode.bind(this));
1034
1050
  }
1035
1051
 
1052
+ private ignoreListChanged(): void {
1053
+ if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.JUST_MY_CODE)) {
1054
+ this.groupingChanged();
1055
+ }
1056
+ }
1057
+
1036
1058
  private initGrouping(): void {
1037
1059
  this.groupByFrame = true;
1038
1060
  this.groupByDomain = this.navigatorGroupByFolderSetting.get();
@@ -78,7 +78,7 @@ export async function shell() {
78
78
  return StreamLanguage.define((await import('@codemirror/legacy-modes/mode/shell')).shell);
79
79
  }
80
80
  export async function cssStreamParser() {
81
- return (await import('@codemirror/legacy-modes/mode/css') as any).sCSS;
81
+ return (await import('@codemirror/legacy-modes/mode/css') as any).css;
82
82
  }
83
83
  export function wast() {
84
84
  return import('@codemirror/lang-wast');