Changeset 227570 in webkit


Ignore:
Timestamp:
Jan 24, 2018 2:20:55 PM (6 years ago)
Author:
Antti Koivisto
Message:

Assertion failure in RenderMultiColumnSet::requiresBalancing() on fast/multicol/spanner-crash-when-adding-summary.html
https://bugs.webkit.org/show_bug.cgi?id=179308
<rdar://problem/34592771>

Reviewed by Zalan Bujtas.

Source/WebCore:

The issue here is that we fail to tear down render tree for a summary element because adding another summary element
takes it out of the composed tree. This leaves behind renderers that break some multicolumn assumptions.

  • rendering/updating/RenderTreeUpdater.cpp:

(WebCore::RenderTreeUpdater::tearDownRenderers):
(WebCore::RenderTreeUpdater::tearDownLeftoverShadowHostChildren):

When tearing down renderers go through the real children of the shadow hosts at the end and see if we left any renderers behind.
If so, tear them down too.

  • rendering/updating/RenderTreeUpdater.h:

LayoutTests:

Unskip fast/multicol/spanner-crash-when-adding-summary.html

  • platform/ios/TestExpectations:
  • platform/mac/TestExpectations:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r227567 r227570  
     12018-01-24  Antti Koivisto  <antti@apple.com>
     2
     3        Assertion failure in RenderMultiColumnSet::requiresBalancing() on fast/multicol/spanner-crash-when-adding-summary.html
     4        https://bugs.webkit.org/show_bug.cgi?id=179308
     5        <rdar://problem/34592771>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        Unskip fast/multicol/spanner-crash-when-adding-summary.html
     10
     11        * platform/ios/TestExpectations:
     12        * platform/mac/TestExpectations:
     13
    1142018-01-24  Daniel Bates  <dabates@apple.com>
    215
  • trunk/LayoutTests/platform/ios/TestExpectations

    r227521 r227570  
    30603060webkit.org/b/172052 [ Release ] imported/w3c/web-platform-tests/html/webappapis/timers/type-long-setinterval.html [ Pass Failure ]
    30613061
    3062 webkit.org/b/176878 [ Debug ] fast/multicol/spanner-crash-when-adding-summary.html [ Skip ]
    3063 
    30643062# <rdar://problem/32542437> REGRESSION (iOS 11): LayoutTest fast/events/ios/before-input-events-prevent-candidate-insertion.html is timing out
    30653063fast/events/ios/before-input-events-prevent-candidate-insertion.html [ Timeout ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r227533 r227570  
    15871587webkit.org/b/172052 [ Debug ] imported/w3c/web-platform-tests/html/webappapis/timers/type-long-setinterval.html [ Pass Failure ]
    15881588
    1589 webkit.org/b/176878 [ Debug ] fast/multicol/spanner-crash-when-adding-summary.html [ Skip ]
    1590 
    15911589# <rdar://problem/29031509> REGRESSION? (FontParser-195): svg/W3C-SVG-1.1/fonts-elem-* and svg/W3C-SVG-1.1/text-intro-* tests failing
    15921590[ HighSierra+ ] svg/W3C-SVG-1.1/fonts-elem-01-t.svg [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r227567 r227570  
     12018-01-24  Antti Koivisto  <antti@apple.com>
     2
     3        Assertion failure in RenderMultiColumnSet::requiresBalancing() on fast/multicol/spanner-crash-when-adding-summary.html
     4        https://bugs.webkit.org/show_bug.cgi?id=179308
     5        <rdar://problem/34592771>
     6
     7        Reviewed by Zalan Bujtas.
     8
     9        The issue here is that we fail to tear down render tree for a summary element because adding another summary element
     10        takes it out of the composed tree. This leaves behind renderers that break some multicolumn assumptions.
     11
     12        * rendering/updating/RenderTreeUpdater.cpp:
     13        (WebCore::RenderTreeUpdater::tearDownRenderers):
     14        (WebCore::RenderTreeUpdater::tearDownLeftoverShadowHostChildren):
     15
     16        When tearing down renderers go through the real children of the shadow hosts at the end and see if we left any renderers behind.
     17        If so, tear them down too.
     18
     19        * rendering/updating/RenderTreeUpdater.h:
     20
    1212018-01-24  Daniel Bates  <dabates@apple.com>
    222
  • trunk/Source/WebCore/rendering/updating/RenderTreeUpdater.cpp

    r226179 r227570  
    555555                element.setRenderer(nullptr);
    556556            }
     557
     558            // Make sure we don't leave any renderers behind in nodes outside the composed tree.
     559            if (element.shadowRoot())
     560                tearDownLeftoverShadowHostChildren(element);
     561
    557562            if (element.hasCustomStyleResolveCallbacks())
    558563                element.didDetachRenderers();
     
    584589    renderer->removeFromParentAndDestroyCleaningUpAnonymousWrappers();
    585590    text.setRenderer(nullptr);
     591}
     592
     593void RenderTreeUpdater::tearDownLeftoverShadowHostChildren(Element& host)
     594{
     595    for (auto* hostChild = host.firstChild(); hostChild; hostChild = hostChild->nextSibling()) {
     596        if (!hostChild->renderer())
     597            continue;
     598        if (is<Text>(*hostChild)) {
     599            tearDownTextRenderer(downcast<Text>(*hostChild));
     600            continue;
     601        }
     602        if (is<Element>(*hostChild))
     603            tearDownRenderers(downcast<Element>(*hostChild), TeardownType::Full);
     604    }
    586605}
    587606
  • trunk/Source/WebCore/rendering/updating/RenderTreeUpdater.h

    r226179 r227570  
    8989    static void tearDownRenderers(Element&, TeardownType);
    9090    static void tearDownTextRenderer(Text&);
     91    static void tearDownLeftoverShadowHostChildren(Element&);
    9192
    9293    RenderView& renderView();
Note: See TracChangeset for help on using the changeset viewer.