Bug 35760

Summary: [Chromium] Adding Chromium -> WebCore touch type conversions
Product: WebKit Reporter: Garret Kelly <gdk>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: commit-queue, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Attachments:
Description Flags
Initial patch
eric: review-
First-round review changes none

Description Garret Kelly 2010-03-04 11:55:06 PST
Adding platform event/point builders for the corresponding Chromium types.
Comment 1 Garret Kelly 2010-03-04 12:01:22 PST
Created attachment 50043 [details]
Initial patch
Comment 2 Eric Seidel (no email) 2010-03-04 14:00:35 PST
Comment on attachment 50043 [details]
Initial patch

Aren't PlatformTouchEvent used as stack objects?  They're not ref-counted, so I assume no one holds pointers to them.  In that case, virtual methods (like virtual destructors) make no sense!

This seems like the wrong model.  Normally Platform*Event classes are passed a WebKit-layer class pointer and they convert that.  This seems to be going the opposite way for reasons I dont' understand.
Comment 3 Garret Kelly 2010-03-04 14:22:42 PST
(In reply to comment #2)
> (From update of attachment 50043 [details])
> Aren't PlatformTouchEvent used as stack objects?  They're not ref-counted, so I
> assume no one holds pointers to them.  In that case, virtual methods (like
> virtual destructors) make no sense!

Fair enough. I'll remove the virtual destructors.

> This seems like the wrong model.  Normally Platform*Event classes are passed a
> WebKit-layer class pointer and they convert that.  This seems to be going the
> opposite way for reasons I dont' understand.

In Chromium, WebInputEvents (the Chromium layer types) are converted to their WebKit-layer counterparts by subclassing them and handling the conversion in their constructors (The Platform*Builder classes). This logic lives in WebKit/WebKit/chromium/src/WebInputEventConversion.cpp.
Comment 4 Garret Kelly 2010-03-04 14:23:47 PST
Created attachment 50054 [details]
First-round review changes

Removed virtual destructors from PlatformTouchEvent and PlatformTouchPoint.
Comment 5 WebKit Commit Bot 2010-03-04 22:09:29 PST
Comment on attachment 50054 [details]
First-round review changes

Clearing flags on attachment: 50054

Committed r55572: <http://trac.webkit.org/changeset/55572>
Comment 6 WebKit Commit Bot 2010-03-04 22:09:33 PST
All reviewed patches have been landed.  Closing bug.