chrome-devtools-frontend 1.0.1650100 → 1.0.1650232
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/core/host/UserMetrics.ts +0 -15
- package/front_end/core/sdk/CSSMetadata.ts +72 -0
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +13 -4
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -7
- package/front_end/panels/network/RequestConditionsDrawer.ts +236 -198
- package/front_end/panels/network/requestConditionsDrawer.css +3 -0
- package/front_end/panels/whats_new/ReleaseNoteText.ts +12 -6
- package/front_end/panels/whats_new/resources/WNDT.md +8 -7
- package/front_end/third_party/third-party-web/lib/nostats-subset.js +21 -15
- package/front_end/third_party/third-party-web/package/README.md +619 -582
- package/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +1 -1
- package/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +1 -1
- package/front_end/third_party/third-party-web/package/dist/entities-nostats.json +1 -1
- package/front_end/third_party/third-party-web/package/dist/entities.json +1 -1
- package/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +27 -15
- package/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +14 -0
- package/front_end/third_party/third-party-web/package/lib/entities.test.js +10 -0
- package/front_end/third_party/third-party-web/package/lib/index.test.js +6 -6
- package/front_end/third_party/third-party-web/package/lib/markdown/template.md +1 -3
- package/front_end/third_party/third-party-web/package/package.json +7 -3
- package/front_end/third_party/third-party-web/package.json +1 -1
- package/front_end/ui/components/buttons/floatingButton.css +3 -3
- package/front_end/ui/components/lists/list.css +2 -0
- package/front_end/ui/legacy/ListWidget.ts +8 -5
- package/front_end/ui/legacy/TextPrompt.ts +5 -2
- package/front_end/ui/legacy/textPrompt.css +1 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
|
@@ -204,21 +204,6 @@ export class UserMetrics {
|
|
|
204
204
|
InspectorFrontendHostInstance.recordCountHistogram('DevTools.Freestyler.EvalResponseSize', bytes, 0, 100_000, 100);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
performanceAINetworkSummaryResponseSize(bytes: number): void {
|
|
208
|
-
InspectorFrontendHostInstance.recordCountHistogram(
|
|
209
|
-
'DevTools.PerformanceAI.NetworkSummaryResponseSize', bytes, 0, 100_000, 100);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
performanceAINetworkRequestDetailResponseSize(bytes: number): void {
|
|
213
|
-
InspectorFrontendHostInstance.recordCountHistogram(
|
|
214
|
-
'DevTools.PerformanceAI.NetworkRequestDetailResponseSize', bytes, 0, 100_000, 100);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
performanceAIMainThreadActivityResponseSize(bytes: number): void {
|
|
218
|
-
InspectorFrontendHostInstance.recordCountHistogram(
|
|
219
|
-
'DevTools.PerformanceAI.MainThreadActivityResponseSize', bytes, 0, 100_000, 100);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
207
|
builtInAiAvailability(availability: BuiltInAiAvailability): void {
|
|
223
208
|
InspectorFrontendHostInstance.recordEnumeratedHistogram(
|
|
224
209
|
EnumeratedHistogram.BuiltInAiAvailability, availability, BuiltInAiAvailability.MAX_VALUE);
|
|
@@ -138,6 +138,9 @@ export class CSSMetadata {
|
|
|
138
138
|
if (preset && preset !== value) {
|
|
139
139
|
return false;
|
|
140
140
|
}
|
|
141
|
+
if (partialValueKeywordsNoPresets.get(name)?.has(value)) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
141
144
|
return CSS.supports(name, value);
|
|
142
145
|
})
|
|
143
146
|
.sort(CSSMetadata.sortPrefixesAndCSSWideKeywordsToEnd);
|
|
@@ -517,9 +520,78 @@ const valuePresets = new Map([
|
|
|
517
520
|
['ornaments', 'ornaments(||)'],
|
|
518
521
|
['annotation', 'annotation(||)'],
|
|
519
522
|
]),
|
|
523
|
+
],
|
|
524
|
+
[
|
|
525
|
+
'clip-path', new Map([
|
|
526
|
+
['inset', 'inset(|10px|)'],
|
|
527
|
+
['circle', 'circle(|100px|)'],
|
|
528
|
+
['ellipse', 'ellipse(|100px 100px|)'],
|
|
529
|
+
['polygon', 'polygon(|50px 0px, 100px 100px, 0px 100px|)'],
|
|
530
|
+
['url', 'url(||)'],
|
|
531
|
+
])
|
|
532
|
+
],
|
|
533
|
+
[
|
|
534
|
+
'transition-timing-function', new Map([
|
|
535
|
+
['steps', 'steps(|5, end|)'],
|
|
536
|
+
['cubic-bezier', 'cubic-bezier(|0.25, 0.1, 0.25, 1|)'],
|
|
537
|
+
])
|
|
538
|
+
],
|
|
539
|
+
[
|
|
540
|
+
'animation-timing-function', new Map([
|
|
541
|
+
['steps', 'steps(|5, end|)'],
|
|
542
|
+
['cubic-bezier', 'cubic-bezier(|0.25, 0.1, 0.25, 1|)'],
|
|
543
|
+
])
|
|
544
|
+
],
|
|
545
|
+
[
|
|
546
|
+
'box-shadow',
|
|
547
|
+
new Map([
|
|
548
|
+
['inset', 'inset |0 0 10px black|'],
|
|
549
|
+
]),
|
|
550
|
+
],
|
|
551
|
+
[
|
|
552
|
+
'font-size-adjust',
|
|
553
|
+
new Map([
|
|
554
|
+
['ex-height', 'ex-height |0.5|'],
|
|
555
|
+
['cap-height', 'cap-height |0.5|'],
|
|
556
|
+
['ch-width', 'ch-width |0.5|'],
|
|
557
|
+
['ic-width', 'ic-width |0.5|'],
|
|
558
|
+
['ic-height', 'ic-height |0.5|'],
|
|
559
|
+
]),
|
|
560
|
+
],
|
|
561
|
+
[
|
|
562
|
+
'initial-letter',
|
|
563
|
+
new Map([
|
|
564
|
+
['drop', 'drop |2|'],
|
|
565
|
+
['raise', 'raise |2|'],
|
|
566
|
+
]),
|
|
567
|
+
],
|
|
568
|
+
[
|
|
569
|
+
'text-box-edge', new Map([
|
|
570
|
+
['cap', 'cap alphabetic'],
|
|
571
|
+
['ex', 'ex alphabetic'],
|
|
572
|
+
])
|
|
520
573
|
]
|
|
521
574
|
]);
|
|
522
575
|
|
|
576
|
+
const partialValueKeywordsNoPresets = new Map<string, Set<string>>([
|
|
577
|
+
['scroll-snap-type', new Set(['mandatory', 'proximity'])],
|
|
578
|
+
['scrollbar-gutter', new Set(['both-edges'])],
|
|
579
|
+
['animation-timing-function', new Set(['jump-both', 'jump-end', 'jump-none', 'jump-start'])],
|
|
580
|
+
['transition-timing-function', new Set(['jump-both', 'jump-end', 'jump-none', 'jump-start'])],
|
|
581
|
+
[
|
|
582
|
+
'animation-trigger', new Set([
|
|
583
|
+
'play',
|
|
584
|
+
'pause',
|
|
585
|
+
'play-once',
|
|
586
|
+
'play-alternate',
|
|
587
|
+
'play-forwards',
|
|
588
|
+
'play-backwards',
|
|
589
|
+
'play-pause',
|
|
590
|
+
'replay',
|
|
591
|
+
])
|
|
592
|
+
],
|
|
593
|
+
]);
|
|
594
|
+
|
|
523
595
|
const distanceProperties = new Set<string>([
|
|
524
596
|
'background-position',
|
|
525
597
|
'border-spacing',
|
|
@@ -179,7 +179,11 @@ export class JavascriptExecutor {
|
|
|
179
179
|
return error;
|
|
180
180
|
}
|
|
181
181
|
}`;
|
|
182
|
+
const timeoutSentinel = Symbol('timeout');
|
|
183
|
+
const {promise: timeoutPromise, resolve: resolveTimeout} = Promise.withResolvers<typeof timeoutSentinel>();
|
|
184
|
+
let timeoutId: ReturnType<typeof setTimeout>|undefined;
|
|
182
185
|
try {
|
|
186
|
+
timeoutId = setTimeout(() => resolveTimeout(timeoutSentinel), OBSERVATION_TIMEOUT);
|
|
183
187
|
const result = await Promise.race([
|
|
184
188
|
this.#execJs(
|
|
185
189
|
functionDeclaration,
|
|
@@ -188,11 +192,11 @@ export class JavascriptExecutor {
|
|
|
188
192
|
contextNode: this.#options.getContextNode(),
|
|
189
193
|
},
|
|
190
194
|
),
|
|
191
|
-
|
|
192
|
-
setTimeout(
|
|
193
|
-
() => reject(new Error('Script execution exceeded the maximum allowed time.')), OBSERVATION_TIMEOUT);
|
|
194
|
-
}),
|
|
195
|
+
timeoutPromise,
|
|
195
196
|
]);
|
|
197
|
+
if (result === timeoutSentinel) {
|
|
198
|
+
throw new Error('Script execution exceeded the maximum allowed time.');
|
|
199
|
+
}
|
|
196
200
|
const byteCount = Platform.StringUtilities.countWtf8Bytes(result);
|
|
197
201
|
Host.userMetrics.freestylerEvalResponseSize(byteCount);
|
|
198
202
|
if (byteCount > MAX_OBSERVATION_BYTE_LENGTH) {
|
|
@@ -217,6 +221,11 @@ export class JavascriptExecutor {
|
|
|
217
221
|
sideEffect: false,
|
|
218
222
|
canceled: false,
|
|
219
223
|
};
|
|
224
|
+
} finally {
|
|
225
|
+
if (timeoutId !== undefined) {
|
|
226
|
+
clearTimeout(timeoutId);
|
|
227
|
+
}
|
|
228
|
+
resolveTimeout(timeoutSentinel);
|
|
220
229
|
}
|
|
221
230
|
}
|
|
222
231
|
}
|
|
@@ -6,7 +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 type {UrlString} from '../../../core/platform/DevToolsPath.js';
|
|
9
|
-
import * as Platform from '../../../core/platform/platform.js';
|
|
9
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
10
10
|
import * as Root from '../../../core/root/root.js';
|
|
11
11
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
12
12
|
import * as Tracing from '../../../services/tracing/tracing.js';
|
|
@@ -936,9 +936,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
const byteCount = Platform.StringUtilities.countWtf8Bytes(summary);
|
|
940
|
-
Host.userMetrics.performanceAIMainThreadActivityResponseSize(byteCount);
|
|
941
|
-
|
|
942
939
|
this.#cacheFunctionResult(focus, cacheKey, summary);
|
|
943
940
|
const widgets: AiWidget[] = [];
|
|
944
941
|
widgets.push({
|
|
@@ -1225,9 +1222,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
1225
1222
|
};
|
|
1226
1223
|
}
|
|
1227
1224
|
|
|
1228
|
-
const byteCount = Platform.StringUtilities.countWtf8Bytes(summary);
|
|
1229
|
-
Host.userMetrics.performanceAINetworkSummaryResponseSize(byteCount);
|
|
1230
|
-
|
|
1231
1225
|
const key = `getNetworkTrackSummary({min: ${bounds.min}, max: ${bounds.max}})`;
|
|
1232
1226
|
this.#cacheFunctionResult(focus, key, summary);
|
|
1233
1227
|
return {
|