Move specified and computed percentages to submodules

This commit is contained in:
Anthony Ramine 2017-08-14 02:37:32 +02:00
parent fb8400d745
commit 796a2b9632
7 changed files with 212 additions and 174 deletions

View file

@ -785,7 +785,7 @@ impl From<NoCalcLength> for LengthOrPercentage {
impl From<Percentage> for LengthOrPercentage {
#[inline]
fn from(pc: Percentage) -> Self {
if pc.calc_clamping_mode.is_some() {
if pc.is_calc() {
LengthOrPercentage::Calc(Box::new(CalcLengthOrPercentage {
percentage: Some(computed::Percentage(pc.get())),
.. Default::default()