mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #7334 - servo:active, r=SimonSapin
Parse :active pseudo-class selector. This is #7258 with a spec link added in doc-comment. The pseudo-class is never matched, but this can still help with stylesheets like `a:hover, a:active { color: something }` where failing to parse one pseudo-class makes the entire selector list invalid. I filed #7333 about actually making it match. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7334) <!-- Reviewable:end -->
This commit is contained in:
commit
fa06a96f8a
6 changed files with 37 additions and 3 deletions
|
@ -1754,6 +1754,10 @@ impl<'a> ::selectors::Element for Root<Element> {
|
|||
let node = NodeCast::from_ref(&**self);
|
||||
node.get_hover_state()
|
||||
}
|
||||
fn get_active_state(&self) -> bool {
|
||||
let node = NodeCast::from_ref(&**self);
|
||||
node.get_active_state()
|
||||
}
|
||||
fn get_focus_state(&self) -> bool {
|
||||
// TODO: Also check whether the top-level browsing context has the system focus,
|
||||
// and whether this element is a browsing context container.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue