RESOLVED FIXED 98110
[chromium] Make sure the touch-points in the touch-events have the correct state.
https://bugs.webkit.org/show_bug.cgi?id=98110
Summary [chromium] Make sure the touch-points in the touch-events have the correct st...
Sadrul Habib Chowdhury
Reported 2012-10-01 21:27:43 PDT
[chromium] Make sure the touch-points in the touch-events have the correct state.
Attachments
Patch (11.63 KB, patch)
2012-10-01 21:32 PDT, Sadrul Habib Chowdhury
no flags
Patch (12.43 KB, patch)
2012-10-02 00:03 PDT, Sadrul Habib Chowdhury
no flags
Patch (12.44 KB, patch)
2012-10-02 09:55 PDT, Sadrul Habib Chowdhury
no flags
Sadrul Habib Chowdhury
Comment 1 2012-10-01 21:32:41 PDT
Adam Barth
Comment 2 2012-10-01 23:04:05 PDT
Comment on attachment 166600 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166600&action=review > Source/WebKit/chromium/src/WebInputEventConversion.cpp:339 > +static inline WebTouchPoint::State toWebTouchPointState(const AtomicString& type) static and inline are redundant. > Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:94 > + switch (state) { > + case WebKit::WebTouchPoint::StateReleased: return stateReleased.data(); > + case WebKit::WebTouchPoint::StatePressed: return statePressed.data(); > + case WebKit::WebTouchPoint::StateMoved: return stateMoved.data(); > + case WebKit::WebTouchPoint::StateCancelled: return stateCancelled.data(); > + default: break; > + } This switch statement is not in the proper style. Why are you creating these CStrings? You can just return pointers to the string literals. > Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:108 > + const WebKit::WebTouchEvent& touch = reinterpret_cast<const WebKit::WebTouchEvent&>(event); reinterpret_cast -> static_cast Please read up on the differences between these two kinds of C++ casts, especially as they related to multi-inheritance. Using the wrong cast can result is subtle, dangerous bugs!
Sadrul Habib Chowdhury
Comment 3 2012-10-02 00:02:47 PDT
Comment on attachment 166600 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166600&action=review >> Source/WebKit/chromium/src/WebInputEventConversion.cpp:339 >> +static inline WebTouchPoint::State toWebTouchPointState(const AtomicString& type) > > static and inline are redundant. Fixed (also fixed the other cases of the same issue in this file). >> Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:94 >> + } > > This switch statement is not in the proper style. > > Why are you creating these CStrings? You can just return pointers to the string literals. Fixed. >> Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:108 >> + const WebKit::WebTouchEvent& touch = reinterpret_cast<const WebKit::WebTouchEvent&>(event); > > reinterpret_cast -> static_cast > > Please read up on the differences between these two kinds of C++ casts, especially as they related to multi-inheritance. Using the wrong cast can result is subtle, dangerous bugs! Whoops. My bad. Fixed. Thanks!
Sadrul Habib Chowdhury
Comment 4 2012-10-02 00:03:00 PDT
Adam Barth
Comment 5 2012-10-02 09:46:29 PDT
Comment on attachment 166622 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166622&action=review > Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:80 > +const char* pointState(WebKit::WebTouchPoint::State state) This function should probably be static > Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:99 > +void printTouchList(const WebKit::WebTouchPoint* points, int length) ditto > Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:105 > +void printEventDetails(const WebKit::WebInputEvent& event) ditto
Sadrul Habib Chowdhury
Comment 6 2012-10-02 09:55:46 PDT
Sadrul Habib Chowdhury
Comment 7 2012-10-02 09:56:31 PDT
Comment on attachment 166622 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166622&action=review >> Tools/DumpRenderTree/chromium/TestWebPlugin.cpp:80 >> +const char* pointState(WebKit::WebTouchPoint::State state) > > This function should probably be static My bad. Fixed all cases.
Adam Barth
Comment 8 2012-10-02 12:16:43 PDT
Comment on attachment 166703 [details] Patch Thanks!
WebKit Review Bot
Comment 9 2012-10-02 12:35:12 PDT
Comment on attachment 166703 [details] Patch Clearing flags on attachment: 166703 Committed r130197: <http://trac.webkit.org/changeset/130197>
WebKit Review Bot
Comment 10 2012-10-02 12:35:16 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.