Added nsLayoutAtoms::textFrame

git-svn-id: svn://10.0.0.236/trunk@21706 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com 1999-02-24 05:33:40 +00:00
parent 93a84ec681
commit cd4ee3debc
8 changed files with 46 additions and 0 deletions

View File

@ -68,6 +68,7 @@ public:
static nsIAtom* pageFrame;
static nsIAtom* rootFrame;
static nsIAtom* scrollFrame;
static nsIAtom* textFrame;
static nsIAtom* viewportFrame;
};

View File

@ -54,6 +54,7 @@ nsIAtom* nsLayoutAtoms::areaFrame;
nsIAtom* nsLayoutAtoms::pageFrame;
nsIAtom* nsLayoutAtoms::rootFrame;
nsIAtom* nsLayoutAtoms::scrollFrame;
nsIAtom* nsLayoutAtoms::textFrame;
nsIAtom* nsLayoutAtoms::viewportFrame;
static nsrefcnt gRefCnt;
@ -91,6 +92,7 @@ void nsLayoutAtoms::AddrefAtoms()
pageFrame = NS_NewAtom("PageFrame");
rootFrame = NS_NewAtom("RootFrame");
scrollFrame = NS_NewAtom("ScrollFrame");
textFrame = NS_NewAtom("TextFrame");
viewportFrame = NS_NewAtom("ViewportFrame");
}
++gRefCnt;
@ -130,6 +132,7 @@ void nsLayoutAtoms::ReleaseAtoms()
NS_RELEASE(pageFrame);
NS_RELEASE(rootFrame);
NS_RELEASE(scrollFrame);
NS_RELEASE(textFrame);
NS_RELEASE(viewportFrame);
}
}

View File

@ -54,6 +54,7 @@ nsIAtom* nsLayoutAtoms::areaFrame;
nsIAtom* nsLayoutAtoms::pageFrame;
nsIAtom* nsLayoutAtoms::rootFrame;
nsIAtom* nsLayoutAtoms::scrollFrame;
nsIAtom* nsLayoutAtoms::textFrame;
nsIAtom* nsLayoutAtoms::viewportFrame;
static nsrefcnt gRefCnt;
@ -91,6 +92,7 @@ void nsLayoutAtoms::AddrefAtoms()
pageFrame = NS_NewAtom("PageFrame");
rootFrame = NS_NewAtom("RootFrame");
scrollFrame = NS_NewAtom("ScrollFrame");
textFrame = NS_NewAtom("TextFrame");
viewportFrame = NS_NewAtom("ViewportFrame");
}
++gRefCnt;
@ -130,6 +132,7 @@ void nsLayoutAtoms::ReleaseAtoms()
NS_RELEASE(pageFrame);
NS_RELEASE(rootFrame);
NS_RELEASE(scrollFrame);
NS_RELEASE(textFrame);
NS_RELEASE(viewportFrame);
}
}

View File

@ -68,6 +68,7 @@ public:
static nsIAtom* pageFrame;
static nsIAtom* rootFrame;
static nsIAtom* scrollFrame;
static nsIAtom* textFrame;
static nsIAtom* viewportFrame;
};

View File

@ -68,6 +68,7 @@ public:
static nsIAtom* pageFrame;
static nsIAtom* rootFrame;
static nsIAtom* scrollFrame;
static nsIAtom* textFrame;
static nsIAtom* viewportFrame;
};

View File

@ -54,6 +54,7 @@ nsIAtom* nsLayoutAtoms::areaFrame;
nsIAtom* nsLayoutAtoms::pageFrame;
nsIAtom* nsLayoutAtoms::rootFrame;
nsIAtom* nsLayoutAtoms::scrollFrame;
nsIAtom* nsLayoutAtoms::textFrame;
nsIAtom* nsLayoutAtoms::viewportFrame;
static nsrefcnt gRefCnt;
@ -91,6 +92,7 @@ void nsLayoutAtoms::AddrefAtoms()
pageFrame = NS_NewAtom("PageFrame");
rootFrame = NS_NewAtom("RootFrame");
scrollFrame = NS_NewAtom("ScrollFrame");
textFrame = NS_NewAtom("TextFrame");
viewportFrame = NS_NewAtom("ViewportFrame");
}
++gRefCnt;
@ -130,6 +132,7 @@ void nsLayoutAtoms::ReleaseAtoms()
NS_RELEASE(pageFrame);
NS_RELEASE(rootFrame);
NS_RELEASE(scrollFrame);
NS_RELEASE(textFrame);
NS_RELEASE(viewportFrame);
}
}

View File

@ -47,6 +47,7 @@
#include "nsTextReflow.h"/* XXX rename to nsTextRun */
#include "nsTextFragment.h"
#include "nsTextTransformer.h"
#include "nsLayoutAtoms.h"
static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
@ -115,6 +116,13 @@ public:
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
/**
* Get the "type" of the frame
*
* @see nsLayoutAtoms::textFrame
*/
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD GetPosition(nsIPresContext& aCX,
@ -2572,6 +2580,15 @@ TextFrame::ToCString(nsString& aBuf, PRInt32& aContentLength) const
}
}
NS_IMETHODIMP
TextFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::textFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_IMETHODIMP
TextFrame::GetFrameName(nsString& aResult) const
{

View File

@ -47,6 +47,7 @@
#include "nsTextReflow.h"/* XXX rename to nsTextRun */
#include "nsTextFragment.h"
#include "nsTextTransformer.h"
#include "nsLayoutAtoms.h"
static NS_DEFINE_IID(kIDOMTextIID, NS_IDOMTEXT_IID);
@ -115,6 +116,13 @@ public:
NS_IMETHOD List(FILE* out, PRInt32 aIndent) const;
/**
* Get the "type" of the frame
*
* @see nsLayoutAtoms::textFrame
*/
NS_IMETHOD GetFrameType(nsIAtom** aType) const;
NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD GetPosition(nsIPresContext& aCX,
@ -2572,6 +2580,15 @@ TextFrame::ToCString(nsString& aBuf, PRInt32& aContentLength) const
}
}
NS_IMETHODIMP
TextFrame::GetFrameType(nsIAtom** aType) const
{
NS_PRECONDITION(nsnull != aType, "null OUT parameter pointer");
*aType = nsLayoutAtoms::textFrame;
NS_ADDREF(*aType);
return NS_OK;
}
NS_IMETHODIMP
TextFrame::GetFrameName(nsString& aResult) const
{