[M140] Revert "[line-clamp] Support clamping by lines and a height at the same time" [chromium/src : refs/branch-heads/7339]

0 views
Skip to first unread message

Rubber Stamper (Gerrit)

unread,
Aug 20, 2025, 12:31:21 PMAug 20
to Chrome Cherry Picker, Andreu Botella, AyeAye, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org

Rubber Stamper voted

Bot-Commit+1
Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedLint
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: refs/branch-heads/7339
Gerrit-Change-Id: Ib6afb94bb4efd6b4deca166213ab2266aa123565
Gerrit-Change-Number: 6867770
Gerrit-PatchSet: 2
Gerrit-Reviewer: Chrome Cherry Picker <chrome-che...@chops-service-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Gerrit-CC: Andreu Botella <abot...@igalia.com>
Gerrit-Comment-Date: Wed, 20 Aug 2025 16:31:12 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Aug 20, 2025, 1:54:16 PMAug 20
to Chrome Cherry Picker, Andreu Botella, Rubber Stamper, AyeAye, blink-revie...@chromium.org, blink-...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, zol...@webkit.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
[M140] Revert "[line-clamp] Support clamping by lines and a height at the same time"

Original change's description:
> Revert "[line-clamp] Support clamping by lines and a height at the same time"
>
> This reverts commit 042edf71969098eaaedcfd003de4f01a2b448a64.
>
> Reason for revert: This CL unintentionally enabled clamping by lines
> and a height at the same time even without the `CSSLineClamp` runtime
> enabled feature set, causing it to apply to `-webkit-line-clamp`. This
> new behavior seems to have broken at least some sites.
>
> Original change's description:
> > [line-clamp] Support clamping by lines and a height at the same time
> >
> > Until now, in our implementation of `line-clamp`, we allowed clamping
> > by a number of lines (e.g. `line-clamp: 3`), and clamping by a block
> > size (e.g. `line-clamp: auto`, with a block size constraint given by
> > `max-height`, for example); but we did not support clamping by both.
> > If `line-clamp: 3` was set on a container with a height that did not
> > fully fit the third line, that line would overflow, but the clamp
> > point would not be moved earlier.
> >
> > However, in the April CSSWG F2F, it was discussed that clamping by
> > both lines and a block size should be possible. This was not resolved
> > at that point, since this was tangential to the issue that was being
> > discussed, but the working group seemed to lean in that direction.
> >
> > We implement this by adding a new value to the `LineClampData::State`
> > enum, `kClampByLinesWithBfcOffset`. This state will both act as if
> > clamping by a number of lines, while at the same time checking if we
> > ever go past the BFC offset before the clamp point, in which case we
> > relayout using regular `kClampByLines`.
> >
> > Bug: 40336192
> > Change-Id: I2519c9f84b3ca41aa9418c435bea978bfe1fec73
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6757119
> > Reviewed-by: Ian Kilpatrick <ikilp...@chromium.org>
> > Commit-Queue: Andreu Botella <abot...@igalia.com>
> > Cr-Commit-Position: refs/heads/main@{#1491158}
>
> Bug: 40336192, 436345865
> Change-Id: Ib6afb94bb4efd6b4deca166213ab2266aa123565
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6836376
> Reviewed-by: Ian Kilpatrick <ikilp...@chromium.org>
> Commit-Queue: Andreu Botella <abot...@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#1499689}
Bug: 439952376,40336192,436345865
Change-Id: Ib6afb94bb4efd6b4deca166213ab2266aa123565
Commit-Queue: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-...@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/7339@{#973}
Cr-Branched-From: 27be8b77710f4405fdfeb4ee946fcabb0f6c92b2-refs/heads/main@{#1496484}
Files:
  • M third_party/blink/renderer/core/layout/block_layout_algorithm.cc
  • M third_party/blink/renderer/core/layout/block_layout_algorithm.h
  • M third_party/blink/renderer/core/layout/inline/inline_layout_algorithm.cc
  • M third_party/blink/renderer/core/layout/line_clamp_data.cc
  • M third_party/blink/renderer/core/layout/line_clamp_data.h
  • M third_party/blink/renderer/core/style/computed_style.h
  • M third_party/blink/web_tests/TestExpectations
  • M third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-line-clamp-001-ref.html
  • M third_party/blink/web_tests/external/wpt/css/css-overflow/line-clamp/line-clamp-010.html
  • M third_party/blink/web_tests/external/wpt/css/css-overflow/line-clamp/line-clamp-011.tentative.html
  • D third_party/blink/web_tests/external/wpt/css/css-overflow/line-clamp/line-clamp-035.tentative.html
  • M third_party/blink/web_tests/external/wpt/css/css-overflow/line-clamp/reference/line-clamp-011-ref.html
Change size: L
Delta: 12 files changed, 175 insertions(+), 209 deletions(-)
Branch: refs/branch-heads/7339
Submit Requirements:
  • requirement satisfiedCode-Review: Bot-Commit+1 by Rubber Stamper
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: refs/branch-heads/7339
Gerrit-Change-Id: Ib6afb94bb4efd6b4deca166213ab2266aa123565
Gerrit-Change-Number: 6867770
Gerrit-PatchSet: 3
Gerrit-Reviewer: Chrome Cherry Picker <chrome-che...@chops-service-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages