style: Percentage values of translate are serialized as percent for computed values.

Basically, we rewrite the type of generics::transform::Translate and its
ToCss to match the spec. Besides, we always serialize Translate by servo,
so we could drop a lot of duplicated code.

Differential Revision: https://phabricator.services.mozilla.com/D11206
This commit is contained in:
Boris Chiou 2018-11-08 22:41:00 +00:00 committed by Emilio Cobos Álvarez
parent d9453bc0ea
commit c6ead1dc0e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
7 changed files with 127 additions and 34 deletions

View file

@ -395,7 +395,7 @@ impl Parse for Translate {
}
// 'translate: <length-percentage> '
Ok(generic::Translate::TranslateX(tx))
Ok(generic::Translate::Translate(tx, specified::LengthOrPercentage::zero()))
}
}