Implements the :checked pseudo-class for inputs

Relevant spec:
https://html.spec.whatwg.org/multipage/scripting.html#selector-checked

Also modifies HTMLInputElement::SetChecked to no longer modify its
checked content value, instead making use of its internal checkedness
state now that we can match `:checked` properly.
This commit is contained in:
Matthew Rasmus 2014-12-02 17:06:30 -08:00
parent 9ac817523c
commit 1b84bd22b8
7 changed files with 47 additions and 4 deletions

View file

@ -552,6 +552,13 @@ impl<'le> TElement<'le> for LayoutElement<'le> {
}
}
#[inline]
fn get_checked_state(self) -> bool {
unsafe {
self.element.get_checked_state_for_layout()
}
}
#[inline]
fn has_class(self, name: &Atom) -> bool {
unsafe {