Bug 79117

Summary: [chromium] Fix issues in visiblePositionForWindowPoint (offscreen points / iframes).
Product: WebKit Reporter: Oli Lan <olilan>
Component: New BugsAssignee: Oli Lan <olilan>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, fishd, varunjain, vivekjkumar266, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 66687    
Attachments:
Description Flags
Patch none

Description Oli Lan 2012-02-21 08:46:35 PST
[chromium] Fix issues in visiblePositionForWindowPoint (offscreen points / iframes).
Comment 1 Oli Lan 2012-02-21 08:53:16 PST
Created attachment 127981 [details]
Patch
Comment 2 Eric Seidel (no email) 2012-05-21 15:05:59 PDT
Comment on attachment 127981 [details]
Patch

How do we test this?
Comment 3 Ryosuke Niwa 2012-07-13 15:36:53 PDT
Comment on attachment 127981 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=127981&action=review

> Source/WebKit/chromium/ChangeLog:14
> +        1) If the point is off-screen, the visiblePosition is clipped to the screen.
> +           - The fix is to add HitTestRequest::IgnoreClipping.
> +
> +        2) The result is incorrect if the point is within an iframe.
> +           - This is because we are calling convertFromContainingWindow twice: once in windowToContents,
> +             and then explicitly as well.
> +           - This patch removes the explicit call to convertFromContainingWindow. 

We need tests for these two problems.

> Source/WebKit/chromium/ChangeLog:16
> +        Reviewed by NOBODY (OOPS!).

This line should appear before the long description.
Comment 4 Adam Barth 2012-07-27 01:43:44 PDT
Comment on attachment 127981 [details]
Patch

We really should write tests for this sort of patch.  I feel a bit like I'm encouraging bad behavior by approving this patch, but I also want you to encourage you to submit patches to WebKit.  On balance, I'm going to r+ this patch, but please include tests with future patches.  You should also feel encouraged to upload a followup patch that contains a patch.  If you're unsure how to write a test for this issue, I'm happy to help.
Comment 5 WebKit Review Bot 2012-07-27 02:36:40 PDT
Comment on attachment 127981 [details]
Patch

Clearing flags on attachment: 127981

Committed r123855: <http://trac.webkit.org/changeset/123855>
Comment 6 WebKit Review Bot 2012-07-27 02:36:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Oli Lan 2012-07-27 02:38:50 PDT
Thanks Adam. I meant to come back to this to add tests but hadn't got round to it. I'll add tests for these cases in another patch.
Comment 8 Adam Barth 2012-07-27 02:41:06 PDT
Thanks.  I figured it just got lost in the shuffle.