Skip to content

Commit

Permalink
Use NodeFilterConstants from NodeFilterBinding
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisParis committed Apr 13, 2015
1 parent b9b4389 commit 61f4fce
Showing 1 changed file with 1 addition and 25 deletions.
26 changes: 1 addition & 25 deletions components/script/dom/treewalker.rs
Expand Up @@ -7,10 +7,7 @@ use dom::bindings::codegen::Bindings::TreeWalkerBinding;
use dom::bindings::codegen::Bindings::TreeWalkerBinding::TreeWalkerMethods;
use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods;
use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilter;
// FIXME: Uncomment when codegen fix allows NodeFilterConstants
// to move to the NodeFilter binding file (#3149).
// For now, it is defined in this file.
// use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants;
use dom::bindings::codegen::Bindings::NodeFilterBinding::NodeFilterConstants;
use dom::bindings::error::Fallible;
use dom::bindings::global::GlobalRef;
use dom::bindings::js::{JS, JSRef, OptionalRootable, Temporary, MutHeap};
Expand Down Expand Up @@ -563,24 +560,3 @@ pub enum Filter {
Native(fn (node: JSRef<Node>) -> u16),
JS(NodeFilter)
}

// FIXME: NodeFilterConstants will be defined in NodeFilterBindings.rs
// when codegen supports a callback interface with constants (#3149).
pub mod NodeFilterConstants {
pub const FILTER_ACCEPT: u16 = 1;
pub const FILTER_REJECT: u16 = 2;
pub const FILTER_SKIP: u16 = 3;
pub const SHOW_ALL: u32 = 4294967295;
pub const SHOW_ELEMENT: u32 = 1;
pub const SHOW_ATTRIBUTE: u32 = 2;
pub const SHOW_TEXT: u32 = 4;
pub const SHOW_CDATA_SECTION: u32 = 8;
pub const SHOW_ENTITY_REFERENCE: u32 = 16;
pub const SHOW_ENTITY: u32 = 32;
pub const SHOW_PROCESSING_INSTRUCTION: u32 = 64;
pub const SHOW_COMMENT: u32 = 128;
pub const SHOW_DOCUMENT: u32 = 256;
pub const SHOW_DOCUMENT_TYPE: u32 = 512;
pub const SHOW_DOCUMENT_FRAGMENT: u32 = 1024;
pub const SHOW_NOTATION: u32 = 2048;
} // mod NodeFilterConstants

0 comments on commit 61f4fce

Please sign in to comment.