mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
CSS selector :enabled no longer matches Anchor, Area & Link elements
HTML spec has been modified [1] to disable support for :enabled CSS selector on Anchor, Area & Link elements, after discussion on W3C Bugzilla [2]. [1] https://html5.org/r/8818 [2] https://www.w3.org/Bugs/Public/show_bug.cgi?id=26622
This commit is contained in:
parent
7409685589
commit
4e6785f513
5 changed files with 3 additions and 91 deletions
|
@ -19,7 +19,6 @@ use dom::htmlelement::HTMLElement;
|
|||
use dom::node::{Node, NodeHelpers, ElementNodeTypeId};
|
||||
use dom::virtualmethods::VirtualMethods;
|
||||
|
||||
use servo_util::atom::Atom;
|
||||
use servo_util::namespace::Null;
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
|
@ -78,32 +77,6 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLAnchorElement> {
|
|||
Some(htmlelement as &VirtualMethods)
|
||||
}
|
||||
|
||||
fn after_set_attr(&self, name: &Atom, value: DOMString) {
|
||||
match self.super_type() {
|
||||
Some(ref s) => s.after_set_attr(name, value.clone()),
|
||||
_ => (),
|
||||
}
|
||||
|
||||
let node: JSRef<Node> = NodeCast::from_ref(*self);
|
||||
match name.as_slice() {
|
||||
"href" => node.set_enabled_state(true),
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
|
||||
fn before_remove_attr(&self, name: &Atom, value: DOMString) {
|
||||
match self.super_type() {
|
||||
Some(ref s) => s.before_remove_attr(name, value.clone()),
|
||||
_ => (),
|
||||
}
|
||||
|
||||
let node: JSRef<Node> = NodeCast::from_ref(*self);
|
||||
match name.as_slice() {
|
||||
"href" => node.set_enabled_state(false),
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_event(&self, event: JSRef<Event>) {
|
||||
match self.super_type() {
|
||||
Some(s) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue