Bug 35760 - [Chromium] Adding Chromium -> WebCore touch type conversions
Summary: [Chromium] Adding Chromium -> WebCore touch type conversions
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Enhancement
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 11:55 PST by Garret Kelly
Modified: 2010-03-04 22:09 PST (History)
2 users (show)

See Also:


Attachments
Initial patch (6.56 KB, patch)
2010-03-04 12:01 PST, Garret Kelly
eric: review-
Details | Formatted Diff | Diff
First-round review changes (6.03 KB, patch)
2010-03-04 14:23 PST, Garret Kelly
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.