mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1551065 - Properly discard empty lines for -webkit-line-clamp. r=heycam
That being said, this code is clearly not getting hit, are we 100% sure that this is interoperable with what WebKit / Blink do? Differential Revision: https://phabricator.services.mozilla.com/D30830 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3dc303757f
commit
b4d01303d5
@ -1676,6 +1676,7 @@ static nsLineBox* FindLineClampTarget(nsBlockFrame*& aFrame,
|
||||
// Don't count a line that only has collapsible white space (as might exist
|
||||
// after calling e.g. getBoxQuads).
|
||||
if (line->IsEmpty()) {
|
||||
iter.Next();
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,19 @@
|
||||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Overflow: -webkit-line-clamp with an empty line</title>
|
||||
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp">
|
||||
<link rel="match" href="about:blank">
|
||||
<style>
|
||||
.clamp {
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
font: 16px / 32px serif;
|
||||
white-space: pre;
|
||||
background-color: yellow;
|
||||
padding: 0 4px;
|
||||
overflow: hidden; /* can be removed once implementations update their old -webkit-line-clamp implementations */
|
||||
}
|
||||
</style>
|
||||
<div class="clamp"><div><span></span></div></div>
|
Loading…
Reference in New Issue
Block a user