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

Unified Diff: Source/core/css/analyzer/DescendantInvalidationSet.h

Issue 208323003: Add support for attribute selectors in TargetedStyleRecalc. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Tweaks. 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
Index: Source/core/css/analyzer/DescendantInvalidationSet.h
diff --git a/Source/core/css/analyzer/DescendantInvalidationSet.h b/Source/core/css/analyzer/DescendantInvalidationSet.h
index ce83b85059538c5e10a3bf635bb251b25446df9e..5dddceef76fe72a925a0fb74d4738f13e2000168 100644
--- a/Source/core/css/analyzer/DescendantInvalidationSet.h
+++ b/Source/core/css/analyzer/DescendantInvalidationSet.h
@@ -56,10 +56,15 @@ public:
void addClass(const AtomicString& className);
void addId(const AtomicString& id);
void addTagName(const AtomicString& tagName);
+ // The argument is the localName() of the QualififedName for the attribute.
esprehn 2014/03/21 23:01:44 This comment doesn't add anything, the argument na
chrishtr 2014/03/21 23:11:21 Done.
+ void addAttribute(const AtomicString& attributeLocalName);
// Appends the classes in this DescendantInvalidationSet to the vector.
void getClasses(Vector<AtomicString>& classes) const;
+ // Appends the attributes in this DescendantInvalidationSet to the vector.
+ void getAttributes(Vector<AtomicString>& attributes) const;
+
void setWholeSubtreeInvalid();
bool wholeSubtreeInvalid() const { return m_allDescendantsMightBeInvalid; }
private:
@@ -68,6 +73,7 @@ private:
HashSet<AtomicString>& ensureClassSet();
HashSet<AtomicString>& ensureIdSet();
HashSet<AtomicString>& ensureTagNameSet();
+ HashSet<AtomicString>& ensureAttributeSet();
// If true, all descendants might be invalidated, so a full subtree recalc is required.
bool m_allDescendantsMightBeInvalid;
@@ -76,6 +82,7 @@ private:
OwnPtr<HashSet<AtomicString> > m_classes;
OwnPtr<HashSet<AtomicString> > m_ids;
OwnPtr<HashSet<AtomicString> > m_tagNames;
+ OwnPtr<HashSet<AtomicString> > m_attributes;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698