⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 270594 in webkit


Ignore:
Timestamp:
Dec 9, 2020, 12:12:21 PM (6 years ago)
Author:
Ryan Haddad
Message:

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

Location:
trunk/Source/WebCore
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r270590 r270594  
     12020-12-09  Ryan Haddad  <ryanhaddad@apple.com>
     2
     3        Unreviewed, reverting r270544 and r270569.
     4
     5        Caused two editing tests to consistently crash on iOS
     6
     7        Reverted changesets:
     8
     9        "[LFC][Integration] Invalidate line layout path for children
     10        of inlines"
     11        https://bugs.webkit.org/show_bug.cgi?id=219639
     12        https://trac.webkit.org/changeset/270544
     13
     14        "Unreviewed. Add missing LFC guards around LineLayout usage
     15        from r270544"
     16        https://trac.webkit.org/changeset/270569
     17
    1182020-12-09  Antti Koivisto  <antti@apple.com>
    219
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.cpp

    r270544 r270594  
    6969LineLayout::~LineLayout() = default;
    7070
    71 RenderBlockFlow* LineLayout::blockContainer(RenderObject& renderer)
    72 {
     71LineLayout* LineLayout::containing(RenderObject& renderer)
     72{
     73    if (!renderer.isInline())
     74        return nullptr;
     75
    7376    // FIXME: These fake renderers have their parent set but are not actually in the tree.
    7477    if (renderer.isReplica() || renderer.isRenderScrollbarPart())
     
    7679   
    7780    for (auto* parent = renderer.parent(); parent; parent = parent->parent()) {
    78         if (!parent->childrenInline())
     81        if (is<RenderBlockFlow>(*parent))
     82            return downcast<RenderBlockFlow>(*parent).modernLineLayout();
     83        if (!is<RenderInline>(*parent))
    7984            return nullptr;
    80         if (is<RenderBlockFlow>(*parent))
    81             return downcast<RenderBlockFlow>(parent);
    82     }
    83 
    84     return nullptr;
    85 }
    86 
    87 LineLayout* LineLayout::containing(RenderObject& renderer)
    88 {
    89     if (!renderer.isInline())
    90         return nullptr;
    91 
    92     if (auto* container = blockContainer(renderer))
    93         return container->modernLineLayout();
     85    }
    9486
    9587    return nullptr;
  • trunk/Source/WebCore/layout/integration/LayoutIntegrationLineLayout.h

    r270544 r270594  
    5757    ~LineLayout();
    5858
    59     static RenderBlockFlow* blockContainer(RenderObject&);
    6059    static LineLayout* containing(RenderObject&);
    6160    static const LineLayout* containing(const RenderObject&);
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r270569 r270594  
    14671467void RenderObject::insertedIntoTree()
    14681468{
    1469 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
    1470     if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
    1471         container->invalidateLineLayoutPath();
    1472 #endif
    1473 
    14741469    // FIXME: We should ASSERT(isRooted()) here but generated content makes some out-of-order insertion.
    14751470    if (!isFloating() && parent()->childrenInline())
     
    14791474void RenderObject::willBeRemovedFromTree()
    14801475{
    1481 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
    1482     if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
    1483         container->invalidateLineLayoutPath();
    1484 #endif
    1485 
    14861476    // FIXME: We should ASSERT(isRooted()) but we have some out-of-order removals which would need to be fixed first.
    14871477    // Update cached boundaries in SVG renderers, if a child is removed.
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r270569 r270594  
    14621462    m_knownToHaveNoOverflowAndNoFallbackFonts = false;
    14631463
    1464 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
    1465     if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
    1466         container->invalidateLineLayoutPath();
    1467 #endif
     1464    if (is<RenderBlockFlow>(*parent()))
     1465        downcast<RenderBlockFlow>(*parent()).invalidateLineLayoutPath();
    14681466   
    14691467    if (AXObjectCache* cache = document().existingAXObjectCache())
  • trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp

    r270580 r270594  
    461461    if (AXObjectCache* cache = parent.document().axObjectCache())
    462462        cache->childrenChanged(&parent, newChild);
    463 
     463    if (is<RenderBlockFlow>(parent))
     464        downcast<RenderBlockFlow>(parent).invalidateLineLayoutPath();
    464465    if (parent.hasOutlineAutoAncestor() || parent.outlineStyleForRepaint().outlineStyleIsAuto() == OutlineIsAuto::On)
    465466        newChild->setHasOutlineAutoAncestor();
  • trunk/Source/WebCore/rendering/updating/RenderTreeBuilderBlock.cpp

    r270544 r270594  
    244244    }
    245245
     246    parent.invalidateLineLayoutPath();
     247
    246248    m_builder.attachToRenderElement(parent, WTFMove(child), beforeChild);
    247249
     
    290292    auto next = makeWeakPtr(oldChild.nextSibling());
    291293    bool canMergeAnonymousBlocks = canMergeContiguousAnonymousBlocks(oldChild, prev.get(), next.get());
     294
     295    parent.invalidateLineLayoutPath();
    292296
    293297    auto takenChild = m_builder.detachFromRenderElement(parent, oldChild);
Note: See TracChangeset for help on using the changeset viewer.