Bug 1341648 - stylo: Include content rules from HTMLTableCellElement::WalkContentStyleRules ; r=bz

This also removes the TABLE_ATTRS_DIRTY optimization. Constructing nsMappedAttributes isn't really expensive and we do it all the time anyway.

MozReview-Commit-ID: 2krt1nFUzgl
This commit is contained in:
Manish Goregaokar
2017-03-26 13:53:34 -07:00
parent 7c8f7bb51a
commit 42f484fe6f
19 changed files with 144 additions and 119 deletions

View File

@@ -107,9 +107,7 @@ HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
nsresult rv = nsGenericHTMLElement::WalkContentStyleRules(aRuleWalker);
NS_ENSURE_SUCCESS(rv, rv);
if (HTMLTableElement* table = GetTable()) {
nsMappedAttributes* tableInheritedAttributes =
table->GetAttributesMappedForCell();
if (nsMappedAttributes* tableInheritedAttributes = GetMappedAttributesInheritedFromTable()) {
if (tableInheritedAttributes) {
aRuleWalker->Forward(tableInheritedAttributes);
}
@@ -117,6 +115,16 @@ HTMLTableCellElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
return NS_OK;
}
nsMappedAttributes*
HTMLTableCellElement::GetMappedAttributesInheritedFromTable() const
{
if (HTMLTableElement* table = GetTable()) {
return table->GetAttributesMappedForCell();
}
return nullptr;
}
NS_IMETHODIMP
HTMLTableCellElement::SetAbbr(const nsAString& aAbbr)
{