Hi Team, While going through Chromium Monorail, I come across another failing test case in Safari: Link - https://jsfiddle.net/progers/g1z286fL/ While trying to select text from world to next line "hello", it does not paint the selection properly and jump it to first top line while it works fine in Chrome Canary 110. It is broken in Safari Technology Preview 158 and 16.1 both, it was fixed with this commit: Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=194860 It had some pre-requisite fixes for "SelectionTestCase.js" script, which I will land first so this can be looked into as potential blink merge. Thanks!
<rdar://problem/102933142>
I tried this in following PR: https://github.com/WebKit/WebKit/pull/9749 At least selection works in local testing but it does not pass the test and also regresses other, so there might be some pre-requisite to it or some other underlying difference. NOTE - GTK does not regress the test cases, which got regressed on Mac-OS, which seems to indicate some vendor specific bits. I am closing my PR for time being and going to test more locally.
Instead of 'squaredDistanceToClosestPoint' from Chromium patch, merge this as well: https://chromium.googlesource.com/chromium/src.git/+/ec9931b6a84f86605970d9aab571d2ca429df2fa (Implement) - https://chromium.googlesource.com/chromium/src.git/+/ac7237a24b28daa6f1c5292f32e940cc63fba39d
Only got this failure locally: svg/text/select-textLength-spacingAndGlyphs-squeeze-3.svg This would make it pass: <svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 160 120"> <g id="container"/> <!-- "Squ" should be selected, char 8-10 --> <text id="test" x="10" y="10" font-family="Arial" font-size="10" textLength="50" lengthAdjust="spacingAndGlyphs">Text to Squeeze</text> <script xlink:href="resources/SelectionTestCase.js"/> <script>selectRange("test", 8, 10, "o ");</script> </svg>
float FloatRect::squaredDistanceTo(const FloatPoint& point) const { FloatPoint closestPoint; closestPoint.setX(clampTo<float>(point.x(), x(), maxX())); closestPoint.setY(clampTo<float>(point.y(), y(), maxY())); return (point - closestPoint).diagonalLengthSquared(); } ^ In FloatRect.cpp float squaredDistanceTo(const FloatPoint&) const; ^ In FloatRect.h ____ Just wanted to update.