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

  Changed paths:
    M Source/WebCore/rendering/LineClampUpdater.cpp

  Log Message:
  -----------
  [line-clamp] line-clamp: auto containers have no line clamp until they find 
the clamp point
https://bugs.webkit.org/show_bug.cgi?id=327036
<rdar://problem/189652879>

Reviewed by Antti Koivisto.

<div style="line-clamp: auto; height: 100px"><div style="float: left; height: 
200px"></div></div>

A line-clamp container with max-lines: auto (line-clamp: auto) sets up the line 
clamp in the layout state only once layout
finds an auto clamp point, so content of a line-clamp container that does not 
get clamped is laid out as if it was not in one.
"A line-clamp container is an independent block formatting context ..."
https://drafts.csswg.org/css-overflow-4/#line-clamp-containers

Now such a container sets up the line clamp from the start, with a budget that 
does not run out (like the one before the clamp
point of setClampAfterBox), until it finds the clamp point.

* Source/WebCore/rendering/LineClampUpdater.cpp:
(WebCore::LineClampUpdater::LineClampUpdater):

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



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

Reply via email to