haikuwebkit/LayoutTests/fast/inline/inline-root-with-negative-m...

2 lines
74 B
HTML
Raw Permalink Normal View History

REGRESSION: Safari v14.1 computes element height to be 33,554,432 pixels https://bugs.webkit.org/show_bug.cgi?id=226006 <rdar://problem/78471122> Reviewed by Antti Koivisto. Source/WebCore: We fail to find the intrusive floats when they don't line up with the top of the line. The fix is twofold here. - when probing for the intrusive float boxes, we need to look at both the line geometry and the initial line constraints. When the intrusive floats take up the entire horizontal space and the line ends up with no inline content, the computed line geometry may come back with a 0px tall line. Now if we probe the intrusive floats at [top: 0px, bottom: 0px] and they happen to have a vertical offset e.g 1px, we won't find them (since we only scan at 0px vertically). - if we still don't find the intrusive float(s), let's just offset the next line by the line height candidate (e.g. 18px) instead of the "inifitePoint". The layout will likely be incorrect but it won't produce an infinitely tall content. Test: fast/inline/inline-root-with-negative-margin-and-sibling-float.html * layout/floats/FloatingContext.h: * layout/formattingContexts/inline/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::lineLayout): LayoutTests: * fast/inline/inline-root-with-negative-margin-and-sibling-float-expected.html: Added. * fast/inline/inline-root-with-negative-margin-and-sibling-float.html: Added. Canonical link: https://commits.webkit.org/238159@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-05-26 13:28:02 +00:00
<div style="width: 100px; height: 190px; background-color: green;"></div>