Skip to content
Commit e39c15f4 authored by Andreu Botella's avatar Andreu Botella Committed by Chromium LUCI CQ
Browse files

[line-clamp] Implement the line-clamp CSS property

This patch adds the `line-clamp` property, as well as the
`CSSLineClamp` Blink feature. It also makes in-flow inline and block
elements after the clamp point hidden for paint in both `line-clamp`
and `-webkit-line-clamp` when that feature is enabled, reusing some
existing machinery for table cells.

This patch does not yet handle hiding out of flow boxes, or
height-based clamping. That is left for follow-up CLs.

Since `-webkit-line-clamp` and `line-clamp` would usually generate the
same `ComputedStyle::LineClamp` method, we instead give those methods
the custom names `WebkitLineClamp` and `StandardLineClamp`, and reuse
the existing method names `LineClamp` and `HasLineClamp` for custom
methods that take both properties into account.

Bug: 40336192
Change-Id: Ic7d0cf6f218b45bd2b7aa5bdd26adaeff9d492db
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5317993


Commit-Queue: Andreu Botella <abotella@igalia.com>
Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1281769}
parent 4dbbcc10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment