From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/html/canvas/WebGLContextEvent.h | 35 ++++++++++---------------- 1 file changed, 13 insertions(+), 22 deletions(-) (limited to 'Source/WebCore/html/canvas/WebGLContextEvent.h') diff --git a/Source/WebCore/html/canvas/WebGLContextEvent.h b/Source/WebCore/html/canvas/WebGLContextEvent.h index fa1ebfbc8..4ba1ba4d7 100644 --- a/Source/WebCore/html/canvas/WebGLContextEvent.h +++ b/Source/WebCore/html/canvas/WebGLContextEvent.h @@ -23,47 +23,38 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef WebGLContextEvent_h -#define WebGLContextEvent_h +#pragma once #include "Event.h" namespace WebCore { -struct WebGLContextEventInit : public EventInit { - WebGLContextEventInit(); - - String statusMessage; -}; - -class WebGLContextEvent : public Event { +class WebGLContextEvent final : public Event { public: - static PassRefPtr create() - { - return adoptRef(new WebGLContextEvent); - } - static PassRefPtr create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage) + static Ref create(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage) { - return adoptRef(new WebGLContextEvent(type, canBubble, cancelable, statusMessage)); + return adoptRef(*new WebGLContextEvent(type, canBubble, cancelable, statusMessage)); } - static PassRefPtr create(const AtomicString& type, const WebGLContextEventInit& initializer) + + struct Init : EventInit { + String statusMessage; + }; + + static Ref create(const AtomicString& type, const Init& initializer, IsTrusted isTrusted = IsTrusted::No) { - return adoptRef(new WebGLContextEvent(type, initializer)); + return adoptRef(*new WebGLContextEvent(type, initializer, isTrusted)); } virtual ~WebGLContextEvent(); const String& statusMessage() const { return m_statusMessage; } - virtual EventInterface eventInterface() const override; + EventInterface eventInterface() const override; private: - WebGLContextEvent(); WebGLContextEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& statusMessage); - WebGLContextEvent(const AtomicString&, const WebGLContextEventInit&); + WebGLContextEvent(const AtomicString&, const Init&, IsTrusted); String m_statusMessage; }; } // namespace WebCore - -#endif // WebGLContextEvent_h -- cgit v1.2.1