A span-tag at the end of a paragraph, e.g: <p>Text <span></span></p> Does not have a proper offsetLeft when there is a whitespace between the text and span-tag.
Created attachment 23600 [details] Testcase A testcase for this, that will print an error if a strange wrong offsetLeft is received. It passes on FireFox/3.0.1.
Created attachment 461375 [details] Safari 15.6 differs from other browsers I am able to reproduce this bug based on attached test case and Safari show extra line (Expected offsetLeft for empty span-tag...), which is not present in other browsers as can be seen from attached screenshot. I am changing "bug" status to NEW. Thanks!
<rdar://problem/98070891>
Blink amended following function: https://searchfox.org/wubkat/source/Source/WebCore/rendering/RenderInline.cpp#349 Blink Commit: https://chromium.googlesource.com/chromium/src.git/+/3f2d20670580468a07e5664b3ce7697c9a9ff72e
This is about WebKit's useTrailingWhitespaceMeasuringOptimization (see TextUtil::width)