aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/htmlscriptelement.rs4
-rw-r--r--components/script/dom/htmlselectelement.rs4
-rw-r--r--components/script/dom/htmltablecellelement.rs12
-rw-r--r--components/script/dom/htmltableelement.rs14
-rw-r--r--components/script/dom/htmltablerowelement.rs4
-rw-r--r--components/script/dom/htmltablesectionelement.rs4
-rw-r--r--components/script/dom/htmltextareaelement.rs14
-rw-r--r--components/script/dom/node.rs4
-rw-r--r--components/script/dom/range.rs2
9 files changed, 31 insertions, 31 deletions
diff --git a/components/script/dom/htmlscriptelement.rs b/components/script/dom/htmlscriptelement.rs
index 97fefdf30e2..118c0648e77 100644
--- a/components/script/dom/htmlscriptelement.rs
+++ b/components/script/dom/htmlscriptelement.rs
@@ -562,8 +562,8 @@ impl VirtualMethods for HTMLScriptElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!("src") => {
+ match *attr.local_name() {
+ atom!("src") => {
if let AttributeMutation::Set(_) = mutation {
if !self.parser_inserted.get() && self.upcast::<Node>().is_in_doc() {
self.prepare();
diff --git a/components/script/dom/htmlselectelement.rs b/components/script/dom/htmlselectelement.rs
index 04a3d174108..d20a6451543 100644
--- a/components/script/dom/htmlselectelement.rs
+++ b/components/script/dom/htmlselectelement.rs
@@ -205,8 +205,8 @@ impl VirtualMethods for HTMLSelectElement {
}
fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue {
- match local_name {
- &atom!("size") => AttrValue::from_u32(value, DEFAULT_SELECT_SIZE),
+ match *local_name {
+ atom!("size") => AttrValue::from_u32(value, DEFAULT_SELECT_SIZE),
_ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
}
}
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs
index 3f1b13633f2..ac96982a45d 100644
--- a/components/script/dom/htmltablecellelement.rs
+++ b/components/script/dom/htmltablecellelement.rs
@@ -107,18 +107,18 @@ impl VirtualMethods for HTMLTableCellElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(bgcolor) => {
+ match *attr.local_name() {
+ atom!(bgcolor) => {
self.background_color.set(mutation.new_value(attr).and_then(|value| {
str::parse_legacy_color(&value).ok()
}));
},
- &atom!(colspan) => {
+ atom!(colspan) => {
self.colspan.set(mutation.new_value(attr).map(|value| {
max(DEFAULT_COLSPAN, value.as_uint())
}));
},
- &atom!(width) => {
+ atom!(width) => {
let width = mutation.new_value(attr).map(|value| {
str::parse_length(&value)
});
@@ -129,8 +129,8 @@ impl VirtualMethods for HTMLTableCellElement {
}
fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue {
- match local_name {
- &atom!("colspan") => AttrValue::from_u32(value, DEFAULT_COLSPAN),
+ match *local_name {
+ atom!("colspan") => AttrValue::from_u32(value, DEFAULT_COLSPAN),
_ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
}
}
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs
index ddd87314587..1f20bc54ef8 100644
--- a/components/script/dom/htmltableelement.rs
+++ b/components/script/dom/htmltableelement.rs
@@ -141,24 +141,24 @@ impl VirtualMethods for HTMLTableElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(bgcolor) => {
+ match *attr.local_name() {
+ atom!(bgcolor) => {
self.background_color.set(mutation.new_value(attr).and_then(|value| {
str::parse_legacy_color(&value).ok()
}));
},
- &atom!(border) => {
+ atom!(border) => {
// According to HTML5 § 14.3.9, invalid values map to 1px.
self.border.set(mutation.new_value(attr).map(|value| {
str::parse_unsigned_integer(value.chars()).unwrap_or(1)
}));
}
- &atom!(cellspacing) => {
+ atom!(cellspacing) => {
self.cellspacing.set(mutation.new_value(attr).and_then(|value| {
str::parse_unsigned_integer(value.chars())
}));
},
- &atom!(width) => {
+ atom!(width) => {
let width = mutation.new_value(attr).map(|value| {
str::parse_length(&value)
});
@@ -169,8 +169,8 @@ impl VirtualMethods for HTMLTableElement {
}
fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue {
- match local_name {
- &atom!("border") => AttrValue::from_u32(value, 1),
+ match *local_name {
+ atom!("border") => AttrValue::from_u32(value, 1),
_ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
}
}
diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs
index 8db70bd9d2a..e7bb8b1fd6d 100644
--- a/components/script/dom/htmltablerowelement.rs
+++ b/components/script/dom/htmltablerowelement.rs
@@ -102,8 +102,8 @@ impl VirtualMethods for HTMLTableRowElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(bgcolor) => {
+ match *attr.local_name() {
+ atom!(bgcolor) => {
self.background_color.set(mutation.new_value(attr).and_then(|value| {
str::parse_legacy_color(&value).ok()
}));
diff --git a/components/script/dom/htmltablesectionelement.rs b/components/script/dom/htmltablesectionelement.rs
index 5c6f04ef0ec..c4983552d3a 100644
--- a/components/script/dom/htmltablesectionelement.rs
+++ b/components/script/dom/htmltablesectionelement.rs
@@ -87,8 +87,8 @@ impl VirtualMethods for HTMLTableSectionElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(bgcolor) => {
+ match *attr.local_name() {
+ atom!(bgcolor) => {
self.background_color.set(mutation.new_value(attr).and_then(|value| {
str::parse_legacy_color(&value).ok()
}));
diff --git a/components/script/dom/htmltextareaelement.rs b/components/script/dom/htmltextareaelement.rs
index 2ef5a24775d..5bbde574e19 100644
--- a/components/script/dom/htmltextareaelement.rs
+++ b/components/script/dom/htmltextareaelement.rs
@@ -246,8 +246,8 @@ impl VirtualMethods for HTMLTextAreaElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
- match attr.local_name() {
- &atom!(disabled) => {
+ match *attr.local_name() {
+ atom!(disabled) => {
let el = self.upcast::<Element>();
match mutation {
AttributeMutation::Set(_) => {
@@ -261,13 +261,13 @@ impl VirtualMethods for HTMLTextAreaElement {
}
}
},
- &atom!(cols) => {
+ atom!(cols) => {
let cols = mutation.new_value(attr).map(|value| {
value.as_uint()
});
self.cols.set(cols.unwrap_or(DEFAULT_COLS));
},
- &atom!(rows) => {
+ atom!(rows) => {
let rows = mutation.new_value(attr).map(|value| {
value.as_uint()
});
@@ -286,9 +286,9 @@ impl VirtualMethods for HTMLTextAreaElement {
}
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
- match name {
- &atom!("cols") => AttrValue::from_limited_u32(value, DEFAULT_COLS),
- &atom!("rows") => AttrValue::from_limited_u32(value, DEFAULT_ROWS),
+ match *name {
+ atom!("cols") => AttrValue::from_limited_u32(value, DEFAULT_COLS),
+ atom!("rows") => AttrValue::from_limited_u32(value, DEFAULT_ROWS),
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
}
}
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 18c40157514..c5a891d56db 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -885,8 +885,8 @@ fn first_node_not_in<I>(mut nodes: I, not_in: &[NodeOrString]) -> Option<Root<No
{
nodes.find(|node| {
not_in.iter().all(|n| {
- match n {
- &NodeOrString::eNode(ref n) => n != node,
+ match *n {
+ NodeOrString::eNode(ref n) => n != node,
_ => true,
}
})
diff --git a/components/script/dom/range.rs b/components/script/dom/range.rs
index 2d89530ef1b..974255e8741 100644
--- a/components/script/dom/range.rs
+++ b/components/script/dom/range.rs
@@ -809,7 +809,7 @@ fn bp_position(a_node: &Node, a_offset: u32,
} else if position & NodeConstants::DOCUMENT_POSITION_CONTAINS != 0 {
// Step 3-1, 3-2.
let mut b_ancestors = b_node.inclusive_ancestors();
- let ref child = b_ancestors.find(|child| {
+ let child = b_ancestors.find(|child| {
child.r().GetParentNode().unwrap().r() == a_node
}).unwrap();
// Step 3-3.