| OLD | NEW |
| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 // function is supposed to used in HTML serialization and plain text | 130 // function is supposed to used in HTML serialization and plain text |
| 131 // iterator. This position must be a |PositionAnchorType::OffsetInAhcor| to | 131 // iterator. This position must be a |PositionAnchorType::OffsetInAhcor| to |
| 132 // behave as |Range| boundary point. | 132 // behave as |Range| boundary point. |
| 133 Node* nodeAsRangePastLastNode() const; | 133 Node* nodeAsRangePastLastNode() const; |
| 134 | 134 |
| 135 Node* commonAncestorContainer(const PositionTemplate<Strategy>&) const; | 135 Node* commonAncestorContainer(const PositionTemplate<Strategy>&) const; |
| 136 | 136 |
| 137 Node* anchorNode() const { return m_anchorNode.get(); } | 137 Node* anchorNode() const { return m_anchorNode.get(); } |
| 138 | 138 |
| 139 Document* document() const { return m_anchorNode ? &m_anchorNode->document()
: 0; } | 139 Document* document() const { return m_anchorNode ? &m_anchorNode->document()
: 0; } |
| 140 bool inDocument() const { return m_anchorNode && m_anchorNode->inDocument();
} | 140 bool inShadowIncludingDocument() const { return m_anchorNode && m_anchorNode
->inShadowIncludingDocument(); } |
| 141 | 141 |
| 142 bool isNull() const { return !m_anchorNode; } | 142 bool isNull() const { return !m_anchorNode; } |
| 143 bool isNotNull() const { return m_anchorNode; } | 143 bool isNotNull() const { return m_anchorNode; } |
| 144 bool isOrphan() const { return m_anchorNode && !m_anchorNode->inDocument();
} | 144 bool isOrphan() const { return m_anchorNode && !m_anchorNode->inShadowInclud
ingDocument(); } |
| 145 | 145 |
| 146 int compareTo(const PositionTemplate<Strategy>&) const; | 146 int compareTo(const PositionTemplate<Strategy>&) const; |
| 147 | 147 |
| 148 // These can be either inside or just before/after the node, depending on | 148 // These can be either inside or just before/after the node, depending on |
| 149 // if the node is ignored by editing or not. | 149 // if the node is ignored by editing or not. |
| 150 // FIXME: These should go away. They only make sense for legacy positions. | 150 // FIXME: These should go away. They only make sense for legacy positions. |
| 151 bool atFirstEditingPositionForNode() const; | 151 bool atFirstEditingPositionForNode() const; |
| 152 bool atLastEditingPositionForNode() const; | 152 bool atLastEditingPositionForNode() const; |
| 153 | 153 |
| 154 bool atStartOfTree() const; | 154 bool atStartOfTree() const; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 396 |
| 397 } // namespace blink | 397 } // namespace blink |
| 398 | 398 |
| 399 #ifndef NDEBUG | 399 #ifndef NDEBUG |
| 400 // Outside the WebCore namespace for ease of invocation from gdb. | 400 // Outside the WebCore namespace for ease of invocation from gdb. |
| 401 void showTree(const blink::Position&); | 401 void showTree(const blink::Position&); |
| 402 void showTree(const blink::Position*); | 402 void showTree(const blink::Position*); |
| 403 #endif | 403 #endif |
| 404 | 404 |
| 405 #endif // Position_h | 405 #endif // Position_h |
| OLD | NEW |