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.
- package/front_end/Tests.js +0 -28
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +11 -8
- package/front_end/core/i18n/locales/en-XL.json +11 -8
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +0 -4
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +0 -4
- package/front_end/core/sdk/NetworkRequest.ts +0 -4
- package/front_end/core/sdk/Resource.ts +0 -5
- package/front_end/core/sdk/Script.ts +71 -76
- package/front_end/entrypoints/main/MainImpl.ts +4 -0
- package/front_end/generated/InspectorBackendCommands.js +10 -8
- package/front_end/generated/protocol-mapping.d.ts +16 -2
- package/front_end/generated/protocol-proxy-api.d.ts +11 -1
- package/front_end/generated/protocol.ts +75 -1
- package/front_end/models/bindings/CompilerScriptMapping.ts +6 -3
- package/front_end/models/bindings/ContentProviderBasedProject.ts +2 -3
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -4
- package/front_end/models/bindings/IgnoreListManager.ts +10 -8
- package/front_end/models/bindings/ResourceMapping.ts +0 -4
- package/front_end/models/bindings/StylesSourceMapping.ts +0 -5
- package/front_end/models/extensions/ExtensionServer.ts +2 -3
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +8 -0
- package/front_end/models/issues_manager/descriptions/arTooManyConcurrentRequests.md +5 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +4 -6
- package/front_end/models/persistence/PersistenceActions.ts +5 -4
- package/front_end/models/text_utils/CodeMirrorUtils.ts +17 -4
- package/front_end/models/text_utils/ContentProvider.ts +0 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +0 -4
- package/front_end/models/workspace/UISourceCode.ts +10 -5
- package/front_end/panels/elements/CSSRuleValidator.ts +107 -123
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +23 -20
- package/front_end/panels/elements/components/cssHintDetailsView.css +2 -0
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +12 -0
- package/front_end/panels/network/components/RequestHeadersView.css +1 -0
- package/front_end/panels/network/components/RequestHeadersView.ts +7 -0
- package/front_end/panels/sources/NavigatorView.ts +22 -0
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/json.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -2
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -2
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1247 -116
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -2
- package/front_end/ui/components/docs/building-ui-documentation/StylingComponents.md +64 -0
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +10 -11
- package/front_end/ui/legacy/components/source_frame/PreviewFactory.ts +1 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +49 -0
- package/package.json +1 -1
@@ -14,53 +14,53 @@ import {
|
|
14
14
|
|
15
15
|
const UIStrings = {
|
16
16
|
/**
|
17
|
-
*@description
|
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
|
19
|
+
deprecatedPropertyHintPrefix: 'Deprecated property',
|
20
20
|
/**
|
21
|
-
*@description
|
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
|
-
|
23
|
+
inactivePropertyHintPrefix: 'Inactive property',
|
24
24
|
/**
|
25
|
-
*@description
|
26
|
-
*@example {flex-wrap: nowrap}
|
27
|
-
*@example {align-content}
|
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 {
|
30
|
+
'This element has the {REASON_PROPERTY_DECLARATION_CODE} property and, therefore, {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect.',
|
31
31
|
/**
|
32
|
-
*@description
|
33
|
-
*@example {flex-wrap: nowrap}
|
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 {
|
36
|
+
'For this property to work, please remove or change the value of {REASON_PROPERTY_DECLARATION_CODE}.',
|
37
37
|
/**
|
38
|
-
*@description
|
39
|
-
*@example {display: block}
|
40
|
-
*@example {display: flex}
|
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 {
|
43
|
+
'For this property to work, please change the {EXISTING_PROPERTY_DECLARATION} rule to {TARGET_PROPERTY_DECLARATION}.',
|
44
44
|
/**
|
45
|
-
*@description
|
46
|
-
*@example {display: block}
|
47
|
-
*@example {flex}
|
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 {
|
50
|
+
'Parent element has {REASON_PROPERTY_DECLARATION_CODE} rule, therefore this elements {AFFECTED_PROPERTY_DECLARATION_CODE} has no effect.',
|
51
51
|
/**
|
52
|
-
*@description
|
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
|
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
|
-
|
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 #
|
71
|
+
readonly #learnMoreLink: string|undefined;
|
72
72
|
|
73
|
-
constructor(
|
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.#
|
78
|
+
this.#learnMoreLink = learnMoreLink;
|
78
79
|
}
|
79
80
|
|
80
81
|
getHintPrefix(): string {
|
81
82
|
switch (this.#hintType) {
|
82
|
-
case AuthoringHintType.
|
83
|
-
return i18nString(UIStrings.
|
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|
|
98
|
-
return this.#
|
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
|
138
|
-
const
|
141
|
+
const reasonPropertyDeclaration = buildStyledPropertyText('flex-wrap');
|
142
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText('align-content');
|
139
143
|
|
140
144
|
return new AuthoringHint(
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
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
|
171
|
-
const
|
172
|
-
const
|
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
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
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
|
203
|
+
const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
|
204
204
|
const targetRuleCode = buildStyledRuleText('display', 'flex');
|
205
|
-
const
|
205
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
206
206
|
|
207
207
|
return new AuthoringHint(
|
208
|
-
|
209
|
-
AuthoringHintType.RULE_VALIDATION,
|
208
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
210
209
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
211
|
-
'
|
212
|
-
'
|
210
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
211
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
213
212
|
}),
|
214
213
|
i18nString(UIStrings.ruleViolatedBySameElementRuleChangeSuggestion, {
|
215
|
-
'
|
216
|
-
'
|
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
|
243
|
+
const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
|
246
244
|
const targetRuleCode = buildStyledRuleText('display', 'grid');
|
247
|
-
const
|
245
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
248
246
|
|
249
247
|
return new AuthoringHint(
|
250
|
-
|
251
|
-
AuthoringHintType.RULE_VALIDATION,
|
248
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
252
249
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
253
|
-
'
|
254
|
-
'
|
250
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
251
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
255
252
|
}),
|
256
253
|
i18nString(UIStrings.ruleViolatedBySameElementRuleChangeSuggestion, {
|
257
|
-
'
|
258
|
-
'
|
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
|
287
|
-
const
|
288
|
-
const
|
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
|
-
|
292
|
-
AuthoringHintType.RULE_VALIDATION,
|
287
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
293
288
|
i18nString(UIStrings.ruleViolatedByParentElementRuleReason, {
|
294
|
-
'
|
295
|
-
'
|
289
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
290
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
296
291
|
}),
|
297
292
|
i18nString(UIStrings.ruleViolatedByParentElementRuleFix, {
|
298
|
-
'EXISTING_PARENT_ELEMENT_RULE':
|
299
|
-
'TARGET_PARENT_ELEMENT_RULE':
|
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
|
325
|
-
const
|
318
|
+
const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
|
319
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
326
320
|
|
327
321
|
return new AuthoringHint(
|
328
|
-
|
329
|
-
AuthoringHintType.RULE_VALIDATION,
|
322
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
330
323
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
331
|
-
'
|
332
|
-
'
|
324
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
325
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
333
326
|
}),
|
334
327
|
i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
|
335
|
-
'
|
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
|
364
|
-
const
|
355
|
+
const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
|
356
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
365
357
|
|
366
358
|
return new AuthoringHint(
|
367
|
-
|
368
|
-
AuthoringHintType.RULE_VALIDATION,
|
359
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
369
360
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
370
|
-
'
|
371
|
-
'
|
361
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
362
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
372
363
|
}),
|
373
364
|
i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
|
374
|
-
'
|
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
|
404
|
-
const
|
393
|
+
const reasonPropertyDeclaration = buildStyledRuleText('display', computedStyles?.get('display'));
|
394
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
405
395
|
|
406
396
|
return new AuthoringHint(
|
407
|
-
|
408
|
-
AuthoringHintType.RULE_VALIDATION,
|
397
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
409
398
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
410
|
-
'
|
411
|
-
'
|
399
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
400
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
412
401
|
}),
|
413
402
|
i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
|
414
|
-
'
|
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
|
441
|
-
const
|
428
|
+
const reasonPropertyDeclaration = buildStyledRuleText('position', computedStyles?.get('position'));
|
429
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
442
430
|
|
443
431
|
return new AuthoringHint(
|
444
|
-
|
445
|
-
AuthoringHintType.RULE_VALIDATION,
|
432
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
446
433
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
447
|
-
'
|
448
|
-
'
|
434
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
435
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
449
436
|
}),
|
450
437
|
i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
|
451
|
-
'
|
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
|
476
|
-
const
|
461
|
+
const reasonPropertyDeclaration = buildStyledRuleText('position', computedStyles?.get('position'));
|
462
|
+
const affectedPropertyDeclarationCode = buildStyledPropertyText(property);
|
477
463
|
|
478
464
|
return new AuthoringHint(
|
479
|
-
|
480
|
-
AuthoringHintType.RULE_VALIDATION,
|
465
|
+
AuthoringHintType.INACTIVE_PROPERTY,
|
481
466
|
i18nString(UIStrings.ruleViolatedBySameElementRuleReason, {
|
482
|
-
'
|
483
|
-
'
|
467
|
+
'REASON_PROPERTY_DECLARATION_CODE': reasonPropertyDeclaration,
|
468
|
+
'AFFECTED_PROPERTY_DECLARATION_CODE': affectedPropertyDeclarationCode,
|
484
469
|
}),
|
485
470
|
i18nString(UIStrings.ruleViolatedBySameElementRuleFix, {
|
486
|
-
'
|
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|
|
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
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
|
@@ -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);
|
@@ -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).
|
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');
|