Home | History | Annotate | Download | only in dom

Lines Matching refs:Node

31 #include "Node.h" // for position creation functions
41 class Node;
71 // For creating legacy editing positions: (Anchor type will be determined from editingIgnoresContent(node))
72 Position(PassRefPtr<Node> anchorNode, int offset);
75 Position(PassRefPtr<Node> anchorNode, AnchorType);
77 Position(PassRefPtr<Node> anchorNode, int offset, AnchorType);
85 Node* containerNode() const; // NULL for a before/after position anchored to a node with no parent
103 Node* computeNodeBeforePosition() const;
104 Node* computeNodeAfterPosition() const;
106 Node* anchorNode() const { return m_anchorNode.get(); }
108 // FIXME: Callers should be moved off of node(), node() is not always the container for this position.
109 // For nodes which editingIgnoresContent(node()) returns true, positions like [ignoredNode, 0]
110 // will be treated as before ignoredNode (thus node() is really after the position, not containing it).
111 Node* node() const { return m_anchorNode.get(); }
115 void moveToPosition(PassRefPtr<Node> anchorNode, int offset);
129 static int uncheckedPreviousOffset(const Node*, int current);
130 static int uncheckedPreviousOffsetForBackwardDeletion(const Node*, int current);
131 static int uncheckedNextOffset(const Node*, int current);
133 // These can be either inside or just before/after the node, depending on
134 // if the node is ignored by editing or not.
162 static bool nodeIsUserSelectNone(Node*);
177 static AnchorType anchorTypeForLegacyEditingPosition(Node* anchorNode, int offset);
179 RefPtr<Node> m_anchorNode;
182 // and m_offset > 0 as "after the anchor node". See rangeCompliantEquivalent for more info.
204 inline Position positionInParentBeforeNode(const Node* node)
206 // FIXME: This should ASSERT(node->parentNode())
208 // that the caller is trying to make a position relative to a disconnected node (which is likely an error)
209 // Specifically, editing/deleting/delete-ligature-001.html crashes with ASSERT(node->parentNode())
210 return Position(node->parentNode(), node->nodeIndex(), Position::PositionIsOffsetInAnchor);
213 inline Position positionInParentAfterNode(const Node* node)
215 ASSERT(node->parentNode());
216 return Position(node->parentNode(), node->nodeIndex() + 1, Position::PositionIsOffsetInAnchor);
220 inline Position positionBeforeNode(Node* anchorNode)
226 inline Position positionAfterNode(Node* anchorNode)
232 inline int lastOffsetInNode(Node* node)
234 return node->offsetInCharacters() ? node->maxCharacterOffset() : node->childNodeCount();
238 inline Position firstPositionInNode(Node* anchorNode)
243 inline Position lastPositionInNode(Node* anchorNode)