diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-10-22 01:18:44 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-10-23 08:25:08 +0200 |
commit | 4f997bf3334f776e46cf78664c6e5a980dbfd72e (patch) | |
tree | 9ed412bf3e0cc72a6973c4d2495d36f6e158b1b3 /components/style/gecko | |
parent | 6ae8bdee61104b649e8a9237c4814fe8947580d6 (diff) | |
download | servo-4f997bf3334f776e46cf78664c6e5a980dbfd72e.tar.gz servo-4f997bf3334f776e46cf78664c6e5a980dbfd72e.zip |
style: Add methods to iterate a subtree in preorder.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Diffstat (limited to 'components/style/gecko')
-rw-r--r-- | components/style/gecko/wrapper.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index c8fc86a5063..9cdcdba9de4 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -104,6 +104,12 @@ use stylist::Stylist; #[derive(Clone, Copy)] pub struct GeckoNode<'ln>(pub &'ln RawGeckoNode); +impl<'ln> PartialEq for GeckoNode<'ln> { + fn eq(&self, other: &Self) -> bool { + self.0 as *const _ == other.0 as *const _ + } +} + impl<'ln> fmt::Debug for GeckoNode<'ln> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { if let Some(el) = self.as_element() { |