mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1010067 part 4 - Rename nsTransition to mozilla::StyleTransition; r=dbaron
This commit is contained in:
parent
75ca3d0b5d
commit
0771a7d9a4
@ -5189,7 +5189,7 @@ nsComputedDOMStyle::DoGetTransitionDelay()
|
||||
"first item must be explicit");
|
||||
uint32_t i = 0;
|
||||
do {
|
||||
const nsTransition *transition = &display->mTransitions[i];
|
||||
const StyleTransition *transition = &display->mTransitions[i];
|
||||
nsROCSSPrimitiveValue* delay = new nsROCSSPrimitiveValue;
|
||||
valueList->AppendCSSValue(delay);
|
||||
delay->SetTime((float)transition->GetDelay() / (float)PR_MSEC_PER_SEC);
|
||||
@ -5209,7 +5209,7 @@ nsComputedDOMStyle::DoGetTransitionDuration()
|
||||
"first item must be explicit");
|
||||
uint32_t i = 0;
|
||||
do {
|
||||
const nsTransition *transition = &display->mTransitions[i];
|
||||
const StyleTransition *transition = &display->mTransitions[i];
|
||||
nsROCSSPrimitiveValue* duration = new nsROCSSPrimitiveValue;
|
||||
valueList->AppendCSSValue(duration);
|
||||
|
||||
@ -5230,7 +5230,7 @@ nsComputedDOMStyle::DoGetTransitionProperty()
|
||||
"first item must be explicit");
|
||||
uint32_t i = 0;
|
||||
do {
|
||||
const nsTransition *transition = &display->mTransitions[i];
|
||||
const StyleTransition *transition = &display->mTransitions[i];
|
||||
nsROCSSPrimitiveValue* property = new nsROCSSPrimitiveValue;
|
||||
valueList->AppendCSSValue(property);
|
||||
nsCSSProperty cssprop = transition->GetProperty();
|
||||
|
@ -4824,7 +4824,7 @@ nsRuleNode::ComputeDisplayData(void* aStartStruct,
|
||||
|
||||
// Fill in the transitions we just allocated with the appropriate values.
|
||||
for (uint32_t i = 0; i < numTransitions; ++i) {
|
||||
nsTransition *transition = &display->mTransitions[i];
|
||||
StyleTransition *transition = &display->mTransitions[i];
|
||||
|
||||
if (i >= delay.num) {
|
||||
transition->SetDelay(display->mTransitions[i % delay.num].GetDelay());
|
||||
|
@ -2314,7 +2314,7 @@ void nsTimingFunction::AssignFromKeyword(int32_t aTimingFunctionType)
|
||||
mFunc.mY2 = timingFunctionValues[aTimingFunctionType][3];
|
||||
}
|
||||
|
||||
nsTransition::nsTransition(const nsTransition& aCopy)
|
||||
mozilla::StyleTransition::StyleTransition(const StyleTransition& aCopy)
|
||||
: mTimingFunction(aCopy.mTimingFunction)
|
||||
, mDuration(aCopy.mDuration)
|
||||
, mDelay(aCopy.mDelay)
|
||||
@ -2323,7 +2323,8 @@ nsTransition::nsTransition(const nsTransition& aCopy)
|
||||
{
|
||||
}
|
||||
|
||||
void nsTransition::SetInitialValues()
|
||||
void
|
||||
mozilla::StyleTransition::SetInitialValues()
|
||||
{
|
||||
mTimingFunction = nsTimingFunction(NS_STYLE_TRANSITION_TIMING_FUNCTION_EASE);
|
||||
mDuration = 0.0;
|
||||
@ -2331,7 +2332,8 @@ void nsTransition::SetInitialValues()
|
||||
mProperty = eCSSPropertyExtra_all_properties;
|
||||
}
|
||||
|
||||
void nsTransition::SetUnknownProperty(const nsAString& aUnknownProperty)
|
||||
void
|
||||
mozilla::StyleTransition::SetUnknownProperty(const nsAString& aUnknownProperty)
|
||||
{
|
||||
NS_ASSERTION(nsCSSProps::LookupProperty(aUnknownProperty,
|
||||
nsCSSProps::eEnabledForAllContent) ==
|
||||
|
@ -1809,9 +1809,11 @@ private:
|
||||
void AssignFromKeyword(int32_t aTimingFunctionType);
|
||||
};
|
||||
|
||||
struct nsTransition {
|
||||
nsTransition() { /* leaves uninitialized; see also SetInitialValues */ }
|
||||
explicit nsTransition(const nsTransition& aCopy);
|
||||
namespace mozilla {
|
||||
|
||||
struct StyleTransition {
|
||||
StyleTransition() { /* leaves uninitialized; see also SetInitialValues */ }
|
||||
explicit StyleTransition(const StyleTransition& aCopy);
|
||||
|
||||
void SetInitialValues();
|
||||
|
||||
@ -1833,7 +1835,7 @@ struct nsTransition {
|
||||
mProperty = aProperty;
|
||||
}
|
||||
void SetUnknownProperty(const nsAString& aUnknownProperty);
|
||||
void CopyPropertyFrom(const nsTransition& aOther)
|
||||
void CopyPropertyFrom(const StyleTransition& aOther)
|
||||
{
|
||||
mProperty = aOther.mProperty;
|
||||
mUnknownProperty = aOther.mUnknownProperty;
|
||||
@ -1850,8 +1852,6 @@ private:
|
||||
// eCSSProperty_UNKNOWN
|
||||
};
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
struct StyleAnimation {
|
||||
StyleAnimation() { /* leaves uninitialized; see also SetInitialValues */ }
|
||||
explicit StyleAnimation(const StyleAnimation& aCopy);
|
||||
@ -1972,7 +1972,7 @@ struct nsStyleDisplay {
|
||||
nsStyleCoord mChildPerspective; // [reset] coord
|
||||
nsStyleCoord mPerspectiveOrigin[2]; // [reset] percent, coord, calc
|
||||
|
||||
nsAutoTArray<nsTransition, 1> mTransitions; // [reset]
|
||||
nsAutoTArray<mozilla::StyleTransition, 1> mTransitions; // [reset]
|
||||
// The number of elements in mTransitions that are not from repeating
|
||||
// a list due to another property being longer.
|
||||
uint32_t mTransitionTimingFunctionCount,
|
||||
|
@ -229,7 +229,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
||||
bool startedAny = false;
|
||||
nsCSSPropertySet whichStarted;
|
||||
for (uint32_t i = disp->mTransitionPropertyCount; i-- != 0; ) {
|
||||
const nsTransition& t = disp->mTransitions[i];
|
||||
const StyleTransition& t = disp->mTransitions[i];
|
||||
// Check delay and duration first, since they default to zero, and
|
||||
// when they're both zero, we can ignore the transition.
|
||||
if (t.GetDelay() != 0.0f || t.GetDuration() != 0.0f) {
|
||||
@ -275,7 +275,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
||||
nsCSSPropertySet allTransitionProperties;
|
||||
if (checkProperties) {
|
||||
for (uint32_t i = disp->mTransitionPropertyCount; i-- != 0; ) {
|
||||
const nsTransition& t = disp->mTransitions[i];
|
||||
const StyleTransition& t = disp->mTransitions[i];
|
||||
// FIXME: Would be good to find a way to share code between this
|
||||
// interpretation of transition-property and the one above.
|
||||
nsCSSProperty property = t.GetProperty();
|
||||
@ -376,14 +376,15 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
||||
}
|
||||
|
||||
void
|
||||
nsTransitionManager::ConsiderStartingTransition(nsCSSProperty aProperty,
|
||||
const nsTransition& aTransition,
|
||||
dom::Element* aElement,
|
||||
CommonElementAnimationData*& aElementTransitions,
|
||||
nsStyleContext* aOldStyleContext,
|
||||
nsStyleContext* aNewStyleContext,
|
||||
bool* aStartedAny,
|
||||
nsCSSPropertySet* aWhichStarted)
|
||||
nsTransitionManager::ConsiderStartingTransition(
|
||||
nsCSSProperty aProperty,
|
||||
const StyleTransition& aTransition,
|
||||
dom::Element* aElement,
|
||||
CommonElementAnimationData*& aElementTransitions,
|
||||
nsStyleContext* aOldStyleContext,
|
||||
nsStyleContext* aNewStyleContext,
|
||||
bool* aStartedAny,
|
||||
nsCSSPropertySet* aWhichStarted)
|
||||
{
|
||||
// IsShorthand itself will assert if aProperty is not a property.
|
||||
NS_ABORT_IF_FALSE(!nsCSSProps::IsShorthand(aProperty),
|
||||
|
@ -16,9 +16,12 @@
|
||||
class nsStyleContext;
|
||||
class nsPresContext;
|
||||
class nsCSSPropertySet;
|
||||
struct nsTransition;
|
||||
struct ElementDependentRuleProcessorData;
|
||||
|
||||
namespace mozilla {
|
||||
struct StyleTransition;
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* Per-Element data *
|
||||
*****************************************************************************/
|
||||
@ -156,7 +159,7 @@ protected:
|
||||
|
||||
private:
|
||||
void ConsiderStartingTransition(nsCSSProperty aProperty,
|
||||
const nsTransition& aTransition,
|
||||
const mozilla::StyleTransition& aTransition,
|
||||
mozilla::dom::Element* aElement,
|
||||
CommonElementAnimationData*& aElementTransitions,
|
||||
nsStyleContext* aOldStyleContext,
|
||||
|
Loading…
Reference in New Issue
Block a user