mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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:
parent
8449eb4a62
commit
262f6adc30
3 changed files with 50 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue