diff options
Diffstat (limited to 'components/script/dom/htmltablecellelement.rs')
-rw-r--r-- | components/script/dom/htmltablecellelement.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs index 8b553923230..78f00132580 100644 --- a/components/script/dom/htmltablecellelement.rs +++ b/components/script/dom/htmltablecellelement.rs @@ -9,6 +9,9 @@ use style::attr::{AttrValue, LengthOrPercentageOrAuto}; use style::color::AbsoluteColor; use style::context::QuirksMode; +use super::attr::Attr; +use super::element::AttributeMutation; +use super::node::NodeDamage; use crate::dom::bindings::codegen::Bindings::HTMLTableCellElementBinding::HTMLTableCellElementMethods; use crate::dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; use crate::dom::bindings::inheritance::Castable; @@ -174,6 +177,19 @@ impl VirtualMethods for HTMLTableCellElement { Some(self.upcast::<HTMLElement>() as &dyn VirtualMethods) } + fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation, can_gc: CanGc) { + if let Some(super_type) = self.super_type() { + super_type.attribute_mutated(attr, mutation, can_gc); + } + + if matches!(*attr.local_name(), local_name!("colspan")) { + self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage); + } + if matches!(*attr.local_name(), local_name!("rowspan")) { + self.upcast::<Node>().dirty(NodeDamage::OtherNodeDamage); + } + } + fn parse_plain_attribute(&self, local_name: &LocalName, value: DOMString) -> AttrValue { match *local_name { local_name!("colspan") => { |