Repository navigation
Use f64 everywhere in animation logic - #392
Merged
Merged
Conversation
We were previously using a mix of f32 and f64. Then it could happen that we would first check that `a < b` in f64, but when converting to f32, they might become equal due to the precision loss. Thus this could break invariants in the logic, making a `debug_unreachable!()` reachable. Co-authored-by: Martin Robinson <[email protected]> Signed-off-by: Oriol Brufau <[email protected]>
nicoburns
approved these changes
Jun 14, 2026
mrobinson
approved these changes
Jun 14, 2026
nicoburns
pushed a commit
to nicoburns/servo
that referenced
this pull request
Jun 15, 2026
Bumps Stylo to servo/stylo#392 This avoids potential assert failures due to the precision loss of converting f64 into f32. Testing: Adds a crashtest. Since the problem was dependent on timing, it would only fail intermittently. With the fix it should never fail. Fixes: servo#45008 Signed-off-by: Oriol Brufau <[email protected]> Co-authored-by: Martin Robinson <[email protected]>
TG199
pushed a commit
to TG199/servo
that referenced
this pull request
Jun 21, 2026
Bumps Stylo to servo/stylo#392 This avoids potential assert failures due to the precision loss of converting f64 into f32. Testing: Adds a crashtest. Since the problem was dependent on timing, it would only fail intermittently. With the fix it should never fail. Fixes: servo#45008 Signed-off-by: Oriol Brufau <[email protected]> Co-authored-by: Martin Robinson <[email protected]>
Loirooriol
added a commit
that referenced
this pull request
Jul 1, 2026
We were previously using a mix of f32 and f64. Then it could happen that we would first check that `a < b` in f64, but when converting to f32, they might become equal due to the precision loss. Thus this could break invariants in the logic, making a `debug_unreachable!()` reachable. Servo PR: servo/servo#45682 Signed-off-by: Oriol Brufau <[email protected]> Co-authored-by: Martin Robinson <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We were previously using a mix of f32 and f64. Then it could happen that we would first check that
a < bin f64, but when converting to f32, they might become equal due to the precision loss. Thus this could break invariants in the logic, making adebug_unreachable!()reachable.Servo PR: servo/servo#45682