Title: [274211] trunk/Source/WebCore
- Revision
- 274211
- Author
- [email protected]
- Date
- 2021-03-10 06:46:02 -0800 (Wed, 10 Mar 2021)
Log Message
Clean up the text boxes when the associated text renderer is detached from the tree
https://bugs.webkit.org/show_bug.cgi?id=223009
<rdar://74788950>
Reviewed by Antti Koivisto.
This is the case when the text renderer gets moved under a different block and the original block
becomes non-legacy based line layout.
The inline text boxes are normally cleaned up either when the associated renderer is destroyed
or during the subsequent layout when the legacy code invalidates the line.
However when we switch from legacy to modern line layout this invalidation never runs.
This patch ensures that the text boxes are destroyed soon after the renderer is detached.
* rendering/updating/RenderTreeBuilder.cpp:
(WebCore::RenderTreeBuilder::detachFromRenderElement):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (274210 => 274211)
--- trunk/Source/WebCore/ChangeLog 2021-03-10 14:29:47 UTC (rev 274210)
+++ trunk/Source/WebCore/ChangeLog 2021-03-10 14:46:02 UTC (rev 274211)
@@ -1,3 +1,21 @@
+2021-03-10 Zalan Bujtas <[email protected]>
+
+ Clean up the text boxes when the associated text renderer is detached from the tree
+ https://bugs.webkit.org/show_bug.cgi?id=223009
+ <rdar://74788950>
+
+ Reviewed by Antti Koivisto.
+
+ This is the case when the text renderer gets moved under a different block and the original block
+ becomes non-legacy based line layout.
+ The inline text boxes are normally cleaned up either when the associated renderer is destroyed
+ or during the subsequent layout when the legacy code invalidates the line.
+ However when we switch from legacy to modern line layout this invalidation never runs.
+ This patch ensures that the text boxes are destroyed soon after the renderer is detached.
+
+ * rendering/updating/RenderTreeBuilder.cpp:
+ (WebCore::RenderTreeBuilder::detachFromRenderElement):
+
2021-03-10 Michael Catanzaro <[email protected]>
[WPE][GTK] Introduce NeedsUnbrandedUserAgent quirk and use it for accounts.google.com, docs.google.com, and drive.google.com
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp (274210 => 274211)
--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp 2021-03-10 14:29:47 UTC (rev 274210)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilder.cpp 2021-03-10 14:46:02 UTC (rev 274211)
@@ -876,6 +876,8 @@
downcast<RenderBox>(child).deleteLineBoxWrapper();
else if (is<RenderLineBreak>(child))
downcast<RenderLineBreak>(child).deleteInlineBoxWrapper();
+ else if (is<RenderText>(child))
+ downcast<RenderText>(child).removeAndDestroyTextBoxes();
if (!parent.renderTreeBeingDestroyed() && is<RenderFlexibleBox>(parent) && !child.isFloatingOrOutOfFlowPositioned() && child.isBox())
downcast<RenderFlexibleBox>(parent).clearCachedChildIntrinsicContentLogicalHeight(downcast<RenderBox>(child));
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes