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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 InvalidateOnClassAttrChange, | 187 InvalidateOnClassAttrChange, |
188 InvalidateOnIdNameAttrChange, | 188 InvalidateOnIdNameAttrChange, |
189 InvalidateOnNameAttrChange, | 189 InvalidateOnNameAttrChange, |
190 InvalidateOnForAttrChange, | 190 InvalidateOnForAttrChange, |
191 InvalidateForFormControls, | 191 InvalidateForFormControls, |
192 InvalidateOnHRefAttrChange, | 192 InvalidateOnHRefAttrChange, |
193 InvalidateOnAnyAttrChange, | 193 InvalidateOnAnyAttrChange, |
194 }; | 194 }; |
195 const int numNodeListInvalidationTypes = InvalidateOnAnyAttrChange + 1; | 195 const int numNodeListInvalidationTypes = InvalidateOnAnyAttrChange + 1; |
196 | 196 |
197 typedef HashCountedSet<Node*> TouchEventTargetSet; | |
198 | |
199 enum DocumentClass { | 197 enum DocumentClass { |
200 DefaultDocumentClass = 0, | 198 DefaultDocumentClass = 0, |
201 HTMLDocumentClass = 1, | 199 HTMLDocumentClass = 1, |
202 XHTMLDocumentClass = 1 << 1, | 200 XHTMLDocumentClass = 1 << 1, |
203 ImageDocumentClass = 1 << 2, | 201 ImageDocumentClass = 1 << 2, |
204 PluginDocumentClass = 1 << 3, | 202 PluginDocumentClass = 1 << 3, |
205 MediaDocumentClass = 1 << 4, | 203 MediaDocumentClass = 1 << 4, |
206 SVGDocumentClass = 1 << 5, | 204 SVGDocumentClass = 1 << 5, |
207 XMLDocumentClass = 1 << 6, | 205 XMLDocumentClass = 1 << 6, |
208 }; | 206 }; |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
949 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 947 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
950 | 948 |
951 virtual EventTarget* errorEventTarget() OVERRIDE FINAL; | 949 virtual EventTarget* errorEventTarget() OVERRIDE FINAL; |
952 virtual void logExceptionToConsole(const String& errorMessage, const String&
sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERR
IDE FINAL; | 950 virtual void logExceptionToConsole(const String& errorMessage, const String&
sourceURL, int lineNumber, int columnNumber, PassRefPtr<ScriptCallStack>) OVERR
IDE FINAL; |
953 | 951 |
954 void initDNSPrefetch(); | 952 void initDNSPrefetch(); |
955 | 953 |
956 double lastHandledUserGestureTimestamp() const { return m_lastHandledUserGes
tureTimestamp; } | 954 double lastHandledUserGestureTimestamp() const { return m_lastHandledUserGes
tureTimestamp; } |
957 void resetLastHandledUserGestureTimestamp(); | 955 void resetLastHandledUserGestureTimestamp(); |
958 | 956 |
959 bool hasTouchEventHandlers() const { return (m_touchEventTargets.get()) ? m_
touchEventTargets->size() : false; } | |
960 | |
961 // Called when a single touch event handler has been added or removed for a
node. | |
962 // The Node should always be in this Document, except for child Documents wh
ich report | |
963 // themselves to their parent exactly once if they have any touch handlers. | |
964 // Handlers added/removed from the DOMWindow are reported as the Document. | |
965 void didAddTouchEventHandler(Node*); | |
966 void didRemoveTouchEventHandler(Node* handler) { didRemoveTouchEventHandler(
handler, false); } | |
967 | |
968 // Called whenever all touch event handlers have been removed for a node (su
ch as when the | |
969 // node itself is being removed from the document). | |
970 void didClearTouchEventHandlers(Node* handler) { didRemoveTouchEventHandler(
handler, true); } | |
971 | |
972 const TouchEventTargetSet* touchEventTargets() const { return m_touchEventTa
rgets.get(); } | |
973 | |
974 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } | 957 bool isInDocumentWrite() { return m_writeRecursionDepth > 0; } |
975 | 958 |
976 IntSize initialViewportSize() const; | 959 IntSize initialViewportSize() const; |
977 | 960 |
978 // There are currently two parallel autosizing implementations: TextAutosize
r and FastTextAutosizer. | 961 // There are currently two parallel autosizing implementations: TextAutosize
r and FastTextAutosizer. |
979 // See http://tinyurl.com/chromium-fast-autosizer for more details. | 962 // See http://tinyurl.com/chromium-fast-autosizer for more details. |
980 TextAutosizer* textAutosizer(); | 963 TextAutosizer* textAutosizer(); |
981 FastTextAutosizer* fastTextAutosizer(); | 964 FastTextAutosizer* fastTextAutosizer(); |
982 | 965 |
983 PassRefPtr<Element> createElement(const AtomicString& localName, const Atomi
cString& typeExtension, ExceptionState&); | 966 PassRefPtr<Element> createElement(const AtomicString& localName, const Atomi
cString& typeExtension, ExceptionState&); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 | 1129 |
1147 void clearFocusedElementSoon(); | 1130 void clearFocusedElementSoon(); |
1148 void clearFocusedElementTimerFired(Timer<Document>*); | 1131 void clearFocusedElementTimerFired(Timer<Document>*); |
1149 | 1132 |
1150 void processHttpEquivDefaultStyle(const AtomicString& content); | 1133 void processHttpEquivDefaultStyle(const AtomicString& content); |
1151 void processHttpEquivRefresh(const AtomicString& content); | 1134 void processHttpEquivRefresh(const AtomicString& content); |
1152 void processHttpEquivSetCookie(const AtomicString& content); | 1135 void processHttpEquivSetCookie(const AtomicString& content); |
1153 void processHttpEquivXFrameOptions(const AtomicString& content); | 1136 void processHttpEquivXFrameOptions(const AtomicString& content); |
1154 void processHttpEquivContentSecurityPolicy(const AtomicString& equiv, const
AtomicString& content); | 1137 void processHttpEquivContentSecurityPolicy(const AtomicString& equiv, const
AtomicString& content); |
1155 | 1138 |
1156 void didRemoveTouchEventHandler(Node*, bool clearAll); | |
1157 | |
1158 bool needsRenderTreeUpdate() const; | 1139 bool needsRenderTreeUpdate() const; |
1159 bool shouldScheduleRenderTreeUpdate() const; | 1140 bool shouldScheduleRenderTreeUpdate() const; |
1160 | 1141 |
1161 DocumentLifecycle m_lifecycle; | 1142 DocumentLifecycle m_lifecycle; |
1162 | 1143 |
1163 bool m_hasNodesWithPlaceholderStyle; | 1144 bool m_hasNodesWithPlaceholderStyle; |
1164 bool m_needsNotifyRemoveAllPendingStylesheet; | 1145 bool m_needsNotifyRemoveAllPendingStylesheet; |
1165 bool m_evaluateMediaQueriesOnStyleRecalc; | 1146 bool m_evaluateMediaQueriesOnStyleRecalc; |
1166 | 1147 |
1167 // If we do ignore the pending stylesheet count, then we need to add a boole
an | 1148 // If we do ignore the pending stylesheet count, then we need to add a boole
an |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 bool m_didSetReferrerPolicy; | 1302 bool m_didSetReferrerPolicy; |
1322 ReferrerPolicy m_referrerPolicy; | 1303 ReferrerPolicy m_referrerPolicy; |
1323 | 1304 |
1324 bool m_directionSetOnDocumentElement; | 1305 bool m_directionSetOnDocumentElement; |
1325 bool m_writingModeSetOnDocumentElement; | 1306 bool m_writingModeSetOnDocumentElement; |
1326 DocumentTiming m_documentTiming; | 1307 DocumentTiming m_documentTiming; |
1327 RefPtrWillBePersistent<MediaQueryMatcher> m_mediaQueryMatcher; | 1308 RefPtrWillBePersistent<MediaQueryMatcher> m_mediaQueryMatcher; |
1328 bool m_writeRecursionIsTooDeep; | 1309 bool m_writeRecursionIsTooDeep; |
1329 unsigned m_writeRecursionDepth; | 1310 unsigned m_writeRecursionDepth; |
1330 | 1311 |
1331 OwnPtr<TouchEventTargetSet> m_touchEventTargets; | |
1332 | |
1333 double m_lastHandledUserGestureTimestamp; | 1312 double m_lastHandledUserGestureTimestamp; |
1334 | 1313 |
1335 RefPtr<ScriptedAnimationController> m_scriptedAnimationController; | 1314 RefPtr<ScriptedAnimationController> m_scriptedAnimationController; |
1336 OwnPtr<MainThreadTaskRunner> m_taskRunner; | 1315 OwnPtr<MainThreadTaskRunner> m_taskRunner; |
1337 OwnPtr<TextAutosizer> m_textAutosizer; | 1316 OwnPtr<TextAutosizer> m_textAutosizer; |
1338 OwnPtr<FastTextAutosizer> m_fastTextAutosizer; | 1317 OwnPtr<FastTextAutosizer> m_fastTextAutosizer; |
1339 | 1318 |
1340 RefPtr<CustomElementRegistrationContext> m_registrationContext; | 1319 RefPtr<CustomElementRegistrationContext> m_registrationContext; |
1341 | 1320 |
1342 void elementDataCacheClearTimerFired(Timer<Document>*); | 1321 void elementDataCacheClearTimerFired(Timer<Document>*); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 inline bool Node::isDocumentNode() const | 1394 inline bool Node::isDocumentNode() const |
1416 { | 1395 { |
1417 return this == document(); | 1396 return this == document(); |
1418 } | 1397 } |
1419 | 1398 |
1420 Node* eventTargetNodeForDocument(Document*); | 1399 Node* eventTargetNodeForDocument(Document*); |
1421 | 1400 |
1422 } // namespace WebCore | 1401 } // namespace WebCore |
1423 | 1402 |
1424 #endif // Document_h | 1403 #endif // Document_h |
OLD | NEW |