зеркало из https://github.com/mozilla/pjs.git
Moved frame-border rendering debug hook here
This commit is contained in:
Родитель
acc7e3ebee
Коммит
658cb2fc65
|
@ -895,18 +895,25 @@ NS_IMETHODIMP PresShell :: Paint(nsIView *aView,
|
|||
{
|
||||
void* clientData;
|
||||
nsIFrame* frame;
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ASSERTION(!(nsnull == aView), "null view");
|
||||
|
||||
aView->GetClientData(clientData);
|
||||
frame = (nsIFrame *)clientData;
|
||||
|
||||
if (nsnull != frame)
|
||||
if (nsnull != frame) {
|
||||
rv = frame->Paint(*mPresContext, aRenderingContext, aDirtyRect);
|
||||
else
|
||||
rv = NS_OK;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
// Draw a border around the frame
|
||||
if (nsIFrame::GetShowFrameBorders()) {
|
||||
nsRect r;
|
||||
frame->GetRect(r);
|
||||
aRenderingContext.SetColor(NS_RGB(0,0,255));
|
||||
aRenderingContext.DrawRect(0, 0, r.width, r.height);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -895,18 +895,25 @@ NS_IMETHODIMP PresShell :: Paint(nsIView *aView,
|
|||
{
|
||||
void* clientData;
|
||||
nsIFrame* frame;
|
||||
nsresult rv;
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
NS_ASSERTION(!(nsnull == aView), "null view");
|
||||
|
||||
aView->GetClientData(clientData);
|
||||
frame = (nsIFrame *)clientData;
|
||||
|
||||
if (nsnull != frame)
|
||||
if (nsnull != frame) {
|
||||
rv = frame->Paint(*mPresContext, aRenderingContext, aDirtyRect);
|
||||
else
|
||||
rv = NS_OK;
|
||||
|
||||
#ifdef NS_DEBUG
|
||||
// Draw a border around the frame
|
||||
if (nsIFrame::GetShowFrameBorders()) {
|
||||
nsRect r;
|
||||
frame->GetRect(r);
|
||||
aRenderingContext.SetColor(NS_RGB(0,0,255));
|
||||
aRenderingContext.DrawRect(0, 0, r.width, r.height);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче