Ongoing deCOMtamination. r+sr=dbaron

This commit is contained in:
roc+@cs.cmu.edu
2003-06-30 10:46:59 +00:00
parent d690cebe8b
commit acbd7967d4
19 changed files with 614 additions and 1057 deletions

View File

@@ -94,14 +94,11 @@ nsSelectsAreaFrame::IsOptionElement(nsIContent* aContent)
PRBool
nsSelectsAreaFrame::IsOptionElementFrame(nsIFrame *aFrame)
{
nsIContent *content = nsnull;
aFrame->GetContent(&content);
PRBool result = PR_FALSE;
if (nsnull != content) {
result = IsOptionElement(content);
NS_RELEASE(content);
nsIContent *content = aFrame->GetContent();
if (content) {
return IsOptionElement(content);
}
return(result);
return PR_FALSE;
}
//---------------------------------------------------------
@@ -122,10 +119,10 @@ nsSelectsAreaFrame::GetFrameForPoint(nsIPresContext* aPresContext,
if (result == NS_OK) {
nsIFrame* selectedFrame = *aFrame;
while ((nsnull != selectedFrame) && (PR_FALSE == IsOptionElementFrame(selectedFrame))) {
selectedFrame->GetParent(&selectedFrame);
while (selectedFrame && !IsOptionElementFrame(selectedFrame)) {
selectedFrame = selectedFrame->GetParent();
}
if (nsnull != selectedFrame) {
if (selectedFrame) {
*aFrame = selectedFrame;
}
// else, keep the original result as *aFrame, which could be this frame
@@ -141,11 +138,11 @@ nsSelectsAreaFrame::Paint(nsIPresContext* aPresContext,
nsFramePaintLayer aWhichLayer,
PRUint32 aFlags)
{
nsresult rv = nsAreaFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
nsAreaFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
nsIFrame* frame = this;
while (frame) {
frame->GetParent(&frame);
frame = frame->GetParent();
nsCOMPtr<nsIAtom> type;
frame->GetFrameType(getter_AddRefs(type));
if (type == nsLayoutAtoms::listControlFrame) {