Title: [280892] releases/WebKitGTK/webkit-2.32/Source/WebCore
Revision
280892
Author
[email protected]
Date
2021-08-11 03:13:25 -0700 (Wed, 11 Aug 2021)

Log Message

Merge r274387 - 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):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog (280891 => 280892)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-08-11 10:12:40 UTC (rev 280891)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/ChangeLog	2021-08-11 10:13:25 UTC (rev 280892)
@@ -1,3 +1,20 @@
+2021-03-13  Zalan Bujtas  <[email protected]>
+
+        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):
+
 2021-03-12  Rob Buis  <[email protected]>
 
         Use refptr to PeerConnectionFactoryInterface

Modified: releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/RenderListMarker.cpp (280891 => 280892)


--- releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/RenderListMarker.cpp	2021-08-11 10:12:40 UTC (rev 280891)
+++ releases/WebKitGTK/webkit-2.32/Source/WebCore/rendering/RenderListMarker.cpp	2021-08-11 10:13:25 UTC (rev 280892)
@@ -1093,7 +1093,9 @@
         if (style().listStylePosition() != oldStyle->listStylePosition() || style().listStyleType() != oldStyle->listStyleType() || (style().listStyleType() == ListStyleType::String && style().listStyleStringValue() != oldStyle->listStyleStringValue()))
             setNeedsLayoutAndPrefWidthsRecalc();
         if (oldStyle->isDisplayInlineType() && !style().isDisplayInlineType()) {
-            delete m_inlineBoxWrapper;
+            setNeedsLayoutAndPrefWidthsRecalc();
+            if (m_inlineBoxWrapper)
+                m_inlineBoxWrapper->dirtyLineBoxes();
             m_inlineBoxWrapper = nullptr;
         }
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to