[Webkit-unassigned] [Bug 30034] New: caretRangeFromPoint() returns wrong result for a zoomed and scrolled page

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 2 16:25:37 PDT 2009


           Summary: caretRangeFromPoint() returns wrong result for a
                    zoomed and scrolled page
           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=40556)
 --> (https://bugs.webkit.org/attachment.cgi?id=40556)
test case

1. Open the attached HTML
2. click mouse somewhere to show the offset of mouse within the element
3. zoom the page *and* resize the window to make the page scroll
4. scroll the page horizontally and/or vertically, 
5. click mouse in the same place as step 2., observe the printed offset.

the printd offset is different when page is zoomed and scrolled.

the printed offset should be the same.

Problem: in Document.caretRangeFromPoint()

    IntPoint point = roundedIntPoint(FloatPoint(x * zoomFactor, y *
zoomFactor)) + view()->scrollOffset();

    should be:

    IntPoint point = roundedIntPoint(FloatPoint((x + view()->scrollX()) *
zoomFactor, (y + view()->scrollY()) * zoomFactor));

Same bug applies to elementFromPoint() as well.

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