OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All r ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) |
8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
9 * Copyright (C) 2011 Google Inc. All rights reserved. | 9 * Copyright (C) 2011 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 class SVGDocumentExtensions; | 134 class SVGDocumentExtensions; |
135 class ScriptElementData; | 135 class ScriptElementData; |
136 class ScriptRunner; | 136 class ScriptRunner; |
137 class ScriptableDocumentParser; | 137 class ScriptableDocumentParser; |
138 class ScriptedAnimationController; | 138 class ScriptedAnimationController; |
139 class SecurityOrigin; | 139 class SecurityOrigin; |
140 class SegmentedString; | 140 class SegmentedString; |
141 class SelectorQueryCache; | 141 class SelectorQueryCache; |
142 class SerializedScriptValue; | 142 class SerializedScriptValue; |
143 class Settings; | 143 class Settings; |
144 class StyleRareNonInheritedData; | |
144 class StyleResolver; | 145 class StyleResolver; |
146 class StyleRule; | |
145 class StyleSheet; | 147 class StyleSheet; |
146 class StyleSheetContents; | 148 class StyleSheetContents; |
147 class StyleSheetList; | 149 class StyleSheetList; |
148 class Text; | 150 class Text; |
149 class TextAutosizer; | 151 class TextAutosizer; |
150 class TextResourceDecoder; | 152 class TextResourceDecoder; |
151 class Touch; | 153 class Touch; |
152 class TouchList; | 154 class TouchList; |
153 class TransformSource; | 155 class TransformSource; |
154 class TreeWalker; | 156 class TreeWalker; |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
447 // FIXME: Switch all callers of styleResolverChanged to these or better ones and then make them | 449 // FIXME: Switch all callers of styleResolverChanged to these or better ones and then make them |
448 // do something smarter. | 450 // do something smarter. |
449 void removedStyleSheet(StyleSheet*, StyleResolverUpdateType type = DeferReca lcStyle) { styleResolverChanged(type); } | 451 void removedStyleSheet(StyleSheet*, StyleResolverUpdateType type = DeferReca lcStyle) { styleResolverChanged(type); } |
450 void addedStyleSheet(StyleSheet*, StyleResolverUpdateType type = DeferRecalc Style) { styleResolverChanged(type); } | 452 void addedStyleSheet(StyleSheet*, StyleResolverUpdateType type = DeferRecalc Style) { styleResolverChanged(type); } |
451 void modifiedStyleSheet(StyleSheet*, StyleResolverUpdateType type = DeferRec alcStyle) { styleResolverChanged(type); } | 453 void modifiedStyleSheet(StyleSheet*, StyleResolverUpdateType type = DeferRec alcStyle) { styleResolverChanged(type); } |
452 | 454 |
453 void didAccessStyleResolver(); | 455 void didAccessStyleResolver(); |
454 | 456 |
455 void evaluateMediaQueryList(); | 457 void evaluateMediaQueryList(); |
456 | 458 |
459 #if ENABLE(CSS_CALLBACKS) | |
460 void watchCssSelectors(const Vector<String>& selectors); | |
461 const Vector<RefPtr<StyleRule> >& watchedCallbackSelectors() const { return m_watchedCallbackSelectors; } | |
462 #endif | |
463 | |
457 // Never returns 0. | 464 // Never returns 0. |
458 FormController* formController(); | 465 FormController* formController(); |
459 Vector<String> formElementsState() const; | 466 Vector<String> formElementsState() const; |
460 void setStateForNewFormElements(const Vector<String>&); | 467 void setStateForNewFormElements(const Vector<String>&); |
461 | 468 |
462 FrameView* view() const; // can be NULL | 469 FrameView* view() const; // can be NULL |
463 Frame* frame() const { return m_frame; } // can be NULL | 470 Frame* frame() const { return m_frame; } // can be NULL |
464 Page* page() const; // can be NULL | 471 Page* page() const; // can be NULL |
465 Settings* settings() const; // can be NULL | 472 Settings* settings() const; // can be NULL |
466 | 473 |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1015 | 1022 |
1016 DocumentSharedObjectPool* sharedObjectPool() { return m_sharedObjectPool.get (); } | 1023 DocumentSharedObjectPool* sharedObjectPool() { return m_sharedObjectPool.get (); } |
1017 | 1024 |
1018 void didRemoveAllPendingStylesheet(); | 1025 void didRemoveAllPendingStylesheet(); |
1019 void setNeedsNotifyRemoveAllPendingStylesheet() { m_needsNotifyRemoveAllPend ingStylesheet = true; } | 1026 void setNeedsNotifyRemoveAllPendingStylesheet() { m_needsNotifyRemoveAllPend ingStylesheet = true; } |
1020 void clearStyleResolver(); | 1027 void clearStyleResolver(); |
1021 void notifySeamlessChildDocumentsOfStylesheetUpdate() const; | 1028 void notifySeamlessChildDocumentsOfStylesheetUpdate() const; |
1022 | 1029 |
1023 bool inStyleRecalc() { return m_inStyleRecalc; } | 1030 bool inStyleRecalc() { return m_inStyleRecalc; } |
1024 | 1031 |
1032 #if ENABLE(CSS_CALLBACKS) | |
1033 void addSelectorMatch(const String& selector, StyleRareNonInheritedData*); | |
1034 void removeSelectorMatch(const String& selector); | |
1035 #endif | |
1036 | |
1025 // Return a Locale for the default locale if the argument is null or empty. | 1037 // Return a Locale for the default locale if the argument is null or empty. |
1026 Locale& getCachedLocale(const AtomicString& locale = nullAtom); | 1038 Locale& getCachedLocale(const AtomicString& locale = nullAtom); |
1027 | 1039 |
1028 DocumentTimeline* timeline() { return m_timeline.get(); } | 1040 DocumentTimeline* timeline() { return m_timeline.get(); } |
1029 | 1041 |
1030 void addToTopLayer(Element*, const Element* before = 0); | 1042 void addToTopLayer(Element*, const Element* before = 0); |
1031 void removeFromTopLayer(Element*); | 1043 void removeFromTopLayer(Element*); |
1032 const Vector<RefPtr<Element> >& topLayerElements() const { return m_topLayer Elements; } | 1044 const Vector<RefPtr<Element> >& topLayerElements() const { return m_topLayer Elements; } |
1033 Element* activeModalDialog() const { return !m_topLayerElements.isEmpty() ? m_topLayerElements.last().get() : 0; } | 1045 Element* activeModalDialog() const { return !m_topLayerElements.isEmpty() ? m_topLayerElements.last().get() : 0; } |
1034 | 1046 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1110 PassRefPtr<HTMLCollection> ensureCachedCollection(CollectionType); | 1122 PassRefPtr<HTMLCollection> ensureCachedCollection(CollectionType); |
1111 | 1123 |
1112 // Note that dispatching a window load event may cause the DOMWindow to be d etached from | 1124 // Note that dispatching a window load event may cause the DOMWindow to be d etached from |
1113 // the Frame, so callers should take a reference to the DOMWindow (which own s us) to | 1125 // the Frame, so callers should take a reference to the DOMWindow (which own s us) to |
1114 // prevent the Document from getting blown away from underneath them. | 1126 // prevent the Document from getting blown away from underneath them. |
1115 void dispatchWindowLoadEvent(); | 1127 void dispatchWindowLoadEvent(); |
1116 | 1128 |
1117 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene rType; } | 1129 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene rType; } |
1118 void addMutationEventListenerTypeIfEnabled(ListenerType); | 1130 void addMutationEventListenerTypeIfEnabled(ListenerType); |
1119 | 1131 |
1132 #if ENABLE(CSS_CALLBACKS) | |
1133 // Runs FrameLoaderClient::selectorMatchChanged with the updated value of | |
1134 // m_callbackSelectorChange. | |
1135 void callbackSelectorChangeTimerFired(Timer<Document>*); | |
1136 #endif | |
1137 | |
1120 void didAssociateFormControlsTimerFired(Timer<Document>*); | 1138 void didAssociateFormControlsTimerFired(Timer<Document>*); |
1121 void styleResolverThrowawayTimerFired(Timer<Document>*); | 1139 void styleResolverThrowawayTimerFired(Timer<Document>*); |
1122 | 1140 |
1123 void processHttpEquivDefaultStyle(const String& content); | 1141 void processHttpEquivDefaultStyle(const String& content); |
1124 void processHttpEquivRefresh(const String& content); | 1142 void processHttpEquivRefresh(const String& content); |
1125 void processHttpEquivSetCookie(const String& content); | 1143 void processHttpEquivSetCookie(const String& content); |
1126 void processHttpEquivXFrameOptions(const String& content); | 1144 void processHttpEquivXFrameOptions(const String& content); |
1127 | 1145 |
1128 Timer<Document> m_styleResolverThrowawayTimer; | 1146 Timer<Document> m_styleResolverThrowawayTimer; |
1129 double m_lastStyleResolverAccessTime; | 1147 double m_lastStyleResolverAccessTime; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1331 | 1349 |
1332 OwnPtr<TextAutosizer> m_textAutosizer; | 1350 OwnPtr<TextAutosizer> m_textAutosizer; |
1333 | 1351 |
1334 RefPtr<CustomElementRegistrationContext> m_registrationContext; | 1352 RefPtr<CustomElementRegistrationContext> m_registrationContext; |
1335 HTMLImport* m_import; | 1353 HTMLImport* m_import; |
1336 | 1354 |
1337 bool m_scheduledTasksAreSuspended; | 1355 bool m_scheduledTasksAreSuspended; |
1338 | 1356 |
1339 RefPtr<NamedFlowCollection> m_namedFlows; | 1357 RefPtr<NamedFlowCollection> m_namedFlows; |
1340 | 1358 |
1359 #if ENABLE(CSS_CALLBACKS) | |
1360 Vector<RefPtr<StyleRule> > m_watchedCallbackSelectors; | |
1361 // Maps a CSS selector string with a -webkit-callback property to the number | |
1362 // of matching RenderStyle objects in this document. | |
1363 HashMap<String, int> m_matchingCallbackSelectors; | |
1364 // Selectors are relative to m_matchingCallbackSelectors's contents at | |
1365 // the previous call to selectorMatchChanged. | |
1366 HashSet<String> m_addedSelectors; | |
1367 HashSet<String> m_removedSelectors; | |
1368 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.
| |
1369 #endif | |
1370 | |
1341 RefPtr<DOMSecurityPolicy> m_domSecurityPolicy; | 1371 RefPtr<DOMSecurityPolicy> m_domSecurityPolicy; |
1342 | 1372 |
1343 void sharedObjectPoolClearTimerFired(Timer<Document>*); | 1373 void sharedObjectPoolClearTimerFired(Timer<Document>*); |
1344 Timer<Document> m_sharedObjectPoolClearTimer; | 1374 Timer<Document> m_sharedObjectPoolClearTimer; |
1345 | 1375 |
1346 OwnPtr<DocumentSharedObjectPool> m_sharedObjectPool; | 1376 OwnPtr<DocumentSharedObjectPool> m_sharedObjectPool; |
1347 | 1377 |
1348 #ifndef NDEBUG | 1378 #ifndef NDEBUG |
1349 bool m_didDispatchViewportPropertiesChanged; | 1379 bool m_didDispatchViewportPropertiesChanged; |
1350 #endif | 1380 #endif |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1410 inline bool Node::isDocumentNode() const | 1440 inline bool Node::isDocumentNode() const |
1411 { | 1441 { |
1412 return this == documentInternal(); | 1442 return this == documentInternal(); |
1413 } | 1443 } |
1414 | 1444 |
1415 Node* eventTargetNodeForDocument(Document*); | 1445 Node* eventTargetNodeForDocument(Document*); |
1416 | 1446 |
1417 } // namespace WebCore | 1447 } // namespace WebCore |
1418 | 1448 |
1419 #endif // Document_h | 1449 #endif // Document_h |
OLD | NEW |