mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Fix servo build.
This also fixes a bunch of calc handling issues and such. Also remove tests that no longer compile and are covered by WPT.
This commit is contained in:
parent
ca503b4908
commit
4a31509215
17 changed files with 199 additions and 436 deletions
|
@ -718,7 +718,9 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
specified::NoCalcLength::ServoCharacterWidth(specified::CharacterWidth(size));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Width(specified::LengthOrPercentageOrAuto::Length(value)),
|
||||
PropertyDeclaration::Width(specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Length(value)
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -743,8 +745,10 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
match width {
|
||||
LengthOrPercentageOrAuto::Auto => {},
|
||||
LengthOrPercentageOrAuto::Percentage(percentage) => {
|
||||
let width_value = specified::LengthOrPercentageOrAuto::Percentage(
|
||||
computed::Percentage(percentage),
|
||||
let width_value = specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Percentage(
|
||||
computed::Percentage(percentage),
|
||||
),
|
||||
);
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
|
@ -753,9 +757,13 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
},
|
||||
LengthOrPercentageOrAuto::Length(length) => {
|
||||
let width_value =
|
||||
specified::LengthOrPercentageOrAuto::Length(specified::NoCalcLength::Absolute(
|
||||
specified::AbsoluteLength::Px(length.to_f32_px()),
|
||||
));
|
||||
specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Length(
|
||||
specified::NoCalcLength::Absolute(
|
||||
specified::AbsoluteLength::Px(length.to_f32_px()),
|
||||
),
|
||||
),
|
||||
);
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Width(width_value),
|
||||
|
@ -776,8 +784,10 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
match height {
|
||||
LengthOrPercentageOrAuto::Auto => {},
|
||||
LengthOrPercentageOrAuto::Percentage(percentage) => {
|
||||
let height_value = specified::LengthOrPercentageOrAuto::Percentage(
|
||||
computed::Percentage(percentage),
|
||||
let height_value = specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Percentage(
|
||||
computed::Percentage(percentage),
|
||||
)
|
||||
);
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
|
@ -786,9 +796,13 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
},
|
||||
LengthOrPercentageOrAuto::Length(length) => {
|
||||
let height_value =
|
||||
specified::LengthOrPercentageOrAuto::Length(specified::NoCalcLength::Absolute(
|
||||
specified::AbsoluteLength::Px(length.to_f32_px()),
|
||||
));
|
||||
specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Length(
|
||||
specified::NoCalcLength::Absolute(
|
||||
specified::AbsoluteLength::Px(length.to_f32_px()),
|
||||
)
|
||||
)
|
||||
);
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Height(height_value),
|
||||
|
@ -815,7 +829,9 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
specified::NoCalcLength::ServoCharacterWidth(specified::CharacterWidth(cols));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Width(specified::LengthOrPercentageOrAuto::Length(value)),
|
||||
PropertyDeclaration::Width(specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Length(value)
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -837,7 +853,9 @@ impl LayoutElementHelpers for LayoutDom<Element> {
|
|||
));
|
||||
hints.push(from_declaration(
|
||||
shared_lock,
|
||||
PropertyDeclaration::Height(specified::LengthOrPercentageOrAuto::Length(value)),
|
||||
PropertyDeclaration::Height(specified::LengthOrPercentageOrAuto::LengthOrPercentage(
|
||||
specified::LengthOrPercentage::Length(value)
|
||||
)),
|
||||
));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue