Use AtomicString in RuleSet and RuleFeature
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 17:19:28 +0000 (17:19 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Mar 2017 17:19:28 +0000 (17:19 +0000)
commitf20c5fba212f8a854ec78ce5386743e68ae958c0
treea348d947dcc3a613abb264cab1067d3d165d0bc3
parent9b968beba46834fad7c3a1213bc246d338725fa8
Use AtomicString in RuleSet and RuleFeature
https://bugs.webkit.org/show_bug.cgi?id=119310
<rdar://problem/28214658>

Reviewed by Andreas Kling.

..instead of the plain AtomicStringImpl*. This introduces some ref churn but not too much.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::ancestorClassRules):
(WebCore::DocumentRuleSets::ancestorAttributeRulesForHTML):
* css/DocumentRuleSets.h:
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::collectMatchingRules):
(WebCore::ElementRuleCollector::collectMatchingShadowPseudoElementRules):
* css/RuleFeature.cpp:
(WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector):
(WebCore::makeAttributeSelectorKey):
(WebCore::RuleFeatureSet::collectFeatures):
* css/RuleFeature.h:
* css/RuleSet.cpp:
(WebCore::RuleSet::addToRuleSet):
(WebCore::rulesCountForName):
(WebCore::RuleSet::addRule):
* css/RuleSet.h:
(WebCore::RuleSet::idRules):
(WebCore::RuleSet::classRules):
(WebCore::RuleSet::shadowPseudoElementRules):
(WebCore::RuleSet::tagRules):
* css/StyleResolver.h:
(WebCore::StyleResolver::hasSelectorForAttribute):
(WebCore::StyleResolver::hasSelectorForClass):
(WebCore::StyleResolver::hasSelectorForId):
* style/AttributeChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByAttributeChange):
(WebCore::Style::AttributeChangeInvalidation::invalidateStyle):
* style/IdChangeInvalidation.cpp:
(WebCore::Style::mayBeAffectedByHostRules):
(WebCore::Style::mayBeAffectedBySlottedRules):
(WebCore::Style::IdChangeInvalidation::invalidateStyle):
* style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::resolve):
(WebCore::Style::SharingResolver::canShareStyleWithElement):
(WebCore::Style::SharingResolver::classNamesAffectedByRules):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214255 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/DocumentRuleSets.cpp
Source/WebCore/css/DocumentRuleSets.h
Source/WebCore/css/ElementRuleCollector.cpp
Source/WebCore/css/RuleFeature.cpp
Source/WebCore/css/RuleFeature.h
Source/WebCore/css/RuleSet.cpp
Source/WebCore/css/RuleSet.h
Source/WebCore/css/StyleResolver.h
Source/WebCore/style/AttributeChangeInvalidation.cpp
Source/WebCore/style/IdChangeInvalidation.cpp
Source/WebCore/style/StyleSharingResolver.cpp