Comment 104 for bug 134813

Revision history for this message
In , Cristian Klein (cristiklein) wrote :

Created an attachment (id=420901)
Patch against HEAD which fixes this bug.

I attached a patch against HEAD to fix this bug.

Rationale: when a caret exists and the context menu is activated from the keyboard, FF simulates a right-click at the lowest coordinate of the caret. Since the caret's rectangle is stored in twips while mouse coordinates are in pixels, a conversion must happen between these two. AppUnitsToDevPixels does this using round-to-nearest, which however, might return a pixel which belong to the text line below the caret.

Instead of implementing a new conversion function which returns a round-down value, this patch offers a less intrusive solution. Rounding "compensation" takes place in the function that should be concerned with this, right after the conversion takes place.

Tested with Firefox (today's HEAD) on Ubuntu 9.10 with http://wwwb.forbidden.co.uk/~jbj/firefoxbug.html.

Could somebody please help me on how to get someone to review and check this in?

Thanks.