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:
bors-servo 2015-08-24 04:23:13 -06:00
commit fa06a96f8a
6 changed files with 37 additions and 3 deletions

View file

@ -478,6 +478,12 @@ impl<'le> ::selectors::Element for LayoutElement<'le> {
node.get_focus_state_for_layout()
}
#[inline]
fn get_active_state(&self) -> bool {
let node = NodeCast::from_layout_js(&self.element);
node.get_active_state_for_layout()
}
#[inline]
fn get_id(&self) -> Option<Atom> {
unsafe {