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

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

Issue 1303673002: Get rid of unused member function rootEditableElement() in PositionAlgorithm<Strategy> template clas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 2015-08-19T14:03:30 Created 5 years, 4 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
« no previous file with comments | « no previous file | no next file » | 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 // iterator. This position must be a |PositionAnchorType::OffsetInAhcor| to 153 // iterator. This position must be a |PositionAnchorType::OffsetInAhcor| to
154 // behave as |Range| boundary point. 154 // behave as |Range| boundary point.
155 Node* nodeAsRangePastLastNode() const; 155 Node* nodeAsRangePastLastNode() const;
156 156
157 Node* commonAncestorContainer(const PositionAlgorithm<Strategy>&) const; 157 Node* commonAncestorContainer(const PositionAlgorithm<Strategy>&) const;
158 158
159 Node* anchorNode() const { return m_anchorNode.get(); } 159 Node* anchorNode() const { return m_anchorNode.get(); }
160 160
161 Document* document() const { return m_anchorNode ? &m_anchorNode->document() : 0; } 161 Document* document() const { return m_anchorNode ? &m_anchorNode->document() : 0; }
162 bool inDocument() const { return m_anchorNode && m_anchorNode->inDocument(); } 162 bool inDocument() const { return m_anchorNode && m_anchorNode->inDocument(); }
163 Element* rootEditableElement() const
164 {
165 Node* container = computeContainerNode();
166 return container ? container->rootEditableElement() : 0;
167 }
168 163
169 bool isNull() const { return !m_anchorNode; } 164 bool isNull() const { return !m_anchorNode; }
170 bool isNotNull() const { return m_anchorNode; } 165 bool isNotNull() const { return m_anchorNode; }
171 bool isOrphan() const { return m_anchorNode && !m_anchorNode->inDocument(); } 166 bool isOrphan() const { return m_anchorNode && !m_anchorNode->inDocument(); }
172 167
173 // Move up or down the DOM by one position. 168 // Move up or down the DOM by one position.
174 // Offsets are computed using layout text for nodes that have layoutObjects - but note that even when 169 // Offsets are computed using layout text for nodes that have layoutObjects - but note that even when
175 // using composed characters, the result may be inside a single user-visible character if a ligature is formed. 170 // using composed characters, the result may be inside a single user-visible character if a ligature is formed.
176 PositionAlgorithm<Strategy> previous(PositionMoveType = CodePoint) const; 171 PositionAlgorithm<Strategy> previous(PositionMoveType = CodePoint) const;
177 PositionAlgorithm<Strategy> next(PositionMoveType = CodePoint) const; 172 PositionAlgorithm<Strategy> next(PositionMoveType = CodePoint) const;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 442
448 } // namespace blink 443 } // namespace blink
449 444
450 #ifndef NDEBUG 445 #ifndef NDEBUG
451 // Outside the WebCore namespace for ease of invocation from gdb. 446 // Outside the WebCore namespace for ease of invocation from gdb.
452 void showTree(const blink::Position&); 447 void showTree(const blink::Position&);
453 void showTree(const blink::Position*); 448 void showTree(const blink::Position*);
454 #endif 449 #endif
455 450
456 #endif // Position_h 451 #endif // Position_h
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698