Index: Source/core/css/analyzer/RuleSetAnalyzer.h |
diff --git a/Source/core/svg/SVGAnimatedLength.h b/Source/core/css/analyzer/RuleSetAnalyzer.h |
similarity index 64% |
copy from Source/core/svg/SVGAnimatedLength.h |
copy to Source/core/css/analyzer/RuleSetAnalyzer.h |
index 36efeb08d1e17fe2c1615d9c4d22d4f31978fd32..14cfebfa2d7f9d06a3b5e92edf708387f72952c2 100644 |
--- a/Source/core/svg/SVGAnimatedLength.h |
+++ b/Source/core/css/analyzer/RuleSetAnalyzer.h |
@@ -28,31 +28,36 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef SVGAnimatedLength_h |
-#define SVGAnimatedLength_h |
+#ifndef RuleSetAnalyzer_h |
+#define RuleSetAnalyzer_h |
-#include "core/svg/SVGLengthTearOff.h" |
-#include "core/svg/properties/NewSVGAnimatedProperty.h" |
+#include "core/css/analyzer/DescendantInvalidationSet.h" |
+#include "wtf/RefCounted.h" |
namespace WebCore { |
-class SVGAnimatedLength : public NewSVGAnimatedProperty<SVGLength> { |
+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<SVGAnimatedLength> create(SVGElement* contextElement, const QualifiedName& attributeName, PassRefPtr<SVGLength> initialValue) |
- { |
- return adoptRef(new SVGAnimatedLength(contextElement, attributeName, initialValue)); |
- } |
- |
- void setDefaultValueAsString(const String&); |
- void setBaseValueAsString(const String&, SVGLengthNegativeValuesMode, SVGParsingError&); |
- |
-protected: |
- SVGAnimatedLength(SVGElement* contextElement, const QualifiedName& attributeName, PassRefPtr<SVGLength> initialValue) |
- : NewSVGAnimatedProperty<SVGLength>(contextElement, attributeName, initialValue) |
- { |
- } |
+ static PassRefPtr<RuleSetAnalyzer> create(); |
+ |
+ void collectFeaturesFromRuleData(RuleFeatureSet& features, const RuleData&); |
+ void combine(const RuleSetAnalyzer& other); |
+private: |
+ RuleSetAnalyzer(); |
+ typedef HashMap<AtomicString, RefPtr<DescendantInvalidationSet> > InvalidationSetMap; |
+ |
+ DescendantInvalidationSet* ensureClassInvalidationSet(const AtomicString& className); |
+ |
+ bool updateClassInvalidationSets(const CSSSelector*); |
+ |
+ InvalidationSetMap m_classInvalidationSets; |
}; |
} // namespace WebCore |
-#endif // SVGAnimatedLength_h |
+#endif // RuleSetAnalyzer_h |