mirror of
https://github.com/servo/servo.git
synced 2025-06-18 05:14:28 +00:00
Bug 1364412: Properly reject to parse pseudo-element states that don't support state. r=bholley
MozReview-Commit-ID: KQCFPtOTGQI Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
1e0edf4909
commit
fe8da51fee
1 changed files with 16 additions and 12 deletions
|
@ -319,7 +319,8 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
|
|||
None => return Err(()),
|
||||
};
|
||||
|
||||
let state = input.try(|input| {
|
||||
let state = if pseudo.supports_user_action_state() {
|
||||
input.try(|input| {
|
||||
let mut state = ElementState::empty();
|
||||
|
||||
while !input.is_exhausted() {
|
||||
|
@ -334,7 +335,10 @@ impl<'a> ::selectors::Parser for SelectorParser<'a> {
|
|||
}
|
||||
|
||||
Ok(state)
|
||||
});
|
||||
}).ok()
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Ok(PseudoElementSelector {
|
||||
pseudo: pseudo,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue