[webkit-changes] [WebKit/WebKit] f34b77: REGRESSION (256989 at main): YouTube "read more" link...

Alan Baradlay noreply at github.com
Tue Jan 10 09:54:00 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f34b777b4bffa63b6aac999a773782b38427669e
      https://github.com/WebKit/WebKit/commit/f34b777b4bffa63b6aac999a773782b38427669e
  Author: Alan Baradlay <zalan at apple.com>
  Date:   2023-01-10 (Tue, 10 Jan 2023)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/text/layout-overflow-for-line-clamped-content-expected.html
    A LayoutTests/fast/text/layout-overflow-for-line-clamped-content.html
    M LayoutTests/imported/w3c/web-platform-tests/css/css-flexbox/alignment/flex-align-baseline-line-clamp-001.tentative-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-align-baseline-line-clamp-001.tentative-expected.txt
    M LayoutTests/platform/ios/fast/overflow/line-clamp-expected.txt
    M LayoutTests/platform/mac/fast/overflow/line-clamp-expected.txt
    M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
    M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h

  Log Message:
  -----------
  REGRESSION (256989 at main): YouTube "read more" links are missing, long comments cut off
https://bugs.webkit.org/show_bug.cgi?id=250270
<rdar://103942782>

Reviewed by Antti Koivisto.

This patch addresses 2 issues with IFC's -webkit-line-clamp implementation:
1. -webkit-line-clamp expects the clamped content to be laid out when overflow is hidden (even completely collapsed blocks too). They produce layout overflow.
(The fix is to not early-return in InlineFormattingContext::lineLayout when we reach the clamped line)
2. The height of the inline content is measured from the top of the first line to the bottom of the clamped line (0 when the content is fully collapsed).
(The fix is to take clamping into account in LineLayout::contentLogicalHeight)

-reset some of the IFC progressions in LayoutTest.

* LayoutTests/fast/text/layout-overflow-for-line-clamped-content-expected.html: Added.
* LayoutTests/fast/text/layout-overflow-for-line-clamped-content.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::lineEndingEllipsisPolicy):
(WebCore::Layout::InlineFormattingContext::lineLayout):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::lastLineIndexForContentHeight const):
(WebCore::LayoutIntegration::LineLayout::contentLogicalHeight const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.h:

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




More information about the webkit-changes mailing list