Bug 1423492 part 4. Stop overring UnsetAttr in SVGElement. r=bytesized

There are now no more overrides of UnsetAttr, so it can stop being virtual.

MozReview-Commit-ID: 4QzAKCkRfgs
This commit is contained in:
Boris Zbarsky 2018-01-03 21:03:50 -05:00
Родитель 834c47ec08
Коммит 9874643dc6
3 изменённых файлов: 9 добавлений и 16 удалений

Просмотреть файл

@ -927,9 +927,7 @@ public:
* @param aNotify specifies whether or not the document should be
* notified of the attribute change
*/
virtual nsresult UnsetAttr(int32_t aNameSpaceID,
nsAtom* aAttribute,
bool aNotify);
nsresult UnsetAttr(int32_t aNameSpaceID, nsAtom* aAttribute, bool aNotify);
/**
* Get the namespace / name / prefix of a given attribute.

Просмотреть файл

@ -895,11 +895,14 @@ nsSVGElement::UnsetAttrInternal(int32_t aNamespaceID, nsAtom* aName,
}
nsresult
nsSVGElement::UnsetAttr(int32_t aNamespaceID, nsAtom* aName,
bool aNotify)
nsSVGElement::BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
const nsAttrValueOrString* aValue,
bool aNotify)
{
UnsetAttrInternal(aNamespaceID, aName, aNotify);
return nsSVGElementBase::UnsetAttr(aNamespaceID, aName, aNotify);
if (!aValue) {
UnsetAttrInternal(aNamespaceID, aName, aNotify);
}
return nsSVGElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
}
nsChangeHint

Просмотреть файл

@ -105,9 +105,6 @@ public:
nsIContent* aBindingParent,
bool aCompileEventHandlers) override;
virtual nsresult UnsetAttr(int32_t aNameSpaceID, nsAtom* aAttribute,
bool aNotify) override;
virtual nsChangeHint GetAttributeChangeHint(const nsAtom* aAttribute,
int32_t aModType) const override;
@ -336,7 +333,6 @@ public:
protected:
virtual JSObject* WrapNode(JSContext *cx, JS::Handle<JSObject*> aGivenProto) override;
#ifdef DEBUG
// We define BeforeSetAttr here and mark it final to ensure it is NOT used
// by SVG elements.
// This is because we're not currently passing the correct value for aValue to
@ -344,11 +340,7 @@ protected:
// See the comment in nsSVGElement::WillChangeValue.
virtual nsresult BeforeSetAttr(int32_t aNamespaceID, nsAtom* aName,
const nsAttrValueOrString* aValue,
bool aNotify) override final
{
return nsSVGElementBase::BeforeSetAttr(aNamespaceID, aName, aValue, aNotify);
}
#endif // DEBUG
bool aNotify) override final;
virtual nsresult AfterSetAttr(int32_t aNamespaceID, nsAtom* aName,
const nsAttrValue* aValue,
const nsAttrValue* aOldValue,