[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:Ian Kilpatrick <ikilpatrick@chromium.org> Cr-Commit-Position: refs/heads/main@{#1281769}
Loading
Please register or sign in to comment