зеркало из https://github.com/mozilla/pjs.git
Add ifdef'ed Performance Reflow Counting code
This commit is contained in:
Родитель
9bbe9a03ae
Коммит
7adb844995
|
@ -247,6 +247,7 @@ nsFieldSetFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame", aReflowState.reason);
|
||||
|
||||
// Initialize OUT parameter
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
|
|
@ -276,6 +276,8 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFileControlFrame", aReflowState.reason);
|
||||
|
||||
if (mFormFrame == nsnull && eReflowReason_Initial == aReflowState.reason) {
|
||||
// add ourself as an nsIFormControlFrame
|
||||
nsFormFrame::AddFormControlFrame(aPresContext, *NS_STATIC_CAST(nsIFrame*, this));
|
||||
|
|
|
@ -520,6 +520,8 @@ nsFormControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFormControlFrame", aReflowState.reason);
|
||||
|
||||
if (!mDidInit) {
|
||||
mPresContext = aPresContext;
|
||||
InitializeControl(aPresContext);
|
||||
|
|
|
@ -523,6 +523,8 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxButtonControlFrame", aReflowState.reason);
|
||||
|
||||
// The mFormFrame is set in the initial reflow within nsHTMLButtonControlFrame
|
||||
nsresult rv = NS_OK;
|
||||
if (eReflowReason_Initial == aReflowState.reason) {
|
||||
|
|
|
@ -643,6 +643,7 @@ nsGfxCheckboxControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxCheckboxControlFrame", aReflowState.reason);
|
||||
nsresult rv = nsFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
COMPARE_QUIRK_SIZE("nsGfxCheckboxControlFrame", 13, 13)
|
||||
|
|
|
@ -385,6 +385,8 @@ nsGfxRadioControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxRadioControlFrame", aReflowState.reason);
|
||||
|
||||
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
COMPARE_QUIRK_SIZE("nsGfxRadioControlFrame", 12, 11)
|
||||
|
|
|
@ -522,6 +522,8 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame", aReflowState.reason);
|
||||
|
||||
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
|
||||
mPresContext = aPresContext;
|
||||
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
|
||||
|
|
|
@ -259,6 +259,7 @@ nsImageControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame", aReflowState.reason);
|
||||
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
|
||||
mPresContext = aPresContext;
|
||||
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
|
||||
|
|
|
@ -90,6 +90,7 @@ nsLegendFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsLegendFrame", aReflowState.reason);
|
||||
if (eReflowReason_Initial == aReflowState.reason) {
|
||||
mPresContext = aPresContext;
|
||||
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
|
||||
|
|
|
@ -327,6 +327,7 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameOuterFrame", aReflowState.reason);
|
||||
//printf("OuterFrame::Reflow %X (%d,%d) \n", this, aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("enter nsHTMLFrameOuterFrame::Reflow: maxSize=%d,%d reason=%d",
|
||||
|
@ -858,6 +859,7 @@ nsHTMLFrameInnerFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameInnerFrame", aReflowState.reason);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("enter nsHTMLFrameInnerFrame::Reflow: maxSize=%d,%d reason=%d",
|
||||
aReflowState.availableWidth,
|
||||
|
|
|
@ -914,6 +914,7 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetFrame", aReflowState.reason);
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
|
||||
|
@ -1573,6 +1574,7 @@ nsHTMLFramesetBorderFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetBorderFrame", aReflowState.reason);
|
||||
GetDesiredSize(aPresContext, aReflowState, aDesiredSize);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
|
@ -1756,6 +1758,7 @@ nsHTMLFramesetBlankFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetBlankFrame", aReflowState.reason);
|
||||
GetDesiredSize(aPresContext, aReflowState, aDesiredSize);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
|
|
|
@ -327,6 +327,7 @@ nsHTMLFrameOuterFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameOuterFrame", aReflowState.reason);
|
||||
//printf("OuterFrame::Reflow %X (%d,%d) \n", this, aReflowState.availableWidth, aReflowState.availableHeight);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("enter nsHTMLFrameOuterFrame::Reflow: maxSize=%d,%d reason=%d",
|
||||
|
@ -858,6 +859,7 @@ nsHTMLFrameInnerFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFrameInnerFrame", aReflowState.reason);
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
("enter nsHTMLFrameInnerFrame::Reflow: maxSize=%d,%d reason=%d",
|
||||
aReflowState.availableWidth,
|
||||
|
|
|
@ -914,6 +914,7 @@ nsHTMLFramesetFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetFrame", aReflowState.reason);
|
||||
nsCOMPtr<nsIPresShell> shell;
|
||||
aPresContext->GetShell(getter_AddRefs(shell));
|
||||
|
||||
|
@ -1573,6 +1574,7 @@ nsHTMLFramesetBorderFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetBorderFrame", aReflowState.reason);
|
||||
GetDesiredSize(aPresContext, aReflowState, aDesiredSize);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
|
@ -1756,6 +1758,7 @@ nsHTMLFramesetBlankFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLFramesetBlankFrame", aReflowState.reason);
|
||||
GetDesiredSize(aPresContext, aReflowState, aDesiredSize);
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
|
|
|
@ -247,6 +247,7 @@ nsFieldSetFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFieldSetFrame", aReflowState.reason);
|
||||
|
||||
// Initialize OUT parameter
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
|
|
|
@ -276,6 +276,8 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFileControlFrame", aReflowState.reason);
|
||||
|
||||
if (mFormFrame == nsnull && eReflowReason_Initial == aReflowState.reason) {
|
||||
// add ourself as an nsIFormControlFrame
|
||||
nsFormFrame::AddFormControlFrame(aPresContext, *NS_STATIC_CAST(nsIFrame*, this));
|
||||
|
|
|
@ -520,6 +520,8 @@ nsFormControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsFormControlFrame", aReflowState.reason);
|
||||
|
||||
if (!mDidInit) {
|
||||
mPresContext = aPresContext;
|
||||
InitializeControl(aPresContext);
|
||||
|
|
|
@ -523,6 +523,8 @@ nsGfxButtonControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxButtonControlFrame", aReflowState.reason);
|
||||
|
||||
// The mFormFrame is set in the initial reflow within nsHTMLButtonControlFrame
|
||||
nsresult rv = NS_OK;
|
||||
if (eReflowReason_Initial == aReflowState.reason) {
|
||||
|
|
|
@ -643,6 +643,7 @@ nsGfxCheckboxControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxCheckboxControlFrame", aReflowState.reason);
|
||||
nsresult rv = nsFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
COMPARE_QUIRK_SIZE("nsGfxCheckboxControlFrame", 13, 13)
|
||||
|
|
|
@ -385,6 +385,8 @@ nsGfxRadioControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxRadioControlFrame", aReflowState.reason);
|
||||
|
||||
nsresult rv = nsNativeFormControlFrame::Reflow(aPresContext, aDesiredSize, aReflowState, aStatus);
|
||||
|
||||
COMPARE_QUIRK_SIZE("nsGfxRadioControlFrame", 12, 11)
|
||||
|
|
|
@ -2379,6 +2379,7 @@ nsGfxTextControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsGfxTextControlFrame", aReflowState.reason);
|
||||
#ifdef DEBUG
|
||||
mDebugTotalReflows++;
|
||||
if (1==mDebugTotalReflows) { // first reflow, better be initial reflow!
|
||||
|
|
|
@ -522,6 +522,8 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsHTMLButtonControlFrame", aReflowState.reason);
|
||||
|
||||
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
|
||||
mPresContext = aPresContext;
|
||||
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
|
||||
|
|
|
@ -259,6 +259,7 @@ nsImageControlFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsImageControlFrame", aReflowState.reason);
|
||||
if (!mFormFrame && (eReflowReason_Initial == aReflowState.reason)) {
|
||||
mPresContext = aPresContext;
|
||||
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
|
||||
|
|
|
@ -466,7 +466,7 @@ void LabelHack(nsHTMLReflowState& aReflowState, char* aMessage)
|
|||
{
|
||||
if (aReflowState.mComputedWidth == 0) {
|
||||
aReflowState.mComputedWidth = aReflowState.availableWidth;
|
||||
NS_ASSERTION(0, "LabelHack: Path #1");
|
||||
//NS_ASSERTION(0, "LabelHack: Path #1");
|
||||
}
|
||||
if ((aReflowState.mComputedWidth != NS_INTRINSICSIZE) &&
|
||||
(aReflowState.mComputedWidth > aReflowState.availableWidth) &&
|
||||
|
@ -533,6 +533,7 @@ nsLabelFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsLabelFrame", aReflowState.reason);
|
||||
|
||||
PRBool isStyleChange = PR_FALSE;
|
||||
PRBool isDirtyChildReflow = PR_FALSE;
|
||||
|
|
|
@ -90,6 +90,7 @@ nsLegendFrame::Reflow(nsIPresContext* aPresContext,
|
|||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus)
|
||||
{
|
||||
DO_GLOBAL_REFLOW_COUNT("nsLegendFrame", aReflowState.reason);
|
||||
if (eReflowReason_Initial == aReflowState.reason) {
|
||||
mPresContext = aPresContext;
|
||||
nsFormControlFrame::RegUnRegAccessKey(aPresContext, NS_STATIC_CAST(nsIFrame*, this), PR_TRUE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче