[webkit-changes] [WebKit/WebKit] 28a808: 'line-clamp: discard' may leave boxes with no asso...
Alan Baradlay
noreply at github.com
Mon Sep 23 13:50:22 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 28a8081f8973b69d0b2f6601af8dbdc5322a81a8
https://github.com/WebKit/WebKit/commit/28a8081f8973b69d0b2f6601af8dbdc5322a81a8
Author: Alan Baradlay <zalan at apple.com>
Date: 2024-09-23 (Mon, 23 Sep 2024)
Changed paths:
M LayoutTests/TestExpectations
A LayoutTests/fast/inline/line-clamp-discard-assert-expected.txt
A LayoutTests/fast/inline/line-clamp-discard-assert.html
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h
M Source/WebCore/layout/layouttree/LayoutBoxGeometry.cpp
M Source/WebCore/layout/layouttree/LayoutBoxGeometry.h
Log Message:
-----------
'line-clamp: discard' may leave boxes with no associated BoxGeometry
https://bugs.webkit.org/show_bug.cgi?id=280023
<rdar://135587304>
Reviewed by Antti Koivisto.
'Line-clamp: discard' (the standard version of -webkit-line-clamp) now allows us to not lay out content after the clamped line at all.
While in theory we do not need to create BoxGeometry objects for such discarded content, in practice we may query them in many places.
* LayoutTests/TestExpectations: we end up not laying out this 'discarded' render which is okay in this case. Need to find a generic solution though.
* LayoutTests/fast/inline/line-clamp-discard-assert-expected.txt: Added.
* LayoutTests/fast/inline/line-clamp-discard-assert.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::layout):
(WebCore::Layout::InlineFormattingContext::lineLayout):
(WebCore::Layout::InlineFormattingContext::resetBoxGeometriesForDiscardedContent):
(WebCore::Layout::InlineFormattingContext::resetGeometryForClampedContent): Deleted.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.h:
* Source/WebCore/layout/layouttree/LayoutBoxGeometry.cpp:
(WebCore::Layout::BoxGeometry::reset):
* Source/WebCore/layout/layouttree/LayoutBoxGeometry.h:
Canonical link: https://commits.webkit.org/284099@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list