RESOLVED FIXED 108678
[BlackBerry]Adjust fatfinger detection rect size
https://bugs.webkit.org/show_bug.cgi?id=108678
Summary [BlackBerry]Adjust fatfinger detection rect size
Tiancheng Jiang
Reported 2013-02-01 12:47:18 PST
When we do fatfinger, the detection rect size should not be expanded beyond the viewport size to detect any element not visible(out of the viewport)
Attachments
Patch (7.22 KB, patch)
2013-02-01 13:11 PST, Tiancheng Jiang
no flags
Patch (3.82 KB, patch)
2013-02-04 09:22 PST, Tiancheng Jiang
no flags
Patch (5.49 KB, patch)
2013-02-14 14:17 PST, Tiancheng Jiang
no flags
Patch (1.78 KB, patch)
2013-02-25 08:16 PST, Tiancheng Jiang
no flags
Tiancheng Jiang
Comment 1 2013-02-01 13:11:27 PST
Antonio Gomes
Comment 2 2013-02-01 14:49:54 PST
Comment on attachment 186116 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186116&action=review TJ: could you test one thing: instead of doing all this, could you not pass HitTestRequest::IgnoreClipping to requestType? and see if it helps > Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp:463 > getPaddings(topPadding, rightPadding, bottomPadding, leftPadding); > > + // Do not allow fat fingers detect anything not visible(ie outside of the viewport) > + adjustPaddings(contentViewportPos, topPadding, rightPadding, bottomPadding, leftPadding); not better to have a getAdjustedPaddings? (merge both methods)
Tiancheng Jiang
Comment 3 2013-02-01 16:28:00 PST
Hi Antonio, I tried to remove the HitTestRequest::IgnoreClipping and it seems working. But I am wondering what is clipping the result rect and will this change break other test cases? (In reply to comment #2) > (From update of attachment 186116 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186116&action=review > > TJ: could you test one thing: instead of doing all this, could you not pass HitTestRequest::IgnoreClipping to requestType? and see if it helps > > > Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp:463 > > getPaddings(topPadding, rightPadding, bottomPadding, leftPadding); > > > > + // Do not allow fat fingers detect anything not visible(ie outside of the viewport) > > + adjustPaddings(contentViewportPos, topPadding, rightPadding, bottomPadding, leftPadding); > > not better to have a getAdjustedPaddings? (merge both methods)
Antonio Gomes
Comment 4 2013-02-01 19:00:13 PST
(In reply to comment #3) > Hi Antonio, I tried to remove the HitTestRequest::IgnoreClipping and it seems working. But I am wondering what is clipping the result rect and will this change break other test cases? Better! Ok, you might need to still clip the result rect, yes.
Tiancheng Jiang
Comment 5 2013-02-04 09:22:04 PST
Antonio Gomes
Comment 6 2013-02-04 09:57:59 PST
Comment on attachment 186398 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=186398&action=review Much simpler :) > Source/WebKit/blackberry/Api/WebPage.cpp:3941 > + PlatformWheelEvent wheelEvent(mouseEvent.documentViewportPosition(), mouseEvent.screenPosition(), where does documentViewportPosition come from? :) > Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp:284 > + frameContentPos = Platform::pointClampedToRect(frameContentPos, viewportRect); if 'point' is out of the 'rect', what does it return? 0,0, -1,-1. clicking can still be sent to this coords.
Tiancheng Jiang
Comment 7 2013-02-04 10:17:45 PST
We decide to do the transfer the document position in libwebview. they all fix one bug but might make mors sense if i seperate it in another patch. For the pointClampedtoRect function, if the point is outside the rect, we move the point inside the rect and return it. (In reply to comment #6) > (From update of attachment 186398 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=186398&action=review > > Much simpler :) > > > Source/WebKit/blackberry/Api/WebPage.cpp:3941 > > + PlatformWheelEvent wheelEvent(mouseEvent.documentViewportPosition(), mouseEvent.screenPosition(), > > where does documentViewportPosition come from? :) > > > Source/WebKit/blackberry/WebKitSupport/FatFingers.cpp:284 > > + frameContentPos = Platform::pointClampedToRect(frameContentPos, viewportRect); > > if 'point' is out of the 'rect', what does it return? > > 0,0, -1,-1. clicking can still be sent to this coords.
Yong Li
Comment 8 2013-02-04 11:23:54 PST
Comment on attachment 186398 [details] Patch Thanks Antonio :)
WebKit Review Bot
Comment 9 2013-02-04 13:14:10 PST
Comment on attachment 186398 [details] Patch Clearing flags on attachment: 186398 Committed r141797: <http://trac.webkit.org/changeset/141797>
WebKit Review Bot
Comment 10 2013-02-04 13:14:14 PST
All reviewed patches have been landed. Closing bug.
Tiancheng Jiang
Comment 11 2013-02-14 14:17:52 PST
Reopening to attach new patch.
Tiancheng Jiang
Comment 12 2013-02-14 14:17:54 PST
WebKit Review Bot
Comment 13 2013-02-22 13:26:08 PST
Comment on attachment 188423 [details] Patch Clearing flags on attachment: 188423 Committed r143783: <http://trac.webkit.org/changeset/143783>
WebKit Review Bot
Comment 14 2013-02-22 13:26:12 PST
All reviewed patches have been landed. Closing bug.
Alberto Garcia
Comment 15 2013-02-25 01:16:00 PST
> void FatFingers::getNodesFromRect(Document* document, const IntPoint& contentPos, ListHashSet<RefPtr<Node> >& intersectedNodes) > { > unsigned topPadding, rightPadding, bottomPadding, leftPadding; > - getPaddings(topPadding, rightPadding, bottomPadding, leftPadding); > + IntPoint contentViewportPos = m_webPage->mapFromContentsToViewport(m_contentPos); > + // Do not allow fat fingers detect anything not visible(ie outside of the viewport) > + adjustPaddings(contentViewportPos, topPadding, rightPadding, bottomPadding, leftPadding); Is this correct? adjustPaddings() doesn't seem to be defined anywhere, shouldn't it be getAdjustedPaddings() instead?
Tiancheng Jiang
Comment 16 2013-02-25 07:49:41 PST
Yes it should be getAdjustedPaddings(), a mistake when prepare the upstream patch. Thanks Alberto! (In reply to comment #15) > > void FatFingers::getNodesFromRect(Document* document, const IntPoint& contentPos, ListHashSet<RefPtr<Node> >& intersectedNodes) > > { > > unsigned topPadding, rightPadding, bottomPadding, leftPadding; > > - getPaddings(topPadding, rightPadding, bottomPadding, leftPadding); > > + IntPoint contentViewportPos = m_webPage->mapFromContentsToViewport(m_contentPos); > > + // Do not allow fat fingers detect anything not visible(ie outside of the viewport) > > + adjustPaddings(contentViewportPos, topPadding, rightPadding, bottomPadding, leftPadding); > > Is this correct? adjustPaddings() doesn't seem to be defined anywhere, > shouldn't it be getAdjustedPaddings() instead?
Tiancheng Jiang
Comment 17 2013-02-25 08:16:27 PST
Reopening to attach new patch.
Tiancheng Jiang
Comment 18 2013-02-25 08:16:33 PST
Rob Buis
Comment 19 2013-02-25 08:17:13 PST
Comment on attachment 190066 [details] Patch LGTM.
WebKit Review Bot
Comment 20 2013-02-25 09:01:11 PST
Comment on attachment 190066 [details] Patch Clearing flags on attachment: 190066 Committed r143933: <http://trac.webkit.org/changeset/143933>
WebKit Review Bot
Comment 21 2013-02-25 09:01:16 PST
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.