mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fix: Implement additional logic in DOMString::set_best_representation_of_the_floating_point_number in order to correct some failing tests related to -0 values. (#32272)
This commit is contained in:
parent
3d4fd0e550
commit
8eeb888010
6 changed files with 67 additions and 74 deletions
|
@ -2189,7 +2189,13 @@ impl HTMLInputElement {
|
|||
datetime.format("%Y-%m-%dT%H:%M:%S%.3f").to_string(),
|
||||
))
|
||||
},
|
||||
InputType::Number | InputType::Range => Ok(DOMString::from(value.to_string())),
|
||||
InputType::Number | InputType::Range => {
|
||||
let mut value = DOMString::from(value.to_string());
|
||||
|
||||
value.set_best_representation_of_the_floating_point_number();
|
||||
|
||||
Ok(value)
|
||||
},
|
||||
// this won't be called from other input types
|
||||
_ => unreachable!(),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue