Skip to content
Permalink
Browse files
Do not let RenderFragmentContainers create new formatting contexts
https://bugs.webkit.org/show_bug.cgi?id=229759

Reviewed by Alan Bujtas.

The isRenderFragmentContainer() condition was added in r176957 when the createsNewFormattingContext() function
was introduced. Back then it was actually isRenderRegion() which was later renamed. However that was wrongly added
to the method because it should have remained in the caller RenderBlockFlow::addOverhangingFloats().

Instead of removing it (as the patch does) I thought about moving it back to the addOverhangingFloats() method
where it was added as part of r167602. That revision is actually two fixes and the one that required this code
was an import of a Blink patch. However moving it to its original location does not seem to regress anything and
what's more Blink has also removed it from there some time ago. That's why I decided just to remove it.

Does not directly fix any test at the moment but it's a precondition for wkb.ug/224185 which will fix 3 tests.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext const):

Canonical link: https://commits.webkit.org/241383@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
svillar committed Sep 7, 2021
1 parent 1e9a33c commit 8e300b7d133dc2b5f298e20b50705903a842d37b
Showing with 22 additions and 1 deletion.
  1. +21 −0 Source/WebCore/ChangeLog
  2. +1 −1 Source/WebCore/rendering/RenderBox.cpp
@@ -1,3 +1,24 @@
2021-09-01 Sergio Villar Senin <svillar@igalia.com>

Do not let RenderFragmentContainers create new formatting contexts
https://bugs.webkit.org/show_bug.cgi?id=229759

Reviewed by Alan Bujtas.

The isRenderFragmentContainer() condition was added in r176957 when the createsNewFormattingContext() function
was introduced. Back then it was actually isRenderRegion() which was later renamed. However that was wrongly added
to the method because it should have remained in the caller RenderBlockFlow::addOverhangingFloats().

Instead of removing it (as the patch does) I thought about moving it back to the addOverhangingFloats() method
where it was added as part of r167602. That revision is actually two fixes and the one that required this code
was an import of a Blink patch. However moving it to its original location does not seem to regress anything and
what's more Blink has also removed it from there some time ago. That's why I decided just to remove it.

Does not directly fix any test at the moment but it's a precondition for wkb.ug/224185 which will fix 3 tests.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::createsNewFormattingContext const):

2021-09-07 Adrian Perez de Castro <aperez@igalia.com>

Non-unified build fixes, early September 2021 edition
@@ -4838,7 +4838,7 @@ bool RenderBox::shrinkToAvoidFloats() const
bool RenderBox::createsNewFormattingContext() const
{
return isInlineBlockOrInlineTable() || isFloatingOrOutOfFlowPositioned() || hasPotentiallyScrollableOverflow() || isFlexItemIncludingDeprecated()
|| isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFragmentedFlow() || isRenderFragmentContainer()
|| isTableCell() || isTableCaption() || isFieldset() || isWritingModeRoot() || isDocumentElementRenderer() || isRenderFragmentedFlow()
|| style().containsLayout() || isGridItem() || style().specifiesColumns() || style().columnSpan() == ColumnSpan::All || style().display() == DisplayType::FlowRoot;
}

0 comments on commit 8e300b7

Please sign in to comment.