WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
143000
Empty or all-space inline element with spaces around it, and has white-space:pre, word-spacing on its parent, causes wrong rendered width
https://bugs.webkit.org/show_bug.cgi?id=143000
Summary
Empty or all-space inline element with spaces around it, and has white-space:...
Duan Yao
Reported
2015-03-24 01:20:15 PDT
Created
attachment 249321
[details]
test cases In webkit, if an empty or all-space inline element has space(s) before or after it, and has white-space:pre, word-spacing on its parent, the width of the line will be wrong. In following lines, widths between two "M"s should be the same. But in Webkit, widths in the third and following lines are narrower than the first 2 lines: <div style="white-space:pre; word-spacing:1em;"> <div>M M (4 spaces in text)</div> <div>M<span style="background-color:red;"> </span>M (4 space in a inline)</div> <div>M <span style="background-color:red;"></span> M (2 space before, 2 space after, 0 space in the inline)</div> <div>M <span style="background-color:red;"> </span> M (1 space before and after, 2 space in the inline)</div> <div>M<span style="background-color:red;"> </span> M (0 space before, 2 space after, 2 space in the inline)</div> <div>M <span style="background-color:red;"> </span>M (2 space before, 0 space after, 2 space in the inline)</div> </div> You can also reproduce this issue by opening the attachment.
Attachments
test cases
(937 bytes, text/html)
2015-03-24 01:20 PDT
,
Duan Yao
no flags
Details
Test case2
(891 bytes, text/html)
2015-03-27 09:38 PDT
,
alan
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
alan
Comment 1
2015-03-27 09:38:10 PDT
Created
attachment 249574
[details]
Test case2
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