Skip to content

Commit 0dfccff

Browse files
author
Anders Carlsson
committed
2011-04-15 Jon Lee <jonlee@apple.com>
Reviewed by Anders Carlsson. onClick does not function with <select> elements in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=57904 <rdar://problem/9217757> Reviewed by Anders Carlsson. * Shared/NativeWebMouseEvent.h: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h. (WebKit::NativeWebMouseEvent::nativeEvent): * Shared/mac/NativeWebMouseEventMac.mm: Added. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/qt/NativeWebMouseEventQt.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/win/NativeWebMouseEventWin.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * UIProcess/API/mac/WKView.mm: (-[WKView mouseMoved:]): (-[WKView _mouseHandler:]): Pre-compiler mouse handler calls need to use the new NativeWebMouseEvent class * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::mouseMoveEvent): (QWKPagePrivate::mousePressEvent): (QWKPagePrivate::mouseReleaseEvent): (QWKPagePrivate::mouseDoubleClickEvent): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleMouseEvent): keep track of mouse down event in order to be able to send a fake mouse up event on the select element (WebKit::WebPageProxy::currentMouseDownEvent): for access by the popup menu proxy to dispatch the fake mouse up event (WebKit::WebPageProxy::didReceiveEvent): clear out the cached mouse down event (WebKit::WebPageProxy::processDidCrash): clear out the cached events since we assume that didReceiveEvent did not called prior to the crash * UIProcess/WebPageProxy.h: * UIProcess/WebPopupMenuProxy.h: * UIProcess/mac/WebPopupMenuProxyMac.mm: (WebKit::WebPopupMenuProxyMac::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted * UIProcess/win/WebView.cpp: (WebKit::WebView::onMouseEvent): * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Canonical link: https://commits.webkit.org/73760@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@84017 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent cf87ca0 commit 0dfccff

17 files changed

Lines changed: 421 additions & 35 deletions

Source/WebKit2/ChangeLog

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
2011-04-15 Jon Lee <jonlee@apple.com>
2+
3+
Reviewed by Anders Carlsson.
4+
5+
onClick does not function with <select> elements in WebKit2
6+
https://bugs.webkit.org/show_bug.cgi?id=57904
7+
<rdar://problem/9217757>
8+
9+
Reviewed by Anders Carlsson.
10+
11+
* Shared/NativeWebMouseEvent.h: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
12+
(WebKit::NativeWebMouseEvent::nativeEvent):
13+
* Shared/mac/NativeWebMouseEventMac.mm: Added.
14+
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
15+
* Shared/qt/NativeWebMouseEventQt.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
16+
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
17+
* Shared/win/NativeWebMouseEventWin.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
18+
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
19+
* UIProcess/API/mac/WKView.mm:
20+
(-[WKView mouseMoved:]):
21+
(-[WKView _mouseHandler:]): Pre-compiler mouse handler calls need to use the new NativeWebMouseEvent class
22+
* UIProcess/API/qt/qwkpage.cpp:
23+
(QWKPagePrivate::mouseMoveEvent):
24+
(QWKPagePrivate::mousePressEvent):
25+
(QWKPagePrivate::mouseReleaseEvent):
26+
(QWKPagePrivate::mouseDoubleClickEvent):
27+
* UIProcess/WebPageProxy.cpp:
28+
(WebKit::WebPageProxy::handleMouseEvent): keep track of mouse down event in order to be able to send a fake mouse up event on the select element
29+
(WebKit::WebPageProxy::currentMouseDownEvent): for access by the popup menu proxy to dispatch the fake mouse up event
30+
(WebKit::WebPageProxy::didReceiveEvent): clear out the cached mouse down event
31+
(WebKit::WebPageProxy::processDidCrash): clear out the cached events since we assume that didReceiveEvent did not called prior to the crash
32+
* UIProcess/WebPageProxy.h:
33+
* UIProcess/WebPopupMenuProxy.h:
34+
* UIProcess/mac/WebPopupMenuProxyMac.mm:
35+
(WebKit::WebPopupMenuProxyMac::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted
36+
* UIProcess/win/WebPopupMenuProxyWin.cpp:
37+
(WebKit::WebPopupMenuProxyWin::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted
38+
* UIProcess/win/WebView.cpp:
39+
(WebKit::WebView::onMouseEvent):
40+
* WebKit2.pro:
41+
* WebKit2.xcodeproj/project.pbxproj:
42+
* win/WebKit2.vcproj:
43+
144
2011-04-15 Alexey Proskuryakov <ap@apple.com>
245

346
Qt build fix.

Source/WebKit2/GNUmakefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ libWebKit2_la_SOURCES = \
205205
Source/WebKit2/Shared/MutableDictionary.cpp \
206206
Source/WebKit2/Shared/MutableDictionary.h \
207207
Source/WebKit2/Shared/NativeWebKeyboardEvent.h \
208+
Source/WebKit2/Shared/NativeWebMouseEvent.h \
208209
Source/WebKit2/Shared/OriginAndDatabases.cpp \
209210
Source/WebKit2/Shared/OriginAndDatabases.h \
210211
Source/WebKit2/Shared/PlatformPopupMenuData.cpp \
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Copyright (C) 2011 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. AND ITS CONTRIBUTORS ``AS IS''
14+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17+
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
* THE POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
#ifndef NativeWebMouseEvent_h
27+
#define NativeWebMouseEvent_h
28+
29+
#include "WebEvent.h"
30+
31+
#if PLATFORM(MAC)
32+
#include <wtf/RetainPtr.h>
33+
OBJC_CLASS NSView;
34+
#elif PLATFORM(QT)
35+
#include <qgraphicssceneevent.h>
36+
#endif
37+
38+
namespace WebKit {
39+
40+
class NativeWebMouseEvent : public WebMouseEvent {
41+
public:
42+
#if PLATFORM(MAC)
43+
NativeWebMouseEvent(NSEvent *, NSView *);
44+
#elif PLATFORM(WIN)
45+
NativeWebMouseEvent(HWND, UINT message, WPARAM, LPARAM, bool);
46+
#elif PLATFORM(QT)
47+
explicit NativeWebMouseEvent(QGraphicsSceneMouseEvent*, int);
48+
#endif
49+
50+
#if PLATFORM(MAC)
51+
NSEvent* nativeEvent() const { return m_nativeEvent.get(); }
52+
#elif PLATFORM(WIN)
53+
const MSG* nativeEvent() const { return &m_nativeEvent; }
54+
#elif PLATFORM(QT)
55+
const QGraphicsSceneMouseEvent* nativeEvent() const { return m_nativeEvent; }
56+
#endif
57+
58+
private:
59+
#if PLATFORM(MAC)
60+
RetainPtr<NSEvent> m_nativeEvent;
61+
#elif PLATFORM(WIN)
62+
MSG m_nativeEvent;
63+
#elif PLATFORM(QT)
64+
QGraphicsSceneMouseEvent* m_nativeEvent;
65+
#endif
66+
};
67+
68+
} // namespace WebKit
69+
70+
#endif // NativeWebMouseEvent_h
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (C) 2011 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. AND ITS CONTRIBUTORS ``AS IS''
14+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17+
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
* THE POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
#import "config.h"
27+
#import "NativeWebMouseEvent.h"
28+
29+
#import "WebEventFactory.h"
30+
31+
namespace WebKit {
32+
33+
NativeWebMouseEvent::NativeWebMouseEvent(NSEvent* event, NSView* view)
34+
: WebMouseEvent(WebEventFactory::createWebMouseEvent(event, view))
35+
, m_nativeEvent(event)
36+
{
37+
}
38+
39+
} // namespace WebKit
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (C) 2010 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. AND ITS CONTRIBUTORS ``AS IS''
14+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17+
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
* THE POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
#include "config.h"
27+
#include "NativeWebMouseEvent.h"
28+
29+
#include "WebEventFactoryQt.h"
30+
31+
namespace WebKit {
32+
33+
NativeWebMouseEvent::NativeWebMouseEvent(QGraphicsSceneMouseEvent* event, int eventClickCount)
34+
: WebMouseEvent(WebEventFactory::createWebMouseEvent(event, eventClickCount))
35+
, m_nativeEvent(event)
36+
{
37+
}
38+
39+
} // namespace WebKit
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (C) 2011 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. AND ITS CONTRIBUTORS ``AS IS''
14+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15+
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16+
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
17+
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
23+
* THE POSSIBILITY OF SUCH DAMAGE.
24+
*/
25+
26+
#include "config.h"
27+
#include "NativeWebMouseEvent.h"
28+
29+
#include "WebEventFactory.h"
30+
31+
namespace WebKit {
32+
33+
NativeWebMouseEvent::NativeWebMouseEvent(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, bool didActivateWebView)
34+
: WebMouseEvent(WebEventFactory::createWebMouseEvent(hwnd, message, wParam, lParam, didActivateWebView))
35+
, m_nativeEvent()
36+
{
37+
m_nativeEvent.hwnd = hwnd;
38+
m_nativeEvent.message = message;
39+
m_nativeEvent.wParam = wParam;
40+
m_nativeEvent.lParam = lParam;
41+
}
42+
43+
} // namespace WebKit

Source/WebKit2/UIProcess/API/mac/WKView.mm

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#import "LayerTreeContext.h"
3636
#import "Logging.h"
3737
#import "NativeWebKeyboardEvent.h"
38+
#import "NativeWebMouseEvent.h"
3839
#import "PDFViewController.h"
3940
#import "PageClientImpl.h"
4041
#import "PasteboardTypes.h"
@@ -939,23 +940,33 @@ - (void)_setMouseDownEvent:(NSEvent *)event
939940
_data->_mouseDownEvent = [event retain];
940941
}
941942

943+
#define NATIVE_MOUSE_EVENT_HANDLER(Selector) \
944+
- (void)Selector:(NSEvent *)theEvent \
945+
{ \
946+
NativeWebMouseEvent webEvent(theEvent, self); \
947+
_data->_page->handleMouseEvent(webEvent); \
948+
}
949+
950+
NATIVE_MOUSE_EVENT_HANDLER(mouseEntered)
951+
NATIVE_MOUSE_EVENT_HANDLER(mouseExited)
952+
NATIVE_MOUSE_EVENT_HANDLER(otherMouseDown)
953+
NATIVE_MOUSE_EVENT_HANDLER(otherMouseDragged)
954+
NATIVE_MOUSE_EVENT_HANDLER(otherMouseMoved)
955+
NATIVE_MOUSE_EVENT_HANDLER(otherMouseUp)
956+
NATIVE_MOUSE_EVENT_HANDLER(rightMouseDown)
957+
NATIVE_MOUSE_EVENT_HANDLER(rightMouseDragged)
958+
NATIVE_MOUSE_EVENT_HANDLER(rightMouseMoved)
959+
NATIVE_MOUSE_EVENT_HANDLER(rightMouseUp)
960+
961+
#undef NATIVE_MOUSE_EVENT_HANDLER
962+
942963
#define EVENT_HANDLER(Selector, Type) \
943964
- (void)Selector:(NSEvent *)theEvent \
944965
{ \
945966
Web##Type##Event webEvent = WebEventFactory::createWeb##Type##Event(theEvent, self); \
946967
_data->_page->handle##Type##Event(webEvent); \
947968
}
948969

949-
EVENT_HANDLER(mouseEntered, Mouse)
950-
EVENT_HANDLER(mouseExited, Mouse)
951-
EVENT_HANDLER(otherMouseDown, Mouse)
952-
EVENT_HANDLER(otherMouseDragged, Mouse)
953-
EVENT_HANDLER(otherMouseMoved, Mouse)
954-
EVENT_HANDLER(otherMouseUp, Mouse)
955-
EVENT_HANDLER(rightMouseDown, Mouse)
956-
EVENT_HANDLER(rightMouseDragged, Mouse)
957-
EVENT_HANDLER(rightMouseMoved, Mouse)
958-
EVENT_HANDLER(rightMouseUp, Mouse)
959970
EVENT_HANDLER(scrollWheel, Wheel)
960971

961972
#undef EVENT_HANDLER
@@ -966,17 +977,15 @@ - (void)mouseMoved:(NSEvent *)event
966977
if (self == [[self window] firstResponder] && !NSPointInRect([self convertPoint:[event locationInWindow] fromView:nil], [self visibleRect]))
967978
return;
968979

969-
WebMouseEvent webEvent = WebEventFactory::createWebMouseEvent(event, self);
970-
_data->_page->handleMouseEvent(webEvent);
980+
_data->_page->handleMouseEvent(NativeWebMouseEvent(event, self));
971981
}
972982

973983
- (void)_mouseHandler:(NSEvent *)event
974984
{
975985
NSInputManager *currentInputManager = [NSInputManager currentInputManager];
976986
if ([currentInputManager wantsToHandleMouseEvents] && [currentInputManager handleMouseEvent:event])
977987
return;
978-
WebMouseEvent webEvent = WebEventFactory::createWebMouseEvent(event, self);
979-
_data->_page->handleMouseEvent(webEvent);
988+
_data->_page->handleMouseEvent(NativeWebMouseEvent(event, self));
980989
}
981990

982991
- (void)mouseDown:(NSEvent *)event

Source/WebKit2/UIProcess/API/qt/qwkpage.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include "FindIndicator.h"
3535
#include "LocalizedStrings.h"
3636
#include "NativeWebKeyboardEvent.h"
37+
#include "NativeWebMouseEvent.h"
3738
#include "NotImplemented.h"
3839
#include "TiledDrawingAreaProxy.h"
3940
#include "WebContext.h"
@@ -306,32 +307,27 @@ void QWKPagePrivate::mouseMoveEvent(QGraphicsSceneMouseEvent* ev)
306307
return;
307308
lastPos = ev->pos();
308309

309-
WebMouseEvent mouseEvent = WebEventFactory::createWebMouseEvent(ev, 0);
310-
page->handleMouseEvent(mouseEvent);
310+
page->handleMouseEvent(NativeWebMouseEvent(ev, 0));
311311
}
312312

313313
void QWKPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev)
314314
{
315315
if (tripleClickTimer.isActive() && (ev->pos() - tripleClick).manhattanLength() < QApplication::startDragDistance()) {
316-
WebMouseEvent mouseEvent = WebEventFactory::createWebMouseEvent(ev, 3);
317-
page->handleMouseEvent(mouseEvent);
316+
page->handleMouseEvent(NativeWebMouseEvent(ev, 3));
318317
return;
319318
}
320319

321-
WebMouseEvent mouseEvent = WebEventFactory::createWebMouseEvent(ev, 1);
322-
page->handleMouseEvent(mouseEvent);
320+
page->handleMouseEvent(NativeWebMouseEvent(ev, 1));
323321
}
324322

325323
void QWKPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
326324
{
327-
WebMouseEvent mouseEvent = WebEventFactory::createWebMouseEvent(ev, 0);
328-
page->handleMouseEvent(mouseEvent);
325+
page->handleMouseEvent(NativeWebMouseEvent(ev, 0));
329326
}
330327

331328
void QWKPagePrivate::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* ev)
332329
{
333-
WebMouseEvent mouseEvent = WebEventFactory::createWebMouseEvent(ev, 2);
334-
page->handleMouseEvent(mouseEvent);
330+
page->handleMouseEvent(NativeWebMouseEvent(ev, 2));
335331

336332
tripleClickTimer.start(QApplication::doubleClickInterval(), q);
337333
tripleClick = ev->pos().toPoint();

0 commit comments

Comments
 (0)