Browse Source

Dirty layout when 'rowspan', 'colspan', and 'span' attributes change on tables.

Michael Ragazzon 5 years ago
parent
commit
e7cc9743a7
1 changed files with 12 additions and 0 deletions
  1. 12 0
      Source/Core/Element.cpp

+ 12 - 0
Source/Core/Element.cpp

@@ -1651,6 +1651,18 @@ void Element::OnAttributeChange(const ElementAttributes& changed_attributes)
 		meta->style.SetClassNames(it->second.Get<String>());
 		meta->style.SetClassNames(it->second.Get<String>());
 	}
 	}
 
 
+	if (changed_attributes.count("colspan") || changed_attributes.count("rowspan"))
+	{
+		if (meta->computed_values.display == Style::Display::TableCell)
+			DirtyLayout();
+	}
+
+	if (changed_attributes.count("span"))
+	{
+		if (meta->computed_values.display == Style::Display::TableColumn)
+			DirtyLayout();
+	}
+
 	it = changed_attributes.find("style");
 	it = changed_attributes.find("style");
 	if (it != changed_attributes.end())
 	if (it != changed_attributes.end())
 	{
 	{