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

  Changed paths:
    M LayoutTests/TestExpectations
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/block-ellipsis-018.html
    M Source/WebCore/rendering/LineClampUpdater.h

  Log Message:
  -----------
  [line-clamp] line-clamp on a float or an absolutely positioned box is ignored
https://bugs.webkit.org/show_bug.cgi?id=325454
<rdar://problem/188552622>

Reviewed by Antti Koivisto.

<div style="position: absolute; width: 100px; line-clamp: 1">first line second 
line</div>

The box should show one line with an ellipsis. LineClampUpdater keeps the clamp 
of the containing block out of
floats and out-of-flow boxes, but it also returned before looking at the box's 
own max-lines, so the box never
clamped. Now it clamps its own content, and its lines still do not count 
towards an outer clamp since it
establishes an independent formatting context.

* LayoutTests/TestExpectations: block-ellipsis-018, -019, -021 and -039 pass 
now.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-overflow/line-clamp/block-ellipsis-018.html:
 Tolerate the gradient's off-by-one green pixels.
* Source/WebCore/rendering/LineClampUpdater.h:
(WebCore::LineClampUpdater::LineClampUpdater):
(WebCore::LineClampUpdater::~LineClampUpdater):

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



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

Reply via email to