[webkit-reviews] review requested: [Bug 29245] elementFromPoint() and caretRangeFromPoint() work only in initial containing block : [Attachment 39549] Patch to use different bounds checking and extend tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Sep 14 10:00:30 PDT 2009


Andrew Richards <randrew at gmail.com> has asked  for review:
Bug 29245: elementFromPoint() and caretRangeFromPoint() work only in initial
containing block
https://bugs.webkit.org/show_bug.cgi?id=29245

Attachment 39549: Patch to use different bounds checking and extend tests
https://bugs.webkit.org/attachment.cgi?id=39549&action=review

------- Additional Comments from Andrew Richards <randrew at gmail.com>
I haven't worked with WebKit before, but after reading a bit I believe the
bounds checking in Document::caretRangeFromPoint() and elementFromPoint() is
mistakenly using boundsRect() from a FrameView to find if the point is in the
viewport. This was causing it to return null if you called it with a point that
had to be scrolled to. I changed it to use visibleContentRect() instead, which
seems to have fixed it.

I also extended the tests to include checking for this issue. There are now hit
tests which require a page to be scrolled before their points are visible.


More information about the webkit-reviews mailing list