Bug 547333 followup: Move FlushAnimations() call from nsSVGElement::GetAnimatedLengthValues to FlushPendingNotifications. r=jwatt r=bz

This commit is contained in:
Daniel Holbert 2010-03-02 07:36:33 -08:00
parent 627f47b186
commit 5f7e96d98d
5 changed files with 137 additions and 4 deletions

View File

@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="s">
<circle/>
<animateTransform attributeName="transform"/>
</g>
<use xlink:href="#s"/>
</svg>

After

Width:  |  Height:  |  Size: 205 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,3 +1,5 @@
load 483584-1.svg
load 483584-2.svg
load 523188-1.svg
load 525099-1.svg
load 526536-1.svg

View File

@ -1230,10 +1230,6 @@ nsSVGElement::DidAnimateLength(PRUint8 aAttrEnum)
void
nsSVGElement::GetAnimatedLengthValues(float *aFirst, ...)
{
#ifdef MOZ_SMIL
FlushAnimations();
#endif
LengthAttributesInfo info = GetLengthInfo();
NS_ASSERTION(info.mLengthCount > 0,

View File

@ -158,6 +158,9 @@
#ifdef MOZ_MEDIA
#include "nsHTMLMediaElement.h"
#endif
#ifdef MOZ_SMIL
#include "nsSMILAnimationController.h"
#endif
// Drag & Drop, Clipboard
#include "nsWidgetsCID.h"
@ -4756,6 +4759,13 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
// reflow).
mPresContext->FlushUserFontSet();
#ifdef MOZ_SMIL
// Flush any requested SMIL samples.
if (mDocument->HasAnimationController()) {
mDocument->GetAnimationController()->FlushResampleRequests();
}
#endif // MOZ_SMIL
nsAutoScriptBlocker scriptBlocker;
mFrameConstructor->ProcessPendingRestyles();
}