diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-12-17 10:42:52 +0100 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-12-17 15:19:45 -0500 |
commit | 466faac2a507c833b282e274a28f6ae533c628f9 (patch) | |
tree | 0022a66d52deec0081b8b721b56e2f15d7225f8e /components/script/dom/treewalker.rs | |
parent | b8900782b0fcb409f37189bdc08eb7f8b3564a5f (diff) | |
download | servo-466faac2a507c833b282e274a28f6ae533c628f9.tar.gz servo-466faac2a507c833b282e274a28f6ae533c628f9.zip |
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
Diffstat (limited to 'components/script/dom/treewalker.rs')
-rw-r--r-- | components/script/dom/treewalker.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/components/script/dom/treewalker.rs b/components/script/dom/treewalker.rs index bac939062ee..d9037788c85 100644 --- a/components/script/dom/treewalker.rs +++ b/components/script/dom/treewalker.rs @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use dom::bindings::callback::RethrowExceptions; +use dom::bindings::callback::ExceptionHandling::RethrowExceptions; use dom::bindings::codegen::Bindings::TreeWalkerBinding; use dom::bindings::codegen::Bindings::TreeWalkerBinding::TreeWalkerMethods; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; @@ -58,8 +58,8 @@ impl TreeWalker { what_to_show: u32, node_filter: Option<NodeFilter>) -> Temporary<TreeWalker> { let filter = match node_filter { - None => FilterNone, - Some(jsfilter) => FilterJS(jsfilter) + None => Filter::None, + Some(jsfilter) => Filter::JS(jsfilter) }; TreeWalker::new_with_filter(document, root_node, what_to_show, filter) } @@ -76,9 +76,9 @@ impl<'a> TreeWalkerMethods for JSRef<'a, TreeWalker> { fn GetFilter(self) -> Option<NodeFilter> { match self.filter { - FilterNone => None, - FilterJS(nf) => Some(nf), - FilterNative(_) => panic!("Cannot convert native node filter to DOM NodeFilter") + Filter::None => None, + Filter::JS(nf) => Some(nf), + Filter::Native(_) => panic!("Cannot convert native node filter to DOM NodeFilter") } } @@ -331,9 +331,9 @@ impl<'a> PrivateTreeWalkerHelpers<'a> for JSRef<'a, TreeWalker> { // "5. If an exception was thrown, re-throw the exception." // "6. Return result." match self.filter { - FilterNone => Ok(NodeFilterConstants::FILTER_ACCEPT), - FilterNative(f) => Ok((f)(node)), - FilterJS(callback) => callback.AcceptNode_(self, node, RethrowExceptions) + Filter::None => Ok(NodeFilterConstants::FILTER_ACCEPT), + Filter::Native(f) => Ok((f)(node)), + Filter::JS(callback) => callback.AcceptNode_(self, node, RethrowExceptions) } } @@ -551,9 +551,9 @@ impl<'a> Iterator<JSRef<'a, Node>> for JSRef<'a, TreeWalker> { #[jstraceable] pub enum Filter { - FilterNone, - FilterNative(fn (node: JSRef<Node>) -> u16), - FilterJS(NodeFilter) + None, + Native(fn (node: JSRef<Node>) -> u16), + JS(NodeFilter) } // FIXME: NodeFilterConstants will be defined in NodeFilterBindings.rs |