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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 PluginDocumentClass = 1 << 3, | 208 PluginDocumentClass = 1 << 3, |
209 MediaDocumentClass = 1 << 4, | 209 MediaDocumentClass = 1 << 4, |
210 SVGDocumentClass = 1 << 5, | 210 SVGDocumentClass = 1 << 5, |
211 XMLDocumentClass = 1 << 6, | 211 XMLDocumentClass = 1 << 6, |
212 }; | 212 }; |
213 | 213 |
214 typedef unsigned char DocumentClassFlags; | 214 typedef unsigned char DocumentClassFlags; |
215 | 215 |
216 class Document; | 216 class Document; |
217 | 217 |
218 class DocumentVisibilityObserver { | 218 class DocumentVisibilityObserver : public WillBeGarbageCollectedMixin { |
219 public: | 219 public: |
220 DocumentVisibilityObserver(Document&); | 220 DocumentVisibilityObserver(Document&); |
221 virtual ~DocumentVisibilityObserver(); | 221 virtual ~DocumentVisibilityObserver(); |
222 | 222 |
223 virtual void didChangeVisibilityState(PageVisibilityState) = 0; | 223 virtual void didChangeVisibilityState(PageVisibilityState) = 0; |
224 | 224 |
225 // Classes that inherit Node and DocumentVisibilityObserver must have a | 225 // Classes that inherit Node and DocumentVisibilityObserver must have a |
226 // virtual override of Node::didMoveToNewDocument that calls | 226 // virtual override of Node::didMoveToNewDocument that calls |
227 // DocumentVisibilityObserver::setDocument | 227 // DocumentVisibilityObserver::setDocument |
228 void setObservedDocument(Document&); | 228 void setObservedDocument(Document&); |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
852 | 852 |
853 Vector<IconURL> iconURLs(int iconTypesMask); | 853 Vector<IconURL> iconURLs(int iconTypesMask); |
854 | 854 |
855 void setUseSecureKeyboardEntryWhenActive(bool); | 855 void setUseSecureKeyboardEntryWhenActive(bool); |
856 bool useSecureKeyboardEntryWhenActive() const; | 856 bool useSecureKeyboardEntryWhenActive() const; |
857 | 857 |
858 void updateFocusAppearanceSoon(bool restorePreviousSelection); | 858 void updateFocusAppearanceSoon(bool restorePreviousSelection); |
859 void cancelFocusAppearanceUpdate(); | 859 void cancelFocusAppearanceUpdate(); |
860 | 860 |
861 // Extension for manipulating canvas drawing contexts for use in CSS | 861 // Extension for manipulating canvas drawing contexts for use in CSS |
862 void getCSSCanvasContext(const String& type, const String& name, int width,
int height, bool&, RefPtr<CanvasRenderingContext2D>&, bool&, RefPtr<WebGLRenderi
ngContext>&); | 862 void getCSSCanvasContext(const String& type, const String& name, int width,
int height, bool&, RefPtrWillBeRawPtr<CanvasRenderingContext2D>&, bool&, RefPtrW
illBeRawPtr<WebGLRenderingContext>&); |
863 HTMLCanvasElement& getCSSCanvasElement(const String& name); | 863 HTMLCanvasElement& getCSSCanvasElement(const String& name); |
864 | 864 |
865 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; } | 865 bool isDNSPrefetchEnabled() const { return m_isDNSPrefetchEnabled; } |
866 void parseDNSPrefetchControlHeader(const String&); | 866 void parseDNSPrefetchControlHeader(const String&); |
867 | 867 |
868 // FIXME(crbug.com/305497): This should be removed once DOMWindow is an Exec
utionContext. | 868 // FIXME(crbug.com/305497): This should be removed once DOMWindow is an Exec
utionContext. |
869 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE; // Execute
s the task on context's thread asynchronously. | 869 virtual void postTask(PassOwnPtr<ExecutionContextTask>) OVERRIDE; // Execute
s the task on context's thread asynchronously. |
870 | 870 |
871 virtual void tasksWereSuspended() OVERRIDE FINAL; | 871 virtual void tasksWereSuspended() OVERRIDE FINAL; |
872 virtual void tasksWereResumed() OVERRIDE FINAL; | 872 virtual void tasksWereResumed() OVERRIDE FINAL; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 | 934 |
935 bool hasFullscreenElementStack() const { return m_hasFullscreenElementStack;
} | 935 bool hasFullscreenElementStack() const { return m_hasFullscreenElementStack;
} |
936 void setHasFullscreenElementStack() { m_hasFullscreenElementStack = true; } | 936 void setHasFullscreenElementStack() { m_hasFullscreenElementStack = true; } |
937 | 937 |
938 void webkitExitPointerLock(); | 938 void webkitExitPointerLock(); |
939 Element* webkitPointerLockElement() const; | 939 Element* webkitPointerLockElement() const; |
940 | 940 |
941 // Used to allow element that loads data without going through a FrameLoader
to delay the 'load' event. | 941 // Used to allow element that loads data without going through a FrameLoader
to delay the 'load' event. |
942 void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; } | 942 void incrementLoadEventDelayCount() { ++m_loadEventDelayCount; } |
943 void decrementLoadEventDelayCount(); | 943 void decrementLoadEventDelayCount(); |
944 bool isDelayingLoadEvent() const { return m_loadEventDelayCount; } | 944 void checkLoadEventSoon(); |
| 945 bool isDelayingLoadEvent(); |
945 void loadPluginsSoon(); | 946 void loadPluginsSoon(); |
946 | 947 |
947 PassRefPtrWillBeRawPtr<Touch> createTouch(DOMWindow*, EventTarget*, int iden
tifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY
, float rotationAngle, float force) const; | 948 PassRefPtrWillBeRawPtr<Touch> createTouch(DOMWindow*, EventTarget*, int iden
tifier, int pageX, int pageY, int screenX, int screenY, int radiusX, int radiusY
, float rotationAngle, float force) const; |
948 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch> >&) const; | 949 PassRefPtrWillBeRawPtr<TouchList> createTouchList(WillBeHeapVector<RefPtrWil
lBeMember<Touch> >&) const; |
949 | 950 |
950 const DocumentTiming& timing() const { return m_documentTiming; } | 951 const DocumentTiming& timing() const { return m_documentTiming; } |
951 | 952 |
952 int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>); | 953 int requestAnimationFrame(PassOwnPtr<RequestAnimationFrameCallback>); |
953 void cancelAnimationFrame(int id); | 954 void cancelAnimationFrame(int id); |
954 void serviceScriptedAnimations(double monotonicAnimationStartTime); | 955 void serviceScriptedAnimations(double monotonicAnimationStartTime); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1104 bool dirtyElementsForLayerUpdate(); | 1105 bool dirtyElementsForLayerUpdate(); |
1105 void updateDistributionIfNeeded(); | 1106 void updateDistributionIfNeeded(); |
1106 void updateUseShadowTreesIfNeeded(); | 1107 void updateUseShadowTreesIfNeeded(); |
1107 void evaluateMediaQueryListIfNeeded(); | 1108 void evaluateMediaQueryListIfNeeded(); |
1108 | 1109 |
1109 void updateRenderTree(StyleRecalcChange); | 1110 void updateRenderTree(StyleRecalcChange); |
1110 void updateStyle(StyleRecalcChange); | 1111 void updateStyle(StyleRecalcChange); |
1111 | 1112 |
1112 void detachParser(); | 1113 void detachParser(); |
1113 | 1114 |
| 1115 void clearWeakMembers(Visitor*); |
| 1116 |
1114 virtual bool isDocument() const OVERRIDE FINAL { return true; } | 1117 virtual bool isDocument() const OVERRIDE FINAL { return true; } |
1115 | 1118 |
1116 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; | 1119 virtual void childrenChanged(bool changedByParser = false, Node* beforeChang
e = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE; |
1117 | 1120 |
1118 virtual String nodeName() const OVERRIDE FINAL; | 1121 virtual String nodeName() const OVERRIDE FINAL; |
1119 virtual NodeType nodeType() const OVERRIDE FINAL; | 1122 virtual NodeType nodeType() const OVERRIDE FINAL; |
1120 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; | 1123 virtual bool childTypeAllowed(NodeType) const OVERRIDE FINAL; |
1121 virtual PassRefPtr<Node> cloneNode(bool deep = true) OVERRIDE FINAL; | 1124 virtual PassRefPtr<Node> cloneNode(bool deep = true) OVERRIDE FINAL; |
1122 void cloneDataFromDocument(const Document&); | 1125 void cloneDataFromDocument(const Document&); |
1123 | 1126 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 static uint64_t s_globalTreeVersion; | 1232 static uint64_t s_globalTreeVersion; |
1230 | 1233 |
1231 HashSet<NodeIterator*> m_nodeIterators; | 1234 HashSet<NodeIterator*> m_nodeIterators; |
1232 HashSet<Range*> m_ranges; | 1235 HashSet<Range*> m_ranges; |
1233 | 1236 |
1234 unsigned short m_listenerTypes; | 1237 unsigned short m_listenerTypes; |
1235 | 1238 |
1236 MutationObserverOptions m_mutationObserverTypes; | 1239 MutationObserverOptions m_mutationObserverTypes; |
1237 | 1240 |
1238 OwnPtrWillBePersistent<StyleEngine> m_styleEngine; | 1241 OwnPtrWillBePersistent<StyleEngine> m_styleEngine; |
1239 RefPtrWillBePersistent<StyleSheetList> m_styleSheetList; | 1242 RefPtrWillBeMember<StyleSheetList> m_styleSheetList; |
1240 | 1243 |
1241 OwnPtr<FormController> m_formController; | 1244 OwnPtr<FormController> m_formController; |
1242 | 1245 |
1243 TextLinkColors m_textLinkColors; | 1246 TextLinkColors m_textLinkColors; |
1244 const OwnPtr<VisitedLinkState> m_visitedLinkState; | 1247 const OwnPtr<VisitedLinkState> m_visitedLinkState; |
1245 | 1248 |
1246 bool m_visuallyOrdered; | 1249 bool m_visuallyOrdered; |
1247 ReadyState m_readyState; | 1250 ReadyState m_readyState; |
1248 bool m_isParsing; | 1251 bool m_isParsing; |
1249 | 1252 |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1370 Document* m_templateDocumentHost; // Manually managed weakref (backpointer f
rom m_templateDocument). | 1373 Document* m_templateDocumentHost; // Manually managed weakref (backpointer f
rom m_templateDocument). |
1371 | 1374 |
1372 Timer<Document> m_didAssociateFormControlsTimer; | 1375 Timer<Document> m_didAssociateFormControlsTimer; |
1373 HashSet<RefPtr<Element> > m_associatedFormControls; | 1376 HashSet<RefPtr<Element> > m_associatedFormControls; |
1374 | 1377 |
1375 HashSet<SVGUseElement*> m_useElementsNeedingUpdate; | 1378 HashSet<SVGUseElement*> m_useElementsNeedingUpdate; |
1376 HashSet<Element*> m_layerUpdateElements; | 1379 HashSet<Element*> m_layerUpdateElements; |
1377 | 1380 |
1378 bool m_hasViewportUnits; | 1381 bool m_hasViewportUnits; |
1379 | 1382 |
1380 HashSet<DocumentVisibilityObserver*> m_visibilityObservers; | 1383 typedef WillBeHeapHashSet<RawPtrWillBeWeakMember<DocumentVisibilityObserver>
> DocumentVisibilityObserverSet; |
| 1384 DocumentVisibilityObserverSet m_visibilityObservers; |
1381 | 1385 |
1382 int m_styleRecalcElementCounter; | 1386 int m_styleRecalcElementCounter; |
1383 }; | 1387 }; |
1384 | 1388 |
1385 inline void Document::notifyRemovePendingSheetIfNeeded() | 1389 inline void Document::notifyRemovePendingSheetIfNeeded() |
1386 { | 1390 { |
1387 if (m_needsNotifyRemoveAllPendingStylesheet) | 1391 if (m_needsNotifyRemoveAllPendingStylesheet) |
1388 didRemoveAllPendingStylesheet(); | 1392 didRemoveAllPendingStylesheet(); |
1389 } | 1393 } |
1390 | 1394 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1436 inline bool Node::isDocumentNode() const | 1440 inline bool Node::isDocumentNode() const |
1437 { | 1441 { |
1438 return this == document(); | 1442 return this == document(); |
1439 } | 1443 } |
1440 | 1444 |
1441 Node* eventTargetNodeForDocument(Document*); | 1445 Node* eventTargetNodeForDocument(Document*); |
1442 | 1446 |
1443 } // namespace WebCore | 1447 } // namespace WebCore |
1444 | 1448 |
1445 #endif // Document_h | 1449 #endif // Document_h |
OLD | NEW |