Bug 118979 - firstRectForCharacterRange is wrong for SVG text (breaks Dictionary on OS X)
Summary: firstRectForCharacterRange is wrong for SVG text (breaks Dictionary on OS X)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-07-22 12:59 PDT by Alexey Proskuryakov
Modified: 2023-09-18 08:22 PDT (History)
12 users (show)

See Also:


Attachments
test case (113 bytes, image/svg+xml)
2013-07-22 12:59 PDT, Alexey Proskuryakov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2013-07-22 12:59:42 PDT
Created attachment 207265 [details]
test case

Invoking Dictionary on text in attached test case results in a wildly mispositioned highlight.

To reproduce, invoke Dictionary with Safari context menu, or with Cmd+Ctrl+D shortcut.
Comment 1 Radar WebKit Bug Importer 2016-04-11 11:41:47 PDT
<rdar://problem/25660622>
Comment 2 Ahmad Saleem 2023-09-16 15:47:57 PDT
@ap - Does 'Dictionary' got replaced by some other tool? CMD+Ctrl+D is not doing anything for me even when I have selection on text?

Is it 'Look Up' feature or do I have to enable something from Safari settings?
Comment 3 Rob Buis 2023-09-18 03:21:27 PDT
(In reply to Ahmad Saleem from comment #2)
> @ap - Does 'Dictionary' got replaced by some other tool? CMD+Ctrl+D is not
> doing anything for me even when I have selection on text?
> 
> Is it 'Look Up' feature or do I have to enable something from Safari
> settings?

I think this now works through Control-(mouse)click, then "Lookup". This seems to work fine for the attachment.
Comment 4 Rob Buis 2023-09-18 03:24:02 PDT
(In reply to Rob Buis from comment #3)
> (In reply to Ahmad Saleem from comment #2)
> > @ap - Does 'Dictionary' got replaced by some other tool? CMD+Ctrl+D is not
> > doing anything for me even when I have selection on text?
> > 
> > Is it 'Look Up' feature or do I have to enable something from Safari
> > settings?
> 
> I think this now works through Control-(mouse)click, then "Lookup". This
> seems to work fine for the attachment.

Having said that, the highlight seems to make the background and text both yellow, unlike for HTML, where the text is still readable.
Comment 5 Alexey Proskuryakov 2023-09-18 08:22:45 PDT
So looks like firstRectForCharacterRange is probably fixed, but there is a new issue with text not showing up. Could be a recent-ish regression.