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

Changeset 244005 in webkit


Ignore:
Timestamp:
Apr 8, 2019, 5:38:56 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r242943 - Cleanup inline boxes when list marker gets blockified
https://bugs.webkit.org/show_bug.cgi?id=195746
<rdar://problem/48049175>

Reviewed by Antti Koivisto.

Source/WebCore:

Normally when an element gets blockified (inline -> block) we destroy its renderer and construct a new one (RenderInline -> RenderBlock).
During this process the associated inline boxtree gets destroyed as well. Since RenderListMarker is just a generic RenderBox, the blockifying
change does not require a new renderer.
This patch takes care of destroying the inline boxtree when the marker gains block display type.

Test: fast/block/float/list-marker-is-float-crash.html

  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::styleDidChange):

LayoutTests:

  • fast/block/float/list-marker-is-float-crash-expected.txt: Added.
  • fast/block/float/list-marker-is-float-crash.html: Added.
Location:
releases/WebKitGTK/webkit-2.24
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/LayoutTests/ChangeLog

    r244003 r244005  
     12019-03-14  Zalan Bujtas  <zalan@apple.com>
     2
     3        Cleanup inline boxes when list marker gets blockified
     4        https://bugs.webkit.org/show_bug.cgi?id=195746
     5        <rdar://problem/48049175>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        * fast/block/float/list-marker-is-float-crash-expected.txt: Added.
     10        * fast/block/float/list-marker-is-float-crash.html: Added.
     11
    1122019-03-13  Zalan Bujtas  <zalan@apple.com>
    213
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r244004 r244005  
     12019-03-14  Zalan Bujtas  <zalan@apple.com>
     2
     3        Cleanup inline boxes when list marker gets blockified
     4        https://bugs.webkit.org/show_bug.cgi?id=195746
     5        <rdar://problem/48049175>
     6
     7        Reviewed by Antti Koivisto.
     8
     9        Normally when an element gets blockified (inline -> block) we destroy its renderer and construct a new one (RenderInline -> RenderBlock).
     10        During this process the associated inline boxtree gets destroyed as well. Since RenderListMarker is just a generic RenderBox, the blockifying
     11        change does not require a new renderer.
     12        This patch takes care of destroying the inline boxtree when the marker gains block display type.
     13
     14        Test: fast/block/float/list-marker-is-float-crash.html
     15
     16        * rendering/RenderListMarker.cpp:
     17        (WebCore::RenderListMarker::styleDidChange):
     18
    1192019-03-13  Zalan Bujtas  <zalan@apple.com>
    220
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/rendering/RenderListMarker.cpp

    r244004 r244005  
    11451145    RenderBox::styleDidChange(diff, oldStyle);
    11461146
    1147     if (oldStyle && (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType()))
    1148         setNeedsLayoutAndPrefWidthsRecalc();
     1147    if (oldStyle) {
     1148        if (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType())
     1149            setNeedsLayoutAndPrefWidthsRecalc();
     1150        if (oldStyle->isDisplayInlineType() && !style().isDisplayInlineType()) {
     1151            delete m_inlineBoxWrapper;
     1152            m_inlineBoxWrapper = nullptr;
     1153        }
     1154    }
    11491155
    11501156    if (m_image != style().listStyleImage()) {
Note: See TracChangeset for help on using the changeset viewer.