End the libstyle 'pub use' madness.

This commit is contained in:
Simon Sapin 2015-01-28 21:46:51 +01:00
parent 493a9e6a89
commit d13d36f57f
39 changed files with 159 additions and 169 deletions

View file

@ -111,17 +111,6 @@ pub enum NamespaceConstraint {
}
/// Re-exported to script, but opaque.
pub struct SelectorList {
selectors: Vec<Selector>
}
/// Public to the style crate, but not re-exported to script
pub fn get_selector_list_selectors<'a>(selector_list: &'a SelectorList) -> &'a [Selector] {
selector_list.selectors.as_slice()
}
fn compute_specificity(mut selector: &CompoundSelector,
pseudo_element: &Option<PseudoElement>) -> u32 {
struct Specificity {
@ -193,12 +182,10 @@ fn compute_specificity(mut selector: &CompoundSelector,
pub fn parse_author_origin_selector_list_from_str(input: &str)
-> Result<SelectorList,()> {
pub fn parse_author_origin_selector_list_from_str(input: &str) -> Result<Vec<Selector>, ()> {
let url = Url::parse("about:blank").unwrap();
let context = ParserContext::new(Origin::Author, &url);
parse_selector_list(&context, &mut Parser::new(input))
.map(|s| SelectorList { selectors: s })
}
/// Parse a comma-separated list of Selectors.