Remove the anonymous content for resizers properly. b=420439 r+sr=peterv a1.9+=damons

git-svn-id: svn://10.0.0.236/trunk@250164 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mats.palmgren%bredband.net
2008-04-13 20:22:32 +00:00
parent b9efb9e242
commit 2d079374a6
6 changed files with 61 additions and 10 deletions

View File

@@ -336,6 +336,12 @@ NS_IMETHODIMP
nsHTMLEditor::ShowResizers(nsIDOMElement *aResizedElement)
{
NS_ENSURE_ARG_POINTER(aResizedElement);
if (mResizedObject) {
NS_ERROR("call HideResizers first");
return NS_ERROR_UNEXPECTED;
}
mResizedObject = aResizedElement;
// The resizers and the shadow will be anonymous siblings of the element.
@@ -476,6 +482,11 @@ nsHTMLEditor::HideResizers(void)
mResizingInfo, parentContent, ps);
mResizingInfo = nsnull;
if (mActivatedHandle) {
mActivatedHandle->RemoveAttribute(NS_LITERAL_STRING("_moz_activated"));
mActivatedHandle = nsnull;
}
// don't forget to remove the listeners !
nsCOMPtr<nsPIDOMEventTarget> piTarget = GetPIDOMEventTarget();