Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 930a551da22e901e916a28421caadb2521739056
      
https://github.com/WebKit/WebKit/commit/930a551da22e901e916a28421caadb2521739056
  Author: Alan Baradlay <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-063-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-063.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-064-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-064.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/reference/line-clamp-auto-063-ref.html
    M Source/WebCore/rendering/LineClampUpdater.cpp

  Log Message:
  -----------
  [line-clamp] line-clamp: auto clamps inside a box with a set height
https://bugs.webkit.org/show_bug.cgi?id=326281
<rdar://problem/189138321>

Reviewed by Antti Koivisto.

<div style="line-clamp: auto; max-height: 6lh; white-space: pre">Line 1
Line 2
Line 3
Line 4
<div style="height: 3lh">Line 5
Line 6</div>Line 7</div>

The block ellipsis should be on Line 4. The auto clamp point was after Line 6, 
since Lines 5 and 6 fit within max-height,
but the block keeps its 3lh height whatever its content, so clamping inside it 
does not make the line-clamp container
any shorter than clamping before it, and the container would still go past 
max-height.

Now when a block of the line-clamp container that does not fit has a set 
height, or a min-height that does not fit, no
clamp point inside it is used, and the clamp point is before it (after Line 4).

Tests: 
imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-063.html
       
imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-064.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-063-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-063.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-064-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-auto-064.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/reference/line-clamp-auto-063-ref.html:
 Added.
* Source/WebCore/rendering/LineClampUpdater.cpp:
(WebCore::LineClampUpdater::autoClampPoint const):

Canonical link: https://commits.webkit.org/322842@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to