mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Various fixes in stylesheets
This commit is contained in:
parent
b7c88dd547
commit
768cc79146
1 changed files with 4 additions and 4 deletions
|
@ -102,7 +102,7 @@ impl Stylesheet {
|
|||
Stylesheet::from_str(&string, base_url, origin)
|
||||
}
|
||||
|
||||
pub fn from_str<'i>(css: &'i str, base_url: Url, origin: Origin) -> Stylesheet {
|
||||
pub fn from_str(css: &str, base_url: Url, origin: Origin) -> Stylesheet {
|
||||
let rule_parser = TopLevelRuleParser {
|
||||
context: ParserContext::new(origin, &base_url),
|
||||
state: Cell::new(State::Start),
|
||||
|
@ -139,7 +139,7 @@ impl Stylesheet {
|
|||
|
||||
/// Return an iterator over all the rules within the style-sheet.
|
||||
#[inline]
|
||||
pub fn rules<'a>(&'a self) -> Rules<'a> {
|
||||
pub fn rules(&self) -> Rules {
|
||||
Rules::new(self.rules.iter(), None)
|
||||
}
|
||||
|
||||
|
@ -243,8 +243,8 @@ pub mod rule_filter {
|
|||
|
||||
fn next(&mut self) -> Option<&'a $value> {
|
||||
while let Some(rule) = self.iter.next() {
|
||||
match rule {
|
||||
&CSSRule::$variant(ref value) => return Some(value),
|
||||
match *rule {
|
||||
CSSRule::$variant(ref value) => return Some(value),
|
||||
_ => continue
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue