backout dataloss-causing fixes for 143862 and 156719, a=asa

This commit is contained in:
leaf%mozilla.org 2002-07-19 21:58:09 +00:00
Родитель 3c35cf2555
Коммит a3ac15471b
5 изменённых файлов: 5 добавлений и 33 удалений

Просмотреть файл

@ -311,11 +311,7 @@ nsHTMLOptionElement::GetSelected(PRBool* aValue)
// This does not need to be SetSelected (which sets selected in the select)
// because we *will* be initialized when we are placed into a select. Plus
// it seems like that's just inviting an infinite loop.
// We can pass |aNotify == PR_FALSE| since |GetSelected| is called
// from |nsHTMLSelectElement::InsertOptionsIntoList|, which is
// guaranteed to be called before frames are created for the
// content.
SetSelectedInternal(selected, PR_FALSE);
SetSelectedInternal(selected, PR_TRUE);
}
*aValue = mIsSelected;

Просмотреть файл

@ -466,7 +466,7 @@ nsHTMLSelectElement::InsertOptionsIntoList(nsIContent* aOptions,
// This is sort of a hack ... we need to notify that the option was
// set and change selectedIndex even though we didn't really change
// its value.
OnOptionSelected(selectFrame, presContext, i, PR_TRUE, PR_FALSE);
OnOptionSelected(selectFrame, presContext, i, PR_TRUE, PR_TRUE);
}
}
}
@ -655,11 +655,6 @@ nsHTMLSelectElement::RemoveOptionsFromListRecurse(nsIContent* aOptions,
return NS_OK;
}
// XXXldb Doing the processing before the content nodes have been added
// to the document (as the name of this function seems to require, and
// as the callers do), is highly unusual. Passing around unparented
// content to other parts of the app can make those things think the
// options are the root content node.
NS_IMETHODIMP
nsHTMLSelectElement::WillAddOptions(nsIContent* aOptions,
nsIContent* aParent,

Просмотреть файл

@ -12225,14 +12225,6 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIPresContext* aPresContext,
rv = ContentInserted(aPresContext, container, aContent, indexInContainer, mTempFrameTreeState, PR_FALSE);
}
}
} else {
// The content is the root node, so just rebuild the world.
#ifdef DEBUG
nsCOMPtr<nsIDocument> doc;
aContent->GetDocument(*getter_AddRefs(doc));
NS_ASSERTION(doc, "content not in document");
#endif
ReconstructDocElementHierarchy(aPresContext);
}
return rv;
}

Просмотреть файл

@ -12225,14 +12225,6 @@ nsCSSFrameConstructor::RecreateFramesForContent(nsIPresContext* aPresContext,
rv = ContentInserted(aPresContext, container, aContent, indexInContainer, mTempFrameTreeState, PR_FALSE);
}
}
} else {
// The content is the root node, so just rebuild the world.
#ifdef DEBUG
nsCOMPtr<nsIDocument> doc;
aContent->GetDocument(*getter_AddRefs(doc));
NS_ASSERTION(doc, "content not in document");
#endif
ReconstructDocElementHierarchy(aPresContext);
}
return rv;
}

Просмотреть файл

@ -289,12 +289,9 @@ nsRootBoxFrame::GetPopupSetFrame(nsIFrame** aResult)
NS_IMETHODIMP
nsRootBoxFrame::SetPopupSetFrame(nsIFrame* aPopupSet)
{
// Under normal conditions this should only be called once. However,
// if something triggers ReconstructDocElementHierarchy, we will
// destroy this frame's child (the nsDocElementBoxFrame), but not this
// frame. Since the anonymous content is associated with the
// nsDocElementBoxFrame, we'll get a new popupset.
mPopupSetFrame = aPopupSet;
NS_ASSERTION(!mPopupSetFrame, "Popup set is already defined! Only 1 allowed.");
if (!mPopupSetFrame)
mPopupSetFrame = aPopupSet;
return NS_OK;
}