Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 74b1b947dfce993dbc28adc5802564d5e8ea8abe
https://github.com/WebKit/WebKit/commit/74b1b947dfce993dbc28adc5802564d5e8ea8abe
Author: Alan Baradlay <[email protected]>
Date: 2023-05-06 (Sat, 06 May 2023)
Changed paths:
A LayoutTests/fast/inline/list-marker-nested-and-collapsed-expected.html
A LayoutTests/fast/inline/list-marker-nested-and-collapsed.html
M
LayoutTests/platform/ios/editing/pasteboard/innerText-inline-table-expected.txt
M LayoutTests/platform/ios/fast/css/empty-pseudo-class-expected.txt
M LayoutTests/platform/ios/fast/css/first-child-pseudo-class-expected.txt
M LayoutTests/platform/ios/fast/css/first-of-type-pseudo-class-expected.txt
M LayoutTests/platform/ios/fast/css/last-child-pseudo-class-expected.txt
M LayoutTests/platform/ios/fast/css/last-of-type-pseudo-class-expected.txt
M LayoutTests/platform/ios/fast/css/only-child-pseudo-class-expected.txt
M LayoutTests/platform/ios/fast/css/only-of-type-pseudo-class-expected.txt
M
LayoutTests/platform/mac/editing/pasteboard/innerText-inline-table-expected.txt
M LayoutTests/platform/mac/fast/css/empty-pseudo-class-expected.txt
M LayoutTests/platform/mac/fast/css/first-child-pseudo-class-expected.txt
M LayoutTests/platform/mac/fast/css/first-of-type-pseudo-class-expected.txt
M LayoutTests/platform/mac/fast/css/last-child-pseudo-class-expected.txt
M LayoutTests/platform/mac/fast/css/last-of-type-pseudo-class-expected.txt
M LayoutTests/platform/mac/fast/css/only-child-pseudo-class-expected.txt
M LayoutTests/platform/mac/fast/css/only-of-type-pseudo-class-expected.txt
M
Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp
M Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
M Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp
Log Message:
-----------
[IFC][list marker] Overlapping list items when content has line-height: 0
https://bugs.webkit.org/show_bug.cgi?id=256390
<rdar://108208934>
Reviewed by Antti Koivisto.
Depending on the list item content, markers may get inserted into descendant
block containers.
<li><div id=block_container>this is where the list marker ends up</div></li>
produces a render tree with the list marker is placed under [block_container]
However this list marker should behave as if it was under the <li> for line
stretching purposes.
<li><div style="line-height: 0">should not collapse the line</div></li>
Just because the marker is inside the <div>, the line-height: 0px; does not
apply and hence
the line is supposed to be stretched by the list marker's (non-zero)layout
bounds. While in case of
<li style="line-height: 0"><div>should collapse the line</div></li>
the list marker's layout bounds computes to 0 and the line gets collapsed.
This patch applies this heuristic by letting list markers always stretch the
line with their layout bounds
and use the computed line heigh (and not where the list marker lives) to set
the layout bounds value.
(-expected changes <- back to matching legacy)
* LayoutTests/fast/inline/list-marker-nested-and-collapsed-expected.html: Added.
* LayoutTests/fast/inline/list-marker-nested-and-collapsed.html: Added.
* Source/WebCore/layout/formattingContexts/inline/InlineFormattingGeometry.cpp:
(WebCore::Layout::InlineFormattingGeometry::inlineLevelBoxAffectsLineBox const):
* Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp:
(WebCore::Layout::LineBoxBuilder::setVerticalPropertiesForInlineLevelBox const):
* Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:
(WebCore::LayoutIntegration::LineLayout::updateLayoutBoxDimensions):
Canonical link: https://commits.webkit.org/263754@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes