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

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

Issue 1190303002: Introduce Position::nodeAsRangeLastNode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: reviews Created 5 years, 6 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/core.gypi ('k') | Source/core/dom/Position.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) 2004, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 134 }
135 135
136 // These are convenience methods which are smart about whether the position is neighbor anchored or parent anchored 136 // These are convenience methods which are smart about whether the position is neighbor anchored or parent anchored
137 Node* computeNodeBeforePosition() const; 137 Node* computeNodeBeforePosition() const;
138 Node* computeNodeAfterPosition() const; 138 Node* computeNodeAfterPosition() const;
139 139
140 // Returns node as |Range::firstNode()|. This position must be a 140 // Returns node as |Range::firstNode()|. This position must be a
141 // |PositionIs::OffsetInAhcor| to behave as |Range| boundary point. 141 // |PositionIs::OffsetInAhcor| to behave as |Range| boundary point.
142 Node* nodeAsRangeFirstNode() const; 142 Node* nodeAsRangeFirstNode() const;
143 143
144 // Similar to |nodeAsRangeLastNode()|, but returns a node in a range.
145 Node* nodeAsRangeLastNode() const;
146
144 // Returns a node as past last as same as |Range::pastLastNode()|. This 147 // Returns a node as past last as same as |Range::pastLastNode()|. This
145 // function is supposed to used in HTML serialization and plain text 148 // function is supposed to used in HTML serialization and plain text
146 // iterator. This position must be a |PositionIs::OffsetInAhcor| to 149 // iterator. This position must be a |PositionIs::OffsetInAhcor| to
147 // behave as |Range| boundary point. 150 // behave as |Range| boundary point.
148 Node* nodeAsRangePastLastNode() const; 151 Node* nodeAsRangePastLastNode() const;
149 152
150 Node* commonAncestorContainer(const PositionType&) const; 153 Node* commonAncestorContainer(const PositionType&) const;
151 154
152 Node* anchorNode() const { return m_anchorNode.get(); } 155 Node* anchorNode() const { return m_anchorNode.get(); }
153 156
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 456
454 } // namespace blink 457 } // namespace blink
455 458
456 #ifndef NDEBUG 459 #ifndef NDEBUG
457 // Outside the WebCore namespace for ease of invocation from gdb. 460 // Outside the WebCore namespace for ease of invocation from gdb.
458 void showTree(const blink::Position&); 461 void showTree(const blink::Position&);
459 void showTree(const blink::Position*); 462 void showTree(const blink::Position*);
460 #endif 463 #endif
461 464
462 #endif // Position_h 465 #endif // Position_h
OLDNEW
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/dom/Position.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698