Bug 29247

Summary: document.caretRangeFromPoint() should check whether the point is within frameview's boundary before taking scroll offset into consideration
Product: WebKit Reporter: Xiaomei Ji <xji>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: jshin, mjs, sam, xji
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
caretRangeFromPointWithScroll.html none

Xiaomei Ji
Reported 2009-09-14 11:08:08 PDT
Created attachment 39555 [details] 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.
Attachments
caretRangeFromPointWithScroll.html (1.50 KB, text/html)
2009-09-14 11:08 PDT, Xiaomei Ji
no flags
Sam Weinig
Comment 1 2009-09-14 14:28:06 PDT
Is this a dup of bug 29245?
Xiaomei Ji
Comment 2 2009-09-14 14:53:54 PDT
*** This bug has been marked as a duplicate of bug 29245 ***
Note You need to log in before you can comment on or make changes to this bug.