Skip to content

Commit 8416bd3

Browse files
author
Firefox Profiler [bot]
committed
🔃 Daily sync: main -> l10n (September 5, 2025)
2 parents 6a06a4a + f6db0d3 commit 8416bd3

18 files changed

+136
-286
lines changed

‎.prettierignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ src/types/libdef/npm
33
docs-user/js
44
docs-user/css
55
src/test/fixtures/upgrades
6-
res/zee-worker.js
76
dist
87
coverage
98
taskcluster/

‎package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
"license-check": "devtools-license-check",
3535
"preinstall": "node bin/pre-install.js",
3636
"publish": "rimraf public_html && cp -r dist public_html",
37-
"serve-static": "ws -d dist/ -s index.html -p 4242",
37+
"serve-static": "ws -d dist/ -s index.html -p 4243",
3838
"start": "yarn build:clean && cross-env NODE_ENV=development node server.js",
3939
"start-prod": "yarn build-prod && yarn serve-static",
4040
"start-l10n": "yarn build:clean && cross-env NODE_ENV=development L10N=1 node server.js",
4141
"start-l10n-prod": "yarn build-l10n-prod && yarn serve-static",
42-
"start-examples": "ws -d examples/ -s index.html -p 4242",
42+
"start-examples": "ws -d examples/ -s index.html -p 4244",
4343
"start-docs": "ws -d docs-user/ -p 3000",
4444
"start-photon": "node res/photon/server",
4545
"test": "node bin/output-fixing-commands.js cross-env LC_ALL=C TZ=UTC NODE_ENV=test jest",

‎res/gz-worker.js‎

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
async function readableStreamToBuffer(stream) {
6+
const reader = stream.getReader();
7+
const chunks = [];
8+
9+
try {
10+
while (true) {
11+
const { done, value } = await reader.read();
12+
if (done) break;
13+
if (value) {
14+
chunks.push(value);
15+
}
16+
}
17+
} finally {
18+
reader.releaseLock();
19+
}
20+
21+
// Calculate total length and combine chunks
22+
const totalLength = chunks.reduce((sum, chunk) => sum + chunk.length, 0);
23+
const result = new Uint8Array(totalLength);
24+
let offset = 0;
25+
for (const chunk of chunks) {
26+
result.set(chunk, offset);
27+
offset += chunk.length;
28+
}
29+
30+
return result;
31+
}
32+
33+
onmessage = async (e) => {
34+
let data = e.data;
35+
if (data.kind === 'compress') {
36+
// Create a gzip compression stream
37+
const compressionStream = new CompressionStream('gzip');
38+
39+
// Write the data to the compression stream
40+
const writer = compressionStream.writable.getWriter();
41+
writer.write(data.arrayData);
42+
writer.close();
43+
44+
// Read the compressed data back into a buffer
45+
let result = await readableStreamToBuffer(compressionStream.readable);
46+
postMessage(result, [result.buffer]);
47+
} else if (data.kind === 'decompress') {
48+
// Create a gzip compression stream
49+
const decompressionStream = new DecompressionStream('gzip');
50+
51+
// Write the data to the compression stream
52+
const writer = decompressionStream.writable.getWriter();
53+
writer.write(data.arrayData);
54+
writer.close();
55+
56+
// Read the compressed data back into a buffer
57+
let result = await readableStreamToBuffer(decompressionStream.readable);
58+
postMessage(result, [result.buffer]);
59+
} else {
60+
throw new Error('unknown message');
61+
}
62+
};

‎res/zee-worker.js‎

Lines changed: 0 additions & 80 deletions
This file was deleted.

‎src/actions/receive-profile.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ async function _extractZipFromResponse(
10651065
async function _extractJsonFromArrayBuffer(
10661066
arrayBuffer: ArrayBuffer
10671067
): Promise<unknown> {
1068-
let profileBytes: Uint8Array<ArrayBufferLike> = new Uint8Array(arrayBuffer);
1068+
let profileBytes = new Uint8Array(arrayBuffer);
10691069
// Check for the gzip magic number in the header.
10701070
if (isGzip(profileBytes)) {
10711071
profileBytes = await decompress(profileBytes);

‎src/components/shared/FilterNavigatorBar.css‎

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
cursor: default;
2121
user-select: none;
2222

23-
/* Note: no overflow: hidden so that we can see the exit animation for ranges */
23+
/* Note: no overflow: hidden for historical reasons - we wanted to see
24+
an animation for items at the end while they were fading out, but
25+
we have removed this animation in the meantime */
2426
}
2527

2628
.filterNavigatorBarItem {
@@ -40,9 +42,6 @@
4042
in the forced colors media query. */
4143
forced-color-adjust: none;
4244
line-height: 24px;
43-
transition:
44-
opacity 250ms var(--animation-curve),
45-
transform 250ms var(--animation-curve);
4645
}
4746

4847
.filterNavigatorBarRootItem {
@@ -98,23 +97,12 @@
9897
}
9998

10099
.filterNavigatorBarItem:not(.filterNavigatorBarLeafItem)::after {
101-
animation: fadeIn 250ms var(--animation-curve);
102100
background-image: var(--internal-separator-img);
103101
background-position: -18px -12px;
104102
background-repeat: no-repeat;
105103
background-size: 24px 24px;
106104
}
107105

108-
@keyframes fadeIn {
109-
from {
110-
opacity: 0;
111-
}
112-
113-
to {
114-
opacity: 1;
115-
}
116-
}
117-
118106
.filterNavigatorBarItem:not(
119107
.filterNavigatorBarRootItem,
120108
.filterNavigatorBarLeafItem
@@ -163,46 +151,6 @@
163151
opacity: 0.65;
164152
}
165153

166-
/* Animation */
167-
168-
.filterNavigatorBarUncommittedTransition-exit {
169-
/* Because of the underlying transition library, this element is still here
170-
* while the new "committed" element is created, which pushes it further
171-
* right. By using display: none here, we prevent this bad effect. */
172-
display: none;
173-
}
174-
175-
.filterNavigatorBarTransition-enter {
176-
color: inherit;
177-
178-
/* We use the same value as the uncommitted item.
179-
* Note that the "uncommitted item" won't have this "enter" class when
180-
* committing, because of how we insert it (it's not part of the same loop). */
181-
opacity: 0.65;
182-
}
183-
184-
.filterNavigatorBarTransition-enter.filterNavigatorBarTransition-enter-active {
185-
color: var(--internal-selected-color);
186-
opacity: 1;
187-
}
188-
189-
.filterNavigatorBarTransition-exit {
190-
opacity: 1;
191-
}
192-
193-
.filterNavigatorBarTransition-exit.filterNavigatorBarTransition-exit-active {
194-
opacity: 0;
195-
transform: translateX(50%);
196-
}
197-
198-
/* Do not animate the filter navigator bar items when user prefers reduced motion */
199-
@media (prefers-reduced-motion) {
200-
.filterNavigatorBarItem {
201-
animation: none;
202-
transition: none;
203-
}
204-
}
205-
206154
@media (forced-colors: active) {
207155
.filterNavigatorBar {
208156
--internal-background-color: ButtonFace;

‎src/components/shared/FilterNavigatorBar.tsx‎

Lines changed: 17 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import * as React from 'react';
66
import classNames from 'classnames';
7-
import { CSSTransition, TransitionGroup } from 'react-transition-group';
87
import './FilterNavigatorBar.css';
98

109
type FilterNavigatorBarListItemProps = {
@@ -71,31 +70,21 @@ export class FilterNavigatorBar extends React.PureComponent<Props> {
7170
const { className, items, selectedItem, uncommittedItem, onPop } =
7271
this.props;
7372

74-
const transitions = items.map((item, i) => (
75-
<CSSTransition
76-
key={i}
77-
classNames="filterNavigatorBarTransition"
78-
timeout={250}
79-
>
80-
<FilterNavigatorBarListItem
81-
index={i}
82-
onClick={i === items.length - 1 && !uncommittedItem ? null : onPop}
83-
isFirstItem={i === 0}
84-
isLastItem={i === items.length - 1}
85-
isSelectedItem={i === selectedItem}
86-
>
87-
{item}
88-
</FilterNavigatorBarListItem>
89-
</CSSTransition>
90-
));
91-
92-
if (uncommittedItem) {
93-
transitions.push(
94-
<CSSTransition
95-
key={items.length}
96-
classNames="filterNavigatorBarUncommittedTransition"
97-
timeout={0}
98-
>
73+
return (
74+
<ol className={classNames('filterNavigatorBar', className)}>
75+
{items.map((item, i) => (
76+
<FilterNavigatorBarListItem
77+
key={i}
78+
index={i}
79+
onClick={i === items.length - 1 && !uncommittedItem ? null : onPop}
80+
isFirstItem={i === 0}
81+
isLastItem={i === items.length - 1}
82+
isSelectedItem={i === selectedItem}
83+
>
84+
{item}
85+
</FilterNavigatorBarListItem>
86+
))}
87+
{uncommittedItem ? (
9988
<FilterNavigatorBarListItem
10089
index={items.length}
10190
isFirstItem={false}
@@ -106,17 +95,8 @@ export class FilterNavigatorBar extends React.PureComponent<Props> {
10695
>
10796
{uncommittedItem}
10897
</FilterNavigatorBarListItem>
109-
</CSSTransition>
110-
);
111-
}
112-
113-
return (
114-
<TransitionGroup
115-
component="ol"
116-
className={classNames('filterNavigatorBar', className)}
117-
>
118-
{transitions}
119-
</TransitionGroup>
98+
) : null}
99+
</ol>
120100
);
121101
}
122102
}

‎src/components/tooltip/NetworkMarker.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const HUMAN_LABEL_FOR_PHASE: Record<NetworkPhaseName, string> = {
4646
connectEnd: 'Waiting for HTTP request',
4747
requestStart: 'HTTP request and waiting for response',
4848
responseStart: 'HTTP response',
49-
responseEnd: 'Waiting to transmit the response',
49+
responseEnd: 'Waiting for main thread',
5050
endTime: 'End',
5151
};
5252

‎src/profile-logic/process-profile.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,9 +1980,7 @@ export async function unserializeProfileOfArbitraryFormat(
19801980
// object is constructed from an ArrayBuffer in a different context... which
19811981
// happens in our tests.
19821982
if (String(arbitraryFormat) === '[object ArrayBuffer]') {
1983-
// Obviously Flow doesn't understand that this is correct, so let's help
1984-
// Flow here.
1985-
let arrayBuffer: ArrayBufferLike = arbitraryFormat as any;
1983+
let arrayBuffer = arbitraryFormat as ArrayBuffer;
19861984

19871985
// Check for the gzip magic number in the header. If we find it, decompress
19881986
// the data first.

‎src/test/components/__snapshots__/FilterNavigatorBar.test.tsx.snap‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ exports[`app/ProfileFilterNavigator renders ProfileFilterNavigator properly 2`]
4040
</button>
4141
</li>
4242
<li
43-
class="filterNavigatorBarItem filterNavigatorBarSelectedItem filterNavigatorBarLeafItem filterNavigatorBarTransition-enter filterNavigatorBarTransition-enter-active"
43+
class="filterNavigatorBarItem filterNavigatorBarSelectedItem filterNavigatorBarLeafItem"
4444
>
4545
<span
4646
class="filterNavigatorBarItemContent"
@@ -70,7 +70,7 @@ exports[`app/ProfileFilterNavigator renders ProfileFilterNavigator properly 3`]
7070
</button>
7171
</li>
7272
<li
73-
class="filterNavigatorBarItem filterNavigatorBarSelectedItem filterNavigatorBarLeafItem filterNavigatorBarTransition-enter filterNavigatorBarTransition-enter-active"
73+
class="filterNavigatorBarItem filterNavigatorBarSelectedItem filterNavigatorBarLeafItem"
7474
>
7575
<button
7676
class="filterNavigatorBarItemContent"
@@ -80,7 +80,7 @@ exports[`app/ProfileFilterNavigator renders ProfileFilterNavigator properly 3`]
8080
</button>
8181
</li>
8282
<li
83-
class="filterNavigatorBarItem filterNavigatorBarUncommittedItem filterNavigatorBarLeafItem filterNavigatorBarUncommittedTransition-enter filterNavigatorBarUncommittedTransition-enter-active"
83+
class="filterNavigatorBarItem filterNavigatorBarUncommittedItem filterNavigatorBarLeafItem"
8484
title="100μs"
8585
>
8686
<span

0 commit comments

Comments
 (0)