Title: [276137] trunk/Source/WebCore
- Revision
- 276137
- Author
- [email protected]
- Date
- 2021-04-16 08:33:37 -0700 (Fri, 16 Apr 2021)
Log Message
[RenderTreeBuilder] Do not try to collapse anonymous blocks when cleaning up the first-letter subtree
https://bugs.webkit.org/show_bug.cgi?id=224667
<rdar://76616098>
Reviewed by Antti Koivisto.
We construct a dedicated renderer for the first letter content and in some cases wrap it into an anonymous block.
This subtree needs to be destroyed when the associated RenderText is getting deleted. During this cleanup process
we may find the wrapper anonymous block redundant and initiate a sibling block collapsing. However this collapsing
may interfere with the initial delete (the associated RenderText) and lead to unexpected result.
Let's reserve the anonymous collapsing for the initial remove.
* rendering/updating/RenderTreeBuilderFirstLetter.cpp:
(WebCore::RenderTreeBuilder::FirstLetter::cleanupOnDestroy):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (276136 => 276137)
--- trunk/Source/WebCore/ChangeLog 2021-04-16 14:41:11 UTC (rev 276136)
+++ trunk/Source/WebCore/ChangeLog 2021-04-16 15:33:37 UTC (rev 276137)
@@ -1,5 +1,22 @@
2021-04-16 Zalan Bujtas <[email protected]>
+ [RenderTreeBuilder] Do not try to collapse anonymous blocks when cleaning up the first-letter subtree
+ https://bugs.webkit.org/show_bug.cgi?id=224667
+ <rdar://76616098>
+
+ Reviewed by Antti Koivisto.
+
+ We construct a dedicated renderer for the first letter content and in some cases wrap it into an anonymous block.
+ This subtree needs to be destroyed when the associated RenderText is getting deleted. During this cleanup process
+ we may find the wrapper anonymous block redundant and initiate a sibling block collapsing. However this collapsing
+ may interfere with the initial delete (the associated RenderText) and lead to unexpected result.
+ Let's reserve the anonymous collapsing for the initial remove.
+
+ * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
+ (WebCore::RenderTreeBuilder::FirstLetter::cleanupOnDestroy):
+
+2021-04-16 Zalan Bujtas <[email protected]>
+
[IFC] Incorrect box height when scrollbar takes padding box space
https://bugs.webkit.org/show_bug.cgi?id=224546
<rdar://problem/76666402>
Modified: trunk/Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp (276136 => 276137)
--- trunk/Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp 2021-04-16 14:41:11 UTC (rev 276136)
+++ trunk/Source/WebCore/rendering/updating/RenderTreeBuilderFirstLetter.cpp 2021-04-16 15:33:37 UTC (rev 276137)
@@ -157,7 +157,7 @@
{
if (!textFragment.firstLetter())
return;
- m_builder.destroy(*textFragment.firstLetter());
+ m_builder.destroy(*textFragment.firstLetter(), CanCollapseAnonymousBlock::No);
}
void RenderTreeBuilder::FirstLetter::updateStyle(RenderBlock& firstLetterBlock, RenderObject& currentChild)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes