Bug 317375. Reorganize frame painting and mouse event targeting around frame display lists. Some review from dbaron, lots of testing help from Martijn, Julien and others

This commit is contained in:
roc+@cs.cmu.edu
2006-01-26 02:29:17 +00:00
parent 436218a94d
commit a1b6a30f14
174 changed files with 8094 additions and 7747 deletions

View File

@@ -2111,49 +2111,6 @@ nsTextControlFrame::Reflow(nsPresContext* aPresContext,
return rv;
}
NS_IMETHODIMP
nsTextControlFrame::Paint(nsPresContext* aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect,
nsFramePaintLayer aWhichLayer,
PRUint32 aFlags)
{
PRBool isVisible;
if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_TRUE, &isVisible)) && !isVisible) {
return NS_OK;
}
nsresult rv = NS_OK;
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) {
rv = nsStackFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_BACKGROUND);
if (NS_FAILED(rv)) return rv;
rv = nsStackFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FLOATS);
if (NS_FAILED(rv)) return rv;
rv = nsStackFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, NS_FRAME_PAINT_LAYER_FOREGROUND);
}
DO_GLOBAL_REFLOW_COUNT_DSP("nsTextControlFrame", &aRenderingContext);
return rv;
}
nsIFrame*
nsTextControlFrame::GetFrameForPoint(const nsPoint& aPoint,
nsFramePaintLayer aWhichLayer)
{
nsIFrame* frame = nsnull;
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) {
frame = nsStackFrame::GetFrameForPoint(aPoint,
NS_FRAME_PAINT_LAYER_FOREGROUND);
if (frame)
return frame;
frame = nsStackFrame::GetFrameForPoint(aPoint,
NS_FRAME_PAINT_LAYER_FLOATS);
if (frame)
return frame;
frame = nsStackFrame::GetFrameForPoint(aPoint,
NS_FRAME_PAINT_LAYER_BACKGROUND);
}
return frame;
}
NS_IMETHODIMP
nsTextControlFrame::GetPrefSize(nsBoxLayoutState& aState, nsSize& aSize)
{