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

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-with-floats-015-expected.xht
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-with-floats-015.html
    M Source/WebCore/rendering/RenderBlockFlow.cpp
    M Source/WebCore/rendering/RenderBlockFlow.h

  Log Message:
  -----------
  [line-clamp] Floats make the line-clamp container taller
https://bugs.webkit.org/show_bug.cgi?id=327005
<rdar://problem/189630233>

Reviewed by Antti Koivisto.

<div style="line-clamp: 2"><div style="float: left; width: 10px; height: 
200px"></div>Line 1<br>Line 2<br>Line 3</div>

The line-clamp container should be two lines tall, but it grows to the bottom 
of the float.
"Within a line-clamp container, floats which have not been made into invisible 
boxes must be visually clipped to the
unshaped block-end content edge of the line-clamp container. They do not 
introduce any clearance that would make the
line-clamp container increase its height, and do not contribute to the 
scrollable overflow area."
https://drafts.csswg.org/css-overflow-4/#line-clamp-containers

Now a block container that establishes a line-clamp container does not expand 
its height to encompass its floats.

Test: 
imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-with-floats-015.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-with-floats-015-expected.xht:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/line-clamp-with-floats-015.html:
 Added.
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlock):
(WebCore::RenderBlockFlow::establishesLineClampContainer const):
* Source/WebCore/rendering/RenderBlockFlow.h:

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



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

Reply via email to