Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4e0cb515ac3173fdcf9c8ebbbd625c93f51a20c1
https://github.com/WebKit/WebKit/commit/4e0cb515ac3173fdcf9c8ebbbd625c93f51a20c1
Author: Antti Koivisto <[email protected]>
Date: 2026-05-31 (Sun, 31 May 2026)
Changed paths:
M Source/WebCore/animation/KeyframeEffect.cpp
M Source/WebCore/dom/Document.cpp
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ShadowRoot.cpp
M Source/WebCore/dom/StyledElement.cpp
M Source/WebCore/dom/ViewTransition.cpp
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/html/HTMLInputElement.cpp
M Source/WebCore/html/HTMLMeterElement.cpp
M Source/WebCore/html/HTMLProgressElement.cpp
M Source/WebCore/html/InputType.cpp
M Source/WebCore/html/SearchInputType.cpp
M Source/WebCore/style/ChildChangeInvalidation.cpp
M Source/WebCore/style/StyleInvalidator.cpp
Log Message:
-----------
Remove special case for sibling combinator invalidation
https://bugs.webkit.org/show_bug.cgi?id=315828
rdar://178227281
Reviewed by Alan Baradlay.
We have two versions of many style invalidation functions like
Element::invalidateStyle() and Element::invalidateStyleInternal(). The only
difference between the two is that the non-internal version calls
invalidateSiblingsIfNeeded() to do eager sibling invalidation.
After recent fixes our normal invalidation system (using FooChangeInvalidation
types) handles sibling combinators too in all cases so we can remove this
now-unnecessary path and also get rid of the special *Internal versions of
the functions.
invalidateForSiblingCombinators is only used by ChildChangeInvalidation now,
so move it next to the related invalidateForForwardPositionalRules helpers.
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/Element.cpp:
(WebCore::invalidateSiblingsIfNeeded): Deleted.
(WebCore::invalidateForSiblingCombinators): Moved to
ChildChangeInvalidation.cpp.
(WebCore::Element::invalidateStyle):
(WebCore::Element::invalidateStyleAndLayerComposition):
(WebCore::Element::invalidateStyleForSubtree):
(WebCore::Element::invalidateStyleInternal): Deleted.
(WebCore::Element::invalidateStyleForSubtreeInternal): Deleted.
* Source/WebCore/style/ChildChangeInvalidation.cpp:
(WebCore::Style::invalidateForSiblingCombinators):
Moved from Element.cpp.
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::updateType):
Cover all type-dependent pseudo-classes in the type-change invalidation,
not just the form-state ones. Without the eager sibling fallback, missing
pseudo-classes here are no longer silently caught.
* Source/WebCore/animation/KeyframeEffect.cpp:
* Source/WebCore/dom/Document.cpp:
* Source/WebCore/dom/ShadowRoot.cpp:
* Source/WebCore/dom/StyledElement.cpp:
* Source/WebCore/dom/ViewTransition.cpp:
* Source/WebCore/html/HTMLElement.cpp:
* Source/WebCore/html/HTMLMeterElement.cpp:
* Source/WebCore/html/HTMLProgressElement.cpp:
* Source/WebCore/html/InputType.cpp:
* Source/WebCore/html/SearchInputType.cpp:
* Source/WebCore/style/StyleInvalidator.cpp:
Rename invalidateStyleInternal/invalidateStyleForSubtreeInternal call sites
to invalidateStyle/invalidateStyleForSubtree.
Canonical link: https://commits.webkit.org/314270@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications