author | Hiroyuki Ikezoe <hikezoe@mozilla.com> |
Wed, 13 Feb 2019 04:44:34 +0000 | |
changeset 458842 | dcabcaa944f5 |
parent 458841 | fc540ce0e429 |
child 458843 | 5f38e97f40ef |
push id | 35548 |
push user | opoprus@mozilla.com |
push date | Wed, 13 Feb 2019 09:48:26 +0000 |
treeherder | mozilla-central@93e37c529818 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | birtles |
bugs | 1443320 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/base/Element.cpp +++ b/dom/base/Element.cpp @@ -1995,31 +1995,29 @@ nsDOMCSSAttributeDeclaration* Element::S } DeclarationBlock* Element::GetSMILOverrideStyleDeclaration() { Element::nsExtendedDOMSlots* slots = GetExistingExtendedDOMSlots(); return slots ? slots->mSMILOverrideStyleDeclaration.get() : nullptr; } nsresult Element::SetSMILOverrideStyleDeclaration( - DeclarationBlock* aDeclaration, bool aNotify) { + DeclarationBlock* aDeclaration) { Element::nsExtendedDOMSlots* slots = ExtendedDOMSlots(); slots->mSMILOverrideStyleDeclaration = aDeclaration; - if (aNotify) { - Document* doc = GetComposedDoc(); - // 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 - // that's been detached since the previous animation sample.) - if (doc) { - nsCOMPtr<nsIPresShell> shell = doc->GetShell(); - if (shell) { - shell->RestyleForAnimation(this, eRestyle_StyleAttribute_Animations); - } + Document* doc = GetComposedDoc(); + // 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 + // that's been detached since the previous animation sample.) + if (doc) { + nsCOMPtr<nsIPresShell> shell = doc->GetShell(); + if (shell) { + shell->RestyleForAnimation(this, eRestyle_StyleAttribute_Animations); } } return NS_OK; } bool Element::IsLabelable() const { return false; }
--- a/dom/base/Element.h +++ b/dom/base/Element.h @@ -342,22 +342,21 @@ class Element : public FragmentOrElement /** * Get the SMIL override style declaration for this element. If the * rule hasn't been created, this method simply returns null. */ DeclarationBlock* GetSMILOverrideStyleDeclaration(); /** - * Set the SMIL override style declaration for this element. If - * aNotify is true, this method will notify the document's pres - * context, so that the style changes will be noticed. + * Set the SMIL override style declaration for this element. This method will + * notify the document's pres context, so that the style changes will be + * noticed. */ - nsresult SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration, - bool aNotify); + nsresult SetSMILOverrideStyleDeclaration(DeclarationBlock* aDeclaration); /** * Returns a new SMILAttr that allows the caller to animate the given * attribute on this element. */ virtual UniquePtr<SMILAttr> GetAnimatedAttr(int32_t aNamespaceID, nsAtom* aName) { return nullptr;
--- a/layout/style/nsDOMCSSAttrDeclaration.cpp +++ b/layout/style/nsDOMCSSAttrDeclaration.cpp @@ -73,17 +73,17 @@ nsresult nsDOMCSSAttributeDeclaration::S MOZ_ASSERT_IF(!mIsSMILOverride, aClosureData); // The closure needs to have been called by now, otherwise we shouldn't be // getting here when the attribute hasn't changed. MOZ_ASSERT_IF(aClosureData, !aClosureData->mClosure); aDecl->SetDirty(); return mIsSMILOverride - ? mElement->SetSMILOverrideStyleDeclaration(aDecl, true) + ? mElement->SetSMILOverrideStyleDeclaration(aDecl) : mElement->SetInlineStyleDeclaration(*aDecl, *aClosureData); } Document* nsDOMCSSAttributeDeclaration::DocToUpdate() { // We need OwnerDoc() rather than GetUncomposedDoc() because it might // be the BeginUpdate call that inserts mElement into the document. return mElement->OwnerDoc(); }