[Webkit-unassigned] [Bug 143000] New: Empty or all-space inline element with spaces around it, and has white-space:pre, word-spacing on its parent, causes wrong rendered width
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Mar 24 01:20:15 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=143000
Bug ID: 143000
Summary: Empty or all-space inline element with spaces around
it, and has white-space:pre, word-spacing on its
parent, causes wrong rendered width
Classification: Unclassified
Product: WebKit
Version: 528+ (Nightly build)
Hardware: PC
OS: Linux
Status: NEW
Severity: Normal
Priority: P2
Component: Text
Assignee: webkit-unassigned at lists.webkit.org
Reporter: duanyao at ustc.edu
Created attachment 249321
--> https://bugs.webkit.org/attachment.cgi?id=249321&action=review
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150324/9f7e8139/attachment-0002.html>
More information about the webkit-unassigned
mailing list