Title: [271026] branches/safari-610-branch/Source/WebCore
- Revision
- 271026
- Author
- [email protected]
- Date
- 2020-12-21 10:47:32 -0800 (Mon, 21 Dec 2020)
Log Message
Cherry-pick r270580. rdar://problem/72552978
Multicolumn children becoming in-flow elements should be inserted into the multicolumn flow
https://bugs.webkit.org/show_bug.cgi?id=218503
Reviewed by Zalan Bujtas.
Out of flow children of a multicolumn container are not really part of the multicolumn flow. Making them in-flow (i.e. setting "position: static;")
should trigger the code that inserts them into the MultiColumnFlowThread object of the multicolumn container. RenderTreeBuilder was handling this
in-flow <-> out-of-flow changes just for the cases in which the inline status of an element was affecting the parent.
* rendering/RenderMultiColumnFlow.cpp:
(WebCore::RenderMultiColumnFlow::normalizeTreeAfterStyleChange): Insert renderer in the multicolumn flow thread whenever it becames in flow.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610-branch/Source/WebCore/ChangeLog (271025 => 271026)
--- branches/safari-610-branch/Source/WebCore/ChangeLog 2020-12-21 18:32:17 UTC (rev 271025)
+++ branches/safari-610-branch/Source/WebCore/ChangeLog 2020-12-21 18:47:32 UTC (rev 271026)
@@ -1,3 +1,35 @@
+2020-12-21 Alan Coon <[email protected]>
+
+ Cherry-pick r270580. rdar://problem/72552978
+
+ Multicolumn children becoming in-flow elements should be inserted into the multicolumn flow
+ https://bugs.webkit.org/show_bug.cgi?id=218503
+
+ Reviewed by Zalan Bujtas.
+
+ Out of flow children of a multicolumn container are not really part of the multicolumn flow. Making them in-flow (i.e. setting "position: static;")
+ should trigger the code that inserts them into the MultiColumnFlowThread object of the multicolumn container. RenderTreeBuilder was handling this
+ in-flow <-> out-of-flow changes just for the cases in which the inline status of an element was affecting the parent.
+
+ * rendering/RenderMultiColumnFlow.cpp:
+ (WebCore::RenderMultiColumnFlow::normalizeTreeAfterStyleChange): Insert renderer in the multicolumn flow thread whenever it becames in flow.
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-12-02 Sergio Villar Senin <[email protected]>
+
+ Multicolumn children becoming in-flow elements should be inserted into the multicolumn flow
+ https://bugs.webkit.org/show_bug.cgi?id=218503
+
+ Reviewed by Zalan Bujtas.
+
+ Out of flow children of a multicolumn container are not really part of the multicolumn flow. Making them in-flow (i.e. setting "position: static;")
+ should trigger the code that inserts them into the MultiColumnFlowThread object of the multicolumn container. RenderTreeBuilder was handling this
+ in-flow <-> out-of-flow changes just for the cases in which the inline status of an element was affecting the parent.
+
+ * rendering/RenderMultiColumnFlow.cpp:
+ (WebCore::RenderMultiColumnFlow::normalizeTreeAfterStyleChange): Insert renderer in the multicolumn flow thread whenever it becames in flow.
+
2020-12-18 Alan Coon <[email protected]>
Cherry-pick r270983. rdar://problem/72484021
Modified: branches/safari-610-branch/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (271025 => 271026)
--- branches/safari-610-branch/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp 2020-12-21 18:32:17 UTC (rev 271025)
+++ branches/safari-610-branch/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp 2020-12-21 18:47:32 UTC (rev 271026)
@@ -567,7 +567,7 @@
auto& parent = *renderer.parent();
bool wasFloating = oldStyle.isFloating();
- bool wasOufOfFlowPositioned = oldStyle.hasOutOfFlowPosition();
+ bool wasOutOfFlowPositioned = oldStyle.hasOutOfFlowPosition();
bool isFloating = renderer.style().isFloating();
bool isOutOfFlowPositioned = renderer.style().hasOutOfFlowPosition();
bool startsAffectingParent = false;
@@ -574,10 +574,10 @@
bool noLongerAffectsParent = false;
if (is<RenderBlock>(parent))
- noLongerAffectsParent = (!wasFloating && isFloating) || (!wasOufOfFlowPositioned && isOutOfFlowPositioned);
+ noLongerAffectsParent = (!wasFloating && isFloating) || (!wasOutOfFlowPositioned && isOutOfFlowPositioned);
if (is<RenderBlockFlow>(parent) || is<RenderInline>(parent)) {
- startsAffectingParent = (wasFloating || wasOufOfFlowPositioned) && !isFloating && !isOutOfFlowPositioned;
+ startsAffectingParent = (wasFloating || wasOutOfFlowPositioned) && !isFloating && !isOutOfFlowPositioned;
ASSERT(!startsAffectingParent || !noLongerAffectsParent);
}
@@ -603,6 +603,13 @@
move(downcast<RenderBoxModelObject>(parent), downcast<RenderBoxModelObject>(*renderer.previousSibling()), renderer, RenderTreeBuilder::NormalizeAfterInsertion::No);
}
}
+
+ // Out of flow children of RenderMultiColumnFlow are not really part of the multicolumn flow. We need to ensure that changes in positioning like this
+ // trigger insertions into the multicolumn flow.
+ if (auto* enclosingFragmentedFlow = parent.enclosingFragmentedFlow(); is<RenderMultiColumnFlow>(enclosingFragmentedFlow) && wasOutOfFlowPositioned && !isOutOfFlowPositioned) {
+ multiColumnBuilder().multiColumnDescendantInserted(downcast<RenderMultiColumnFlow>(*enclosingFragmentedFlow), renderer);
+ renderer.initializeFragmentedFlowStateOnInsertion();
+ }
}
void RenderTreeBuilder::makeChildrenNonInline(RenderBlock& parent, RenderObject* insertionPoint)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes