[WPE] EventSenderProxy constructor is called before a PlatformWindow is usable
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 09:07:04 +0000 (09:07 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 1 Apr 2019 09:07:04 +0000 (09:07 +0000)
commitbff1b2247edb9d23949212115c859aa0b1520c11
treee99492f3dee09f0c967ac0dfdcf3ae3e79e87cae
parent204d279b821da3add811fc76a10b82b9bac40169
[WPE] EventSenderProxy constructor is called before a PlatformWindow is usable
https://bugs.webkit.org/show_bug.cgi?id=196441

Reviewed by Carlos Garcia Campos.

Don't cache the wpe_view_backend object that might not exist yet at the
time of EventSenderProxy constructor invocation, but instead retrieve
that object whenever it's required for event dispatching. This should
avoid crashes in this constructor now that it's invoked before any
PlatformWindow has been set up (as changed in r243496).

* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::viewBackend):
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::prepareAndDispatchTouchEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/WebKitTestRunner/EventSenderProxy.h
Tools/WebKitTestRunner/wpe/EventSenderProxyWPE.cpp