mirror of
https://github.com/servo/servo.git
synced 2025-08-14 18:05:36 +01:00
Introduce CalcLengthOrPercentage::unclamped_length
This is necessary for some operations, notably converting this to something suitable for gecko.
This commit is contained in:
parent
bcf1a6c5e5
commit
307dd74ecf
9 changed files with 32 additions and 20 deletions
|
@ -24,7 +24,7 @@ impl From<CalcLengthOrPercentage> for nsStyleCoord_CalcValue {
|
|||
fn from(other: CalcLengthOrPercentage) -> nsStyleCoord_CalcValue {
|
||||
let has_percentage = other.percentage.is_some();
|
||||
nsStyleCoord_CalcValue {
|
||||
mLength: other.length().0,
|
||||
mLength: other.unclamped_length().0,
|
||||
mPercent: other.percentage.unwrap_or(0.0),
|
||||
mHasPercent: has_percentage,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue