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

Changeset 274387 in webkit


Ignore:
Timestamp:
Mar 13, 2021, 8:09:52 AM (5 years ago)
Author:
Alan Bujtas
Message:

Mark the line dirty when list marker goes from inline to block
https://bugs.webkit.org/show_bug.cgi?id=223132

Reviewed by Antti Koivisto.

This patch ensures that the line layout has a chance to clean up the inline boxes when the marker goes from inline to block.
Instead of deleting the inline box wrapper (InlineElement) here let's

  1. mark both the renderer and the line dirty and let the inline layout code run its normal cleanup process on dirty lines.
  2. detach the inline box wrapper from the now-block list marker.
  • rendering/RenderListMarker.cpp:

(WebCore::RenderListMarker::styleDidChange):

  • rendering/RootInlineBox.cpp:

(WebCore::RootInlineBox::verticalPositionForBox):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r274386 r274387  
     12021-03-13  Zalan Bujtas  <zalan@apple.com>
     2
     3        Mark the line dirty when list marker goes from inline to block
     4        https://bugs.webkit.org/show_bug.cgi?id=223132
     5
     6        Reviewed by Antti Koivisto.
     7
     8        This patch ensures that the line layout has a chance to clean up the inline boxes when the marker goes from inline to block.
     9        Instead of deleting the inline box wrapper (InlineElement) here let's
     10        1. mark both the renderer and the line dirty and let the inline layout code run its normal cleanup process on dirty lines.
     11        2. detach the inline box wrapper from the now-block list marker.
     12
     13        * rendering/RenderListMarker.cpp:
     14        (WebCore::RenderListMarker::styleDidChange):
     15        * rendering/RootInlineBox.cpp:
     16        (WebCore::RootInlineBox::verticalPositionForBox):
     17
    1182021-03-13  Philippe Normand  <pnormand@igalia.com>
    219
  • trunk/Source/WebCore/rendering/RenderListMarker.cpp

    r272805 r274387  
    10941094            setNeedsLayoutAndPrefWidthsRecalc();
    10951095        if (oldStyle->isDisplayInlineType() && !style().isDisplayInlineType()) {
    1096             delete m_inlineBoxWrapper;
     1096            setNeedsLayoutAndPrefWidthsRecalc();
     1097            if (m_inlineBoxWrapper)
     1098                m_inlineBoxWrapper->dirtyLineBoxes();
    10971099            m_inlineBoxWrapper = nullptr;
    10981100        }
Note: See TracChangeset for help on using the changeset viewer.