From dc008977f96de90170a72be226af3e3eb54def13 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Wed, 14 Jan 2015 14:01:52 -0400 Subject: Share supported CSS properties between style and CSSStyleDeclaration Avoids duplicated code when implementing the CSS properties accessors in CSSStyleDeclaration WebIDL. Servo internal CSS properties are not accessible. CSS property "float" is unnacessible because we currently lack support for BinaryName IDL annotation (#4435). Fixes #4429, #4430. --- components/script/dom/cssstyledeclaration.rs | 90 +--------------------------- 1 file changed, 1 insertion(+), 89 deletions(-) (limited to 'components/script/dom/cssstyledeclaration.rs') diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 7ddf5260283..b95df387901 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -342,93 +342,5 @@ impl<'a> CSSStyleDeclarationMethods for JSRef<'a, CSSStyleDeclaration> { rval } - css_properties!( - [Color, SetColor, "color"], - [Background, SetBackground, "background"], - [BackgroundColor, SetBackgroundColor, "background-color"], - [BackgroundPosition, SetBackgroundPosition, "background-position"], - [BackgroundImage, SetBackgroundImage, "background-image"], - [BackgroundRepeat, SetBackgroundRepeat, "background-repeat"], - [BackgroundAttachment, SetBackgroundAttachment, "background-attachment"], - [Border, SetBorder, "border"], - [BorderColor, SetBorderColor, "border-color"], - [BorderRadius, SetBorderRadius, "border-radius"], - [BorderStyle, SetBorderStyle, "border-style"], - [BorderWidth, SetBorderWidth, "border-width"], - [BorderBottom, SetBorderBottom, "border-bottom"], - [BorderBottomColor, SetBorderBottomColor, "border-bottom-color"], - [BorderBottomStyle, SetBorderBottomStyle, "border-bottom-style"], - [BorderBottomWidth, SetBorderBottomWidth, "border-bottom-width"], - [BorderLeft, SetBorderLeft, "border-left"], - [BorderLeftColor, SetBorderLeftColor, "border-left-color"], - [BorderLeftStyle, SetBorderLeftStyle, "border-left-style"], - [BorderLeftWidth, SetBorderLeftWidth, "border-left-width"], - [BorderRight, SetBorderRight, "border-right"], - [BorderRightColor, SetBorderRightColor, "border-right-color"], - [BorderRightStyle, SetBorderRightStyle, "border-right-style"], - [BorderRightWidth, SetBorderRightWidth, "border-right-width"], - [BorderTop, SetBorderTop, "border-top"], - [BorderTopColor, SetBorderTopColor, "border-top-color"], - [BorderTopStyle, SetBorderTopStyle, "border-top-style"], - [BorderTopWidth, SetBorderTopWidth, "border-top-width"], - [Content, SetContent, "content"], - [Display, SetDisplay, "display"], - [Opacity, SetOpacity, "opacity"], - [Width, SetWidth, "width"], - [MinWidth, SetMinWidth, "min-width"], - [MaxWidth, SetMaxWidth, "max-width"], - [Height, SetHeight, "height"], - [MinHeight, SetMinHeight, "min-height"], - [MaxHeight, SetMaxHeight, "max-height"], - [Clear, SetClear, "clear"], - [Direction, SetDirection, "direction"], - [LineHeight, SetLineHeight, "line-height"], - [VerticalAlign, SetVerticalAlign, "vertical-align"], - [ListStyle, SetListStyle, "list-style"], - [ListStylePosition, SetListStylePosition, "list-style-position"], - [ListStyleType, SetListStyleType, "list-style-type"], - [ListStyleImage, SetListStyleImage, "list-style-image"], - [Visibility, SetVisibility, "visibility"], - [Cursor, SetCursor, "cursor"], - [BoxShadow, SetBoxShadow, "box-shadow"], - [BoxSizing, SetBoxSizing, "box-sizing"], - [Overflow, SetOverflow, "overflow"], - [OverflowWrap, SetOverflowWrap, "overflow-wrap"], - [TableLayout, SetTableLayout, "table-layout"], - [EmptyCells, SetEmptyCells, "empty-cells"], - [CaptionSide, SetCaptionSide, "caption-side"], - [WhiteSpace, SetWhiteSpace, "white-space"], - [WritingMode, SetWritingMode, "writing-mode"], - [LetterSpacing, SetLetterSpacing, "letter-spacing"], - [WordSpacing, SetWordSpacing, "word-spacing"], - [WordWrap, SetWordWrap, "word-wrap"], - [TextAlign, SetTextAlign, "text-align"], - [TextDecoration, SetTextDecoration, "text-decoration"], - [TextIndent, SetTextIndent, "text-indent"], - [TextOrientation, SetTextOrientation, "text-orientation"], - [TextTransform, SetTextTransform, "text-transform"], - [Font, SetFont, "font"], - [FontFamily, SetFontFamily, "font-family"], - [FontSize, SetFontSize, "font-size"], - [FontStyle, SetFontStyle, "font-style"], - [FontVariant, SetFontVariant, "font-variant"], - [FontWeight, SetFontWeight, "font-weight"], - [Margin, SetMargin, "margin"], - [MarginBottom, SetMarginBottom, "margin-bottom"], - [MarginLeft, SetMarginLeft, "margin-left"], - [MarginRight, SetMarginRight, "margin-right"], - [MarginTop, SetMarginTop, "margin-top"], - [Padding, SetPadding, "padding"], - [PaddingBottom, SetPaddingBottom, "padding-bottom"], - [PaddingLeft, SetPaddingLeft, "padding-left"], - [PaddingRight, SetPaddingRight, "padding-right"], - [PaddingTop, SetPaddingTop, "padding-top"], - [Outline, SetOutline, "outline"], - [Position, SetPosition, "position"], - [Bottom, SetBottom, "bottom"], - [Left, SetLeft, "left"], - [Right, SetRight, "right"], - [Top, SetTop, "top"], - [ZIndex, SetZIndex, "z-index"] - ) + css_properties_accessors!(css_properties) } -- cgit v1.2.3