瀏覽代碼

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

Michael Ragazzon 5 年之前
父節點
當前提交
e7cc9743a7
共有 1 個文件被更改,包括 12 次插入0 次删除
  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>());
 	}
 
+	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");
 	if (it != changed_attributes.end())
 	{