diff options
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/element.rs | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 83574e7b6fa..f9d3920cfd3 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -62,7 +62,7 @@ use dom::virtualmethods::{VirtualMethods, vtable_for}; use devtools_traits::AttrInfo; use smallvec::VecLike; use style::legacy::{UnsignedIntegerAttribute, from_declaration}; -use style::properties::DeclaredValue::SpecifiedValue; +use style::properties::DeclaredValue; use style::properties::longhands::{self, background_image, border_spacing}; use style::properties::{PropertyDeclarationBlock, PropertyDeclaration, parse_style_attribute}; use style::values::CSSFloat; @@ -271,7 +271,7 @@ impl RawLayoutElementHelpers for Element { if let Some(color) = bgcolor { hints.push(from_declaration( - PropertyDeclaration::BackgroundColor(SpecifiedValue( + PropertyDeclaration::BackgroundColor(DeclaredValue::Value( CSSColor { parsed: Color::RGBA(color), authored: None })))); } @@ -284,7 +284,7 @@ impl RawLayoutElementHelpers for Element { if let Some(url) = background { hints.push(from_declaration( - PropertyDeclaration::BackgroundImage(SpecifiedValue( + PropertyDeclaration::BackgroundImage(DeclaredValue::Value( background_image::SpecifiedValue(Some(specified::Image::Url(url))))))); } @@ -297,7 +297,7 @@ impl RawLayoutElementHelpers for Element { if let Some(color) = color { hints.push(from_declaration( - PropertyDeclaration::Color(SpecifiedValue(CSSRGBA { + PropertyDeclaration::Color(DeclaredValue::Value(CSSRGBA { parsed: color, authored: None, })))); @@ -313,7 +313,7 @@ impl RawLayoutElementHelpers for Element { if let Some(cellspacing) = cellspacing { let width_value = specified::Length::Absolute(Au::from_px(cellspacing as i32)); hints.push(from_declaration( - PropertyDeclaration::BorderSpacing(SpecifiedValue( + PropertyDeclaration::BorderSpacing(DeclaredValue::Value( border_spacing::SpecifiedValue { horizontal: width_value, vertical: width_value, @@ -343,7 +343,7 @@ impl RawLayoutElementHelpers for Element { let value = specified::Length::ServoCharacterWidth( specified::CharacterWidth(size)); hints.push(from_declaration( - PropertyDeclaration::Width(SpecifiedValue( + PropertyDeclaration::Width(DeclaredValue::Value( specified::LengthOrPercentageOrAuto::Length(value))))); } @@ -367,13 +367,13 @@ impl RawLayoutElementHelpers for Element { let width_value = specified::LengthOrPercentageOrAuto::Percentage(specified::Percentage(percentage)); hints.push(from_declaration( - PropertyDeclaration::Width(SpecifiedValue(width_value)))); + PropertyDeclaration::Width(DeclaredValue::Value(width_value)))); } LengthOrPercentageOrAuto::Length(length) => { let width_value = specified::LengthOrPercentageOrAuto::Length( specified::Length::Absolute(length)); hints.push(from_declaration( - PropertyDeclaration::Width(SpecifiedValue(width_value)))); + PropertyDeclaration::Width(DeclaredValue::Value(width_value)))); } } @@ -391,13 +391,13 @@ impl RawLayoutElementHelpers for Element { let height_value = specified::LengthOrPercentageOrAuto::Percentage(specified::Percentage(percentage)); hints.push(from_declaration( - PropertyDeclaration::Height(SpecifiedValue(height_value)))); + PropertyDeclaration::Height(DeclaredValue::Value(height_value)))); } LengthOrPercentageOrAuto::Length(length) => { let height_value = specified::LengthOrPercentageOrAuto::Length( specified::Length::Absolute(length)); hints.push(from_declaration( - PropertyDeclaration::Height(SpecifiedValue(height_value)))); + PropertyDeclaration::Height(DeclaredValue::Value(height_value)))); } } @@ -420,7 +420,7 @@ impl RawLayoutElementHelpers for Element { // https://html.spec.whatwg.org/multipage/#textarea-effective-width let value = specified::Length::ServoCharacterWidth(specified::CharacterWidth(cols)); hints.push(from_declaration( - PropertyDeclaration::Width(SpecifiedValue( + PropertyDeclaration::Width(DeclaredValue::Value( specified::LengthOrPercentageOrAuto::Length(value))))); } @@ -441,7 +441,7 @@ impl RawLayoutElementHelpers for Element { // https://html.spec.whatwg.org/multipage/#textarea-effective-height let value = specified::Length::FontRelative(specified::FontRelativeLength::Em(rows as CSSFloat)); hints.push(from_declaration( - PropertyDeclaration::Height(SpecifiedValue( + PropertyDeclaration::Height(DeclaredValue::Value( specified::LengthOrPercentageOrAuto::Length(value))))); } @@ -456,16 +456,16 @@ impl RawLayoutElementHelpers for Element { if let Some(border) = border { let width_value = specified::Length::Absolute(Au::from_px(border as i32)); hints.push(from_declaration( - PropertyDeclaration::BorderTopWidth(SpecifiedValue( + PropertyDeclaration::BorderTopWidth(DeclaredValue::Value( longhands::border_top_width::SpecifiedValue(width_value))))); hints.push(from_declaration( - PropertyDeclaration::BorderLeftWidth(SpecifiedValue( + PropertyDeclaration::BorderLeftWidth(DeclaredValue::Value( longhands::border_left_width::SpecifiedValue(width_value))))); hints.push(from_declaration( - PropertyDeclaration::BorderBottomWidth(SpecifiedValue( + PropertyDeclaration::BorderBottomWidth(DeclaredValue::Value( longhands::border_bottom_width::SpecifiedValue(width_value))))); hints.push(from_declaration( - PropertyDeclaration::BorderRightWidth(SpecifiedValue( + PropertyDeclaration::BorderRightWidth(DeclaredValue::Value( longhands::border_right_width::SpecifiedValue(width_value))))); } } |