[webkit-changes] [WebKit/WebKit] 62dacb: Do not construct empty RenderText renderers for ps...
Alan Baradlay
noreply at github.com
Tue Feb 25 16:06:28 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 62dacb328b83c0ed1f8a967666a5008e1abf8b05
https://github.com/WebKit/WebKit/commit/62dacb328b83c0ed1f8a967666a5008e1abf8b05
Author: Alan Baradlay <zalan at apple.com>
Date: 2025-02-25 (Tue, 25 Feb 2025)
Changed paths:
M LayoutTests/fast/css/empty-generated-content-expected.txt
M LayoutTests/fast/layers/add-layer-with-nested-stacking-expected.txt
M LayoutTests/fast/table/table-section-split-with-after-content-expected.txt
M LayoutTests/platform/ios/fast/attachment/cocoa/wide-attachment-rendering-expected.txt
M LayoutTests/platform/ios/fast/css/acid2-expected.txt
M LayoutTests/platform/ios/fast/css/acid2-pixel-expected.txt
M LayoutTests/platform/ios/fast/css/empty-generated-content-expected.txt
M LayoutTests/platform/ios/fast/text/capitalize-empty-generated-string-expected.txt
M LayoutTests/platform/ios/http/tests/misc/acid2-expected.txt
M LayoutTests/platform/ios/http/tests/misc/acid2-pixel-expected.txt
M LayoutTests/platform/mac/fast/attachment/cocoa/wide-attachment-rendering-expected.txt
M LayoutTests/platform/mac/fast/css/acid2-expected.txt
M LayoutTests/platform/mac/fast/css/acid2-pixel-expected.txt
M LayoutTests/platform/mac/fast/text/capitalize-empty-generated-string-expected.txt
M LayoutTests/platform/mac/http/tests/misc/acid2-expected.txt
M LayoutTests/platform/mac/http/tests/misc/acid2-pixel-expected.txt
M Source/WebCore/rendering/style/ContentData.cpp
M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
Log Message:
-----------
Do not construct empty RenderText renderers for pseudo content: ''
https://bugs.webkit.org/show_bug.cgi?id=288496#
Reviewed by Antti Koivisto.
div::after {
content: '';
display: block;
}
generates the following render tree
B---P----- -- <pseudo> RenderBlock (::after) at (0,18) size 1273x0 renderer (0x14404db70) layout box (0x14404c760) node (0x1440c0c20)
I---Y----- -- RenderText (::after) renderer (0x1440c2a00) layout box (0x14404ff30) length->(0) ""
where 'RenderText (::after)' carries no information. Let's not generate such empty RenderText objects.
* LayoutTests/fast/css/empty-generated-content-expected.txt:
* LayoutTests/fast/layers/add-layer-with-nested-stacking-expected.txt:
* LayoutTests/fast/table/table-section-split-with-after-content-expected.txt:
* LayoutTests/platform/ios/fast/attachment/cocoa/wide-attachment-rendering-expected.txt:
* LayoutTests/platform/ios/fast/css/acid2-expected.txt:
* LayoutTests/platform/ios/fast/css/acid2-pixel-expected.txt:
* LayoutTests/platform/ios/fast/css/empty-generated-content-expected.txt:
* LayoutTests/platform/ios/fast/text/capitalize-empty-generated-string-expected.txt:
* LayoutTests/platform/ios/http/tests/misc/acid2-expected.txt:
* LayoutTests/platform/ios/http/tests/misc/acid2-pixel-expected.txt:
* LayoutTests/platform/mac/fast/attachment/cocoa/wide-attachment-rendering-expected.txt:
* LayoutTests/platform/mac/fast/css/acid2-expected.txt:
* LayoutTests/platform/mac/fast/css/acid2-pixel-expected.txt:
* LayoutTests/platform/mac/fast/text/capitalize-empty-generated-string-expected.txt:
* LayoutTests/platform/mac/http/tests/misc/acid2-expected.txt:
* LayoutTests/platform/mac/http/tests/misc/acid2-pixel-expected.txt:
* Source/WebCore/rendering/style/ContentData.cpp:
(WebCore::TextContentData::createContentRenderer const):
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::createContentRenderers):
Canonical link: https://commits.webkit.org/291065@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list