Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: Source/core/css/RuleFeature.h

Issue 217713002: Refactor StyleInvalidator to encapsulate all style invalidation state. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove explicit. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleFeature.h
diff --git a/Source/core/css/RuleFeature.h b/Source/core/css/RuleFeature.h
index 2e6a9b74842a82ea439df605d6fbc39ba6ed8ec9..75df79fbeea1d2ca93a0b868b1780b8c9337ae55 100644
--- a/Source/core/css/RuleFeature.h
+++ b/Source/core/css/RuleFeature.h
@@ -23,6 +23,7 @@
#define RuleFeature_h
#include "core/css/invalidation/DescendantInvalidationSet.h"
+#include "core/css/invalidation/StyleInvalidator.h"
#include "wtf/Forward.h"
#include "wtf/HashSet.h"
#include "wtf/text/AtomicStringHash.h"
@@ -84,13 +85,10 @@ public:
return m_metadata.idsInRules.contains(idValue);
}
- void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changedClasses, Element*);
- void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClasses, const SpaceSplitString& newClasses, Element*);
+ void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changedClasses, Element&);
+ void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClasses, const SpaceSplitString& newClasses, Element&);
- void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attributeName, Element*);
-
- // Clears all style invalidation state for the passed node.
- void clearStyleInvalidation(Node*);
+ void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attributeName, Element&);
int hasIdsInSelectors() const
{
@@ -102,14 +100,11 @@ public:
// FIXME: record these internally to this class instead calls from StyleResolver to here.
void addContentAttr(const AtomicString& attributeName);
+ StyleInvalidator& styleInvalidator();
+
Vector<RuleFeature> siblingRules;
Vector<RuleFeature> uncommonAttributeRules;
- typedef Vector<RefPtr<DescendantInvalidationSet> > InvalidationList;
- typedef HashMap<Element*, OwnPtr<InvalidationList> > PendingInvalidationMap;
-
- PendingInvalidationMap& pendingInvalidationMap();
-
private:
typedef HashMap<AtomicString, RefPtr<DescendantInvalidationSet> > InvalidationSetMap;
@@ -156,17 +151,13 @@ private:
const CSSSelector* extractInvalidationSetFeatures(const CSSSelector&, InvalidationSetFeatures&);
void addFeaturesToInvalidationSets(const CSSSelector&, const InvalidationSetFeatures&);
- void addClassToInvalidationSet(const AtomicString& className, Element*);
-
- InvalidationList& ensurePendingInvalidationList(Element*);
+ void addClassToInvalidationSet(const AtomicString& className, Element&);
FeatureMetadata m_metadata;
InvalidationSetMap m_classInvalidationSets;
InvalidationSetMap m_attributeInvalidationSets;
-
- PendingInvalidationMap m_pendingInvalidationMap;
-
bool m_targetedStyleRecalcEnabled;
+ StyleInvalidator m_styleInvalidator;
};
« no previous file with comments | « no previous file | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698