mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1440195 Address CSS Animations r=birtles
For now, we are going to make _all_ CSS Animations related timer fuzzing only applicable in Resist Fingerprinting Mode (addressing the last couple that had not already been configured that way.) We hardcode their content mix-ins as zero, but leave comments indicating how they should behave. MozReview-Commit-ID: KhmV7wO8Pt5 --HG-- extra : rebase_source : 3b087d40b6332d447b442b435ed6fee8993e0145
This commit is contained in:
parent
6ebcecc30e
commit
88fc3fb4ea
@ -32,8 +32,12 @@ public:
|
||||
dom::Nullable<double> result;
|
||||
|
||||
if (!aTime.IsNull()) {
|
||||
// 0 is an inappropriate mixin for this this area; however CSS Animations needs to
|
||||
// have it's Time Reduction Logic refactored, so it's currently only clamping for
|
||||
// RFP mode. RFP mode gives a much lower time precision, so we accept the security
|
||||
// leak here for now
|
||||
result.SetValue(
|
||||
nsRFPService::ReduceTimePrecisionAsMSecs(aTime.Value().ToMilliseconds(), TimerPrecisionType::RFPOnly)
|
||||
nsRFPService::ReduceTimePrecisionAsMSecs(aTime.Value().ToMilliseconds(), 0, TimerPrecisionType::RFPOnly)
|
||||
);
|
||||
}
|
||||
|
||||
|
7
layout/style/nsAnimationManager.cpp
Normal file → Executable file
7
layout/style/nsAnimationManager.cpp
Normal file → Executable file
@ -246,7 +246,12 @@ CSSAnimation::QueueEvents(const StickyTimeDuration& aActiveTime)
|
||||
const TimeStamp& aTimeStamp) {
|
||||
double elapsedTime = aElapsedTime.ToSeconds();
|
||||
if (aMessage == eAnimationCancel) {
|
||||
elapsedTime = nsRFPService::ReduceTimePrecisionAsSecs(elapsedTime);
|
||||
// 0 is an inappropriate value for this callsite. What we need to do is
|
||||
// use a single random value for all increasing times reportable.
|
||||
// That is to say, whenever elapsedTime goes negative (because an
|
||||
// animation restarts, something rewinds the animation, or otherwise)
|
||||
// a new random value for the mix-in must be generated.
|
||||
elapsedTime = nsRFPService::ReduceTimePrecisionAsSecs(elapsedTime, 0, TimerPrecisionType::RFPOnly);
|
||||
}
|
||||
events.AppendElement(AnimationEventInfo(mAnimationName,
|
||||
mOwningElement.Target(),
|
||||
|
7
layout/style/nsTransitionManager.cpp
Normal file → Executable file
7
layout/style/nsTransitionManager.cpp
Normal file → Executable file
@ -267,7 +267,12 @@ CSSTransition::QueueEvents(const StickyTimeDuration& aActiveTime)
|
||||
const TimeStamp& aTimeStamp) {
|
||||
double elapsedTime = aElapsedTime.ToSeconds();
|
||||
if (aMessage == eTransitionCancel) {
|
||||
elapsedTime = nsRFPService::ReduceTimePrecisionAsSecs(elapsedTime);
|
||||
// 0 is an inappropriate value for this callsite. What we need to do is
|
||||
// use a single random value for all increasing times reportable.
|
||||
// That is to say, whenever elapsedTime goes negative (because an
|
||||
// animation restarts, something rewinds the animation, or otherwise)
|
||||
// a new random value for the mix-in must be generated.
|
||||
elapsedTime = nsRFPService::ReduceTimePrecisionAsSecs(elapsedTime, 0, TimerPrecisionType::RFPOnly);
|
||||
}
|
||||
events.AppendElement(AnimationEventInfo(TransitionProperty(),
|
||||
mOwningElement.Target(),
|
||||
|
Loading…
Reference in New Issue
Block a user