Override FrameForPoint so that floaters/bullets get events

git-svn-id: svn://10.0.0.236/trunk@14952 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com
1998-11-19 18:09:57 +00:00
parent 9ac80e4d0f
commit 6eb8511825
8 changed files with 184 additions and 8 deletions

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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