Home | History | Annotate | Download | only in dom

Lines Matching defs:Position

52 class Position {
60 Position()
68 Position(PassRefPtr<Node> anchorNode, int offset);
71 Position(PassRefPtr<Node> anchorNode, AnchorType);
73 Position(PassRefPtr<Node> anchorNode, int offset, AnchorType);
81 Node* containerNode() const; // NULL for a before/after position anchored to a node with no parent
83 Position parentAnchoredEquivalent() const; // Convenience method for DOM positions that also fixes up some positions for editing
100 // These are convenience methods which are smart about whether the position is neighbor anchored or parent anchored
106 // FIXME: Callers should be moved off of node(), node() is not always the container for this position.
108 // will be treated as before ignoredNode (thus node() is really after the position, not containing it).
114 // the position is a legacy editing position.
125 // Move up or down the DOM by one position.
128 Position previous(PositionMoveType = CodePoint) const;
129 Position next(PositionMoveType = CodePoint) const;
148 // These aren't really basic "position" operations. More high level editing helper functions.
149 Position leadingWhitespacePosition(EAffinity, bool considerNonCollapsibleWhitespace = false) const;
150 Position trailingWhitespacePosition(EAffinity, bool considerNonCollapsibleWhitespace = false) const;
153 Position upstream(EditingBoundaryCrossingRule = CannotCrossEditingBoundary) const;
154 Position downstream(EditingBoundaryCrossingRule = CannotCrossEditingBoundary) const;
159 bool rendersInDifferentPosition(const Position&) const;
182 Position previousCharacterPosition(EAffinity) const;
183 Position nextCharacterPosition(EAffinity) const;
196 inline bool operator==(const Position& a, const Position& b)
203 inline bool operator!=(const Position& a, const Position& b)
208 // We define position creation functions to make callsites more readable.
209 // These are inline to prevent ref-churn when returning a Position object.
212 inline Position positionInParentBeforeNode(const Node* node)
216 // that the caller is trying to make a position relative to a disconnected node (which is likely an error)
218 return Position(node->parentNode(), node->nodeIndex(), Position::PositionIsOffsetInAnchor);
221 inline Position positionInParentAfterNode(const Node* node)
224 return Position(node->parentNode(), node->nodeIndex() + 1, Position::PositionIsOffsetInAnchor);
228 inline Position positionBeforeNode(Node* anchorNode)
231 return Position(anchorNode, Position::PositionIsBeforeAnchor);
234 inline Position positionAfterNode(Node* anchorNode)
237 return Position(anchorNode, Position::PositionIsAfterAnchor);
246 inline Position firstPositionInNode(Node* anchorNode)
248 return Position(anchorNode, 0, Position::PositionIsOffsetInAnchor);
251 inline Position lastPositionInNode(Node* anchorNode)
253 return Position(anchorNode, lastOffsetInNode(anchorNode), Position::PositionIsOffsetInAnchor);
260 void showTree(const WebCore::Position&);
261 void showTree(const WebCore::Position*);