mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-30 04:17:31 +09:00
Bug 1392970 - Part 1: Make CustomElementDefinition ref-counted and put it in CustomElementData.
Tag UXP Issue #1344
This commit is contained in:
parent
b0285ef3f7
commit
7ce1742985
7 changed files with 141 additions and 50 deletions
|
|
@ -4065,3 +4065,23 @@ Element::SetCustomElementData(CustomElementData* aData)
|
|||
MOZ_ASSERT(!slots->mCustomElementData, "Custom element data may not be changed once set.");
|
||||
slots->mCustomElementData = aData;
|
||||
}
|
||||
|
||||
CustomElementDefinition*
|
||||
Element::GetCustomElementDefinition() const
|
||||
{
|
||||
CustomElementData* data = GetCustomElementData();
|
||||
if (!data) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return data->GetCustomElementDefinition();
|
||||
}
|
||||
|
||||
void
|
||||
Element::SetCustomElementDefinition(CustomElementDefinition* aDefinition)
|
||||
{
|
||||
CustomElementData* data = GetCustomElementData();
|
||||
MOZ_ASSERT(data);
|
||||
|
||||
data->SetCustomElementDefinition(aDefinition);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue