From f225437d4a7fb17faf5339fc936f2f0ef557d476 Mon Sep 17 00:00:00 2001 From: Jonathan Watt Date: Wed, 1 Feb 2012 19:15:49 +0000 Subject: [PATCH] Bug 119061 - Make SVG elements respond to :hover when script/animation moves them under the mouse pointer. r=roc. --- layout/svg/base/src/nsSVGOuterSVGFrame.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp index cffcff39d8b..0d88e56e1d5 100644 --- a/layout/svg/base/src/nsSVGOuterSVGFrame.cpp +++ b/layout/svg/base/src/nsSVGOuterSVGFrame.cpp @@ -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;