Chromium Code Reviews| Index: Source/core/css/analyzer/RuleSetAnalyzer.h |
| diff --git a/Source/core/svg/SVGLengthListTearOff.h b/Source/core/css/analyzer/RuleSetAnalyzer.h |
| similarity index 60% |
| copy from Source/core/svg/SVGLengthListTearOff.h |
| copy to Source/core/css/analyzer/RuleSetAnalyzer.h |
| index b28dc8c94e6171147890fb606b6d1c0e53bed86f..76997849e0d457c15ec853e41227d19d7fa2d3ea 100644 |
| --- a/Source/core/svg/SVGLengthListTearOff.h |
| +++ b/Source/core/css/analyzer/RuleSetAnalyzer.h |
| @@ -28,31 +28,39 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef SVGLengthListTearOff_h |
| -#define SVGLengthListTearOff_h |
| +#ifndef RuleSetAnalyzer_h |
| +#define RuleSetAnalyzer_h |
| -#include "core/svg/SVGLengthList.h" |
| -#include "core/svg/properties/NewSVGListPropertyTearOffHelper.h" |
| +#include "core/css/analyzer/DescendantInvalidationSet.h" |
| +#include "wtf/RefCounted.h" |
| namespace WebCore { |
| -class SVGLengthListTearOff FINAL : |
| - public NewSVGListPropertyTearOffHelper<SVGLengthListTearOff, SVGLengthList>, |
| - public ScriptWrappable { |
| +class CSSSelector; |
| +class RuleFeatureSet; |
| +class RuleData; |
| + |
| +// Keeps track of information about a set of CSS rules in order to answer style questions about them. |
| +class RuleSetAnalyzer : public RefCounted<RuleSetAnalyzer> { |
| public: |
| - static PassRefPtr<SVGLengthListTearOff> create(PassRefPtr<SVGLengthList> target, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName = nullQName()) |
| - { |
| - return adoptRef(new SVGLengthListTearOff(target, contextElement, propertyIsAnimVal, attributeName)); |
| - } |
| + static PassRefPtr<RuleSetAnalyzer> create(); |
| + |
| + void collectFeaturesFromRuleData(RuleFeatureSet& features, const RuleData&); |
| + void combine(const RuleSetAnalyzer& other); |
| + bool invalidateElementSubtreeForClassChange(const AtomicString& changedClass, Element* elementChanged) const; |
| private: |
| - SVGLengthListTearOff(PassRefPtr<SVGLengthList> target, SVGElement* contextElement, PropertyIsAnimValType propertyIsAnimVal, const QualifiedName& attributeName = nullQName()) |
| - : NewSVGListPropertyTearOffHelper<SVGLengthListTearOff, SVGLengthList>(target, contextElement, propertyIsAnimVal, attributeName) |
| - { |
| - ScriptWrappable::init(this); |
| - } |
| + RuleSetAnalyzer() { } |
|
esprehn
2014/01/14 21:32:56
Put this in the cpp file, doesn't need to be inlin
chrishtr
2014/01/14 23:33:00
Done.
|
| + typedef HashMap<AtomicString, RefPtr<DescendantInvalidationSet> > InvalidationSetMap; |
| + |
| + DescendantInvalidationSet* ensureClassInvalidationSet(const AtomicString& className); |
| + DescendantInvalidationSet* getClassInvalidationSet(const AtomicString& className) const; |
| + |
| + bool updateClassInvalidationSets(const CSSSelector*); |
| + |
| + InvalidationSetMap classInvalidationSets; |
| }; |
| } // namespace WebCore |
| -#endif // SVGLengthListTearOff_h_ |
| +#endif // RuleSetAnalyzer_h |