mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use NodeFilterConstants from NodeFilterBinding
This commit is contained in:
parent
b9b4389628
commit
61f4fce655
1 changed files with 1 additions and 25 deletions
|
@ -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};
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue