aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/codegen/CodegenRust.py7
-rw-r--r--components/script/dom/cssstyledeclaration.rs90
-rw-r--r--components/script/dom/element.rs4
-rw-r--r--components/script/dom/webidls/CSSStyleDeclaration.webidl18
4 files changed, 26 insertions, 93 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py
index 1cc9c2dc9e8..3d28cf2bdc9 100644
--- a/components/script/dom/bindings/codegen/CodegenRust.py
+++ b/components/script/dom/bindings/codegen/CodegenRust.py
@@ -4584,11 +4584,12 @@ class CGBindingRoot(CGThing):
'page::JSPageInfo',
'libc',
'servo_util::str::DOMString',
- 'std::mem',
'std::cmp',
+ 'std::iter::repeat',
+ 'std::mem',
+ 'std::num',
'std::ptr',
'std::str',
- 'std::num',
])
# Add the auto-generated comment.
@@ -4885,7 +4886,7 @@ class CallbackMember(CGNativeMember):
if self.argCount > 0:
replacements["argCount"] = self.argCountStr
replacements["argvDecl"] = string.Template(
- "let mut argv = Vec::from_elem(${argCount}, UndefinedValue());\n"
+ "let mut argv = repeat(UndefinedValue()).take(${argCount}).collect::<Vec<_>>();\n"
).substitute(replacements)
else:
# Avoid weird 0-sized arrays
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)
}
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 14f48f5f3b6..0735e19299f 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -111,7 +111,9 @@ impl Element {
create_element(name, prefix, document, creator)
}
- pub fn new_inherited(type_id: ElementTypeId, local_name: DOMString, namespace: Namespace, prefix: Option<DOMString>, document: JSRef<Document>) -> Element {
+ pub fn new_inherited(type_id: ElementTypeId, local_name: DOMString,
+ namespace: Namespace, prefix: Option<DOMString>,
+ document: JSRef<Document>) -> Element {
Element {
node: Node::new_inherited(NodeTypeId::Element(type_id), document),
local_name: Atom::from_slice(local_name.as_slice()),
diff --git a/components/script/dom/webidls/CSSStyleDeclaration.webidl b/components/script/dom/webidls/CSSStyleDeclaration.webidl
index 7f37e44cbbe..afe511b7e1f 100644
--- a/components/script/dom/webidls/CSSStyleDeclaration.webidl
+++ b/components/script/dom/webidls/CSSStyleDeclaration.webidl
@@ -46,6 +46,8 @@ partial interface CSSStyleDeclaration {
[TreatNullAs=EmptyString] attribute DOMString borderWidth;
[TreatNullAs=EmptyString] attribute DOMString borderBottom;
[TreatNullAs=EmptyString] attribute DOMString borderBottomColor;
+ [TreatNullAs=EmptyString] attribute DOMString borderBottomLeftRadius;
+ [TreatNullAs=EmptyString] attribute DOMString borderBottomRightRadius;
[TreatNullAs=EmptyString] attribute DOMString borderBottomStyle;
[TreatNullAs=EmptyString] attribute DOMString borderBottomWidth;
[TreatNullAs=EmptyString] attribute DOMString borderLeft;
@@ -58,6 +60,8 @@ partial interface CSSStyleDeclaration {
[TreatNullAs=EmptyString] attribute DOMString borderRightWidth;
[TreatNullAs=EmptyString] attribute DOMString borderTop;
[TreatNullAs=EmptyString] attribute DOMString borderTopColor;
+ [TreatNullAs=EmptyString] attribute DOMString borderTopLeftRadius;
+ [TreatNullAs=EmptyString] attribute DOMString borderTopRightRadius;
[TreatNullAs=EmptyString] attribute DOMString borderTopStyle;
[TreatNullAs=EmptyString] attribute DOMString borderTopWidth;
@@ -80,10 +84,16 @@ partial interface CSSStyleDeclaration {
[TreatNullAs=EmptyString] attribute DOMString clear;
+ [TreatNullAs=EmptyString] attribute DOMString clip;
+
[TreatNullAs=EmptyString] attribute DOMString direction;
+ [TreatNullAs=EmptyString] attribute DOMString filter;
+
[TreatNullAs=EmptyString] attribute DOMString lineHeight;
+ [TreatNullAs=EmptyString] attribute DOMString mixBlendMode;
+
[TreatNullAs=EmptyString] attribute DOMString verticalAlign;
[TreatNullAs=EmptyString] attribute DOMString listStyle;
@@ -103,6 +113,7 @@ partial interface CSSStyleDeclaration {
[TreatNullAs=EmptyString] attribute DOMString writingMode;
[TreatNullAs=EmptyString] attribute DOMString letterSpacing;
+ [TreatNullAs=EmptyString] attribute DOMString wordBreak;
[TreatNullAs=EmptyString] attribute DOMString wordSpacing;
[TreatNullAs=EmptyString] attribute DOMString wordWrap;
@@ -110,6 +121,7 @@ partial interface CSSStyleDeclaration {
[TreatNullAs=EmptyString] attribute DOMString textDecoration;
[TreatNullAs=EmptyString] attribute DOMString textIndent;
[TreatNullAs=EmptyString] attribute DOMString textOrientation;
+ [TreatNullAs=EmptyString] attribute DOMString textRendering;
[TreatNullAs=EmptyString] attribute DOMString textTransform;
[TreatNullAs=EmptyString] attribute DOMString font;
@@ -132,9 +144,15 @@ partial interface CSSStyleDeclaration {
[TreatNullAs=EmptyString] attribute DOMString paddingTop;
[TreatNullAs=EmptyString] attribute DOMString outline;
+ [TreatNullAs=EmptyString] attribute DOMString outlineColor;
+ [TreatNullAs=EmptyString] attribute DOMString outlineStyle;
+ [TreatNullAs=EmptyString] attribute DOMString outlineWidth;
+ [TreatNullAs=EmptyString] attribute DOMString outlineOffset;
[TreatNullAs=EmptyString] attribute DOMString position;
+ [TreatNullAs=EmptyString] attribute DOMString pointerEvents;
+
[TreatNullAs=EmptyString] attribute DOMString top;
[TreatNullAs=EmptyString] attribute DOMString right;
[TreatNullAs=EmptyString] attribute DOMString left;