зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1435666 - Part 2: Remove nsIDOMTimeEvent. r=bz
MozReview-Commit-ID: F2fYWhUKzyp --HG-- extra : rebase_source : 4dc8397fe050262463d37a9829130c0af707f4ba
This commit is contained in:
Родитель
a3eee241b4
Коммит
70af884bbd
|
@ -703,7 +703,6 @@
|
|||
|
||||
; svg
|
||||
@RESPATH@/res/svg.css
|
||||
@RESPATH@/components/dom_smil.xpt
|
||||
|
||||
; [Personal Security Manager]
|
||||
;
|
||||
|
|
|
@ -34,6 +34,7 @@ class EventMessageAutoOverride;
|
|||
// ExtendableEvent is a ServiceWorker event that is not
|
||||
// autogenerated since it has some extra methods.
|
||||
class ExtendableEvent;
|
||||
class TimeEvent;
|
||||
class WantsPopupControlCheck;
|
||||
#define GENERATED_EVENT(EventClass_) class EventClass_;
|
||||
#include "mozilla/dom/GeneratedEventList.h"
|
||||
|
@ -109,6 +110,8 @@ public:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
virtual TimeEvent* AsTimeEvent() { return nullptr; }
|
||||
|
||||
// nsIDOMEvent Interface
|
||||
NS_DECL_NSIDOMEVENT
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
with Files("**"):
|
||||
BUG_COMPONENT = ("Core", "SVG")
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIDOMTimeEvent.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'dom_smil'
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 "nsIDOMEvent.idl"
|
||||
|
||||
/**
|
||||
* The SMIL TimeEvent interface.
|
||||
*
|
||||
* For more information please refer to:
|
||||
* http://www.w3.org/TR/SMIL/smil-timing.html#Events-TimeEvent
|
||||
* http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent
|
||||
*/
|
||||
|
||||
[builtinclass, uuid(b5e7fbac-f572-426c-9320-0ef7630f03c1)]
|
||||
interface nsIDOMTimeEvent : nsIDOMEvent
|
||||
{
|
||||
readonly attribute long detail;
|
||||
};
|
|
@ -29,7 +29,6 @@ interfaces = [
|
|||
'offline',
|
||||
'geolocation',
|
||||
'notification',
|
||||
'smil',
|
||||
'push',
|
||||
'payments',
|
||||
]
|
||||
|
|
|
@ -38,19 +38,7 @@ TimeEvent::TimeEvent(EventTarget* aOwner,
|
|||
NS_IMPL_CYCLE_COLLECTION_INHERITED(TimeEvent, Event,
|
||||
mView)
|
||||
|
||||
NS_IMPL_ADDREF_INHERITED(TimeEvent, Event)
|
||||
NS_IMPL_RELEASE_INHERITED(TimeEvent, Event)
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TimeEvent)
|
||||
NS_INTERFACE_MAP_ENTRY(nsIDOMTimeEvent)
|
||||
NS_INTERFACE_MAP_END_INHERITING(Event)
|
||||
|
||||
NS_IMETHODIMP
|
||||
TimeEvent::GetDetail(int32_t* aDetail)
|
||||
{
|
||||
*aDetail = mDetail;
|
||||
return NS_OK;
|
||||
}
|
||||
NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED_0(TimeEvent, Event)
|
||||
|
||||
void
|
||||
TimeEvent::InitTimeEvent(const nsAString& aType, nsGlobalWindowInner* aView,
|
||||
|
|
|
@ -9,15 +9,13 @@
|
|||
|
||||
#include "mozilla/dom/Event.h"
|
||||
#include "mozilla/dom/TimeEventBinding.h"
|
||||
#include "nsIDOMTimeEvent.h"
|
||||
|
||||
class nsGlobalWindowInner;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class TimeEvent final : public Event,
|
||||
public nsIDOMTimeEvent
|
||||
class TimeEvent final : public Event
|
||||
{
|
||||
public:
|
||||
TimeEvent(EventTarget* aOwner,
|
||||
|
@ -28,12 +26,6 @@ public:
|
|||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(TimeEvent, Event)
|
||||
|
||||
// nsIDOMTimeEvent interface:
|
||||
NS_DECL_NSIDOMTIMEEVENT
|
||||
|
||||
// Forward to base class
|
||||
NS_FORWARD_TO_EVENT
|
||||
|
||||
virtual JSObject* WrapObjectInternal(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override
|
||||
{
|
||||
return TimeEventBinding::Wrap(aCx, this, aGivenProto);
|
||||
|
@ -53,6 +45,8 @@ public:
|
|||
return mView;
|
||||
}
|
||||
|
||||
TimeEvent* AsTimeEvent() final { return this; }
|
||||
|
||||
private:
|
||||
~TimeEvent() {}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "mozilla/EventListenerManager.h"
|
||||
#include "mozilla/dom/SVGAnimationElement.h"
|
||||
#include "mozilla/dom/TimeEvent.h"
|
||||
#include "nsSMILTimeValueSpec.h"
|
||||
#include "nsSMILInterval.h"
|
||||
#include "nsSMILTimeContainer.h"
|
||||
|
@ -14,7 +15,6 @@
|
|||
#include "nsSMILInstanceTime.h"
|
||||
#include "nsSMILParserUtils.h"
|
||||
#include "nsIDOMKeyEvent.h"
|
||||
#include "nsIDOMTimeEvent.h"
|
||||
#include "nsString.h"
|
||||
#include <limits>
|
||||
|
||||
|
@ -372,14 +372,13 @@ nsSMILTimeValueSpec::HandleEvent(nsIDOMEvent* aEvent)
|
|||
bool
|
||||
nsSMILTimeValueSpec::CheckRepeatEventDetail(nsIDOMEvent *aEvent)
|
||||
{
|
||||
nsCOMPtr<nsIDOMTimeEvent> timeEvent = do_QueryInterface(aEvent);
|
||||
TimeEvent* timeEvent = aEvent->InternalDOMEvent()->AsTimeEvent();
|
||||
if (!timeEvent) {
|
||||
NS_WARNING("Received a repeat event that was not a DOMTimeEvent");
|
||||
return false;
|
||||
}
|
||||
|
||||
int32_t detail;
|
||||
timeEvent->GetDetail(&detail);
|
||||
int32_t detail = timeEvent->Detail();
|
||||
return detail > 0 && (uint32_t)detail == mParams.mRepeatIteration;
|
||||
}
|
||||
|
||||
|
|
|
@ -480,7 +480,6 @@
|
|||
|
||||
; svg
|
||||
@BINPATH@/res/svg.css
|
||||
@BINPATH@/components/dom_smil.xpt
|
||||
|
||||
; [Personal Security Manager]
|
||||
;
|
||||
|
|
|
@ -59,7 +59,6 @@
|
|||
#include "nsIDOMSerializer.h"
|
||||
#include "nsIDOMSimpleGestureEvent.h"
|
||||
#include "nsIDOMText.h"
|
||||
#include "nsIDOMTimeEvent.h"
|
||||
#include "nsIDOMTimeRanges.h"
|
||||
#include "nsIDOMTransitionEvent.h"
|
||||
#include "nsIDOMUIEvent.h"
|
||||
|
@ -280,7 +279,6 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
|||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
|
||||
DEFINE_SHIM(SimpleGestureEvent),
|
||||
DEFINE_SHIM(Text),
|
||||
DEFINE_SHIM(TimeEvent),
|
||||
DEFINE_SHIM(TimeRanges),
|
||||
DEFINE_SHIM(TransitionEvent),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
|
||||
|
|
Загрузка…
Ссылка в новой задаче