GNOME Bugzilla – Bug 523759
Gecko.getCharacterOffsetInParent() needs to check the parent for text
Last modified: 2008-03-26 21:48:59 UTC
A couple of weeks ago, the Firefox a11y guys implemented the Hyperlink interface for imagemap links (yea!). Unfortunately, getCharacterOffsetInParent() uses the Hyperlink interface to determine where an embedded object character is w.r.t. the parent's text -- without first checking to see if the parent actually has text. This is why line navigation -- and actually all caret navigation -- broke in the vicinity of imagemaps. Running the regression tests on what should be a simple patch. Stay tuned! :-)
Created attachment 107778 [details] [review] revision 1 Check to see if the parent implements the accessible Text interface. (Also updated a regression test to remove the "KNOWN ISSUE" I had added when this problem presented itself.). This is pylinted and regression tested. Mike please test. Will, can you think of an occasion where an object implements the Hyperlink interface, the parent does *not* implement the Text interface, and we still want to return an offset (rather than -1)? Thanks.
So far I'm not seeing any problems related to this patch.
(In reply to comment #1) > Will, can you think of an occasion where an object implements the Hyperlink > interface, the parent does *not* implement the Text interface, and we still > want to return an offset (rather than -1)? I cannot. There's something in the back of my mind regarding a recent conversation with someone about hyperlinks that I cannot remember right now, but I don't think it is related to the above.
This tests out OK but I don't know if it should be checked in without Will's comments.
Patch committed to the 2-22 branch and to trunk. Moving to pending.