Closed Bug 1643126 Opened 4 years ago Closed 4 years ago

Incorrect text measurement/wrapping when letter-spacing and pre-wrap in effect

Categories

(Core :: Layout: Text and Fonts, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

(Regressed 1 open bug, )

Details

Attachments

(1 file, 1 obsolete file)

See https://github.com/webcompat/web-bugs/issues/53534.

Reduced example:

<!DOCTYPE html>
<style>
div { float: left; clear: left; border: 1px solid silver; letter-spacing: 0.1em; }
.test { white-space: pre-line; }
</style>
<div>Two lines<br>of text</div>
<div class=test>Two lines
of text</div>

We get an unexpected line-break after "Two" in the second <div>.

Attachment #9153994 - Attachment is obsolete: true
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/89f9261a60ad
When measuring text, don't include letter-spacing on a preformatted newline character. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24056 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR merged by moz-wptsync-bot
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Regressions: 1762819
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: