Bug 806996 part.2 nsTextStateManager::IsManaging() should check if mRootContent is still in the mEditableNode r=smaug
authorMasayuki Nakano <masayuki@d-toybox.com>
Fri, 09 Nov 2012 17:40:39 +0900
changeset 112792 db12b505016faffb1056bcbd177886f0a778eed3
parent 112791 9f66e17df8cf82f9f327038ae156d51792aa66de
child 112793 e89844b9bd7c82d941548f9564f69a86dd7e8e70
push id23838
push usereakhgari@mozilla.com
push dateFri, 09 Nov 2012 15:21:51 +0000
treeherdermozilla-central@c39596b46863 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs806996
milestone19.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 806996 part.2 nsTextStateManager::IsManaging() should check if mRootContent is still in the mEditableNode r=smaug
content/events/src/nsIMEStateManager.cpp
--- a/content/events/src/nsIMEStateManager.cpp
+++ b/content/events/src/nsIMEStateManager.cpp
@@ -748,16 +748,21 @@ nsTextStateManager::Destroy(void)
   mEditableNode = nullptr;
   mWidget = nullptr;
 }
 
 bool
 nsTextStateManager::IsManaging(nsPresContext* aPresContext,
                                   nsIContent* aContent)
 {
+  // If mRootContent has been removed from mEditableNode, this is not managing
+  // the content actually.
+  if (!mRootContent || !mRootContent->IsInDoc()) {
+    return false;
+  }
   return mEditableNode == nsIMEStateManager::GetRootEditableNode(aPresContext,
                                                                  aContent);
 }
 
 NS_IMPL_ISUPPORTS2(nsTextStateManager,
                    nsIMutationObserver,
                    nsISelectionListener)