Bug 1443320 - Drop |aNotify| argument from Element::SetSMILOverrideStyleDeclaration. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Wed, 13 Feb 2019 04:44:34 +0000
changeset 458859 dcabcaa944f5130b4ddb5bccc6076ec50d46f2ca
parent 458858 fc540ce0e4298b98f8961ecbc4b58733e35df0e0
child 458860 5f38e97f40ef8e5913f22605914d2c627f738205
push id78061
push userhikezoe@mozilla.com
push dateWed, 13 Feb 2019 05:38:51 +0000
treeherderautoland@dcabcaa944f5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1443320
milestone67.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
Bug 1443320 - Drop |aNotify| argument from Element::SetSMILOverrideStyleDeclaration. r=birtles The other call site was removed in https://hg.mozilla.org/mozilla-central/rev/e8c0ffefb34f Depends on D19570 Differential Revision: https://phabricator.services.mozilla.com/D19571
dom/base/Element.cpp
dom/base/Element.h
layout/style/nsDOMCSSAttrDeclaration.cpp
--- 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();
 }