| 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 * 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 115 |
| 116 #if ENABLE(OILPAN) | 116 #if ENABLE(OILPAN) |
| 117 #define NODE_BASE_CLASSES public GarbageCollectedFinalized<Node>, public EventTa
rget | 117 #define NODE_BASE_CLASSES public GarbageCollectedFinalized<Node>, public EventTa
rget |
| 118 #else | 118 #else |
| 119 // TreeShared should be the last to pack TreeShared::m_refCount and | 119 // TreeShared should be the last to pack TreeShared::m_refCount and |
| 120 // Node::m_nodeFlags on 64bit platforms. | 120 // Node::m_nodeFlags on 64bit platforms. |
| 121 #define NODE_BASE_CLASSES public EventTarget, public TreeShared<Node> | 121 #define NODE_BASE_CLASSES public EventTarget, public TreeShared<Node> |
| 122 #endif | 122 #endif |
| 123 | 123 |
| 124 class Node : NODE_BASE_CLASSES { | 124 class Node : NODE_BASE_CLASSES { |
| 125 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeShared<Node>); |
| 126 DEFINE_WRAPPERTYPEINFO(); |
| 127 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Node); |
| 125 friend class Document; | 128 friend class Document; |
| 126 friend class TreeScope; | 129 friend class TreeScope; |
| 127 friend class TreeScopeAdopter; | 130 friend class TreeScopeAdopter; |
| 128 | |
| 129 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(TreeShared<Node>); | |
| 130 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Node); | |
| 131 public: | 131 public: |
| 132 enum NodeType { | 132 enum NodeType { |
| 133 ELEMENT_NODE = 1, | 133 ELEMENT_NODE = 1, |
| 134 ATTRIBUTE_NODE = 2, | 134 ATTRIBUTE_NODE = 2, |
| 135 TEXT_NODE = 3, | 135 TEXT_NODE = 3, |
| 136 CDATA_SECTION_NODE = 4, | 136 CDATA_SECTION_NODE = 4, |
| 137 PROCESSING_INSTRUCTION_NODE = 7, | 137 PROCESSING_INSTRUCTION_NODE = 7, |
| 138 COMMENT_NODE = 8, | 138 COMMENT_NODE = 8, |
| 139 DOCUMENT_NODE = 9, | 139 DOCUMENT_NODE = 9, |
| 140 DOCUMENT_TYPE_NODE = 10, | 140 DOCUMENT_TYPE_NODE = 10, |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 | 653 |
| 654 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl
ag); } | 654 void setAlreadySpellChecked(bool flag) { setFlag(flag, AlreadySpellCheckedFl
ag); } |
| 655 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } | 655 bool isAlreadySpellChecked() { return getFlag(AlreadySpellCheckedFlag); } |
| 656 | 656 |
| 657 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi
ldrenFlag); } | 657 bool isFinishedParsingChildren() const { return getFlag(IsFinishedParsingChi
ldrenFlag); } |
| 658 | 658 |
| 659 virtual void trace(Visitor*) OVERRIDE; | 659 virtual void trace(Visitor*) OVERRIDE; |
| 660 | 660 |
| 661 unsigned lengthOfContents() const; | 661 unsigned lengthOfContents() const; |
| 662 | 662 |
| 663 virtual v8::Handle<v8::Object> wrap(v8::Handle<v8::Object> creationContext,
v8::Isolate*) OVERRIDE; |
| 664 |
| 663 private: | 665 private: |
| 664 enum NodeFlags { | 666 enum NodeFlags { |
| 665 HasRareDataFlag = 1, | 667 HasRareDataFlag = 1, |
| 666 | 668 |
| 667 // Node type flags. These never change once created. | 669 // Node type flags. These never change once created. |
| 668 IsTextFlag = 1 << 1, | 670 IsTextFlag = 1 << 1, |
| 669 IsContainerFlag = 1 << 2, | 671 IsContainerFlag = 1 << 2, |
| 670 IsElementFlag = 1 << 3, | 672 IsElementFlag = 1 << 3, |
| 671 IsHTMLFlag = 1 << 4, | 673 IsHTMLFlag = 1 << 4, |
| 672 IsSVGFlag = 1 << 5, | 674 IsSVGFlag = 1 << 5, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 | 885 |
| 884 } // namespace blink | 886 } // namespace blink |
| 885 | 887 |
| 886 #ifndef NDEBUG | 888 #ifndef NDEBUG |
| 887 // Outside the WebCore namespace for ease of invocation from gdb. | 889 // Outside the WebCore namespace for ease of invocation from gdb. |
| 888 void showNode(const blink::Node*); | 890 void showNode(const blink::Node*); |
| 889 void showTree(const blink::Node*); | 891 void showTree(const blink::Node*); |
| 890 void showNodePath(const blink::Node*); | 892 void showNodePath(const blink::Node*); |
| 891 #endif | 893 #endif |
| 892 | 894 |
| 893 #endif | 895 #endif // Node_h |
| OLD | NEW |