Bug 1273706 - Part 11: Have StyleAnimationValue::UncomputeValue(..., nsCSSValue) uncompute UnparsedStrings to token stream nsCSSValues.
UncomputeValue(..., nsAString) already uncomputes these to strings.
A later patch in this series uses unparsed strings to represent
non-interpolable but animatable custom properties that don't require additional
context (URL values require a principal, and StyleAnimationValue provides a URL
type).
MozReview-Commit-ID: ERHLMPCfFVF
--- a/layout/style/StyleAnimationValue.cpp
+++ b/layout/style/StyleAnimationValue.cpp
@@ -21,16 +21,17 @@
#include "nsStyleSet.h"
#include "nsComputedDOMStyle.h"
#include "nsCSSParser.h"
#include "nsCSSPseudoElements.h"
#include "mozilla/css/Declaration.h"
#include "mozilla/dom/Element.h"
#include "mozilla/FloatingPoint.h"
#include "mozilla/Likely.h"
+#include "mozilla/RefPtr.h"
#include "gfxMatrix.h"
#include "gfxQuaternion.h"
#include "nsIDocument.h"
#include "nsIFrame.h"
#include "gfx2DGlue.h"
using namespace mozilla;
using namespace mozilla::gfx;
@@ -3174,16 +3175,23 @@ StyleAnimationValue::UncomputeValue(nsCS
toList->mValue = value;
if (i != fromList->Length() - 1) {
toList->mNext = new nsCSSValueList;
toList = toList->mNext;
}
}
break;
}
+ case eUnit_UnparsedString: {
+ RefPtr<nsCSSValueTokenStream> value = new nsCSSValueTokenStream;
+ value->mPropertyID = aProperty;
+ aComputedValue.GetStringValue(value->mTokenStream);
+ aSpecifiedValue.SetTokenStreamValue(value);
+ break;
+ }
default:
return false;
}
return true;
}
bool
StyleAnimationValue::UncomputeValue(nsCSSPropertyID aProperty,