Skip to content

Commit e219a0d

Browse files
committed
Sync with google/devtools-frontend
Current HEAD ChromeDevTools/devtools-frontend@17cba89
1 parent 15f77c3 commit e219a0d

File tree

775 files changed

+14732
-6890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

775 files changed

+14732
-6890
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ test/perf/.generated
4646
/.vscode/settings.json
4747
/.vscode/tasks.json
4848
/.vscode/launch.json
49+
node_modules/

config/gni/devtools_grd_files.gni

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ grd_files_release_sources = [
7070
"front_end/Images/chromeLeft.avif",
7171
"front_end/Images/chromeMiddle.avif",
7272
"front_end/Images/chromeRight.avif",
73+
"front_end/Images/class.svg",
7374
"front_end/Images/clear-list.svg",
7475
"front_end/Images/clear.svg",
7576
"front_end/Images/cloud.svg",
@@ -142,6 +143,7 @@ grd_files_release_sources = [
142143
"front_end/Images/heap-snapshot.svg",
143144
"front_end/Images/heap-snapshots.svg",
144145
"front_end/Images/help.svg",
146+
"front_end/Images/hover.svg",
145147
"front_end/Images/iframe-crossed.svg",
146148
"front_end/Images/iframe.svg",
147149
"front_end/Images/import.svg",
@@ -601,9 +603,13 @@ grd_files_release_sources = [
601603
"front_end/panels/sources/sources-meta.js",
602604
"front_end/panels/sources/sources.js",
603605
"front_end/panels/timeline/components/components.js",
606+
"front_end/panels/timeline/components/insights/insights.js",
604607
"front_end/panels/timeline/extensions/extensions.js",
608+
"front_end/panels/timeline/overlays/components/components.js",
609+
"front_end/panels/timeline/overlays/overlays.js",
605610
"front_end/panels/timeline/timeline-meta.js",
606611
"front_end/panels/timeline/timeline.js",
612+
"front_end/panels/timeline/utils/utils.js",
607613
"front_end/panels/utils/utils.js",
608614
"front_end/panels/web_audio/graph_visualizer/graph_visualizer.js",
609615
"front_end/panels/web_audio/web_audio-meta.js",
@@ -750,7 +756,6 @@ grd_files_debug_sources = [
750756
"front_end/core/platform/MimeType.js",
751757
"front_end/core/platform/NumberUtilities.js",
752758
"front_end/core/platform/PromiseUtilities.js",
753-
"front_end/core/platform/SetUtilities.js",
754759
"front_end/core/platform/StringUtilities.js",
755760
"front_end/core/platform/Timing.js",
756761
"front_end/core/platform/TypedArrayUtilities.js",
@@ -966,6 +971,7 @@ grd_files_debug_sources = [
966971
"front_end/models/persistence/editFileSystemView.css.js",
967972
"front_end/models/persistence/workspaceSettingsTab.css.js",
968973
"front_end/models/source_map_scopes/NamesResolver.js",
974+
"front_end/models/source_map_scopes/ScopeChainModel.js",
969975
"front_end/models/source_map_scopes/ScopeTreeCache.js",
970976
"front_end/models/text_utils/CodeMirrorUtils.js",
971977
"front_end/models/text_utils/ContentData.js",
@@ -981,7 +987,6 @@ grd_files_debug_sources = [
981987
"front_end/models/timeline_model/TimelineModelFilter.js",
982988
"front_end/models/timeline_model/TimelineProfileTree.js",
983989
"front_end/models/timeline_model/TracingLayerTree.js",
984-
"front_end/models/trace/EntriesFilter.js",
985990
"front_end/models/trace/LanternComputationData.js",
986991
"front_end/models/trace/ModelImpl.js",
987992
"front_end/models/trace/Processor.js",
@@ -1021,12 +1026,14 @@ grd_files_debug_sources = [
10211026
"front_end/models/trace/handlers/WorkersHandler.js",
10221027
"front_end/models/trace/handlers/types.js",
10231028
"front_end/models/trace/helpers/Extensions.js",
1029+
"front_end/models/trace/helpers/Network.js",
10241030
"front_end/models/trace/helpers/SamplesIntegrator.js",
10251031
"front_end/models/trace/helpers/SyntheticEvents.js",
10261032
"front_end/models/trace/helpers/Timing.js",
10271033
"front_end/models/trace/helpers/Trace.js",
10281034
"front_end/models/trace/helpers/TreeHelpers.js",
10291035
"front_end/models/trace/insights/CumulativeLayoutShift.js",
1036+
"front_end/models/trace/insights/DocumentLatency.js",
10301037
"front_end/models/trace/insights/InsightRunners.js",
10311038
"front_end/models/trace/insights/InteractionToNextPaint.js",
10321039
"front_end/models/trace/insights/LargestContentfulPaint.js",
@@ -1345,7 +1352,9 @@ grd_files_debug_sources = [
13451352
"front_end/panels/freestyler/FreestylerEvaluateAction.js",
13461353
"front_end/panels/freestyler/FreestylerPanel.js",
13471354
"front_end/panels/freestyler/components/FreestylerChatUi.js",
1355+
"front_end/panels/freestyler/components/ProvideFeedback.js",
13481356
"front_end/panels/freestyler/components/freestylerChatUi.css.js",
1357+
"front_end/panels/freestyler/components/provideFeedback.css.js",
13491358
"front_end/panels/freestyler/freestylerPanel.css.js",
13501359
"front_end/panels/issues/AffectedBlockedByResponseView.js",
13511360
"front_end/panels/issues/AffectedCookiesView.js",
@@ -1685,6 +1694,7 @@ grd_files_debug_sources = [
16851694
"front_end/panels/timeline/CompatibilityTracksAppender.js",
16861695
"front_end/panels/timeline/CountersGraph.js",
16871696
"front_end/panels/timeline/EasterEgg.js",
1697+
"front_end/panels/timeline/EntriesFilter.js",
16881698
"front_end/panels/timeline/EventUICategory.js",
16891699
"front_end/panels/timeline/EventsSerializer.js",
16901700
"front_end/panels/timeline/EventsTimelineTreeView.js",
@@ -1698,7 +1708,6 @@ grd_files_debug_sources = [
16981708
"front_end/panels/timeline/LayoutShiftsTrackAppender.js",
16991709
"front_end/panels/timeline/ModificationsManager.js",
17001710
"front_end/panels/timeline/NetworkTrackAppender.js",
1701-
"front_end/panels/timeline/Overlays.js",
17021711
"front_end/panels/timeline/SaveFileFormatter.js",
17031712
"front_end/panels/timeline/SourceMapsResolver.js",
17041713
"front_end/panels/timeline/TargetForEvent.js",
@@ -1728,36 +1737,47 @@ grd_files_debug_sources = [
17281737
"front_end/panels/timeline/components/BreadcrumbsUI.js",
17291738
"front_end/panels/timeline/components/CPUThrottlingSelector.js",
17301739
"front_end/panels/timeline/components/DetailsView.js",
1731-
"front_end/panels/timeline/components/EntryLabelOverlay.js",
1740+
"front_end/panels/timeline/components/FieldSettingsDialog.js",
17321741
"front_end/panels/timeline/components/InteractionBreakdown.js",
17331742
"front_end/panels/timeline/components/LiveMetricsView.js",
1743+
"front_end/panels/timeline/components/NetworkRequestDetails.js",
17341744
"front_end/panels/timeline/components/NetworkRequestTooltip.js",
17351745
"front_end/panels/timeline/components/NetworkThrottlingSelector.js",
17361746
"front_end/panels/timeline/components/Sidebar.js",
17371747
"front_end/panels/timeline/components/SidebarAnnotationsTab.js",
1738-
"front_end/panels/timeline/components/SidebarInsight.js",
1739-
"front_end/panels/timeline/components/TimeRangeOverlay.js",
1740-
"front_end/panels/timeline/components/TimespanBreakdownOverlay.js",
1748+
"front_end/panels/timeline/components/SidebarSingleNavigation.js",
17411749
"front_end/panels/timeline/components/Utils.js",
17421750
"front_end/panels/timeline/components/breadcrumbsUI.css.js",
1743-
"front_end/panels/timeline/components/entryLabelOverlay.css.js",
1751+
"front_end/panels/timeline/components/fieldSettingsDialog.css.js",
1752+
"front_end/panels/timeline/components/insights/LCPDiscovery.js",
1753+
"front_end/panels/timeline/components/insights/LCPPhases.js",
1754+
"front_end/panels/timeline/components/insights/SidebarInsight.js",
1755+
"front_end/panels/timeline/components/insights/sidebarInsight.css.js",
1756+
"front_end/panels/timeline/components/insights/types.js",
17441757
"front_end/panels/timeline/components/interactionBreakdown.css.js",
17451758
"front_end/panels/timeline/components/liveMetricsView.css.js",
1759+
"front_end/panels/timeline/components/networkRequestDetails.css.js",
17461760
"front_end/panels/timeline/components/networkRequestTooltip.css.js",
17471761
"front_end/panels/timeline/components/sidebar.css.js",
17481762
"front_end/panels/timeline/components/sidebarAnnotationsTab.css.js",
1749-
"front_end/panels/timeline/components/sidebarInsight.css.js",
1750-
"front_end/panels/timeline/components/timeRangeOverlay.css.js",
1751-
"front_end/panels/timeline/components/timespanBreakdownOverlay.css.js",
1763+
"front_end/panels/timeline/components/sidebarSingleNavigation.css.js",
17521764
"front_end/panels/timeline/extensions/ExtensionUI.js",
17531765
"front_end/panels/timeline/historyToolbarButton.css.js",
1766+
"front_end/panels/timeline/overlays/OverlaysImpl.js",
1767+
"front_end/panels/timeline/overlays/components/EntryLabelOverlay.js",
1768+
"front_end/panels/timeline/overlays/components/TimeRangeOverlay.js",
1769+
"front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.js",
1770+
"front_end/panels/timeline/overlays/components/entryLabelOverlay.css.js",
1771+
"front_end/panels/timeline/overlays/components/timeRangeOverlay.css.js",
1772+
"front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css.js",
17541773
"front_end/panels/timeline/timelineFlameChartView.css.js",
17551774
"front_end/panels/timeline/timelineFlamechartPopover.css.js",
17561775
"front_end/panels/timeline/timelineHistoryManager.css.js",
17571776
"front_end/panels/timeline/timelineMiniMap.css.js",
17581777
"front_end/panels/timeline/timelinePaintProfiler.css.js",
17591778
"front_end/panels/timeline/timelinePanel.css.js",
17601779
"front_end/panels/timeline/timelineStatusDialog.css.js",
1780+
"front_end/panels/timeline/utils/NetworkRequest.js",
17611781
"front_end/panels/web_audio/AudioContextContentBuilder.js",
17621782
"front_end/panels/web_audio/AudioContextSelector.js",
17631783
"front_end/panels/web_audio/WebAudioModel.js",
@@ -1864,6 +1884,7 @@ grd_files_debug_sources = [
18641884
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserConnector.js",
18651885
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js",
18661886
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CDPSession.js",
1887+
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/CdpPreloadScript.js",
18671888
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ChromeTargetManager.js",
18681889
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Connection.js",
18691890
"front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Coverage.js",

config/gni/devtools_image_files.gni

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ devtools_svg_sources = [
7474
"chevron-left.svg",
7575
"chevron-right.svg",
7676
"chevron-up.svg",
77+
"class.svg",
7778
"clear-list.svg",
7879
"clear.svg",
7980
"cloud.svg",
@@ -145,6 +146,7 @@ devtools_svg_sources = [
145146
"heap-snapshot.svg",
146147
"heap-snapshots.svg",
147148
"help.svg",
149+
"hover.svg",
148150
"iframe-crossed.svg",
149151
"iframe.svg",
150152
"import.svg",

front_end/.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ module.exports = {
4848
'rulesdir/ban_a_tags_in_lit_html': 'error',
4949
'rulesdir/check_component_naming': 'error',
5050
'rulesdir/check_css_import': 'error',
51+
'rulesdir/enforce-optional-properties-last': 'error',
5152
'rulesdir/check_enumerated_histograms': 'error',
5253
'rulesdir/check_was_shown_methods': 'error',
5354
'rulesdir/static_custom_event_names': 'error',

front_end/BUILD.gn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ group("unittests") {
189189
"panels/sources/components:unittests",
190190
"panels/timeline:unittests",
191191
"panels/timeline/components:unittests",
192+
"panels/timeline/components/insights:unittests",
192193
"panels/timeline/fixtures/traces",
194+
"panels/timeline/overlays:unittests",
193195
"panels/timeline/track_appenders:unittests",
194196
"panels/utils:unittests",
195197
"panels/web_audio:unittests",

front_end/Images/src/class.svg

Lines changed: 6 additions & 0 deletions
Loading

front_end/Images/src/hover.svg

Lines changed: 6 additions & 0 deletions
Loading

front_end/core/common/Color.ts

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,49 +2385,19 @@ export const IsolationModeHighlight = {
23852385
Mask: Legacy.fromRGBA([248, 249, 249, 1]),
23862386
};
23872387

2388+
type Space = number|{
2389+
min: number,
2390+
max: number,
2391+
count: (number|undefined),
2392+
};
2393+
23882394
export class Generator {
2389-
readonly #hueSpace: number|{
2390-
min: number,
2391-
max: number,
2392-
count: (number|undefined),
2393-
};
2394-
readonly #satSpace: number|{
2395-
min: number,
2396-
max: number,
2397-
count: (number|undefined),
2398-
};
2399-
readonly #lightnessSpace: number|{
2400-
min: number,
2401-
max: number,
2402-
count: (number|undefined),
2403-
};
2404-
readonly #alphaSpace: number|{
2405-
min: number,
2406-
max: number,
2407-
count: (number|undefined),
2408-
};
2395+
readonly #hueSpace: Space;
2396+
readonly #satSpace: Space;
2397+
readonly #lightnessSpace: Space;
2398+
readonly #alphaSpace: Space;
24092399
readonly #colors: Map<string, string>;
2410-
constructor(
2411-
hueSpace?: number|{
2412-
min: number,
2413-
max: number,
2414-
count: (number|undefined),
2415-
},
2416-
satSpace?: number|{
2417-
min: number,
2418-
max: number,
2419-
count: (number|undefined),
2420-
},
2421-
lightnessSpace?: number|{
2422-
min: number,
2423-
max: number,
2424-
count: (number|undefined),
2425-
},
2426-
alphaSpace?: number|{
2427-
min: number,
2428-
max: number,
2429-
count: (number|undefined),
2430-
}) {
2400+
constructor(hueSpace?: Space, satSpace?: Space, lightnessSpace?: Space, alphaSpace?: Space) {
24312401
this.#hueSpace = hueSpace || {min: 0, max: 360, count: undefined};
24322402
this.#satSpace = satSpace || 67;
24332403
this.#lightnessSpace = lightnessSpace || 80;
@@ -2461,11 +2431,7 @@ export class Generator {
24612431
return `${start})`;
24622432
}
24632433

2464-
private indexToValueInSpace(index: number, space: number|{
2465-
min: number,
2466-
max: number,
2467-
count: (number|undefined),
2468-
}): number {
2434+
private indexToValueInSpace(index: number, space: Space): number {
24692435
if (typeof space === 'number') {
24702436
return space;
24712437
}

front_end/core/common/ColorUtils.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ describe('ColorUtils', () => {
2222
assert.deepEqual(result, [0, 0.5, 0.5, 0.5], 'RGBA color was not converted to HWB successfully');
2323
});
2424

25-
it('is able to return the luminance of an RGBA value with the RGB values more than 0.03928', () => {
25+
it('is able to return the luminance of an RGBA value with the RGB values more than 0.04045', () => {
2626
const lum = Common.ColorUtils.luminance([0.5, 0.5, 0.5, 0.5]);
2727
assert.strictEqual(lum, 0.21404114048223255, 'luminance was not calculated correctly');
2828
});
2929

30-
it('is able to return the luminance of an RGBA value with the RGB values less than 0.03928', () => {
30+
it('is able to return the luminance of an RGBA value with the RGB values less than 0.04045', () => {
3131
const lum = Common.ColorUtils.luminance([0.03927, 0.03927, 0.03927, 0.5]);
3232
assert.strictEqual(lum, 0.003039473684210526, 'luminance was not calculated correctly');
3333
});

front_end/core/common/ColorUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ export function rgbaToHwba([r, g, b, a]: Color4DOr3D): Color4DOr3D {
7777

7878
/**
7979
* Calculate the luminance of this color using the WCAG algorithm.
80-
* See http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
80+
* See https://www.w3.org/TR/WCAG21/#dfn-relative-luminance.
8181
*/
8282
export function luminance([rSRGB, gSRGB, bSRGB]: number[]): number {
83-
const r = rSRGB <= 0.03928 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055) / 1.055), 2.4);
84-
const g = gSRGB <= 0.03928 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055) / 1.055), 2.4);
85-
const b = bSRGB <= 0.03928 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055) / 1.055), 2.4);
83+
const r = rSRGB <= 0.04045 ? rSRGB / 12.92 : Math.pow(((rSRGB + 0.055) / 1.055), 2.4);
84+
const g = gSRGB <= 0.04045 ? gSRGB / 12.92 : Math.pow(((gSRGB + 0.055) / 1.055), 2.4);
85+
const b = bSRGB <= 0.04045 ? bSRGB / 12.92 : Math.pow(((bSRGB + 0.055) / 1.055), 2.4);
8686

8787
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
8888
}

0 commit comments

Comments
 (0)