зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1599843 - Element::SetSMILOverrideStyleDeclaration is infallible. r=boris
Differential Revision: https://phabricator.services.mozilla.com/D54996 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2952534343
Коммит
6456b9db4f
|
@ -1835,11 +1835,8 @@ DeclarationBlock* Element::GetSMILOverrideStyleDeclaration() {
|
|||
return slots ? slots->mSMILOverrideStyleDeclaration.get() : nullptr;
|
||||
}
|
||||
|
||||
nsresult Element::SetSMILOverrideStyleDeclaration(
|
||||
DeclarationBlock* aDeclaration) {
|
||||
Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
|
||||
|
||||
slots->mSMILOverrideStyleDeclaration = aDeclaration;
|
||||
void Element::SetSMILOverrideStyleDeclaration(DeclarationBlock& aDeclaration) {
|
||||
ExtendedDOMSlots()->mSMILOverrideStyleDeclaration = &aDeclaration;
|
||||
|
||||
// Only need to request a restyle if we're in a document. (We might not
|
||||
// be in a document, if we're clearing animation effects on a target node
|
||||
|
@ -1849,8 +1846,6 @@ nsresult Element::SetSMILOverrideStyleDeclaration(
|
|||
presShell->RestyleForAnimation(this, StyleRestyleHint_RESTYLE_SMIL);
|
||||
}
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool Element::IsLabelable() const { return false; }
|
||||
|
|
|
@ -336,7 +336,7 @@ class Element : public FragmentOrElement {
|
|||
* notify the document's pres context, so that the style changes will be
|
||||
* noticed.
|
||||
*/
|
||||
nsresult SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration);
|
||||
void SetSMILOverrideStyleDeclaration(DeclarationBlock&);
|
||||
|
||||
/**
|
||||
* Returns a new SMILAttr that allows the caller to animate the given
|
||||
|
|
|
@ -79,9 +79,11 @@ nsresult nsDOMCSSAttributeDeclaration::SetCSSDeclaration(
|
|||
MOZ_ASSERT_IF(aClosureData, !aClosureData->mClosure);
|
||||
|
||||
aDecl->SetDirty();
|
||||
return mIsSMILOverride
|
||||
? mElement->SetSMILOverrideStyleDeclaration(aDecl)
|
||||
: mElement->SetInlineStyleDeclaration(*aDecl, *aClosureData);
|
||||
if (mIsSMILOverride) {
|
||||
mElement->SetSMILOverrideStyleDeclaration(*aDecl);
|
||||
return NS_OK;
|
||||
}
|
||||
return mElement->SetInlineStyleDeclaration(*aDecl, *aClosureData);
|
||||
}
|
||||
|
||||
Document* nsDOMCSSAttributeDeclaration::DocToUpdate() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче