WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
20957
offsetLeft is wrong for span-tags in some conditions
https://bugs.webkit.org/show_bug.cgi?id=20957
Summary
offsetLeft is wrong for span-tags in some conditions
Arne
Reported
2008-09-20 04:39:03 PDT
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.
Attachments
Testcase
(676 bytes, text/html)
2008-09-20 04:41 PDT
,
Arne
no flags
Details
Safari 15.6 differs from other browsers
(616.87 KB, image/png)
2022-08-03 04:28 PDT
,
Ahmad Saleem
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Arne
Comment 1
2008-09-20 04:41:21 PDT
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.
Ahmad Saleem
Comment 2
2022-08-03 04:28:21 PDT
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!
Radar WebKit Bug Importer
Comment 3
2022-08-03 13:03:05 PDT
<
rdar://problem/98070891
>
Ahmad Saleem
Comment 4
2023-06-13 14:51:45 PDT
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
zalan
Comment 5
2023-06-14 09:28:37 PDT
This is about WebKit's useTrailingWhitespaceMeasuringOptimization (see TextUtil::width)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug