Override FrameForPoint so that floaters/bullets get events

This commit is contained in:
kipp%netscape.com 1998-11-19 18:09:57 +00:00
Родитель 7da5f1c798
Коммит 318a5e31e4
8 изменённых файлов: 184 добавлений и 8 удалений

Просмотреть файл

@ -1605,6 +1605,13 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
//////////////////////////////////////////////////////////////////////
// Reflow methods
NS_IMETHODIMP
nsBlockFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
void
nsBlockFrame::TakeRunInFrames(nsBlockFrame* aRunInFrame)
{
@ -5063,6 +5070,29 @@ nsBlockFrame::PaintChildren(nsIPresContext& aPresContext,
}
}
NS_IMETHODIMP
nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
{
nsresult rv = GetFrameForPointUsing(aPoint, nsnull, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
if (nsnull != mBullet) {
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
if (nsnull != mFloaters) {
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
*aFrame = this;
return NS_ERROR_FAILURE;
}
//////////////////////////////////////////////////////////////////////
// Debugging

Просмотреть файл

@ -63,13 +63,11 @@ public:
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD IsPercentageBase(PRBool& aBase) const {
aBase = PR_TRUE;
return NS_OK;
}
NS_IMETHOD IsPercentageBase(PRBool& aBase) const;
NS_IMETHOD List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const;
NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD VerifyTree() const;
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame);
// nsIHTMLReflow
NS_IMETHOD Reflow(nsIPresContext& aPresContext,

Просмотреть файл

@ -1605,6 +1605,13 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
//////////////////////////////////////////////////////////////////////
// Reflow methods
NS_IMETHODIMP
nsBlockFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
void
nsBlockFrame::TakeRunInFrames(nsBlockFrame* aRunInFrame)
{
@ -5063,6 +5070,29 @@ nsBlockFrame::PaintChildren(nsIPresContext& aPresContext,
}
}
NS_IMETHODIMP
nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
{
nsresult rv = GetFrameForPointUsing(aPoint, nsnull, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
if (nsnull != mBullet) {
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
if (nsnull != mFloaters) {
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
*aFrame = this;
return NS_ERROR_FAILURE;
}
//////////////////////////////////////////////////////////////////////
// Debugging

Просмотреть файл

@ -1605,6 +1605,13 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
//////////////////////////////////////////////////////////////////////
// Reflow methods
NS_IMETHODIMP
nsBlockFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
void
nsBlockFrame::TakeRunInFrames(nsBlockFrame* aRunInFrame)
{
@ -5063,6 +5070,29 @@ nsBlockFrame::PaintChildren(nsIPresContext& aPresContext,
}
}
NS_IMETHODIMP
nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
{
nsresult rv = GetFrameForPointUsing(aPoint, nsnull, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
if (nsnull != mBullet) {
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
if (nsnull != mFloaters) {
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
*aFrame = this;
return NS_ERROR_FAILURE;
}
//////////////////////////////////////////////////////////////////////
// Debugging

Просмотреть файл

@ -1605,6 +1605,13 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
//////////////////////////////////////////////////////////////////////
// Reflow methods
NS_IMETHODIMP
nsBlockFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
void
nsBlockFrame::TakeRunInFrames(nsBlockFrame* aRunInFrame)
{
@ -5063,6 +5070,29 @@ nsBlockFrame::PaintChildren(nsIPresContext& aPresContext,
}
}
NS_IMETHODIMP
nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
{
nsresult rv = GetFrameForPointUsing(aPoint, nsnull, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
if (nsnull != mBullet) {
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
if (nsnull != mFloaters) {
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
*aFrame = this;
return NS_ERROR_FAILURE;
}
//////////////////////////////////////////////////////////////////////
// Debugging

Просмотреть файл

@ -63,13 +63,11 @@ public:
NS_IMETHOD Paint(nsIPresContext& aPresContext,
nsIRenderingContext& aRenderingContext,
const nsRect& aDirtyRect);
NS_IMETHOD IsPercentageBase(PRBool& aBase) const {
aBase = PR_TRUE;
return NS_OK;
}
NS_IMETHOD IsPercentageBase(PRBool& aBase) const;
NS_IMETHOD List(FILE* out, PRInt32 aIndent, nsIListFilter *aFilter) const;
NS_IMETHOD GetFrameName(nsString& aResult) const;
NS_IMETHOD VerifyTree() const;
NS_IMETHOD GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame);
// nsIHTMLReflow
NS_IMETHOD Reflow(nsIPresContext& aPresContext,

Просмотреть файл

@ -1605,6 +1605,13 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
//////////////////////////////////////////////////////////////////////
// Reflow methods
NS_IMETHODIMP
nsBlockFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
void
nsBlockFrame::TakeRunInFrames(nsBlockFrame* aRunInFrame)
{
@ -5063,6 +5070,29 @@ nsBlockFrame::PaintChildren(nsIPresContext& aPresContext,
}
}
NS_IMETHODIMP
nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
{
nsresult rv = GetFrameForPointUsing(aPoint, nsnull, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
if (nsnull != mBullet) {
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
if (nsnull != mFloaters) {
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
*aFrame = this;
return NS_ERROR_FAILURE;
}
//////////////////////////////////////////////////////////////////////
// Debugging

Просмотреть файл

@ -1605,6 +1605,13 @@ nsBlockFrame::GetAdditionalChildListName(PRInt32 aIndex,
//////////////////////////////////////////////////////////////////////
// Reflow methods
NS_IMETHODIMP
nsBlockFrame::IsPercentageBase(PRBool& aBase) const
{
aBase = PR_TRUE;
return NS_OK;
}
void
nsBlockFrame::TakeRunInFrames(nsBlockFrame* aRunInFrame)
{
@ -5063,6 +5070,29 @@ nsBlockFrame::PaintChildren(nsIPresContext& aPresContext,
}
}
NS_IMETHODIMP
nsBlockFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame)
{
nsresult rv = GetFrameForPointUsing(aPoint, nsnull, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
if (nsnull != mBullet) {
rv = GetFrameForPointUsing(aPoint, gBulletAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
if (nsnull != mFloaters) {
rv = GetFrameForPointUsing(aPoint, gFloaterAtom, aFrame);
if (NS_OK == rv) {
return NS_OK;
}
}
*aFrame = this;
return NS_ERROR_FAILURE;
}
//////////////////////////////////////////////////////////////////////
// Debugging