[webkit-reviews] review granted: [Bug 73397] [BlackBerry] Upstream BlackBerry porting of pluginView : [Attachment 119167] Patch V5
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Dec 15 19:11:49 PST 2011
Daniel Bates <dbates at webkit.org> has granted Charles Wei
<charles.wei at torchmobile.com.cn>'s request for review:
Bug 73397: [BlackBerry] Upstream BlackBerry porting of pluginView
https://bugs.webkit.org/show_bug.cgi?id=73397
Attachment 119167: Patch V5
https://bugs.webkit.org/attachment.cgi?id=119167&action=review
------- Additional Comments from Daniel Bates <dbates at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=119167&action=review
> Source/WebCore/plugins/blackberry/PluginViewBlackBerry.cpp:532
> + npTouchEvent.points[i].touchId = touchItem->identifier();
> + npTouchEvent.points[i].clientX = touchItem->pageX() -
frameRect().x();
> + npTouchEvent.points[i].clientY = touchItem->pageY() -
frameRect().y();
> + npTouchEvent.points[i].screenX = touchItem->screenX();
> + npTouchEvent.points[i].screenY = touchItem->screenY();
> + npTouchEvent.points[i].pageX = touchItem->pageX();
> + npTouchEvent.points[i].pageY = touchItem->pageY();
Although the compiler will probably cache npTouchEvent.points, you may want to
consider dereferencing touchPoints (i.e. touchPoints[i]) instead of
dereferencing points and then dereferencing the ith point. That is, I would
have written these lines as:
touchPoints[i]. touchId = = touchItem->identifier();
touchPoints[i].clientX = touchItem->pageX() - frameRect().x();
...
touchPoints[i].pageY = touchItem->pageY();
More information about the webkit-reviews
mailing list