mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue