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
Родитель 4f928a2e70
Коммит f225437d4a
1 изменённых файлов: 8 добавлений и 0 удалений

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

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