aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/cssstyledeclaration.rs
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno.d@partner.samsung.com>2015-01-14 14:01:52 -0400
committerBruno de Oliveira Abinader <bruno.d@partner.samsung.com>2015-01-19 13:21:03 -0400
commitdc008977f96de90170a72be226af3e3eb54def13 (patch)
treee9cdbcee5b95a7057e45839985c2b4d88f1a3df5 /components/script/dom/cssstyledeclaration.rs
parentd747a33df9c167a3defbbdcfe356ee25eeb672ad (diff)
downloadservo-dc008977f96de90170a72be226af3e3eb54def13.tar.gz
servo-dc008977f96de90170a72be226af3e3eb54def13.zip
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.
Diffstat (limited to 'components/script/dom/cssstyledeclaration.rs')
-rw-r--r--components/script/dom/cssstyledeclaration.rs90
1 files changed, 1 insertions, 89 deletions
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)
}