Bug 213308

Summary: Gap in selection highlight between adjacent inlines with mixed or right-to-left writing directions
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, simon.fraser, thorton, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
URL: data:text/html,B<bdo%20dir=rtl>B</span><script>getSelection().selectAllChildren(document.body)</script>
Attachments:
Description Flags
Screenshot none

Description mitz 2020-06-17 11:10:39 PDT
Created attachment 402134 [details]
Screenshot

To reproduce this bug:
1. In Safari with the default font settings, navigate to the URL

Result:
There is a one-pixel gap in the selection highlight between the two letters.

Notes:
Whether or not this happens in a given case depends on fonts, size, and the widths of individual strings, but I observe this frequently on webpages with bidirectional text.
Comment 1 Radar WebKit Bug Importer 2020-06-17 18:25:42 PDT
<rdar://problem/64472016>
Comment 2 mitz 2020-07-07 20:02:17 PDT
Also happens when all inlines are right-to-left, for example in
<bdo dir="rtl"><span>A</span><span>B</span><span>A</span><span>B</span><span>A</span><span>B</span></bdo>
Comment 3 mitz 2020-07-07 20:03:24 PDT
In the above example you can see both a gap and some one-pixel overlaps where the highlight is darker.