Skip to content
  • commit-queue@webkit.org's avatar
    Best zoomable area does not balance intersection with target area. · 98364e92
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=83148
    
    Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-04-04
    Reviewed by Kenneth Rohde Christiansen.
    
    Source/WebCore:
    
    Change the two step sort to simply picking the best quotient of touch intersection with target area.
    
    Test: touchadjustment/zoom-fatfinger.html
    
    * page/TouchAdjustment.cpp:
    (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
    (TouchAdjustment):
    (WebCore::TouchAdjustment::zoomableIntersectionQuotient):
    (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
    (WebCore::findBestClickableCandidate):
    (WebCore::findBestZoomableArea):
    
    LayoutTests:
    
    * touchadjustment/zoom-fatfinger-expected.txt: Added.
    * touchadjustment/zoom-fatfinger.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    98364e92