Bug 78788

Summary: [Qt] Move event conversion functions from WebCore to WebKit
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: New BugsAssignee: Simon Hausmann <hausmann>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 78109    
Attachments:
Description Flags
[Qt] Move event conversion functions from WebCore to WebKit
none
[Qt] Move event conversion functions from WebCore to WebKit kenneth: review+

Description Simon Hausmann 2012-02-16 01:56:21 PST
[Qt] Move event conversion functions from WebCore to WebKit
Comment 1 Simon Hausmann 2012-02-16 02:00:38 PST
Created attachment 127330 [details]
[Qt] Move event conversion functions from WebCore to WebKit
Comment 2 Kenneth Rohde Christiansen 2012-02-16 02:12:37 PST
Comment on attachment 127330 [details]
[Qt] Move event conversion functions from WebCore to WebKit

View in context: https://bugs.webkit.org/attachment.cgi?id=127330&action=review

> Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp:131
> +WebKitPlatformMouseEvent::WebKitPlatformMouseEvent(QInputEvent* event, int clickCount)

WebPlatformMouseEvent? :-)

> Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp:163
> +PlatformMouseEvent convertMouseEvent(QInputEvent* event, int clickCount)
> +{
> +    return WebKitPlatformMouseEvent(event, clickCount);
> +}

What do you gain with these methods? I am not sure they make the code clearer
Comment 3 Simon Hausmann 2012-02-16 02:15:38 PST
Comment on attachment 127330 [details]
[Qt] Move event conversion functions from WebCore to WebKit

View in context: https://bugs.webkit.org/attachment.cgi?id=127330&action=review

>> Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp:131
>> +WebKitPlatformMouseEvent::WebKitPlatformMouseEvent(QInputEvent* event, int clickCount)
> 
> WebPlatformMouseEvent? :-)

In WebKit2 the same "class" is called WebKit2PlatformMouseEvent, so I thought I'd be consistent.

>> Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp:163
>> +}
> 
> What do you gain with these methods? I am not sure they make the code clearer

I can also make these classes public if you prefer that, I choose that method because it's also used in WK2's WebEventConversion.
Comment 4 Simon Hausmann 2012-02-16 02:17:34 PST
Comment on attachment 127330 [details]
[Qt] Move event conversion functions from WebCore to WebKit

View in context: https://bugs.webkit.org/attachment.cgi?id=127330&action=review

> Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp:206
> +    // ### PlatformEvent(PlatformEvent::Wheel, e->modifiers() & Qt::ShiftModifier, e->modifiers() & Qt::ControlModifier, e->modifiers() & Qt::AltModifier, e->modifiers() & Qt::MetaModifier, WTF::currentTime())

Ooops, I meant to fix this. Will upload a new patch.
Comment 5 Simon Hausmann 2012-02-16 02:20:54 PST
Created attachment 127332 [details]
[Qt] Move event conversion functions from WebCore to WebKit
Comment 6 Kenneth Rohde Christiansen 2012-02-16 02:25:20 PST
Comment on attachment 127332 [details]
[Qt] Move event conversion functions from WebCore to WebKit

View in context: https://bugs.webkit.org/attachment.cgi?id=127332&action=review

rs=me

> Source/WebKit/qt/WebCoreSupport/WebEventConversion.cpp:136
> +#ifndef QT_NO_CONTEXTMENU

didnt we want to get rid of these?
Comment 7 Simon Hausmann 2012-02-16 02:31:30 PST
Committed r107915: <http://trac.webkit.org/changeset/107915>