mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 14:30:27 +00:00
98491d0687
- Bug 382721 - Part 1: Fix spacing of simple 2px dotted border without radius. r=jrmuizel (8e83589f45)
- Bug 382721 - Part 2: Split constants for border rendering to BorderConsts.h. r=jrmuizel (88ae5aee7f)
- Bug 1237805 part 1 - [css-grid] Remove all empty 'auto-fit' tracks, not just those at the end. r=dholbert (1c0530b87b)
- Bug 1237805 part 2 - [css-grid] 'auto-fit' reftest removing empty start/middle tracks. (3bfc688e2b)
- Bug 1239036 - [css-grid] Deal with implicit tracks when computing grid-template-{columns,rows}. r=dholbert (cf36d9193a)
- Bug 1239036 - [css-grid] Tests. (4aaec0499f)
- Bug 1238294 part 1 - [css-grid] Make GridLineEdge() a method on the Tracks class rather than a static function (idempotent change). r=dholbert (ab81994ec6)
- Bug 1238294 part 2 - [css-grid] Treat any gaps at the grid edges as "line thickness" so they behave the same as gaps between tracks for positioning areas. r=dholbert (fafdc1ceef)
- Bug 1230695 - [css-grid] More abs.pos. grid alignment reftests. (330770cf1a)
- Bug 1238294 part 3 - [css-grid] Add/tweak reftests for new behavior of gaps at the grid edges. (58ff8670a1)
- Bug 1240795 - [css-grid] Refactor GetComputedTemplateColumns/Rows to return a self-contained value. r=dholbert (9c5e68418f)
- Bug 1229739 - Use the color of shadow if available for drawing emphasis marks in shadow. r=jfkthame (c19c3deb1c)
- Bug 1191597 part 3 - Convert fullscreen-api-keys to a browser chrome test. r=smaug (ad740d4c4c)
- Bug 1174575 - Part 1: Define CSSPseudoElement interface. r=birtles, r=smaug (1a304d59c4)
- Bug 1214536 - Part 1: Use unrestricted double for iterations. r=birtles (0dbb02e423)
- Bug 1214536 - Part 2: Replace mIterationCount in layers::Animation. r=birtles (8a573046f5)
- Bug 1214536 - Part 3: Store the original value of fill. r=birtles (df548c244a)
- Bug 1214536 - Part 4: Use OwingUnrestrictedDoubleOrString for duration. r=birtles (567cfd1555)
- Bug 1214536 - Part 5: Add AnimationEffectTimingReadOnly interface. r=birtles, r=smaug (47138ec7f0)
- Bug 1214536 - Part 6: Revise AnimationTiming::operator==. r=birtles (616fc2c711)
- Bug 1214536 - Part 7: Rename AnimationTiming as TimingParams. r=birtles, r=smaug (d7de0ec72b)
- Bug 1214536 - Part 8: Add an operator=() for TimingParams. r=birtles (bfe22c6501)
- Bug 1215406 - Part 6: Test. r=birtles (3f16796304)
- Bug 1214536 - Part 9: Test. r=birtles (526419cc1d)
- Bug 1147673 - Unadjust clip before intersecting it with the scroll clip. r=botond (85cd06d2d5)
- Bug 1147673 - Determine more accurately whether an async transform affects a layer's clip rect. r=kats (8ce7d1e887)
- Bug 1096773 part 1 - Make the frames argument to the KeyframeEffectReadOnly constructor NOT optional; r=bz (6e63b08671)
- Bug 1096773 part 2 - Add a KeyframeEffectReadOnly constructor that takes a TimingParams argument; r=boris (24971306e6)
- Bug 1096773 part 3 - Implement Animatable.animate(); r=bz (9d95ea800e)
- Bug 1096773 part 4 - Add tests for Animatable.animate(); r=bz (03b866b2d8)
- Bug 1179627 - Part 1: Implement Animation.id. r=smaug, r=birtles (51bbed6e9d)
- Bug 1096774 - Part 1: Implement Animation Constructor. r=birtles, r=smaug (e09d7fbd7c)
- Bug 1179627 - Part 2: Add animation.id for CSS animations test files. r=bbirtles, r=hiikezoe (329ea31f33)
- Bug 1096774 - Part 2: Fix crash if animation has no timeline. r=birtles (d989b44866)
- Bug 1096774 - Part 3: Tests for Animation Contructor. r=birtles (23786774bc)
- Bug 1240265 - Annotate intentional switch fallthroughs in dom/. r=mrbkap (ffd9da3d5f)
- Bug 1227458. Make setAttributeNode be an alias for setAttributeNodeNS and setNamedItem on the attribute map be an alias for setNamedItemNS. r=smaug (f804d28b93)
- Bug 1226091 - Use MayHaveAnimations in Element::UnbindFromTree; r=smaug (1ec85f75b3)
89 lines
2.9 KiB
C++
89 lines
2.9 KiB
C++
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#include "mozilla/dom/AnimationEffectTimingReadOnly.h"
|
|
|
|
#include "mozilla/dom/AnimatableBinding.h"
|
|
#include "mozilla/dom/AnimationEffectTimingReadOnlyBinding.h"
|
|
#include "mozilla/dom/KeyframeEffectBinding.h"
|
|
|
|
namespace mozilla {
|
|
|
|
TimingParams::TimingParams(const dom::AnimationEffectTimingProperties& aRhs)
|
|
: mDuration(aRhs.mDuration)
|
|
, mDelay(TimeDuration::FromMilliseconds(aRhs.mDelay))
|
|
, mIterations(aRhs.mIterations)
|
|
, mDirection(aRhs.mDirection)
|
|
, mFill(aRhs.mFill)
|
|
{
|
|
}
|
|
|
|
TimingParams::TimingParams(double aDuration)
|
|
{
|
|
mDuration.SetAsUnrestrictedDouble() = aDuration;
|
|
}
|
|
|
|
/* static */ TimingParams
|
|
TimingParams::FromOptionsUnion(
|
|
const dom::UnrestrictedDoubleOrKeyframeEffectOptions& aOptions)
|
|
{
|
|
if (aOptions.IsUnrestrictedDouble()) {
|
|
return TimingParams(aOptions.GetAsUnrestrictedDouble());
|
|
} else {
|
|
MOZ_ASSERT(aOptions.IsKeyframeEffectOptions());
|
|
return TimingParams(aOptions.GetAsKeyframeEffectOptions());
|
|
}
|
|
}
|
|
|
|
/* static */ TimingParams
|
|
TimingParams::FromOptionsUnion(
|
|
const dom::UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions)
|
|
{
|
|
if (aOptions.IsUnrestrictedDouble()) {
|
|
return TimingParams(aOptions.GetAsUnrestrictedDouble());
|
|
} else {
|
|
MOZ_ASSERT(aOptions.IsKeyframeAnimationOptions());
|
|
return TimingParams(aOptions.GetAsKeyframeAnimationOptions());
|
|
}
|
|
}
|
|
|
|
bool
|
|
TimingParams::operator==(const TimingParams& aOther) const
|
|
{
|
|
bool durationEqual;
|
|
if (mDuration.IsUnrestrictedDouble()) {
|
|
durationEqual = aOther.mDuration.IsUnrestrictedDouble() &&
|
|
(mDuration.GetAsUnrestrictedDouble() ==
|
|
aOther.mDuration.GetAsUnrestrictedDouble());
|
|
} else {
|
|
// We consider all string values and uninitialized values as meaning "auto".
|
|
// Since mDuration is either a string or uninitialized, we consider it equal
|
|
// if aOther.mDuration is also either a string or uninitialized.
|
|
durationEqual = !aOther.mDuration.IsUnrestrictedDouble();
|
|
}
|
|
return durationEqual &&
|
|
mDelay == aOther.mDelay &&
|
|
mIterations == aOther.mIterations &&
|
|
mDirection == aOther.mDirection &&
|
|
mFill == aOther.mFill;
|
|
}
|
|
|
|
namespace dom {
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationEffectTimingReadOnly, mParent)
|
|
|
|
NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnimationEffectTimingReadOnly, AddRef)
|
|
NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnimationEffectTimingReadOnly, Release)
|
|
|
|
JSObject*
|
|
AnimationEffectTimingReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
|
{
|
|
return AnimationEffectTimingReadOnlyBinding::Wrap(aCx, this, aGivenProto);
|
|
}
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|