Issue #1592 - Part 10: Slot elements should restyle their parent on attribute changes

This commit is contained in:
FranklinDM 2023-03-20 03:00:11 +08:00 committed by roytam1
commit bc12e05bd3

View file

@ -110,6 +110,13 @@ HTMLSlotElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName,
}
}
if (nsIContent* parent = GetParent()) {
if (parent->IsElement()) {
nsLayoutUtils::PostRestyleEvent(
parent->AsElement(), eRestyle_Subtree, nsChangeHint(0));
}
}
return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName, aValue,
aOldValue, aNotify);
}