зеркало из 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;
|
return slots ? slots->mSMILOverrideStyleDeclaration.get() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult Element::SetSMILOverrideStyleDeclaration(
|
void Element::SetSMILOverrideStyleDeclaration(DeclarationBlock& aDeclaration) {
|
||||||
DeclarationBlock* aDeclaration) {
|
ExtendedDOMSlots()->mSMILOverrideStyleDeclaration = &aDeclaration;
|
||||||
Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots();
|
|
||||||
|
|
||||||
slots->mSMILOverrideStyleDeclaration = aDeclaration;
|
|
||||||
|
|
||||||
// Only need to request a restyle if we're in a document. (We might not
|
// 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
|
// 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);
|
presShell->RestyleForAnimation(this, StyleRestyleHint_RESTYLE_SMIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Element::IsLabelable() const { return false; }
|
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
|
* notify the document's pres context, so that the style changes will be
|
||||||
* noticed.
|
* noticed.
|
||||||
*/
|
*/
|
||||||
nsresult SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration);
|
void SetSMILOverrideStyleDeclaration(DeclarationBlock&);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a new SMILAttr that allows the caller to animate the given
|
* 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);
|
MOZ_ASSERT_IF(aClosureData, !aClosureData->mClosure);
|
||||||
|
|
||||||
aDecl->SetDirty();
|
aDecl->SetDirty();
|
||||||
return mIsSMILOverride
|
if (mIsSMILOverride) {
|
||||||
? mElement->SetSMILOverrideStyleDeclaration(aDecl)
|
mElement->SetSMILOverrideStyleDeclaration(*aDecl);
|
||||||
: mElement->SetInlineStyleDeclaration(*aDecl, *aClosureData);
|
return NS_OK;
|
||||||
|
}
|
||||||
|
return mElement->SetInlineStyleDeclaration(*aDecl, *aClosureData);
|
||||||
}
|
}
|
||||||
|
|
||||||
Document* nsDOMCSSAttributeDeclaration::DocToUpdate() {
|
Document* nsDOMCSSAttributeDeclaration::DocToUpdate() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче