diff options
author | Jack Moffitt <jack@metajack.im> | 2014-08-28 09:34:23 -0600 |
---|---|---|
committer | Jack Moffitt <jack@metajack.im> | 2014-09-08 20:21:42 -0600 |
commit | c6ab60dbfc6da7b4f800c9e40893c8b58413960c (patch) | |
tree | d1d74076cf7fa20e4f77ec7cb82cae98b67362cb /src/components/style/node.rs | |
parent | db2f642c32fc5bed445bb6f2e45b0f6f0b4342cf (diff) | |
download | servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.tar.gz servo-c6ab60dbfc6da7b4f800c9e40893c8b58413960c.zip |
Cargoify servo
Diffstat (limited to 'src/components/style/node.rs')
-rw-r--r-- | src/components/style/node.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/components/style/node.rs b/src/components/style/node.rs deleted file mode 100644 index 85a4429e767..00000000000 --- a/src/components/style/node.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * 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/. */ - -//! Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and -//! style. - -use selectors::AttrSelector; -use servo_util::atom::Atom; -use servo_util::namespace::Namespace; - - -pub trait TNode<E:TElement> : Clone { - fn parent_node(&self) -> Option<Self>; - fn prev_sibling(&self) -> Option<Self>; - fn next_sibling(&self) -> Option<Self>; - fn is_document(&self) -> bool; - fn is_element(&self) -> bool; - fn as_element(&self) -> E; - fn match_attr(&self, attr: &AttrSelector, test: |&str| -> bool) -> bool; - fn is_html_element_in_html_document(&self) -> bool; -} - -pub trait TElement { - 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; - fn get_hover_state(&self) -> bool; - fn get_id(&self) -> Option<Atom>; - fn get_disabled_state(&self) -> bool; - fn get_enabled_state(&self) -> bool; -} - |