jonhoo / inferno

A Rust port of FlameGraph
Other
1.65k stars 118 forks source link

Workaround for Firefox bug: clear viewbox later #242

Closed itamarst closed 2 years ago

itamarst commented 2 years ago

Fixes #241

codecov[bot] commented 2 years ago

Codecov Report

Merging #242 (fe57e16) into master (e7b8d1e) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #242   +/-   ##
=======================================
  Coverage   87.21%   87.21%           
=======================================
  Files          18       18           
  Lines        2527     2527           
=======================================
  Hits         2204     2204           
  Misses        323      323           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update e7b8d1e...fe57e16. Read the comment docs.

jonhoo commented 2 years ago

Huh, very interesting. I wonder if this'd be better suited to go in the setTimeout(function() { block slightly lower down, just so it doesn't run on every resize (after all, it doesn't do anything after the first time it's invoked). What do you think?

itamarst commented 2 years ago

Other points, beyond the location:

I'm trying to remember if I tried it in setTimeout. Possibly not. But there are definitely some rendering race conditions in there that mean setTimeout might not work, will try.

itamarst commented 2 years ago

Just validated that disabling quirks mode in my HTML page does not fix the original bug.

itamarst commented 2 years ago

And Safari seems happy regardless, both with and without the fix.

itamarst commented 2 years ago

Moving to setTimeout seems to also fix the Firefox problem, so I will update PR.

itamarst commented 2 years ago

(Going to do a bit more manual testing even after I push the change, I'll let you know when I'm completely convinced.)

jonhoo commented 2 years ago

Release in 0.11.4 :tada: