Bug 806996 part.2 nsTextStateManager::IsManaging() should check if mRootContent is still in the mEditableNode r=smaug

This commit is contained in:
Masayuki Nakano 2012-11-09 17:40:39 +09:00
parent 305c137140
commit 2a122ad59f

View File

@ -753,6 +753,11 @@ 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);
}