Index: Source/core/dom/Document.h |
diff --git a/Source/core/dom/Document.h b/Source/core/dom/Document.h |
index 0bfe2ed0bf463d678fb8a017102ea679066e97ab..0394d8c645eae74874a791507e81a7dbc2fdd65a 100644 |
--- a/Source/core/dom/Document.h |
+++ b/Source/core/dom/Document.h |
@@ -141,7 +141,9 @@ class SegmentedString; |
class SelectorQueryCache; |
class SerializedScriptValue; |
class Settings; |
+class StyleRareNonInheritedData; |
class StyleResolver; |
+class StyleRule; |
class StyleSheet; |
class StyleSheetContents; |
class StyleSheetList; |
@@ -454,6 +456,11 @@ public: |
void evaluateMediaQueryList(); |
+#if ENABLE(CSS_CALLBACKS) |
+ void watchCssSelectors(const Vector<String>& selectors); |
+ const Vector<RefPtr<StyleRule> >& watchedCallbackSelectors() const { return m_watchedCallbackSelectors; } |
+#endif |
+ |
// Never returns 0. |
FormController* formController(); |
Vector<String> formElementsState() const; |
@@ -1022,6 +1029,11 @@ public: |
bool inStyleRecalc() { return m_inStyleRecalc; } |
+#if ENABLE(CSS_CALLBACKS) |
+ void addSelectorMatch(const String& selector, StyleRareNonInheritedData*); |
+ void removeSelectorMatch(const String& selector); |
+#endif |
+ |
// Return a Locale for the default locale if the argument is null or empty. |
Locale& getCachedLocale(const AtomicString& locale = nullAtom); |
@@ -1117,6 +1129,12 @@ private: |
void addListenerType(ListenerType listenerType) { m_listenerTypes |= listenerType; } |
void addMutationEventListenerTypeIfEnabled(ListenerType); |
+#if ENABLE(CSS_CALLBACKS) |
+ // Runs FrameLoaderClient::selectorMatchChanged with the updated value of |
+ // m_callbackSelectorChange. |
+ void callbackSelectorChangeTimerFired(Timer<Document>*); |
+#endif |
+ |
void didAssociateFormControlsTimerFired(Timer<Document>*); |
void styleResolverThrowawayTimerFired(Timer<Document>*); |
@@ -1338,6 +1356,18 @@ private: |
RefPtr<NamedFlowCollection> m_namedFlows; |
+#if ENABLE(CSS_CALLBACKS) |
+ Vector<RefPtr<StyleRule> > m_watchedCallbackSelectors; |
+ // Maps a CSS selector string with a -webkit-callback property to the number |
+ // of matching RenderStyle objects in this document. |
+ HashMap<String, int> m_matchingCallbackSelectors; |
+ // Selectors are relative to m_matchingCallbackSelectors's contents at |
+ // the previous call to selectorMatchChanged. |
+ HashSet<String> m_addedSelectors; |
+ HashSet<String> m_removedSelectors; |
+ Timer<Document> m_callbackSelectorChangeTimer; |
abarth-chromium
2013/07/12 23:44:11
Please don't spam state onto Document. If you nee
Jeffrey Yasskin
2013/07/16 00:38:51
Sounds good. Thanks for pointing that out.
|
+#endif |
+ |
RefPtr<DOMSecurityPolicy> m_domSecurityPolicy; |
void sharedObjectPoolClearTimerFired(Timer<Document>*); |