зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 99d1cfef2722 (bug 1180125)
This commit is contained in:
Родитель
9bcc565b94
Коммит
07dfeb20bd
|
@ -12,6 +12,7 @@
|
|||
|
||||
#include "nsIContent.h"
|
||||
#include "nsStyleContext.h"
|
||||
#include "nsCSSProps.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
|
@ -19,6 +20,7 @@
|
|||
#include "nsRuleWalker.h"
|
||||
#include "nsCSSPropertySet.h"
|
||||
#include "mozilla/EventDispatcher.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/StyleAnimationValue.h"
|
||||
#include "mozilla/dom/DocumentTimeline.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
|
@ -845,6 +847,33 @@ nsTransitionManager::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
|||
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
||||
struct TransitionEventInfo {
|
||||
nsCOMPtr<nsIContent> mElement;
|
||||
InternalTransitionEvent mEvent;
|
||||
|
||||
TransitionEventInfo(nsIContent *aElement, nsCSSProperty aProperty,
|
||||
TimeDuration aDuration,
|
||||
nsCSSPseudoElements::Type aPseudoType)
|
||||
: mElement(aElement)
|
||||
, mEvent(true, NS_TRANSITION_END)
|
||||
{
|
||||
// XXX Looks like nobody initialize WidgetEvent::time
|
||||
mEvent.propertyName =
|
||||
NS_ConvertUTF8toUTF16(nsCSSProps::GetStringValue(aProperty));
|
||||
mEvent.elapsedTime = aDuration.ToSeconds();
|
||||
mEvent.pseudoElement = AnimationCollection::PseudoTypeAsString(aPseudoType);
|
||||
}
|
||||
|
||||
// InternalTransitionEvent doesn't support copy-construction, so we need
|
||||
// to ourselves in order to work with nsTArray
|
||||
TransitionEventInfo(const TransitionEventInfo &aOther)
|
||||
: mElement(aOther.mElement)
|
||||
, mEvent(true, NS_TRANSITION_END)
|
||||
{
|
||||
mEvent.AssignTransitionEventData(aOther.mEvent, false);
|
||||
}
|
||||
};
|
||||
|
||||
/* virtual */ void
|
||||
nsTransitionManager::WillRefresh(mozilla::TimeStamp aTime)
|
||||
{
|
||||
|
|
|
@ -9,12 +9,10 @@
|
|||
#define nsTransitionManager_h_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/MemoryReporting.h"
|
||||
#include "mozilla/dom/Animation.h"
|
||||
#include "mozilla/dom/KeyframeEffect.h"
|
||||
#include "AnimationCommon.h"
|
||||
#include "nsCSSProps.h"
|
||||
#include "nsCSSPseudoElements.h"
|
||||
|
||||
class nsIGlobalObject;
|
||||
|
@ -172,34 +170,6 @@ protected:
|
|||
};
|
||||
|
||||
} // namespace dom
|
||||
|
||||
struct TransitionEventInfo {
|
||||
nsCOMPtr<nsIContent> mElement;
|
||||
InternalTransitionEvent mEvent;
|
||||
|
||||
TransitionEventInfo(nsIContent *aElement, nsCSSProperty aProperty,
|
||||
TimeDuration aDuration,
|
||||
nsCSSPseudoElements::Type aPseudoType)
|
||||
: mElement(aElement)
|
||||
, mEvent(true, NS_TRANSITION_END)
|
||||
{
|
||||
// XXX Looks like nobody initialize WidgetEvent::time
|
||||
mEvent.propertyName =
|
||||
NS_ConvertUTF8toUTF16(nsCSSProps::GetStringValue(aProperty));
|
||||
mEvent.elapsedTime = aDuration.ToSeconds();
|
||||
mEvent.pseudoElement = AnimationCollection::PseudoTypeAsString(aPseudoType);
|
||||
}
|
||||
|
||||
// InternalTransitionEvent doesn't support copy-construction, so we need
|
||||
// to ourselves in order to work with nsTArray
|
||||
TransitionEventInfo(const TransitionEventInfo &aOther)
|
||||
: mElement(aOther.mElement)
|
||||
, mEvent(true, NS_TRANSITION_END)
|
||||
{
|
||||
mEvent.AssignTransitionEventData(aOther.mEvent, false);
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
class nsTransitionManager final
|
||||
|
|
Загрузка…
Ссылка в новой задаче