Bug 258505 - Hairline on selection
Summary: Hairline on selection
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Text (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-25 19:03 PDT by Ebrahim Byagowi
Modified: 2023-07-02 19:04 PDT (History)
3 users (show)

See Also:


Attachments
Safari vs Edge (291.74 KB, image/png)
2023-06-25 19:03 PDT, Ebrahim Byagowi
no flags Details
test reduction (337 bytes, text/html)
2023-06-26 09:11 PDT, zalan
no flags Details
test reduction (386 bytes, text/html)
2023-06-26 09:12 PDT, zalan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ebrahim Byagowi 2023-06-25 19:03:05 PDT
Created attachment 466821 [details]
Safari vs Edge

It's similar to bugs like Bug 220548,

Reproduction:
1. Open https://the-decoder.com/why-large-ai-language-models-dont-lead-to-human-like-ai/
2. Select any paragraph from the article

Actual:
Note that one pixel lines after each word

Expected:
Similar to other browsers
Comment 1 zalan 2023-06-26 09:11:01 PDT
interesting, this seems to be caused by negative word-spacing. Thank you for filing it!
Comment 2 zalan 2023-06-26 09:11:26 PDT
Created attachment 466825 [details]
test reduction
Comment 3 zalan 2023-06-26 09:12:32 PDT
Created attachment 466826 [details]
test reduction
Comment 4 Ebrahim Byagowi 2023-06-26 13:25:31 PDT
Thanks for the quick response 😊

There is also a horizontal gap on selection on the second paragraph, maybe that can be interesting on a separate matter as it isn't related to white-space.
Comment 5 Ebrahim Byagowi 2023-06-27 12:13:47 PDT
Please ignore my previous comment as it's a spin off of the main issue here which now it's filed as Bug 258584
Comment 6 zalan 2023-06-27 18:37:38 PDT
(In reply to Ebrahim Byagowi from comment #5)
> Please ignore my previous comment as it's a spin off of the main issue here
> which now it's filed as Bug 258584
Thank you!
Comment 7 zalan 2023-06-27 20:28:18 PDT
For simple cases (like this one) we should be able to merge adjacent display boxes so that painting code sees them as one run, but in general we should teach TextBoxPainter to paint selection across runs.
Comment 8 Radar WebKit Bug Importer 2023-07-02 19:04:14 PDT
<rdar://problem/111661724>