mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Move selector matching to an external library, for use outside Servo.
This commit is contained in:
parent
2e1adb3fa6
commit
2a50755c8a
26 changed files with 136 additions and 2896 deletions
|
@ -43,6 +43,9 @@ path = "../util"
|
|||
[dependencies.cssparser]
|
||||
git = "https://github.com/servo/rust-cssparser"
|
||||
|
||||
[dependencies.selectors]
|
||||
git = "https://github.com/servo/rust-selectors"
|
||||
|
||||
[dependencies.geom]
|
||||
git = "https://github.com/servo/rust-geom"
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ use util::{LayoutDataAccess, LayoutDataWrapper};
|
|||
use wrapper::{LayoutElement, LayoutNode, TLayoutNode};
|
||||
|
||||
use script::dom::node::NodeTypeId;
|
||||
use servo_util::bloom::BloomFilter;
|
||||
use selectors::bloom::BloomFilter;
|
||||
use servo_util::cache::{LRUCache, SimpleHashCache};
|
||||
use servo_util::smallvec::{SmallVec, SmallVec16};
|
||||
use servo_util::arc_ptr_eq;
|
||||
|
@ -21,12 +21,12 @@ use std::mem;
|
|||
use std::hash::{Hash, Hasher, Writer};
|
||||
use std::slice::Iter;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use style::selectors::PseudoElement;
|
||||
use selectors::parser::PseudoElement;
|
||||
use style::selector_matching::{Stylist, DeclarationBlock};
|
||||
use style::node::{TElement, TNode};
|
||||
use style::properties::{ComputedValues, cascade};
|
||||
use style::selector_matching::{CommonStyleAffectingAttributeMode, CommonStyleAffectingAttributes};
|
||||
use style::selector_matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
|
||||
use selectors::matching::{CommonStyleAffectingAttributeMode, CommonStyleAffectingAttributes};
|
||||
use selectors::matching::{common_style_affecting_attributes, rare_style_affecting_attributes};
|
||||
use std::sync::Arc;
|
||||
|
||||
pub struct ApplicableDeclarations {
|
||||
|
|
|
@ -41,6 +41,7 @@ extern crate style;
|
|||
extern crate "plugins" as servo_plugins;
|
||||
extern crate net;
|
||||
extern crate msg;
|
||||
extern crate selectors;
|
||||
#[macro_use]
|
||||
extern crate "util" as servo_util;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ use wrapper::{layout_node_to_unsafe_layout_node, LayoutNode};
|
|||
use wrapper::{PostorderNodeMutTraversal, ThreadSafeLayoutNode, UnsafeLayoutNode};
|
||||
use wrapper::{PreorderDomTraversal, PostorderDomTraversal};
|
||||
|
||||
use servo_util::bloom::BloomFilter;
|
||||
use selectors::bloom::BloomFilter;
|
||||
use servo_util::opts;
|
||||
use servo_util::tid::tid;
|
||||
use style::node::TNode;
|
||||
|
|
|
@ -68,7 +68,7 @@ use std::mem;
|
|||
use std::sync::mpsc::Sender;
|
||||
use string_cache::{Atom, Namespace};
|
||||
use style::computed_values::{content, display, white_space};
|
||||
use style::selectors::{NamespaceConstraint, AttrSelector};
|
||||
use selectors::parser::{NamespaceConstraint, AttrSelector};
|
||||
use style::legacy::{LengthAttribute, SimpleColorAttribute, UnsignedIntegerAttribute, IntegerAttribute};
|
||||
use style::node::{TElement, TElementAttributes, TNode};
|
||||
use style::properties::PropertyDeclarationBlock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue