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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 class Document : public ContainerNode, public TreeScope, public ExecutionContext
, public ExecutionContextClient | 121 class Document : public ContainerNode, public TreeScope, public ExecutionContext
, public ExecutionContextClient |
122 , public DocumentSupplementable, public LifecycleContext<Document>, public R
esourceClient { | 122 , public DocumentSupplementable, public LifecycleContext<Document>, public R
esourceClient { |
123 DEFINE_WRAPPERTYPEINFO(); | 123 DEFINE_WRAPPERTYPEINFO(); |
124 public: | 124 public: |
125 static PassRefPtr<Document> create(const DocumentInit& initializer = Documen
tInit()) | 125 static PassRefPtr<Document> create(const DocumentInit& initializer = Documen
tInit()) |
126 { | 126 { |
127 return adoptRef(new Document(initializer)); | 127 return adoptRef(new Document(initializer)); |
128 } | 128 } |
129 virtual ~Document(); | 129 virtual ~Document(); |
130 | 130 |
131 // Called by JS. | |
132 static PassRefPtr<Document> create(Document&); | |
133 | |
134 MediaQueryMatcher& mediaQueryMatcher(); | 131 MediaQueryMatcher& mediaQueryMatcher(); |
135 | 132 |
136 void mediaQueryAffectingValueChanged(); | 133 void mediaQueryAffectingValueChanged(); |
137 | 134 |
138 #if !ENABLE(OILPAN) | 135 #if !ENABLE(OILPAN) |
139 using ContainerNode::ref; | 136 using ContainerNode::ref; |
140 using ContainerNode::deref; | 137 using ContainerNode::deref; |
141 #endif | 138 #endif |
142 using ExecutionContextClient::addConsoleMessage; | 139 using ExecutionContextClient::addConsoleMessage; |
143 using TreeScope::getElementById; | 140 using TreeScope::getElementById; |
(...skipping 13 matching lines...) Expand all Loading... |
157 | 154 |
158 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } | 155 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } |
159 | 156 |
160 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } | 157 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } |
161 | 158 |
162 String outgoingReferrer(); | 159 String outgoingReferrer(); |
163 | 160 |
164 Location* location() const; | 161 Location* location() const; |
165 | 162 |
166 PassRefPtr<Element> createElement(const AtomicString& name, ExceptionState&)
; | 163 PassRefPtr<Element> createElement(const AtomicString& name, ExceptionState&)
; |
| 164 PassRefPtr<Text> createText(const String& text); |
167 PassRefPtr<DocumentFragment> createDocumentFragment(); | 165 PassRefPtr<DocumentFragment> createDocumentFragment(); |
168 PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionState&); | 166 PassRefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionState&); |
169 PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser
); | 167 PassRefPtr<Element> createElement(const QualifiedName&, bool createdByParser
); |
170 | 168 |
171 Element* elementFromPoint(int x, int y) const; | 169 Element* elementFromPoint(int x, int y) const; |
172 PassRefPtr<Range> caretRangeFromPoint(int x, int y); | 170 PassRefPtr<Range> caretRangeFromPoint(int x, int y); |
173 | 171 |
174 String readyState() const; | 172 String readyState() const; |
175 | 173 |
176 AtomicString inputEncoding() const { return Document::encodingName(); } | 174 AtomicString inputEncoding() const { return Document::encodingName(); } |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 489 |
492 void setHasViewportUnits() { m_hasViewportUnits = true; } | 490 void setHasViewportUnits() { m_hasViewportUnits = true; } |
493 bool hasViewportUnits() const { return m_hasViewportUnits; } | 491 bool hasViewportUnits() const { return m_hasViewportUnits; } |
494 void notifyResizeForViewportUnits(); | 492 void notifyResizeForViewportUnits(); |
495 | 493 |
496 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; } | 494 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; } |
497 | 495 |
498 Picture* rootPicture() const; | 496 Picture* rootPicture() const; |
499 void setRootPicture(PassRefPtr<Picture> picture); | 497 void setRootPicture(PassRefPtr<Picture> picture); |
500 | 498 |
| 499 void setFrame(LocalFrame* frame) { m_frame = frame; } |
| 500 void setFrameView(FrameView* view) { m_frameView = view; } |
| 501 |
501 protected: | 502 protected: |
502 explicit Document(const DocumentInit&); | 503 explicit Document(const DocumentInit&); |
503 | 504 |
504 #if !ENABLE(OILPAN) | 505 #if !ENABLE(OILPAN) |
505 virtual void dispose() override; | 506 virtual void dispose() override; |
506 #endif | 507 #endif |
507 | 508 |
508 PassRefPtr<Document> cloneDocumentWithoutChildren(); | 509 PassRefPtr<Document> cloneDocumentWithoutChildren(); |
509 | 510 |
510 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
<ContainerNode> newContainerNode, ExceptionState&); | 511 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr
<ContainerNode> newContainerNode, ExceptionState&); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 // live and die together. Without Oilpan, the templateDocumentHost | 678 // live and die together. Without Oilpan, the templateDocumentHost |
678 // is a manually managed backpointer from m_templateDocument. | 679 // is a manually managed backpointer from m_templateDocument. |
679 RawPtr<Document> m_templateDocumentHost; | 680 RawPtr<Document> m_templateDocumentHost; |
680 | 681 |
681 bool m_hasViewportUnits; | 682 bool m_hasViewportUnits; |
682 | 683 |
683 int m_styleRecalcElementCounter; | 684 int m_styleRecalcElementCounter; |
684 mutable DocumentLoadTiming m_documentLoadTiming; | 685 mutable DocumentLoadTiming m_documentLoadTiming; |
685 | 686 |
686 RefPtr<Picture> m_picture; | 687 RefPtr<Picture> m_picture; |
| 688 |
| 689 FrameView* m_frameView; |
687 }; | 690 }; |
688 | 691 |
689 inline void Document::scheduleRenderTreeUpdateIfNeeded() | 692 inline void Document::scheduleRenderTreeUpdateIfNeeded() |
690 { | 693 { |
691 // Inline early out to avoid the function calls below. | 694 // Inline early out to avoid the function calls below. |
692 if (hasPendingStyleRecalc()) | 695 if (hasPendingStyleRecalc()) |
693 return; | 696 return; |
694 if (shouldScheduleRenderTreeUpdate() && needsRenderTreeUpdate()) | 697 if (shouldScheduleRenderTreeUpdate() && needsRenderTreeUpdate()) |
695 scheduleRenderTreeUpdate(); | 698 scheduleRenderTreeUpdate(); |
696 } | 699 } |
(...skipping 16 matching lines...) Expand all Loading... |
713 } | 716 } |
714 | 717 |
715 } // namespace blink | 718 } // namespace blink |
716 | 719 |
717 #ifndef NDEBUG | 720 #ifndef NDEBUG |
718 // Outside the WebCore namespace for ease of invocation from gdb. | 721 // Outside the WebCore namespace for ease of invocation from gdb. |
719 void showLiveDocumentInstances(); | 722 void showLiveDocumentInstances(); |
720 #endif | 723 #endif |
721 | 724 |
722 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ | 725 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ |
OLD | NEW |