Bug 1335942 - Part 6: Implement GetScaleValue for RawServoAnimationValue. r=hiro,manishearth

MozReview-Commit-ID: GnaS44gWmm2

--HG--
extra : rebase_source : 58ee6837c730fd7e54b75e52e48b3f77c8cb805a
This commit is contained in:
Boris Chiou 2017-02-06 17:54:49 +08:00
parent 93878e807e
commit 8372c2c7f8
2 changed files with 6 additions and 2 deletions

View File

@ -14,7 +14,6 @@
#include "mozilla/StyleSetHandleInlines.h"
#include "mozilla/Tuple.h"
#include "mozilla/UniquePtr.h"
#include "nsStyleTransformMatrix.h"
#include "nsAutoPtr.h"
#include "nsCOMArray.h"
#include "nsIStyleRule.h"

View File

@ -18,6 +18,7 @@
#include "nsCSSProps.h"
#include "nsCSSValue.h"
#include "nsStyleCoord.h"
#include "nsStyleTransformMatrix.h"
#include "ServoBindings.h"
class nsIFrame;
@ -603,7 +604,11 @@ struct AnimationValue
// Returns the scale for mGecko or mServo, which are calculated with
// reference to aFrame.
gfxSize GetScaleValue(const nsIFrame* aFrame) const {
// TODO: GetScaleValue for mServo.
if (mServo) {
RefPtr<nsCSSValueSharedList> list;
Servo_AnimationValues_GetTransform(mServo, &list);
return nsStyleTransformMatrix::GetScaleValue(list, aFrame);
}
return mGecko.GetScaleValue(aFrame);
}
};