mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-29 10:32:23 +00:00
applied bug1386905_pm.diff
This commit is contained in:
@@ -1652,6 +1652,8 @@ nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame)
|
||||
}
|
||||
|
||||
mBoundFrame = nullptr;
|
||||
// Clear mRootNode so that we don't unexpectedly notify below.
|
||||
nsCOMPtr<Element> rootNode = mRootNode.forget();
|
||||
|
||||
// Now that we don't have a frame any more, store the value in the text buffer.
|
||||
// The only case where we don't do this is if a value transfer is in progress.
|
||||
@@ -1661,15 +1663,15 @@ nsTextEditorState::UnbindFromFrame(nsTextControlFrame* aFrame)
|
||||
NS_ENSURE_TRUE_VOID(success);
|
||||
}
|
||||
|
||||
if (mRootNode && mMutationObserver) {
|
||||
mRootNode->RemoveMutationObserver(mMutationObserver);
|
||||
if (rootNode && mMutationObserver) {
|
||||
rootNode->RemoveMutationObserver(mMutationObserver);
|
||||
mMutationObserver = nullptr;
|
||||
}
|
||||
|
||||
// Unbind the anonymous content from the tree.
|
||||
// We actually hold a reference to the content nodes so that
|
||||
// they're not actually destroyed.
|
||||
nsContentUtils::DestroyAnonymousContent(&mRootNode);
|
||||
nsContentUtils::DestroyAnonymousContent(&rootNode);
|
||||
nsContentUtils::DestroyAnonymousContent(&mPlaceholderDiv);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user