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

Side by Side Diff: Source/core/dom/Node.h

Issue 14990005: Remove ENTITY_REFERENCE_NODE (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove some empty lines Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/EntityReference.idl ('k') | Source/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, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 friend class Document; 120 friend class Document;
121 friend class TreeScope; 121 friend class TreeScope;
122 friend class TreeScopeAdopter; 122 friend class TreeScopeAdopter;
123 123
124 public: 124 public:
125 enum NodeType { 125 enum NodeType {
126 ELEMENT_NODE = 1, 126 ELEMENT_NODE = 1,
127 ATTRIBUTE_NODE = 2, 127 ATTRIBUTE_NODE = 2,
128 TEXT_NODE = 3, 128 TEXT_NODE = 3,
129 CDATA_SECTION_NODE = 4, 129 CDATA_SECTION_NODE = 4,
130 ENTITY_REFERENCE_NODE = 5,
131 ENTITY_NODE = 6, 130 ENTITY_NODE = 6,
132 PROCESSING_INSTRUCTION_NODE = 7, 131 PROCESSING_INSTRUCTION_NODE = 7,
133 COMMENT_NODE = 8, 132 COMMENT_NODE = 8,
134 DOCUMENT_NODE = 9, 133 DOCUMENT_NODE = 9,
135 DOCUMENT_TYPE_NODE = 10, 134 DOCUMENT_TYPE_NODE = 10,
136 DOCUMENT_FRAGMENT_NODE = 11, 135 DOCUMENT_FRAGMENT_NODE = 11,
137 NOTATION_NODE = 12, 136 NOTATION_NODE = 12,
138 XPATH_NAMESPACE_NODE = 13, 137 XPATH_NAMESPACE_NODE = 13,
139 }; 138 };
139
140 // EntityReference nodes are deprecated and impossible to create in WebKit.
141 // We want Node.ENTITY_REFERNCE_NODE to exist in JS and this enum, makes the bindings
142 // generation not complain about ENTITY_REFERENCE_NODE being missing from th e implementation
143 // while not requiring all switch(NodeType) blocks to include this deprecate d constant.
144 enum DeprecatedNodeType {
145 ENTITY_REFERENCE_NODE = 5
146 };
147
140 enum DocumentPosition { 148 enum DocumentPosition {
141 DOCUMENT_POSITION_EQUIVALENT = 0x00, 149 DOCUMENT_POSITION_EQUIVALENT = 0x00,
142 DOCUMENT_POSITION_DISCONNECTED = 0x01, 150 DOCUMENT_POSITION_DISCONNECTED = 0x01,
143 DOCUMENT_POSITION_PRECEDING = 0x02, 151 DOCUMENT_POSITION_PRECEDING = 0x02,
144 DOCUMENT_POSITION_FOLLOWING = 0x04, 152 DOCUMENT_POSITION_FOLLOWING = 0x04,
145 DOCUMENT_POSITION_CONTAINS = 0x08, 153 DOCUMENT_POSITION_CONTAINS = 0x08,
146 DOCUMENT_POSITION_CONTAINED_BY = 0x10, 154 DOCUMENT_POSITION_CONTAINED_BY = 0x10,
147 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20, 155 DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20,
148 }; 156 };
149 157
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 // Returns true if this node is associated with a document and is in its ass ociated document's 475 // Returns true if this node is associated with a document and is in its ass ociated document's
468 // node tree, false otherwise. 476 // node tree, false otherwise.
469 bool inDocument() const 477 bool inDocument() const
470 { 478 {
471 ASSERT(documentInternal() || !getFlag(InDocumentFlag)); 479 ASSERT(documentInternal() || !getFlag(InDocumentFlag));
472 return getFlag(InDocumentFlag); 480 return getFlag(InDocumentFlag);
473 } 481 }
474 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); } 482 bool isInShadowTree() const { return getFlag(IsInShadowTreeFlag); }
475 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); } 483 bool isInTreeScope() const { return getFlag(static_cast<NodeFlags>(InDocumen tFlag | IsInShadowTreeFlag)); }
476 484
477 bool isReadOnlyNode() const { return nodeType() == ENTITY_REFERENCE_NODE; }
478 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; } 485 bool isDocumentTypeNode() const { return nodeType() == DOCUMENT_TYPE_NODE; }
479 virtual bool childTypeAllowed(NodeType) const { return false; } 486 virtual bool childTypeAllowed(NodeType) const { return false; }
480 unsigned childNodeCount() const; 487 unsigned childNodeCount() const;
481 Node* childNode(unsigned index) const; 488 Node* childNode(unsigned index) const;
482 489
483 void checkSetPrefix(const AtomicString& prefix, ExceptionCode&); 490 void checkSetPrefix(const AtomicString& prefix, ExceptionCode&);
484 bool isDescendantOf(const Node*) const; 491 bool isDescendantOf(const Node*) const;
485 bool contains(const Node*) const; 492 bool contains(const Node*) const;
486 bool containsIncludingShadowDOM(const Node*) const; 493 bool containsIncludingShadowDOM(const Node*) const;
487 bool containsIncludingHostElements(const Node*) const; 494 bool containsIncludingHostElements(const Node*) const;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 895
889 } //namespace 896 } //namespace
890 897
891 #ifndef NDEBUG 898 #ifndef NDEBUG
892 // Outside the WebCore namespace for ease of invocation from gdb. 899 // Outside the WebCore namespace for ease of invocation from gdb.
893 void showTree(const WebCore::Node*); 900 void showTree(const WebCore::Node*);
894 void showNodePath(const WebCore::Node*); 901 void showNodePath(const WebCore::Node*);
895 #endif 902 #endif
896 903
897 #endif 904 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/EntityReference.idl ('k') | Source/core/dom/Node.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698