summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/TransitionEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/TransitionEvent.h')
-rw-r--r--Source/WebCore/dom/TransitionEvent.h44
1 files changed, 17 insertions, 27 deletions
diff --git a/Source/WebCore/dom/TransitionEvent.h b/Source/WebCore/dom/TransitionEvent.h
index 748bba8dc..06d1d04f2 100644
--- a/Source/WebCore/dom/TransitionEvent.h
+++ b/Source/WebCore/dom/TransitionEvent.h
@@ -11,10 +11,10 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
@@ -24,34 +24,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef TransitionEvent_h
-#define TransitionEvent_h
+#pragma once
#include "Event.h"
namespace WebCore {
-struct TransitionEventInit : public EventInit {
- TransitionEventInit();
-
- String propertyName;
- double elapsedTime;
- String pseudoElement;
-};
-
-class TransitionEvent : public Event {
+class TransitionEvent final : public Event {
public:
- static PassRefPtr<TransitionEvent> create()
- {
- return adoptRef(new TransitionEvent);
- }
- static PassRefPtr<TransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
+ static Ref<TransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
{
- return adoptRef(new TransitionEvent(type, propertyName, elapsedTime, pseudoElement));
+ return adoptRef(*new TransitionEvent(type, propertyName, elapsedTime, pseudoElement));
}
- static PassRefPtr<TransitionEvent> create(const AtomicString& type, const TransitionEventInit& initializer)
+
+ struct Init : EventInit {
+ String propertyName;
+ double elapsedTime { 0 };
+ String pseudoElement;
+ };
+
+ static Ref<TransitionEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No)
{
- return adoptRef(new TransitionEvent(type, initializer));
+ return adoptRef(*new TransitionEvent(type, initializer, isTrusted));
}
virtual ~TransitionEvent();
@@ -60,12 +54,11 @@ public:
double elapsedTime() const;
const String& pseudoElement() const;
- virtual EventInterface eventInterface() const override;
+ EventInterface eventInterface() const override;
private:
- TransitionEvent();
TransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement);
- TransitionEvent(const AtomicString& type, const TransitionEventInit& initializer);
+ TransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted);
String m_propertyName;
double m_elapsedTime;
@@ -73,6 +66,3 @@ private:
};
} // namespace WebCore
-
-#endif // TransitionEvent_h
-