[Webkit-unassigned] [Bug 96593] [Chromium?] REGRESSION(r127457): Context menu on textarea is displayed in the wrong place

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 13 08:40:27 PDT 2012


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





--- Comment #5 from Allan Sandfeld Jensen <allan.jensen at nokia.com>  2012-09-13 08:40:53 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > Possibly related to bug #96541
> 
> Tried the fix locally but it didn't solve the issue AFAICT.
> 
> (In reply to comment #2)
> > (In reply to comment #1)
> > > I can not reproduce the issue on Qt either.
> > > 
> > > I have a guess on the cause though. EventHandler::hitTestResultAtPoint used to have a quirk/bug where it changed the result.point() so that after the function it was in the coordinates of the last frame it hit-tested. It no longer does that, if you use that position for the context menu have code that corrects for the old bug, it might be wrong now that it is no longer necessary.
> 
> Toying with the example, this is exactly the issue. We seem to be converting the result of hitTestResultAtPoint to the window coordinates, therefore adding the iframe's position twice to the context menu's top left point.
> 
Okay, at least that is better than not knowing the source.

> > No, I have checked the chromium code now, and the only place that uses the returned position hitTestResultAtPoint is WebFrameImpl::characterIndexForPoint, and that one should work more correctly now.
> 
> After your change, anything that manipulates the returned position from hitTestResultAtPoint across frames can be wrong. I am not super happy that this was completely overlooked. Debugging the issue, ContextMenuController is doing exactly that and would be my bet for what is wrong.

It wasn't overlooked, I checked all the call sites I could find of the function, and in the places I found that used the position it would either not make a difference, or would actually fix rare corner cases. I will take a deeper look at the contextMenuController. In general though the point in hitTestResult should probably be deprecated, it is just a left-over from when HitTestPoint and HitTestResult were the same.

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