mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1010067 part 3 - Rename nsAnimation to mozilla::StyleAnimation; r=dbaron
This commit is contained in:
parent
4ae8f8c90d
commit
75ca3d0b5d
@ -387,7 +387,7 @@ nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
|
|||||||
TimeStamp now = mPresContext->RefreshDriver()->MostRecentRefresh();
|
TimeStamp now = mPresContext->RefreshDriver()->MostRecentRefresh();
|
||||||
for (uint32_t animIdx = 0, animEnd = disp->mAnimationNameCount;
|
for (uint32_t animIdx = 0, animEnd = disp->mAnimationNameCount;
|
||||||
animIdx != animEnd; ++animIdx) {
|
animIdx != animEnd; ++animIdx) {
|
||||||
const nsAnimation& src = disp->mAnimations[animIdx];
|
const StyleAnimation& src = disp->mAnimations[animIdx];
|
||||||
nsRefPtr<ElementAnimation> dest =
|
nsRefPtr<ElementAnimation> dest =
|
||||||
*aAnimations.AppendElement(new ElementAnimation());
|
*aAnimations.AppendElement(new ElementAnimation());
|
||||||
|
|
||||||
@ -565,7 +565,7 @@ bool
|
|||||||
nsAnimationManager::BuildSegment(InfallibleTArray<AnimationPropertySegment>&
|
nsAnimationManager::BuildSegment(InfallibleTArray<AnimationPropertySegment>&
|
||||||
aSegments,
|
aSegments,
|
||||||
nsCSSProperty aProperty,
|
nsCSSProperty aProperty,
|
||||||
const nsAnimation& aAnimation,
|
const StyleAnimation& aAnimation,
|
||||||
float aFromKey, nsStyleContext* aFromContext,
|
float aFromKey, nsStyleContext* aFromContext,
|
||||||
mozilla::css::Declaration* aFromDeclaration,
|
mozilla::css::Declaration* aFromDeclaration,
|
||||||
float aToKey, nsStyleContext* aToContext)
|
float aToKey, nsStyleContext* aToContext)
|
||||||
|
@ -153,7 +153,8 @@ private:
|
|||||||
mozilla::ElementAnimationPtrArray& aAnimations);
|
mozilla::ElementAnimationPtrArray& aAnimations);
|
||||||
bool BuildSegment(InfallibleTArray<mozilla::AnimationPropertySegment>&
|
bool BuildSegment(InfallibleTArray<mozilla::AnimationPropertySegment>&
|
||||||
aSegments,
|
aSegments,
|
||||||
nsCSSProperty aProperty, const nsAnimation& aAnimation,
|
nsCSSProperty aProperty,
|
||||||
|
const mozilla::StyleAnimation& aAnimation,
|
||||||
float aFromKey, nsStyleContext* aFromContext,
|
float aFromKey, nsStyleContext* aFromContext,
|
||||||
mozilla::css::Declaration* aFromDeclaration,
|
mozilla::css::Declaration* aFromDeclaration,
|
||||||
float aToKey, nsStyleContext* aToContext);
|
float aToKey, nsStyleContext* aToContext);
|
||||||
|
@ -5314,7 +5314,7 @@ nsComputedDOMStyle::DoGetAnimationName()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* property = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* property = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(property);
|
valueList->AppendCSSValue(property);
|
||||||
|
|
||||||
@ -5342,7 +5342,7 @@ nsComputedDOMStyle::DoGetAnimationDelay()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* delay = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* delay = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(delay);
|
valueList->AppendCSSValue(delay);
|
||||||
delay->SetTime((float)animation->GetDelay() / (float)PR_MSEC_PER_SEC);
|
delay->SetTime((float)animation->GetDelay() / (float)PR_MSEC_PER_SEC);
|
||||||
@ -5362,7 +5362,7 @@ nsComputedDOMStyle::DoGetAnimationDuration()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* duration = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* duration = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(duration);
|
valueList->AppendCSSValue(duration);
|
||||||
|
|
||||||
@ -5401,7 +5401,7 @@ nsComputedDOMStyle::DoGetAnimationDirection()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* direction = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* direction = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(direction);
|
valueList->AppendCSSValue(direction);
|
||||||
direction->SetIdent(
|
direction->SetIdent(
|
||||||
@ -5423,7 +5423,7 @@ nsComputedDOMStyle::DoGetAnimationFillMode()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* fillMode = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* fillMode = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(fillMode);
|
valueList->AppendCSSValue(fillMode);
|
||||||
fillMode->SetIdent(
|
fillMode->SetIdent(
|
||||||
@ -5445,7 +5445,7 @@ nsComputedDOMStyle::DoGetAnimationIterationCount()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* iterationCount = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* iterationCount = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(iterationCount);
|
valueList->AppendCSSValue(iterationCount);
|
||||||
|
|
||||||
@ -5479,7 +5479,7 @@ nsComputedDOMStyle::DoGetAnimationPlayState()
|
|||||||
"first item must be explicit");
|
"first item must be explicit");
|
||||||
uint32_t i = 0;
|
uint32_t i = 0;
|
||||||
do {
|
do {
|
||||||
const nsAnimation *animation = &display->mAnimations[i];
|
const StyleAnimation *animation = &display->mAnimations[i];
|
||||||
nsROCSSPrimitiveValue* playState = new nsROCSSPrimitiveValue;
|
nsROCSSPrimitiveValue* playState = new nsROCSSPrimitiveValue;
|
||||||
valueList->AppendCSSValue(playState);
|
valueList->AppendCSSValue(playState);
|
||||||
playState->SetIdent(
|
playState->SetIdent(
|
||||||
|
@ -4981,7 +4981,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct,
|
|||||||
|
|
||||||
// Fill in the animations we just allocated with the appropriate values.
|
// Fill in the animations we just allocated with the appropriate values.
|
||||||
for (uint32_t i = 0; i < numAnimations; ++i) {
|
for (uint32_t i = 0; i < numAnimations; ++i) {
|
||||||
nsAnimation *animation = &display->mAnimations[i];
|
StyleAnimation *animation = &display->mAnimations[i];
|
||||||
|
|
||||||
if (i >= animDelay.num) {
|
if (i >= animDelay.num) {
|
||||||
animation->SetDelay(display->mAnimations[i % animDelay.num].GetDelay());
|
animation->SetDelay(display->mAnimations[i % animDelay.num].GetDelay());
|
||||||
|
@ -2341,7 +2341,7 @@ void nsTransition::SetUnknownProperty(const nsAString& aUnknownProperty)
|
|||||||
mUnknownProperty = do_GetAtom(aUnknownProperty);
|
mUnknownProperty = do_GetAtom(aUnknownProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsAnimation::nsAnimation(const nsAnimation& aCopy)
|
mozilla::StyleAnimation::StyleAnimation(const mozilla::StyleAnimation& aCopy)
|
||||||
: mTimingFunction(aCopy.mTimingFunction)
|
: mTimingFunction(aCopy.mTimingFunction)
|
||||||
, mDuration(aCopy.mDuration)
|
, mDuration(aCopy.mDuration)
|
||||||
, mDelay(aCopy.mDelay)
|
, mDelay(aCopy.mDelay)
|
||||||
@ -2354,7 +2354,7 @@ nsAnimation::nsAnimation(const nsAnimation& aCopy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
nsAnimation::SetInitialValues()
|
mozilla::StyleAnimation::SetInitialValues()
|
||||||
{
|
{
|
||||||
mTimingFunction = nsTimingFunction(NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE);
|
mTimingFunction = nsTimingFunction(NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE);
|
||||||
mDuration = 0.0;
|
mDuration = 0.0;
|
||||||
|
@ -1850,9 +1850,11 @@ private:
|
|||||||
// eCSSProperty_UNKNOWN
|
// eCSSProperty_UNKNOWN
|
||||||
};
|
};
|
||||||
|
|
||||||
struct nsAnimation {
|
namespace mozilla {
|
||||||
nsAnimation() { /* leaves uninitialized; see also SetInitialValues */ }
|
|
||||||
explicit nsAnimation(const nsAnimation& aCopy);
|
struct StyleAnimation {
|
||||||
|
StyleAnimation() { /* leaves uninitialized; see also SetInitialValues */ }
|
||||||
|
explicit StyleAnimation(const StyleAnimation& aCopy);
|
||||||
|
|
||||||
void SetInitialValues();
|
void SetInitialValues();
|
||||||
|
|
||||||
@ -1891,6 +1893,8 @@ private:
|
|||||||
float mIterationCount; // mozilla::PositiveInfinity<float>() means infinite
|
float mIterationCount; // mozilla::PositiveInfinity<float>() means infinite
|
||||||
};
|
};
|
||||||
|
|
||||||
|
} // namespace mozilla
|
||||||
|
|
||||||
struct nsStyleDisplay {
|
struct nsStyleDisplay {
|
||||||
nsStyleDisplay();
|
nsStyleDisplay();
|
||||||
nsStyleDisplay(const nsStyleDisplay& aOther);
|
nsStyleDisplay(const nsStyleDisplay& aOther);
|
||||||
@ -1976,7 +1980,7 @@ struct nsStyleDisplay {
|
|||||||
mTransitionDelayCount,
|
mTransitionDelayCount,
|
||||||
mTransitionPropertyCount;
|
mTransitionPropertyCount;
|
||||||
|
|
||||||
nsAutoTArray<nsAnimation, 1> mAnimations; // [reset]
|
nsAutoTArray<mozilla::StyleAnimation, 1> mAnimations; // [reset]
|
||||||
// The number of elements in mAnimations that are not from repeating
|
// The number of elements in mAnimations that are not from repeating
|
||||||
// a list due to another property being longer.
|
// a list due to another property being longer.
|
||||||
uint32_t mAnimationTimingFunctionCount,
|
uint32_t mAnimationTimingFunctionCount,
|
||||||
|
Loading…
Reference in New Issue
Block a user