aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/document.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-06-09 17:16:29 +0200
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-06-13 10:57:43 +0200
commit262f6adc30e4b0d0e7bd284e6357e7ed821949e9 (patch)
treef151cc7d69b976b1455452355f9fa154c3bbba7b /components/script/dom/document.rs
parent8449eb4a6230d07faafc28a0d277b323e2da5e12 (diff)
downloadservo-262f6adc30e4b0d0e7bd284e6357e7ed821949e9.tar.gz
servo-262f6adc30e4b0d0e7bd284e6357e7ed821949e9.zip
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
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r--components/script/dom/document.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 8211830e9eb..2b8ac715203 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -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()