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

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

Issue 698123002: Remove more API from Node and ContainerNode. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/dom/MutationObserverRegistration.cpp ('k') | sky/engine/core/dom/Node.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 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved. 5 * Copyright (C) 2004-2011, 2014 Apple Inc. All rights reserved.
6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 6 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 protected: 101 protected:
102 // Oilpan: This member is traced in NodeRareData. 102 // Oilpan: This member is traced in NodeRareData.
103 // FIXME: Can we add traceAfterDispatch and finalizeGarbageCollectedObject 103 // FIXME: Can we add traceAfterDispatch and finalizeGarbageCollectedObject
104 // to NodeRareDataBase, and make m_renderer Member<>? 104 // to NodeRareDataBase, and make m_renderer Member<>?
105 RenderObject* m_renderer; 105 RenderObject* m_renderer;
106 }; 106 };
107 107
108 // TreeShared should be the last to pack TreeShared::m_refCount and 108 // TreeShared should be the last to pack TreeShared::m_refCount and
109 // Node::m_nodeFlags on 64bit platforms. 109 // Node::m_nodeFlags on 64bit platforms.
110 #define NODE_BASE_CLASSES public EventTarget, public TreeShared<Node> 110 class Node : public EventTarget, public TreeShared<Node> {
111
112 class Node : NODE_BASE_CLASSES {
113 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeShared<Node>); 111 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeShared<Node>);
114 DEFINE_WRAPPERTYPEINFO(); 112 DEFINE_WRAPPERTYPEINFO();
115 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Node);
116 friend class Document; 113 friend class Document;
117 friend class TreeScope; 114 friend class TreeScope;
118 friend class TreeScopeAdopter; 115 friend class TreeScopeAdopter;
119 public: 116 public:
120 enum NodeType { 117 enum NodeType {
121 ELEMENT_NODE = 1, 118 ELEMENT_NODE = 1,
122 TEXT_NODE = 3, 119 TEXT_NODE = 3,
123 DOCUMENT_NODE = 9, 120 DOCUMENT_NODE = 9,
124 DOCUMENT_FRAGMENT_NODE = 11, 121 DOCUMENT_FRAGMENT_NODE = 11,
125 }; 122 };
(...skipping 16 matching lines...) Expand all
142 #endif 139 #endif
143 140
144 static void dumpStatistics(); 141 static void dumpStatistics();
145 142
146 virtual ~Node(); 143 virtual ~Node();
147 144
148 // DOM methods & attributes for Node 145 // DOM methods & attributes for Node
149 146
150 bool hasTagName(const HTMLQualifiedName&) const; 147 bool hasTagName(const HTMLQualifiedName&) const;
151 virtual String nodeName() const = 0; 148 virtual String nodeName() const = 0;
152 virtual String nodeValue() const;
153 virtual void setNodeValue(const String&);
154 virtual NodeType nodeType() const = 0; 149 virtual NodeType nodeType() const = 0;
155 ContainerNode* parentNode() const; 150 ContainerNode* parentNode() const;
156 Element* parentElement() const; 151 Element* parentElement() const;
157 ContainerNode* parentElementOrShadowRoot() const; 152 ContainerNode* parentElementOrShadowRoot() const;
158 ContainerNode* parentElementOrDocumentFragment() const; 153 ContainerNode* parentElementOrDocumentFragment() const;
159 Node* previousSibling() const { return m_previous; } 154 Node* previousSibling() const { return m_previous; }
160 Node* nextSibling() const { return m_next; } 155 Node* nextSibling() const { return m_next; }
161 Node* firstChild() const; 156 Node* firstChild() const;
162 Node* lastChild() const; 157 Node* lastChild() const;
163 158
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 void unregisterMutationObserver(MutationObserverRegistration*); 559 void unregisterMutationObserver(MutationObserverRegistration*);
565 void registerTransientMutationObserver(MutationObserverRegistration*); 560 void registerTransientMutationObserver(MutationObserverRegistration*);
566 void unregisterTransientMutationObserver(MutationObserverRegistration*); 561 void unregisterTransientMutationObserver(MutationObserverRegistration*);
567 void notifyMutationObserversNodeWillDetach(); 562 void notifyMutationObserversNodeWillDetach();
568 563
569 PassRefPtr<StaticNodeList> getDestinationInsertionPoints(); 564 PassRefPtr<StaticNodeList> getDestinationInsertionPoints();
570 565
571 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl ag); } 566 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl ag); }
572 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } 567 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); }
573 568
574 virtual void trace(Visitor*) override;
575
576 unsigned lengthOfContents() const; 569 unsigned lengthOfContents() const;
577 570
578 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*) override; 571 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext, v8::Isolate*) override;
579 572
580 private: 573 private:
581 enum NodeFlags { 574 enum NodeFlags {
582 HasRareDataFlag = 1, 575 HasRareDataFlag = 1,
583 576
584 // Node type flags. These never change once created. 577 // Node type flags. These never change once created.
585 IsTextFlag = 1 << 1, 578 IsTextFlag = 1 << 1,
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 } // namespace blink 784 } // namespace blink
792 785
793 #ifndef NDEBUG 786 #ifndef NDEBUG
794 // Outside the WebCore namespace for ease of invocation from gdb. 787 // Outside the WebCore namespace for ease of invocation from gdb.
795 void showNode(const blink::Node*); 788 void showNode(const blink::Node*);
796 void showTree(const blink::Node*); 789 void showTree(const blink::Node*);
797 void showNodePath(const blink::Node*); 790 void showNodePath(const blink::Node*);
798 #endif 791 #endif
799 792
800 #endif // Node_h 793 #endif // Node_h
OLDNEW
« no previous file with comments | « sky/engine/core/dom/MutationObserverRegistration.cpp ('k') | sky/engine/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698