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 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
880 void initContentSecurityPolicy(const ContentSecurityPolicyResponseHeaders&); | 880 void initContentSecurityPolicy(const ContentSecurityPolicyResponseHeaders&); |
881 | 881 |
882 bool allowInlineEventHandlers(Node*, EventListener*, const String& contextUR
L, const WTF::OrdinalNumber& contextLine); | 882 bool allowInlineEventHandlers(Node*, EventListener*, const String& contextUR
L, const WTF::OrdinalNumber& contextLine); |
883 bool allowExecutingScripts(Node*); | 883 bool allowExecutingScripts(Node*); |
884 | 884 |
885 void statePopped(PassRefPtr<SerializedScriptValue>); | 885 void statePopped(PassRefPtr<SerializedScriptValue>); |
886 | 886 |
887 enum LoadEventProgress { | 887 enum LoadEventProgress { |
888 LoadEventNotRun, | 888 LoadEventNotRun, |
889 LoadEventTried, | 889 LoadEventTried, |
| 890 LoadEventScheduled, |
890 LoadEventInProgress, | 891 LoadEventInProgress, |
891 LoadEventCompleted, | 892 LoadEventCompleted, |
892 BeforeUnloadEventInProgress, | 893 BeforeUnloadEventInProgress, |
893 BeforeUnloadEventCompleted, | 894 BeforeUnloadEventCompleted, |
894 PageHideInProgress, | 895 PageHideInProgress, |
895 UnloadEventInProgress, | 896 UnloadEventInProgress, |
896 UnloadEventHandled | 897 UnloadEventHandled |
897 }; | 898 }; |
898 bool loadEventStillNeeded() const { return m_loadEventProgress == LoadEventN
otRun; } | 899 bool loadEventStillNeeded() const { return m_loadEventProgress == LoadEventN
otRun; } |
899 bool processingLoadEvent() const { return m_loadEventProgress == LoadEventIn
Progress; } | 900 bool processingLoadEvent() const { return m_loadEventProgress == LoadEventSc
heduled || m_loadEventProgress == LoadEventInProgress; } |
900 bool loadEventFinished() const { return m_loadEventProgress >= LoadEventComp
leted; } | 901 bool loadEventFinished() const { return m_loadEventProgress >= LoadEventComp
leted; } |
901 bool unloadStarted() const { return m_loadEventProgress >= PageHideInProgres
s; } | 902 bool unloadStarted() const { return m_loadEventProgress >= PageHideInProgres
s; } |
902 | 903 |
903 void setContainsPlugins() { m_containsPlugins = true; } | 904 void setContainsPlugins() { m_containsPlugins = true; } |
904 bool containsPlugins() const { return m_containsPlugins; } | 905 bool containsPlugins() const { return m_containsPlugins; } |
905 | 906 |
906 virtual bool isContextThread() const OVERRIDE FINAL; | 907 virtual bool isContextThread() const OVERRIDE FINAL; |
907 virtual bool isJSExecutionForbidden() const OVERRIDE FINAL { return false; } | 908 virtual bool isJSExecutionForbidden() const OVERRIDE FINAL { return false; } |
908 | 909 |
909 bool containsValidityStyleRules() const { return m_containsValidityStyleRule
s; } | 910 bool containsValidityStyleRules() const { return m_containsValidityStyleRule
s; } |
910 void setContainsValidityStyleRules() { m_containsValidityStyleRules = true;
} | 911 void setContainsValidityStyleRules() { m_containsValidityStyleRules = true;
} |
911 | 912 |
912 void enqueueResizeEvent(); | 913 void enqueueResizeEvent(); |
913 void enqueueScrollEventForNode(Node*); | 914 void enqueueScrollEventForNode(Node*); |
914 void enqueueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); | 915 void enqueueAnimationFrameEvent(PassRefPtrWillBeRawPtr<Event>); |
915 void enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener> >&); | 916 void enqueueMediaQueryChangeListeners(WillBeHeapVector<RefPtrWillBeMember<Me
diaQueryListListener> >&); |
916 | 917 |
917 bool hasFullscreenElementStack() const { return m_hasFullscreenElementStack;
} | 918 bool hasFullscreenElementStack() const { return m_hasFullscreenElementStack;
} |
918 void setHasFullscreenElementStack() { m_hasFullscreenElementStack = true; } | 919 void setHasFullscreenElementStack() { m_hasFullscreenElementStack = true; } |
919 | 920 |
920 void exitPointerLock(); | 921 void exitPointerLock(); |
921 Element* pointerLockElement() const; | 922 Element* pointerLockElement() const; |
922 | 923 |
923 // Used to allow element that loads data without going through a FrameLoader
to delay the 'load' event. | 924 // Used to allow element that loads data without going through a FrameLoader
to delay the 'load' event. |
924 void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; } | 925 void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; } |
925 void decrementLoadEventDelayCount(); | 926 void decrementLoadEventDelayCount(); |
926 void checkLoadEventSoon(); | 927 void checkLoadEvent(); |
927 bool isDelayingLoadEvent(); | 928 bool isDelayingLoadEvent(); |
928 void loadPluginsSoon(); | 929 void loadPluginsSoon(); |
929 | 930 |
930 PassRefPtrWillBeRawPtr<Touch> createTouch(LocalDOMWindow*, EventTarget*, int
identifier, double pageX, double pageY, double screenX, double screenY, double
radiusX, double radiusY, float rotationAngle, float force) const; | 931 PassRefPtrWillBeRawPtr<Touch> createTouch(LocalDOMWindow*, EventTarget*, int
identifier, double pageX, double pageY, double screenX, double screenY, double
radiusX, double radiusY, float rotationAngle, float force) const; |
931 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch> >&) const; | 932 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch> >&) const; |
932 | 933 |
933 const DocumentTiming& timing() const { return m_documentTiming; } | 934 const DocumentTiming& timing() const { return m_documentTiming; } |
934 | 935 |
935 int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>); | 936 int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>); |
936 void cancelAnimationFrame(int id); | 937 void cancelAnimationFrame(int id); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1121 void internalAddMessage(MessageSource, MessageLevel, const String& message,
const String& sourceURL, unsigned lineNumber, PassRefPtrWillBeRawPtr<ScriptCallS
tack>, ScriptState*); | 1122 void internalAddMessage(MessageSource, MessageLevel, const String& message,
const String& sourceURL, unsigned lineNumber, PassRefPtrWillBeRawPtr<ScriptCallS
tack>, ScriptState*); |
1122 | 1123 |
1123 virtual double timerAlignmentInterval() const OVERRIDE FINAL; | 1124 virtual double timerAlignmentInterval() const OVERRIDE FINAL; |
1124 | 1125 |
1125 void updateTitle(const String&); | 1126 void updateTitle(const String&); |
1126 void updateFocusAppearanceTimerFired(Timer<Document>*); | 1127 void updateFocusAppearanceTimerFired(Timer<Document>*); |
1127 void updateBaseURL(); | 1128 void updateBaseURL(); |
1128 | 1129 |
1129 void executeScriptsWaitingForResourcesTimerFired(Timer<Document>*); | 1130 void executeScriptsWaitingForResourcesTimerFired(Timer<Document>*); |
1130 | 1131 |
1131 void loadEventDelayTimerFired(Timer<Document>*); | 1132 void loadEventTimerFired(Timer<Document>*); |
1132 void pluginLoadingTimerFired(Timer<Document>*); | 1133 void pluginLoadingTimerFired(Timer<Document>*); |
1133 | 1134 |
1134 PageVisibilityState pageVisibilityState() const; | 1135 PageVisibilityState pageVisibilityState() const; |
1135 | 1136 |
1136 // Note that dispatching a window load event may cause the LocalDOMWindow to
be detached from | 1137 // Note that dispatching a window load event may cause the LocalDOMWindow to
be detached from |
1137 // the LocalFrame, so callers should take a reference to the LocalDOMWindow
(which owns us) to | 1138 // the LocalFrame, so callers should take a reference to the LocalDOMWindow
(which owns us) to |
1138 // prevent the Document from getting blown away from underneath them. | 1139 // prevent the Document from getting blown away from underneath them. |
1139 void dispatchWindowLoadEvent(); | 1140 void dispatchWindowLoadEvent(); |
1140 | 1141 |
1141 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene
rType; } | 1142 void addListenerType(ListenerType listenerType) { m_listenerTypes |= listene
rType; } |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 #if !ENABLE(OILPAN) | 1323 #if !ENABLE(OILPAN) |
1323 WeakPtrFactory<Document> m_weakFactory; | 1324 WeakPtrFactory<Document> m_weakFactory; |
1324 #endif | 1325 #endif |
1325 WeakPtrWillBeWeakMember<Document> m_contextDocument; | 1326 WeakPtrWillBeWeakMember<Document> m_contextDocument; |
1326 | 1327 |
1327 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt
ack::fromIfExists() | 1328 bool m_hasFullscreenElementStack; // For early return in FullscreenElementSt
ack::fromIfExists() |
1328 | 1329 |
1329 WillBeHeapVector<RefPtrWillBeMember<Element> > m_topLayerElements; | 1330 WillBeHeapVector<RefPtrWillBeMember<Element> > m_topLayerElements; |
1330 | 1331 |
1331 int m_loadEventDelayCount; | 1332 int m_loadEventDelayCount; |
1332 Timer<Document> m_loadEventDelayTimer; | 1333 Timer<Document> m_loadEventTimer; |
1333 Timer<Document> m_pluginLoadingTimer; | 1334 Timer<Document> m_pluginLoadingTimer; |
1334 | 1335 |
1335 ViewportDescription m_viewportDescription; | 1336 ViewportDescription m_viewportDescription; |
1336 ViewportDescription m_legacyViewportDescription; | 1337 ViewportDescription m_legacyViewportDescription; |
1337 Length m_viewportDefaultMinWidth; | 1338 Length m_viewportDefaultMinWidth; |
1338 | 1339 |
1339 bool m_didSetReferrerPolicy; | 1340 bool m_didSetReferrerPolicy; |
1340 ReferrerPolicy m_referrerPolicy; | 1341 ReferrerPolicy m_referrerPolicy; |
1341 | 1342 |
1342 bool m_directionSetOnDocumentElement; | 1343 bool m_directionSetOnDocumentElement; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1424 Node* eventTargetNodeForDocument(Document*); | 1425 Node* eventTargetNodeForDocument(Document*); |
1425 | 1426 |
1426 } // namespace blink | 1427 } // namespace blink |
1427 | 1428 |
1428 #ifndef NDEBUG | 1429 #ifndef NDEBUG |
1429 // Outside the WebCore namespace for ease of invocation from gdb. | 1430 // Outside the WebCore namespace for ease of invocation from gdb. |
1430 void showLiveDocumentInstances(); | 1431 void showLiveDocumentInstances(); |
1431 #endif | 1432 #endif |
1432 | 1433 |
1433 #endif // Document_h | 1434 #endif // Document_h |
OLD | NEW |