Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 60adfd64a73fd2d68e25f08316f6c61b78e588aa
https://github.com/WebKit/WebKit/commit/60adfd64a73fd2d68e25f08316f6c61b78e588aa
Author: Chris Dumez <[email protected]>
Date: 2026-04-08 (Wed, 08 Apr 2026)
Changed paths:
M Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
Log Message:
-----------
Remove redundant storeDisplayContentsOrNoneStyle for pseudo-elements
https://bugs.webkit.org/show_bug.cgi?id=311613
Reviewed by Antti Koivisto.
updateElementRenderer() already handles storeDisplayContentsOrNoneStyle()
for display:none and clearDisplayContentsOrNoneStyle() for other display
values. The else branch in updateBeforeOrAfterPseudoElement() was
duplicating both calls immediately after updateElementRenderer() returned,
causing an unnecessary cloneIncludingPseudoElements() + allocation for
display:none pseudo-elements whose result just overwrote the identical
style already stored.
The display:contents branch is not affected — it must explicitly store the
style because it passes a wrapper style (display:inline) to
updateElementRenderer(), which causes it to clear rather than store.
No new tests, covered by existing tests.
* Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
(WebCore::RenderTreeUpdater::GeneratedContent::updateBeforeOrAfterPseudoElement):
Canonical link: https://commits.webkit.org/310773@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications