Skip to content

Commit 7bbfbb7

Browse files
committed
[LFC][Integration] Disable non-text content with floats
https://bugs.webkit.org/show_bug.cgi?id=219122 Reviewed by Antti Koivisto. Non-text content may stretch the line and we don't yet have support for dynamic float avoiding (as the line grows). * layout/integration/LayoutIntegrationCoverage.cpp: (WebCore::LayoutIntegration::canUseForLineLayoutWithReason): Canonical link: https://commits.webkit.org/231768@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270027 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 2a1d81a commit 7bbfbb7

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

Source/WebCore/ChangeLog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2020-11-19 Zalan Bujtas <zalan@apple.com>
2+
3+
[LFC][Integration] Disable non-text content with floats
4+
https://bugs.webkit.org/show_bug.cgi?id=219122
5+
6+
Reviewed by Antti Koivisto.
7+
8+
Non-text content may stretch the line and we don't yet have support for dynamic float avoiding (as the line grows).
9+
10+
* layout/integration/LayoutIntegrationCoverage.cpp:
11+
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
12+
113
2020-11-19 Zalan Bujtas <zalan@apple.com>
214

315
[LFC][Integration] Allow subpixel difference in the computed containing block height when switching between line layout systems

Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ OptionSet<AvoidanceReason> canUseForLineLayoutWithReason(const RenderBlockFlow&
712712
// This currently covers <blockflow>#text</blockflow>, <blockflow>#text<br></blockflow> and mutiple (sibling) RenderText cases.
713713
// The <blockflow><inline>#text</inline></blockflow> case is also popular and should be relatively easy to cover.
714714
for (const auto* child = flow.firstChild(); child; child = child->nextSibling()) {
715+
if (!is<RenderText>(*child) && flow.containsFloats()) {
716+
// Non-text content may stretch the line and we don't yet have support for dynamic float avoiding (as the line grows).
717+
SET_REASON_AND_RETURN_IF_NEEDED(FlowHasUnsupportedFloat, reasons, includeReasons);
718+
}
715719
auto childReasons = canUseForChild(*child, includeReasons);
716720
if (childReasons)
717721
ADD_REASONS_AND_RETURN_IF_NEEDED(childReasons, reasons, includeReasons);

0 commit comments

Comments
 (0)