Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(603)

Side by Side Diff: sky/engine/core/dom/Document.h

Issue 871383002: Merge HTMLDocument into Document (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/core/css/parser/CSSPropertyParser.cpp ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 class Settings; 116 class Settings;
117 class StyleEngine; 117 class StyleEngine;
118 class StyleResolver; 118 class StyleResolver;
119 class Text; 119 class Text;
120 class WebGLRenderingContext; 120 class WebGLRenderingContext;
121 121
122 struct AnnotatedRegionValue; 122 struct AnnotatedRegionValue;
123 123
124 typedef int ExceptionCode; 124 typedef int ExceptionCode;
125 125
126 enum DocumentClass {
127 DefaultDocumentClass = 0,
128 HTMLDocumentClass = 1,
129 MediaDocumentClass = 1 << 4,
130 };
131
132 typedef unsigned char DocumentClassFlags;
133
134 class Document; 126 class Document;
135 127
136 class Document : public ContainerNode, public TreeScope, public ExecutionContext , public ExecutionContextClient 128 class Document : public ContainerNode, public TreeScope, public ExecutionContext , public ExecutionContextClient
137 , public DocumentSupplementable, public LifecycleContext<Document>, public R esourceClient { 129 , public DocumentSupplementable, public LifecycleContext<Document>, public R esourceClient {
138 DEFINE_WRAPPERTYPEINFO(); 130 DEFINE_WRAPPERTYPEINFO();
139 public: 131 public:
140 static PassRefPtr<Document> create(const DocumentInit& initializer = Documen tInit()) 132 static PassRefPtr<Document> create(const DocumentInit& initializer = Documen tInit())
141 { 133 {
142 return adoptRef(new Document(initializer)); 134 return adoptRef(new Document(initializer));
143 } 135 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 void setContentLanguage(const AtomicString&); 198 void setContentLanguage(const AtomicString&);
207 199
208 KURL baseURI() const; 200 KURL baseURI() const;
209 201
210 String visibilityState() const; 202 String visibilityState() const;
211 bool hidden() const; 203 bool hidden() const;
212 void didChangeVisibilityState(); 204 void didChangeVisibilityState();
213 205
214 PassRefPtr<Node> adoptNode(PassRefPtr<Node> source, ExceptionState&); 206 PassRefPtr<Node> adoptNode(PassRefPtr<Node> source, ExceptionState&);
215 207
216 bool isHTMLDocument() const { return m_documentClasses & HTMLDocumentClass; }
217
218 struct TransitionElementData { 208 struct TransitionElementData {
219 String scope; 209 String scope;
220 String selector; 210 String selector;
221 String markup; 211 String markup;
222 }; 212 };
223 void getTransitionElementData(Vector<TransitionElementData>&); 213 void getTransitionElementData(Vector<TransitionElementData>&);
224 214
225 StyleResolver& styleResolver() const; 215 StyleResolver& styleResolver() const;
226 216
227 bool isScriptExecutionReady() const { return haveImportsLoaded(); } 217 bool isScriptExecutionReady() const { return haveImportsLoaded(); }
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 523
534 void setHasViewportUnits() { m_hasViewportUnits = true; } 524 void setHasViewportUnits() { m_hasViewportUnits = true; }
535 bool hasViewportUnits() const { return m_hasViewportUnits; } 525 bool hasViewportUnits() const { return m_hasViewportUnits; }
536 void notifyResizeForViewportUnits(); 526 void notifyResizeForViewportUnits();
537 527
538 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; } 528 void didRecalculateStyleForElement() { ++m_styleRecalcElementCounter; }
539 529
540 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*) override; 530 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*) override;
541 531
542 protected: 532 protected:
543 Document(const DocumentInit&, DocumentClassFlags = DefaultDocumentClass); 533 explicit Document(const DocumentInit&);
544 534
545 #if !ENABLE(OILPAN) 535 #if !ENABLE(OILPAN)
546 virtual void dispose() override; 536 virtual void dispose() override;
547 #endif 537 #endif
548 538
549 PassRefPtr<Document> cloneDocumentWithoutChildren(); 539 PassRefPtr<Document> cloneDocumentWithoutChildren();
550 540
551 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr <ContainerNode> newContainerNode, ExceptionState&); 541 bool importContainerNodeChildren(ContainerNode* oldContainerNode, PassRefPtr <ContainerNode> newContainerNode, ExceptionState&);
552 542
553 private: 543 private:
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 double m_startTime; 674 double m_startTime;
685 675
686 Vector<RefPtr<HTMLScriptElement> > m_currentScriptStack; 676 Vector<RefPtr<HTMLScriptElement> > m_currentScriptStack;
687 677
688 AtomicString m_contentLanguage; 678 AtomicString m_contentLanguage;
689 679
690 HashMap<String, RefPtr<HTMLCanvasElement> > m_cssCanvasElements; 680 HashMap<String, RefPtr<HTMLCanvasElement> > m_cssCanvasElements;
691 681
692 OwnPtr<SelectorQueryCache> m_selectorQueryCache; 682 OwnPtr<SelectorQueryCache> m_selectorQueryCache;
693 683
694 DocumentClassFlags m_documentClasses;
695
696 RenderView* m_renderView; 684 RenderView* m_renderView;
697 685
698 #if !ENABLE(OILPAN) 686 #if !ENABLE(OILPAN)
699 WeakPtrFactory<Document> m_weakFactory; 687 WeakPtrFactory<Document> m_weakFactory;
700 #endif 688 #endif
701 WeakPtr<Document> m_contextDocument; 689 WeakPtr<Document> m_contextDocument;
702 690
703 int m_loadEventDelayCount; 691 int m_loadEventDelayCount;
704 Timer<Document> m_loadEventDelayTimer; 692 Timer<Document> m_loadEventDelayTimer;
705 693
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 Node* eventTargetNodeForDocument(Document*); 755 Node* eventTargetNodeForDocument(Document*);
768 756
769 } // namespace blink 757 } // namespace blink
770 758
771 #ifndef NDEBUG 759 #ifndef NDEBUG
772 // Outside the WebCore namespace for ease of invocation from gdb. 760 // Outside the WebCore namespace for ease of invocation from gdb.
773 void showLiveDocumentInstances(); 761 void showLiveDocumentInstances();
774 #endif 762 #endif
775 763
776 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_ 764 #endif // SKY_ENGINE_CORE_DOM_DOCUMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/css/parser/CSSPropertyParser.cpp ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698