Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Factor child change invalidation into class
https://bugs.webkit.org/show_bug.cgi?id=233311 Reviewed by Alan Bujtas. Use similar pattern as ClassChangeInvalidation and others where we create a stack object scoped over a DOM mutation. This will allow more sophisticated ruleset based invalidation in future. This patch moves the invalidation code from childrenChanged() to the new ChildChangeInvalidation class. ChildChangeInvalidation is instantiated in ContainerNode and CharacterData mutation functions that call childrenChanged(). It uses the same ChildChange argument type as childrenChanged(). There are no changes to invalidation functionality in this patch. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/CharacterData.cpp: (WebCore::makeChildChange): (WebCore::CharacterData::parserAppendData): (WebCore::CharacterData::setDataAndUpdate): (WebCore::CharacterData::notifyParentAfterChange): * dom/CharacterData.h: * dom/ContainerNode.cpp: (WebCore::ContainerNode::removeAllChildrenWithScriptAssertion): (WebCore::makeChildChangeForRemoval): (WebCore::ContainerNode::removeNodeWithScriptAssertion): (WebCore::makeChildChangeForInsertion): (WebCore::executeNodeInsertionWithScriptAssertion): (WebCore::ContainerNode::insertBefore): (WebCore::ContainerNode::parserInsertBefore): (WebCore::ContainerNode::replaceChild): (WebCore::ContainerNode::replaceAll): (WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): (WebCore::ContainerNode::parserAppendChild): (WebCore::affectsElements): * dom/Element.cpp: (WebCore::invalidateForSiblingCombinators): (WebCore::Element::childTypeAllowed const): (WebCore::Element::childrenChanged): (WebCore::Element::finishParsingChildren): (WebCore::checkForEmptyStyleChange): Deleted. (WebCore::invalidateForForwardPositionalRules): Deleted. (WebCore::invalidateForBackwardPositionalRules): Deleted. (WebCore::checkForSiblingStyleChanges): Deleted. * dom/Element.h: * style/ChildChangeInvalidation.cpp: Added. (WebCore::Style::ChildChangeInvalidation::ChildChangeInvalidation): (WebCore::Style::ChildChangeInvalidation::~ChildChangeInvalidation): (WebCore::Style::ChildChangeInvalidation::invalidateAfterChange): (WebCore::Style::ChildChangeInvalidation::checkForEmptyStyleChange): (WebCore::Style::invalidateForForwardPositionalRules): (WebCore::Style::invalidateForBackwardPositionalRules): (WebCore::Style::ChildChangeInvalidation::checkForSiblingStyleChanges): * style/ChildChangeInvalidation.h: Added. (WebCore::Style::ChildChangeInvalidation::parentElement): * style/StyleAdjuster.h: Canonical link: https://commits.webkit.org/244499@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286112 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
11 changed files
with
405 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.