diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-07-01 18:27:40 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-07-01 18:27:40 -0600 |
commit | bbb39082e0f640400546d2084a450a8675820a82 (patch) | |
tree | f531bb4d70d8eb6a1080d9711c29587c883bf0ce /components/script/dom/htmlcollection.rs | |
parent | fc1e427ff9bb0e9891053ec1eba292530ebbe91a (diff) | |
parent | 4cf46bff2d00f33a8866dc6880c8f6178fdf81a4 (diff) | |
download | servo-bbb39082e0f640400546d2084a450a8675820a82.tar.gz servo-bbb39082e0f640400546d2084a450a8675820a82.zip |
Auto merge of #6529 - dwins:master, r=Manishearth
Refactor #[jstraceable] to #[derive(JSTraceable)]
fixes #6524. I had to make an additional change not mentioned in the ticket - adding the `#[feature]` to enable deriving custom traits but I assume that's expected at this time.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6529)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index b1efb20c264..b47ba2578c5 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -22,7 +22,7 @@ pub trait CollectionFilter : JSTraceable { fn filter<'a>(&self, elem: &'a Element, root: &'a Node) -> bool; } -#[jstraceable] +#[derive(JSTraceable)] #[must_root] pub enum CollectionTypeId { Static(Vec<JS<Element>>), @@ -57,7 +57,7 @@ impl HTMLCollection { fn all_elements(window: &Window, root: &Node, namespace_filter: Option<Namespace>) -> Root<HTMLCollection> { - #[jstraceable] + #[derive(JSTraceable)] struct AllElementFilter { namespace_filter: Option<Namespace> } @@ -79,7 +79,7 @@ impl HTMLCollection { return HTMLCollection::all_elements(window, root, None); } - #[jstraceable] + #[derive(JSTraceable)] struct TagNameFilter { tag: Atom, ascii_lower_tag: Atom, @@ -110,7 +110,7 @@ impl HTMLCollection { if tag == "*" { return HTMLCollection::all_elements(window, root, namespace_filter); } - #[jstraceable] + #[derive(JSTraceable)] struct TagNameNSFilter { tag: Atom, namespace_filter: Option<Namespace> @@ -135,7 +135,7 @@ impl HTMLCollection { pub fn by_class_name(window: &Window, root: &Node, classes: DOMString) -> Root<HTMLCollection> { - #[jstraceable] + #[derive(JSTraceable)] struct ClassNameFilter { classes: Vec<Atom> } @@ -153,7 +153,7 @@ impl HTMLCollection { } pub fn children(window: &Window, root: &Node) -> Root<HTMLCollection> { - #[jstraceable] + #[derive(JSTraceable)] struct ElementChildFilter; impl CollectionFilter for ElementChildFilter { fn filter(&self, elem: &Element, root: &Node) -> bool { |