Bug 92144 - [chromium] Add a bounding box member in WebGestureEvent
Summary: [chromium] Add a bounding box member in WebGestureEvent
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Terry Anderson
URL:
Keywords:
Depends on:
Blocks: 92151
  Show dependency treegraph
 
Reported: 2012-07-24 11:07 PDT by Terry Anderson
Modified: 2012-07-24 13:33 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.91 KB, patch)
2012-07-24 11:11 PDT, Terry Anderson
no flags Details | Formatted Diff | Diff
Patch for landing (3.50 KB, patch)
2012-07-24 12:11 PDT, Terry Anderson
no flags Details | Formatted Diff | Diff
Patch (2.44 KB, patch)
2012-07-24 12:40 PDT, Terry Anderson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Terry Anderson 2012-07-24 11:07:14 PDT
The new |boundingBox| member will be used to store the touch region for a WebGestureEvent. This will be useful for gesture target fuzzing across multiple different gesture types (tap, long press, scroll, etc.)
Comment 1 Terry Anderson 2012-07-24 11:11:29 PDT
Created attachment 154111 [details]
Patch
Comment 2 WebKit Review Bot 2012-07-24 11:12:49 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 3 Sadrul Habib Chowdhury 2012-07-24 11:22:28 PDT
Comment on attachment 154111 [details]
Patch

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

Can you also update the computation of PlatformGestureEvent::m_area at the same time? (looks like should be trivial?)

> Source/WebKit/chromium/public/WebInputEvent.h:42
> +struct WebRect;

This probably isn't necessary since you include the header?

> Source/WebKit/chromium/public/WebInputEvent.h:388
> +        , boundingBox(0, 0, 0, 0)

WebRect initializes itself correctly. This should not be necessary.
Comment 4 Adam Barth 2012-07-24 11:58:39 PDT
Comment on attachment 154111 [details]
Patch

Please address sadrul's concerns before landing.
Comment 5 Terry Anderson 2012-07-24 12:11:49 PDT
Created attachment 154117 [details]
Patch for landing
Comment 6 Adam Barth 2012-07-24 12:20:24 PDT
Comment on attachment 154117 [details]
Patch for landing

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

> Source/WebKit/chromium/src/WebInputEventConversion.cpp:155
>          m_type = PlatformEvent::GestureTap;
> -        m_area = IntSize(e.deltaX * 2, e.deltaY * 2);
> +        IntRect bounds(e.boundingBox);
> +        m_area = IntSize(bounds.width(), bounds.height());

Don't you need to do this in a subsequent patch once your change to WebInputEvent has landed and you've updated Chromium to use this API?
Comment 7 Adam Barth 2012-07-24 12:20:48 PDT
Comment on attachment 154117 [details]
Patch for landing

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

> Source/WebKit/chromium/public/WebInputEvent.h:373
>      // NOTE: |deltaX| and |deltaY| represents the amount to scroll for Scroll gesture events. For Pinch gesture events, |deltaX| represents the scaling/magnification factor. For a GestureTap event, |deltaX| and |deltaY| represent the horizontal and vertical radii of the touch region.

Do we need to update this comment?
Comment 8 Terry Anderson 2012-07-24 12:37:10 PDT
(In reply to comment #6)
> (From update of attachment 154117 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154117&action=review
> 
> > Source/WebKit/chromium/src/WebInputEventConversion.cpp:155
> >          m_type = PlatformEvent::GestureTap;
> > -        m_area = IntSize(e.deltaX * 2, e.deltaY * 2);
> > +        IntRect bounds(e.boundingBox);
> > +        m_area = IntSize(bounds.width(), bounds.height());
> 
> Don't you need to do this in a subsequent patch once your change to WebInputEvent has landed and you've updated Chromium to use this API?

Yes, you're right... I will make this change in another patch once the Chromium side has landed.
Comment 9 Terry Anderson 2012-07-24 12:38:24 PDT
(In reply to comment #7)
> (From update of attachment 154117 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=154117&action=review
> 
> > Source/WebKit/chromium/public/WebInputEvent.h:373
> >      // NOTE: |deltaX| and |deltaY| represents the amount to scroll for Scroll gesture events. For Pinch gesture events, |deltaX| represents the scaling/magnification factor. For a GestureTap event, |deltaX| and |deltaY| represent the horizontal and vertical radii of the touch region.
> 
> Do we need to update this comment?

Yes, we do. I'll update it in the next patch after this and the Chromium patch both land.
Comment 10 Terry Anderson 2012-07-24 12:40:00 PDT
Created attachment 154121 [details]
Patch
Comment 11 WebKit Review Bot 2012-07-24 13:32:58 PDT
Comment on attachment 154121 [details]
Patch

Clearing flags on attachment: 154121

Committed r123520: <http://trac.webkit.org/changeset/123520>
Comment 12 WebKit Review Bot 2012-07-24 13:33:04 PDT
All reviewed patches have been landed.  Closing bug.