Issue #1375 - Include content rules from HTMLTableCellElement::WalkContentStyleRules and move to the mapped attr functionality

* Bugs 1341647 and 1341648
This commit is contained in:
Matt A. Tobin 2020-04-17 05:07:41 -04:00 committed by Roy Tam
commit 6b48075b57
16 changed files with 158 additions and 259 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)
{