summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/WebKitTransitionEvent.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/WebKitTransitionEvent.h')
-rw-r--r--Source/WebCore/dom/WebKitTransitionEvent.h43
1 files changed, 17 insertions, 26 deletions
diff --git a/Source/WebCore/dom/WebKitTransitionEvent.h b/Source/WebCore/dom/WebKitTransitionEvent.h
index 4f6573b73..76643ff62 100644
--- a/Source/WebCore/dom/WebKitTransitionEvent.h
+++ b/Source/WebCore/dom/WebKitTransitionEvent.h
@@ -10,10 +10,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
@@ -23,34 +23,28 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebKitTransitionEvent_h
-#define WebKitTransitionEvent_h
+#pragma once
#include "Event.h"
namespace WebCore {
-struct WebKitTransitionEventInit : public EventInit {
- WebKitTransitionEventInit();
-
- String propertyName;
- double elapsedTime;
- String pseudoElement;
-};
-
-class WebKitTransitionEvent : public Event {
+class WebKitTransitionEvent final : public Event {
public:
- static PassRefPtr<WebKitTransitionEvent> create()
- {
- return adoptRef(new WebKitTransitionEvent);
- }
- static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
+ static Ref<WebKitTransitionEvent> create(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement)
{
- return adoptRef(new WebKitTransitionEvent(type, propertyName, elapsedTime, pseudoElement));
+ return adoptRef(*new WebKitTransitionEvent(type, propertyName, elapsedTime, pseudoElement));
}
- static PassRefPtr<WebKitTransitionEvent> create(const AtomicString& type, const WebKitTransitionEventInit& initializer)
+
+ struct Init : EventInit {
+ String propertyName;
+ double elapsedTime { 0 };
+ String pseudoElement;
+ };
+
+ static Ref<WebKitTransitionEvent> create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No)
{
- return adoptRef(new WebKitTransitionEvent(type, initializer));
+ return adoptRef(*new WebKitTransitionEvent(type, initializer, isTrusted));
}
virtual ~WebKitTransitionEvent();
@@ -59,12 +53,11 @@ public:
double elapsedTime() const;
const String& pseudoElement() const;
- virtual EventInterface eventInterface() const override;
+ EventInterface eventInterface() const override;
private:
- WebKitTransitionEvent();
WebKitTransitionEvent(const AtomicString& type, const String& propertyName, double elapsedTime, const String& pseudoElement);
- WebKitTransitionEvent(const AtomicString& type, const WebKitTransitionEventInit& initializer);
+ WebKitTransitionEvent(const AtomicString& type, const Init& initializer, IsTrusted);
String m_propertyName;
double m_elapsedTime;
@@ -72,5 +65,3 @@ private:
};
} // namespace WebCore
-
-#endif // WebKitTransitionEvent_h