Changeset 195146 in webkit


Ignore:
Timestamp:
Jan 15, 2016 1:49:33 PM (8 years ago)
Author:
Alan Bujtas
Message:
ASSERTION FAILED: canHaveChildren()
canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal

https://bugs.webkit.org/show_bug.cgi?id=123331

Reviewed by Darin Adler.

Do not set named flow fragment bit on the flow until after the renderer is attached. Setting/resetting it too early
could affect the attach/detach process itself (This is similar to attaching a multi column flow thread).

Source/WebCore:

Test: fast/regions/input-box-with-region-assert.html

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::willBeDestroyed):
(WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
(WebCore::RenderBlockFlow::setRenderNamedFlowFragment):

LayoutTests:

  • fast/regions/input-box-with-region-assert-expected.txt: Added.
  • fast/regions/input-box-with-region-assert.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r195144 r195146  
     12016-01-15  Zalan Bujtas  <zalan@apple.com>
     2
     3        ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal
     4        https://bugs.webkit.org/show_bug.cgi?id=123331
     5
     6        Reviewed by Darin Adler.
     7
     8        Do not set named flow fragment bit on the flow until after the renderer is attached. Setting/resetting it too early
     9        could affect the attach/detach process itself (This is similar to attaching a multi column flow thread).
     10
     11        * fast/regions/input-box-with-region-assert-expected.txt: Added.
     12        * fast/regions/input-box-with-region-assert.html: Added.
     13
    1142016-01-15  Joseph Pecoraro  <pecoraro@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r195142 r195146  
     12016-01-15  Zalan Bujtas  <zalan@apple.com>
     2
     3        ASSERTION FAILED: canHaveChildren() || canHaveGeneratedChildren() in WebCore::RenderElement::insertChildInternal
     4        https://bugs.webkit.org/show_bug.cgi?id=123331
     5
     6        Reviewed by Darin Adler.
     7
     8        Do not set named flow fragment bit on the flow until after the renderer is attached. Setting/resetting it too early
     9        could affect the attach/detach process itself (This is similar to attaching a multi column flow thread).
     10
     11        Test: fast/regions/input-box-with-region-assert.html
     12
     13        * rendering/RenderBlockFlow.cpp:
     14        (WebCore::RenderBlockFlow::willBeDestroyed):
     15        (WebCore::RenderBlockFlow::createRenderNamedFlowFragmentIfNeeded):
     16        (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
     17
    1182016-01-15  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebCore/rendering/RenderBlockFlow.cpp

    r195069 r195146  
    145145{
    146146    if (renderNamedFlowFragment())
    147         setRenderNamedFlowFragment(0);
     147        setRenderNamedFlowFragment(nullptr);
    148148
    149149    // Make sure to destroy anonymous children first while they are still connected to the rest of the tree, so that they will
     
    31523152        RenderNamedFlowFragment* flowFragment = new RenderNamedFlowFragment(document(), RenderNamedFlowFragment::createStyle(style()));
    31533153        flowFragment->initializeStyle();
     3154        addChild(flowFragment);
    31543155        setRenderNamedFlowFragment(flowFragment);
    3155         addChild(renderNamedFlowFragment());
    31563156    }
    31573157}
     
    31993199{
    32003200    RenderBlockFlowRareData& rareData = ensureRareBlockFlowData();
    3201     if (rareData.m_renderNamedFlowFragment)
    3202         rareData.m_renderNamedFlowFragment->destroy();
     3201    if (auto* flowFragmentOnFlow = std::exchange(rareData.m_renderNamedFlowFragment, nullptr))
     3202        flowFragmentOnFlow->destroy();
    32033203    rareData.m_renderNamedFlowFragment = flowFragment;
    32043204}
Note: See TracChangeset for help on using the changeset viewer.