Ignore:
Timestamp:
Jan 4, 2019, 4:08:28 PM (6 years ago)
Author:
Alan Bujtas
Message:

[iOS] ERROR: post-layout: dirty renderer(s) in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()
https://bugs.webkit.org/show_bug.cgi?id=189608
<rdar://problem/44473299>

Reviewed by Simon Fraser.

When a frameset/iframe is hidden and we skip layout, clear the dirty flag on its subtree as well.

Covered by fast/frames/invalid-frameset.html.

  • rendering/RenderFrameSet.cpp:

(WebCore::clearSiblingSubtrees):
(WebCore::RenderFrameSet::positionFrames):
(WebCore::RenderFrameSet::positionFramesWithFlattening):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/rendering/RenderFrameSet.cpp

    r238359 r239645  
    495495}
    496496
     497static void resetFrameRendererAndDescendents(RenderBox* frameSetChild, RenderFrameSet& parentFrameSet)
     498{
     499    if (!frameSetChild)
     500        return;
     501
     502    for (auto* descendant = frameSetChild; descendant; descendant = downcast<RenderBox>(RenderObjectTraversal::next(*descendant, &parentFrameSet))) {
     503        descendant->setWidth(0);
     504        descendant->setHeight(0);
     505        descendant->clearNeedsLayout();
     506    }
     507}
     508
    497509void RenderFrameSet::positionFrames()
    498510{
     
    535547    }
    536548
    537     // all the remaining frames are hidden to avoid ugly spurious unflowed frames
    538     for (auto* descendant = child; descendant; descendant = downcast<RenderBox>(RenderObjectTraversal::next(*descendant, this))) {
    539         descendant->setWidth(0);
    540         descendant->setHeight(0);
    541         descendant->clearNeedsLayout();
    542     }
     549    resetFrameRendererAndDescendents(child, *this);
    543550}
    544551
     
    643650        repaint();
    644651
    645     // all the remaining frames are hidden to avoid ugly spurious unflowed frames
    646     for (; child; child = child->nextSiblingBox()) {
    647         child->setWidth(0);
    648         child->setHeight(0);
    649         child->clearNeedsLayout();
    650     }
     652    resetFrameRendererAndDescendents(child, *this);
    651653}
    652654
Note: See TracChangeset for help on using the changeset viewer.