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 15 matching lines...) Expand all Loading... |
26 */ | 26 */ |
27 | 27 |
28 #ifndef Document_h | 28 #ifndef Document_h |
29 #define Document_h | 29 #define Document_h |
30 | 30 |
31 #include "bindings/v8/ScriptValue.h" | 31 #include "bindings/v8/ScriptValue.h" |
32 #include "core/dom/ContainerNode.h" | 32 #include "core/dom/ContainerNode.h" |
33 #include "core/dom/CustomElement.h" | 33 #include "core/dom/CustomElement.h" |
34 #include "core/dom/DOMTimeStamp.h" | 34 #include "core/dom/DOMTimeStamp.h" |
35 #include "core/dom/DocumentInit.h" | 35 #include "core/dom/DocumentInit.h" |
| 36 #include "core/dom/DocumentLifecycle.h" |
36 #include "core/dom/DocumentTiming.h" | 37 #include "core/dom/DocumentTiming.h" |
37 #include "core/dom/IconURL.h" | 38 #include "core/dom/IconURL.h" |
38 #include "core/dom/MutationObserver.h" | 39 #include "core/dom/MutationObserver.h" |
39 #include "core/dom/QualifiedName.h" | 40 #include "core/dom/QualifiedName.h" |
40 #include "core/dom/ScriptExecutionContext.h" | 41 #include "core/dom/ScriptExecutionContext.h" |
41 #include "core/dom/TextLinkColors.h" | 42 #include "core/dom/TextLinkColors.h" |
42 #include "core/dom/TreeScope.h" | 43 #include "core/dom/TreeScope.h" |
43 #include "core/dom/UserActionElementSet.h" | 44 #include "core/dom/UserActionElementSet.h" |
44 #include "core/dom/ViewportArguments.h" | 45 #include "core/dom/ViewportArguments.h" |
| 46 #include "core/events/DocumentEventQueue.h" |
45 #include "core/html/CollectionType.h" | 47 #include "core/html/CollectionType.h" |
46 #include "core/page/FocusDirection.h" | 48 #include "core/page/FocusDirection.h" |
47 #include "core/page/PageVisibilityState.h" | 49 #include "core/page/PageVisibilityState.h" |
48 #include "weborigin/ReferrerPolicy.h" | |
49 #include "core/platform/Timer.h" | 50 #include "core/platform/Timer.h" |
50 #include "core/rendering/HitTestRequest.h" | 51 #include "core/rendering/HitTestRequest.h" |
| 52 #include "weborigin/ReferrerPolicy.h" |
51 #include "wtf/HashSet.h" | 53 #include "wtf/HashSet.h" |
52 #include "wtf/OwnPtr.h" | 54 #include "wtf/OwnPtr.h" |
53 #include "wtf/PassOwnPtr.h" | 55 #include "wtf/PassOwnPtr.h" |
54 #include "wtf/PassRefPtr.h" | 56 #include "wtf/PassRefPtr.h" |
55 #include "wtf/WeakPtr.h" | 57 #include "wtf/WeakPtr.h" |
56 | 58 |
57 namespace WebCore { | 59 namespace WebCore { |
58 | 60 |
59 class AXObjectCache; | 61 class AXObjectCache; |
60 class Attr; | 62 class Attr; |
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1050 | 1052 |
1051 void didAssociateFormControl(Element*); | 1053 void didAssociateFormControl(Element*); |
1052 | 1054 |
1053 void addConsoleMessageWithRequestIdentifier(MessageSource, MessageLevel, con
st String& message, unsigned long requestIdentifier); | 1055 void addConsoleMessageWithRequestIdentifier(MessageSource, MessageLevel, con
st String& message, unsigned long requestIdentifier); |
1054 | 1056 |
1055 virtual DOMWindow* executingWindow() OVERRIDE { return domWindow(); } | 1057 virtual DOMWindow* executingWindow() OVERRIDE { return domWindow(); } |
1056 virtual void userEventWasHandled() OVERRIDE { resetLastHandledUserGestureTim
estamp(); } | 1058 virtual void userEventWasHandled() OVERRIDE { resetLastHandledUserGestureTim
estamp(); } |
1057 | 1059 |
1058 PassRefPtr<FontFaceSet> fonts(); | 1060 PassRefPtr<FontFaceSet> fonts(); |
1059 DocumentLifecycleNotifier* lifecycleNotifier(); | 1061 DocumentLifecycleNotifier* lifecycleNotifier(); |
| 1062 bool isActive() const { return m_lifecyle.state() == DocumentLifecycle::Acti
ve; } |
1060 | 1063 |
1061 enum HttpRefreshType { | 1064 enum HttpRefreshType { |
1062 HttpRefreshFromHeader, | 1065 HttpRefreshFromHeader, |
1063 HttpRefreshFromMetaTag | 1066 HttpRefreshFromMetaTag |
1064 }; | 1067 }; |
1065 void maybeHandleHttpRefresh(const String&, HttpRefreshType); | 1068 void maybeHandleHttpRefresh(const String&, HttpRefreshType); |
1066 | 1069 |
1067 protected: | 1070 protected: |
1068 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); | 1071 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); |
1069 | 1072 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1144 | 1147 |
1145 void didAssociateFormControlsTimerFired(Timer<Document>*); | 1148 void didAssociateFormControlsTimerFired(Timer<Document>*); |
1146 void styleResolverThrowawayTimerFired(Timer<Document>*); | 1149 void styleResolverThrowawayTimerFired(Timer<Document>*); |
1147 | 1150 |
1148 void processHttpEquivDefaultStyle(const String& content); | 1151 void processHttpEquivDefaultStyle(const String& content); |
1149 void processHttpEquivRefresh(const String& content); | 1152 void processHttpEquivRefresh(const String& content); |
1150 void processHttpEquivSetCookie(const String& content); | 1153 void processHttpEquivSetCookie(const String& content); |
1151 void processHttpEquivXFrameOptions(const String& content); | 1154 void processHttpEquivXFrameOptions(const String& content); |
1152 void processHttpEquivContentSecurityPolicy(const String& equiv, const String
& content); | 1155 void processHttpEquivContentSecurityPolicy(const String& equiv, const String
& content); |
1153 | 1156 |
| 1157 DocumentLifecycle m_lifecyle; |
| 1158 |
1154 // FIXME: This should probably be handled inside the style resolver itself. | 1159 // FIXME: This should probably be handled inside the style resolver itself. |
1155 Timer<Document> m_styleResolverThrowawayTimer; | 1160 Timer<Document> m_styleResolverThrowawayTimer; |
1156 unsigned m_styleResolverAccessCount; | 1161 unsigned m_styleResolverAccessCount; |
1157 unsigned m_lastStyleResolverAccessCount; | 1162 unsigned m_lastStyleResolverAccessCount; |
1158 | 1163 |
1159 OwnPtr<StyleResolver> m_styleResolver; | 1164 OwnPtr<StyleResolver> m_styleResolver; |
1160 bool m_didCalculateStyleResolver; | 1165 bool m_didCalculateStyleResolver; |
1161 bool m_hasNodesWithPlaceholderStyle; | 1166 bool m_hasNodesWithPlaceholderStyle; |
1162 bool m_needsNotifyRemoveAllPendingStylesheet; | 1167 bool m_needsNotifyRemoveAllPendingStylesheet; |
1163 // But sometimes you need to ignore pending stylesheet count to | 1168 // But sometimes you need to ignore pending stylesheet count to |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1440 inline bool Node::isDocumentNode() const | 1445 inline bool Node::isDocumentNode() const |
1441 { | 1446 { |
1442 return this == documentInternal(); | 1447 return this == documentInternal(); |
1443 } | 1448 } |
1444 | 1449 |
1445 Node* eventTargetNodeForDocument(Document*); | 1450 Node* eventTargetNodeForDocument(Document*); |
1446 | 1451 |
1447 } // namespace WebCore | 1452 } // namespace WebCore |
1448 | 1453 |
1449 #endif // Document_h | 1454 #endif // Document_h |
OLD | NEW |