Bug 250280
| Summary: | Simplify computation of text selection top/bottom in Legacy Root Inline | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | bfulgham, rniwa, simon.fraser, webkit-bug-importer, zalan |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ahmad Saleem
Hi Team,
This is another Blink commit and it is with own merits and issue in terms of text selection but just wanted to raise it for input purposes before doing PR:
Blink Commit - https://chromium.googlesource.com/chromium/src.git/+/e1ac96c0207dd18057fc1f385362b1bee52bb26f
WebKit Source - https://searchfox.org/wubkat/source/Source/WebCore/rendering/LegacyRootInlineBox.cpp#513 & https://searchfox.org/wubkat/source/Source/WebCore/rendering/LegacyRootInlineBox.cpp#580
One of Test Case - https://jsfiddle.net/p7hged1y/show (from Bug Report) & https://jsfiddle.net/265wb09s/1/show (latter show that the text selection covers part of second line compared to Chrome Canary 111 and Firefox Nightly 110) in Safari 16.2.
Appreciate if someone can share their input whether it is good idea to merge this or not because as per Chrome bug history, it is lesser devil's approach where neither solutions are perfect.
Thanks!
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/104266007>
Ahmad Saleem
276347@main <- tackled and removed the code.
Ahmad Saleem
Although we can do still part of std::min() / std::max():
return std::max(selectionBottom, nextRootBox()->selectionTop());
but main clean-up is already done.