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:
Bruno de Oliveira Abinader 2014-09-26 16:45:28 -04:00
parent 7409685589
commit 4e6785f513
5 changed files with 3 additions and 91 deletions

View file

@ -5,7 +5,7 @@
use dom::attr::AttrHelpers;
use dom::bindings::codegen::Bindings::HTMLLinkElementBinding;
use dom::bindings::codegen::InheritTypes::HTMLLinkElementDerived;
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast, NodeCast};
use dom::bindings::codegen::InheritTypes::{ElementCast, HTMLElementCast};
use dom::bindings::js::{JSRef, Temporary, OptionalRootable};
use dom::bindings::utils::{Reflectable, Reflector};
use dom::document::Document;
@ -83,27 +83,11 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLLinkElement> {
if is_stylesheet(rel) {
self.handle_stylesheet_url(value.as_slice());
}
let node: JSRef<Node> = NodeCast::from_ref(*self);
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 bind_to_tree(&self, tree_in_doc: bool) {
match self.super_type() {
Some(ref s) => s.bind_to_tree(tree_in_doc),