mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
layout: Convert animated image delays < 10ms into 100 ms delays (#39189)
Some animated images in the wild have delays <10ms and browsers usually change them into 100ms as such small timings are unusual. Relevant code in FF: https://searchfox.org/firefox-main/source/image/FrameTimeout.h#35 Testing: Manually tested Fixes: #39187 Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
30d3706a2b
commit
228b240635
2 changed files with 28 additions and 3 deletions
|
@ -661,7 +661,7 @@ impl ImageAnimationState {
|
|||
.frames
|
||||
.get(self.active_frame)
|
||||
.unwrap()
|
||||
.delay
|
||||
.delay()
|
||||
.unwrap()
|
||||
.as_secs_f64();
|
||||
let mut next_active_frame_id = self.active_frame;
|
||||
|
@ -671,7 +671,7 @@ impl ImageAnimationState {
|
|||
.frames
|
||||
.get(next_active_frame_id)
|
||||
.unwrap()
|
||||
.delay
|
||||
.delay()
|
||||
.unwrap()
|
||||
.as_secs_f64();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue