OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 WEBKIT_EXPORT bool equals(const WebNode&) const; | 67 WEBKIT_EXPORT bool equals(const WebNode&) const; |
68 // Required for using WebNodes in std maps. Note the order used is | 68 // Required for using WebNodes in std maps. Note the order used is |
69 // arbitrary and should not be expected to have any specific meaning. | 69 // arbitrary and should not be expected to have any specific meaning. |
70 WEBKIT_EXPORT bool lessThan(const WebNode&) const; | 70 WEBKIT_EXPORT bool lessThan(const WebNode&) const; |
71 | 71 |
72 bool isNull() const { return m_private.isNull(); } | 72 bool isNull() const { return m_private.isNull(); } |
73 | 73 |
74 enum NodeType { | 74 enum NodeType { |
75 ElementNode = 1, | 75 ElementNode = 1, |
76 AttributeNode, | 76 AttributeNode = 2, |
77 TextNode, | 77 TextNode = 3, |
78 CDataSectionNode, | 78 CDataSectionNode = 4, |
79 EntityReferenceNode, | 79 // EntityReferenceNodes are deprecated and impossible to create in WebKi
t. |
80 EntityNode, | 80 EntityNode = 6, |
81 ProcessingInstructionsNode, | 81 ProcessingInstructionsNode = 7, |
82 CommentNode, | 82 CommentNode = 8, |
83 DocumentNode, | 83 DocumentNode = 9, |
84 DocumentTypeNode, | 84 DocumentTypeNode = 10, |
85 DocumentFragmentNode, | 85 DocumentFragmentNode = 11, |
86 NotationNode, | 86 NotationNode = 12, |
87 XPathNamespaceNode, | 87 XPathNamespaceNode = 13, |
88 ShadowRootNode | 88 ShadowRootNode = 14 |
89 }; | 89 }; |
90 | 90 |
91 WEBKIT_EXPORT NodeType nodeType() const; | 91 WEBKIT_EXPORT NodeType nodeType() const; |
92 WEBKIT_EXPORT WebNode parentNode() const; | 92 WEBKIT_EXPORT WebNode parentNode() const; |
93 WEBKIT_EXPORT WebString nodeName() const; | 93 WEBKIT_EXPORT WebString nodeName() const; |
94 WEBKIT_EXPORT WebString nodeValue() const; | 94 WEBKIT_EXPORT WebString nodeValue() const; |
95 WEBKIT_EXPORT bool setNodeValue(const WebString&); | 95 WEBKIT_EXPORT bool setNodeValue(const WebString&); |
96 WEBKIT_EXPORT WebDocument document() const; | 96 WEBKIT_EXPORT WebDocument document() const; |
97 WEBKIT_EXPORT WebNode firstChild() const; | 97 WEBKIT_EXPORT WebNode firstChild() const; |
98 WEBKIT_EXPORT WebNode lastChild() const; | 98 WEBKIT_EXPORT WebNode lastChild() const; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 inline bool operator<(const WebNode& a, const WebNode& b) | 173 inline bool operator<(const WebNode& a, const WebNode& b) |
174 { | 174 { |
175 return a.lessThan(b); | 175 return a.lessThan(b); |
176 } | 176 } |
177 | 177 |
178 } // namespace WebKit | 178 } // namespace WebKit |
179 | 179 |
180 #endif | 180 #endif |
OLD | NEW |