script: Don't avoid all the mutation notification methods when the style attribute changes.

Styling was correct because of the explicit dirtiness, but still not fun.

Some things, like dynamic updates to with things like [style~="color"] ~ foo
selectors, were pretty broken, because we didn't take snapshots of those
attributes.
This commit is contained in:
Emilio Cobos Álvarez 2017-01-29 01:25:56 +01:00
parent cb304fd42c
commit 31ecc9b692
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 93 additions and 55 deletions

View file

@ -166,7 +166,7 @@ impl VirtualMethods for HTMLLinkElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
if !self.upcast::<Node>().is_in_doc() || mutation == AttributeMutation::Removed {
if !self.upcast::<Node>().is_in_doc() || mutation.is_removal() {
return;
}