Bug 119061 - Make SVG elements respond to :hover when script/animation moves them under the mouse pointer. r=roc.

This commit is contained in:
Jonathan Watt 2012-02-01 19:15:49 +00:00
parent f18313c7e1
commit 3eb84a8c29

View File

@ -687,6 +687,10 @@ nsSVGOuterSVGFrame::GetType() const
void
nsSVGOuterSVGFrame::InvalidateCoveredRegion(nsIFrame *aFrame)
{
// Make sure elements styled by :hover get updated if script/animation moves
// them under or out from under the pointer:
PresContext()->PresShell()->SynthesizeMouseMove(false);
nsISVGChildFrame *svgFrame = do_QueryFrame(aFrame);
if (!svgFrame)
return;
@ -698,6 +702,10 @@ nsSVGOuterSVGFrame::InvalidateCoveredRegion(nsIFrame *aFrame)
bool
nsSVGOuterSVGFrame::UpdateAndInvalidateCoveredRegion(nsIFrame *aFrame)
{
// Make sure elements styled by :hover get updated if script/animation moves
// them under or out from under the pointer:
PresContext()->PresShell()->SynthesizeMouseMove(false);
nsISVGChildFrame *svgFrame = do_QueryFrame(aFrame);
if (!svgFrame)
return false;