WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-248200-20221121182547.patch (text/plain), 2.07 KB, created by
alan
on 2022-11-21 18:25:47 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2022-11-21 18:25:47 PST
Size:
2.07 KB
patch
obsolete
>From c5da040c8e1b32fc091cece26cc15c551320608b Mon Sep 17 00:00:00 2001 >From: Alan Baradlay <zalan@apple.com> >Date: Mon, 21 Nov 2022 18:23:54 -0800 >Subject: [PATCH] [IFC][Line clamp] Enable line-clamp for simple flex item > https://bugs.webkit.org/show_bug.cgi?id=248200 > >Reviewed by NOBODY (OOPS!). > >Let's enable (deprecated)flex boxes with one simple, non-nested flex items. > >* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp: >(WebCore::LayoutIntegration::canUseForStyle): >--- > .../integration/LayoutIntegrationCoverage.cpp | 16 ++++++++++++++-- > 1 file changed, 14 insertions(+), 2 deletions(-) > >diff --git a/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp b/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp >index 804276000a8e..47e2d25ad659 100644 >--- a/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp >+++ b/Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp >@@ -327,8 +327,20 @@ static OptionSet<AvoidanceReason> canUseForStyle(const RenderElement& renderer, > } > return nullptr; > }; >- if (auto* ancestor = deprecatedFlexBoxAncestor(); ancestor && !ancestor->style().lineClamp().isNone()) >- SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineClamp, reasons, includeReasons); >+ if (auto* ancestor = deprecatedFlexBoxAncestor(); ancestor && !ancestor->style().lineClamp().isNone()) { >+ auto isSupportedLineClamp = [&] { >+ if (ancestor->style().lineClamp().isPercentage()) >+ return false; >+ auto* firstFlexItem = ancestor->firstChild(); >+ // Only support one flex item with no nested content. >+ if (!is<RenderBlockFlow>(firstFlexItem) || ancestor->firstChild() != ancestor->lastChild()) >+ return false; >+ auto* firstInFlowChild = downcast<RenderBlockFlow>(*firstFlexItem).firstChild(); >+ return firstInFlowChild && firstInFlowChild->isInline(); >+ }; >+ if (!isSupportedLineClamp()) >+ SET_REASON_AND_RETURN_IF_NEEDED(FlowHasLineClamp, reasons, includeReasons); >+ } > return reasons; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 248200
:
463649
|
463698