зеркало из https://github.com/mozilla/pjs.git
Changed it so the DidReflow() temporary hack doesn't apply to scrolled
frames
This commit is contained in:
Родитель
a38286a6c5
Коммит
ba9186df33
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче