Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6bc49a59fed6f69c4f0ac083433c30b109e70841
https://github.com/WebKit/WebKit/commit/6bc49a59fed6f69c4f0ac083433c30b109e70841
Author: Ahmad Saleem <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
A
LayoutTests/fast/css/renderer-change-parent-no-redundant-text-update-expected.txt
A LayoutTests/fast/css/renderer-change-parent-no-redundant-text-update.html
M Source/WebCore/style/StyleTreeResolver.cpp
Log Message:
-----------
Redundant text updates when a renderer-changing parent's change set also
contains other bits
https://bugs.webkit.org/show_bug.cgi?id=325473
rdar://188567112
Reviewed by Antti Koivisto.
TextUpdate only when the parent is not already rebuilding its renderer,
because a parent renderer rebuild builds the descendant text renderers too.
That guard was written as `parent.changes != Change::Renderer` back when
`change` was a single scalar Style::Change value. Commit 2ba2f10dab33
("Track style changes as an OptionSet") converted the field to
OptionSet<Change> and carried the expression over mechanically. As an
OptionSet comparison, `!= Change::Renderer` is only false when the set is
*exactly* {Renderer} and nothing else. But determineChanges() adds
Change::Renderer alongside other bits, and the primary Renderer trigger - a
display change - also flips Change::NonInherited, so the parent's change set
is almost always {NonInherited, Renderer}. The guard therefore evaluated
true even while the parent was rebuilding its renderer, defeating the
optimization and scheduling a redundant TextUpdate for the child.
Test whether the parent contains Change::Renderer instead of comparing the
whole set for equality.
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveComposedTree):
*
LayoutTests/fast/css/renderer-change-parent-no-redundant-text-update-expected.txt:
Added.
* LayoutTests/fast/css/renderer-change-parent-no-redundant-text-update.html:
Added.
Canonical link: https://commits.webkit.org/322683@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications