Files
serenity/Tests/LibWeb/Ref/text-overflow.html
Aliaksandr Kalenik 81f2405c8b LibWeb: Fix OOB access in "text-overflow: ellipsis" clip
Fixes out of bound access to glyph run when `last_glyph_index` is 0.

Fixes crashing on https://github.com/LadybirdBrowser/ladybird/pulls

(cherry picked from commit fa605ef22577d92bbfc3f4a809bb1b4072bb0048)
2024-10-10 09:46:20 -04:00

19 lines
411 B
HTML

<!doctype html>
<link rel="match" href="reference/text-overflow.html" />
<style>
div {
overflow: hidden;
white-space: nowrap;
width: 75px;
}
.clip {
text-overflow: clip;
}
.ellipsis {
text-overflow: ellipsis;
}
</style>
<div class="clip">This text gets clipped</div>
<div class="ellipsis">This text gets an ellipsis</div>
<div class="ellipsis" style="width: 0px">Invisible</div>