[Webkit-unassigned] [Bug 44089] [Qt] Making effective use of Document::nodesFromRect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 16 20:38:29 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44089


Antonio Gomes <tonikitoo at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|webkit-unassigned at lists.web |tonikitoo at webkit.org
                   |kit.org                     |
  Attachment #64549|                            |review?
               Flag|                            |




--- Comment #1 from Antonio Gomes <tonikitoo at webkit.org>  2010-08-16 20:38:29 PST ---
Created an attachment (id=64549)
 --> (https://bugs.webkit.org/attachment.cgi?id=64549)
patch v1

Patch adds a helper class (named TouchAdjuster) to improve tap actions on mobile touch devices. TouchAdjuster makes use of the newly added rect based hit test extension through the Document::nodesFromRect method. Given a rectangle as input, nodesFromRect returns a z-index ordered list of nodes whose boundaries intersect the rectangle.

Basically the TouchAdjuster class intercepts the QGraphicsSceneMouseEvent passed to both QWebPagePrivate::mouse{Press,Release}Event methods before they are passed down to WebCore. The goal is to infer the target click position. For that, a rectangle is built up using the event position as a center point and expanding it both horizontally and vertically, based on the values set in QWebSettings::hitTestPadding.

TouchAdjuster iterates over the list of nodes returned by nodesFromRect and picks the clickable one that has the largest intersection area with the hit test rectangle. The target position is then the center point of this intersection area.

In case of no clickable node intersects the hit test area, the click position is not altered.

TouchAdjuster is *only* working for QGraphicsWebView based views.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list