[Webkit-unassigned] [Bug 29247] New: document.caretRangeFromPoint() should check whether the point is within frameview's boundary before taking scroll offset into consideration

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 14 11:08:08 PDT 2009


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

           Summary: document.caretRangeFromPoint() should check whether
                    the point is within frameview's boundary before taking
                    scroll offset into consideration
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: xji at chromium.org


Created an attachment (id=39555)
 --> (https://bugs.webkit.org/attachment.cgi?id=39555)
caretRangeFromPointWithScroll.html

document.caretRangeFromPoint() might return a null range which should not. 
Please see attached file caretRangeFromPointWithScroll.html for detailed
explanation.

The problem probably is at:
    IntPoint point = roundedIntPoint(FloatPoint(x * zoomFactor, y *
zoomFactor)) + view()->scrollOffset();

    if (!frameView->boundsRect().contains(point))
        return 0;

Which should be:

    IntPoint point = roundedIntPoint(FloatPoint(x * zoomFactor, y *
zoomFactor));

    if (!frameView->boundsRect().contains(point))
        return 0;

    point += view()->scrollOffset();
    // Then, hit test.

-- 
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