Changed it so the DidReflow() temporary hack doesn't apply to scrolled

frames
This commit is contained in:
troy%netscape.com 1999-01-19 06:00:08 +00:00
Родитель a38286a6c5
Коммит ba9186df33
2 изменённых файлов: 52 добавлений и 36 удалений

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

@ -317,10 +317,17 @@ nsAreaFrame::DidReflow(nsIPresContext& aPresContext,
nsresult rv = nsBlockFrame::DidReflow(aPresContext, aStatus);
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
// Size and position the view if requested
// XXX Not if we're being scrolled, because the scroll-frame handles
// this...
nsIAtom* pseudoType;
mStyleContext->GetPseudoType(pseudoType);
PRBool isScrolled = nsHTMLAtoms::scrolledContentPseudo == pseudoType;
NS_IF_RELEASE(pseudoType);
if (!isScrolled) {
nsIView* view;
GetView(view);
// Size and position the view if requested
if (nsnull != view) {
// Position and size view relative to its parent, not relative to our
// parent frame (our parent frame may not have a view).
@ -339,6 +346,7 @@ nsAreaFrame::DidReflow(nsIPresContext& aPresContext,
NS_RELEASE(vm);
}
}
}
return rv;
}

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

@ -317,10 +317,17 @@ nsAreaFrame::DidReflow(nsIPresContext& aPresContext,
nsresult rv = nsBlockFrame::DidReflow(aPresContext, aStatus);
if (NS_FRAME_REFLOW_FINISHED == aStatus) {
// Size and position the view if requested
// XXX Not if we're being scrolled, because the scroll-frame handles
// this...
nsIAtom* pseudoType;
mStyleContext->GetPseudoType(pseudoType);
PRBool isScrolled = nsHTMLAtoms::scrolledContentPseudo == pseudoType;
NS_IF_RELEASE(pseudoType);
if (!isScrolled) {
nsIView* view;
GetView(view);
// Size and position the view if requested
if (nsnull != view) {
// Position and size view relative to its parent, not relative to our
// parent frame (our parent frame may not have a view).
@ -339,6 +346,7 @@ nsAreaFrame::DidReflow(nsIPresContext& aPresContext,
NS_RELEASE(vm);
}
}
}
return rv;
}