Skip to content

Commit

Permalink
[IFC][Coverage] Merge FlowTextIsSVGInlineText and ContentIsSVG
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=261046

Reviewed by Antti Koivisto.

ContentIsSVG integration work will address the FlowTextIsSVGInlineText case too.

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

Canonical link: https://commits.webkit.org/267727@main
  • Loading branch information
alanbaradlay committed Sep 7, 2023
1 parent f5fa2ec commit d833b3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ static void printReason(AvoidanceReason reason, TextStream& stream)
case AvoidanceReason::FlowHasLineSnap:
stream << "-webkit-line-snap property";
break;
case AvoidanceReason::FlowTextIsSVGInlineText:
stream << "SVGInlineText";
break;
case AvoidanceReason::MultiColumnFlowHasVerticalWritingMode:
stream << "column has vertical writing mode";
break;
Expand Down Expand Up @@ -285,8 +282,7 @@ static OptionSet<AvoidanceReason> canUseForChild(const RenderBlockFlow& flow, co

if (is<RenderText>(child)) {
if (child.isSVGInlineText())
SET_REASON_AND_RETURN_IF_NEEDED(FlowTextIsSVGInlineText, reasons, includeReasons);

SET_REASON_AND_RETURN_IF_NEEDED(ContentIsSVG, reasons, includeReasons);
return reasons;
}

Expand All @@ -309,10 +305,7 @@ static OptionSet<AvoidanceReason> canUseForChild(const RenderBlockFlow& flow, co
if (renderer.isRubyRun())
SET_REASON_AND_RETURN_IF_NEEDED(ContentIsRuby, reasons, includeReasons);
#endif
if (is<RenderBlockFlow>(renderer) || is<RenderGrid>(renderer) || is<RenderFlexibleBox>(renderer) || is<RenderDeprecatedFlexibleBox>(renderer) || is<RenderReplaced>(renderer) || is<RenderListItem>(renderer) || is<RenderTable>(renderer))
return reasons;

if (is<RenderListMarker>(renderer))
if (is<RenderBlockFlow>(renderer) || is<RenderGrid>(renderer) || is<RenderFlexibleBox>(renderer) || is<RenderDeprecatedFlexibleBox>(renderer) || is<RenderReplaced>(renderer) || is<RenderListItem>(renderer) || is<RenderTable>(renderer) || is<RenderListMarker>(renderer))
return reasons;

if (is<RenderInline>(renderer)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ enum class AvoidanceReason : uint64_t {
// Unused = 1LLU << 36,
// Unused = 1LLU << 37,
// Unused = 1LLU << 38,
FlowTextIsSVGInlineText = 1LLU << 39,
// Unused = 1LLU << 39,
// Unused = 1LLU << 40,
FeatureIsDisabled = 1LLU << 41,
// Unused = 1LLU << 42,
Expand Down

0 comments on commit d833b3d

Please sign in to comment.