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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user