diff options
author | Bobby Holley <bobbyholley@gmail.com> | 2015-11-05 09:58:06 -0800 |
---|---|---|
committer | Bobby Holley <bobbyholley@gmail.com> | 2015-11-10 11:57:24 -0800 |
commit | 7fa79366576751fa6d032091ea54698263783d5d (patch) | |
tree | 1eacd1b76fe400d33613afa5ff55e1d8cd0ae3ae /components/script/dom/attr.rs | |
parent | 47744d95add56352ab5d0631d3dd5e054aad3849 (diff) | |
download | servo-7fa79366576751fa6d032091ea54698263783d5d.tar.gz servo-7fa79366576751fa6d032091ea54698263783d5d.zip |
Implement attribute restyle hints.
Fixes #6942.
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r-- | components/script/dom/attr.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs index c5cd7c3d4ec..02ef5e4451e 100644 --- a/components/script/dom/attr.rs +++ b/components/script/dom/attr.rs @@ -148,6 +148,7 @@ impl AttrMethods for Attr { impl Attr { pub fn set_value(&self, mut value: AttrValue, owner: &Element) { assert!(Some(owner) == self.owner().r()); + owner.will_mutate_attr(); mem::swap(&mut *self.value.borrow_mut(), &mut value); if self.identifier.namespace == ns!("") { vtable_for(owner.upcast()).attribute_mutated( @@ -155,6 +156,10 @@ impl Attr { } } + pub fn identifier(&self) -> &AttrIdentifier { + &self.identifier + } + pub fn value(&self) -> Ref<AttrValue> { self.value.borrow() } |