Diff
Modified: trunk/Source/WebCore/ChangeLog (270593 => 270594)
--- trunk/Source/WebCore/ChangeLog 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/ChangeLog 2020-12-09 20:12:21 UTC (rev 270594)
@@ -1,3 +1,20 @@
+2020-12-09 Ryan Haddad <[email protected]>
+
+ Unreviewed, reverting r270544 and r270569.
+
+ Caused two editing tests to consistently crash on iOS
+
+ Reverted changesets:
+
+ "[LFC][Integration] Invalidate line layout path for children
+ of inlines"
+ https://bugs.webkit.org/show_bug.cgi?id=219639
+ https://trac.webkit.org/changeset/270544
+
+ "Unreviewed. Add missing LFC guards around LineLayout usage
+ from r270544"
+ https://trac.webkit.org/changeset/270569
+
2020-12-09 Antti Koivisto <[email protected]>
Font loads are triggered too late
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp (270593 => 270594)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp 2020-12-09 20:12:21 UTC (rev 270594)
@@ -68,33 +68,25 @@
LineLayout::~LineLayout() = default;
-RenderBlockFlow* LineLayout::blockContainer(RenderObject& renderer)
+LineLayout* LineLayout::containing(RenderObject& renderer)
{
+ if (!renderer.isInline())
+ return nullptr;
+
// FIXME: These fake renderers have their parent set but are not actually in the tree.
if (renderer.isReplica() || renderer.isRenderScrollbarPart())
return nullptr;
for (auto* parent = renderer.parent(); parent; parent = parent->parent()) {
- if (!parent->childrenInline())
+ if (is<RenderBlockFlow>(*parent))
+ return downcast<RenderBlockFlow>(*parent).modernLineLayout();
+ if (!is<RenderInline>(*parent))
return nullptr;
- if (is<RenderBlockFlow>(*parent))
- return downcast<RenderBlockFlow>(parent);
}
return nullptr;
}
-LineLayout* LineLayout::containing(RenderObject& renderer)
-{
- if (!renderer.isInline())
- return nullptr;
-
- if (auto* container = blockContainer(renderer))
- return container->modernLineLayout();
-
- return nullptr;
-}
-
const LineLayout* LineLayout::containing(const RenderObject& renderer)
{
return containing(const_cast<RenderObject&>(renderer));
Modified: trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h (270593 => 270594)
--- trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h 2020-12-09 20:12:21 UTC (rev 270594)
@@ -56,7 +56,6 @@
LineLayout(RenderBlockFlow&);
~LineLayout();
- static RenderBlockFlow* blockContainer(RenderObject&);
static LineLayout* containing(RenderObject&);
static const LineLayout* containing(const RenderObject&);
Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (270593 => 270594)
--- trunk/Source/WebCore/rendering/RenderObject.cpp 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp 2020-12-09 20:12:21 UTC (rev 270594)
@@ -1466,11 +1466,6 @@
void RenderObject::insertedIntoTree()
{
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
- container->invalidateLineLayoutPath();
-#endif
-
// FIXME: We should ASSERT(isRooted()) here but generated content makes some out-of-order insertion.
if (!isFloating() && parent()->childrenInline())
parent()->dirtyLinesFromChangedChild(*this);
@@ -1478,11 +1473,6 @@
void RenderObject::willBeRemovedFromTree()
{
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
- container->invalidateLineLayoutPath();
-#endif
-
// FIXME: We should ASSERT(isRooted()) but we have some out-of-order removals which would need to be fixed first.
// Update cached boundaries in SVG renderers, if a child is removed.
parent()->setNeedsBoundariesUpdate();
Modified: trunk/Source/WebCore/rendering/RenderText.cpp (270593 => 270594)
--- trunk/Source/WebCore/rendering/RenderText.cpp 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/rendering/RenderText.cpp 2020-12-09 20:12:21 UTC (rev 270594)
@@ -1461,10 +1461,8 @@
setNeedsLayoutAndPrefWidthsRecalc();
m_knownToHaveNoOverflowAndNoFallbackFonts = false;
-#if ENABLE(LAYOUT_FORMATTING_CONTEXT)
- if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
- container->invalidateLineLayoutPath();
-#endif
+ if (is<RenderBlockFlow>(*parent()))
+ downcast<RenderBlockFlow>(*parent()).invalidateLineLayoutPath();
if (AXObjectCache* cache = document().existingAXObjectCache())
cache->deferTextChangedIfNeeded(textNode());
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (270593 => 270594)
--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp 2020-12-09 20:12:21 UTC (rev 270594)
@@ -460,7 +460,8 @@
if (AXObjectCache* cache = parent.document().axObjectCache())
cache->childrenChanged(&parent, newChild);
-
+ if (is<RenderBlockFlow>(parent))
+ downcast<RenderBlockFlow>(parent).invalidateLineLayoutPath();
if (parent.hasOutlineAutoAncestor() || parent.outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On)
newChild->setHasOutlineAutoAncestor();
}
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp (270593 => 270594)
--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp 2020-12-09 19:58:30 UTC (rev 270593)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp 2020-12-09 20:12:21 UTC (rev 270594)
@@ -243,6 +243,8 @@
}
}
+ parent.invalidateLineLayoutPath();
+
m_builder.attachToRenderElement(parent, WTFMove(child), beforeChild);
if (madeBoxesNonInline && is<RenderBlock>(parent.parent()) && parent.isAnonymousBlock())
@@ -290,6 +292,8 @@
auto next = makeWeakPtr(oldChild.nextSibling());
bool canMergeAnonymousBlocks = canMergeContiguousAnonymousBlocks(oldChild, prev.get(), next.get());
+ parent.invalidateLineLayoutPath();
+
auto takenChild = m_builder.detachFromRenderElement(parent, oldChild);
if (canMergeAnonymousBlocks && prev && next) {