aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/node.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-09-18 09:20:19 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-09-18 09:20:19 -0400
commit9607b468bc50496c0de3706d22efaa6fdc68b089 (patch)
tree85615a722eb65681ebccee8d98dc47c7895573c9 /components/style/node.rs
parent7158cac2dcaabacede36924f52167b8e7b402e7a (diff)
downloadservo-9607b468bc50496c0de3706d22efaa6fdc68b089.tar.gz
servo-9607b468bc50496c0de3706d22efaa6fdc68b089.zip
Revert "script: Use atom comparison in more places, especially for attributes." for persistent test failures.
This reverts commit 874db261046d6155b1942efa106d2e0014295d6d.
Diffstat (limited to 'components/style/node.rs')
-rw-r--r--components/style/node.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/components/style/node.rs b/components/style/node.rs
index a4d2ff38e41..bd71aa6fd79 100644
--- a/components/style/node.rs
+++ b/components/style/node.rs
@@ -9,7 +9,7 @@ use selectors::AttrSelector;
use servo_util::atom::Atom;
use servo_util::namespace::Namespace;
-// FIXME(pcwalton): When we get associated types in Rust, this can be nicer.
+
pub trait TNode<E:TElement> : Clone {
fn parent_node(&self) -> Option<Self>;
/// Name is prefixed to avoid a conflict with TLayoutNode.
@@ -24,7 +24,7 @@ pub trait TNode<E:TElement> : Clone {
}
pub trait TElement {
- fn get_attr(&self, namespace: &Namespace, attr: &Atom) -> Option<&'static str>;
+ fn get_attr(&self, namespace: &Namespace, attr: &str) -> Option<&'static str>;
fn get_link(&self) -> Option<&'static str>;
fn get_local_name<'a>(&'a self) -> &'a Atom;
fn get_namespace<'a>(&'a self) -> &'a Namespace;
@@ -32,13 +32,5 @@ pub trait TElement {
fn get_id(&self) -> Option<Atom>;
fn get_disabled_state(&self) -> bool;
fn get_enabled_state(&self) -> bool;
- fn has_class(&self, name: &Atom) -> bool;
-
- // Ordinarily I wouldn't use callbacks like this, but the alternative is
- // really messy, since there is a `JSRef` and a `RefCell` involved. Maybe
- // in the future when we have associated types and/or a more convenient
- // JS GC story... --pcwalton
- fn each_class(&self, callback: |&Atom|);
+ fn has_class(&self, name: &str) -> bool;
}
-
-