aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2019-01-07 16:43:10 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-01-08 12:00:42 +0100
commit4a31509215c70c8810019880b83025182a80b6e0 (patch)
treed8ebea49ee3ca7519739f3af63417c852aefcc4c /components/script/dom/element.rs
parentca503b4908cb45c20cc6777f9d01253057a86a97 (diff)
downloadservo-4a31509215c70c8810019880b83025182a80b6e0.tar.gz
servo-4a31509215c70c8810019880b83025182a80b6e0.zip
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.
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs44
1 files changed, 31 insertions, 13 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 233d4a01bb3..6feb6381b77 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -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)
+ )),
));
}