From 2a9416a0550455f42a0c15a39b016ce87267b8b7 Mon Sep 17 00:00:00 2001 From: Brian Birtles Date: Tue, 23 Aug 2011 08:34:16 +0900 Subject: [PATCH] Bug 562815 part 7 - Don't cache display animation values (due to bug 536660); r=dholbert --HG-- extra : rebase_source : ddd0350c570dd101960901279e2411e672b05625 --- content/smil/nsSMILCSSProperty.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/smil/nsSMILCSSProperty.cpp b/content/smil/nsSMILCSSProperty.cpp index e2f8ab55024..dce56c18bb6 100644 --- a/content/smil/nsSMILCSSProperty.cpp +++ b/content/smil/nsSMILCSSProperty.cpp @@ -168,6 +168,14 @@ nsSMILCSSProperty::ValueFromString(const nsAString& aStr, nsSMILCSSValueType::ValueFromString(mPropID, mElement, aStr, aValue, &aPreventCachingOfSandwich); + + // XXX Due to bug 536660 (or at least that seems to be the most likely + // culprit), when we have animation setting display:none on a element, + // if we DON'T set the property every sample, chaos ensues. + if (!aPreventCachingOfSandwich && mPropID == eCSSProperty_display) { + aPreventCachingOfSandwich = PR_TRUE; + } + return aValue.IsNull() ? NS_ERROR_FAILURE : NS_OK; }