Record whether an snapshot is recording a class attribute change or id change.

I'll use this information in order to get fewer dependencies out of the
dependency set.

Bug: 1368240
MozReview-Commit-ID: 5HlmKmSNO8p
This commit is contained in:
Emilio Cobos Álvarez 2017-06-09 17:16:29 +02:00
parent 8449eb4a62
commit 262f6adc30
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 50 additions and 0 deletions

View file

@ -2387,6 +2387,13 @@ impl Document {
}
let mut snapshot = entry.snapshot.as_mut().unwrap();
if attr.local_name() == &local_name!("id") {
snapshot.id_changed = true;
} else if attr.local_name() == &local_name!("class") {
snapshot.class_changed = true;
} else {
snapshot.other_attributes_changed = true;
}
if snapshot.attrs.is_none() {
let attrs = el.attrs()
.iter()