Skip to content

Commit 7f14184

Browse files
committed
Bug 1679672 [wpt PR 26668] - [css-flex] Fix LayoutUnit overflow in automatic minimum size calculation, a=testonly
Automatic update from web-platform-tests [css-flex] Fix LayoutUnit overflow in automatic minimum size calculation When using the aspect ratio, we were doing size = large1 * large2 / large3. large1 * large2 was overflowing LayoutUnit. Now we do those calculations with the operands as doubles. We still multiply first because *most* of the time these values will all be integers, and all the integers up to LayoutUnit::Max()*LayoutUnit::Max() can be exactly represented with double precision. Change-Id: Id714f38493554c5f1b7e4dfe56bdaa6742f3d8a5 Fixed: 1151608 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2564199 Commit-Queue: David Grogan <dgroganchromium.org> Reviewed-by: Ian Kilpatrick <ikilpatrickchromium.org> Cr-Commit-Position: refs/heads/master{#832193} -- wpt-commits: 8fe6ed48ed74a30c5f7e159d3108dbb85919e4cf wpt-pr: 26668 UltraBlame original commit: b8e9b1970747ff9944d0f7f45d1d8425786bf1e5
1 parent e2101dd commit 7f14184

File tree

1 file changed

+383
-0
lines changed

1 file changed

+383
-0
lines changed
Lines changed: 383 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,383 @@
1+
<
2+
!
3+
doctype
4+
html
5+
>
6+
<
7+
link
8+
rel
9+
=
10+
"
11+
author
12+
"
13+
title
14+
=
15+
"
16+
David
17+
Grogan
18+
"
19+
href
20+
=
21+
"
22+
mailto
23+
:
24+
dgrogan
25+
chromium
26+
.
27+
org
28+
"
29+
>
30+
<
31+
link
32+
rel
33+
=
34+
"
35+
help
36+
"
37+
href
38+
=
39+
"
40+
https
41+
:
42+
/
43+
/
44+
drafts
45+
.
46+
csswg
47+
.
48+
org
49+
/
50+
css
51+
-
52+
flexbox
53+
/
54+
#
55+
min
56+
-
57+
size
58+
-
59+
auto
60+
"
61+
>
62+
<
63+
link
64+
rel
65+
=
66+
"
67+
help
68+
"
69+
href
70+
=
71+
"
72+
https
73+
:
74+
/
75+
/
76+
crbug
77+
.
78+
com
79+
/
80+
1151608
81+
"
82+
>
83+
<
84+
meta
85+
name
86+
=
87+
"
88+
assert
89+
"
90+
content
91+
=
92+
"
93+
automatic
94+
minimum
95+
size
96+
computation
97+
doesn
98+
'
99+
t
100+
overflow
101+
when
102+
multiplying
103+
by
104+
the
105+
aspect
106+
ratio
107+
"
108+
/
109+
>
110+
<
111+
script
112+
src
113+
=
114+
"
115+
/
116+
resources
117+
/
118+
testharness
119+
.
120+
js
121+
"
122+
>
123+
<
124+
/
125+
script
126+
>
127+
<
128+
script
129+
src
130+
=
131+
"
132+
/
133+
resources
134+
/
135+
testharnessreport
136+
.
137+
js
138+
"
139+
>
140+
<
141+
/
142+
script
143+
>
144+
<
145+
script
146+
src
147+
=
148+
"
149+
/
150+
resources
151+
/
152+
check
153+
-
154+
layout
155+
-
156+
th
157+
.
158+
js
159+
"
160+
>
161+
<
162+
/
163+
script
164+
>
165+
<
166+
body
167+
onload
168+
=
169+
"
170+
checkLayout
171+
(
172+
'
173+
img
174+
'
175+
)
176+
"
177+
>
178+
<
179+
div
180+
id
181+
=
182+
log
183+
>
184+
<
185+
/
186+
div
187+
>
188+
<
189+
div
190+
style
191+
=
192+
"
193+
display
194+
:
195+
flex
196+
;
197+
width
198+
:
199+
300px
200+
;
201+
"
202+
>
203+
<
204+
img
205+
src
206+
=
207+
"
208+
data
209+
:
210+
image
211+
/
212+
svg
213+
+
214+
xml
215+
%
216+
3Csvg
217+
viewBox
218+
=
219+
'
220+
0
221+
0
222+
1
223+
1
224+
'
225+
width
226+
=
227+
'
228+
8000
229+
'
230+
height
231+
=
232+
'
233+
8000
234+
'
235+
xmlns
236+
=
237+
'
238+
http
239+
:
240+
/
241+
/
242+
www
243+
.
244+
w3
245+
.
246+
org
247+
/
248+
2000
249+
/
250+
svg
251+
'
252+
%
253+
3E
254+
%
255+
3C
256+
/
257+
svg
258+
%
259+
3E
260+
"
261+
data
262+
-
263+
expected
264+
-
265+
width
266+
=
267+
8000
268+
style
269+
=
270+
"
271+
height
272+
:
273+
8000px
274+
;
275+
"
276+
>
277+
<
278+
/
279+
div
280+
>
281+
<
282+
div
283+
style
284+
=
285+
"
286+
display
287+
:
288+
flex
289+
;
290+
flex
291+
-
292+
direction
293+
:
294+
column
295+
;
296+
height
297+
:
298+
300px
299+
;
300+
"
301+
>
302+
<
303+
img
304+
src
305+
=
306+
"
307+
data
308+
:
309+
image
310+
/
311+
svg
312+
+
313+
xml
314+
%
315+
3Csvg
316+
viewBox
317+
=
318+
'
319+
0
320+
0
321+
1
322+
1
323+
'
324+
width
325+
=
326+
'
327+
8000
328+
'
329+
height
330+
=
331+
'
332+
8000
333+
'
334+
xmlns
335+
=
336+
'
337+
http
338+
:
339+
/
340+
/
341+
www
342+
.
343+
w3
344+
.
345+
org
346+
/
347+
2000
348+
/
349+
svg
350+
'
351+
%
352+
3E
353+
%
354+
3C
355+
/
356+
svg
357+
%
358+
3E
359+
"
360+
data
361+
-
362+
expected
363+
-
364+
height
365+
=
366+
8000
367+
style
368+
=
369+
"
370+
width
371+
:
372+
8000px
373+
;
374+
"
375+
>
376+
<
377+
/
378+
div
379+
>
380+
<
381+
/
382+
body
383+
>

0 commit comments

Comments
 (0)