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-254391-20230324071447.patch (text/plain), 2.60 KB, created by
alan
on 2023-03-24 07:14:48 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
alan
Created:
2023-03-24 07:14:48 PDT
Size:
2.60 KB
patch
obsolete
>From d2339beff41620be842040b891654e9edc52a8f9 Mon Sep 17 00:00:00 2001 >From: Alan Baradlay <zalan@apple.com> >Date: Thu, 23 Mar 2023 20:49:53 -0700 >Subject: [PATCH] RenderBlockFlows with no children should not even try to run > inline layout https://bugs.webkit.org/show_bug.cgi?id=254391 > >Reviewed by NOBODY (OOPS!). > >1. RenderBlockFlow's initial state is m_childrenInline = true >2. m_childrenInline is set to true when the block ends up with no children. >3. childrenInline() makes RenderBlockFlow run inline layout. > >Initiating layout (IFC or BFC) does not make much sense when there's nothing to run layout on. > >* Source/WebCore/rendering/RenderBlockFlow.cpp: >(WebCore::RenderBlockFlow::layoutInlineChildren): >--- > Source/WebCore/rendering/RenderBlockFlow.cpp | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > >diff --git a/Source/WebCore/rendering/RenderBlockFlow.cpp b/Source/WebCore/rendering/RenderBlockFlow.cpp >index b8d9dd80b22b..de31d17a2078 100644 >--- a/Source/WebCore/rendering/RenderBlockFlow.cpp >+++ b/Source/WebCore/rendering/RenderBlockFlow.cpp >@@ -741,6 +741,18 @@ void LeadingTrimmer::adjustLeadingTrimAfterLayout() > > void RenderBlockFlow::layoutInFlowChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom, LayoutUnit& maxFloatLogicalBottom) > { >+ if (!firstChild()) { >+ auto logicalHeight = borderAndPaddingBefore() + borderAndPaddingAfter() + scrollbarLogicalHeight(); >+ if (hasLineIfEmpty()) >+ logicalHeight += lineHeight(true, isHorizontalWritingMode() ? HorizontalLine : VerticalLine, PositionOfInteriorLineBoxes); >+ setLogicalHeight(logicalHeight); >+ >+ repaintLogicalTop = { }; >+ repaintLogicalBottom = { }; >+ maxFloatLogicalBottom = { }; >+ return; >+ } >+ > if (childrenInline()) { > auto leadingTrimmer = LeadingTrimmer { *this, this }; > layoutInlineChildren(relayoutChildren, repaintLogicalTop, repaintLogicalBottom); >@@ -773,6 +785,8 @@ void RenderBlockFlow::layoutInFlowChildren(bool relayoutChildren, LayoutUnit& re > > void RenderBlockFlow::layoutBlockChildren(bool relayoutChildren, LayoutUnit& maxFloatLogicalBottom) > { >+ ASSERT(firstChild()); >+ > LayoutUnit beforeEdge = borderAndPaddingBefore(); > LayoutUnit afterEdge = borderAndPaddingAfter() + scrollbarLogicalHeight(); > >@@ -913,6 +927,8 @@ void RenderBlockFlow::computeAndSetLineLayoutPath() > > void RenderBlockFlow::layoutInlineChildren(bool relayoutChildren, LayoutUnit& repaintLogicalTop, LayoutUnit& repaintLogicalBottom) > { >+ ASSERT(firstChild()); >+ > computeAndSetLineLayoutPath(); > > if (lineLayoutPath() == ModernPath) {
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 254391
:
465563
|
465570
|
465573