зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1433008 - Make AnimationEventInfo, InternalTransitionEvent and InternalAnimationEvent movable. r=masayuki
And disallow using copy constructor and copy assignment for the structs. MozReview-Commit-ID: 7jSktlu1SqN --HG-- extra : rebase_source : cc8bcb1f95843a2a46a044e226c299a6196ef2a2
This commit is contained in:
Родитель
2e4cb19d33
Коммит
eeefe00d01
|
@ -73,13 +73,10 @@ struct AnimationEventInfo
|
|||
nsCSSPseudoElements::PseudoTypeAsString(aTarget.mPseudoType);
|
||||
}
|
||||
|
||||
// InternalAnimationEvent and InternalTransitionEvent don't support
|
||||
// copy-construction, so we need to ourselves in order to work with nsTArray.
|
||||
//
|
||||
// FIXME: Drop this copy constructor and copy assignment below once
|
||||
// WidgetEvent have move constructor and move assignment (bug 1433008).
|
||||
AnimationEventInfo(const AnimationEventInfo& aOther) = default;
|
||||
AnimationEventInfo& operator=(const AnimationEventInfo& aOther) = default;
|
||||
AnimationEventInfo(const AnimationEventInfo& aOther) = delete;
|
||||
AnimationEventInfo& operator=(const AnimationEventInfo& aOther) = delete;
|
||||
AnimationEventInfo(AnimationEventInfo&& aOther) = default;
|
||||
AnimationEventInfo& operator=(AnimationEventInfo&& aOther) = default;
|
||||
|
||||
WidgetEvent* AsWidgetEvent()
|
||||
{
|
||||
|
|
|
@ -242,6 +242,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
InternalTransitionEvent(const InternalTransitionEvent& aOther) = delete;
|
||||
InternalTransitionEvent& operator=(const InternalTransitionEvent& aOther) = delete;
|
||||
InternalTransitionEvent(InternalTransitionEvent&& aOther) = default;
|
||||
InternalTransitionEvent& operator=(InternalTransitionEvent&& aOther) = default;
|
||||
|
||||
virtual WidgetEvent* Duplicate() const override
|
||||
{
|
||||
MOZ_ASSERT(mClass == eTransitionEventClass,
|
||||
|
@ -286,6 +291,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
InternalAnimationEvent(const InternalAnimationEvent& aOther) = delete;
|
||||
InternalAnimationEvent& operator=(const InternalAnimationEvent& aOther) = delete;
|
||||
InternalAnimationEvent(InternalAnimationEvent&& aOther) = default;
|
||||
InternalAnimationEvent& operator=(InternalAnimationEvent&& aOther) = default;
|
||||
|
||||
virtual WidgetEvent* Duplicate() const override
|
||||
{
|
||||
MOZ_ASSERT(mClass == eAnimationEventClass,
|
||||
|
|
Загрузка…
Ссылка в новой задаче