mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Issue #1375 - Include content rules from HTMLTableCellElement::WalkContentStyleRules and move to the mapped attr functionality
* Bugs 1341647 and 1341648
This commit is contained in:
parent
922cbf0217
commit
6b48075b57
16 changed files with 158 additions and 259 deletions
|
|
@ -714,10 +714,19 @@ nsAttrAndChildArray::MappedAttrCount() const
|
|||
return mImpl && mImpl->mMappedAttrs ? (uint32_t)mImpl->mMappedAttrs->Count() : 0;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsAttrAndChildArray::ForceMapped(nsMappedAttributeElement* aContent, nsIDocument* aDocument)
|
||||
{
|
||||
nsHTMLStyleSheet* sheet = aDocument->GetAttributeStyleSheet();
|
||||
RefPtr<nsMappedAttributes> mapped = GetModifiableMapped(aContent, sheet, false, 0);
|
||||
return MakeMappedUnique(mapped);
|
||||
}
|
||||
|
||||
nsMappedAttributes*
|
||||
nsAttrAndChildArray::GetModifiableMapped(nsMappedAttributeElement* aContent,
|
||||
nsHTMLStyleSheet* aSheet,
|
||||
bool aWillAddAttr)
|
||||
bool aWillAddAttr,
|
||||
int32_t aAttrCount)
|
||||
{
|
||||
if (mImpl && mImpl->mMappedAttrs) {
|
||||
return mImpl->mMappedAttrs->Clone(aWillAddAttr);
|
||||
|
|
@ -727,7 +736,7 @@ nsAttrAndChildArray::GetModifiableMapped(nsMappedAttributeElement* aContent,
|
|||
|
||||
nsMapRuleToAttributesFunc mapRuleFunc =
|
||||
aContent->GetAttributeMappingFunction();
|
||||
return new nsMappedAttributes(aSheet, mapRuleFunc);
|
||||
return new (aAttrCount) nsMappedAttributes(aSheet, mapRuleFunc);
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue