Bug 1458580 - Rename GetSMILStyleOverride since it can't return null. r=emilio

MozReview-Commit-ID: JzV5hQBvlpJ
This commit is contained in:
rahul0379 2018-05-20 23:15:02 +05:30 коммит произвёл Emilio Cobos Álvarez
Родитель 3aea548f0f
Коммит a074d3d299
3 изменённых файлов: 5 добавлений и 8 удалений

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

@ -2039,7 +2039,7 @@ Element::UnbindFromTree(bool aDeep, bool aNullParent)
}
nsDOMCSSAttributeDeclaration*
Element::GetSMILOverrideStyle()
Element::SMILOverrideStyle()
{
Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
@ -4489,7 +4489,7 @@ NoteDirtyElement(Element* aElement, uint32_t aBits)
// We can't check for a frame here, since <frame> elements inside <frameset>
// still need to generate a frame, even if they're display: none. :(
//
// The servo traversal doesn't keep style data under display: none subtrees,
// The servo traversal doesn't keep style data under display: none subtrees,
// so in order for it to not need to cleanup each time anything happens in a
// display: none subtree, we keep it clean.
//

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

@ -361,7 +361,7 @@ public:
* Note: This method is analogous to the 'GetStyle' method in
* nsGenericHTMLElement and nsStyledElement.
*/
nsDOMCSSAttributeDeclaration* GetSMILOverrideStyle();
nsDOMCSSAttributeDeclaration* SMILOverrideStyle();
/**
* Returns if the element is labelable as per HTML specification.

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

@ -107,17 +107,14 @@ nsresult
nsSMILCSSProperty::SetAnimValue(const nsSMILValue& aValue)
{
NS_ENSURE_TRUE(IsPropertyAnimatable(mPropID), NS_ERROR_FAILURE);
return mElement->GetSMILOverrideStyle()->SetSMILValue(mPropID, aValue);
return mElement->SMILOverrideStyle()->SetSMILValue(mPropID, aValue);
}
void
nsSMILCSSProperty::ClearAnimValue()
{
// Put empty string in override style for our property
nsDOMCSSAttributeDeclaration* overrideDecl = mElement->GetSMILOverrideStyle();
if (overrideDecl) {
overrideDecl->SetPropertyValue(mPropID, EmptyString(), nullptr);
}
mElement->SMILOverrideStyle()->SetPropertyValue(mPropID, EmptyString(), nullptr);
}
// Based on http://www.w3.org/TR/SVG/propidx.html