Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Shadow DOM] Refactoring: invalidateParentDistributionIfNecessary() c…
…alls are too intrusive https://bugs.webkit.org/show_bug.cgi?id=106305 Reviewed by Dimitri Glazkov. Scattering invalidateParentDistributionIfNecessary() looks bad because - it has long name whose terminology is cryptic for people who don't know much about Shadow DOM standard. - its calls are always paired with setNeedsStyleRecalc() and people do setNeedsStyleRecalc() need to be aware about distribution feature bit tracking. Separate invalidateParentDistributionIfNecessary() call doesn't help that recognition. This change introduces Element::didAffectSelector() to replace a setNeedsStyleRecalc()-i37y() call sequence. SelectRuleFeatureSet::FeatureRule is renamed AffectedSelectorType so that it explains its purpose in a bit more plain WebKit term. No new tests. Refactoring. * dom/Document.cpp: (WebCore::Document::setCSSTarget): Adopted didAffectSelector. * dom/Element.cpp: (WebCore::Element::didAffectSelector): Added. (WebCore): * dom/Element.h: (Element): * dom/ElementShadow.cpp: (WebCore::ElementShadow::didAffectSelector): Morphed from invalidateParentDistributionIfNecessary(). * dom/ElementShadow.h: (ElementShadow): * html/HTMLAnchorElement.cpp: (WebCore::HTMLAnchorElement::parseAttribute): Adopted didAffectSelector * html/HTMLDetailsElement.cpp: * html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::disabledAttributeChanged): Adopted didAffectSelector * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::setChecked): Adopted didAffectSelector (WebCore::HTMLInputElement::setIndeterminate): Adopted didAffectSelector * html/HTMLOptGroupElement.cpp: (WebCore::HTMLOptGroupElement::parseAttribute): Adopted didAffectSelector * html/HTMLOptionElement.cpp: (WebCore::HTMLOptionElement::parseAttribute): Adopted didAffectSelector (WebCore::HTMLOptionElement::setSelectedState): Adopted didAffectSelector * html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::didElementStateChange): Adopted didAffectSelector * html/HTMLSummaryElement.cpp: * html/shadow/HTMLContentElement.cpp: * html/shadow/SelectRuleFeatureSet.cpp: (WebCore::SelectRuleFeatureSet::collectFeaturesFromSelector): Followed renaming. * html/shadow/SelectRuleFeatureSet.h: Followed renaming. (WebCore::SelectRuleFeatureSet::hasSelectorForChecked): (WebCore::SelectRuleFeatureSet::hasSelectorForEnabled): (WebCore::SelectRuleFeatureSet::hasSelectorForDisabled): (WebCore::SelectRuleFeatureSet::hasSelectorForIndeterminate): (WebCore::SelectRuleFeatureSet::hasSelectorForLink): (WebCore::SelectRuleFeatureSet::hasSelectorForTarget): (WebCore::SelectRuleFeatureSet::hasSelectorForVisited): (WebCore::SelectRuleFeatureSet::hasSelectorFor): (WebCore::SelectRuleFeatureSet::setSelectRuleFeature): Canonical link: https://commits.webkit.org/124520@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139064 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
17 changed files
with
115 additions
and
72 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
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
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
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