Skip to content

Commit

Permalink
[IFC][Integration] Enable non-inflow list items for IFC
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=248370

Reviewed by Antti Koivisto.

* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::printReason):
(WebCore::LayoutIntegration::canUseForChild):
(WebCore::LayoutIntegration::canUseForLineLayoutWithReason):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.h:

Canonical link: https://commits.webkit.org/257050@main
  • Loading branch information
alanbaradlay committed Nov 27, 2022
1 parent 5da705d commit ac7cf1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Expand Up @@ -5,7 +5,7 @@ layer at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 776x584
RenderBlock {DIV} at (0,0) size 108x584 [border: (3px solid #FFA500)]
RenderListItem {DIV} at (11,11) size 122x122 [bgcolor=#FFA500] [border: (3px solid #FFA500)]
RenderListMarker at (11,-18) size 19x7: bullet
RenderListMarker at (12,-18) size 19x7: bullet
RenderListItem {DIV} at (11,11) size 86x562 [border: (3px solid #FFA500)]
RenderListItem {DIV} at (11,11) size 64x540 [border: (3px solid #FFA500)]
RenderListItem {DIV} at (11,11) size 42x518 [border: (3px solid #FFA500)]
Expand Down
Expand Up @@ -142,8 +142,8 @@ static void printReason(AvoidanceReason reason, TextStream& stream)
case AvoidanceReason::ContentIsSVG:
stream << "SVG content";
break;
case AvoidanceReason::FlowIsUnsupportedListItem:
stream << "list item with text-indent";
case AvoidanceReason::ChildIsUnsupportedListItem:
stream << "list item with floats";
break;
case AvoidanceReason::FlowHasInitialLetter:
stream << "intial letter";
Expand Down Expand Up @@ -430,7 +430,7 @@ static OptionSet<AvoidanceReason> canUseForChild(const RenderObject& child, Incl
auto* associatedListItem = listMarker.listItem();
for (auto* ancestor = listMarker.containingBlock(); ancestor; ancestor = ancestor->containingBlock()) {
if (ancestor->containsFloats())
SET_REASON_AND_RETURN_IF_NEEDED(FlowIsUnsupportedListItem, reasons, includeReasons);
SET_REASON_AND_RETURN_IF_NEEDED(ChildIsUnsupportedListItem, reasons, includeReasons);
if (ancestor == associatedListItem)
break;
}
Expand Down Expand Up @@ -493,8 +493,6 @@ OptionSet<AvoidanceReason> canUseForLineLayoutWithReason(const RenderBlockFlow&
}
if (flow.isRubyText() || flow.isRubyBase())
SET_REASON_AND_RETURN_IF_NEEDED(ContentIsRuby, reasons, includeReasons);
if (is<RenderListItem>(flow) && (flow.isPositioned() || flow.isFloating()))
SET_REASON_AND_RETURN_IF_NEEDED(FlowIsUnsupportedListItem, reasons, includeReasons);
#if ENABLE(VIDEO)
if (is<RenderVTTCue>(flow) || is<RenderVTTCue>(flow.parent())) {
// First child of the RenderVTTCue is the backdropBox.
Expand Down
Expand Up @@ -98,7 +98,7 @@ enum class AvoidanceReason : uint64_t {
// Unused = 1LLU << 58,
// Unused = 1LLU << 59,
// Unused = 1LLU << 60,
FlowIsUnsupportedListItem = 1LLU << 61,
ChildIsUnsupportedListItem = 1LLU << 61,
EndOfReasons = 1LLU << 62
};

Expand Down

0 comments on commit ac7cf1d

Please sign in to comment.