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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 InvalidateOnClassAttrChange, | 169 InvalidateOnClassAttrChange, |
170 InvalidateOnIdNameAttrChange, | 170 InvalidateOnIdNameAttrChange, |
171 InvalidateOnNameAttrChange, | 171 InvalidateOnNameAttrChange, |
172 InvalidateOnForAttrChange, | 172 InvalidateOnForAttrChange, |
173 InvalidateForFormControls, | 173 InvalidateForFormControls, |
174 InvalidateOnHRefAttrChange, | 174 InvalidateOnHRefAttrChange, |
175 InvalidateOnAnyAttrChange, | 175 InvalidateOnAnyAttrChange, |
176 }; | 176 }; |
177 const int numNodeListInvalidationTypes = InvalidateOnAnyAttrChange + 1; | 177 const int numNodeListInvalidationTypes = InvalidateOnAnyAttrChange + 1; |
178 | 178 |
179 typedef HashCountedSet<Node*> TouchEventTargetSet; | |
180 | |
181 enum DocumentClass { | 179 enum DocumentClass { |
182 DefaultDocumentClass = 0, | 180 DefaultDocumentClass = 0, |
183 HTMLDocumentClass = 1, | 181 HTMLDocumentClass = 1, |
184 XHTMLDocumentClass = 1 << 1, | 182 XHTMLDocumentClass = 1 << 1, |
185 ImageDocumentClass = 1 << 2, | 183 ImageDocumentClass = 1 << 2, |
186 PluginDocumentClass = 1 << 3, | 184 PluginDocumentClass = 1 << 3, |
187 MediaDocumentClass = 1 << 4, | 185 MediaDocumentClass = 1 << 4, |
188 SVGDocumentClass = 1 << 5, | 186 SVGDocumentClass = 1 << 5, |
189 XMLDocumentClass = 1 << 6, | 187 XMLDocumentClass = 1 << 6, |
190 }; | 188 }; |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
933 | 931 |
934 int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>); | 932 int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>); |
935 void cancelAnimationFrame(int id); | 933 void cancelAnimationFrame(int id); |
936 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 934 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
937 | 935 |
938 virtual EventTarget* errorEventTarget() OVERRIDE FINAL; | 936 virtual EventTarget* errorEventTarget() OVERRIDE FINAL; |
939 virtual void logExceptionToConsole(const String& errorMessage, const String&
sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallS
tack>) OVERRIDE FINAL; | 937 virtual void logExceptionToConsole(const String& errorMessage, const String&
sourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallS
tack>) OVERRIDE FINAL; |
940 | 938 |
941 void initDNSPrefetch(); | 939 void initDNSPrefetch(); |
942 | 940 |
943 bool hasTouchEventHandlers() const { return (m_touchEventTargets.get()) ? m_
touchEventTargets->size() : false; } | |
944 | |
945 // Called when a single touch event handler has been added or removed for a
node. | |
946 // The Node should always be in this Document, except for child Documents wh
ich report | |
947 // themselves to their parent exactly once if they have any touch handlers. | |
948 // Handlers added/removed from the LocalDOMWindow are reported as the Docume
nt. | |
949 void didAddTouchEventHandler(Node*); | |
950 void didRemoveTouchEventHandler(Node* handler) { didRemoveTouchEventHandler(
handler, false); } | |
951 | |
952 // Called whenever all touch event handlers have been removed for a node (su
ch as when the | |
953 // node itself is being removed from the document). | |
954 void didClearTouchEventHandlers(Node* handler) { didRemoveTouchEventHandler(
handler, true); } | |
955 | |
956 const TouchEventTargetSet* touchEventTargets() const { return m_touchEventTa
rgets.get(); } | |
957 | |
958 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } | 941 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } |
959 | 942 |
960 IntSize initialViewportSize() const; | 943 IntSize initialViewportSize() const; |
961 | 944 |
962 TextAutosizer* textAutosizer(); | 945 TextAutosizer* textAutosizer(); |
963 | 946 |
964 PassRefPtrWillBeRawPtr<Element> createElement(const AtomicString& localName,
const AtomicString& typeExtension, ExceptionState&); | 947 PassRefPtrWillBeRawPtr<Element> createElement(const AtomicString& localName,
const AtomicString& typeExtension, ExceptionState&); |
965 PassRefPtrWillBeRawPtr<Element> createElementNS(const AtomicString& namespac
eURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, Exce
ptionState&); | 948 PassRefPtrWillBeRawPtr<Element> createElementNS(const AtomicString& namespac
eURI, const AtomicString& qualifiedName, const AtomicString& typeExtension, Exce
ptionState&); |
966 ScriptValue registerElement(blink::ScriptState*, const AtomicString& name, E
xceptionState&); | 949 ScriptValue registerElement(blink::ScriptState*, const AtomicString& name, E
xceptionState&); |
967 ScriptValue registerElement(blink::ScriptState*, const AtomicString& name, c
onst Dictionary& options, ExceptionState&, CustomElement::NameSet validNames = C
ustomElement::StandardNames); | 950 ScriptValue registerElement(blink::ScriptState*, const AtomicString& name, c
onst Dictionary& options, ExceptionState&, CustomElement::NameSet validNames = C
ustomElement::StandardNames); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1142 | 1125 |
1143 void clearFocusedElementSoon(); | 1126 void clearFocusedElementSoon(); |
1144 void clearFocusedElementTimerFired(Timer<Document>*); | 1127 void clearFocusedElementTimerFired(Timer<Document>*); |
1145 | 1128 |
1146 void processHttpEquivDefaultStyle(const AtomicString& content); | 1129 void processHttpEquivDefaultStyle(const AtomicString& content); |
1147 void processHttpEquivRefresh(const AtomicString& content); | 1130 void processHttpEquivRefresh(const AtomicString& content); |
1148 void processHttpEquivSetCookie(const AtomicString& content); | 1131 void processHttpEquivSetCookie(const AtomicString& content); |
1149 void processHttpEquivXFrameOptions(const AtomicString& content); | 1132 void processHttpEquivXFrameOptions(const AtomicString& content); |
1150 void processHttpEquivContentSecurityPolicy(const AtomicString& equiv, const
AtomicString& content); | 1133 void processHttpEquivContentSecurityPolicy(const AtomicString& equiv, const
AtomicString& content); |
1151 | 1134 |
1152 void didRemoveTouchEventHandler(Node*, bool clearAll); | |
1153 | |
1154 bool haveStylesheetsLoaded() const; | 1135 bool haveStylesheetsLoaded() const; |
1155 | 1136 |
1156 void setHoverNode(PassRefPtrWillBeRawPtr<Node>); | 1137 void setHoverNode(PassRefPtrWillBeRawPtr<Node>); |
1157 Node* hoverNode() const { return m_hoverNode.get(); } | 1138 Node* hoverNode() const { return m_hoverNode.get(); } |
1158 | 1139 |
1159 typedef HashSet<OwnPtr<EventFactoryBase> > EventFactorySet; | 1140 typedef HashSet<OwnPtr<EventFactoryBase> > EventFactorySet; |
1160 static EventFactorySet& eventFactories(); | 1141 static EventFactorySet& eventFactories(); |
1161 | 1142 |
1162 DocumentLifecycle m_lifecycle; | 1143 DocumentLifecycle m_lifecycle; |
1163 | 1144 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1336 bool m_didSetReferrerPolicy; | 1317 bool m_didSetReferrerPolicy; |
1337 ReferrerPolicy m_referrerPolicy; | 1318 ReferrerPolicy m_referrerPolicy; |
1338 | 1319 |
1339 bool m_directionSetOnDocumentElement; | 1320 bool m_directionSetOnDocumentElement; |
1340 bool m_writingModeSetOnDocumentElement; | 1321 bool m_writingModeSetOnDocumentElement; |
1341 DocumentTiming m_documentTiming; | 1322 DocumentTiming m_documentTiming; |
1342 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; | 1323 RefPtrWillBeMember<MediaQueryMatcher> m_mediaQueryMatcher; |
1343 bool m_writeRecursionIsTooDeep; | 1324 bool m_writeRecursionIsTooDeep; |
1344 unsigned m_writeRecursionDepth; | 1325 unsigned m_writeRecursionDepth; |
1345 | 1326 |
1346 OwnPtr<TouchEventTargetSet> m_touchEventTargets; | |
1347 | |
1348 RefPtrWillBeMember<ScriptedAnimationController> m_scriptedAnimationControlle
r; | 1327 RefPtrWillBeMember<ScriptedAnimationController> m_scriptedAnimationControlle
r; |
1349 OwnPtr<MainThreadTaskRunner> m_taskRunner; | 1328 OwnPtr<MainThreadTaskRunner> m_taskRunner; |
1350 OwnPtrWillBeMember<TextAutosizer> m_textAutosizer; | 1329 OwnPtrWillBeMember<TextAutosizer> m_textAutosizer; |
1351 | 1330 |
1352 RefPtrWillBeMember<CustomElementRegistrationContext> m_registrationContext; | 1331 RefPtrWillBeMember<CustomElementRegistrationContext> m_registrationContext; |
1353 RefPtrWillBeMember<CustomElementMicrotaskRunQueue> m_customElementMicrotaskR
unQueue; | 1332 RefPtrWillBeMember<CustomElementMicrotaskRunQueue> m_customElementMicrotaskR
unQueue; |
1354 | 1333 |
1355 void elementDataCacheClearTimerFired(Timer<Document>*); | 1334 void elementDataCacheClearTimerFired(Timer<Document>*); |
1356 Timer<Document> m_elementDataCacheClearTimer; | 1335 Timer<Document> m_elementDataCacheClearTimer; |
1357 | 1336 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 Node* eventTargetNodeForDocument(Document*); | 1400 Node* eventTargetNodeForDocument(Document*); |
1422 | 1401 |
1423 } // namespace blink | 1402 } // namespace blink |
1424 | 1403 |
1425 #ifndef NDEBUG | 1404 #ifndef NDEBUG |
1426 // Outside the WebCore namespace for ease of invocation from gdb. | 1405 // Outside the WebCore namespace for ease of invocation from gdb. |
1427 void showLiveDocumentInstances(); | 1406 void showLiveDocumentInstances(); |
1428 #endif | 1407 #endif |
1429 | 1408 |
1430 #endif // Document_h | 1409 #endif // Document_h |
OLD | NEW |