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

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

Issue 220943002: Use invalidation sets for :hover, :active, and :focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove unnecessary seenCombinator handling. Created 6 years, 8 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 | « Source/core/css/HoverUpdateTest.cpp ('k') | 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 8c4a5aa9437a1a5e5c675e98bade57308f39224f..3510dda2b820a047f6e7cbb3284813e457faf51a 100644
--- a/Source/core/css/RuleFeature.h
+++ b/Source/core/css/RuleFeature.h
@@ -22,6 +22,7 @@
#ifndef RuleFeature_h
#define RuleFeature_h
+#include "core/css/CSSSelector.h"
#include "core/css/invalidation/StyleInvalidator.h"
#include "wtf/Forward.h"
#include "wtf/HashSet.h"
@@ -29,7 +30,6 @@
namespace WebCore {
-class CSSSelector;
class CSSSelectorList;
class DescendantInvalidationSet;
class Document;
@@ -88,10 +88,9 @@ public:
void scheduleStyleInvalidationForClassChange(const SpaceSplitString& changedClasses, Element&);
void scheduleStyleInvalidationForClassChange(const SpaceSplitString& oldClasses, const SpaceSplitString& newClasses, Element&);
-
void scheduleStyleInvalidationForAttributeChange(const QualifiedName& attributeName, Element&);
-
void scheduleStyleInvalidationForIdChange(const AtomicString& oldId, const AtomicString& newId, Element&);
+ void scheduleStyleInvalidationForPseudoChange(CSSSelector::PseudoType, Element&);
bool hasIdsInSelectors() const
{
@@ -110,6 +109,7 @@ public:
private:
typedef HashMap<AtomicString, RefPtr<DescendantInvalidationSet> > InvalidationSetMap;
+ typedef HashMap<CSSSelector::PseudoType, RefPtr<DescendantInvalidationSet>, WTF::IntHash<unsigned>, WTF::UnsignedWithZeroKeyHashTraits<unsigned> > PseudoTypeInvalidationSetMap;
struct FeatureMetadata {
FeatureMetadata()
@@ -139,6 +139,7 @@ private:
DescendantInvalidationSet& ensureClassInvalidationSet(const AtomicString& className);
DescendantInvalidationSet& ensureAttributeInvalidationSet(const AtomicString& attributeName);
DescendantInvalidationSet& ensureIdInvalidationSet(const AtomicString& attributeName);
+ DescendantInvalidationSet& ensurePseudoInvalidationSet(CSSSelector::PseudoType);
DescendantInvalidationSet* invalidationSetForSelector(const CSSSelector&);
InvalidationSetMode updateInvalidationSets(const CSSSelector&);
@@ -162,6 +163,7 @@ private:
InvalidationSetMap m_classInvalidationSets;
InvalidationSetMap m_attributeInvalidationSets;
InvalidationSetMap m_idInvalidationSets;
+ PseudoTypeInvalidationSetMap m_pseudoInvalidationSets;
bool m_targetedStyleRecalcEnabled;
StyleInvalidator m_styleInvalidator;
};
« no previous file with comments | « Source/core/css/HoverUpdateTest.cpp ('k') | Source/core/css/RuleFeature.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698