[webkit-changes] [WebKit/WebKit] e3d93f: Move renderer invalidity into a separate bit, out ...
Antti Koivisto
noreply at github.com
Mon Nov 27 07:56:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e3d93fff672a15f0117befd91a416acae9681d57
https://github.com/WebKit/WebKit/commit/e3d93fff672a15f0117befd91a416acae9681d57
Author: Antti Koivisto <antti at apple.com>
Date: 2023-11-27 (Mon, 27 Nov 2023)
Changed paths:
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/Node.h
M Source/WebCore/dom/Text.cpp
M Source/WebCore/style/StyleInvalidator.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebCore/style/StyleValidity.h
M Source/WebCore/testing/Internals.cpp
Log Message:
-----------
Move renderer invalidity into a separate bit, out from Style::Validity enum
https://bugs.webkit.org/show_bug.cgi?id=265311
rdar://problem/118772735
Reviewed by Alan Baradlay.
Make it possible to mark a render subtree for rebuild without needing to recompute the style.
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::invalidateStyleAndRenderersForSubtree):
Also remove unncesssary sibling invalidation. It is a leftover from old pseudo-class invalidation code.
* Source/WebCore/dom/Node.cpp:
(WebCore::Node::adjustStyleValidity):
Make renderer invalidity a style flag.
(WebCore::Node::invalidateStyle):
Also add an invalidation mode for newly inserted nodes. Those will always need to invalidate the renderer and the ancestor chain.
(WebCore::Node::insertedIntoAncestor):
* Source/WebCore/dom/Node.h:
(WebCore::Node::needsStyleRecalc const):
(WebCore::Node::hasInvalidRenderer const):
(WebCore::Node::setHasValidStyle):
* Source/WebCore/dom/Text.cpp:
(WebCore::Text::updateRendererAfterContentChange):
* Source/WebCore/style/StyleInvalidator.cpp:
(WebCore::Style::Invalidator::invalidateIfNeeded):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::createAnimatedElementUpdate):
(WebCore::Style::TreeResolver::resolveComposedTree):
* Source/WebCore/style/StyleValidity.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::styleValidityToToString):
Canonical link: https://commits.webkit.org/271144@main
More information about the webkit-changes
mailing list