Generate bindings code for EventTarget.addEventListener() / removeEventListener()
[WebKit-https.git] / Source / WebKit / win / DOMEventsClasses.cpp
1 /*
2  * Copyright (C) 2006-2007, 2015 Apple Inc.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  * 1. Redistributions of source code must retain the above copyright
8  *    notice, this list of conditions and the following disclaimer.
9  * 2. Redistributions in binary form must reproduce the above copyright
10  *    notice, this list of conditions and the following disclaimer in the
11  *    documentation and/or other materials provided with the distribution.
12  *
13  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
17  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
24  */
25
26 #include "WebKitDLL.h"
27 #include <initguid.h>
28 #include "DOMEventsClasses.h"
29
30 #include <WebCore/COMPtr.h>
31 #include <WebCore/DOMWindow.h>
32 #include <WebCore/Event.h>
33 #include <WebCore/EventNames.h>
34 #include <WebCore/KeyboardEvent.h>
35 #include <WebCore/MouseEvent.h>
36 #include <WebCore/ScriptExecutionContext.h>
37
38 // DOMEventListener -----------------------------------------------------------
39
40 HRESULT DOMEventListener::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
41 {
42     if (!ppvObject)
43         return E_POINTER;
44     *ppvObject = nullptr;
45     if (IsEqualGUID(riid, IID_IDOMEventListener))
46         *ppvObject = static_cast<IDOMEventListener*>(this);
47     else
48         return DOMObject::QueryInterface(riid, ppvObject);
49
50     AddRef();
51     return S_OK;
52 }
53
54 HRESULT DOMEventListener::handleEvent(_In_opt_ IDOMEvent* /*evt*/)
55 {
56     return E_NOTIMPL;
57 }
58
59 WebEventListener::WebEventListener(IDOMEventListener* i)
60     : EventListener(CPPEventListenerType)
61     , m_iDOMEventListener(i)
62 {
63     m_iDOMEventListener->AddRef();
64 }
65
66 WebEventListener::~WebEventListener()
67 {
68     m_iDOMEventListener->Release();
69 }
70
71 bool WebEventListener::operator==(const WebCore::EventListener& other) const
72 {
73     return (other.type() == CPPEventListenerType 
74         && reinterpret_cast<const WebEventListener*>(&other)->m_iDOMEventListener == m_iDOMEventListener);
75 }
76
77 void WebEventListener::handleEvent(WebCore::ScriptExecutionContext* s, WebCore::Event* e)
78 {
79     RefPtr<WebCore::Event> ePtr(e);
80     COMPtr<IDOMEvent> domEvent = DOMEvent::createInstance(ePtr);
81     m_iDOMEventListener->handleEvent(domEvent.get());
82 }
83
84 Ref<WebEventListener> WebEventListener::create(IDOMEventListener* d)
85 {
86     return adoptRef(*new WebEventListener(d));
87 }
88
89 // DOMEvent -------------------------------------------------------------------
90
91 DOMEvent::DOMEvent(PassRefPtr<WebCore::Event> e)
92 {
93     m_event = e;
94 }
95
96 DOMEvent::~DOMEvent()
97 {
98 }
99
100 IDOMEvent* DOMEvent::createInstance(PassRefPtr<WebCore::Event> e)
101 {
102     if (!e)
103         return nullptr;
104
105     HRESULT hr;
106     IDOMEvent* domEvent = nullptr;
107
108     switch (e->eventInterface()) {
109     case WebCore::KeyboardEventInterfaceType: {
110         DOMKeyboardEvent* newEvent = new DOMKeyboardEvent(e);
111         hr = newEvent->QueryInterface(IID_IDOMKeyboardEvent, (void**)&domEvent);
112         break;
113     }
114     case WebCore::MouseEventInterfaceType: {
115         DOMMouseEvent* newEvent = new DOMMouseEvent(e);
116         hr = newEvent->QueryInterface(IID_IDOMMouseEvent, (void**)&domEvent);
117         break;
118     }
119     case WebCore::MutationEventInterfaceType: {
120         DOMMutationEvent* newEvent = new DOMMutationEvent(e);
121         hr = newEvent->QueryInterface(IID_IDOMMutationEvent, (void**)&domEvent);
122         break;
123     }
124     case WebCore::OverflowEventInterfaceType: {
125         DOMOverflowEvent* newEvent = new DOMOverflowEvent(e);
126         hr = newEvent->QueryInterface(IID_IDOMOverflowEvent, (void**)&domEvent);
127         break;
128     }
129     case WebCore::WheelEventInterfaceType: {
130         DOMWheelEvent* newEvent = new DOMWheelEvent(e);
131         hr = newEvent->QueryInterface(IID_IDOMWheelEvent, (void**)&domEvent);
132         break;
133     }
134     default:
135         if (e->isUIEvent()) {
136             DOMUIEvent* newEvent = new DOMUIEvent(e);
137             hr = newEvent->QueryInterface(IID_IDOMUIEvent, (void**)&domEvent);
138         } else {
139             DOMEvent* newEvent = new DOMEvent(e);
140             hr = newEvent->QueryInterface(IID_IDOMEvent, (void**)&domEvent);
141         }
142     }
143
144     if (FAILED(hr))
145         return nullptr;
146
147     return domEvent;
148 }
149
150 HRESULT DOMEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
151 {
152     if (!ppvObject)
153         return E_POINTER;
154     *ppvObject = nullptr;
155     if (IsEqualGUID(riid, IID_DOMEvent))
156         *ppvObject = this;
157     else if (IsEqualGUID(riid, IID_IDOMEvent))
158         *ppvObject = static_cast<IDOMEvent*>(this);
159     else
160         return DOMObject::QueryInterface(riid, ppvObject);
161
162     AddRef();
163     return S_OK;
164 }
165
166 HRESULT DOMEvent::type(__deref_opt_out BSTR* result)
167 {
168     ASSERT_NOT_REACHED();
169     if (!result)
170         return E_POINTER;
171     *result = nullptr;
172     return E_NOTIMPL;
173 }
174
175 HRESULT DOMEvent::target(_COM_Outptr_opt_ IDOMEventTarget** result)
176 {
177     ASSERT_NOT_REACHED();
178     if (!result)
179         return E_POINTER;
180     *result = nullptr;
181     return E_NOTIMPL;
182 }
183
184 HRESULT DOMEvent::currentTarget(_COM_Outptr_opt_ IDOMEventTarget** result)
185 {
186     ASSERT_NOT_REACHED();
187     if (!result)
188         return E_POINTER;
189     *result = nullptr;
190     return E_NOTIMPL;
191 }
192
193 HRESULT DOMEvent::eventPhase(_Out_ unsigned short* /*result*/)
194 {
195     ASSERT_NOT_REACHED();
196     return E_NOTIMPL;
197 }
198
199 HRESULT DOMEvent::bubbles(_Out_ BOOL* /*result*/)
200 {
201     ASSERT_NOT_REACHED();
202     return E_NOTIMPL;
203 }
204
205 HRESULT DOMEvent::cancelable(_Out_ BOOL* /*result*/)
206 {
207     ASSERT_NOT_REACHED();
208     return E_NOTIMPL;
209 }
210
211 HRESULT DOMEvent::timeStamp(_Out_ DOMTimeStamp* /*result*/)
212 {
213     ASSERT_NOT_REACHED();
214     return E_NOTIMPL;
215 }
216
217 HRESULT DOMEvent::stopPropagation()
218 {
219     ASSERT_NOT_REACHED();
220     return E_NOTIMPL;
221 }
222
223 HRESULT DOMEvent::preventDefault()
224 {
225     ASSERT_NOT_REACHED();
226     return E_NOTIMPL;
227 }
228
229 HRESULT DOMEvent::initEvent(_In_ BSTR /*eventTypeArg*/, BOOL /*canBubbleArg*/, BOOL /*cancelableArg*/)
230 {
231     ASSERT_NOT_REACHED();
232     return E_NOTIMPL;
233 }
234
235 // DOMUIEvent -----------------------------------------------------------------
236
237 HRESULT DOMUIEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
238 {
239     if (!ppvObject)
240         return E_POINTER;
241     *ppvObject = nullptr;
242     if (IsEqualGUID(riid, IID_IDOMUIEvent))
243         *ppvObject = static_cast<IDOMUIEvent*>(this);
244     else
245         return DOMEvent::QueryInterface(riid, ppvObject);
246
247     AddRef();
248     return S_OK;
249 }
250
251 HRESULT DOMUIEvent::view(_COM_Outptr_opt_ IDOMWindow** result)
252 {
253     ASSERT_NOT_REACHED();
254     if (!result)
255         return E_POINTER;
256     *result = nullptr;
257     return E_NOTIMPL;
258 }
259
260 HRESULT DOMUIEvent::detail(_Out_ long* /*result*/)
261 {
262     ASSERT_NOT_REACHED();
263     return E_NOTIMPL;
264 }
265
266 HRESULT DOMUIEvent::initUIEvent(_In_ BSTR /*type*/, BOOL /*canBubble*/, BOOL /*cancelable*/, _In_opt_ IDOMWindow* /*view*/, long /*detail*/)
267 {
268     ASSERT_NOT_REACHED();
269     return E_NOTIMPL;
270 }
271
272 HRESULT DOMUIEvent::keyCode(_Out_ long* /*result*/)
273 {
274     ASSERT_NOT_REACHED();
275     return E_NOTIMPL;
276 }
277
278 HRESULT DOMUIEvent::charCode(_Out_ long* /*result*/)
279 {
280     ASSERT_NOT_REACHED();
281     return E_NOTIMPL;
282 }
283
284 HRESULT DOMUIEvent::unused1(_Out_ long* /*result*/)
285 {
286     ASSERT_NOT_REACHED();
287     return E_NOTIMPL;
288 }
289
290 HRESULT DOMUIEvent::unused2(_Out_ long* /*result*/)
291 {
292     ASSERT_NOT_REACHED();
293     return E_NOTIMPL;
294 }
295
296 HRESULT DOMUIEvent::pageX(_Out_ long* /*result*/)
297 {
298     ASSERT_NOT_REACHED();
299     return E_NOTIMPL;
300 }
301
302 HRESULT DOMUIEvent::pageY(_Out_ long* /*result*/)
303 {
304     ASSERT_NOT_REACHED();
305     return E_NOTIMPL;
306 }
307
308 HRESULT DOMUIEvent::which(_Out_ long* /*result*/)
309 {
310     ASSERT_NOT_REACHED();
311     return E_NOTIMPL;
312 }
313
314 // DOMKeyboardEvent -----------------------------------------------------------
315
316 HRESULT DOMKeyboardEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
317 {
318     if (!ppvObject)
319         return E_POINTER;
320     *ppvObject = nullptr;
321     if (IsEqualGUID(riid, IID_IDOMKeyboardEvent))
322         *ppvObject = static_cast<IDOMKeyboardEvent*>(this);
323     else
324         return DOMUIEvent::QueryInterface(riid, ppvObject);
325
326     AddRef();
327     return S_OK;
328 }
329
330 HRESULT DOMKeyboardEvent::keyIdentifier(__deref_opt_out BSTR* result)
331 {
332     ASSERT_NOT_REACHED();
333     if (!result)
334         return E_POINTER;
335     *result = nullptr;
336     return E_NOTIMPL;
337 }
338
339 HRESULT DOMKeyboardEvent::location(_Out_ unsigned long* /*result*/)
340 {
341     ASSERT_NOT_REACHED();
342     return E_NOTIMPL;
343 }
344
345 HRESULT DOMKeyboardEvent::keyLocation(_Out_ unsigned long* /*result*/)
346 {
347     ASSERT_NOT_REACHED();
348     return E_NOTIMPL;
349 }
350
351 HRESULT DOMKeyboardEvent::ctrlKey(_Out_ BOOL* result)
352 {
353     if (!result)
354         return E_POINTER;
355     *result = FALSE;
356     if (!m_event || !m_event->isKeyboardEvent())
357         return E_FAIL;
358     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
359
360     *result = keyEvent->ctrlKey() ? TRUE : FALSE;
361     return S_OK;
362 }
363
364 HRESULT DOMKeyboardEvent::shiftKey(_Out_ BOOL* result)
365 {
366     if (!result)
367         return E_POINTER;
368     *result = FALSE;
369     if (!m_event || !m_event->isKeyboardEvent())
370         return E_FAIL;
371     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
372
373     *result = keyEvent->shiftKey() ? TRUE : FALSE;
374     return S_OK;
375 }
376
377 HRESULT DOMKeyboardEvent::altKey(_Out_ BOOL* result)
378 {
379     if (!result)
380         return E_POINTER;
381     *result = FALSE;
382     if (!m_event || !m_event->isKeyboardEvent())
383         return E_FAIL;
384     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
385
386     *result = keyEvent->altKey() ? TRUE : FALSE;
387     return S_OK;
388 }
389
390 HRESULT DOMKeyboardEvent::metaKey(_Out_ BOOL* result)
391 {
392     if (!result)
393         return E_POINTER;
394     *result = FALSE;
395     if (!m_event || !m_event->isKeyboardEvent())
396         return E_FAIL;
397     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
398
399     *result = keyEvent->metaKey() ? TRUE : FALSE;
400     return S_OK;
401 }
402
403 HRESULT DOMKeyboardEvent::altGraphKey(_Out_ BOOL* result)
404 {
405     if (!result)
406         return E_POINTER;
407     *result = FALSE;
408     if (!m_event || !m_event->isKeyboardEvent())
409         return E_FAIL;
410     WebCore::KeyboardEvent* keyEvent = static_cast<WebCore::KeyboardEvent*>(m_event.get());
411
412     *result = keyEvent->altGraphKey() ? TRUE : FALSE;
413     return S_OK;
414 }
415
416 HRESULT DOMKeyboardEvent::getModifierState(_In_ BSTR /*keyIdentifierArg*/, _Out_ BOOL* /*result*/)
417 {
418     ASSERT_NOT_REACHED();
419     return E_NOTIMPL;
420 }
421
422 HRESULT DOMKeyboardEvent::initKeyboardEvent(_In_ BSTR /*type*/, BOOL /*canBubble*/, BOOL /*cancelable*/,
423     _In_opt_ IDOMWindow* /*view*/, _In_ BSTR /*keyIdentifier*/, unsigned long /*keyLocation*/,
424     BOOL /*ctrlKey*/, BOOL /*altKey*/, BOOL /*shiftKey*/, BOOL /*metaKey*/, BOOL /*graphKey*/)
425 {
426     ASSERT_NOT_REACHED();
427     return E_NOTIMPL;
428 }
429
430 // DOMMouseEvent --------------------------------------------------------------
431
432 HRESULT DOMMouseEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
433 {
434     if (!ppvObject)
435         return E_POINTER;
436     *ppvObject = nullptr;
437     if (IsEqualGUID(riid, IID_IDOMMouseEvent))
438         *ppvObject = static_cast<IDOMMouseEvent*>(this);
439     else
440         return DOMUIEvent::QueryInterface(riid, ppvObject);
441
442     AddRef();
443     return S_OK;
444 }
445
446 HRESULT DOMMouseEvent::screenX(_Out_ long* /*result*/)
447 {
448     ASSERT_NOT_REACHED();
449     return E_NOTIMPL;
450 }
451
452 HRESULT DOMMouseEvent::screenY(_Out_ long* /*result*/)
453 {
454     ASSERT_NOT_REACHED();
455     return E_NOTIMPL;
456 }
457
458 HRESULT DOMMouseEvent::clientX(_Out_ long* /*result*/)
459 {
460     ASSERT_NOT_REACHED();
461     return E_NOTIMPL;
462 }
463
464 HRESULT DOMMouseEvent::clientY(_Out_ long* /*result*/)
465 {
466     ASSERT_NOT_REACHED();
467     return E_NOTIMPL;
468 }
469
470 HRESULT DOMMouseEvent::ctrlKey(_Out_ BOOL* result)
471 {
472     if (!result)
473         return E_POINTER;
474     *result = FALSE;
475     if (!m_event || !m_event->isMouseEvent())
476         return E_FAIL;
477     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
478
479     *result = mouseEvent->ctrlKey() ? TRUE : FALSE;
480     return S_OK;
481 }
482
483 HRESULT DOMMouseEvent::shiftKey(_Out_ BOOL* result)
484 {
485     if (!result)
486         return E_POINTER;
487     *result = FALSE;
488     if (!m_event || !m_event->isMouseEvent())
489         return E_FAIL;
490     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
491
492     *result = mouseEvent->shiftKey() ? TRUE : FALSE;
493     return S_OK;
494 }
495
496 HRESULT DOMMouseEvent::altKey(_Out_ BOOL* result)
497 {
498     if (!result)
499         return E_POINTER;
500     *result = FALSE;
501     if (!m_event || !m_event->isMouseEvent())
502         return E_FAIL;
503     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
504
505     *result = mouseEvent->altKey() ? TRUE : FALSE;
506     return S_OK;
507 }
508
509 HRESULT DOMMouseEvent::metaKey(_Out_ BOOL* result)
510 {
511     if (!result)
512         return E_POINTER;
513     *result = FALSE;
514     if (!m_event || !m_event->isMouseEvent())
515         return E_FAIL;
516     WebCore::MouseEvent* mouseEvent = static_cast<WebCore::MouseEvent*>(m_event.get());
517
518     *result = mouseEvent->metaKey() ? TRUE : FALSE;
519     return S_OK;
520 }
521
522 HRESULT DOMMouseEvent::button(_Out_ unsigned short* /*result*/)
523 {
524     ASSERT_NOT_REACHED();
525     return E_NOTIMPL;
526 }
527
528 HRESULT DOMMouseEvent::relatedTarget(_COM_Outptr_opt_ IDOMEventTarget** result)
529 {
530     ASSERT_NOT_REACHED();
531     if (!result)
532         return E_POINTER;
533     *result = nullptr;
534     return E_NOTIMPL;
535 }
536
537 HRESULT DOMMouseEvent::initMouseEvent(_In_ BSTR /*type*/, BOOL /*canBubble*/, BOOL /*cancelable*/,
538     _In_opt_ IDOMWindow* /*view*/, long /*detail*/, long /*screenX*/, long /*screenY*/, long /*clientX*/, long /*clientY*/,
539     BOOL /*ctrlKey*/, BOOL /*altKey*/, BOOL /*shiftKey*/, BOOL /*metaKey*/, unsigned short /*button*/,
540     _In_opt_ IDOMEventTarget* /*relatedTarget*/)
541 {
542     ASSERT_NOT_REACHED();
543     return E_NOTIMPL;
544 }
545
546 HRESULT DOMMouseEvent::offsetX(_Out_ long* /*result*/)
547 {
548     ASSERT_NOT_REACHED();
549     return E_NOTIMPL;
550 }
551
552 HRESULT DOMMouseEvent::offsetY(_Out_ long* /*result*/)
553 {
554     ASSERT_NOT_REACHED();
555     return E_NOTIMPL;
556 }
557
558 HRESULT DOMMouseEvent::x(_Out_ long* /*result*/)
559 {
560     ASSERT_NOT_REACHED();
561     return E_NOTIMPL;
562 }
563
564 HRESULT DOMMouseEvent::y(_Out_ long* /*result*/)
565 {
566     ASSERT_NOT_REACHED();
567     return E_NOTIMPL;
568 }
569
570 HRESULT DOMMouseEvent::fromElement(_COM_Outptr_opt_ IDOMNode** result)
571 {
572     ASSERT_NOT_REACHED();
573     if (!result)
574         return E_POINTER;
575     *result = nullptr;
576     return E_NOTIMPL;
577 }
578
579 HRESULT DOMMouseEvent::toElement(_COM_Outptr_opt_ IDOMNode** result)
580 {
581     ASSERT_NOT_REACHED();
582     if (!result)
583         return E_POINTER;
584     *result = nullptr;
585     return E_NOTIMPL;
586 }
587
588 // DOMMutationEvent -----------------------------------------------------------
589
590 HRESULT DOMMutationEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
591 {
592     if (!ppvObject)
593         return E_POINTER;
594     *ppvObject = nullptr;
595     if (IsEqualGUID(riid, IID_IDOMMutationEvent))
596         *ppvObject = static_cast<IDOMMutationEvent*>(this);
597     else
598         return DOMEvent::QueryInterface(riid, ppvObject);
599
600     AddRef();
601     return S_OK;
602 }
603
604 HRESULT DOMMutationEvent::relatedNode(_COM_Outptr_opt_ IDOMNode** result)
605 {
606     ASSERT_NOT_REACHED();
607     if (!result)
608         return E_POINTER;
609     *result = nullptr;
610     return E_NOTIMPL;
611 }
612
613 HRESULT DOMMutationEvent::prevValue(__deref_opt_out BSTR* result)
614 {
615     ASSERT_NOT_REACHED();
616     if (!result)
617         return E_POINTER;
618     *result = nullptr;
619     return E_NOTIMPL;
620 }
621
622 HRESULT DOMMutationEvent::newValue(__deref_opt_out BSTR* result)
623 {
624     ASSERT_NOT_REACHED();
625     if (!result)
626         return E_POINTER;
627     *result = nullptr;
628     return E_NOTIMPL;
629 }
630
631 HRESULT DOMMutationEvent::attrName(__deref_opt_out BSTR* result)
632 {
633     ASSERT_NOT_REACHED();
634     if (!result)
635         return E_POINTER;
636     *result = nullptr;
637     return E_NOTIMPL;
638 }
639
640 HRESULT DOMMutationEvent::attrChange(_Out_ unsigned short* result)
641 {
642     ASSERT_NOT_REACHED();
643     if (!result)
644         return E_POINTER;
645     *result = 0;
646     return E_NOTIMPL;
647 }
648
649 HRESULT DOMMutationEvent::initMutationEvent(_In_ BSTR /*type*/, BOOL /*canBubble*/, BOOL /*cancelable*/,
650     _In_opt_ IDOMNode* /*relatedNode*/, _In_ BSTR /*prevValue*/, _In_ BSTR /*newValue*/, _In_ BSTR /*attrName*/,
651     unsigned short /*attrChange*/)
652 {
653     ASSERT_NOT_REACHED();
654     return E_NOTIMPL;
655 }
656
657 // DOMOverflowEvent -----------------------------------------------------------
658
659 HRESULT DOMOverflowEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
660 {
661     if (!ppvObject)
662         return E_POINTER;
663     *ppvObject = nullptr;
664     if (IsEqualGUID(riid, IID_IDOMOverflowEvent))
665         *ppvObject = static_cast<IDOMOverflowEvent*>(this);
666     else
667         return DOMEvent::QueryInterface(riid, ppvObject);
668
669     AddRef();
670     return S_OK;
671 }
672
673 HRESULT DOMOverflowEvent::orient(_Out_ unsigned short* /*result*/)
674 {
675     ASSERT_NOT_REACHED();
676     return E_NOTIMPL;
677 }
678
679 HRESULT DOMOverflowEvent::horizontalOverflow(_Out_ BOOL* /*result*/)
680 {
681     ASSERT_NOT_REACHED();
682     return E_NOTIMPL;
683 }
684
685 HRESULT DOMOverflowEvent::verticalOverflow(_Out_ BOOL* /*result*/)
686 {
687     ASSERT_NOT_REACHED();
688     return E_NOTIMPL;
689 }
690
691 // DOMWheelEvent --------------------------------------------------------------
692
693 HRESULT DOMWheelEvent::QueryInterface(_In_ REFIID riid, _COM_Outptr_ void** ppvObject)
694 {
695     if (!ppvObject)
696         return E_POINTER;
697     *ppvObject = nullptr;
698     if (IsEqualGUID(riid, IID_IDOMWheelEvent))
699         *ppvObject = static_cast<IDOMWheelEvent*>(this);
700     else
701         return DOMUIEvent::QueryInterface(riid, ppvObject);
702
703     AddRef();
704     return S_OK;
705 }
706
707 HRESULT DOMWheelEvent::screenX(_Out_ long* /*result*/)
708 {
709     ASSERT_NOT_REACHED();
710     return E_NOTIMPL;
711 }
712
713 HRESULT DOMWheelEvent::screenY(_Out_  long* /*result*/)
714 {
715     ASSERT_NOT_REACHED();
716     return E_NOTIMPL;
717 }
718
719 HRESULT DOMWheelEvent::clientX(_Out_  long* /*result*/)
720 {
721     ASSERT_NOT_REACHED();
722     return E_NOTIMPL;
723 }
724
725 HRESULT DOMWheelEvent::clientY(_Out_  long* /*result*/)
726 {
727     ASSERT_NOT_REACHED();
728     return E_NOTIMPL;
729 }
730
731 HRESULT DOMWheelEvent::ctrlKey(_Out_  BOOL* /*result*/)
732 {
733     ASSERT_NOT_REACHED();
734     return E_NOTIMPL;
735 }
736
737 HRESULT DOMWheelEvent::shiftKey(_Out_  BOOL* /*result*/)
738 {
739     ASSERT_NOT_REACHED();
740     return E_NOTIMPL;
741 }
742
743 HRESULT DOMWheelEvent::altKey(_Out_  BOOL* /*result*/)
744 {
745     ASSERT_NOT_REACHED();
746     return E_NOTIMPL;
747 }
748
749 HRESULT DOMWheelEvent::metaKey(_Out_  BOOL* /*result*/)
750 {
751     ASSERT_NOT_REACHED();
752     return E_NOTIMPL;
753 }
754
755 HRESULT DOMWheelEvent::wheelDelta(_Out_ long* /*result*/)
756 {
757     ASSERT_NOT_REACHED();
758     return E_NOTIMPL;
759 }
760
761 HRESULT DOMWheelEvent::wheelDeltaX(_Out_ long* /*result*/)
762 {
763     ASSERT_NOT_REACHED();
764     return E_NOTIMPL;
765 }
766
767 HRESULT DOMWheelEvent::wheelDeltaY(_Out_  long* /*result*/)
768 {
769     ASSERT_NOT_REACHED();
770     return E_NOTIMPL;
771 }
772
773 HRESULT DOMWheelEvent::offsetX(_Out_  long* /*result*/)
774 {
775     ASSERT_NOT_REACHED();
776     return E_NOTIMPL;
777 }
778
779 HRESULT DOMWheelEvent::offsetY(_Out_  long* /*result*/)
780 {
781     ASSERT_NOT_REACHED();
782     return E_NOTIMPL;
783 }
784
785 HRESULT DOMWheelEvent::x(_Out_  long* /*result*/)
786 {
787     ASSERT_NOT_REACHED();
788     return E_NOTIMPL;
789 }
790
791 HRESULT DOMWheelEvent::y(_Out_ long* /*result*/)
792 {
793     ASSERT_NOT_REACHED();
794     return E_NOTIMPL;
795 }
796
797 HRESULT DOMWheelEvent::isHorizontal(_Out_ BOOL* /*result*/)
798 {
799     ASSERT_NOT_REACHED();
800     return E_NOTIMPL;
801 }
802
803 HRESULT DOMWheelEvent::initWheelEvent(long /*wheelDeltaX*/, long /*wheelDeltaY*/,
804     _In_opt_ IDOMWindow* /*view*/, long /*screenX*/, long /*screenY*/, long /*clientX*/, long /*clientY*/,
805     BOOL /*ctrlKey*/, BOOL /*altKey*/, BOOL /*shiftKey*/, BOOL /*metaKey*/)
806 {
807     ASSERT_NOT_REACHED();
808     return E_NOTIMPL;
809 }