add form frames to debug reflow bug 115096 r=karnaze sr=attinasi

This commit is contained in:
bernd.mielke@snafu.de
2002-01-07 19:55:56 +00:00
parent 484593fa1c
commit 127612eaa5
35 changed files with 212 additions and 7 deletions

View File

@@ -46,9 +46,9 @@
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLParts.h"
#include "nsLayoutAtoms.h"
#include "nsIFormControl.h"
#include "nsINameSpaceManager.h"
#include "nsLayoutAtoms.h"
#include "nsIDOMElement.h"
#include "nsIListControlFrame.h"
#include "nsIDOMHTMLCollection.h"
@@ -1792,7 +1792,14 @@ nsComboboxControlFrame::GetFrameName(nsAString& aResult) const
}
#endif
NS_IMETHODIMP
nsComboboxControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::comboBoxFrame;
NS_ADDREF(*aType);
return NS_OK;
}
//----------------------------------------------------------------------
// nsIComboboxControlFrame
//----------------------------------------------------------------------

View File

@@ -131,6 +131,7 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
NS_IMETHOD FirstChild(nsIPresContext* aPresContext,
nsIAtom* aListName,

View File

@@ -59,6 +59,7 @@
#include "nsStyleUtil.h"
#include "nsFont.h"
#include "nsCOMPtr.h"
#include "nsLayoutAtoms.h"
static NS_DEFINE_IID(kLegendFrameCID, NS_LEGEND_FRAME_CID);
@@ -102,6 +103,7 @@ public:
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const {
return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
@@ -675,4 +677,13 @@ nsFieldSetFrame::ReplaceFrame(nsIPresContext* aPresContext,
aNewFrame);
}
NS_IMETHODIMP
nsFieldSetFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::fieldSetFrame;
NS_ADDREF(*aType);
return NS_OK;
}

View File

@@ -568,6 +568,15 @@ nsFileControlFrame::GetFrameName(nsAString& aResult) const
}
#endif
NS_IMETHODIMP
nsFileControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::fileControlFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_IMETHODIMP
nsFileControlFrame::GetFormContent(nsIContent*& aContent) const
{

View File

@@ -45,6 +45,7 @@
#include "nsIStatefulFrame.h"
#include "nsCOMPtr.h"
#include "nsIHTMLContent.h"
#include "nsLayoutAtoms.h"
#include "nsGfxTextControlFrame2.h"
#include "nsFormControlHelper.h"
@@ -99,6 +100,7 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight) { return NS_OK; };
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, nsFramePaintLayer aWhichLayer, nsIFrame** aFrame);
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,

View File

@@ -56,6 +56,7 @@
#include "nsIFormControl.h"
#include "nsIDeviceContext.h"
#include "nsHTMLAtoms.h"
#include "nsLayoutAtoms.h"
#include "nsIButton.h" // remove this when GetCID is pure virtual
#include "nsICheckButton.h" //remove this
#include "nsITextWidget.h" //remove this
@@ -779,6 +780,14 @@ nsFormControlFrame::GetValue(nsAString* aResult)
return result;
}
NS_IMETHODIMP
nsFormControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::formControlFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_METHOD
nsFormControlFrame::HandleEvent(nsIPresContext* aPresContext,

View File

@@ -159,6 +159,8 @@ public:
NS_IMETHOD GetName(nsAString* aName);
NS_IMETHOD GetValue(nsAString* aName);
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
/**
* Respond to a enter key being pressed
*/

View File

@@ -54,6 +54,7 @@
#endif
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
//------------------------------------------------------------
@@ -122,6 +123,16 @@ NS_IMETHODIMP nsGfxCheckboxControlFrame::GetAccessible(nsIAccessible** aAccessib
}
#endif
NS_IMETHODIMP
nsGfxCheckboxControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::gfxCheckBoxFrame;
NS_ADDREF(*aType);
return NS_OK;
}
//--------------------------------------------------------------
NS_IMETHODIMP
nsGfxCheckboxControlFrame::SetCheckboxFaceStyleContext(nsIStyleContext *aCheckboxFaceStyleContext)

View File

@@ -92,6 +92,7 @@ public:
NS_IMETHOD GetAccessible(nsIAccessible** aAccessible);
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
//nsICheckboxControlFrame methods
NS_IMETHOD SetCheckboxFaceStyleContext(nsIStyleContext *aCheckboxFaceStyleContext);

View File

@@ -54,6 +54,7 @@
#endif
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
nsresult
@@ -83,6 +84,15 @@ nsGfxRadioControlFrame::~nsGfxRadioControlFrame()
NS_IF_RELEASE(mRadioButtonFaceStyle);
}
NS_IMETHODIMP
nsGfxRadioControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::gfxRadioControlFrame;
NS_ADDREF(*aType);
return NS_OK;
}
// Frames are not refcounted, no need to AddRef
NS_IMETHODIMP
nsGfxRadioControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)

View File

@@ -61,6 +61,7 @@ private:
public:
nsGfxRadioControlFrame();
~nsGfxRadioControlFrame();
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
//nsIRadioControlFrame methods
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);

View File

@@ -214,6 +214,14 @@ nsHTMLButtonControlFrame::GetDefaultLabel(nsString& aString)
}
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::htmlButtonFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::GetType(PRInt32* aType) const

View File

@@ -55,6 +55,7 @@
#include "nsHTMLIIDs.h"
#include "nsISupports.h"
#include "nsHTMLAtoms.h"
#include "nsLayoutAtoms.h"
#include "nsIImage.h"
#include "nsStyleUtil.h"
#include "nsStyleConsts.h"
@@ -67,6 +68,7 @@
#include "nsIDocument.h"
#include "nsButtonFrameRenderer.h"
class nsHTMLButtonControlFrame : public nsHTMLContainerFrame,
public nsIFormControlFrame
{
@@ -128,7 +130,7 @@ public:
virtual nsresult RequiresWidget(PRBool &aRequiresWidget);
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD GetType(PRInt32* aType) const;
NS_IMETHOD GetName(nsAString* aName);
NS_IMETHOD GetValue(nsAString* aName);

View File

@@ -49,6 +49,7 @@
#include "nsIComponentManager.h"
#include "nsIView.h"
#include "nsHTMLParts.h"
#include "nsLayoutAtoms.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsINameSpaceManager.h"
#include "nsCOMPtr.h"
@@ -385,6 +386,16 @@ nsIsIndexFrame::GetFrameName(nsAString& aResult) const
}
#endif
NS_IMETHODIMP
nsIsIndexFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::isIndexFrame;
NS_ADDREF(*aType);
return NS_OK;
}
// submission
// much of this is cut and paste from nsFormFrame::OnSubmit
NS_IMETHODIMP

View File

@@ -111,6 +111,8 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
PRInt32 aNameSpaceID,

View File

@@ -49,6 +49,7 @@
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsLayoutAtoms.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsStyleUtil.h"
@@ -158,3 +159,12 @@ nsLegendFrame::GetFrameName(nsAString& aResult) const
return MakeFrameName(NS_LITERAL_STRING("Legend"), aResult);
}
#endif
NS_IMETHODIMP
nsLegendFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::legendFrame;
NS_ADDREF(*aType);
return NS_OK;
}

View File

@@ -76,6 +76,7 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
PRInt32 GetAlign();

View File

@@ -46,9 +46,9 @@
#include "nsHTMLIIDs.h"
#include "nsHTMLAtoms.h"
#include "nsHTMLParts.h"
#include "nsLayoutAtoms.h"
#include "nsIFormControl.h"
#include "nsINameSpaceManager.h"
#include "nsLayoutAtoms.h"
#include "nsIDOMElement.h"
#include "nsIListControlFrame.h"
#include "nsIDOMHTMLCollection.h"
@@ -1792,7 +1792,14 @@ nsComboboxControlFrame::GetFrameName(nsAString& aResult) const
}
#endif
NS_IMETHODIMP
nsComboboxControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::comboBoxFrame;
NS_ADDREF(*aType);
return NS_OK;
}
//----------------------------------------------------------------------
// nsIComboboxControlFrame
//----------------------------------------------------------------------

View File

@@ -131,6 +131,7 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD Destroy(nsIPresContext* aPresContext);
NS_IMETHOD FirstChild(nsIPresContext* aPresContext,
nsIAtom* aListName,

View File

@@ -59,6 +59,7 @@
#include "nsStyleUtil.h"
#include "nsFont.h"
#include "nsCOMPtr.h"
#include "nsLayoutAtoms.h"
static NS_DEFINE_IID(kLegendFrameCID, NS_LEGEND_FRAME_CID);
@@ -102,6 +103,7 @@ public:
nsIAtom* aListName,
nsIFrame* aOldFrame,
nsIFrame* aNewFrame);
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
#ifdef DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const {
return MakeFrameName(NS_LITERAL_STRING("FieldSet"), aResult);
@@ -675,4 +677,13 @@ nsFieldSetFrame::ReplaceFrame(nsIPresContext* aPresContext,
aNewFrame);
}
NS_IMETHODIMP
nsFieldSetFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::fieldSetFrame;
NS_ADDREF(*aType);
return NS_OK;
}

View File

@@ -568,6 +568,15 @@ nsFileControlFrame::GetFrameName(nsAString& aResult) const
}
#endif
NS_IMETHODIMP
nsFileControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::fileControlFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_IMETHODIMP
nsFileControlFrame::GetFormContent(nsIContent*& aContent) const
{

View File

@@ -45,6 +45,7 @@
#include "nsIStatefulFrame.h"
#include "nsCOMPtr.h"
#include "nsIHTMLContent.h"
#include "nsLayoutAtoms.h"
#include "nsGfxTextControlFrame2.h"
#include "nsFormControlHelper.h"
@@ -99,6 +100,7 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight) { return NS_OK; };
NS_IMETHOD GetFrameForPoint(nsIPresContext* aPresContext, const nsPoint& aPoint, nsFramePaintLayer aWhichLayer, nsIFrame** aFrame);
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,

View File

@@ -56,6 +56,7 @@
#include "nsIFormControl.h"
#include "nsIDeviceContext.h"
#include "nsHTMLAtoms.h"
#include "nsLayoutAtoms.h"
#include "nsIButton.h" // remove this when GetCID is pure virtual
#include "nsICheckButton.h" //remove this
#include "nsITextWidget.h" //remove this
@@ -779,6 +780,14 @@ nsFormControlFrame::GetValue(nsAString* aResult)
return result;
}
NS_IMETHODIMP
nsFormControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::formControlFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_METHOD
nsFormControlFrame::HandleEvent(nsIPresContext* aPresContext,

View File

@@ -159,6 +159,8 @@ public:
NS_IMETHOD GetName(nsAString* aName);
NS_IMETHOD GetValue(nsAString* aName);
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
/**
* Respond to a enter key being pressed
*/

View File

@@ -54,6 +54,7 @@
#endif
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
//------------------------------------------------------------
@@ -122,6 +123,16 @@ NS_IMETHODIMP nsGfxCheckboxControlFrame::GetAccessible(nsIAccessible** aAccessib
}
#endif
NS_IMETHODIMP
nsGfxCheckboxControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::gfxCheckBoxFrame;
NS_ADDREF(*aType);
return NS_OK;
}
//--------------------------------------------------------------
NS_IMETHODIMP
nsGfxCheckboxControlFrame::SetCheckboxFaceStyleContext(nsIStyleContext *aCheckboxFaceStyleContext)

View File

@@ -92,6 +92,7 @@ public:
NS_IMETHOD GetAccessible(nsIAccessible** aAccessible);
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
//nsICheckboxControlFrame methods
NS_IMETHOD SetCheckboxFaceStyleContext(nsIStyleContext *aCheckboxFaceStyleContext);

View File

@@ -54,6 +54,7 @@
#endif
#include "nsIServiceManager.h"
#include "nsIDOMNode.h"
#include "nsLayoutAtoms.h"
nsresult
@@ -83,6 +84,15 @@ nsGfxRadioControlFrame::~nsGfxRadioControlFrame()
NS_IF_RELEASE(mRadioButtonFaceStyle);
}
NS_IMETHODIMP
nsGfxRadioControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::gfxRadioControlFrame;
NS_ADDREF(*aType);
return NS_OK;
}
// Frames are not refcounted, no need to AddRef
NS_IMETHODIMP
nsGfxRadioControlFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr)

View File

@@ -61,6 +61,7 @@ private:
public:
nsGfxRadioControlFrame();
~nsGfxRadioControlFrame();
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
//nsIRadioControlFrame methods
NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr);

View File

@@ -214,6 +214,14 @@ nsHTMLButtonControlFrame::GetDefaultLabel(nsString& aString)
}
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::htmlButtonFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_IMETHODIMP
nsHTMLButtonControlFrame::GetType(PRInt32* aType) const

View File

@@ -55,6 +55,7 @@
#include "nsHTMLIIDs.h"
#include "nsISupports.h"
#include "nsHTMLAtoms.h"
#include "nsLayoutAtoms.h"
#include "nsIImage.h"
#include "nsStyleUtil.h"
#include "nsStyleConsts.h"
@@ -67,6 +68,7 @@
#include "nsIDocument.h"
#include "nsButtonFrameRenderer.h"
class nsHTMLButtonControlFrame : public nsHTMLContainerFrame,
public nsIFormControlFrame
{
@@ -128,7 +130,7 @@ public:
virtual nsresult RequiresWidget(PRBool &aRequiresWidget);
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD GetType(PRInt32* aType) const;
NS_IMETHOD GetName(nsAString* aName);
NS_IMETHOD GetValue(nsAString* aName);

View File

@@ -49,6 +49,7 @@
#include "nsIComponentManager.h"
#include "nsIView.h"
#include "nsHTMLParts.h"
#include "nsLayoutAtoms.h"
#include "nsIDOMHTMLInputElement.h"
#include "nsINameSpaceManager.h"
#include "nsCOMPtr.h"
@@ -385,6 +386,16 @@ nsIsIndexFrame::GetFrameName(nsAString& aResult) const
}
#endif
NS_IMETHODIMP
nsIsIndexFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::isIndexFrame;
NS_ADDREF(*aType);
return NS_OK;
}
// submission
// much of this is cut and paste from nsFormFrame::OnSubmit
NS_IMETHODIMP

View File

@@ -111,6 +111,8 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
NS_IMETHOD AttributeChanged(nsIPresContext* aPresContext,
nsIContent* aChild,
PRInt32 aNameSpaceID,

View File

@@ -39,6 +39,7 @@
#include "nsIPresShell.h"
#include "nsFormControlFrame.h"
#include "nsIDOMHTMLAnchorElement.h"
#include "nsLayoutAtoms.h"
typedef nsInlineFrame nsLabelFrameSuper;
@@ -65,7 +66,7 @@ public:
return MakeFrameName(NS_LITERAL_STRING("Label"), aResult);
}
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
};
nsresult
@@ -170,3 +171,11 @@ nsLabelFrame::GetFrameForPoint(nsIPresContext* aPresContext,
return rv;
}
NS_IMETHODIMP
nsLabelFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::labelFrame;
NS_ADDREF(*aType);
return NS_OK;
}

View File

@@ -49,6 +49,7 @@
#include "nsHTMLIIDs.h"
#include "nsHTMLParts.h"
#include "nsHTMLAtoms.h"
#include "nsLayoutAtoms.h"
#include "nsIStyleContext.h"
#include "nsStyleConsts.h"
#include "nsStyleUtil.h"
@@ -158,3 +159,12 @@ nsLegendFrame::GetFrameName(nsAString& aResult) const
return MakeFrameName(NS_LITERAL_STRING("Legend"), aResult);
}
#endif
NS_IMETHODIMP
nsLegendFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::legendFrame;
NS_ADDREF(*aType);
return NS_OK;
}

View File

@@ -76,6 +76,7 @@ public:
#ifdef NS_DEBUG
NS_IMETHOD GetFrameName(nsAString& aResult) const;
#endif
NS_IMETHOD GetFrameType(nsIAtom** aResult) const;
PRInt32 GetAlign();