nsresult SVGStyleElement::UnsetAttr(int32_t aNameSpaceID, nsIAtom* aAttribute, bool aNotify) { nsresult rv = SVGStyleElementBase::UnsetAttr(aNameSpaceID, aAttribute, aNotify); if (NS_SUCCEEDED(rv) && aNameSpaceID == kNameSpaceID_None) { if (aAttribute == nsGkAtoms::title || aAttribute == nsGkAtoms::media || aAttribute == nsGkAtoms::type) { UpdateStyleSheetInternal(nullptr, true); } else if (aAttribute == nsGkAtoms::scoped) { UpdateStyleSheetScopedness(false); } } return rv; }
nsresult HTMLStyleElement::AfterSetAttr(int32_t aNameSpaceID, nsIAtom* aName, const nsAttrValue* aValue, bool aNotify) { if (aNameSpaceID == kNameSpaceID_None) { if (aName == nsGkAtoms::title || aName == nsGkAtoms::media || aName == nsGkAtoms::type) { UpdateStyleSheetInternal(nullptr, nullptr, true); } else if (aName == nsGkAtoms::scoped) { bool isScoped = aValue; UpdateStyleSheetScopedness(isScoped); } } return nsGenericHTMLElement::AfterSetAttr(aNameSpaceID, aName, aValue, aNotify); }
nsresult SVGStyleElement::SetAttr(int32_t aNameSpaceID, nsIAtom* aName, nsIAtom* aPrefix, const nsAString& aValue, bool aNotify) { nsresult rv = SVGStyleElementBase::SetAttr(aNameSpaceID, aName, aPrefix, aValue, aNotify); if (NS_SUCCEEDED(rv) && aNameSpaceID == kNameSpaceID_None) { if (aName == nsGkAtoms::title || aName == nsGkAtoms::media || aName == nsGkAtoms::type) { UpdateStyleSheetInternal(nullptr, true); } else if (aName == nsGkAtoms::scoped) { UpdateStyleSheetScopedness(true); } } return rv; }