mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix extremely small pixel value for transform on Servo.
Sometimes, we want to use extremely small pixel value in transform, e.g. translate(calc(0.001px)), which should be rendered correctly together with scale(100000). This patch only fixes this case for Servo because Stylo still uses Au on the Gecko side, even if we pass pixel value into FFI directly in the previous patch.
This commit is contained in:
parent
b89286e8e7
commit
ce9f1ed143
3 changed files with 20 additions and 12 deletions
|
@ -95,8 +95,8 @@ impl TransformList {
|
|||
ComputedOperation::Translate(tx, ty, tz) => {
|
||||
let (tx, ty) = match reference_box {
|
||||
Some(relative_border_box) => {
|
||||
(tx.to_used_value(relative_border_box.size.width).to_f32_px(),
|
||||
ty.to_used_value(relative_border_box.size.height).to_f32_px())
|
||||
(tx.to_pixel_length(relative_border_box.size.width).px(),
|
||||
ty.to_pixel_length(relative_border_box.size.height).px())
|
||||
},
|
||||
None => {
|
||||
// If we don't have reference box, we cannot resolve the used value,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue