mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Partial fix for bug 78976. Rather than dropping events that are targeted at the canvas frame, we pass them down to the first frame child. r=joki, sr=jst.
This commit is contained in:
parent
9499fd2df2
commit
a064dd059f
@ -107,6 +107,9 @@ public:
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIContent** aContent);
|
||||
|
||||
protected:
|
||||
virtual PRIntn GetSkipSides() const;
|
||||
@ -451,6 +454,27 @@ CanvasFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CanvasFrame::GetContentForEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIContent** aContent)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aContent);
|
||||
nsresult rv = nsFrame::GetContentForEvent(aPresContext,
|
||||
aEvent,
|
||||
aContent);
|
||||
if (NS_FAILED(rv) || !*aContent) {
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
if (kid) {
|
||||
rv = kid->GetContentForEvent(aPresContext,
|
||||
aEvent,
|
||||
aContent);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
CanvasFrame::GetFrameName(nsString& aResult) const
|
||||
|
@ -107,6 +107,9 @@ public:
|
||||
NS_IMETHOD GetFrameName(nsString& aResult) const;
|
||||
NS_IMETHOD SizeOf(nsISizeOfHandler* aHandler, PRUint32* aResult) const;
|
||||
#endif
|
||||
NS_IMETHOD GetContentForEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIContent** aContent);
|
||||
|
||||
protected:
|
||||
virtual PRIntn GetSkipSides() const;
|
||||
@ -451,6 +454,27 @@ CanvasFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
CanvasFrame::GetContentForEvent(nsIPresContext* aPresContext,
|
||||
nsEvent* aEvent,
|
||||
nsIContent** aContent)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aContent);
|
||||
nsresult rv = nsFrame::GetContentForEvent(aPresContext,
|
||||
aEvent,
|
||||
aContent);
|
||||
if (NS_FAILED(rv) || !*aContent) {
|
||||
nsIFrame* kid = mFrames.FirstChild();
|
||||
if (kid) {
|
||||
rv = kid->GetContentForEvent(aPresContext,
|
||||
aEvent,
|
||||
aContent);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NS_IMETHODIMP
|
||||
CanvasFrame::GetFrameName(nsString& aResult) const
|
||||
|
Loading…
Reference in New Issue
Block a user