Bug 1459401: Remove unused container argument in EventStateManager::ContentRemoved. r=smaug
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 05 May 2018 06:30:05 +0200
changeset 473190 b1628ac71fcc15797baec6083650bfcde650f190
parent 473189 1525ef29ed016b0e2c25671af65729e7c759aaee
child 473191 bcb12302c327f88f7d9afb571fbc94a83d24fed3
child 473198 df2377e8a6f2892d7a3141f0023e8b335f35911b
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1459401
milestone61.0a1
first release with
nightly linux32
b1628ac71fcc / 61.0a1 / 20180506220517 / files
nightly linux64
b1628ac71fcc / 61.0a1 / 20180506220517 / files
nightly mac
b1628ac71fcc / 61.0a1 / 20180506220517 / files
nightly win32
b1628ac71fcc / 61.0a1 / 20180506220517 / files
nightly win64
b1628ac71fcc / 61.0a1 / 20180506220517 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1459401: Remove unused container argument in EventStateManager::ContentRemoved. r=smaug MozReview-Commit-ID: HAuTfzuo3iY
dom/events/EventStateManager.cpp
dom/events/EventStateManager.h
layout/base/PresShell.cpp
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -5376,19 +5376,17 @@ EventStateManager::ResetLastOverForConte
   if (aElemWrapper && aElemWrapper->mLastOverElement &&
       nsContentUtils::ContentIsDescendantOf(aElemWrapper->mLastOverElement,
                                             aContent)) {
     aElemWrapper->mLastOverElement = nullptr;
   }
 }
 
 void
-EventStateManager::ContentRemoved(nsIDocument* aDocument,
-                                  nsIContent* aMaybeContainer,
-                                  nsIContent* aContent)
+EventStateManager::ContentRemoved(nsIDocument* aDocument, nsIContent* aContent)
 {
   /*
    * Anchor and area elements when focused or hovered might make the UI to show
    * the current link. We want to make sure that the UI gets informed when they
    * are actually removed from the DOM.
    */
   if (aContent->IsAnyOfHTMLElements(nsGkAtoms::a, nsGkAtoms::area) &&
       (aContent->AsElement()->State().HasAtLeastOneOfStates(NS_EVENT_STATE_FOCUS |
--- a/dom/events/EventStateManager.h
+++ b/dom/events/EventStateManager.h
@@ -142,18 +142,17 @@ public:
    * @return  Whether the content was able to change all states. Returns false
    *                  if a resulting DOM event causes the content node passed in
    *                  to not change states. Note, the frame for the content may
    *                  change as a result of the content state change, because of
    *                  frame reconstructions that may occur, but this does not
    *                  affect the return value.
    */
   bool SetContentState(nsIContent* aContent, EventStates aState);
-  void ContentRemoved(nsIDocument* aDocument, nsIContent* aMaybeContainer,
-                      nsIContent* aContent);
+  void ContentRemoved(nsIDocument* aDocument, nsIContent* aContent);
 
   bool EventStatusOK(WidgetGUIEvent* aEvent);
 
   /**
    * EventStateManager stores IMEContentObserver while it's observing contents.
    * Following mehtods are called by IMEContentObserver when it starts to
    * observe or stops observing the content.
    */
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -4541,18 +4541,17 @@ PresShell::ContentRemoved(nsIContent* aC
 {
   NS_PRECONDITION(!mIsDocumentGone, "Unexpected ContentRemoved");
   NS_PRECONDITION(aChild->OwnerDoc() == mDocument, "Unexpected document");
   nsINode* container = aChild->GetParentNode();
 
   // Notify the ESM that the content has been removed, so that
   // it can clean up any state related to the content.
 
-  mPresContext->EventStateManager()
-    ->ContentRemoved(mDocument, aChild->GetParent(), aChild);
+  mPresContext->EventStateManager()->ContentRemoved(mDocument, aChild);
 
   nsAutoCauseReflowNotifier crNotifier(this);
 
   // Call this here so it only happens for real content mutations and
   // not cases when the frame constructor calls its own methods to force
   // frame reconstruction.
   nsIContent* oldNextSibling = nullptr;